diff --git a/README.md b/README.md index 29b8fe4..75cf58e 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,10 @@ sample_app is an example for how to build and link an application in cFS. See al ## Version History +### Development Build: v1.2.0-rc1+dev73 + +- Apply CFE_SB_ValueToMsgId where required +- See and ### Development Build: v1.2.0-rc1+dev66 - Implement Coding Standard in CodeQL workflow diff --git a/fsw/src/sample_app.c b/fsw/src/sample_app.c index 7c3e884..317d734 100644 --- a/fsw/src/sample_app.c +++ b/fsw/src/sample_app.c @@ -163,7 +163,8 @@ int32 SAMPLE_APP_Init(void) /* ** Initialize housekeeping packet (clear user data area). */ - CFE_MSG_Init(&SAMPLE_APP_Data.HkTlm.TlmHeader.Msg, SAMPLE_APP_HK_TLM_MID, sizeof(SAMPLE_APP_Data.HkTlm)); + CFE_MSG_Init(&SAMPLE_APP_Data.HkTlm.TlmHeader.Msg, CFE_SB_ValueToMsgId(SAMPLE_APP_HK_TLM_MID), + sizeof(SAMPLE_APP_Data.HkTlm)); /* ** Create Software Bus message pipe. @@ -178,7 +179,7 @@ int32 SAMPLE_APP_Init(void) /* ** Subscribe to Housekeeping request commands */ - status = CFE_SB_Subscribe(SAMPLE_APP_SEND_HK_MID, SAMPLE_APP_Data.CommandPipe); + status = CFE_SB_Subscribe(CFE_SB_ValueToMsgId(SAMPLE_APP_SEND_HK_MID), SAMPLE_APP_Data.CommandPipe); if (status != CFE_SUCCESS) { CFE_ES_WriteToSysLog("Sample App: Error Subscribing to HK request, RC = 0x%08lX\n", (unsigned long)status); @@ -188,7 +189,7 @@ int32 SAMPLE_APP_Init(void) /* ** Subscribe to ground command packets */ - status = CFE_SB_Subscribe(SAMPLE_APP_CMD_MID, SAMPLE_APP_Data.CommandPipe); + status = CFE_SB_Subscribe(CFE_SB_ValueToMsgId(SAMPLE_APP_CMD_MID), SAMPLE_APP_Data.CommandPipe); if (status != CFE_SUCCESS) { CFE_ES_WriteToSysLog("Sample App: Error Subscribing to Command, RC = 0x%08lX\n", (unsigned long)status); @@ -233,7 +234,7 @@ void SAMPLE_APP_ProcessCommandPacket(CFE_SB_Buffer_t *SBBufPtr) CFE_MSG_GetMsgId(&SBBufPtr->Msg, &MsgId); - switch (MsgId) + switch (CFE_SB_MsgIdToValue(MsgId)) { case SAMPLE_APP_CMD_MID: SAMPLE_APP_ProcessGroundCommand(SBBufPtr); diff --git a/fsw/src/sample_app_version.h b/fsw/src/sample_app_version.h index dbd8226..b75940a 100644 --- a/fsw/src/sample_app_version.h +++ b/fsw/src/sample_app_version.h @@ -31,7 +31,7 @@ /* Development Build Macro Definitions */ -#define SAMPLE_APP_BUILD_NUMBER 66 /*!< Development Build: Number of commits since baseline */ +#define SAMPLE_APP_BUILD_NUMBER 73 /*!< Development Build: Number of commits since baseline */ #define SAMPLE_APP_BUILD_BASELINE \ "v1.2.0-rc1" /*!< Development Build: git tag that is the base for the current development */ diff --git a/unit-test/coveragetest/coveragetest_sample_app.c b/unit-test/coveragetest/coveragetest_sample_app.c index f6396e7..7f35eaa 100644 --- a/unit-test/coveragetest/coveragetest_sample_app.c +++ b/unit-test/coveragetest/coveragetest_sample_app.c @@ -292,7 +292,7 @@ void Test_SAMPLE_APP_ProcessCommandPacket(void) * The CFE_MSG_GetMsgId() stub uses a data buffer to hold the * message ID values to return. */ - TestMsgId = SAMPLE_APP_CMD_MID; + TestMsgId = CFE_SB_ValueToMsgId(SAMPLE_APP_CMD_MID); FcnCode = SAMPLE_APP_NOOP_CC; MsgSize = sizeof(TestMsg.Noop); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &TestMsgId, sizeof(TestMsgId), false); @@ -300,7 +300,7 @@ void Test_SAMPLE_APP_ProcessCommandPacket(void) UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &MsgSize, sizeof(MsgSize), false); SAMPLE_APP_ProcessCommandPacket(&TestMsg.SBBuf); - TestMsgId = SAMPLE_APP_SEND_HK_MID; + TestMsgId = CFE_SB_ValueToMsgId(SAMPLE_APP_SEND_HK_MID); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &TestMsgId, sizeof(TestMsgId), false); SAMPLE_APP_ProcessCommandPacket(&TestMsg.SBBuf);