Skip to content

Commit

Permalink
Fix nasa#2447, updating cFE to use new versioning system.
Browse files Browse the repository at this point in the history
  • Loading branch information
dzbaker committed Nov 2, 2023
1 parent 0316672 commit ea98f23
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 23 deletions.
2 changes: 1 addition & 1 deletion cmake/target/src/target_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion modules/config/fsw/src/cfe_config_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 4 additions & 12 deletions modules/core_api/fsw/inc/cfe_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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 */
Expand All @@ -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 */
2 changes: 1 addition & 1 deletion modules/es/fsw/src/cfe_es_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 4 additions & 2 deletions modules/evs/fsw/src/cfe_evs_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}

Expand Down
6 changes: 4 additions & 2 deletions modules/sb/fsw/src/cfe_sb_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion modules/tbl/fsw/src/cfe_tbl_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
3 changes: 2 additions & 1 deletion modules/tbl/fsw/src/cfe_tbl_task_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
5 changes: 3 additions & 2 deletions modules/time/fsw/src/cfe_time_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit ea98f23

Please sign in to comment.