From d2b189a92dc2801eabdd94955f71b3b49cbda1d2 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Thu, 30 Sep 2021 14:20:57 -0400 Subject: [PATCH 1/3] Fix #93, Use CFE_MSG_PTR conversion macro Updates conversions to CFE_Message_t to use the MSG macro This also uses consistent naming - TelemetryHeader rather than TlmHeader --- fsw/src/sch_lab_app.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/fsw/src/sch_lab_app.c b/fsw/src/sch_lab_app.c index 2539267..5c323a1 100644 --- a/fsw/src/sch_lab_app.c +++ b/fsw/src/sch_lab_app.c @@ -51,7 +51,7 @@ */ typedef struct { - CFE_MSG_CommandHeader_t CmdHeader; + CFE_MSG_CommandHeader_t CommandHeader; uint32 PacketRate; uint32 Counter; } SCH_LAB_StateEntry_t; @@ -119,7 +119,7 @@ void SCH_Lab_AppMain(void) if (LocalStateEntry->Counter >= LocalStateEntry->PacketRate) { LocalStateEntry->Counter = 0; - CFE_SB_TransmitMsg(&LocalStateEntry->CmdHeader.Msg, true); + CFE_SB_TransmitMsg(CFE_MSG_PTR(LocalStateEntry->CommandHeader), true); } } ++LocalStateEntry; @@ -195,8 +195,9 @@ int32 SCH_LAB_AppInit(void) { if (ConfigEntry->PacketRate != 0) { - CFE_MSG_Init(&LocalStateEntry->CmdHeader.Msg, ConfigEntry->MessageID, sizeof(LocalStateEntry->CmdHeader)); - CFE_MSG_SetFcnCode(&LocalStateEntry->CmdHeader.Msg, ConfigEntry->FcnCode); + CFE_MSG_Init(CFE_MSG_PTR(LocalStateEntry->CommandHeader), ConfigEntry->MessageID, + sizeof(LocalStateEntry->CommandHeader)); + CFE_MSG_SetFcnCode(CFE_MSG_PTR(LocalStateEntry->CommandHeader), ConfigEntry->FcnCode); LocalStateEntry->PacketRate = ConfigEntry->PacketRate; } ++ConfigEntry; From e59d18d6b44f20cc1bedb8692f3f33c97b2b0762 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Fri, 1 Oct 2021 11:17:49 -0400 Subject: [PATCH 2/3] Fix #77, use separate address variable Avoids `(void**)` cast by using a separate `void*` local variable to hold the address. --- fsw/src/sch_lab_app.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fsw/src/sch_lab_app.c b/fsw/src/sch_lab_app.c index 2539267..b20e41e 100644 --- a/fsw/src/sch_lab_app.c +++ b/fsw/src/sch_lab_app.c @@ -144,6 +144,7 @@ int32 SCH_LAB_AppInit(void) SCH_LAB_ScheduleTable_t * ConfigTable; SCH_LAB_ScheduleTableEntry_t *ConfigEntry; SCH_LAB_StateEntry_t * LocalStateEntry; + void * TableAddr; memset(&SCH_LAB_Global, 0, sizeof(SCH_LAB_Global)); @@ -177,7 +178,7 @@ int32 SCH_LAB_AppInit(void) /* ** Get Table Address */ - Status = CFE_TBL_GetAddress((void **)&ConfigTable, SCH_LAB_Global.TblHandle); + Status = CFE_TBL_GetAddress(&TableAddr, SCH_LAB_Global.TblHandle); if (Status != CFE_SUCCESS && Status != CFE_TBL_INFO_UPDATED) { CFE_ES_WriteToSysLog("SCH_LAB: Error Getting Table's Address SCH_LAB_SchTbl, RC = 0x%08lX\n", @@ -189,6 +190,7 @@ int32 SCH_LAB_AppInit(void) /* ** Initialize the command headers */ + ConfigTable = TableAddr; ConfigEntry = ConfigTable->Config; LocalStateEntry = SCH_LAB_Global.State; for (i = 0; i < SCH_LAB_MAX_SCHEDULE_ENTRIES; i++) From 5605524da401d24f53b335e8f157b250361aba2e Mon Sep 17 00:00:00 2001 From: "Gerardo E. Cruz-Ortiz" <59618057+astrogeco@users.noreply.github.com> Date: Wed, 1 Dec 2021 15:50:13 -0500 Subject: [PATCH 3/3] Set new build baseline and bump to v2.5.0-rc4+dev6 - Set new build baseline for cFS-Caelum-rc4: v2.5.0-rc4 - Update mission rev to use 0xFF for development version --- README.md | 7 +++++++ fsw/src/sch_lab_version.h | 13 ++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4b36d41..712aeb3 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,13 @@ To change the list of packets that sch_lab sends out, edit the schedule table lo ## Version History +### Development Build: v2.5.0-rc4+dev6 + +- Use separate address variable +- Use CFE_MSG_PTR conversion macro +- Update baseline for cFS-Caelum-rc4: v2.5.0-rc4 +- See and + ### Development Build: v2.4.0-rc1+dev53 - Apply CFE_SB_ValueToMsgId where required diff --git a/fsw/src/sch_lab_version.h b/fsw/src/sch_lab_version.h index 1562e75..048103e 100644 --- a/fsw/src/sch_lab_version.h +++ b/fsw/src/sch_lab_version.h @@ -30,16 +30,23 @@ */ /* Development Build Macro Definitions */ -#define SCH_LAB_BUILD_NUMBER 53 /*!< Development Build: Number of commits since baseline */ +#define SCH_LAB_BUILD_NUMBER 6 /*!< Development Build: Number of commits since baseline */ #define SCH_LAB_BUILD_BASELINE \ - "v2.4.0-rc1" /*!< Development Build: git tag that is the base for the current development */ + "v2.5.0-rc4" /*!< Development Build: git tag that is the base for the current development */ /* Version Macro Definitions */ #define SCH_LAB_MAJOR_VERSION 2 /*!< @brief ONLY APPLY for OFFICIAL releases. Major version number. */ #define SCH_LAB_MINOR_VERSION 3 /*!< @brief ONLY APPLY for OFFICIAL releases. Minor version number. */ #define SCH_LAB_REVISION 0 /*!< @brief ONLY APPLY for OFFICIAL releases. Revision version number. */ -#define SCH_LAB_MISSION_REV 0 /*!< @brief ONLY USED by MISSION Implementations. Mission revision */ + +/*! + * @brief Mission revision. + * + * Set to 0 on OFFICIAL releases, and set to 255 (0xFF) on development versions. + * Values 1-254 are reserved for mission use to denote patches/customizations as needed. + */ +#define SCH_LAB_MISSION_REV 0xFF #define SCH_LAB_STR_HELPER(x) #x /*!< @brief Helper function to concatenate strings from integer macros */ #define SCH_LAB_STR(x) SCH_LAB_STR_HELPER(x) /*!< @brief Helper function to concatenate strings from integer macros */