From ea98f23a2b2530ab5abe097f6f10c519326b9ab4 Mon Sep 17 00:00:00 2001 From: Dylan Date: Thu, 2 Nov 2023 13:38:15 -0400 Subject: [PATCH] Fix #2447, updating cFE to use new versioning system. --- cmake/target/src/target_config.c | 2 +- modules/config/fsw/src/cfe_config_init.c | 3 ++- modules/core_api/fsw/inc/cfe_version.h | 16 ++++------------ modules/es/fsw/src/cfe_es_task.c | 2 +- modules/evs/fsw/src/cfe_evs_task.c | 6 ++++-- modules/sb/fsw/src/cfe_sb_task.c | 6 ++++-- modules/tbl/fsw/src/cfe_tbl_task.c | 2 +- modules/tbl/fsw/src/cfe_tbl_task_cmds.c | 3 ++- modules/time/fsw/src/cfe_time_task.c | 5 +++-- 9 files changed, 22 insertions(+), 23 deletions(-) diff --git a/cmake/target/src/target_config.c b/cmake/target/src/target_config.c index 0b389f079..ebb6ed17e 100644 --- a/cmake/target/src/target_config.c +++ b/cmake/target/src/target_config.c @@ -36,7 +36,7 @@ #include "cfe_es.h" #include "cfe_time.h" #include "cfe_es_resetdata_typedef.h" -#include "cfe_version.h" /* for CFE_VERSION_STRING */ +#include "cfe_version.h" /* for CFE version information */ #include "osapi-version.h" /* for OS_VERSION_STRING */ #ifndef CFE_CPU_NAME_VALUE diff --git a/modules/config/fsw/src/cfe_config_init.c b/modules/config/fsw/src/cfe_config_init.c index 19cde5248..10079c5b9 100644 --- a/modules/config/fsw/src/cfe_config_init.c +++ b/modules/config/fsw/src/cfe_config_init.c @@ -184,7 +184,8 @@ void CFE_Config_SetupBasicBuildInfo(void) CFE_Config_SetValue(CFE_CONFIGID_CORE_VERSION_BUILDNUM, CFE_BUILD_NUMBER); CFE_Config_SetString(CFE_CONFIGID_CORE_VERSION_BASELINE, CFE_BUILD_BASELINE); - CFE_Config_SetString(CFE_CONFIGID_CORE_VERSION_DESCRIPTION, CFE_VERSION_STRING); + CFE_Config_SetString(CFE_CONFIGID_CORE_VERSION_DESCRIPTION, + " cFE DEVELOPMENT BUILD " CFE_SRC_VERSION " (Codename: Equuleus), Last Official Release: cfe v6.7.0"); /* * Initialize values from the "target_config" CFE internal object diff --git a/modules/core_api/fsw/inc/cfe_version.h b/modules/core_api/fsw/inc/cfe_version.h index 584b8d417..862388ae2 100644 --- a/modules/core_api/fsw/inc/cfe_version.h +++ b/modules/core_api/fsw/inc/cfe_version.h @@ -26,8 +26,9 @@ #define CFE_VERSION_H /* Development Build Macro Definitions */ -#define CFE_BUILD_NUMBER 405 /**< @brief Development: Number of development git commits since CFE_BUILD_BASELINE */ -#define CFE_BUILD_BASELINE "v7.0.0-rc4" /**< @brief Development: Reference git tag for build number */ +#define CFE_BUILD_NUMBER 405 /**< @brief Development: Number of development git commits since CFE_BUILD_BASELINE */ +#define CFE_BUILD_BASELINE "equuleus-rc1" /**< @brief Development: Reference git tag for build number */ +#define CFE_BUILD_DEV_CYCLE "equuleus-rc2" /**< @brief Development: Release name for current development cycle */ /* See \ref cfsversions for definitions */ #define CFE_MAJOR_VERSION 6 /*!< @brief Major version number */ @@ -41,7 +42,7 @@ * cFS open-source development use (pending resolution of nasa/cFS#440) * */ -#define CFE_MISSION_REV 0xFF +#define CFE_MISSION_REV 0x00 #define CFE_STR_HELPER(x) #x /**< @brief Convert argument to string */ #define CFE_STR(x) CFE_STR_HELPER(x) /**< @brief Expand macro before conversion */ @@ -54,13 +55,4 @@ */ #define CFE_SRC_VERSION CFE_BUILD_BASELINE "+dev" CFE_STR(CFE_BUILD_NUMBER) -/** - * @brief Long Build Version String - * - * Long freeform string identifying the build, see @ref cfsversions for suggested format for development - * and official releases. - */ -#define CFE_VERSION_STRING \ - " cFE DEVELOPMENT BUILD " CFE_SRC_VERSION " (Codename: Draco), Last Official Release: cfe v6.7.0" - #endif /* CFE_VERSION_H */ diff --git a/modules/es/fsw/src/cfe_es_task.c b/modules/es/fsw/src/cfe_es_task.c index a862ffabf..9f2355e55 100644 --- a/modules/es/fsw/src/cfe_es_task.c +++ b/modules/es/fsw/src/cfe_es_task.c @@ -395,7 +395,7 @@ int32 CFE_ES_TaskInit(void) ** Task startup event message. */ Status = CFE_EVS_SendEvent(CFE_ES_INIT_INF_EID, CFE_EVS_EventType_INFORMATION, "cFE ES Initialized: %s", - CFE_VERSION_STRING); + " cFE DEVELOPMENT BUILD " CFE_SRC_VERSION " (Codename: Equuleus), Last Official Release: cfe v6.7.0"); if (Status != CFE_SUCCESS) { CFE_ES_WriteToSysLog("%s: Error sending init event:RC=0x%08X\n", __func__, (unsigned int)Status); diff --git a/modules/evs/fsw/src/cfe_evs_task.c b/modules/evs/fsw/src/cfe_evs_task.c index 01352f49d..90e50cb6d 100644 --- a/modules/evs/fsw/src/cfe_evs_task.c +++ b/modules/evs/fsw/src/cfe_evs_task.c @@ -302,7 +302,8 @@ int32 CFE_EVS_TaskInit(void) /* Write the AppID to the global location, now that the rest of initialization is done */ CFE_EVS_Global.EVS_AppID = AppID; - EVS_SendEvent(CFE_EVS_STARTUP_EID, CFE_EVS_EventType_INFORMATION, "cFE EVS Initialized: %s", CFE_VERSION_STRING); + EVS_SendEvent(CFE_EVS_STARTUP_EID, CFE_EVS_EventType_INFORMATION, "cFE EVS Initialized: %s", + " cFE DEVELOPMENT BUILD " CFE_SRC_VERSION " (Codename: Equuleus), Last Official Release: cfe v6.7.0"); return CFE_SUCCESS; } @@ -315,7 +316,8 @@ int32 CFE_EVS_TaskInit(void) *-----------------------------------------------------------------*/ int32 CFE_EVS_NoopCmd(const CFE_EVS_NoopCmd_t *data) { - EVS_SendEvent(CFE_EVS_NOOP_EID, CFE_EVS_EventType_INFORMATION, "No-op Cmd Rcvd: %s", CFE_VERSION_STRING); + EVS_SendEvent(CFE_EVS_NOOP_EID, CFE_EVS_EventType_INFORMATION, "No-op Cmd Rcvd: %s", + " cFE DEVELOPMENT BUILD " CFE_SRC_VERSION " (Codename: Equuleus), Last Official Release: cfe v6.7.0"); return CFE_SUCCESS; } diff --git a/modules/sb/fsw/src/cfe_sb_task.c b/modules/sb/fsw/src/cfe_sb_task.c index 2f99e48f0..d11260f56 100644 --- a/modules/sb/fsw/src/cfe_sb_task.c +++ b/modules/sb/fsw/src/cfe_sb_task.c @@ -267,7 +267,8 @@ int32 CFE_SB_AppInit(void) } Status = - CFE_EVS_SendEvent(CFE_SB_INIT_EID, CFE_EVS_EventType_INFORMATION, "cFE SB Initialized: %s", CFE_VERSION_STRING); + CFE_EVS_SendEvent(CFE_SB_INIT_EID, CFE_EVS_EventType_INFORMATION, "cFE SB Initialized: %s", + " cFE DEVELOPMENT BUILD " CFE_SRC_VERSION " (Codename: Equuleus), Last Official Release: cfe v6.7.0"); if (Status != CFE_SUCCESS) { CFE_ES_WriteToSysLog("%s: Error sending init event:RC=0x%08X\n", __func__, (unsigned int)Status); @@ -285,7 +286,8 @@ int32 CFE_SB_AppInit(void) *-----------------------------------------------------------------*/ int32 CFE_SB_NoopCmd(const CFE_SB_NoopCmd_t *data) { - CFE_EVS_SendEvent(CFE_SB_CMD0_RCVD_EID, CFE_EVS_EventType_INFORMATION, "No-op Cmd Rcvd: %s", CFE_VERSION_STRING); + CFE_EVS_SendEvent(CFE_SB_CMD0_RCVD_EID, CFE_EVS_EventType_INFORMATION, "No-op Cmd Rcvd: %s", + " cFE DEVELOPMENT BUILD " CFE_SRC_VERSION " (Codename: Equuleus), Last Official Release: cfe v6.7.0"); CFE_SB_Global.HKTlmMsg.Payload.CommandCounter++; return CFE_SUCCESS; diff --git a/modules/tbl/fsw/src/cfe_tbl_task.c b/modules/tbl/fsw/src/cfe_tbl_task.c index fa055b8f2..b64e9949e 100644 --- a/modules/tbl/fsw/src/cfe_tbl_task.c +++ b/modules/tbl/fsw/src/cfe_tbl_task.c @@ -163,7 +163,7 @@ int32 CFE_TBL_TaskInit(void) ** Task startup event message */ Status = CFE_EVS_SendEvent(CFE_TBL_INIT_INF_EID, CFE_EVS_EventType_INFORMATION, "cFE TBL Initialized: %s", - CFE_VERSION_STRING); + " cFE DEVELOPMENT BUILD " CFE_SRC_VERSION " (Codename: Equuleus), Last Official Release: cfe v6.7.0"); if (Status != CFE_SUCCESS) { diff --git a/modules/tbl/fsw/src/cfe_tbl_task_cmds.c b/modules/tbl/fsw/src/cfe_tbl_task_cmds.c index 3f4ef27c9..2f8a841c1 100644 --- a/modules/tbl/fsw/src/cfe_tbl_task_cmds.c +++ b/modules/tbl/fsw/src/cfe_tbl_task_cmds.c @@ -311,7 +311,8 @@ void CFE_TBL_GetTblRegData(void) int32 CFE_TBL_NoopCmd(const CFE_TBL_NoopCmd_t *data) { /* Acknowledge receipt of NOOP with Event Message */ - CFE_EVS_SendEvent(CFE_TBL_NOOP_INF_EID, CFE_EVS_EventType_INFORMATION, "No-op Cmd Rcvd: %s", CFE_VERSION_STRING); + CFE_EVS_SendEvent(CFE_TBL_NOOP_INF_EID, CFE_EVS_EventType_INFORMATION, "No-op Cmd Rcvd: %s", + " cFE DEVELOPMENT BUILD " CFE_SRC_VERSION " (Codename: Equuleus), Last Official Release: cfe v6.7.0"); return CFE_TBL_INC_CMD_CTR; } diff --git a/modules/time/fsw/src/cfe_time_task.c b/modules/time/fsw/src/cfe_time_task.c index f392e6627..d67ba7905 100644 --- a/modules/time/fsw/src/cfe_time_task.c +++ b/modules/time/fsw/src/cfe_time_task.c @@ -260,7 +260,7 @@ int32 CFE_TIME_TaskInit(void) } Status = CFE_EVS_SendEvent(CFE_TIME_INIT_EID, CFE_EVS_EventType_INFORMATION, "cFE TIME Initialized: %s", - CFE_VERSION_STRING); + " cFE DEVELOPMENT BUILD " CFE_SRC_VERSION " (Codename: Equuleus), Last Official Release: cfe v6.7.0"); if (Status != CFE_SUCCESS) { CFE_ES_WriteToSysLog("%s: Error sending init event:RC=0x%08X\n", __func__, (unsigned int)Status); @@ -445,7 +445,8 @@ int32 CFE_TIME_NoopCmd(const CFE_TIME_NoopCmd_t *data) { CFE_TIME_Global.CommandCounter++; - CFE_EVS_SendEvent(CFE_TIME_NOOP_EID, CFE_EVS_EventType_INFORMATION, "No-op Cmd Rcvd: %s", CFE_VERSION_STRING); + CFE_EVS_SendEvent(CFE_TIME_NOOP_EID, CFE_EVS_EventType_INFORMATION, "No-op Cmd Rcvd: %s", + " cFE DEVELOPMENT BUILD " CFE_SRC_VERSION " (Codename: Equuleus), Last Official Release: cfe v6.7.0"); return CFE_SUCCESS; }