From 8514efa229674a1af716fcb0ae58c8b6c042ff9b Mon Sep 17 00:00:00 2001 From: Jacob Hageman Date: Wed, 4 Nov 2020 15:53:57 -0500 Subject: [PATCH 1/3] Fix #777, Use MSG APIs - Unit tests Updates the unit tests, unit test support, and stubs to replace deprecated SB APIs with MSG APIs. --- fsw/cfe-core/unit-test/es_UT.c | 8 +- fsw/cfe-core/unit-test/evs_UT.c | 70 ++- fsw/cfe-core/unit-test/sb_UT.c | 526 +++++++---------- fsw/cfe-core/unit-test/sb_UT.h | 864 +--------------------------- fsw/cfe-core/unit-test/tbl_UT.c | 13 +- fsw/cfe-core/unit-test/tbl_UT.h | 146 ----- fsw/cfe-core/unit-test/time_UT.c | 14 +- fsw/cfe-core/unit-test/ut_support.c | 33 +- fsw/cfe-core/unit-test/ut_support.h | 9 +- fsw/cfe-core/ut-stubs/ut_sb_stubs.c | 68 ++- 10 files changed, 324 insertions(+), 1427 deletions(-) diff --git a/fsw/cfe-core/unit-test/es_UT.c b/fsw/cfe-core/unit-test/es_UT.c index 52f3e1b3f..a3c3af089 100644 --- a/fsw/cfe-core/unit-test/es_UT.c +++ b/fsw/cfe-core/unit-test/es_UT.c @@ -2631,7 +2631,7 @@ void TestTask(void) osal_id_t UT_ContextTask; union { - CFE_SB_Msg_t Msg; + CFE_MSG_Message_t Msg; CFE_ES_NoArgsCmd_t NoArgsCmd; CFE_ES_Restart_t RestartCmd; CFE_ES_StartApp_t StartAppCmd; @@ -2653,6 +2653,7 @@ void TestTask(void) CFE_ES_TaskRecord_t *UtTaskRecPtr; CFE_ES_CDS_RegRec_t *UtCDSRegRecPtr; CFE_ES_MemPoolRecord_t *UtPoolRecPtr; + CFE_SB_MsgId_t MsgId = CFE_SB_INVALID_MSG_ID; UtPrintf("Begin Test Task"); @@ -2668,6 +2669,9 @@ void TestTask(void) ES_ResetUnitTest(); /* this is needed so CFE_ES_GetAppId works */ ES_UT_SetupSingleAppId(CFE_ES_AppType_CORE, CFE_ES_AppState_RUNNING, NULL, NULL, NULL); + + /* Set up buffer for first cycle, pipe failure is on 2nd */ + UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &MsgId, sizeof(MsgId), false); CFE_ES_TaskMain(); UT_Report(__FILE__, __LINE__, UT_PrintfIsInHistory(UT_OSP_MESSAGES[UT_OSP_COMMAND_PIPE]), @@ -3968,7 +3972,7 @@ void TestPerf(void) { union { - CFE_SB_Msg_t Msg; + CFE_MSG_Message_t Msg; CFE_ES_StartPerfData_t PerfStartCmd; CFE_ES_StopPerfData_t PerfStopCmd; CFE_ES_SetPerfFilterMask_t PerfSetFilterMaskCmd; diff --git a/fsw/cfe-core/unit-test/evs_UT.c b/fsw/cfe-core/unit-test/evs_UT.c index 052fffc1f..3290158e4 100644 --- a/fsw/cfe-core/unit-test/evs_UT.c +++ b/fsw/cfe-core/unit-test/evs_UT.c @@ -202,6 +202,26 @@ typedef struct static UT_EVS_EventCapture_t UT_EVS_EventBuf; +/* MSG Init hook data */ +typedef struct +{ + CFE_MSG_Message_t *MsgPtr; + CFE_SB_MsgId_t MsgId; + CFE_MSG_Size_t Size; +} UT_EVS_MSGInitData_t; + +/* Message init hook to stora last MsgId passed in */ +static int32 UT_EVS_MSGInitHook(void *UserObj, int32 StubRetcode, uint32 CallCount, const UT_StubContext_t *Context) +{ + UT_EVS_MSGInitData_t *msgdataptr = UserObj; + + msgdataptr->MsgPtr = UT_Hook_GetArgValueByName(Context, "MsgPtr", CFE_MSG_Message_t *); + msgdataptr->MsgId = UT_Hook_GetArgValueByName(Context, "MsgId", CFE_SB_MsgId_t); + msgdataptr->Size = UT_Hook_GetArgValueByName(Context, "Size", CFE_MSG_Size_t); + + return StubRetcode; +} + static void UT_EVS_DoDispatchCheckEvents_Impl(void *MsgPtr, uint32 MsgSize, UT_TaskPipeDispatchId_t DispatchId, const UT_SoftwareBusSnapshot_Entry_t *SnapshotCfg, UT_EVS_EventCapture_t *EventCapture) @@ -212,7 +232,7 @@ static void UT_EVS_DoDispatchCheckEvents_Impl(void *MsgPtr, uint32 MsgSize, SnapshotData.SnapshotBuffer = &EventCapture->EventID; UT_SetHookFunction(UT_KEY(CFE_SB_SendMsg), UT_SoftwareBusSnapshotHook, &SnapshotData); - UT_CallTaskPipe(CFE_EVS_ProcessCommandPacket, (CFE_SB_MsgPtr_t)MsgPtr, MsgSize, DispatchId); + UT_CallTaskPipe(CFE_EVS_ProcessCommandPacket, (CFE_MSG_Message_t *)MsgPtr, MsgSize, DispatchId); EventCapture->Count += SnapshotData.Count; /* be sure to clear the hook function since the SnapshotData is going out of scope */ @@ -279,6 +299,7 @@ void Test_Init(void) { CFE_EVS_BitMaskCmd_t bitmaskcmd; CFE_EVS_AppNameBitMaskCmd_t appbitcmd; + CFE_SB_MsgId_t msgid = CFE_SB_INVALID_MSG_ID; UtPrintf("Begin Test Init"); @@ -299,14 +320,15 @@ void Test_Init(void) /* Test TaskMain with a command pipe read failure due to an * invalid command packet */ + UtPrintf("CFE_EVS_TaskMain - Test error reading command pipe, unrecognized msgid"); UT_InitData(); - UT_SetDeferredRetcode(UT_KEY(CFE_SB_GetMsgId), 1, 0); + + /* Set unexpected message ID */ + UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &msgid, sizeof(msgid), false); + UT_EVS_DoGenericCheckEvents(CFE_EVS_TaskMain, &UT_EVS_EventBuf); - UT_Report(__FILE__, __LINE__, - UT_SyslogIsInHistory(EVS_SYSLOG_MSGS[8]) && - UT_EVS_EventBuf.EventID == CFE_EVS_ERR_MSGID_EID, - "CFE_EVS_TaskMain", - "Error reading command pipe"); + ASSERT_TRUE(UT_SyslogIsInHistory(EVS_SYSLOG_MSGS[8])); + ASSERT_EQ(UT_EVS_EventBuf.EventID, CFE_EVS_ERR_MSGID_EID); /* Test TaskMain with a register application failure */ UT_InitData(); @@ -907,6 +929,8 @@ void Test_Format(void) }; EVS_AppData_t *AppDataPtr; CFE_ES_ResourceID_t AppID; + UT_EVS_MSGInitData_t MsgData; + CFE_MSG_Message_t *MsgSend; /* Get a local ref to the "current" AppData table entry */ EVS_GetCurrentContext(&AppDataPtr, &AppID); @@ -954,24 +978,20 @@ void Test_Format(void) "CFE_EVS_SetEventFormatModeCmd", "Set event format mode command: short format"); - /* Test event short format mode command was successful */ - /* - * Send a test event and verify that the Long format event was NOT generated. - */ + UtPrintf("Test for short event sent when configured to do so "); UT_InitData(); - UT_SetHookFunction(UT_KEY(CFE_SB_SendMsg), UT_SoftwareBusSnapshotHook, &ShortFmtSnapshotData); + UT_SetHookFunction(UT_KEY(CFE_MSG_Init), UT_EVS_MSGInitHook, &MsgData); + UT_SetDataBuffer(UT_KEY(CFE_SB_SendMsg), &MsgSend, sizeof(MsgSend), false); CFE_EVS_SendEvent(0, CFE_EVS_EventType_INFORMATION, "Short format check 1"); - UT_Report(__FILE__, __LINE__, - ShortFmtSnapshotData.Count == 1, - "CFE_EVS_SetEventFormatModeCmd", - "Short event format mode verification - short message sent"); - UT_SetHookFunction(UT_KEY(CFE_SB_SendMsg), UT_SoftwareBusSnapshotHook, &LongFmtSnapshotData); - CFE_EVS_SendEvent(0, CFE_EVS_EventType_INFORMATION, "Short format check 2"); - UT_Report(__FILE__, __LINE__, - LongFmtSnapshotData.Count == 0, - "CFE_EVS_SetEventFormatModeCmd", - "Short event format mode verification - long message not sent"); + /* Note implementation initializes both short and long message */ + ASSERT_EQ(UT_GetStubCount(UT_KEY(CFE_MSG_Init)), 2); + ASSERT_EQ(UT_GetStubCount(UT_KEY(CFE_SB_SendMsg)), 1); + ASSERT_TRUE(CFE_SB_MsgId_Equal(MsgData.MsgId, ShortFmtSnapshotData.MsgId)); + ASSERT_TRUE(!CFE_SB_MsgId_Equal(MsgData.MsgId, LongFmtSnapshotData.MsgId)); + + /* Confirm the right message was sent */ + ASSERT_TRUE(MsgSend == MsgData.MsgPtr); /* Test set event format mode command using a valid command to set long * format, reports implicitly via event @@ -2644,7 +2664,7 @@ void Test_Misc(void) { union { - CFE_SB_Msg_t msg; + CFE_MSG_Message_t msg; CFE_EVS_NoArgsCmd_t cmd; CFE_EVS_SetLogMode_t modecmd; CFE_EVS_WriteLogDataFile_t writelogdatacmd; @@ -2689,8 +2709,6 @@ void Test_Misc(void) /* Test housekeeping report with log enabled */ UT_InitData(); - CFE_SB_InitMsg((CFE_SB_Msg_t *) &CFE_EVS_GlobalData.EVS_TlmPkt, HK_SnapshotData.MsgId, - sizeof(CFE_EVS_GlobalData.EVS_TlmPkt), false); CFE_EVS_GlobalData.EVS_TlmPkt.Payload.LogEnabled = true; HK_SnapshotData.Count = 0; UT_SetHookFunction(UT_KEY(CFE_SB_SendMsg), UT_SoftwareBusSnapshotHook, &HK_SnapshotData); @@ -2717,8 +2735,6 @@ void Test_Misc(void) /* Test housekeeping report with log disabled */ UT_InitData(); - CFE_SB_InitMsg((CFE_SB_Msg_t *) &CFE_EVS_GlobalData.EVS_TlmPkt, HK_SnapshotData.MsgId, - sizeof(CFE_EVS_GlobalData.EVS_TlmPkt), false); CFE_EVS_GlobalData.EVS_TlmPkt.Payload.LogEnabled = false; HK_SnapshotData.Count = 0; UT_SetHookFunction(UT_KEY(CFE_SB_SendMsg), UT_SoftwareBusSnapshotHook, &HK_SnapshotData); diff --git a/fsw/cfe-core/unit-test/sb_UT.c b/fsw/cfe-core/unit-test/sb_UT.c index 369ef3233..f979edb23 100644 --- a/fsw/cfe-core/unit-test/sb_UT.c +++ b/fsw/cfe-core/unit-test/sb_UT.c @@ -423,7 +423,7 @@ void Test_SB_Cmds_Noop(void) UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &MsgId, sizeof(MsgId), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetFcnCode), &FcnCode, sizeof(FcnCode), false); - CFE_SB.CmdPipePktPtr = (CFE_SB_MsgPtr_t) &NoParamCmd; + CFE_SB.CmdPipePktPtr = (CFE_MSG_Message_t *) &NoParamCmd; CFE_SB_ProcessCmdPipePkt(); EVTCNT(1); @@ -445,7 +445,7 @@ void Test_SB_Cmds_RstCtrs(void) UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &MsgId, sizeof(MsgId), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetFcnCode), &FcnCode, sizeof(FcnCode), false); - CFE_SB.CmdPipePktPtr = (CFE_SB_MsgPtr_t) &NoParamCmd; + CFE_SB.CmdPipePktPtr = (CFE_MSG_Message_t *) &NoParamCmd; CFE_SB_ProcessCmdPipePkt(); EVTCNT(1); @@ -478,7 +478,7 @@ void Test_SB_Cmds_Stats(void) UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetFcnCode), &FcnCode, sizeof(FcnCode), false); - CFE_SB.CmdPipePktPtr = (CFE_SB_MsgPtr_t) &NoParamCmd; + CFE_SB.CmdPipePktPtr = (CFE_MSG_Message_t *) &NoParamCmd; CFE_SB_ProcessCmdPipePkt(); /* No subs event and command processing event */ @@ -507,7 +507,7 @@ void Test_SB_Cmds_RoutingInfoDef(void) /* Make some routing info by calling CFE_SB_AppInit */ SETUP(CFE_SB_AppInit()); - CFE_SB.CmdPipePktPtr = (CFE_SB_MsgPtr_t) &WriteFileCmd; + CFE_SB.CmdPipePktPtr = (CFE_MSG_Message_t *) &WriteFileCmd; CFE_SB_ProcessCmdPipePkt(); @@ -539,7 +539,7 @@ void Test_SB_Cmds_RoutingInfoSpec(void) UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetFcnCode), &FcnCode, sizeof(FcnCode), false); strncpy((char *)WriteFileCmd.Payload.Filename, "RoutingTstFile", sizeof(WriteFileCmd.Payload.Filename)); - CFE_SB.CmdPipePktPtr = (CFE_SB_MsgPtr_t) &WriteFileCmd; + CFE_SB.CmdPipePktPtr = (CFE_MSG_Message_t *) &WriteFileCmd; CFE_SB_ProcessCmdPipePkt(); @@ -563,7 +563,7 @@ void Test_SB_Cmds_RoutingInfoCreateFail(void) UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetFcnCode), &FcnCode, sizeof(FcnCode), false); strncpy((char *)WriteFileCmd.Payload.Filename, "RoutingTstFile", sizeof(WriteFileCmd.Payload.Filename)); - CFE_SB.CmdPipePktPtr = (CFE_SB_MsgPtr_t) &WriteFileCmd; + CFE_SB.CmdPipePktPtr = (CFE_MSG_Message_t *) &WriteFileCmd; /* Make function CFE_SB_SendRtgInfo return CFE_SB_FILE_IO_ERR */ UT_SetForceFail(UT_KEY(OS_OpenCreate), OS_ERROR); @@ -643,7 +643,7 @@ void Test_SB_Cmds_PipeInfoDef(void) SETUP(CFE_SB_CreatePipe(&PipeId1, PipeDepth, "TestPipe1")); SETUP(CFE_SB_CreatePipe(&PipeId2, PipeDepth, "TestPipe2")); SETUP(CFE_SB_CreatePipe(&PipeId3, PipeDepth, "TestPipe3")); - CFE_SB.CmdPipePktPtr = (CFE_SB_MsgPtr_t) &WriteFileCmd; + CFE_SB.CmdPipePktPtr = (CFE_MSG_Message_t *) &WriteFileCmd; CFE_SB_ProcessCmdPipePkt(); @@ -672,7 +672,7 @@ void Test_SB_Cmds_PipeInfoSpec(void) UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetFcnCode), &FcnCode, sizeof(FcnCode), false); strncpy((char *)WriteFileCmd.Payload.Filename, "PipeTstFile", sizeof(WriteFileCmd.Payload.Filename)); - CFE_SB.CmdPipePktPtr = (CFE_SB_MsgPtr_t) &WriteFileCmd; + CFE_SB.CmdPipePktPtr = (CFE_MSG_Message_t *) &WriteFileCmd; CFE_SB_ProcessCmdPipePkt(); EVTCNT(1); @@ -775,7 +775,7 @@ void Test_SB_Cmds_MapInfoDef(void) SETUP(CFE_SB_Subscribe(MsgId3, PipeId3)); SETUP(CFE_SB_Subscribe(MsgId4, PipeId3)); SETUP(CFE_SB_Subscribe(MsgId5, PipeId2)); - CFE_SB.CmdPipePktPtr = (CFE_SB_MsgPtr_t) &WriteFileCmd; + CFE_SB.CmdPipePktPtr = (CFE_MSG_Message_t *) &WriteFileCmd; CFE_SB_ProcessCmdPipePkt(); @@ -807,7 +807,7 @@ void Test_SB_Cmds_MapInfoSpec(void) UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetFcnCode), &FcnCode, sizeof(FcnCode), false); strncpy((char *)WriteFileCmd.Payload.Filename, "MapTstFile", sizeof(WriteFileCmd.Payload.Filename)); - CFE_SB.CmdPipePktPtr = (CFE_SB_MsgPtr_t) &WriteFileCmd; + CFE_SB.CmdPipePktPtr = (CFE_MSG_Message_t *) &WriteFileCmd; CFE_SB_ProcessCmdPipePkt(); EVTCNT(1); @@ -911,7 +911,7 @@ void Test_SB_Cmds_EnRouteValParam(void) SETUP(CFE_SB_Subscribe(MsgId, PipeId)); EnDisRouteCmd.Payload.MsgId = MsgId; EnDisRouteCmd.Payload.Pipe = PipeId; - CFE_SB.CmdPipePktPtr = (CFE_SB_MsgPtr_t) &EnDisRouteCmd; + CFE_SB.CmdPipePktPtr = (CFE_MSG_Message_t *) &EnDisRouteCmd; CFE_SB_ProcessCmdPipePkt(); @@ -950,7 +950,7 @@ void Test_SB_Cmds_EnRouteNonExist(void) SETUP(CFE_SB_Subscribe(MsgId, PipeId1)); EnDisRouteCmd.Payload.MsgId = MsgId; EnDisRouteCmd.Payload.Pipe = PipeId2; - CFE_SB.CmdPipePktPtr = (CFE_SB_MsgPtr_t) &EnDisRouteCmd; + CFE_SB.CmdPipePktPtr = (CFE_MSG_Message_t *) &EnDisRouteCmd; CFE_SB_ProcessCmdPipePkt(); @@ -981,7 +981,7 @@ void Test_SB_Cmds_EnRouteInvParam(void) EnDisRouteCmd.Payload.MsgId = SB_UT_LAST_VALID_MID; EnDisRouteCmd.Payload.Pipe = 3; - CFE_SB.CmdPipePktPtr = (CFE_SB_MsgPtr_t) &EnDisRouteCmd; + CFE_SB.CmdPipePktPtr = (CFE_MSG_Message_t *) &EnDisRouteCmd; CFE_SB_ProcessCmdPipePkt(); @@ -1007,7 +1007,7 @@ void Test_SB_Cmds_EnRouteInvParam2(void) EnDisRouteCmd.Payload.MsgId = CFE_SB_INVALID_MSG_ID; EnDisRouteCmd.Payload.Pipe = 3; - CFE_SB.CmdPipePktPtr = (CFE_SB_MsgPtr_t) &EnDisRouteCmd; + CFE_SB.CmdPipePktPtr = (CFE_MSG_Message_t *) &EnDisRouteCmd; CFE_SB_ProcessCmdPipePkt(); @@ -1034,7 +1034,7 @@ void Test_SB_Cmds_EnRouteInvParam3(void) EnDisRouteCmd.Payload.MsgId = SB_UT_ALTERNATE_INVALID_MID; EnDisRouteCmd.Payload.Pipe = 0; - CFE_SB.CmdPipePktPtr = (CFE_SB_MsgPtr_t) &EnDisRouteCmd; + CFE_SB.CmdPipePktPtr = (CFE_MSG_Message_t *) &EnDisRouteCmd; CFE_SB_ProcessCmdPipePkt(); @@ -1065,7 +1065,7 @@ void Test_SB_Cmds_DisRouteValParam(void) SETUP(CFE_SB_Subscribe(MsgId, PipeId)); EnDisRouteCmd.Payload.MsgId = MsgId; EnDisRouteCmd.Payload.Pipe = PipeId; - CFE_SB.CmdPipePktPtr = (CFE_SB_MsgPtr_t) &EnDisRouteCmd; + CFE_SB.CmdPipePktPtr = (CFE_MSG_Message_t *) &EnDisRouteCmd; CFE_SB_ProcessCmdPipePkt(); EVTCNT(4); @@ -1102,7 +1102,7 @@ void Test_SB_Cmds_DisRouteNonExist(void) SETUP(CFE_SB_Subscribe(MsgId, PipeId1)); EnDisRouteCmd.Payload.MsgId = MsgId; EnDisRouteCmd.Payload.Pipe = PipeId2; - CFE_SB.CmdPipePktPtr = (CFE_SB_MsgPtr_t) &EnDisRouteCmd; + CFE_SB.CmdPipePktPtr = (CFE_MSG_Message_t *) &EnDisRouteCmd; CFE_SB_ProcessCmdPipePkt(); @@ -1133,7 +1133,7 @@ void Test_SB_Cmds_DisRouteInvParam(void) EnDisRouteCmd.Payload.MsgId = SB_UT_LAST_VALID_MID; EnDisRouteCmd.Payload.Pipe = 3; - CFE_SB.CmdPipePktPtr = (CFE_SB_MsgPtr_t) &EnDisRouteCmd; + CFE_SB.CmdPipePktPtr = (CFE_MSG_Message_t *) &EnDisRouteCmd; CFE_SB_ProcessCmdPipePkt(); @@ -1159,7 +1159,7 @@ void Test_SB_Cmds_DisRouteInvParam2(void) EnDisRouteCmd.Payload.MsgId = CFE_SB_INVALID_MSG_ID; EnDisRouteCmd.Payload.Pipe = 3; - CFE_SB.CmdPipePktPtr = (CFE_SB_MsgPtr_t) &EnDisRouteCmd; + CFE_SB.CmdPipePktPtr = (CFE_MSG_Message_t *) &EnDisRouteCmd; CFE_SB_ProcessCmdPipePkt(); @@ -1186,7 +1186,7 @@ void Test_SB_Cmds_DisRouteInvParam3(void) EnDisRouteCmd.Payload.MsgId = SB_UT_ALTERNATE_INVALID_MID; EnDisRouteCmd.Payload.Pipe = 0; - CFE_SB.CmdPipePktPtr = (CFE_SB_MsgPtr_t) &EnDisRouteCmd; + CFE_SB.CmdPipePktPtr = (CFE_MSG_Message_t *) &EnDisRouteCmd; CFE_SB_ProcessCmdPipePkt(); @@ -1214,7 +1214,7 @@ void Test_SB_Cmds_SendHK(void) /* For HK command processing */ MsgIdCmd = CFE_SB_ValueToMsgId(CFE_SB_SEND_HK_MID); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &MsgIdCmd, sizeof(MsgIdCmd), false); - CFE_SB.CmdPipePktPtr = (CFE_SB_MsgPtr_t) &NoParamCmd; + CFE_SB.CmdPipePktPtr = (CFE_MSG_Message_t *) &NoParamCmd; CFE_SB_ProcessCmdPipePkt(); @@ -1242,7 +1242,7 @@ void Test_SB_Cmds_SendPrevSubs(void) CFE_SB_MsgId_t MsgIdCmd; CFE_MSG_Size_t Size; - CFE_SB.CmdPipePktPtr = (CFE_SB_MsgPtr_t) &NoParamCmd; + CFE_SB.CmdPipePktPtr = (CFE_MSG_Message_t *) &NoParamCmd; SETUP(CFE_SB_CreatePipe(&PipeId1, PipeDepth, "TestPipe1")); SETUP(CFE_SB_CreatePipe(&PipeId2, PipeDepth, "TestPipe2")); NumEvts = 2; /* one for each pipe create */ @@ -1364,7 +1364,7 @@ void Test_SB_Cmds_SubRptOn(void) UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetFcnCode), &FcnCode, sizeof(FcnCode), false); - CFE_SB.CmdPipePktPtr = (CFE_SB_MsgPtr_t) &NoParamCmd; + CFE_SB.CmdPipePktPtr = (CFE_MSG_Message_t *) &NoParamCmd; CFE_SB_ProcessCmdPipePkt(); EVTCNT(0); @@ -1385,7 +1385,7 @@ void Test_SB_Cmds_SubRptOff(void) UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetFcnCode), &FcnCode, sizeof(FcnCode), false); - CFE_SB.CmdPipePktPtr = (CFE_SB_MsgPtr_t) &NoParamCmd; + CFE_SB.CmdPipePktPtr = (CFE_MSG_Message_t *) &NoParamCmd; CFE_SB_ProcessCmdPipePkt(); EVTCNT(0); @@ -1406,7 +1406,7 @@ void Test_SB_Cmds_CmdUnexpCmdCode(void) UT_SetDataBuffer(UT_KEY(CFE_MSG_GetFcnCode), &FcnCode, sizeof(FcnCode), false); /* Use a command code known to be invalid */ - CFE_SB.CmdPipePktPtr = (CFE_SB_MsgPtr_t) &NoParamCmd; + CFE_SB.CmdPipePktPtr = (CFE_MSG_Message_t *) &NoParamCmd; CFE_SB_ProcessCmdPipePkt(); EVTCNT(1); EVTSENT(CFE_SB_BAD_CMD_CODE_EID); @@ -1428,7 +1428,7 @@ void Test_SB_Cmds_SubRptUnexpCmdCode(void) UT_SetDataBuffer(UT_KEY(CFE_MSG_GetFcnCode), &FcnCode, sizeof(FcnCode), false); /* Use a command code known to be invalid */ - CFE_SB.CmdPipePktPtr = (CFE_SB_MsgPtr_t) &NoParamCmd; + CFE_SB.CmdPipePktPtr = (CFE_MSG_Message_t *) &NoParamCmd; CFE_SB_ProcessCmdPipePkt(); EVTCNT(1); @@ -1457,7 +1457,7 @@ void Test_SB_Cmds_BadCmdLength(void) UT_SetDataBuffer(UT_KEY(CFE_MSG_GetFcnCode), &FcnCode, sizeof(FcnCode), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetFcnCode), &FcnCode, sizeof(FcnCode), false); - CFE_SB.CmdPipePktPtr = (CFE_SB_MsgPtr_t) &EnableRouteCmd; + CFE_SB.CmdPipePktPtr = (CFE_MSG_Message_t *) &EnableRouteCmd; CFE_SB_ProcessCmdPipePkt(); EVTCNT(1); @@ -1476,7 +1476,7 @@ void Test_SB_Cmds_UnexpMsgId(void) UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &MsgIdCmd, sizeof(MsgIdCmd), false); - CFE_SB.CmdPipePktPtr = (CFE_SB_MsgPtr_t) &NoParamCmd; + CFE_SB.CmdPipePktPtr = (CFE_MSG_Message_t *) &NoParamCmd; CFE_SB_ProcessCmdPipePkt(); EVTCNT(1); @@ -2720,10 +2720,10 @@ void Test_SendMsg_NullPtr(void) */ void Test_SendMsg_NoSubscribers(void) { - CFE_SB_MsgId_t MsgId = SB_UT_TLM_MID; - SB_UT_Test_Tlm_t TlmPkt; - CFE_SB_MsgPtr_t TlmPktPtr = (CFE_SB_MsgPtr_t) &TlmPkt; - CFE_MSG_Size_t Size = sizeof(TlmPkt); + CFE_SB_MsgId_t MsgId = SB_UT_TLM_MID; + SB_UT_Test_Tlm_t TlmPkt; + CFE_MSG_Message_t *TlmPktPtr = (CFE_MSG_Message_t *) &TlmPkt; + CFE_MSG_Size_t Size = sizeof(TlmPkt); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &MsgId, sizeof(MsgId), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); @@ -2741,10 +2741,10 @@ void Test_SendMsg_NoSubscribers(void) */ void Test_SendMsg_MaxMsgSizePlusOne(void) { - CFE_SB_MsgId_t MsgId = SB_UT_TLM_MID; - SB_UT_Test_Tlm_t TlmPkt; - CFE_SB_MsgPtr_t TlmPktPtr = (CFE_SB_MsgPtr_t) &TlmPkt; - CFE_MSG_Size_t Size = CFE_MISSION_SB_MAX_SB_MSG_SIZE + 1; + CFE_SB_MsgId_t MsgId = SB_UT_TLM_MID; + SB_UT_Test_Tlm_t TlmPkt; + CFE_MSG_Message_t *TlmPktPtr = (CFE_MSG_Message_t *) &TlmPkt; + CFE_MSG_Size_t Size = CFE_MISSION_SB_MAX_SB_MSG_SIZE + 1; UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &MsgId, sizeof(MsgId), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); @@ -2762,20 +2762,20 @@ void Test_SendMsg_MaxMsgSizePlusOne(void) */ void Test_SendMsg_BasicSend(void) { - CFE_SB_PipeId_t PipeId; - CFE_SB_MsgId_t MsgId = SB_UT_TLM_MID; - SB_UT_Test_Tlm_t TlmPkt; - CFE_SB_MsgPtr_t TlmPktPtr = (CFE_SB_MsgPtr_t) &TlmPkt; - int32 PipeDepth = 2; - CFE_MSG_Size_t Size = sizeof(TlmPkt); - CFE_MSG_Type_t Type = CFE_MSG_Type_Tlm; + CFE_SB_PipeId_t PipeId; + CFE_SB_MsgId_t MsgId = SB_UT_TLM_MID; + SB_UT_Test_Tlm_t TlmPkt; + CFE_MSG_Message_t *TlmPktPtr = (CFE_MSG_Message_t *) &TlmPkt; + int32 PipeDepth = 2; + CFE_MSG_Size_t Size = sizeof(TlmPkt); + CFE_MSG_Type_t Type = CFE_MSG_Type_Tlm; SETUP(CFE_SB_CreatePipe(&PipeId, PipeDepth, "TestPipe")); SETUP(CFE_SB_Subscribe(MsgId, PipeId)); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &MsgId, sizeof(MsgId), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetTypeFromMsgId), &Type, sizeof(Type), false); + UT_SetDataBuffer(UT_KEY(CFE_MSG_GetType), &Type, sizeof(Type), false); ASSERT(CFE_SB_SendMsg(TlmPktPtr)); @@ -2803,7 +2803,7 @@ void Test_SendMsg_SequenceCount(void) CFE_SB_PipeId_t PipeId; CFE_SB_MsgId_t MsgId = SB_UT_TLM_MID; SB_UT_Test_Tlm_t TlmPkt; - CFE_SB_MsgPtr_t TlmPktPtr = (CFE_SB_MsgPtr_t) &TlmPkt; + CFE_MSG_Message_t *TlmPktPtr = (CFE_MSG_Message_t *) &TlmPkt; CFE_MSG_Size_t Size = sizeof(TlmPkt); CFE_MSG_Type_t Type = CFE_MSG_Type_Tlm; uint32 PipeDepth = 10; @@ -2817,14 +2817,14 @@ void Test_SendMsg_SequenceCount(void) UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &MsgId, sizeof(MsgId), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetTypeFromMsgId), &Type, sizeof(Type), false); + UT_SetDataBuffer(UT_KEY(CFE_MSG_GetType), &Type, sizeof(Type), false); SETUP(CFE_SB_SendMsg(TlmPktPtr)); ASSERT_EQ(UT_GetStubCount(UT_KEY(CFE_MSG_SetSequenceCount)), 1); ASSERT_EQ(SeqCnt, 1); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &MsgId, sizeof(MsgId), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetTypeFromMsgId), &Type, sizeof(Type), false); + UT_SetDataBuffer(UT_KEY(CFE_MSG_GetType), &Type, sizeof(Type), false); ASSERT(CFE_SB_PassMsg(TlmPktPtr)); /* Assert sequence count wasn't set */ @@ -2832,7 +2832,7 @@ void Test_SendMsg_SequenceCount(void) UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &MsgId, sizeof(MsgId), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetTypeFromMsgId), &Type, sizeof(Type), false); + UT_SetDataBuffer(UT_KEY(CFE_MSG_GetType), &Type, sizeof(Type), false); ASSERT(CFE_SB_SendMsg(TlmPktPtr)); ASSERT_EQ(SeqCnt, 2); ASSERT_EQ(UT_GetStubCount(UT_KEY(CFE_MSG_SetSequenceCount)), 2); @@ -2844,7 +2844,7 @@ void Test_SendMsg_SequenceCount(void) UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &MsgId, sizeof(MsgId), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetTypeFromMsgId), &Type, sizeof(Type), false); + UT_SetDataBuffer(UT_KEY(CFE_MSG_GetType), &Type, sizeof(Type), false); SETUP(CFE_SB_SendMsg(TlmPktPtr)); /* increment to 3 */ ASSERT_EQ(UT_GetStubCount(UT_KEY(CFE_MSG_SetSequenceCount)), 3); @@ -2852,7 +2852,7 @@ void Test_SendMsg_SequenceCount(void) UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &MsgId, sizeof(MsgId), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetTypeFromMsgId), &Type, sizeof(Type), false); + UT_SetDataBuffer(UT_KEY(CFE_MSG_GetType), &Type, sizeof(Type), false); SETUP(CFE_SB_SendMsg(TlmPktPtr)); /* increment to 4 */ ASSERT_EQ(SeqCnt, 4); ASSERT_EQ(UT_GetStubCount(UT_KEY(CFE_MSG_SetSequenceCount)), 4); @@ -2866,20 +2866,20 @@ void Test_SendMsg_SequenceCount(void) */ void Test_SendMsg_QueuePutError(void) { - CFE_SB_PipeId_t PipeId4Error; - CFE_SB_MsgId_t MsgId = SB_UT_TLM_MID; - SB_UT_Test_Tlm_t TlmPkt; - CFE_SB_MsgPtr_t TlmPktPtr = (CFE_SB_MsgPtr_t) &TlmPkt; - int32 PipeDepth = 2; - CFE_MSG_Size_t Size = sizeof(TlmPkt); - CFE_MSG_Type_t Type = CFE_MSG_Type_Tlm; + CFE_SB_PipeId_t PipeId4Error; + CFE_SB_MsgId_t MsgId = SB_UT_TLM_MID; + SB_UT_Test_Tlm_t TlmPkt; + CFE_MSG_Message_t *TlmPktPtr = (CFE_MSG_Message_t *) &TlmPkt; + int32 PipeDepth = 2; + CFE_MSG_Size_t Size = sizeof(TlmPkt); + CFE_MSG_Type_t Type = CFE_MSG_Type_Tlm; SETUP(CFE_SB_CreatePipe(&PipeId4Error, PipeDepth, "TestPipe")); SETUP(CFE_SB_Subscribe(MsgId, PipeId4Error)); UT_SetDeferredRetcode(UT_KEY(OS_QueuePut), 1, OS_ERROR); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &MsgId, sizeof(MsgId), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetTypeFromMsgId), &Type, sizeof(Type), false); + UT_SetDataBuffer(UT_KEY(CFE_MSG_GetType), &Type, sizeof(Type), false); ASSERT(CFE_SB_SendMsg(TlmPktPtr)); @@ -2896,19 +2896,19 @@ void Test_SendMsg_QueuePutError(void) */ void Test_SendMsg_PipeFull(void) { - CFE_SB_PipeId_t PipeId; - CFE_SB_MsgId_t MsgId = SB_UT_TLM_MID; - SB_UT_Test_Tlm_t TlmPkt; - CFE_SB_MsgPtr_t TlmPktPtr = (CFE_SB_MsgPtr_t) &TlmPkt; - int32 PipeDepth = 1; - CFE_MSG_Size_t Size = sizeof(TlmPkt); - CFE_MSG_Type_t Type = CFE_MSG_Type_Tlm; + CFE_SB_PipeId_t PipeId; + CFE_SB_MsgId_t MsgId = SB_UT_TLM_MID; + SB_UT_Test_Tlm_t TlmPkt; + CFE_MSG_Message_t *TlmPktPtr = (CFE_MSG_Message_t *) &TlmPkt; + int32 PipeDepth = 1; + CFE_MSG_Size_t Size = sizeof(TlmPkt); + CFE_MSG_Type_t Type = CFE_MSG_Type_Tlm; SETUP(CFE_SB_CreatePipe(&PipeId, PipeDepth, "PipeFullTestPipe")); SETUP(CFE_SB_Subscribe(MsgId, PipeId)); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &MsgId, sizeof(MsgId), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetTypeFromMsgId), &Type, sizeof(Type), false); + UT_SetDataBuffer(UT_KEY(CFE_MSG_GetType), &Type, sizeof(Type), false); /* This send should pass */ ASSERT(CFE_SB_SendMsg(TlmPktPtr)); @@ -2918,7 +2918,7 @@ void Test_SendMsg_PipeFull(void) UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &MsgId, sizeof(MsgId), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetTypeFromMsgId), &Type, sizeof(Type), false); + UT_SetDataBuffer(UT_KEY(CFE_MSG_GetType), &Type, sizeof(Type), false); /* Pipe overflow causes SendMsg to return CFE_SUCCESS */ ASSERT(CFE_SB_SendMsg(TlmPktPtr)); @@ -2936,13 +2936,13 @@ void Test_SendMsg_PipeFull(void) */ void Test_SendMsg_MsgLimitExceeded(void) { - CFE_SB_PipeId_t PipeId; - CFE_SB_MsgId_t MsgId = SB_UT_TLM_MID; - SB_UT_Test_Tlm_t TlmPkt; - CFE_SB_MsgPtr_t TlmPktPtr = (CFE_SB_MsgPtr_t) &TlmPkt; - int32 PipeDepth = 5; - CFE_MSG_Size_t Size = sizeof(TlmPkt); - CFE_MSG_Type_t Type = CFE_MSG_Type_Tlm; + CFE_SB_PipeId_t PipeId; + CFE_SB_MsgId_t MsgId = SB_UT_TLM_MID; + SB_UT_Test_Tlm_t TlmPkt; + CFE_MSG_Message_t *TlmPktPtr = (CFE_MSG_Message_t *) &TlmPkt; + int32 PipeDepth = 5; + CFE_MSG_Size_t Size = sizeof(TlmPkt); + CFE_MSG_Type_t Type = CFE_MSG_Type_Tlm; SETUP(CFE_SB_CreatePipe(&PipeId, PipeDepth, "MsgLimTestPipe")); @@ -2951,14 +2951,14 @@ void Test_SendMsg_MsgLimitExceeded(void) UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &MsgId, sizeof(MsgId), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetTypeFromMsgId), &Type, sizeof(Type), false); + UT_SetDataBuffer(UT_KEY(CFE_MSG_GetType), &Type, sizeof(Type), false); /* First send should pass */ ASSERT(CFE_SB_SendMsg(TlmPktPtr)); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &MsgId, sizeof(MsgId), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetTypeFromMsgId), &Type, sizeof(Type), false); + UT_SetDataBuffer(UT_KEY(CFE_MSG_GetType), &Type, sizeof(Type), false); /* This send should produce a MsgId to Pipe Limit Exceeded message, but * return success @@ -2978,12 +2978,12 @@ void Test_SendMsg_MsgLimitExceeded(void) */ void Test_SendMsg_GetPoolBufErr(void) { - CFE_SB_PipeId_t PipeId; - CFE_SB_MsgId_t MsgId = SB_UT_TLM_MID; - SB_UT_Test_Tlm_t TlmPkt; - CFE_SB_MsgPtr_t TlmPktPtr = (CFE_SB_MsgPtr_t) &TlmPkt; - int32 PipeDepth; - CFE_MSG_Size_t Size = sizeof(TlmPkt); + CFE_SB_PipeId_t PipeId; + CFE_SB_MsgId_t MsgId = SB_UT_TLM_MID; + SB_UT_Test_Tlm_t TlmPkt; + CFE_MSG_Message_t *TlmPktPtr = (CFE_MSG_Message_t *) &TlmPkt; + int32 PipeDepth; + CFE_MSG_Size_t Size = sizeof(TlmPkt); PipeDepth = 1; SETUP(CFE_SB_CreatePipe(&PipeId, PipeDepth, "GetPoolErrPipe")); @@ -3062,10 +3062,10 @@ void Test_SendMsg_ZeroCopyGetPtr(void) */ void Test_SendMsg_ZeroCopySend(void) { - CFE_SB_MsgPtr_t PtrToMsg; + CFE_MSG_Message_t *PtrToMsg; CFE_SB_PipeId_t PipeId; CFE_SB_MsgId_t MsgId = SB_UT_TLM_MID; - CFE_SB_MsgPtr_t ZeroCpyMsgPtr = NULL; + CFE_MSG_Message_t *ZeroCpyMsgPtr = NULL; uint32 PipeDepth = 10; CFE_SB_ZeroCopyHandle_t ZeroCpyBufHndl = 0; CFE_MSG_SequenceCount_t SeqCnt; @@ -3091,7 +3091,7 @@ void Test_SendMsg_ZeroCopySend(void) UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &MsgId, sizeof(MsgId), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetTypeFromMsgId), &Type, sizeof(Type), false); + UT_SetDataBuffer(UT_KEY(CFE_MSG_GetType), &Type, sizeof(Type), false); /* Test a successful zero copy send */ ASSERT(CFE_SB_ZeroCopySend(ZeroCpyMsgPtr, ZeroCpyBufHndl)); @@ -3116,10 +3116,10 @@ void Test_SendMsg_ZeroCopySend(void) */ void Test_SendMsg_ZeroCopyPass(void) { - CFE_SB_MsgPtr_t PtrToMsg; - CFE_SB_PipeId_t PipeId; + CFE_MSG_Message_t *PtrToMsg; + CFE_SB_PipeId_t PipeId; CFE_SB_MsgId_t MsgId = SB_UT_TLM_MID; - CFE_SB_MsgPtr_t ZeroCpyMsgPtr = NULL; + CFE_MSG_Message_t *ZeroCpyMsgPtr = NULL; uint32 PipeDepth = 10; CFE_SB_ZeroCopyHandle_t ZeroCpyBufHndl = 0; CFE_MSG_SequenceCount_t SeqCnt = 22; @@ -3146,7 +3146,7 @@ void Test_SendMsg_ZeroCopyPass(void) UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &MsgId, sizeof(MsgId), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetTypeFromMsgId), &Type, sizeof(Type), false); + UT_SetDataBuffer(UT_KEY(CFE_MSG_GetType), &Type, sizeof(Type), false); /* Test a successful zero copy pass */ ASSERT(CFE_SB_ZeroCopyPass(ZeroCpyMsgPtr, ZeroCpyBufHndl)); @@ -3168,9 +3168,9 @@ void Test_SendMsg_ZeroCopyPass(void) */ void Test_SendMsg_ZeroCopyReleasePtr(void) { - CFE_SB_MsgPtr_t ZeroCpyMsgPtr1 = NULL; - CFE_SB_MsgPtr_t ZeroCpyMsgPtr2 = NULL; - CFE_SB_MsgPtr_t ZeroCpyMsgPtr3 = NULL; + CFE_MSG_Message_t *ZeroCpyMsgPtr1 = NULL; + CFE_MSG_Message_t *ZeroCpyMsgPtr2 = NULL; + CFE_MSG_Message_t *ZeroCpyMsgPtr3 = NULL; CFE_SB_ZeroCopyHandle_t ZeroCpyBufHndl1 = 0; CFE_SB_ZeroCopyHandle_t ZeroCpyBufHndl2 = 0; CFE_SB_ZeroCopyHandle_t ZeroCpyBufHndl3 = 0; @@ -3189,7 +3189,7 @@ void Test_SendMsg_ZeroCopyReleasePtr(void) ASSERT_EQ(CFE_SB_ZeroCopyReleasePtr(NULL, ZeroCpyBufHndl2), CFE_SB_BUFFER_INVALID); /* Test response to an invalid message pointer */ - ASSERT_EQ(CFE_SB_ZeroCopyReleasePtr((CFE_SB_Msg_t *) 0x1234, + ASSERT_EQ(CFE_SB_ZeroCopyReleasePtr((CFE_MSG_Message_t *) 0x1234, ZeroCpyBufHndl2), CFE_SB_BUFFER_INVALID); /* Test path when return the descriptor to the pool fails in @@ -3222,7 +3222,7 @@ void Test_SendMsg_DisabledDestination(void) CFE_SB_PipeId_t PipeId; CFE_SB_MsgId_t MsgId = SB_UT_TLM_MID; SB_UT_Test_Tlm_t TlmPkt; - CFE_SB_MsgPtr_t TlmPktPtr = (CFE_SB_MsgPtr_t) &TlmPkt; + CFE_MSG_Message_t *TlmPktPtr = (CFE_MSG_Message_t *) &TlmPkt; CFE_SB_DestinationD_t *DestPtr; int32 PipeDepth; CFE_MSG_Type_t Type = CFE_MSG_Type_Tlm; @@ -3240,7 +3240,7 @@ void Test_SendMsg_DisabledDestination(void) UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &MsgId, sizeof(MsgId), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetTypeFromMsgId), &Type, sizeof(Type), false); + UT_SetDataBuffer(UT_KEY(CFE_MSG_GetType), &Type, sizeof(Type), false); ASSERT(CFE_SB_SendMsg(TlmPktPtr)); @@ -3270,10 +3270,10 @@ void Test_SendMsg_SendWithMetadata(void) SB_UT_Test_Tlm_t TlmPkt; } TlmPktBufDesc; - CFE_SB_MsgPtr_t TlmPktPtr = (CFE_SB_MsgPtr_t) &TlmPktBufDesc.TlmPkt; - int32 PipeDepth; - CFE_MSG_Type_t Type = CFE_MSG_Type_Tlm; - CFE_MSG_Size_t Size = sizeof(TlmPktBufDesc.TlmPkt); + CFE_MSG_Message_t *TlmPktPtr = (CFE_MSG_Message_t *) &TlmPktBufDesc.TlmPkt; + int32 PipeDepth; + CFE_MSG_Type_t Type = CFE_MSG_Type_Tlm; + CFE_MSG_Size_t Size = sizeof(TlmPktBufDesc.TlmPkt); memset(&TlmPktBufDesc, 0, sizeof(TlmPktBufDesc)); PipeDepth = 2; @@ -3282,7 +3282,7 @@ void Test_SendMsg_SendWithMetadata(void) UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &MsgId, sizeof(MsgId), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetTypeFromMsgId), &Type, sizeof(Type), false); + UT_SetDataBuffer(UT_KEY(CFE_MSG_GetType), &Type, sizeof(Type), false); ASSERT(CFE_SB_SendMsgFull(TlmPktPtr, CFE_SB_DO_NOT_INCREMENT, CFE_SB_SEND_ZEROCOPY)); @@ -3299,11 +3299,11 @@ void Test_SendMsg_SendWithMetadata(void) */ void Test_SendMsg_MaxMsgSizePlusOne_ZeroCopy(void) { - CFE_SB_MsgId_t MsgId = SB_UT_TLM_MID; - SB_UT_Test_Tlm_t TlmPkt; - CFE_SB_MsgPtr_t TlmPktPtr; - CFE_MSG_Type_t Type = CFE_MSG_Type_Tlm; - CFE_MSG_Size_t Size = CFE_MISSION_SB_MAX_SB_MSG_SIZE + 1; + CFE_SB_MsgId_t MsgId = SB_UT_TLM_MID; + SB_UT_Test_Tlm_t TlmPkt; + CFE_MSG_Message_t *TlmPktPtr; + CFE_MSG_Type_t Type = CFE_MSG_Type_Tlm; + CFE_MSG_Size_t Size = CFE_MISSION_SB_MAX_SB_MSG_SIZE + 1; TlmPktPtr = CFE_SB_ZeroCopyGetPtr(sizeof(SB_UT_Test_Tlm_t), (CFE_SB_ZeroCopyHandle_t *) &TlmPkt); @@ -3315,7 +3315,7 @@ void Test_SendMsg_MaxMsgSizePlusOne_ZeroCopy(void) { UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &MsgId, sizeof(MsgId), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetTypeFromMsgId), &Type, sizeof(Type), false); + UT_SetDataBuffer(UT_KEY(CFE_MSG_GetType), &Type, sizeof(Type), false); ASSERT_EQ(CFE_SB_SendMsgFull(TlmPktPtr, CFE_SB_INCREMENT_TLM, CFE_SB_SEND_ZEROCOPY), CFE_SB_MSG_TOO_BIG); @@ -3334,11 +3334,11 @@ void Test_SendMsg_MaxMsgSizePlusOne_ZeroCopy(void) */ void Test_SendMsg_NoSubscribers_ZeroCopy(void) { - CFE_SB_MsgId_t MsgId = SB_UT_TLM_MID; - SB_UT_Test_Tlm_t TlmPkt; - CFE_SB_MsgPtr_t TlmPktPtr; - CFE_MSG_Type_t Type = CFE_MSG_Type_Tlm; - CFE_MSG_Size_t Size = sizeof(TlmPkt); + CFE_SB_MsgId_t MsgId = SB_UT_TLM_MID; + SB_UT_Test_Tlm_t TlmPkt; + CFE_MSG_Message_t *TlmPktPtr; + CFE_MSG_Type_t Type = CFE_MSG_Type_Tlm; + CFE_MSG_Size_t Size = sizeof(TlmPkt); TlmPktPtr = CFE_SB_ZeroCopyGetPtr(sizeof(SB_UT_Test_Tlm_t), (CFE_SB_ZeroCopyHandle_t *) &TlmPkt); @@ -3350,7 +3350,7 @@ void Test_SendMsg_NoSubscribers_ZeroCopy(void) { UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &MsgId, sizeof(MsgId), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetTypeFromMsgId), &Type, sizeof(Type), false); + UT_SetDataBuffer(UT_KEY(CFE_MSG_GetType), &Type, sizeof(Type), false); ASSERT(CFE_SB_SendMsgFull(TlmPktPtr, CFE_SB_INCREMENT_TLM, CFE_SB_SEND_ZEROCOPY)); @@ -3381,8 +3381,8 @@ void Test_RcvMsg_API(void) */ void Test_RcvMsg_InvalidPipeId(void) { - CFE_SB_MsgPtr_t PtrToMsg; - CFE_SB_PipeId_t InvalidPipeId = 20; + CFE_MSG_Message_t *PtrToMsg; + CFE_SB_PipeId_t InvalidPipeId = 20; CFE_SB.PipeTbl[InvalidPipeId].InUse = CFE_SB_NOT_IN_USE; @@ -3400,10 +3400,10 @@ void Test_RcvMsg_InvalidPipeId(void) */ void Test_RcvMsg_InvalidTimeout(void) { - CFE_SB_MsgPtr_t PtrToMsg; - CFE_SB_PipeId_t PipeId; - uint32 PipeDepth = 10; - int32 TimeOut = -5; + CFE_MSG_Message_t *PtrToMsg; + CFE_SB_PipeId_t PipeId; + uint32 PipeDepth = 10; + int32 TimeOut = -5; SETUP(CFE_SB_CreatePipe(&PipeId, PipeDepth, "RcvMsgTestPipe")); @@ -3422,9 +3422,9 @@ void Test_RcvMsg_InvalidTimeout(void) */ void Test_RcvMsg_Poll(void) { - CFE_SB_MsgPtr_t PtrToMsg; - CFE_SB_PipeId_t PipeId; - uint32 PipeDepth = 10; + CFE_MSG_Message_t *PtrToMsg; + CFE_SB_PipeId_t PipeId; + uint32 PipeDepth = 10; SETUP(CFE_SB_CreatePipe(&PipeId, PipeDepth, "RcvMsgTestPipe")); @@ -3443,10 +3443,10 @@ void Test_RcvMsg_Poll(void) */ void Test_RcvMsg_Timeout(void) { - CFE_SB_MsgPtr_t PtrToMsg; - CFE_SB_PipeId_t PipeId; - uint32 PipeDepth = 10; - int32 TimeOut = 200; + CFE_MSG_Message_t *PtrToMsg; + CFE_SB_PipeId_t PipeId; + uint32 PipeDepth = 10; + int32 TimeOut = 200; SETUP(CFE_SB_CreatePipe(&PipeId, PipeDepth, "RcvMsgTestPipe")); UT_SetDeferredRetcode(UT_KEY(OS_QueueGet), 1, OS_QUEUE_TIMEOUT); @@ -3466,9 +3466,9 @@ void Test_RcvMsg_Timeout(void) */ void Test_RcvMsg_PipeReadError(void) { - CFE_SB_MsgPtr_t PtrToMsg; - CFE_SB_PipeId_t PipeId; - uint32 PipeDepth = 10; + CFE_MSG_Message_t *PtrToMsg; + CFE_SB_PipeId_t PipeId; + uint32 PipeDepth = 10; SETUP(CFE_SB_CreatePipe(&PipeId, PipeDepth, "RcvMsgTestPipe")); UT_SetDeferredRetcode(UT_KEY(OS_QueueGet), 1, OS_ERROR); @@ -3487,20 +3487,20 @@ void Test_RcvMsg_PipeReadError(void) */ void Test_RcvMsg_PendForever(void) { - CFE_SB_MsgPtr_t PtrToMsg; - CFE_SB_MsgId_t MsgId = SB_UT_TLM_MID; - CFE_SB_PipeId_t PipeId; - SB_UT_Test_Tlm_t TlmPkt; - CFE_SB_MsgPtr_t TlmPktPtr = (CFE_SB_MsgPtr_t) &TlmPkt; - CFE_SB_PipeD_t *PipeDscPtr; - uint32 PipeDepth = 10; - CFE_MSG_Type_t Type = CFE_MSG_Type_Tlm; - CFE_MSG_Size_t Size = sizeof(TlmPkt); + CFE_MSG_Message_t *PtrToMsg; + CFE_SB_MsgId_t MsgId = SB_UT_TLM_MID; + CFE_SB_PipeId_t PipeId; + SB_UT_Test_Tlm_t TlmPkt; + CFE_MSG_Message_t *TlmPktPtr = (CFE_MSG_Message_t *) &TlmPkt; + CFE_SB_PipeD_t *PipeDscPtr; + uint32 PipeDepth = 10; + CFE_MSG_Type_t Type = CFE_MSG_Type_Tlm; + CFE_MSG_Size_t Size = sizeof(TlmPkt); SETUP(CFE_SB_CreatePipe(&PipeId, PipeDepth, "RcvMsgTestPipe")); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &MsgId, sizeof(MsgId), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetTypeFromMsgId), &Type, sizeof(Type), false); + UT_SetDataBuffer(UT_KEY(CFE_MSG_GetType), &Type, sizeof(Type), false); SETUP(CFE_SB_Subscribe(MsgId, PipeId)); SETUP(CFE_SB_SendMsg(TlmPktPtr)); @@ -3585,38 +3585,20 @@ void Test_RcvMsg_InvalidBufferPtr(void) */ void Test_SB_Utils(void) { - SB_UT_ADD_SUBTEST(Test_CFE_SB_InitMsg); SB_UT_ADD_SUBTEST(Test_CFE_SB_MsgHdrSize); SB_UT_ADD_SUBTEST(Test_CFE_SB_GetUserData); - SB_UT_ADD_SUBTEST(Test_CFE_SB_SetGetMsgId); SB_UT_ADD_SUBTEST(Test_CFE_SB_SetGetUserDataLength); - SB_UT_ADD_SUBTEST(Test_CFE_SB_SetGetTotalMsgLength); - SB_UT_ADD_SUBTEST(Test_CFE_SB_SetGetMsgTime); - SB_UT_ADD_SUBTEST(Test_CFE_SB_SetGetCmdCode); - SB_UT_ADD_SUBTEST(Test_CFE_SB_ChecksumUtils); SB_UT_ADD_SUBTEST(Test_CFE_SB_ValidateMsgId); } /* end Test_SB_Utils */ -/* -** -*/ -void Test_CFE_SB_InitMsg(void) -{ - CFE_MSG_Message_t msg; - - /* Pass through function */ - CFE_SB_InitMsg(&msg, CFE_SB_ValueToMsgId(0), 0, false); - -} /* end Test_CFE_SB_InitMsg */ - /* ** Test getting the size of a command/telemetry message header */ void Test_CFE_SB_MsgHdrSize(void) { - CFE_SB_Msg_t msg; - bool hassec; - CFE_MSG_Type_t type; + CFE_MSG_Message_t msg; + bool hassec; + CFE_MSG_Type_t type; /* No secondary */ hassec = false; @@ -3651,10 +3633,10 @@ void Test_CFE_SB_MsgHdrSize(void) */ void Test_CFE_SB_GetUserData(void) { - CFE_SB_Msg_t msg; - uint8 *ExpAdrReturned; - bool hassec; - CFE_MSG_Type_t type = CFE_MSG_Type_Invalid; + CFE_MSG_Message_t msg; + uint8 *ExpAdrReturned; + bool hassec; + CFE_MSG_Type_t type = CFE_MSG_Type_Invalid; /* No secondary */ hassec = false; @@ -3668,22 +3650,6 @@ void Test_CFE_SB_GetUserData(void) } /* end Test_CFE_SB_GetUserData */ -/* -** Test setting and getting the message ID of a message -*/ -void Test_CFE_SB_SetGetMsgId(void) -{ - CFE_MSG_Message_t msg; - CFE_SB_MsgId_t msgid = 5; - - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &msgid, sizeof(msgid), false); - - /* Pass through functions */ - ASSERT_EQ(CFE_SB_GetMsgId(&msg), msgid); - CFE_SB_SetMsgId(&msg, CFE_SB_ValueToMsgId(0)); - -} /* end Test_CFE_SB_SetGetMsgId */ - /* ** Test setting and getting the user data length of a message */ @@ -3706,100 +3672,6 @@ void Test_CFE_SB_SetGetUserDataLength(void) } /* end Util_CFE_SB_SetGetUserDataLength */ -/* -** Test setting and getting the total message size -*/ -void Test_CFE_SB_SetGetTotalMsgLength(void) -{ - CFE_MSG_Message_t msg; - CFE_MSG_Size_t size = 6; - - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &size, sizeof(size), false); - - /* Pass through functions */ - ASSERT_EQ(CFE_SB_GetTotalMsgLength(&msg), size); - CFE_SB_SetTotalMsgLength(&msg, 0); - -} /* end Test_CFE_SB_SetGetTotalMsgLength */ - -void Test_CFE_SB_SetGetMsgTime(void) -{ - CFE_MSG_Message_t msg; - CFE_TIME_SysTime_t time = {0xb, 0xa0000}; - CFE_TIME_SysTime_t actual; - - /* Set up buffer */ - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgTime), &time, sizeof(time), false); - - /* Pass through functions */ - actual = CFE_SB_GetMsgTime(&msg); - ASSERT_TRUE(actual.Seconds == time.Seconds); - ASSERT_TRUE(actual.Subseconds == time.Subseconds); - CFE_SB_SetMsgTime(&msg, time); - CFE_SB_TimeStampMsg(&msg); - -} /* end Test_CFE_SB_SetGetMsgTime */ - -void Test_CFE_SB_SetGetCmdCode(void) -{ - CFE_MSG_Message_t msg; - CFE_MSG_FcnCode_t fcncode = 7; - - /* Set up buffer */ - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetFcnCode), &fcncode, sizeof(fcncode), false); - - /* Pass through functions */ - ASSERT_EQ(CFE_SB_GetCmdCode(&msg), fcncode); - CFE_SB_SetCmdCode(&msg, 0); - -} /* end Test_CFE_SB_SetGetCmdCode */ - -/* -** Test checksum utils -*/ -void Test_CFE_SB_ChecksumUtils(void) -{ - CFE_SB_CmdHdr_t SBCmd; - CFE_SB_Msg_t *SBCmdPtr = (CFE_SB_Msg_t *) &SBCmd; - bool hassec; - CFE_MSG_Type_t type; - bool validcksum; - - /* Has secondary, tlm type */ - hassec = true; - type = CFE_MSG_Type_Tlm; - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetHasSecondaryHeader), &hassec, sizeof(hassec), false); - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetType), &type, sizeof(type), false); - ASSERT_EQ(CFE_SB_GetChecksum(SBCmdPtr), 0); - - /* No secondary, cmd type */ - hassec = false; - type = CFE_MSG_Type_Cmd; - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetHasSecondaryHeader), &hassec, sizeof(hassec), false); - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetType), &type, sizeof(type), false); - ASSERT_EQ(CFE_SB_GetChecksum(SBCmdPtr), 0); - - /* Valid, 0 */ - hassec = true; - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetHasSecondaryHeader), &hassec, sizeof(hassec), false); - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetType), &type, sizeof(type), false); - memset(&SBCmd, 1, sizeof(SBCmd)); - ASSERT_EQ(CFE_SB_GetChecksum(SBCmdPtr), 1); - - /* Valid, 0xFF */ - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetHasSecondaryHeader), &hassec, sizeof(hassec), false); - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetType), &type, sizeof(type), false); - memset(&SBCmd, 0xFF, sizeof(SBCmd)); - ASSERT_EQ(CFE_SB_GetChecksum(SBCmdPtr), 0xFF); - - /* Execute passthrough functions */ - validcksum = true; - CFE_SB_GenerateChecksum(SBCmdPtr); - UT_SetDataBuffer(UT_KEY(CFE_MSG_ValidateChecksum), &validcksum, sizeof(validcksum), false); - ASSERT_EQ(CFE_SB_ValidateChecksum(SBCmdPtr), validcksum); - -} /* end Test_CFE_SB_ChecksumUtils */ - /* ** Test validating a msg id */ @@ -3988,14 +3860,14 @@ void Test_CFE_SB_BadPipeInfo(void) */ void Test_SB_SendMsgPaths_Nominal(void) { - CFE_SB_CmdHdr_t NoParamCmd; - CFE_SB_MsgId_t MsgId; - CFE_SB_PipeId_t PipeId; - SB_UT_Test_Tlm_t TlmPkt; - CFE_SB_MsgPtr_t TlmPktPtr = (CFE_SB_MsgPtr_t) &TlmPkt; - int32 PipeDepth = 2; - CFE_MSG_Size_t Size; - CFE_MSG_Type_t Type; + CFE_SB_CmdHdr_t NoParamCmd; + CFE_SB_MsgId_t MsgId; + CFE_SB_PipeId_t PipeId; + SB_UT_Test_Tlm_t TlmPkt; + CFE_MSG_Message_t *TlmPktPtr = (CFE_MSG_Message_t *) &TlmPkt; + int32 PipeDepth = 2; + CFE_MSG_Size_t Size; + CFE_MSG_Type_t Type; /* For internal SendMsg call */ MsgId = CFE_SB_ValueToMsgId(CFE_SB_HK_TLM_MID); @@ -4009,7 +3881,7 @@ void Test_SB_SendMsgPaths_Nominal(void) /* Repress sending the no subscriptions event and process request */ CFE_SB.HKTlmMsg.Payload.NoSubscribersCounter = 0; - CFE_SB.CmdPipePktPtr = (CFE_SB_MsgPtr_t) &NoParamCmd; + CFE_SB.CmdPipePktPtr = (CFE_MSG_Message_t *) &NoParamCmd; CFE_SB.StopRecurseFlags[1] |= CFE_BIT(CFE_SB_SEND_NO_SUBS_EID_BIT); CFE_SB_ProcessCmdPipePkt(); @@ -4053,7 +3925,7 @@ void Test_SB_SendMsgPaths_Nominal(void) UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &MsgId, sizeof(MsgId), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetTypeFromMsgId), &Type, sizeof(Type), false); + UT_SetDataBuffer(UT_KEY(CFE_MSG_GetType), &Type, sizeof(Type), false); ASSERT(CFE_SB_SendMsg(TlmPktPtr)); @@ -4064,13 +3936,13 @@ void Test_SB_SendMsgPaths_Nominal(void) void Test_SB_SendMsgPaths_LimitErr(void) { - CFE_SB_MsgId_t MsgId; - CFE_SB_PipeId_t PipeId; - SB_UT_Test_Tlm_t TlmPkt; - CFE_SB_MsgPtr_t TlmPktPtr = (CFE_SB_MsgPtr_t) &TlmPkt; - int32 PipeDepth = 2; - CFE_MSG_Type_t Type = CFE_MSG_Type_Tlm; - CFE_MSG_Size_t Size = sizeof(TlmPkt); + CFE_SB_MsgId_t MsgId; + CFE_SB_PipeId_t PipeId; + SB_UT_Test_Tlm_t TlmPkt; + CFE_MSG_Message_t *TlmPktPtr = (CFE_MSG_Message_t *) &TlmPkt; + int32 PipeDepth = 2; + CFE_MSG_Type_t Type = CFE_MSG_Type_Tlm; + CFE_MSG_Size_t Size = sizeof(TlmPkt); /* Test inhibiting sending a "message ID limit error" message */ MsgId = SB_UT_TLM_MID; @@ -4081,14 +3953,14 @@ void Test_SB_SendMsgPaths_LimitErr(void) UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &MsgId, sizeof(MsgId), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetTypeFromMsgId), &Type, sizeof(Type), false); + UT_SetDataBuffer(UT_KEY(CFE_MSG_GetType), &Type, sizeof(Type), false); /* First send should pass */ ASSERT(CFE_SB_SendMsg(TlmPktPtr)); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &MsgId, sizeof(MsgId), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetTypeFromMsgId), &Type, sizeof(Type), false); + UT_SetDataBuffer(UT_KEY(CFE_MSG_GetType), &Type, sizeof(Type), false); CFE_SB.StopRecurseFlags[1] |= CFE_BIT(CFE_SB_MSGID_LIM_ERR_EID_BIT); ASSERT(CFE_SB_SendMsg(TlmPktPtr)); @@ -4103,13 +3975,13 @@ void Test_SB_SendMsgPaths_LimitErr(void) void Test_SB_SendMsgPaths_FullErr(void) { - CFE_SB_MsgId_t MsgId; - CFE_SB_PipeId_t PipeId; - SB_UT_Test_Tlm_t TlmPkt; - CFE_SB_MsgPtr_t TlmPktPtr = (CFE_SB_MsgPtr_t) &TlmPkt; - int32 PipeDepth = 2; - CFE_MSG_Type_t Type = CFE_MSG_Type_Tlm; - CFE_MSG_Size_t Size = sizeof(TlmPkt); + CFE_SB_MsgId_t MsgId; + CFE_SB_PipeId_t PipeId; + SB_UT_Test_Tlm_t TlmPkt; + CFE_MSG_Message_t *TlmPktPtr = (CFE_MSG_Message_t *) &TlmPkt; + int32 PipeDepth = 2; + CFE_MSG_Type_t Type = CFE_MSG_Type_Tlm; + CFE_MSG_Size_t Size = sizeof(TlmPkt); /* Test inhibiting sending a "pipe full" message */ MsgId = SB_UT_TLM_MID; @@ -4118,14 +3990,14 @@ void Test_SB_SendMsgPaths_FullErr(void) UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &MsgId, sizeof(MsgId), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetTypeFromMsgId), &Type, sizeof(Type), false); + UT_SetDataBuffer(UT_KEY(CFE_MSG_GetType), &Type, sizeof(Type), false); /* This send should pass */ ASSERT(CFE_SB_SendMsg(TlmPktPtr)); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &MsgId, sizeof(MsgId), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetTypeFromMsgId), &Type, sizeof(Type), false); + UT_SetDataBuffer(UT_KEY(CFE_MSG_GetType), &Type, sizeof(Type), false); /* Tell the QueuePut stub to return OS_QUEUE_FULL on its next call */ UT_SetDeferredRetcode(UT_KEY(OS_QueuePut), 1, OS_QUEUE_FULL); @@ -4142,13 +4014,13 @@ void Test_SB_SendMsgPaths_FullErr(void) void Test_SB_SendMsgPaths_WriteErr(void) { - CFE_SB_MsgId_t MsgId; - CFE_SB_PipeId_t PipeId; - SB_UT_Test_Tlm_t TlmPkt; - CFE_SB_MsgPtr_t TlmPktPtr = (CFE_SB_MsgPtr_t) &TlmPkt; - int32 PipeDepth = 2; - CFE_MSG_Type_t Type = CFE_MSG_Type_Tlm; - CFE_MSG_Size_t Size = sizeof(TlmPkt); + CFE_SB_MsgId_t MsgId; + CFE_SB_PipeId_t PipeId; + SB_UT_Test_Tlm_t TlmPkt; + CFE_MSG_Message_t *TlmPktPtr = (CFE_MSG_Message_t *) &TlmPkt; + int32 PipeDepth = 2; + CFE_MSG_Type_t Type = CFE_MSG_Type_Tlm; + CFE_MSG_Size_t Size = sizeof(TlmPkt); /* Test inhibiting sending a "pipe write error" message */ MsgId = SB_UT_TLM_MID; @@ -4158,7 +4030,7 @@ void Test_SB_SendMsgPaths_WriteErr(void) UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &MsgId, sizeof(MsgId), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetTypeFromMsgId), &Type, sizeof(Type), false); + UT_SetDataBuffer(UT_KEY(CFE_MSG_GetType), &Type, sizeof(Type), false); CFE_SB.StopRecurseFlags[1] |= CFE_BIT(CFE_SB_Q_WR_ERR_EID_BIT); ASSERT(CFE_SB_SendMsg(TlmPktPtr)); @@ -4166,7 +4038,7 @@ void Test_SB_SendMsgPaths_WriteErr(void) UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &MsgId, sizeof(MsgId), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetTypeFromMsgId), &Type, sizeof(Type), false); + UT_SetDataBuffer(UT_KEY(CFE_MSG_GetType), &Type, sizeof(Type), false); ASSERT(CFE_SB_SendMsg(TlmPktPtr)); @@ -4180,13 +4052,13 @@ void Test_SB_SendMsgPaths_WriteErr(void) void Test_SB_SendMsgPaths_IgnoreOpt(void) { - CFE_SB_MsgId_t MsgId; - CFE_SB_PipeId_t PipeId; - SB_UT_Test_Tlm_t TlmPkt; - CFE_SB_MsgPtr_t TlmPktPtr = (CFE_SB_MsgPtr_t) &TlmPkt; - int32 PipeDepth = 2; - CFE_MSG_Type_t Type = CFE_MSG_Type_Tlm; - CFE_MSG_Size_t Size = sizeof(TlmPkt); + CFE_SB_MsgId_t MsgId; + CFE_SB_PipeId_t PipeId; + SB_UT_Test_Tlm_t TlmPkt; + CFE_MSG_Message_t *TlmPktPtr = (CFE_MSG_Message_t *) &TlmPkt; + int32 PipeDepth = 2; + CFE_MSG_Type_t Type = CFE_MSG_Type_Tlm; + CFE_MSG_Size_t Size = sizeof(TlmPkt); /* Setup Test skipping sending to a pipe when the pipe option is set to ignore */ MsgId = SB_UT_TLM_MID; @@ -4196,7 +4068,7 @@ void Test_SB_SendMsgPaths_IgnoreOpt(void) UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &MsgId, sizeof(MsgId), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetTypeFromMsgId), &Type, sizeof(Type), false); + UT_SetDataBuffer(UT_KEY(CFE_MSG_GetType), &Type, sizeof(Type), false); /* Test skipping this pipe and the send should pass */ ASSERT(CFE_SB_SendMsg(TlmPktPtr)); @@ -4213,20 +4085,20 @@ void Test_SB_SendMsgPaths_IgnoreOpt(void) */ void Test_RcvMsg_UnsubResubPath(void) { - CFE_SB_MsgPtr_t PtrToMsg; - CFE_SB_MsgId_t MsgId = SB_UT_TLM_MID; - CFE_SB_PipeId_t PipeId; - SB_UT_Test_Tlm_t TlmPkt; - CFE_SB_MsgPtr_t TlmPktPtr = (CFE_SB_MsgPtr_t) &TlmPkt; - uint32 PipeDepth = 10; - CFE_MSG_Type_t Type = CFE_MSG_Type_Tlm; - CFE_MSG_Size_t Size = sizeof(TlmPkt); + CFE_MSG_Message_t *PtrToMsg; + CFE_SB_MsgId_t MsgId = SB_UT_TLM_MID; + CFE_SB_PipeId_t PipeId; + SB_UT_Test_Tlm_t TlmPkt; + CFE_MSG_Message_t *TlmPktPtr = (CFE_MSG_Message_t *) &TlmPkt; + uint32 PipeDepth = 10; + CFE_MSG_Type_t Type = CFE_MSG_Type_Tlm; + CFE_MSG_Size_t Size = sizeof(TlmPkt); SETUP(CFE_SB_CreatePipe(&PipeId, PipeDepth, "RcvMsgTestPipe")); SETUP(CFE_SB_Subscribe(MsgId, PipeId)); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &MsgId, sizeof(MsgId), false); UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &Size, sizeof(Size), false); - UT_SetDataBuffer(UT_KEY(CFE_MSG_GetTypeFromMsgId), &Type, sizeof(Type), false); + UT_SetDataBuffer(UT_KEY(CFE_MSG_GetType), &Type, sizeof(Type), false); SETUP(CFE_SB_SendMsg(TlmPktPtr)); SETUP(CFE_SB_Unsubscribe(MsgId, PipeId)); diff --git a/fsw/cfe-core/unit-test/sb_UT.h b/fsw/cfe-core/unit-test/sb_UT.h index 8c848bcc1..ffb126684 100644 --- a/fsw/cfe-core/unit-test/sb_UT.h +++ b/fsw/cfe-core/unit-test/sb_UT.h @@ -74,7 +74,7 @@ typedef struct { } SB_UT_Test_Tlm_t; typedef struct { - CFE_SB_Msg_t Pri; /* 6 bytes */ + CFE_MSG_Message_t Pri; /* 6 bytes */ uint8 Tlm8Param1; uint8 Tlm8Param2; uint32 Tlm32Param1; @@ -99,9 +99,6 @@ typedef struct { ** ** \returns ** This function does not return a value. -** -** \sa #UT_CheckForOpenSockets, #UT_InitData, #CFE_SB_EarlyInit -** ******************************************************************************/ void SB_ResetUnitTest(void); @@ -117,9 +114,6 @@ void SB_ResetUnitTest(void); ** ** \returns ** This function does not return a value. -** -** \sa #Test_SB_AppInit, #Test_SB_MainRoutine, #Test_SB_Cmds -** ******************************************************************************/ void Test_SB_App(void); @@ -137,12 +131,6 @@ void Test_SB_App(void); ** ** \returns ** This function does not return a value. -** -** \sa #Test_SB_AppInit_ESRegFail(), #Test_SB_AppInit_EVSRegFail(), -** \sa #Test_SB_AppInit_EVSSendEvtFail(), #Test_SB_AppInit_CrPipeFail(), -** \sa #Test_SB_AppInit_Sub1Fail(), #Test_SB_AppInit_Sub2Fail(), -** \sa #Test_SB_AppInit_GetPoolFail(), #Test_SB_AppInit_PutPoolFail() -** ******************************************************************************/ void Test_SB_AppInit(void); @@ -158,10 +146,6 @@ void Test_SB_AppInit(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #UT_SetRtnCode, #CFE_SB_AppInit, -** \sa #UT_GetNumEventsSent, #UT_Report -** ******************************************************************************/ void Test_SB_AppInit_ESRegFail(void); @@ -177,10 +161,6 @@ void Test_SB_AppInit_ESRegFail(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #UT_SetRtnCode, #CFE_SB_AppInit, -** \sa #UT_GetNumEventsSent, #UT_Report -** ******************************************************************************/ void Test_SB_AppInit_EVSRegFail(void); @@ -197,10 +177,6 @@ void Test_SB_AppInit_EVSRegFail(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #UT_SetRtnCode, #CFE_SB_AppInit, -** \sa #UT_GetNumEventsSent, #CFE_SB_DeletePipe, #UT_Report -** ******************************************************************************/ void Test_SB_AppInit_EVSSendEvtFail(void); @@ -216,10 +192,6 @@ void Test_SB_AppInit_EVSSendEvtFail(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_AppInit, #UT_GetNumEventsSent, -** \sa #UT_EventIsInHistory, #CFE_SB_DeletePipe, #UT_Report -** ******************************************************************************/ void Test_SB_AppInit_CrPipeFail(void); @@ -236,11 +208,6 @@ void Test_SB_AppInit_CrPipeFail(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #UT_SetRtnCode, #CFE_SB_AppInit, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #CFE_SB_DeletePipe, -** \sa #UT_Report -** ******************************************************************************/ void Test_SB_AppInit_Sub1Fail(void); @@ -257,11 +224,6 @@ void Test_SB_AppInit_Sub1Fail(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #UT_SetRtnCode, #CFE_SB_AppInit, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #CFE_SB_DeletePipe, -** \sa #UT_Report -** ******************************************************************************/ void Test_SB_AppInit_Sub2Fail(void); @@ -277,10 +239,6 @@ void Test_SB_AppInit_Sub2Fail(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #UT_SetRtnCode, #CFE_SB_AppInit, -** \sa #UT_GetNumEventsSent, #CFE_SB_DeletePipe, #UT_Report -** ******************************************************************************/ void Test_SB_AppInit_GetPoolFail(void); @@ -296,10 +254,6 @@ void Test_SB_AppInit_GetPoolFail(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #UT_SetRtnCode, #CFE_SB_AppInit, -** \sa #UT_GetNumEventsSent, #CFE_SB_DeletePipe, #UT_Report -** ******************************************************************************/ void Test_SB_AppInit_PutPoolFail(void); @@ -315,9 +269,6 @@ void Test_SB_AppInit_PutPoolFail(void); ** ** \returns ** This function does not return a value. -** -** \sa #Test_SB_Main_RcvErr, #Test_SB_Main_InitErr -** ******************************************************************************/ void Test_SB_MainRoutine(void); @@ -333,11 +284,6 @@ void Test_SB_MainRoutine(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #UT_SetRtnCode, #CFE_SB_TaskMain, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #CFE_SB_DeletePipe, -** \sa #UT_Report -** ******************************************************************************/ void Test_SB_Main_RcvErr(void); @@ -354,10 +300,6 @@ void Test_SB_Main_RcvErr(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #UT_SetRtnCode, #CFE_SB_TaskMain, -** \sa #UT_GetNumEventsSent, #CFE_SB_DeletePipe, #UT_Report -** ******************************************************************************/ void Test_SB_Main_InitErr(void); @@ -373,29 +315,6 @@ void Test_SB_Main_InitErr(void); ** ** \returns ** This function does not return a value. -** -** \sa #Test_SB_Cmds_Noop(), #Test_SB_Cmds_RstCtrs(), -** \sa #Test_SB_Cmds_Stats(), #Test_SB_Cmds_RoutingInfoDef(), -** \sa #Test_SB_Cmds_RoutingInfoSpec(), #Test_SB_Cmds_RoutingInfoCreateFail(), -** \sa #Test_SB_Cmds_PipeOpts(), -** \sa #Test_SB_Cmds_GetPipeName(), -** \sa #Test_SB_Cmds_GetPipeIdByName(), -** \sa #Test_SB_Cmds_RoutingInfoHdrFail(), -** \sa #Test_SB_Cmds_RoutingInfoWriteFail(), #Test_SB_Cmds_PipeInfoDef(), -** \sa #Test_SB_Cmds_PipeInfoSpec(), #Test_SB_Cmds_PipeInfoCreateFail(), -** \sa #Test_SB_Cmds_PipeInfoHdrFail(), #Test_SB_Cmds_PipeInfoWriteFail(), -** \sa #Test_SB_Cmds_MapInfoDef(), #Test_SB_Cmds_MapInfoSpec(), -** \sa #Test_SB_Cmds_MapInfoCreateFail(), #Test_SB_Cmds_MapInfoHdrFail(), -** \sa #Test_SB_Cmds_MapInfoWriteFail(), #Test_SB_Cmds_EnRouteValParam(), -** \sa #Test_SB_Cmds_EnRouteNonExist(), #Test_SB_Cmds_EnRouteInvParam(), -** \sa #Test_SB_Cmds_EnRouteInvParam2(), #Test_SB_Cmds_EnRouteInvParam3(), -** \sa #Test_SB_Cmds_DisRouteValParam(), #Test_SB_Cmds_DisRouteNonExist(), -** \sa #Test_SB_Cmds_DisRouteInvParam(), #Test_SB_Cmds_DisRouteInvParam2(), -** \sa #Test_SB_Cmds_DisRouteInvParam3(), #Test_SB_Cmds_SendHK(), -** \sa #Test_SB_Cmds_SendPrevSubs(), #Test_SB_Cmds_SubRptOn(), -** \sa #Test_SB_Cmds_SubRptOff(), #Test_SB_Cmds_UnexpCmdCode(), -** \sa #Test_SB_Cmds_UnexpMsgId() -** ******************************************************************************/ void Test_SB_Cmds(void); @@ -411,11 +330,6 @@ void Test_SB_Cmds(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_SetCmdCode, -** \sa #CFE_SB_ProcessCmdPipePkt, #UT_GetNumEventsSent, #UT_EventIsInHistory, -** \sa #UT_Report -** ******************************************************************************/ void Test_SB_Cmds_Noop(void); @@ -431,11 +345,6 @@ void Test_SB_Cmds_Noop(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_SetCmdCode, -** \sa #CFE_SB_ProcessCmdPipePkt, #UT_GetNumEventsSent, #UT_EventIsInHistory, -** \sa #UT_Report -** ******************************************************************************/ void Test_SB_Cmds_RstCtrs(void); @@ -451,11 +360,6 @@ void Test_SB_Cmds_RstCtrs(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_SetCmdCode, -** \sa #CFE_SB_ProcessCmdPipePkt, #UT_GetNumEventsSent, #UT_EventIsInHistory, -** \sa #UT_Report -** ******************************************************************************/ void Test_SB_Cmds_Stats(void); @@ -472,11 +376,6 @@ void Test_SB_Cmds_Stats(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_SetCmdCode, -** \sa #CFE_SB_AppInit, #CFE_SB_ProcessCmdPipePkt, #UT_GetNumEventsSent, -** \sa #UT_EventIsInHistory, #CFE_SB_DeletePipe, #UT_Report -** ******************************************************************************/ void Test_SB_Cmds_RoutingInfoDef(void); @@ -493,11 +392,6 @@ void Test_SB_Cmds_RoutingInfoDef(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_SetCmdCode, -** \sa #CFE_SB_ProcessCmdPipePkt, #UT_GetNumEventsSent, #UT_EventIsInHistory, -** \sa #UT_Report -** ******************************************************************************/ void Test_SB_Cmds_RoutingInfoSpec(void); @@ -514,11 +408,6 @@ void Test_SB_Cmds_RoutingInfoSpec(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_SetCmdCode, -** \sa #UT_SetOSFail, #CFE_SB_ProcessCmdPipePkt, #UT_GetNumEventsSent, -** \sa #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_SB_Cmds_RoutingInfoCreateFail(void); @@ -534,12 +423,6 @@ void Test_SB_Cmds_RoutingInfoCreateFail(void); ** ** \returns ** This function does not return a value. -** -** \sa #Test_SetPipeOpts_BadID, #Test_SetPipeOpts_NotOwner, -** \sa #Test_SetPipeOpts, -** \sa #Test_GetPipeOpts_BadID, #Test_GetPipeOpts_BadPtr, -** \sa #Test_GetPipeOpts -** ******************************************************************************/ void Test_PipeOpts_API(void); @@ -556,11 +439,6 @@ void Test_PipeOpts_API(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_SetCmdCode, -** \sa #UT_SetOSFail, #CFE_SB_ProcessCmdPipePkt, #UT_GetNumEventsSent, -** \sa #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_SetPipeOpts_BadID(void); @@ -577,11 +455,6 @@ void Test_SetPipeOpts_BadID(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_SetCmdCode, -** \sa #UT_SetOSFail, #CFE_SB_ProcessCmdPipePkt, #UT_GetNumEventsSent, -** \sa #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_SetPipeOpts_NotOwner(void); @@ -598,11 +471,6 @@ void Test_SetPipeOpts_NotOwner(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_SetCmdCode, -** \sa #UT_SetOSFail, #CFE_SB_ProcessCmdPipePkt, #UT_GetNumEventsSent, -** \sa #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_SetPipeOpts(void); @@ -619,11 +487,6 @@ void Test_SetPipeOpts(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_SetCmdCode, -** \sa #UT_SetOSFail, #CFE_SB_ProcessCmdPipePkt, #UT_GetNumEventsSent, -** \sa #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_GetPipeOpts_BadID(void); @@ -640,11 +503,6 @@ void Test_GetPipeOpts_BadID(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_SetCmdCode, -** \sa #UT_SetOSFail, #CFE_SB_ProcessCmdPipePkt, #UT_GetNumEventsSent, -** \sa #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_GetPipeOpts_BadPtr(void); @@ -661,11 +519,6 @@ void Test_GetPipeOpts_BadPtr(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_SetCmdCode, -** \sa #UT_SetOSFail, #UT_GetNumEventsSent, -** \sa #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_GetPipeOpts(void); @@ -681,9 +534,6 @@ void Test_GetPipeOpts(void); ** ** \returns ** This function does not return a value. -** -** \sa #Test_GetPipeName -** ******************************************************************************/ void Test_GetPipeName_API(void); @@ -700,10 +550,6 @@ void Test_GetPipeName_API(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #UT_SetRtnCode, #CFE_SB_CreatePipe, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_GetPipeName_NullPtr(void); @@ -720,10 +566,6 @@ void Test_GetPipeName_NullPtr(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #UT_SetRtnCode, #CFE_SB_CreatePipe, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_GetPipeName_InvalidId(void); @@ -740,11 +582,6 @@ void Test_GetPipeName_InvalidId(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_SetCmdCode, -** \sa #UT_SetOSFail, #UT_GetNumEventsSent, -** \sa #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_GetPipeName(void); @@ -760,9 +597,6 @@ void Test_GetPipeName(void); ** ** \returns ** This function does not return a value. -** -** \sa #Test_GetPipeIdByName -** ******************************************************************************/ void Test_GetPipeIdByName_API(void); @@ -779,10 +613,6 @@ void Test_GetPipeIdByName_API(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #UT_SetRtnCode, #CFE_SB_CreatePipe, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_GetPipeIdByName_NullPtrs(void); @@ -799,10 +629,6 @@ void Test_GetPipeIdByName_NullPtrs(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #UT_SetRtnCode, #CFE_SB_CreatePipe, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_GetPipeIdByName_InvalidName(void); @@ -819,11 +645,6 @@ void Test_GetPipeIdByName_InvalidName(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_SetCmdCode, -** \sa #UT_SetOSFail, #UT_GetNumEventsSent, -** \sa #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_GetPipeIdByName(void); @@ -841,10 +662,6 @@ void Test_GetPipeIdByName(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #UT_SetRtnCode, #CFE_SB_SendRtgInfo, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_SB_Cmds_RoutingInfoHdrFail(void); @@ -862,11 +679,6 @@ void Test_SB_Cmds_RoutingInfoHdrFail(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_AppInit, #UT_SetRtnCode, -** \sa #CFE_SB_SendRtgInfo, #UT_GetNumEventsSent, #UT_EventIsInHistory, -** \sa #CFE_SB_DeletePipe, #UT_Report -** ******************************************************************************/ void Test_SB_Cmds_RoutingInfoWriteFail(void); @@ -883,11 +695,6 @@ void Test_SB_Cmds_RoutingInfoWriteFail(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_SetCmdCode, -** \sa #CFE_SB_CreatePipe, #CFE_SB_ProcessCmdPipePkt, #UT_GetNumEventsSent, -** \sa #UT_EventIsInHistory, #CFE_SB_DeletePipe, #UT_Report -** ******************************************************************************/ void Test_SB_Cmds_PipeInfoDef(void); @@ -904,11 +711,6 @@ void Test_SB_Cmds_PipeInfoDef(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_SetCmdCode, -** \sa #CFE_SB_ProcessCmdPipePkt, #UT_GetNumEventsSent, #UT_EventIsInHistory, -** \sa #UT_Report -** ******************************************************************************/ void Test_SB_Cmds_PipeInfoSpec(void); @@ -925,10 +727,6 @@ void Test_SB_Cmds_PipeInfoSpec(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #UT_SetOSFail, #CFE_SB_SendPipeInfo, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_SB_Cmds_PipeInfoCreateFail(void); @@ -946,10 +744,6 @@ void Test_SB_Cmds_PipeInfoCreateFail(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #UT_SetRtnCode, #CFE_SB_SendPipeInfo, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_SB_Cmds_PipeInfoHdrFail(void); @@ -967,11 +761,6 @@ void Test_SB_Cmds_PipeInfoHdrFail(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #UT_SetRtnCode, -** \sa #CFE_SB_SendPipeInfo, #UT_GetNumEventsSent, #UT_EventIsInHistory, -** \sa #CFE_SB_DeletePipe, #UT_Report -** ******************************************************************************/ void Test_SB_Cmds_PipeInfoWriteFail(void); @@ -988,12 +777,6 @@ void Test_SB_Cmds_PipeInfoWriteFail(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_SetCmdCode, -** \sa #CFE_SB_CreatePipe, #CFE_SB_Subscribe, #CFE_SB_ProcessCmdPipePkt, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #CFE_SB_DeletePipe, -** \sa #UT_Report -** ******************************************************************************/ void Test_SB_Cmds_MapInfoDef(void); @@ -1010,11 +793,6 @@ void Test_SB_Cmds_MapInfoDef(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_SetCmdCode, -** \sa #CFE_SB_ProcessCmdPipePkt, #UT_GetNumEventsSent, #UT_EventIsInHistory, -** \sa #UT_Report -** ******************************************************************************/ void Test_SB_Cmds_MapInfoSpec(void); @@ -1031,10 +809,6 @@ void Test_SB_Cmds_MapInfoSpec(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #UT_SetOSFail, #CFE_SB_SendMapInfo, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_SB_Cmds_MapInfoCreateFail(void); @@ -1051,10 +825,6 @@ void Test_SB_Cmds_MapInfoCreateFail(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #UT_SetRtnCode, #CFE_SB_SendMapInfo, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_SB_Cmds_MapInfoHdrFail(void); @@ -1072,11 +842,6 @@ void Test_SB_Cmds_MapInfoHdrFail(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_Subscribe, -** \sa #UT_SetRtnCode, #CFE_SB_SendMapInfo, #UT_GetNumEventsSent, -** \sa #UT_EventIsInHistory, #CFE_SB_DeletePipe, #UT_Report -** ******************************************************************************/ void Test_SB_Cmds_MapInfoWriteFail(void); @@ -1093,12 +858,6 @@ void Test_SB_Cmds_MapInfoWriteFail(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_Subscribe, -** \sa #CFE_SB_InitMsg, #CFE_SB_SetCmdCode, #CFE_SB_ProcessCmdPipePkt, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #CFE_SB_DeletePipe, -** \sa #UT_Report -** ******************************************************************************/ void Test_SB_Cmds_EnRouteValParam(void); @@ -1116,12 +875,6 @@ void Test_SB_Cmds_EnRouteValParam(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_Subscribe, -** \sa #CFE_SB_InitMsg, #CFE_SB_SetCmdCode, #CFE_SB_ProcessCmdPipePkt, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #CFE_SB_DeletePipe, -** \sa #UT_Report -** ******************************************************************************/ void Test_SB_Cmds_EnRouteNonExist(void); @@ -1138,11 +891,6 @@ void Test_SB_Cmds_EnRouteNonExist(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_SetCmdCode, -** \sa #CFE_SB_ProcessCmdPipePkt, #UT_GetNumEventsSent, #UT_EventIsInHistory, -** \sa #UT_Report -** ******************************************************************************/ void Test_SB_Cmds_EnRouteInvParam(void); @@ -1159,11 +907,6 @@ void Test_SB_Cmds_EnRouteInvParam(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_SetCmdCode, -** \sa #CFE_SB_ProcessCmdPipePkt, #UT_GetNumEventsSent, #UT_EventIsInHistory, -** \sa #UT_Report -** ******************************************************************************/ void Test_SB_Cmds_EnRouteInvParam2(void); @@ -1182,11 +925,6 @@ void Test_SB_Cmds_EnRouteInvParam2(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_SetCmdCode, -** \sa #CFE_SB_ProcessCmdPipePkt, #UT_GetNumEventsSent, #UT_EventIsInHistory, -** \sa #UT_Report -** ******************************************************************************/ void Test_SB_Cmds_EnRouteInvParam3(void); @@ -1203,12 +941,6 @@ void Test_SB_Cmds_EnRouteInvParam3(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_Subscribe, -** \sa #CFE_SB_InitMsg, #CFE_SB_SetCmdCode, #CFE_SB_ProcessCmdPipePkt, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #CFE_SB_DeletePipe, -** \sa #UT_Report -** ******************************************************************************/ void Test_SB_Cmds_DisRouteValParam(void); @@ -1225,12 +957,6 @@ void Test_SB_Cmds_DisRouteValParam(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_Subscribe, -** \sa #CFE_SB_InitMsg, #CFE_SB_SetCmdCode, #CFE_SB_ProcessCmdPipePkt, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #CFE_SB_DeletePipe, -** \sa #UT_Report -** ******************************************************************************/ void Test_SB_Cmds_DisRouteNonExist(void); @@ -1247,11 +973,6 @@ void Test_SB_Cmds_DisRouteNonExist(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_SetCmdCode, -** \sa #CFE_SB_ProcessCmdPipePkt, #UT_GetNumEventsSent, #UT_EventIsInHistory, -** \sa #UT_Report -** ******************************************************************************/ void Test_SB_Cmds_DisRouteInvParam(void); @@ -1268,11 +989,6 @@ void Test_SB_Cmds_DisRouteInvParam(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_SetCmdCode, -** \sa #CFE_SB_ProcessCmdPipePkt, #UT_GetNumEventsSent, #UT_EventIsInHistory, -** \sa #UT_Report -** ******************************************************************************/ void Test_SB_Cmds_DisRouteInvParam2(void); @@ -1291,11 +1007,6 @@ void Test_SB_Cmds_DisRouteInvParam2(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_SetCmdCode, -** \sa #CFE_SB_ProcessCmdPipePkt, #UT_GetNumEventsSent, #UT_EventIsInHistory, -** \sa #UT_Report -** ******************************************************************************/ void Test_SB_Cmds_DisRouteInvParam3(void); @@ -1311,10 +1022,6 @@ void Test_SB_Cmds_DisRouteInvParam3(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_ProcessCmdPipePkt, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_SB_Cmds_SendHK(void); @@ -1332,12 +1039,6 @@ void Test_SB_Cmds_SendHK(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_SetCmdCode, -** \sa #CFE_SB_CreatePipe, #CFE_SB_Subscribe, #CFE_SB_SubscribeLocal, -** \sa #CFE_SB_ProcessCmdPipePkt, #UT_GetNumEventsSent, #UT_EventIsInHistory, -** \sa #CFE_SB_DeletePipe, #UT_Report -** ******************************************************************************/ void Test_SB_Cmds_SendPrevSubs(void); @@ -1353,10 +1054,6 @@ void Test_SB_Cmds_SendPrevSubs(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_SetCmdCode, -** \sa #CFE_SB_ProcessCmdPipePkt, #UT_GetNumEventsSent, #UT_Report -** ******************************************************************************/ void Test_SB_Cmds_SubRptOn(void); @@ -1372,10 +1069,6 @@ void Test_SB_Cmds_SubRptOn(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_SetCmdCode, -** \sa #CFE_SB_ProcessCmdPipePkt, #UT_GetNumEventsSent, #UT_Report -** ******************************************************************************/ void Test_SB_Cmds_SubRptOff(void); @@ -1392,11 +1085,6 @@ void Test_SB_Cmds_SubRptOff(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_SetCmdCode, -** \sa #CFE_SB_ProcessCmdPipePkt, #UT_GetNumEventsSent, #UT_EventIsInHistory, -** \sa #UT_Report -** ******************************************************************************/ void Test_SB_Cmds_CmdUnexpCmdCode(void); @@ -1413,11 +1101,6 @@ void Test_SB_Cmds_CmdUnexpCmdCode(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_SetCmdCode, -** \sa #CFE_SB_ProcessCmdPipePkt, #UT_GetNumEventsSent, #UT_EventIsInHistory, -** \sa #UT_Report -** ******************************************************************************/ void Test_SB_Cmds_SubRptUnexpCmdCode(void); @@ -1434,11 +1117,6 @@ void Test_SB_Cmds_SubRptUnexpCmdCode(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_SetCmdCode, -** \sa #CFE_SB_ProcessCmdPipePkt, #UT_GetNumEventsSent, #UT_EventIsInHistory, -** \sa #UT_Report -** ******************************************************************************/ void Test_SB_Cmds_BadCmdLength(void); @@ -1455,10 +1133,6 @@ void Test_SB_Cmds_BadCmdLength(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_ProcessCmdPipePkt, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_SB_Cmds_UnexpMsgId(void); @@ -1476,9 +1150,6 @@ void Test_SB_Cmds_UnexpMsgId(void); ** ** \returns ** This function does not return a value. -** -** \sa #Test_SB_EarlyInit, #Test_SB_APIs, #Test_SB_Utils -** ******************************************************************************/ void Test_SB_Lib(void); @@ -1494,10 +1165,6 @@ void Test_SB_Lib(void); ** ** \returns ** This function does not return a value. -** -** \sa #Test_SB_EarlyInit_SemCreateError, -** \sa #Test_SB_EarlyInit_PoolCreateError, #Test_SB_EarlyInit_NoErrors -** ******************************************************************************/ void Test_SB_EarlyInit(void); @@ -1514,9 +1181,6 @@ void Test_SB_EarlyInit(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #UT_SetRtnCode, #UT_Report -** ******************************************************************************/ void Test_SB_EarlyInit_SemCreateError(void); @@ -1533,9 +1197,6 @@ void Test_SB_EarlyInit_SemCreateError(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #UT_SetRtnCode, #UT_Report -** ******************************************************************************/ void Test_SB_EarlyInit_PoolCreateError(void); @@ -1551,9 +1212,6 @@ void Test_SB_EarlyInit_PoolCreateError(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_EarlyInit, #UT_Report -** ******************************************************************************/ void Test_SB_EarlyInit_NoErrors(void); @@ -1569,11 +1227,6 @@ void Test_SB_EarlyInit_NoErrors(void); ** ** \returns ** This function does not return a value. -** -** \sa #Test_CreatePipe_API, #Test_DeletePipe_API, #Test_Subscribe_API, -** \sa #Test_Unsubscribe_API, #Test_SendMsg_API, #Test_RcvMsg_API, -** \sa #Test_CleanupApp_API -** ******************************************************************************/ void Test_SB_APIs(void); @@ -1589,12 +1242,6 @@ void Test_SB_APIs(void); ** ** \returns ** This function does not return a value. -** -** \sa #Test_CreatePipe_NullPtr, #Test_CreatePipe_ValPipeDepth, -** \sa #Test_CreatePipe_InvalPipeDepth, #Test_CreatePipe_EmptyPipeName, -** \sa #Test_CreatePipe_LongPipeName, #Test_CreatePipe_SamePipeName, -** \sa #Test_CreatePipe_MaxPipes -** ******************************************************************************/ void Test_CreatePipe_API(void); @@ -1611,10 +1258,6 @@ void Test_CreatePipe_API(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #UT_SetRtnCode, #CFE_SB_CreatePipe, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_CreatePipe_NullPtr(void); @@ -1630,10 +1273,6 @@ void Test_CreatePipe_NullPtr(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #UT_SetRtnCode, #CFE_SB_CreatePipe, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_CreatePipe_ValPipeDepth(void); @@ -1649,10 +1288,6 @@ void Test_CreatePipe_ValPipeDepth(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #UT_SetRtnCode, #CFE_SB_CreatePipe, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_CreatePipe_InvalPipeDepth(void); @@ -1668,10 +1303,6 @@ void Test_CreatePipe_InvalPipeDepth(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #UT_GetNumEventsSent, -** \sa #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_CreatePipe_EmptyPipeName(void); @@ -1688,10 +1319,6 @@ void Test_CreatePipe_EmptyPipeName(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #UT_GetNumEventsSent, -** \sa #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_CreatePipe_LongPipeName(void); @@ -1707,10 +1334,6 @@ void Test_CreatePipe_LongPipeName(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #UT_GetNumEventsSent, -** \sa #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_CreatePipe_SamePipeName(void); @@ -1726,10 +1349,6 @@ void Test_CreatePipe_SamePipeName(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #UT_GetNumEventsSent, -** \sa #CFE_SB_DeletePipe, #UT_Report -** ******************************************************************************/ void Test_CreatePipe_MaxPipes(void); @@ -1745,11 +1364,6 @@ void Test_CreatePipe_MaxPipes(void); ** ** \returns ** This function does not return a value. -** -** \sa #Test_DeletePipe_NoSubs, #Test_DeletePipe_WithSubs, -** \sa #Test_DeletePipe_InvalidPipeId, #Test_DeletePipe_InvalidPipeOwner, -** \sa #Test_DeletePipe_WithAppid -** ******************************************************************************/ void Test_DeletePipe_API(void); @@ -1766,10 +1380,6 @@ void Test_DeletePipe_API(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_DeletePipe, #UT_GetNumEventsSent, -** \sa #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_DeletePipe_NoSubs(void); @@ -1786,10 +1396,6 @@ void Test_DeletePipe_NoSubs(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_DeletePipe, #UT_GetNumEventsSent, -** \sa #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_DeletePipe_WithSubs(void); @@ -1805,10 +1411,6 @@ void Test_DeletePipe_WithSubs(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_DeletePipe, #UT_GetNumEventsSent, -** \sa #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_DeletePipe_InvalidPipeId(void); @@ -1825,10 +1427,6 @@ void Test_DeletePipe_InvalidPipeId(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, CFE_SB_CreatePipe, #CFE_SB_DeletePipe, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_DeletePipe_InvalidPipeOwner(void); @@ -1844,10 +1442,6 @@ void Test_DeletePipe_InvalidPipeOwner(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_Subscribe, -** \sa #CFE_SB_DeletePipeWithAppId, #UT_GetNumEventsSent, #UT_Report -** ******************************************************************************/ void Test_DeletePipe_WithAppid(void); @@ -1863,15 +1457,6 @@ void Test_DeletePipe_WithAppid(void); ** ** \returns ** This function does not return a value. -** -** \sa #Test_Subscribe_SubscribeEx, #Test_Subscribe_InvalidPipeId, -** \sa #Test_Subscribe_InvalidMsgId, #Test_Subscribe_MaxMsgLim, -** \sa #Test_Subscribe_DuplicateSubscription, -** \sa #Test_Subscribe_LocalSubscription, #Test_Subscribe_MaxDestCount, -** \sa #Test_Subscribe_MaxMsgIdCount, #Test_Subscribe_SendPrevSubs, -** \sa #Test_Subscribe_FindGlobalMsgIdCnt, #Test_Subscribe_PipeNonexistent, -** \sa #Test_Subscribe_SubscriptionReporting, #Test_Subscribe_InvalidPipeOwner -** ******************************************************************************/ void Test_Subscribe_API(void); @@ -1887,11 +1472,6 @@ void Test_Subscribe_API(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_SubscribeEx, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #CFE_SB_DeletePipe, -** \sa #UT_Report -** ******************************************************************************/ void Test_Subscribe_SubscribeEx(void); @@ -1908,10 +1488,6 @@ void Test_Subscribe_SubscribeEx(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_Subscribe, #UT_GetNumEventsSent, -** \sa #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_Subscribe_InvalidPipeId(void); @@ -1928,11 +1504,6 @@ void Test_Subscribe_InvalidPipeId(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_Subscribe, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #CFE_SB_DeletePipe, -** \sa #UT_Report -** ******************************************************************************/ void Test_Subscribe_InvalidMsgId(void); @@ -1949,11 +1520,6 @@ void Test_Subscribe_InvalidMsgId(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_SubscribeEx, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #CFE_SB_DeletePipe, -** \sa #UT_Report -** ******************************************************************************/ void Test_Subscribe_MaxMsgLim(void); @@ -1970,11 +1536,6 @@ void Test_Subscribe_MaxMsgLim(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_Subscribe, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #CFE_SB_DeletePipe, -** \sa #UT_Report -** ******************************************************************************/ void Test_Subscribe_DuplicateSubscription(void); @@ -1990,11 +1551,6 @@ void Test_Subscribe_DuplicateSubscription(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_SubscribeLocal, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #CFE_SB_DeletePipe, -** \sa #UT_Report -** ******************************************************************************/ void Test_Subscribe_LocalSubscription(void); @@ -2012,11 +1568,6 @@ void Test_Subscribe_LocalSubscription(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_Subscribe, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #CFE_SB_DeletePipe, -** \sa #UT_Report -** ******************************************************************************/ void Test_Subscribe_MaxDestCount(void); @@ -2034,10 +1585,6 @@ void Test_Subscribe_MaxDestCount(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_Subscribe, -** \sa #UT_EventIsInHistory, #CFE_SB_DeletePipe, #UT_Report -** ******************************************************************************/ void Test_Subscribe_MaxMsgIdCount(void); @@ -2054,11 +1601,6 @@ void Test_Subscribe_MaxMsgIdCount(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_Subscribe, -** \sa #CFE_SB_SendPrevSubs, #UT_GetNumEventsSent, #UT_EventIsInHistory, -** \sa #CFE_SB_DeletePipe, #UT_Report -** ******************************************************************************/ void Test_Subscribe_SendPrevSubs(void); @@ -2075,12 +1617,6 @@ void Test_Subscribe_SendPrevSubs(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_Subscribe, -** \sa #CFE_SB_SubscribeLocal, #CFE_SB_FindGlobalMsgIdCnt, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #CFE_SB_DeletePipe, -** \sa #UT_Report -** ******************************************************************************/ void Test_Subscribe_FindGlobalMsgIdCnt(void); @@ -2097,10 +1633,6 @@ void Test_Subscribe_FindGlobalMsgIdCnt(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_Subscribe, UT_GetNumEventsSent, -** \sa #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_Subscribe_PipeNonexistent(void); @@ -2116,12 +1648,6 @@ void Test_Subscribe_PipeNonexistent(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, -** \sa #CFE_SB_SetSubscriptionReporting, #CFE_SB_Subscribe, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #CFE_SB_DeletePipe, -** \sa UT_Report -** ******************************************************************************/ void Test_Subscribe_SubscriptionReporting(void); @@ -2138,10 +1664,6 @@ void Test_Subscribe_SubscriptionReporting(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_Subscribe, -** \sa #UT_EventIsInHistory, #CFE_SB_DeletePipe, #UT_Report -** ******************************************************************************/ void Test_Subscribe_InvalidPipeOwner(void); @@ -2157,13 +1679,6 @@ void Test_Subscribe_InvalidPipeOwner(void); ** ** \returns ** This function does not return a value. -** -** \sa #Test_Unsubscribe_Basic, #Test_Unsubscribe_Local, -** \sa #Test_Unsubscribe_InvalParam, #Test_Unsubscribe_NoMatch, -** \sa #Test_Unsubscribe_SubscriptionReporting, #Test_Unsubscribe_InvalidPipe, -** \sa #Test_Unsubscribe_InvalidPipeOwner, #Test_Unsubscribe_FirstDestWithMany, -** \sa #Test_Unsubscribe_MiddleDestWithMany, #Test_Unsubscribe_GetDestPtr -** ******************************************************************************/ void Test_Unsubscribe_API(void); @@ -2179,11 +1694,6 @@ void Test_Unsubscribe_API(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_Subscribe, -** \sa #CFE_SB_Unsubscribe, #UT_GetNumEventsSent, #UT_EventIsInHistory, -** \sa #CFE_SB_DeletePipe, #UT_Report -** ******************************************************************************/ void Test_Unsubscribe_Basic(void); @@ -2201,11 +1711,6 @@ void Test_Unsubscribe_Basic(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_Subscribe, -** \sa #CFE_SB_UnsubscribeLocal, #UT_GetNumEventsSent, #UT_EventIsInHistory, -** \sa #CFE_SB_DeletePipe, #UT_Report -** ******************************************************************************/ void Test_Unsubscribe_Local(void); @@ -2222,11 +1727,6 @@ void Test_Unsubscribe_Local(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_UnSubscribe, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #CFE_SB_DeletePipe, -** \sa #UT_Report -** ******************************************************************************/ void Test_Unsubscribe_InvalParam(void); @@ -2244,11 +1744,6 @@ void Test_Unsubscribe_InvalParam(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_Subscribe, -** \sa #CFE_SB_Unsubscribe, #UT_GetNumEventsSent, #UT_EventIsInHistory, -** \sa #CFE_SB_DeletePipe, #UT_Report -** ******************************************************************************/ void Test_Unsubscribe_NoMatch(void); @@ -2266,12 +1761,6 @@ void Test_Unsubscribe_NoMatch(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_Subscribe, -** \sa #CFE_SB_SetSubscriptionReporting, #CFE_SB_Unsubscribe, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #CFE_SB_DeletePipe, -** \sa #UT_Report -** ******************************************************************************/ void Test_Unsubscribe_SubscriptionReporting(void); @@ -2288,11 +1777,6 @@ void Test_Unsubscribe_SubscriptionReporting(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_Subscribe, -** \sa #CFE_SB_Unsubscribe, #UT_GetNumEventsSent, #UT_EventIsInHistory, -** \sa #CFE_SB_DeletePipe, #UT_Report -** ******************************************************************************/ void Test_Unsubscribe_InvalidPipe(void); @@ -2309,11 +1793,6 @@ void Test_Unsubscribe_InvalidPipe(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_Subscribe, -** \sa #CFE_SB_Unsubscribe, #UT_GetNumEventsSent, #UT_EventIsInHistory, -** \sa #CFE_SB_DeletePipe, #UT_Report -** ******************************************************************************/ void Test_Unsubscribe_InvalidPipeOwner(void); @@ -2331,11 +1810,6 @@ void Test_Unsubscribe_InvalidPipeOwner(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_Subscribe, -** \sa #CFE_SB_Unsubscribe, #UT_GetNumEventsSent, #UT_EventIsInHistory, -** \sa #CFE_SB_DeletePipe, #UT_Report -** ******************************************************************************/ void Test_Unsubscribe_FirstDestWithMany(void); @@ -2353,11 +1827,6 @@ void Test_Unsubscribe_FirstDestWithMany(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_Subscribe, -** \sa #CFE_SB_Unsubscribe, #UT_GetNumEventsSent, #UT_EventIsInHistory, -** \sa #CFE_SB_DeletePipe, #UT_Report -** ******************************************************************************/ void Test_Unsubscribe_MiddleDestWithMany(void); @@ -2375,11 +1844,6 @@ void Test_Unsubscribe_MiddleDestWithMany(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_Subscribe, -** \sa #CFE_SB_Unsubscribe, #CFE_SB_GetDestPtr, #UT_GetNumEventsSent, -** \sa #UT_EventIsInHistory, #CFE_SB_DeletePipe, #UT_Report -** ******************************************************************************/ void Test_Unsubscribe_GetDestPtr(void); @@ -2395,16 +1859,6 @@ void Test_Unsubscribe_GetDestPtr(void); ** ** \returns ** This function does not return a value. -** -** \sa #Test_SendMsg_NullPtr, #Test_SendMsg_InvalidMsgId, -** \sa #Test_SendMsg_NoSubscribers, #Test_SendMsg_MaxMsgSizePlusOne, -** \sa #Test_SendMsg_BasicSend, #Test_SendMsg_SequenceCount, -** \sa #Test_SendMsg_QueuePutError, #Test_SendMsg_PipeFull, -** \sa #Test_SendMsg_MsgLimitExceeded, #Test_SendMsg_GetPoolBufErr, -** \sa #Test_SendMsg_ZeroCopyGetPtr, #Test_SendMsg_ZeroCopySend, -** \sa #Test_SendMsg_ZeroCopyPass, #Test_SendMsg_ZeroCopyReleasePtr, -** \sa #Test_SendMsg_DisabledDestination, #Test_SendMsg_SendWithMetadata -** ******************************************************************************/ void Test_SendMsg_API(void); @@ -2421,10 +1875,6 @@ void Test_SendMsg_API(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_SendMsg, #UT_GetNumEventsSent, -** \sa #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_SendMsg_NullPtr(void); @@ -2441,10 +1891,6 @@ void Test_SendMsg_NullPtr(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_SendMsg, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_SendMsg_InvalidMsgId(void); @@ -2461,10 +1907,6 @@ void Test_SendMsg_InvalidMsgId(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_SendMsg, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_SendMsg_NoSubscribers(void); @@ -2482,10 +1924,6 @@ void Test_SendMsg_NoSubscribers(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_SendMsg, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_SendMsg_MaxMsgSizePlusOne(void); @@ -2502,11 +1940,6 @@ void Test_SendMsg_MaxMsgSizePlusOne(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_Subscribe, -** \sa #CFE_SB_InitMsg, #CFE_SB_SendMsg, #UT_GetNumEventsSent, -** \sa #CFE_SB_DeletePipe, #UT_Report -** ******************************************************************************/ void Test_SendMsg_BasicSend(void); @@ -2523,12 +1956,6 @@ void Test_SendMsg_BasicSend(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_InitMsg, -** \sa #CFE_SB_Subscribe, #CCSDS_WR_SEQ, #CFE_SB_SendMsg, #CFE_SB_RcvMsg, -** \sa #CCSDS_RD_SEQ, #CFE_SB_PassMsg, #UT_GetNumEventsSent, -** \sa #UT_EventIsInHistory, #CFE_SB_DeletePipe, #UT_Report -** ******************************************************************************/ void Test_SendMsg_SequenceCount(void); @@ -2545,11 +1972,6 @@ void Test_SendMsg_SequenceCount(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_Subscribe, -** \sa #CFE_SB_InitMsg, #CFE_SB_SendMsg, #UT_GetNumEventsSent, -** \sa #CFE_SB_DeletePipe, #UT_Report -** ******************************************************************************/ void Test_SendMsg_QueuePutError(void); @@ -2566,11 +1988,6 @@ void Test_SendMsg_QueuePutError(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_CreatePipe, -** \sa #CFE_SB_Subscribe, #CFE_SB_SendMsg, #UT_GetNumEventsSent, -** \sa #CFE_SB_DeletePipe, #UT_Report -** ******************************************************************************/ void Test_SendMsg_PipeFull(void); @@ -2587,11 +2004,6 @@ void Test_SendMsg_PipeFull(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_CreatePipe, -** \sa #CFE_SB_SubscribeEx, #CFE_SB_SendMsg, #UT_GetNumEventsSent, -** \sa #CFE_SB_DeletePipe, #UT_Report -** ******************************************************************************/ void Test_SendMsg_MsgLimitExceeded(void); @@ -2608,11 +2020,6 @@ void Test_SendMsg_MsgLimitExceeded(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_CreatePipe, -** \sa #CFE_SB_Subscribe, #UT_SetRtnCode, #CFE_SB_SendMsg, -** \sa #UT_GetNumEventsSent, #CFE_SB_DeletePipe, #UT_Report -** ******************************************************************************/ void Test_SendMsg_GetPoolBufErr(void); @@ -2630,10 +2037,6 @@ void Test_SendMsg_GetPoolBufErr(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #UT_SetRtnCode, #CFE_SB_ZeroCopyGetPtr, -** \sa #UT_GetNumEventsSent, #UT_Report -** ******************************************************************************/ void Test_SendMsg_ZeroCopyGetPtr(void); @@ -2651,13 +2054,6 @@ void Test_SendMsg_ZeroCopyGetPtr(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_Subscribe, -** \sa #CFE_SB_ZeroCopyGetPtr, #CFE_SB_InitMsg, #CCSDS_WR_SEQ, -** \sa #CFE_SB_ZeroCopySend, #CFE_SB_RcvMsg, #CCSDS_RD_SEQ, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #CFE_SB_DeletePipe, -** \sa #UT_Report -** ******************************************************************************/ void Test_SendMsg_ZeroCopySend(void); @@ -2675,13 +2071,6 @@ void Test_SendMsg_ZeroCopySend(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_Subscribe, -** \sa #CFE_SB_ZeroCopyGetPtr, #CFE_SB_InitMsg, #CCSDS_WR_SEQ, -** \sa #CFE_SB_ZeroCopyPass, #CFE_SB_RcvMsg, #CCSDS_RD_SEQ, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #CFE_SB_DeletePipe, -** \sa #UT_Report -** ******************************************************************************/ void Test_SendMsg_ZeroCopyPass(void); @@ -2698,11 +2087,6 @@ void Test_SendMsg_ZeroCopyPass(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_ZeroCopyGetPtr, -** \sa #CFE_SB_ZeroCopyReleasePtr, #UT_SetRtnCode, #UT_GetNumEventsSent, -** \sa #UT_Report -** ******************************************************************************/ void Test_SendMsg_ZeroCopyReleasePtr(void); @@ -2719,12 +2103,6 @@ void Test_SendMsg_ZeroCopyReleasePtr(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_Subscribe, -** \sa #CFE_SB_GetDestPtr, #CFE_SB_InitMsg, #CFE_SB_SendMsg, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #CFE_SB_DeletePipe, -** \sa #UT_Report -** ******************************************************************************/ void Test_SendMsg_DisabledDestination(void); @@ -2740,11 +2118,6 @@ void Test_SendMsg_DisabledDestination(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_Subscribe, -** \sa #CFE_SB_InitMsg, #CFE_SB_SendMsgFull, #UT_GetNumEventsSent, -** \sa #CFE_SB_DeletePipe, #UT_Report -** ******************************************************************************/ void Test_SendMsg_SendWithMetadata(void); @@ -2762,10 +2135,6 @@ void Test_SendMsg_SendWithMetadata(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_SendMsg, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_SendMsg_InvalidMsgId_ZeroCopy(void); @@ -2783,10 +2152,6 @@ void Test_SendMsg_InvalidMsgId_ZeroCopy(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_SendMsg, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_SendMsg_NoSubscribers_ZeroCopy(void); @@ -2804,10 +2169,6 @@ void Test_SendMsg_NoSubscribers_ZeroCopy(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_SendMsg, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_SendMsg_MaxMsgSizePlusOne_ZeroCopy(void); @@ -2823,11 +2184,6 @@ void Test_SendMsg_MaxMsgSizePlusOne_ZeroCopy(void); ** ** \returns ** This function does not return a value. -** -** \sa #Test_RcvMsg_InvalidPipeId, #Test_RcvMsg_InvalidTimeout, -** \sa #Test_RcvMsg_Poll, #Test_RcvMsg_Timeout, -** \sa #Test_RcvMsg_PipeReadError, #Test_RcvMsg_PendForever -** ******************************************************************************/ void Test_RcvMsg_API(void); @@ -2845,10 +2201,6 @@ void Test_RcvMsg_API(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_RcvMsg, #UT_GetNumEventsSent, -** \sa #UT_EventIsInHistory, #UT_Report -** ******************************************************************************/ void Test_RcvMsg_InvalidPipeId(void); @@ -2865,11 +2217,6 @@ void Test_RcvMsg_InvalidPipeId(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_RcvMsg, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #CFE_SB_DeletePipe, -** \sa #UT_Report -** ******************************************************************************/ void Test_RcvMsg_InvalidTimeout(void); @@ -2887,11 +2234,6 @@ void Test_RcvMsg_InvalidTimeout(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_RcvMsg, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #CFE_SB_DeletePipe, -** \sa #UT_Report -** ******************************************************************************/ void Test_RcvMsg_Poll(void); @@ -2907,11 +2249,6 @@ void Test_RcvMsg_Poll(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #UT_SetRtnCode, -** \sa #CFE_SB_RcvMsg, #UT_GetNumEventsSent, #UT_EventIsInHistory, -** \sa #CFE_SB_DeletePipe, #UT_Report -** ******************************************************************************/ void Test_RcvMsg_Timeout(void); @@ -2928,11 +2265,6 @@ void Test_RcvMsg_Timeout(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_RcvMsg, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #CFE_SB_DeletePipe, -** \sa #UT_Report -** ******************************************************************************/ void Test_RcvMsg_PipeReadError(void); @@ -2949,12 +2281,6 @@ void Test_RcvMsg_PipeReadError(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_InitMsg, -** \sa #CFE_SB_Subscribe, #CFE_SB_SendMsg, #CFE_SB_RcvMsg, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #CFE_SB_DeletePipe, -** \sa #UT_Report -** ******************************************************************************/ void Test_RcvMsg_PendForever(void); @@ -2971,11 +2297,6 @@ void Test_RcvMsg_PendForever(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_RcvMsg, -** \sa #UT_GetNumEventsSent, #UT_EventIsInHistory, #CFE_SB_DeletePipe, -** \sa #UT_Report -** ******************************************************************************/ void Test_RcvMsg_InvalidBufferPtr(void); @@ -2993,11 +2314,6 @@ void Test_RcvMsg_InvalidBufferPtr(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_ZeroCopyGetPtr, -** \sa #CFE_SB_CleanUpApp, #UT_GetNumEventsSent, #UT_EventIsInHistory, -** \sa #UT_Report -** ******************************************************************************/ void Test_CleanupApp_API(void); @@ -3013,32 +2329,9 @@ void Test_CleanupApp_API(void); ** ** \returns ** This function does not return a value. -** -** \sa #Test_CFE_SB_InitMsg, #Test_CFE_SB_MsgHdrSize, -** \sa #Test_CFE_SB_GetUserData, #Test_CFE_SB_SetGetMsgId, -** \sa #Test_CFE_SB_SetGetUserDataLength, #Test_CFE_SB_SetGetTotalMsgLength, -** \sa #Test_CFE_SB_SetGetMsgTime, -** \sa #Test_CFE_SB_SetGetCmdCode, #Test_CFE_SB_ChecksumUtils -** ******************************************************************************/ void Test_SB_Utils(void); -/*****************************************************************************/ -/** -** \brief Function for calling SB init message test functions -** -** \par Description -** Function for calling SB init message test functions. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \returns -** This function does not return a value. -** -******************************************************************************/ -void Test_CFE_SB_InitMsg(void); - /*****************************************************************************/ /** ** \brief Test getting the size of a message header @@ -3052,9 +2345,6 @@ void Test_CFE_SB_InitMsg(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_MsgHdrSize, #UT_Report -** ******************************************************************************/ void Test_CFE_SB_MsgHdrSize(void); @@ -3071,32 +2361,9 @@ void Test_CFE_SB_MsgHdrSize(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_SetMsgId, #CFE_SB_GetUserData, -** \sa #UT_Report -** ******************************************************************************/ void Test_CFE_SB_GetUserData(void); -/*****************************************************************************/ -/** -** \brief Test setting and getting the message ID of a message -** -** \par Description -** This function tests setting and getting the message ID of a message. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \returns -** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_SetMsgId, #CFE_SB_GetMsgId, -** \sa #UT_Report -** -******************************************************************************/ -void Test_CFE_SB_SetGetMsgId(void); - /*****************************************************************************/ /** ** \brief Test setting and getting the user data size of a message @@ -3110,88 +2377,9 @@ void Test_CFE_SB_SetGetMsgId(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_SetMsgId, -** \sa #CFE_SB_SetUserDataLength, #CFE_SB_GetUserDataLength, -** ******************************************************************************/ void Test_CFE_SB_SetGetUserDataLength(void); -/*****************************************************************************/ -/** -** \brief Test setting and getting the total message size -** -** \par Description -** This function tests setting and getting the total message size. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \returns -** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_SetMsgId, -** \sa #CFE_SB_SetTotalMsgLength, #CFE_SB_GetTotalMsgLength, -** -******************************************************************************/ -void Test_CFE_SB_SetGetTotalMsgLength(void); - -/*****************************************************************************/ -/** -** \brief Test setting and getting the message time field -** -** \par Description -** This function tests setting and getting the message time field. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \returns -** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_SetMsgId, #CFE_SB_SetMsgTime, -** \sa #CFE_SB_GetMsgTime, #UT_DisplayPkt, #UT_Report -** -******************************************************************************/ -void Test_CFE_SB_SetGetMsgTime(void); - -/*****************************************************************************/ -/** -** \brief Test setting and getting the opcode field of message -** -** \par Description -** This function tests setting and getting the opcode field of message. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \returns -** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_SetMsgId, #CFE_SB_SetCmdCode, -** \sa #CFE_SB_GetCmdCode, #UT_DisplayPkt -** -******************************************************************************/ -void Test_CFE_SB_SetGetCmdCode(void); - -/*****************************************************************************/ -/** -** \brief Test generating, setting, getting, and validating a checksum field -** for a message -** -** \par Description -** This function tests generating, setting, getting, and validating a -** checksum field for a message. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \returns -** This function does not return a value. -** -******************************************************************************/ -void Test_CFE_SB_ChecksumUtils(void); - /*****************************************************************************/ /** ** \brief Test validating a valid and invalid msg id @@ -3204,11 +2392,6 @@ void Test_CFE_SB_ChecksumUtils(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, -** \sa #CFE_SB_ValidateMsgId, #UT_DisplayPkt, -** \sa #UT_Report -** ******************************************************************************/ void Test_CFE_SB_ValidateMsgId(void); @@ -3224,10 +2407,6 @@ void Test_CFE_SB_ValidateMsgId(void); ** ** \returns ** This function does not return a value. -** -** \sa #Test_OS_MutSem_ErrLogic, -** \sa #Test_ReqToSendEvent_ErrLogic, #Test_PutDestBlk_ErrLogic -** ******************************************************************************/ void Test_SB_SpecialCases(void); @@ -3244,11 +2423,6 @@ void Test_SB_SpecialCases(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #UT_SetRtnCode, #CFE_SB_CreatePipe, -** \sa #CFE_SB_Subscribe, #UT_GetNumEventsSent, #UT_EventIsInHistory, -** \sa #CFE_SB_DeletePipe, #UT_Report -** ******************************************************************************/ void Test_OS_MutSem_ErrLogic(void); @@ -3264,10 +2438,6 @@ void Test_OS_MutSem_ErrLogic(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_RequestToSendEvent, -** \sa #UT_GetNumEventsSent, #UT_Report -** ******************************************************************************/ void Test_ReqToSendEvent_ErrLogic(void); @@ -3285,10 +2455,6 @@ void Test_ReqToSendEvent_ErrLogic(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_PutDestinationBlk, -** \sa #UT_GetNumEventsSent, #UT_Report -** ******************************************************************************/ void Test_PutDestBlk_ErrLogic(void); @@ -3306,10 +2472,6 @@ void Test_PutDestBlk_ErrLogic(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_GetPipeIdx, #UT_GetNumEventsSent, -** \sa #UT_Report -** ******************************************************************************/ void Test_CFE_SB_GetPipeIdx(void); @@ -3326,11 +2488,6 @@ void Test_CFE_SB_GetPipeIdx(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_GetBufferFromPool, -** \sa #CFE_SB_ReturnBufferToPool, #CFE_SB_DecrBufUseCnt, -** \sa #CFE_SB_PutDestinationBlk, #UT_GetNumEventsSent, #UT_Report -** ******************************************************************************/ void Test_CFE_SB_Buffers(void); @@ -3346,10 +2503,6 @@ void Test_CFE_SB_Buffers(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_DeletePipeFull, -** \sa #CFE_SB_SubscribeFull, #UT_GetNumEventsSent, #UT_Report -** ******************************************************************************/ void Test_CFE_SB_BadPipeInfo(void); @@ -3365,12 +2518,6 @@ void Test_CFE_SB_BadPipeInfo(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_InitMsg, #CFE_SB_ProcessCmdPipePkt, -** \sa #UT_EventIsInHistory, #CFE_SB_GetMsgId, #UT_SetRtnCode, -** \sa #UT_GetNumEventsSent, #CFE_SB_CreatePipe, #CFE_SB_Subscribe, -** \sa #CFE_SB_SendMsg, #CFE_SB_DeletePipe, #CFE_SB_SubscribeEx, #UT_Report -** ******************************************************************************/ void Test_SB_SendMsgPaths_Nominal(void); void Test_SB_SendMsgPaths_LimitErr(void); @@ -3391,12 +2538,6 @@ void Test_SB_SendMsgPaths_IgnoreOpt(void); ** ** \returns ** This function does not return a value. -** -** \sa #SB_ResetUnitTest, #CFE_SB_CreatePipe, #CFE_SB_InitMsg, -** \sa #CFE_SB_Subscribe, #CFE_SB_SendMsg, #CFE_SB_Unsubscribe, -** \sa #CFE_SB_RcvMsg, #UT_GetNumEventsSent, #UT_EventIsInHistory, -** \sa #CFE_SB_DeletePipe, #UT_Report -** ******************************************************************************/ void Test_RcvMsg_UnsubResubPath(void); @@ -3413,9 +2554,6 @@ void Test_RcvMsg_UnsubResubPath(void); ** ** \returns ** This function does not return a value. -** -** \sa #UT_Report -** ******************************************************************************/ void Test_MessageString(void); diff --git a/fsw/cfe-core/unit-test/tbl_UT.c b/fsw/cfe-core/unit-test/tbl_UT.c index e395262f4..2b68d0719 100644 --- a/fsw/cfe-core/unit-test/tbl_UT.c +++ b/fsw/cfe-core/unit-test/tbl_UT.c @@ -219,8 +219,10 @@ void Test_CFE_TBL_TaskInit(void) union { CFE_TBL_NoArgsCmd_t NoArgsCmd; - CFE_SB_Msg_t Msg; + CFE_MSG_Message_t Msg; } CmdBuf; + CFE_SB_MsgId_t MsgId = CFE_SB_INVALID_MSG_ID; + CFE_MSG_FcnCode_t FcnCode = 0; UtPrintf("Begin Test Task Init"); @@ -230,6 +232,8 @@ void Test_CFE_TBL_TaskInit(void) UT_InitData(); ExitCode = 0; UT_SetDataBuffer(UT_KEY(CFE_ES_ExitApp), &ExitCode, sizeof(ExitCode), false); + UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &MsgId, sizeof(MsgId), false); + UT_SetDataBuffer(UT_KEY(CFE_MSG_GetFcnCode), &FcnCode, sizeof(FcnCode), false); CFE_TBL_TaskMain(); UT_Report(__FILE__, __LINE__, ExitCode == CFE_ES_RunStatus_CORE_APP_RUNTIME_ERROR && @@ -375,12 +379,7 @@ void Test_CFE_TBL_InitData(void) /* This function has only one possible path with no return code */ UT_InitData(); CFE_TBL_InitData(); - UT_Report(__FILE__, __LINE__, - CFE_SB_MsgId_Equal(CFE_SB_GetMsgId((CFE_SB_Msg_t*)&CFE_TBL_TaskData.HkPacket), CFE_SB_ValueToMsgId(CFE_TBL_HK_TLM_MID)) && - CFE_SB_MsgId_Equal(CFE_SB_GetMsgId((CFE_SB_Msg_t*)&CFE_TBL_TaskData.TblRegPacket), CFE_SB_ValueToMsgId(CFE_TBL_REG_TLM_MID)) && - UT_GetStubCount(UT_KEY(CFE_SB_InitMsg)) == 2, - "CFE_TBL_SearchCmdHndlrTbl", - "Initialize data"); + ASSERT_EQ(UT_GetStubCount(UT_KEY(CFE_MSG_Init)), 2); } /* diff --git a/fsw/cfe-core/unit-test/tbl_UT.h b/fsw/cfe-core/unit-test/tbl_UT.h index b22822ed5..b8044c0da 100644 --- a/fsw/cfe-core/unit-test/tbl_UT.h +++ b/fsw/cfe-core/unit-test/tbl_UT.h @@ -105,9 +105,6 @@ void UT_InitializeTableRegistryNames(void); ** ** \returns ** This function does not return a value. -** -** \sa #CFE_TBL_InitRegistryRecord -** ******************************************************************************/ void UT_ResetTableRegistry(void); @@ -123,11 +120,6 @@ void UT_ResetTableRegistry(void); ** ** \returns ** This function does not return a value. -** -** \sa #UT_InitData, #CFE_TBL_TaskMain, #UT_Report, #UT_SetRtnCode, -** \sa #CFE_TBL_TaskInit, #UT_SetSBTotalMsgLen, #CFE_SB_SetMsgId, -** \sa #CFE_SB_SetCmdCode, #CFE_TBL_TaskPipe -** ******************************************************************************/ void Test_CFE_TBL_TaskInit(void); @@ -143,9 +135,6 @@ void Test_CFE_TBL_TaskInit(void); ** ** \returns ** This function does not return a value. -** -** \sa #UT_InitData, #CFE_TBL_InitData, #UT_Report -** ******************************************************************************/ void Test_CFE_TBL_InitData(void); @@ -163,9 +152,6 @@ void Test_CFE_TBL_InitData(void); ** ** \returns ** This function does not return a value. -** -** \sa #UT_InitData, #UT_Report, #CFE_TBL_SearchCmdHndlrTbl, -** ******************************************************************************/ void Test_CFE_TBL_SearchCmdHndlrTbl(void); @@ -182,10 +168,6 @@ void Test_CFE_TBL_SearchCmdHndlrTbl(void); ** ** \returns ** This function does not return a value. -** -** \sa #UT_InitData, #UT_Report, #CFE_TBL_DeleteCDSCmd, -** \sa #UT_SetRtnCode -** ******************************************************************************/ void Test_CFE_TBL_DeleteCDSCmd(void); @@ -202,9 +184,6 @@ void Test_CFE_TBL_DeleteCDSCmd(void); ** ** \returns ** This function does not return a value. -** -** \sa #UT_InitData, #UT_Report, #CFE_TBL_SendRegistryCmd -** ******************************************************************************/ void Test_CFE_TBL_TlmRegCmd(void); @@ -221,9 +200,6 @@ void Test_CFE_TBL_TlmRegCmd(void); ** ** \returns ** This function does not return a value. -** -** \sa #UT_InitData, #UT_Report, #CFE_TBL_AbortLoadCmd -** ******************************************************************************/ void Test_CFE_TBL_AbortLoadCmd(void); @@ -239,9 +215,6 @@ void Test_CFE_TBL_AbortLoadCmd(void); ** ** \returns ** This function does not return a value. -** -** \sa #UT_InitData, #UT_Report, #CFE_TBL_ActivateCmd -** ******************************************************************************/ void Test_CFE_TBL_ActivateCmd(void); @@ -257,10 +230,6 @@ void Test_CFE_TBL_ActivateCmd(void); ** ** \returns ** This function does not return a value. -** -** \sa #UT_InitData, #UT_SetOSFail, #UT_Report, #CFE_TBL_DumpToFile, -** \sa #UT_SetRtnCode -** ******************************************************************************/ void Test_CFE_TBL_DumpToFile(void); @@ -277,9 +246,6 @@ void Test_CFE_TBL_DumpToFile(void); ** ** \returns ** This function does not return a value. -** -** \sa #UT_Report, #CFE_TBL_ResetCountersCmd -** ******************************************************************************/ void Test_CFE_TBL_ResetCmd(void); @@ -295,9 +261,6 @@ void Test_CFE_TBL_ResetCmd(void); ** ** \returns ** This function does not return a value. -** -** \sa #UT_InitData, #UT_Report, #CFE_TBL_ValidateCmd -** ******************************************************************************/ void Test_CFE_TBL_ValidateCmd(void); @@ -314,9 +277,6 @@ void Test_CFE_TBL_ValidateCmd(void); ** ** \returns ** This function does not return a value. -** -** \sa #UT_InitData, #UT_Report, #CFE_TBL_NoopCmd -** ******************************************************************************/ void Test_CFE_TBL_NoopCmd(void); @@ -334,9 +294,6 @@ void Test_CFE_TBL_NoopCmd(void); ** ** \returns ** This function does not return a value. -** -** \sa #UT_InitData, #CFE_TBL_GetTblRegData, #UT_Report -** ******************************************************************************/ void Test_CFE_TBL_GetTblRegData(void); @@ -354,9 +311,6 @@ void Test_CFE_TBL_GetTblRegData(void); ** ** \returns ** This function does not return a value. -** -** \sa #UT_InitData, #CFE_TBL_GetHkData, #UT_Report -** ******************************************************************************/ void Test_CFE_TBL_GetHkData(void); @@ -374,10 +328,6 @@ void Test_CFE_TBL_GetHkData(void); ** ** \returns ** This function does not return a value. -** -** \sa #UT_InitData, #UT_SetOSFail, #UT_Report, #CFE_TBL_DumpRegistryCmd, -** \sa #UT_SetRtnCode -** ******************************************************************************/ void Test_CFE_TBL_DumpRegCmd(void); @@ -394,9 +344,6 @@ void Test_CFE_TBL_DumpRegCmd(void); ** ** \returns ** This function does not return a value. -** -** \sa #UT_InitData, #UT_Report, #CFE_TBL_DumpCmd, #UT_SetRtnCode -** ******************************************************************************/ void Test_CFE_TBL_DumpCmd(void); @@ -414,11 +361,6 @@ void Test_CFE_TBL_DumpCmd(void); ** ** \returns ** This function does not return a value. -** -** \sa #UT_InitData, #UT_SetOSFail, #UT_Report, #CFE_TBL_LoadCmd, -** \sa #UT_SetReadBuffer, #UT_SetReadHeader, #CFE_TBL_ByteSwapUint32, -** \sa #UT_SetRtnCode -** ******************************************************************************/ void Test_CFE_TBL_LoadCmd(void); @@ -435,10 +377,6 @@ void Test_CFE_TBL_LoadCmd(void); ** ** \returns ** This function does not return a value. -** -** \sa #UT_InitData, #UT_SetRtnCode, #UT_Report, -** \sa #CFE_TBL_HousekeepingCmd, #UT_SetOSFail -** ******************************************************************************/ void Test_CFE_TBL_HousekeepingCmd(void); @@ -454,9 +392,6 @@ void Test_CFE_TBL_HousekeepingCmd(void); ** ** \returns ** This function does not return a value. -** -** \sa #UT_SetAppID, #UT_ResetCDS, #CFE_TBL_EarlyInit -** ******************************************************************************/ void Test_CFE_TBL_ApiInit(void); @@ -474,11 +409,6 @@ void Test_CFE_TBL_ApiInit(void); ** ** \returns ** This function does not return a value. -** -** \sa #UT_InitData, #UT_SetRtnCode, #CFE_TBL_Register, -** \sa #UT_EventIsInHistory, #UT_GetNumEventsSent, #UT_Report, #UT_SetAppID, -** \sa #UT_ResetTableRegistry -** ******************************************************************************/ void Test_CFE_TBL_Register(void); @@ -496,12 +426,6 @@ void Test_CFE_TBL_Register(void); ** ** \returns ** This function does not return a value. -** -** \sa #UT_InitData, #UT_SetRtnCode, #CFE_TBL_Share, -** \sa #UT_EventIsInHistory, #UT_GetNumEventsSent, #UT_Report, #UT_SetAppID, -** \sa #CFE_TBL_Unregister, #UT_SetOSFail, #CFE_TBL_ByteSwapUint32, -** \sa #UT_SetReadBuffer, #UT_SetReadHeader -** ******************************************************************************/ void Test_CFE_TBL_Share(void); @@ -519,10 +443,6 @@ void Test_CFE_TBL_Share(void); ** ** \returns ** This function does not return a value. -** -** \sa #UT_InitData, #UT_SetAppID, #CFE_TBL_Unregister, -** \sa #UT_EventIsInHistory, #UT_GetNumEventsSent, #UT_Report -** ******************************************************************************/ void Test_CFE_TBL_Unregister(void); @@ -541,11 +461,6 @@ void Test_CFE_TBL_Unregister(void); ** ** \returns ** This function does not return a value. -** -** \sa #UT_InitData, #UT_SetAppID, #UT_ResetCDS, #CFE_TBL_EarlyInit, -** \sa #UT_ResetPoolBufferIndex, #CFE_TBL_Register, #UT_GetNumEventsSent, -** \sa #UT_Report, #CFE_TBL_NotifyByMessage -** ******************************************************************************/ void Test_CFE_TBL_NotifyByMessage(void); @@ -563,13 +478,6 @@ void Test_CFE_TBL_NotifyByMessage(void); ** ** \returns ** This function does not return a value. -** -** \sa #UT_InitData, #UT_SetAppID, #UT_ResetTableRegistry, -** \sa #CFE_TBL_Register, #UT_EventIsInHistory, #UT_GetNumEventsSent, -** \sa #UT_Report, #UT_SetOSFail, #CFE_TBL_ByteSwapUint32, #UT_SetReadBuffer, -** \sa #UT_SetReadHeader, #UT_SetRtnCode, #CFE_TBL_Load, #CFE_TBL_Share, -** \sa #CFE_TBL_GetAddress, #CFE_TBL_ReleaseAddress -** ******************************************************************************/ void Test_CFE_TBL_Load(void); @@ -587,10 +495,6 @@ void Test_CFE_TBL_Load(void); ** ** \returns ** This function does not return a value. -** -** \sa #UT_InitData, #UT_SetAppID, #CFE_TBL_GetAddress, -** \sa #UT_GetNumEventsSent, #UT_Report, #UT_SetRtnCode, #CFE_TBL_Unregister -** ******************************************************************************/ void Test_CFE_TBL_GetAddress(void); @@ -608,11 +512,6 @@ void Test_CFE_TBL_GetAddress(void); ** ** \returns ** This function does not return a value. -** -** \sa #UT_InitData, #UT_SetAppID, #UT_ResetTableRegistry, -** \sa #CFE_TBL_Register, #UT_EventIsInHistory, #UT_GetNumEventsSent, -** \sa #UT_Report, #CFE_TBL_ReleaseAddress -** ******************************************************************************/ void Test_CFE_TBL_ReleaseAddress(void); @@ -630,11 +529,6 @@ void Test_CFE_TBL_ReleaseAddress(void); ** ** \returns ** This function does not return a value. -** -** \sa #UT_InitData, #UT_SetAppID, #CFE_TBL_Register, -** \sa #UT_EventIsInHistory, #UT_GetNumEventsSent, #UT_Report, -** #CFE_TBL_GetAddresses -** ******************************************************************************/ void Test_CFE_TBL_GetAddresses(void); @@ -652,10 +546,6 @@ void Test_CFE_TBL_GetAddresses(void); ** ** \returns ** This function does not return a value. -** -** \sa #UT_InitData, #UT_SetAppID, #CFE_TBL_ReleaseAddresses, -** \sa #UT_GetNumEventsSent, #UT_Report -** ******************************************************************************/ void Test_CFE_TBL_ReleaseAddresses(void); @@ -672,10 +562,6 @@ void Test_CFE_TBL_ReleaseAddresses(void); ** ** \returns ** This function does not return a value. -** -** \sa #UT_InitData, #UT_SetAppID, #CFE_TBL_Validate, -** \sa #UT_GetNumEventsSent, #UT_Report -** ******************************************************************************/ void Test_CFE_TBL_Validate(void); @@ -693,11 +579,6 @@ void Test_CFE_TBL_Validate(void); ** ** \returns ** This function does not return a value. -** -** \sa #UT_InitData, #CFE_TBL_Manage, #UT_GetNumEventsSent, -** \sa #UT_Report, #CFE_TBL_FindTableInRegistry, #CFE_TBL_GetWorkingBuffer, -** \sa #UT_SetAppID, #CFE_TBL_Load, #UT_EventIsInHistory, #UT_SetRtnCode, -** ******************************************************************************/ void Test_CFE_TBL_Manage(void); @@ -715,10 +596,6 @@ void Test_CFE_TBL_Manage(void); ** ** \returns ** This function does not return a value. -** -** \sa #UT_InitData, #UT_SetAppID, #CFE_TBL_Update, -** \sa #UT_EventIsInHistory, #UT_GetNumEventsSent, #UT_Report -** ******************************************************************************/ void Test_CFE_TBL_Update(void); @@ -736,10 +613,6 @@ void Test_CFE_TBL_Update(void); ** ** \returns ** This function does not return a value. -** -** \sa #UT_InitData, #UT_SetAppID, #CFE_TBL_GetStatus, -** \sa #UT_GetNumEventsSent, #UT_Report -** ******************************************************************************/ void Test_CFE_TBL_GetStatus(void); @@ -757,9 +630,6 @@ void Test_CFE_TBL_GetStatus(void); ** ** \returns ** This function does not return a value. -** -** \sa # -** ******************************************************************************/ void Test_CFE_TBL_GetInfo(void); @@ -777,13 +647,6 @@ void Test_CFE_TBL_GetInfo(void); ** ** \returns ** This function does not return a value. -** -** \sa #UT_InitData, #UT_SetAppID, #UT_ResetCDS, #CFE_TBL_EarlyInit, -** \sa #UT_ResetPoolBufferIndex, #CFE_TBL_Register, #UT_GetNumEventsSent, -** \sa #UT_Report, #CFE_TBL_ByteSwapUint32, #UT_SetReadBuffer, -** \sa #UT_SetReadHeader, #CFE_TBL_Load, #UT_EventIsInHistory, -** \sa #CFE_TBL_GetAddress, #CFE_TBL_Modified, #CFE_TBL_GetInfo, #UT_SetRtnCode -** ******************************************************************************/ void Test_CFE_TBL_TblMod(void); @@ -799,15 +662,6 @@ void Test_CFE_TBL_TblMod(void); ** ** \returns ** This function does not return a value. -** -** \sa #UT_InitData, #CFE_TBL_GetWorkingBuffer, #UT_GetNumEventsSent, -** \sa #UT_Report, #UT_SetRtnCode, #CFE_TBL_LoadFromFile, -** \sa #CFE_TBL_ByteSwapUint32, #UT_SetReadBuffer, #UT_SetReadHeader, -** \sa #UT_EventIsInHistory, #CFE_TBL_ReadHeaders, #CFE_TBL_Unregister, -** \sa #UT_ResetCDS, #CFE_TBL_EarlyInit, #CFE_TBL_Register, #CFE_TBL_Load, -** \sa #CFE_TBL_GetAddress, #UT_ClearEventHistory, #CFE_TBL_ReleaseAddress, -** \sa #CFE_TBL_Share, #UT_SetPutPoolFail, #CFE_TBL_CleanUpApp -** ******************************************************************************/ void Test_CFE_TBL_Internal(void); diff --git a/fsw/cfe-core/unit-test/time_UT.c b/fsw/cfe-core/unit-test/time_UT.c index bcb421230..211999e51 100644 --- a/fsw/cfe-core/unit-test/time_UT.c +++ b/fsw/cfe-core/unit-test/time_UT.c @@ -227,10 +227,16 @@ void UtTest_Setup(void) */ void Test_Main(void) { + CFE_SB_MsgId_t MsgId = CFE_SB_INVALID_MSG_ID; + UtPrintf("Begin Test Main"); /* Test successful run through (a pipe read error is expected) */ UT_InitData(); + + /* Set up buffer for first cycle, pipe failure is on 2nd */ + UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &MsgId, sizeof(MsgId), false); + CFE_TIME_TaskMain(); UT_Report(__FILE__, __LINE__, UT_SyslogIsInHistory(TIME_SYSLOG_MSGS[1]), @@ -277,7 +283,7 @@ void Test_Init(void) ExpRtn++; CFE_TIME_EarlyInit(); UT_Report(__FILE__, __LINE__, - UT_GetStubCount(UT_KEY(CFE_SB_InitMsg)) == ExpRtn, + UT_GetStubCount(UT_KEY(CFE_MSG_Init)) == ExpRtn, "CFE_TIME_EarlyInit", "Successful"); @@ -1734,7 +1740,7 @@ void Test_PipeCmds(void) { union { - CFE_SB_Msg_t message; + CFE_MSG_Message_t message; CFE_SB_CmdHdr_t cmd; CFE_TIME_ToneDataCmd_t tonedatacmd; CFE_TIME_Noop_t noopcmd; @@ -1770,8 +1776,6 @@ void Test_PipeCmds(void) /* Test sending the housekeeping telemetry request command */ UT_InitData(); - CFE_SB_InitMsg((CFE_SB_Msg_t *) &CFE_TIME_TaskData.HkPacket, LocalSnapshotData.MsgId, - sizeof(CFE_TIME_TaskData.HkPacket), false); UT_SetHookFunction(UT_KEY(CFE_SB_SendMsg), UT_SoftwareBusSnapshotHook, &LocalSnapshotData); UT_CallTaskPipe(CFE_TIME_TaskPipe, &CmdBuf.message, sizeof(CmdBuf.cmd), UT_TPID_CFE_TIME_SEND_HK); @@ -2348,7 +2352,7 @@ void Test_PipeCmds(void) /* Test response to sending a command with a bad length */ UT_InitData(); - UT_CallTaskPipe(CFE_TIME_TaskPipe, &CmdBuf.message, sizeof(CmdBuf.cmd), + UT_CallTaskPipe(CFE_TIME_TaskPipe, &CmdBuf.message, 0, UT_TPID_CFE_TIME_CMD_SET_LEAP_SECONDS_CC); UT_Report(__FILE__, __LINE__, UT_EventIsInHistory(CFE_TIME_LEN_ERR_EID), diff --git a/fsw/cfe-core/unit-test/ut_support.c b/fsw/cfe-core/unit-test/ut_support.c index b3de436ee..15e0681eb 100644 --- a/fsw/cfe-core/unit-test/ut_support.c +++ b/fsw/cfe-core/unit-test/ut_support.c @@ -215,29 +215,31 @@ void UT_Report(const char *file, uint32 line, bool test, const char *fun_name, ** This first sets up the various stubs according to the test case, ** then invokes the pipe function. */ -void UT_CallTaskPipe(void (*TaskPipeFunc)(CFE_SB_MsgPtr_t), CFE_SB_MsgPtr_t Msg, uint32 MsgSize, +void UT_CallTaskPipe(void (*TaskPipeFunc)(CFE_MSG_Message_t *), CFE_MSG_Message_t *MsgPtr, uint32 MsgSize, UT_TaskPipeDispatchId_t DispatchId) { - /* - * set the fields within the buffer itself. - * a lot of the CFE code requires this as it uses - * macros (not stubs) to read this info direct from - * the buffer. - */ - CFE_SB_SetTotalMsgLength(Msg, MsgSize); - CFE_SB_SetMsgId(Msg, DispatchId.MsgId); - CFE_SB_SetCmdCode(Msg, DispatchId.CommandCode); + /* Set up for the typical task pipe related calls */ + UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &DispatchId.MsgId, sizeof(DispatchId.MsgId), false); + UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &MsgSize, sizeof(MsgSize), false); + UT_SetDataBuffer(UT_KEY(CFE_MSG_GetFcnCode), &DispatchId.CommandCode, sizeof(DispatchId.CommandCode), false); + + /* If 0 size passed in, set buffers for calls in the command length failure reporting */ + if (MsgSize == 0) + { + UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &DispatchId.MsgId, sizeof(DispatchId.MsgId), false); + UT_SetDataBuffer(UT_KEY(CFE_MSG_GetFcnCode), &DispatchId.CommandCode, sizeof(DispatchId.CommandCode), false); + } /* * Finally, call the actual task pipe requested. */ - TaskPipeFunc(Msg); + TaskPipeFunc(MsgPtr); } int32 UT_SoftwareBusSnapshotHook(void *UserObj, int32 StubRetcode, uint32 CallCount, const UT_StubContext_t *Context) { UT_SoftwareBusSnapshot_Entry_t *Snapshot = UserObj; - const CFE_SB_Msg_t *MsgPtr; + const CFE_MSG_Message_t *MsgPtr; if (Context->ArgCount > 0) { @@ -248,8 +250,7 @@ int32 UT_SoftwareBusSnapshotHook(void *UserObj, int32 StubRetcode, uint32 CallCo MsgPtr = NULL; } - if (MsgPtr != NULL && Snapshot != NULL && - CFE_SB_MsgId_Equal(Snapshot->MsgId, CFE_SB_GetMsgId((CFE_SB_MsgPtr_t)MsgPtr))) + if (MsgPtr != NULL && Snapshot != NULL) { ++Snapshot->Count; if (Snapshot->SnapshotSize > 0 && Snapshot->SnapshotBuffer != NULL) @@ -438,9 +439,9 @@ uint16 UT_GetNumEventsSent(void) /* ** Display the contents of a packet */ -void UT_DisplayPkt(CFE_SB_MsgPtr_t ptr, uint32 size) +void UT_DisplayPkt(CFE_MSG_Message_t *MsgPtr, uint32 size) { - uint8 *BytePtr = (uint8 *) ptr; + uint8 *BytePtr = MsgPtr->Byte; uint32 i; uint32 BufSize = UT_MAX_MESSAGE_LENGTH; char DisplayMsg[UT_MAX_MESSAGE_LENGTH]; diff --git a/fsw/cfe-core/unit-test/ut_support.h b/fsw/cfe-core/unit-test/ut_support.h index 60bfa2a1b..5b4dd5343 100644 --- a/fsw/cfe-core/unit-test/ut_support.h +++ b/fsw/cfe-core/unit-test/ut_support.h @@ -142,7 +142,7 @@ typedef struct * (ignored if the handler does not use command codes, * set to zero in this case). */ - uint16 CommandCode; + CFE_MSG_FcnCode_t CommandCode; } UT_TaskPipeDispatchId_t; @@ -279,11 +279,8 @@ void UT_ReportFailures(void); ** ** \returns ** This function does not return a value. -** -** \sa #CFE_SB_SetMsgId, #CFE_SB_SetCmdCode, #CFE_SB_SendMsg -** ******************************************************************************/ -void UT_CallTaskPipe(void (*TaskPipeFunc)(CFE_SB_MsgPtr_t), CFE_SB_MsgPtr_t Msg, uint32 MsgSize, +void UT_CallTaskPipe(void (*TaskPipeFunc)(CFE_MSG_Message_t*), CFE_MSG_Message_t *MsgPtr, uint32 MsgSize, UT_TaskPipeDispatchId_t DispatchId); /*****************************************************************************/ @@ -572,7 +569,7 @@ uint16 UT_GetNumEventsSent(void); ** This function does not return a value. ** ******************************************************************************/ -void UT_DisplayPkt(CFE_SB_MsgPtr_t ptr, uint32 size); +void UT_DisplayPkt(CFE_MSG_Message_t *MsgPtr, uint32 size); /*****************************************************************************/ /** diff --git a/fsw/cfe-core/ut-stubs/ut_sb_stubs.c b/fsw/cfe-core/ut-stubs/ut_sb_stubs.c index 1683dc65b..546f3dd59 100644 --- a/fsw/cfe-core/ut-stubs/ut_sb_stubs.c +++ b/fsw/cfe-core/ut-stubs/ut_sb_stubs.c @@ -56,7 +56,7 @@ typedef struct */ CFE_SB_Qos_t CFE_SB_Default_Qos; -static CFE_SB_StubMsg_MetaData_t* CFE_SB_StubMsg_GetMetaData(const CFE_SB_Msg_t *MsgPtr) +static CFE_SB_StubMsg_MetaData_t* CFE_SB_StubMsg_GetMetaData(const CFE_MSG_Message_t *MsgPtr) { CFE_SB_StubMsg_MetaData_t* MetaPtr; CFE_SB_StubMsg_MetaData_t DefaultMeta; @@ -295,6 +295,8 @@ int32 CFE_SB_GetPipeIdByName(CFE_SB_PipeId_t *PipeIdPtr, const char *PipeName) return status; } + +#ifndef CFE_OMIT_DEPRECATED_6_8 /*****************************************************************************/ /** ** \brief CFE_SB_GetCmdCode stub function @@ -310,7 +312,7 @@ int32 CFE_SB_GetPipeIdByName(CFE_SB_PipeId_t *PipeIdPtr, const char *PipeName) ** Returns either the function code from command secondary header or 0. ** ******************************************************************************/ -uint16 CFE_SB_GetCmdCode(CFE_SB_MsgPtr_t MsgPtr) +uint16 CFE_SB_GetCmdCode(CFE_MSG_Message_t *MsgPtr) { UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_GetCmdCode), MsgPtr); @@ -346,7 +348,7 @@ uint16 CFE_SB_GetCmdCode(CFE_SB_MsgPtr_t MsgPtr) ** Returns the entire stream ID from the primary header. ** ******************************************************************************/ -CFE_SB_MsgId_t CFE_SB_GetMsgId(const CFE_SB_Msg_t *MsgPtr) +CFE_SB_MsgId_t CFE_SB_GetMsgId(const CFE_MSG_Message_t *MsgPtr) { UT_Stub_RegisterContext(UT_KEY(CFE_SB_GetMsgId), MsgPtr); @@ -364,7 +366,8 @@ CFE_SB_MsgId_t CFE_SB_GetMsgId(const CFE_SB_Msg_t *MsgPtr) /*****************************************************************************/ /** -** \brief CFE_SB_InitMsg stub function +** \brief DEPRECATED - CFE_SB_InitMsg stub function +** \deprecated ** ** \par Description ** This function is used to mimic the response of the cFE SB function @@ -399,6 +402,7 @@ void CFE_SB_InitMsg(void *MsgPtr, UT_Stub_CopyToLocal(UT_KEY(CFE_SB_InitMsg), (uint8*)MsgPtr, Length); } } +#endif /* CFE_OMIT_DEPRECATED_6_8 */ /*****************************************************************************/ /** @@ -416,7 +420,7 @@ void CFE_SB_InitMsg(void *MsgPtr, ** Returns CFE_SUCCESS on the first call, then -1 on the second. ** ******************************************************************************/ -int32 CFE_SB_RcvMsg(CFE_SB_MsgPtr_t *BufPtr, +int32 CFE_SB_RcvMsg(CFE_MSG_Message_t **BufPtr, CFE_SB_PipeId_t PipeId, int32 TimeOut) { @@ -427,7 +431,7 @@ int32 CFE_SB_RcvMsg(CFE_SB_MsgPtr_t *BufPtr, int32 status; static union { - CFE_SB_Msg_t Msg; + CFE_MSG_Message_t Msg; uint8 Ext[CFE_MISSION_SB_MAX_SB_MSG_SIZE]; } Buffer; @@ -471,7 +475,7 @@ int32 CFE_SB_RcvMsg(CFE_SB_MsgPtr_t *BufPtr, /* Only doing subset of total messages; ** NOTE: Currently does EVS, TIME */ -int32 CFE_SB_SendMsg(CFE_SB_Msg_t *MsgPtr) +int32 CFE_SB_SendMsg(CFE_MSG_Message_t *MsgPtr) { UT_Stub_RegisterContext(UT_KEY(CFE_SB_SendMsg), MsgPtr); @@ -492,6 +496,8 @@ int32 CFE_SB_SendMsg(CFE_SB_Msg_t *MsgPtr) return status; } +#ifndef CFE_OMIT_DEPRECATED_6_8 + /*****************************************************************************/ /** ** \brief CFE_SB_SetCmdCode stub function @@ -507,7 +513,7 @@ int32 CFE_SB_SendMsg(CFE_SB_Msg_t *MsgPtr) ** Returns either CFE_SB_WRONG_MSG_TYPE or CFE_SUCCESS. ** ******************************************************************************/ -int32 CFE_SB_SetCmdCode(CFE_SB_MsgPtr_t MsgPtr, uint16 CmdCode) +int32 CFE_SB_SetCmdCode(CFE_MSG_Message_t *MsgPtr, uint16 CmdCode) { UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_SetCmdCode), MsgPtr); UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_SetCmdCode), CmdCode); @@ -539,7 +545,7 @@ int32 CFE_SB_SetCmdCode(CFE_SB_MsgPtr_t MsgPtr, uint16 CmdCode) ** This function does not return a value. ** ******************************************************************************/ -void CFE_SB_SetMsgId(CFE_SB_MsgPtr_t MsgPtr, CFE_SB_MsgId_t MsgId) +void CFE_SB_SetMsgId(CFE_MSG_Message_t *MsgPtr, CFE_SB_MsgId_t MsgId) { UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_SetMsgId), MsgPtr); UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_SetMsgId), MsgId); @@ -555,7 +561,6 @@ void CFE_SB_SetMsgId(CFE_SB_MsgPtr_t MsgPtr, CFE_SB_MsgId_t MsgId) } } - /*****************************************************************************/ /** ** \brief CFE_SB_SetMsgTime stub function @@ -571,7 +576,7 @@ void CFE_SB_SetMsgId(CFE_SB_MsgPtr_t MsgPtr, CFE_SB_MsgId_t MsgId) ** Returns CFE_SUCCESS. ** ******************************************************************************/ -int32 CFE_SB_SetMsgTime(CFE_SB_MsgPtr_t MsgPtr, CFE_TIME_SysTime_t Time) +int32 CFE_SB_SetMsgTime(CFE_MSG_Message_t *MsgPtr, CFE_TIME_SysTime_t Time) { UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_SetMsgTime), MsgPtr); UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_SetMsgTime), Time); @@ -587,6 +592,7 @@ int32 CFE_SB_SetMsgTime(CFE_SB_MsgPtr_t MsgPtr, CFE_TIME_SysTime_t Time) return status; } +#endif /* CFE_OMIT_DEPRECATED_6_8 */ /*****************************************************************************/ /** @@ -705,7 +711,7 @@ int32 CFE_SB_SubscribeLocal(CFE_SB_MsgId_t MsgId, ** This function does not return a value. ** ******************************************************************************/ -void CFE_SB_TimeStampMsg(CFE_SB_MsgPtr_t MsgPtr) +void CFE_SB_TimeStampMsg(CFE_MSG_Message_t *MsgPtr) { UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_TimeStampMsg), MsgPtr); @@ -713,6 +719,7 @@ void CFE_SB_TimeStampMsg(CFE_SB_MsgPtr_t MsgPtr) UT_Stub_CopyFromLocal(UT_KEY(CFE_SB_TimeStampMsg), &MsgPtr, sizeof(MsgPtr)); } +#ifndef CFE_OMIT_DEPRECATED_6_8 /*****************************************************************************/ /** ** \brief CFE_SB_GetTotalMsgLength stub function @@ -729,7 +736,7 @@ void CFE_SB_TimeStampMsg(CFE_SB_MsgPtr_t MsgPtr) ** Returns a user-defined status value, UT_SB_TotalMsgLen. ** ******************************************************************************/ -uint16 CFE_SB_GetTotalMsgLength(const CFE_SB_Msg_t *MsgPtr) +uint16 CFE_SB_GetTotalMsgLength(const CFE_MSG_Message_t *MsgPtr) { UT_Stub_RegisterContext(UT_KEY(CFE_SB_GetTotalMsgLength), MsgPtr); @@ -748,6 +755,7 @@ uint16 CFE_SB_GetTotalMsgLength(const CFE_SB_Msg_t *MsgPtr) } return result; } +#endif /* CFE_OMIT_DEPRECATED_6_8 */ /*****************************************************************************/ /** @@ -873,6 +881,7 @@ int32 CFE_SB_Unsubscribe(CFE_SB_MsgId_t MsgId, CFE_SB_PipeId_t PipeId) return status; } +#ifndef CFE_OMIT_DEPRECATED_6_8 /****************************************************************************** ** Function: CFE_SB_GetMsgTime() ** @@ -880,13 +889,13 @@ int32 CFE_SB_Unsubscribe(CFE_SB_MsgId_t MsgId, CFE_SB_PipeId_t PipeId) ** Get the time field from a message. ** ** Arguments: -** MsgPtr - Pointer to a CFE_SB_Msg_t +** MsgPtr - Pointer to a CFE_MSG_Message_t ** ** Return: ** Time field from message or ** Time value of zero for msgs that do not have a Time field in header */ -CFE_TIME_SysTime_t CFE_SB_GetMsgTime(CFE_SB_MsgPtr_t MsgPtr) +CFE_TIME_SysTime_t CFE_SB_GetMsgTime(CFE_MSG_Message_t *MsgPtr) { UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_GetMsgTime), MsgPtr); @@ -903,7 +912,7 @@ CFE_TIME_SysTime_t CFE_SB_GetMsgTime(CFE_SB_MsgPtr_t MsgPtr) }/* end CFE_SB_GetMsgTime */ -bool CFE_SB_ValidateChecksum(CFE_SB_MsgPtr_t MsgPtr) +bool CFE_SB_ValidateChecksum(CFE_MSG_Message_t *MsgPtr) { UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_ValidateChecksum), MsgPtr); @@ -913,8 +922,9 @@ bool CFE_SB_ValidateChecksum(CFE_SB_MsgPtr_t MsgPtr) return (bool) status; } +#endif /* CFE_OMIT_DEPRECATED_6_8 */ -void *CFE_SB_GetUserData(CFE_SB_MsgPtr_t MsgPtr) +void *CFE_SB_GetUserData(CFE_MSG_Message_t *MsgPtr) { UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_GetUserData), MsgPtr); @@ -942,7 +952,8 @@ void *CFE_SB_GetUserData(CFE_SB_MsgPtr_t MsgPtr) return Result; } -void CFE_SB_SetTotalMsgLength (CFE_SB_MsgPtr_t MsgPtr,uint16 TotalLength) +#ifndef CFE_OMIT_DEPRECATED_6_8 +void CFE_SB_SetTotalMsgLength (CFE_MSG_Message_t *MsgPtr,uint16 TotalLength) { UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_SetTotalMsgLength), MsgPtr); UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_SetTotalMsgLength), TotalLength); @@ -969,14 +980,14 @@ uint32 CFE_SB_GetPktType(CFE_SB_MsgId_t MsgId) return status; } -void CFE_SB_GenerateChecksum(CFE_SB_MsgPtr_t MsgPtr) +void CFE_SB_GenerateChecksum(CFE_MSG_Message_t *MsgPtr) { UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_GenerateChecksum), MsgPtr); UT_DEFAULT_IMPL(CFE_SB_GenerateChecksum); } -uint16 CFE_SB_GetChecksum(CFE_SB_MsgPtr_t MsgPtr) +uint16 CFE_SB_GetChecksum(CFE_MSG_Message_t *MsgPtr) { UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_GetChecksum), MsgPtr); @@ -986,6 +997,7 @@ uint16 CFE_SB_GetChecksum(CFE_SB_MsgPtr_t MsgPtr) return status; } +#endif /* CFE_OMIT_DEPRECATED_6_8 */ int32 CFE_SB_GetPipeOpts(CFE_SB_PipeId_t PipeId, uint8 *OptPtr) { @@ -999,7 +1011,7 @@ int32 CFE_SB_GetPipeOpts(CFE_SB_PipeId_t PipeId, uint8 *OptPtr) return status; } -uint16 CFE_SB_GetUserDataLength(const CFE_SB_Msg_t *MsgPtr) +uint16 CFE_SB_GetUserDataLength(const CFE_MSG_Message_t *MsgPtr) { UT_Stub_RegisterContext(UT_KEY(CFE_SB_GetUserDataLength), MsgPtr); @@ -1025,7 +1037,7 @@ bool CFE_SB_IsValidMsgId(CFE_SB_MsgId_t MsgId) return status; } -int32 CFE_SB_PassMsg(CFE_SB_Msg_t *MsgPtr) +int32 CFE_SB_PassMsg(CFE_MSG_Message_t *MsgPtr) { UT_Stub_RegisterContext(UT_KEY(CFE_SB_PassMsg), MsgPtr); @@ -1048,7 +1060,7 @@ int32 CFE_SB_SetPipeOpts(CFE_SB_PipeId_t PipeId, uint8 Opts) return status; } -void CFE_SB_SetUserDataLength(CFE_SB_MsgPtr_t MsgPtr, uint16 DataLength) +void CFE_SB_SetUserDataLength(CFE_MSG_Message_t *MsgPtr, uint16 DataLength) { UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_SetUserDataLength), MsgPtr); UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_SetUserDataLength), DataLength); @@ -1069,13 +1081,13 @@ int32 CFE_SB_UnsubscribeLocal(CFE_SB_MsgId_t MsgId, CFE_SB_PipeId_t PipeId) return status; } -CFE_SB_Msg_t* CFE_SB_ZeroCopyGetPtr(uint16 MsgSize, CFE_SB_ZeroCopyHandle_t *BufferHandle) +CFE_MSG_Message_t *CFE_SB_ZeroCopyGetPtr(uint16 MsgSize, CFE_SB_ZeroCopyHandle_t *BufferHandle) { UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_ZeroCopyGetPtr), MsgSize); UT_Stub_RegisterContext(UT_KEY(CFE_SB_ZeroCopyGetPtr), BufferHandle); int32 status; - CFE_SB_Msg_t* MsgPtr; + CFE_MSG_Message_t *MsgPtr; MsgPtr = NULL; status = UT_DEFAULT_IMPL(CFE_SB_ZeroCopyGetPtr); @@ -1087,7 +1099,7 @@ CFE_SB_Msg_t* CFE_SB_ZeroCopyGetPtr(uint16 MsgSize, CFE_SB_ZeroCopyHandle_t *Buf return MsgPtr; } -int32 CFE_SB_ZeroCopyPass(CFE_SB_Msg_t *MsgPtr, CFE_SB_ZeroCopyHandle_t BufferHandle) +int32 CFE_SB_ZeroCopyPass(CFE_MSG_Message_t *MsgPtr, CFE_SB_ZeroCopyHandle_t BufferHandle) { UT_Stub_RegisterContext(UT_KEY(CFE_SB_ZeroCopyPass), MsgPtr); UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_ZeroCopyPass), BufferHandle); @@ -1099,7 +1111,7 @@ int32 CFE_SB_ZeroCopyPass(CFE_SB_Msg_t *MsgPtr, CFE_SB_ZeroCopyHandle_t BufferHa return status; } -int32 CFE_SB_ZeroCopyReleasePtr(CFE_SB_Msg_t *Ptr2Release, CFE_SB_ZeroCopyHandle_t BufferHandle) +int32 CFE_SB_ZeroCopyReleasePtr(CFE_MSG_Message_t *Ptr2Release, CFE_SB_ZeroCopyHandle_t BufferHandle) { UT_Stub_RegisterContext(UT_KEY(CFE_SB_ZeroCopyReleasePtr), Ptr2Release); UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_ZeroCopyReleasePtr), BufferHandle); @@ -1111,7 +1123,7 @@ int32 CFE_SB_ZeroCopyReleasePtr(CFE_SB_Msg_t *Ptr2Release, CFE_SB_ZeroCopyHandle return status; } -int32 CFE_SB_ZeroCopySend(CFE_SB_Msg_t *MsgPtr, CFE_SB_ZeroCopyHandle_t BufferHandle) +int32 CFE_SB_ZeroCopySend(CFE_MSG_Message_t *MsgPtr, CFE_SB_ZeroCopyHandle_t BufferHandle) { UT_Stub_RegisterContext(UT_KEY(CFE_SB_ZeroCopySend), MsgPtr); UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_SB_ZeroCopySend), BufferHandle); From 1da6b3cb4a6a76967fe7df19f78a0746b16affb3 Mon Sep 17 00:00:00 2001 From: Jacob Hageman Date: Wed, 4 Nov 2020 16:28:33 -0500 Subject: [PATCH 2/3] Fix #777, Use MSG APIs - Docs Update documentation to replace deprecated SB APIs with MSG APIs --- docs/cFE Application Developers Guide.md | 138 ++++++++++++----------- docs/src/cfe_api.dox | 25 ++-- docs/src/cfe_sb.dox | 2 +- 3 files changed, 85 insertions(+), 80 deletions(-) diff --git a/docs/cFE Application Developers Guide.md b/docs/cFE Application Developers Guide.md index 32f05ebfb..9b8c177af 100644 --- a/docs/cFE Application Developers Guide.md +++ b/docs/cFE Application Developers Guide.md @@ -1216,7 +1216,7 @@ FILE: xx_app.c void XX_AppMain(void) { uint32 RunStatus = CFE_ES_RunStatus_APP_RUN; - CFE_SB_MsgPtr_t MsgPtr; + CFE_MSG_Message_t *MsgPtr; int32 Result = CFE_SUCCESS; /* Register application */ @@ -1319,18 +1319,18 @@ SB Messages by allocating sufficient memory, calling the SB API to initialize the contents of the SB Message and then storing any appropriate data into the structure. -The Software Bus API hides the details of the message structure, -providing routines such as CFE_SB_GetMsgTime and CFE_SB_SetMsgTime +The Message API hides the details of the message structure, +providing routines such as CFE_MSG_GetMsgTime and CFE_MSG_SetMsgTime in order to get and set a message time. The current version of the cFE supports only CCSDS, however, the implementation of the message structure can be changed without affecting cFS Applications. -In the CCSDS implementation of the Software Bus, the upper 3 most -significant bits of the 16 bit Message ID Number **shall be zero -(b'000').** The Software Bus ignores the upper 3 most significant bits -defined by CCSDS as the Version Number. A non-zero value in the Version -Number (3 bits) could result in duplicate Message IDs being defined. For -example, x01FF and x81FF are the same Message ID to the Software Bus. +See the implementation documentation for specific formats, +fields, and bit values. The message ID (MsgId) is an abstract +concept that is implementation depended, used for routing messages +on the Software Bus. Depending on the implementation, different +ranges and values are supported, and the values effect the message +header differently. ##### 6.1.2 Pipes @@ -1646,10 +1646,9 @@ SAMPLE_AppData_t SAMPLE_AppData; /* Instantiate Task Data */ int32 Status; ... - Status = CFE_SB_InitMsg(&SAMPLE_AppData.HkPacket, /* Address of SB Message Data Buffer */ - SAMPLE_HK_TLM_MID, /* SB Message ID associated with Data */ - sizeof(SAMPLE_HkPacket_t), /* Size of Buffer */ - CFE_SB_CLEAR_DATA); /* Buffer should be cleared by cFE */ + Status = CFE_MSG_Init(&SAMPLE_AppData.HkPacket, /* Address of SB Message Data Buffer */ + SAMPLE_HK_TLM_MID, /* SB Message ID associated with Data */ + sizeof(SAMPLE_HkPacket_t)); /* Size of Buffer */ ... } ``` @@ -1660,7 +1659,7 @@ the SB Message was to be a command message, it would have been important for the Developer to have used the CFE_SB_CMD_HDR_SIZE macro instead. -The CFE_SB_InitMsg API call formats the SB Message Header +The CFE_MSG_Init API call formats the Message Header appropriately with the given SB Message ID, size and, in this case, clears the data portion of the SB Message (CFE_SB_CLEAR_DATA). Another option for the fourth parameter is CFE_SB_NO_CLEAR which @@ -1706,74 +1705,80 @@ It is important to note that some SB API calls assume the presence of a particular header type and will not work properly if the other header type is present instead. The following section provides more detail. -##### 6.5.2 Modifying Software Bus Message Header Information +##### 6.5.2 Setting Message Header Information -Before sending an SB Message to the SB, the Application can update the -SB Message Header. The following table summarizes the functions that -can be used to modify SB Message Header fields. Note that some of these +Before sending a Message to the SB, the Application can set fields in the +Message Header. The following table summarizes the functions that +can be used to modify Message Header fields. Note that some of these functions are only applicable to a specific header type. Additional information on modifying specific header types is provided in the following subsections. -| **SB Message Header Field** | **SB API for Modifying the Header Field** | **Applicability** | -| ---------------------------:| -----------------------------------------:| -------------------:| -| Message ID | CFE_SB_SetMsgId | Command & Telemetry | -| Total Message Length | CFE_SB_SetTotalMsgLength | Command & Telemetry | -| User Data Message Length | CFE_SB_SetUserDataLength | Command & Telemetry | -| Command Code | CFE_SB_SetCmdCode | Command Only | -| Checksum | CFE_SB_GenerateChecksum | Command Only | -| Time | CFE_SB_TimeStampMsg | Telemetry Only | -| Time | CFE_SB_SetMsgTime | Telemetry Only | - -Applications shall always use these functions to manipulate the SB -Message Header. The structure of the SB Message Header may change from +| **SB Message Header Field** | **API for Modifying the Header Field** | **Applicability** | +| ---------------------------:| --------------------------------------:| -------------------:| +| Message ID | CFE_MSG_SetMsgId | Command & Telemetry | +| Total Message Length | CFE_MSG_SetSize | Command & Telemetry | +| Command Code | CFE_MSG_SetFcnCode | Command Only | +| Checksum | CFE_MSG_GenerateChecksum | Command Only | +| Time | CFE_SB_TimeStampMsg | Telemetry Only | +| Time | CFE_MSG_SetMsgTime | Telemetry Only | + +Applications shall always use these functions to manipulate the +Message Header. The structure of the Message Header may change from one deployment to the next. By using these functions, Applications are -guaranteed to work regardless of the structure of the SB Message Header. +guaranteed to work regardless of the structure of the Message Header. -##### 6.5.2.1 Modifying SB Command Message Header Information +Although CFE_SB_SetUserDataLength APIs is available, +it is based on assumptions about the defintion of "User Data" and is +really just a best guess since the packet structure is dependent on implementation. +The preference is to use CFE_MSG_SetSize and actual packet structure +information when available. + +##### 6.5.2.1 Modifying Command Message Header Information The most common update for command messages is to set the command code. -This is done through the CFE_SB_SetCmdCode() API call. This code is used +This is done through the CFE_MSG_SetFcnCode() API call. This code is used to distinguish between multiple commands that share a Message ID. It is common practice for an application to have a single "CMD_MID" to capture all commands and then to differentiate those commands using a command code. -##### 6.5.2.2 Modifying SB Telemetry Message Header Information +##### 6.5.2.2 Modifying Telemetry Message Header Information The most common update for telemetry messages is to put the current time in -the SB Message. This is accomplished with one of two SB API functions. The +the Message. This is accomplished with one of two API functions. The most commonly used function would be CFE_SB_TimeStampMsg(). This API would insert the current time, in the mission defined format with the mission -defined epoch, into the SB Message Header. The other SB API that can modify -the SB Message Header time is CFE_SB_SetMsgTime(). This API call sets the -time in the SB Message Header to the time specified during the call. This is -useful when the Application wishes to time tag a series of SB Messages with +defined epoch, into the Message Header. The other API that can modify +the Message Header time is CFE_MSG_SetMsgTime(). This API call sets the +time in the Message Header to the time specified during the call. This is +useful when the Application wishes to time tag a series of Messages with the same time. -##### 6.5.3 Reading Software Bus Message Header Information +##### 6.5.3 Reading Message Header Information -There are several SB APIs available for extracting the SB Message Header +There are several APIs available for extracting the Message Header Fields. These APIs shall always be used by Applications to ensure the Applications are portable to future missions. The following table -identifies the fields of the SB Message Header and the appropriate API +identifies the fields of the Message Header and the appropriate API for extracting that field from the header: -| **SB Message Header Field** | **SB API for Reading the Header Field** | **Applicability** | -|:----------------------------|:----------------------------------------|:--------------------| -| Message ID | CFE_SB_GetMsgId | Command & Telemetry | -| Message Time | CFE_SB_GetMsgTime | Telemetry Only | -| Total Message Length | CFE_SB_GetTotalMsgLength | Command & Telemetry | -| User Data Message Length | CFE_SB_GetUserDataLength | Command & Telemetry | -| Command Code | CFE_SB_GetCmdCode | Command Only | -| Checksum | CFE_SB_GetChecksum | Command Only | - -In addition to the function for reading the checksum field, there is -another API that automatically calculates the checksum for the packet +| **SB Message Header Field** | **API for Reading the Header Field** | **Applicability** | +|:----------------------------|:-------------------------------------|:--------------------| +| Message ID | CFE_MSG_GetMsgId | Command & Telemetry | +| Message Time | CFE_MSG_GetTime | Imp. Dependent | +| Total Message Length | CFE_MSG_GetSize | Command & Telemetry | +| Command Code | CFE_MSG_GetFcnCode | Command Only | + +There are other APIs based on selected implementation. The full list is +available in the user's guide. + +There is another API that automatically calculates the checksum for the packet and compares it to the checksum in the header. The API is called -CFE_SB_ValidateChecksum() and it simply returns a success or failure +CFE_MSG_ValidateChecksum() and it simply returns a success or failure indication. -If the Application's data structure definitions don't include the header -information, then the CFE_SB_GetUserData API could be used to obtain -the start address of the SB Message data. +Although CFE_SB_GetUserDataLength and CFE_SB_GetUserData APIs are available, +they are based on assumptions about the defintion of "User Data" and are +really just a best guess since the packet structure is dependent on implementation. +The preference is to use the actual packet structure when available. #### 6.6 Sending Software Bus Messages @@ -1799,8 +1804,8 @@ SAMPLE_AppData_t SAMPLE_AppData; /* Instantiate Task Data */ /* ** Send housekeeping SB Message after time tagging it with current time */ - CFE_SB_TimeStampMsg((CFE_SB_Msg_t *) &SAMPLE_AppData.HkPacket); - CFE_SB_SendMsg((CFE_SB_Msg_t *) &SAMPLE_AppData.HkPacket); + CFE_SB_TimeStampMsg((CFE_MSG_Message_t *) &SAMPLE_AppData.HkPacket); + CFE_SB_SendMsg((CFE_MSG_Message_t *) &SAMPLE_AppData.HkPacket); ... } ``` @@ -1816,8 +1821,8 @@ FILE: sample_app.h typedef struct { ... - CFE_SB_MsgPtr_t MsgPtr; - CFE_SB_PipeId_t CmdPipe; + CFE_MSG_Message_t *MsgPtr; + CFE_SB_PipeId_t CmdPipe; ... } SAMPLE_AppData_t; ``` @@ -1945,10 +1950,9 @@ SAMPLE_AppData_t SAMPLE_AppData; /* Instantiate Task Data */ ** Get a SB Message block of memory and initialize it */ SAMPLE_AppData.BigPktPtr = (SAMPLE_BigPkt_t *)CFE_SB_ZeroCopyGetPtr(SAMPLE_BIGPKT_MSGLEN); - CFE_SB_InitMsg((CFE_SB_Msg_t *) SAMPLE_AppData.BigPktPtr, - SAMPLE_BIG_TLM_MID, - SAMPLE_BIGPKT_MSGLEN, - CFE_SB_CLEAR_DATA); + CFE_MSG_Init((CFE_MSG_Message_t *) SAMPLE_AppData.BigPktPtr, + SAMPLE_BIG_TLM_MID, + SAMPLE_BIGPKT_MSGLEN); /* ** ...Fill Packet with Data... @@ -1957,8 +1961,8 @@ SAMPLE_AppData_t SAMPLE_AppData; /* Instantiate Task Data */ /* ** Send SB Message after time tagging it with current time */ - CFE_SB_TimeStampMsg((CFE_SB_Msg_t *) SAMPLE_AppData.BigPktPtr); - CFE_SB_ZeroCopySend((CFE_SB_Msg_t *) SAMPLE_AppData.BigPktPtr); + CFE_SB_TimeStampMsg((CFE_MSG_Message_t *) SAMPLE_AppData.BigPktPtr); + CFE_SB_ZeroCopySend((CFE_MSG_Message_t *) SAMPLE_AppData.BigPktPtr); /* SAMPLE_AppData.BigPktPtr is no longer a valid pointer */ ... } diff --git a/docs/src/cfe_api.dox b/docs/src/cfe_api.dox index 000e7c982..1203383d5 100644 --- a/docs/src/cfe_api.dox +++ b/docs/src/cfe_api.dox @@ -146,30 +146,31 @@
  • \ref CFEAPISBSetMessage
      -
    • #CFE_SB_InitMsg - \copybrief CFE_SB_InitMsg -
    • #CFE_SB_SetMsgId - \copybrief CFE_SB_SetMsgId +
    • #CFE_MSG_Init - \copybrief CFE_MSG_Init +
    • #CFE_MSG_SetMsgId - \copybrief CFE_MSG_SetMsgId
    • #CFE_SB_SetUserDataLength - \copybrief CFE_SB_SetUserDataLength -
    • #CFE_SB_SetTotalMsgLength - \copybrief CFE_SB_SetTotalMsgLength -
    • #CFE_SB_SetMsgTime - \copybrief CFE_SB_SetMsgTime +
    • #CFE_MSG_SetSize - \copybrief CFE_MSG_SetSize +
    • #CFE_MSG_SetMsgTime - \copybrief CFE_MSG_SetMsgTime
    • #CFE_SB_TimeStampMsg - \copybrief CFE_SB_TimeStampMsg -
    • #CFE_SB_SetCmdCode - \copybrief CFE_SB_SetCmdCode +
    • #CFE_MSG_SetFcnCode - \copybrief CFE_MSG_SetFcnCode +
    • #CFE_MSG_SetSequenceCount - \copybrief CFE_MSG_SetSequenceCount
    • #CFE_SB_MessageStringSet - \copybrief CFE_SB_MessageStringSet
  • \ref CFEAPIGetMessage
    • #CFE_SB_GetUserData - \copybrief CFE_SB_GetUserData -
    • #CFE_SB_GetMsgId - \copybrief CFE_SB_GetMsgId +
    • #CFE_MSG_GetMsgId - \copybrief CFE_MSG_GetMsgId
    • #CFE_SB_GetUserDataLength - \copybrief CFE_SB_GetUserDataLength -
    • #CFE_SB_GetTotalMsgLength - \copybrief CFE_SB_GetTotalMsgLength -
    • #CFE_SB_GetMsgTime - \copybrief CFE_SB_GetMsgTime -
    • #CFE_SB_GetCmdCode - \copybrief CFE_SB_GetCmdCode +
    • #CFE_MSG_GetSize - \copybrief CFE_MSG_GetSize +
    • #CFE_MSG_GetMsgTime - \copybrief CFE_MSG_GetMsgTime +
    • #CFE_MSG_GetFcnCode - \copybrief CFE_MSG_GetFcnCode +
    • #CFE_MSG_GetTypeFromMsgId - \copybrief CFE_MSG_GetTypeFromMsgId
    • #CFE_SB_MessageStringGet - \copybrief CFE_SB_MessageStringGet
  • \ref CFEAPISBChecksum
      -
    • #CFE_SB_GenerateChecksum - \copybrief CFE_SB_GenerateChecksum -
    • #CFE_SB_GetChecksum - \copybrief CFE_SB_GetChecksum -
    • #CFE_SB_ValidateChecksum - \copybrief CFE_SB_ValidateChecksum +
    • #CFE_MSG_GenerateChecksum - \copybrief CFE_MSG_GenerateChecksum +
    • #CFE_MSG_ValidateChecksum - \copybrief CFE_MSG_ValidateChecksum
  • \ref CFEAPISBMessageID
      diff --git a/docs/src/cfe_sb.dox b/docs/src/cfe_sb.dox index caed60108..bf1587eab 100644 --- a/docs/src/cfe_sb.dox +++ b/docs/src/cfe_sb.dox @@ -529,7 +529,7 @@ can get confusing. How can I be sure that the correct address is given for this parameter.   - Typically a caller declares a ptr of type CFE_SB_Msg_t (i.e. CFE_SB_Msg_t *Ptr) + Typically a caller declares a ptr of type CFE_MSG_Message_t (i.e. CFE_MSG_Message_t *Ptr) then gives the address of that pointer (&Ptr) as this parameter. After a successful call to #CFE_SB_RcvMsg, Ptr will point to the first byte of the software bus message header. This should be used as a read-only pointer. In systems with an MMU, writes From 34e5510eb35bd3b9b24761e37eee775774cf626b Mon Sep 17 00:00:00 2001 From: Jacob Hageman Date: Wed, 4 Nov 2020 16:29:23 -0500 Subject: [PATCH 3/3] Fix #777, Use MSG APIs - Core software Update the core software from the deprecated SB APIs to the MSG APIs. --- fsw/cfe-core/src/es/cfe_es_task.c | 157 ++++++++++--------- fsw/cfe-core/src/es/cfe_es_task.h | 8 +- fsw/cfe-core/src/evs/cfe_evs_task.c | 149 +++++++++--------- fsw/cfe-core/src/evs/cfe_evs_task.h | 2 +- fsw/cfe-core/src/evs/cfe_evs_utils.c | 16 +- fsw/cfe-core/src/inc/cfe_error.h | 2 +- fsw/cfe-core/src/inc/cfe_es_msg.h | 8 +- fsw/cfe-core/src/inc/cfe_evs_msg.h | 6 +- fsw/cfe-core/src/inc/cfe_sb.h | 191 +++++++++++------------ fsw/cfe-core/src/inc/cfe_sb_events.h | 4 +- fsw/cfe-core/src/inc/cfe_tbl.h | 3 +- fsw/cfe-core/src/inc/cfe_tbl_msg.h | 8 +- fsw/cfe-core/src/inc/cfe_time_msg.h | 6 +- fsw/cfe-core/src/sb/cfe_sb_api.c | 54 ++++--- fsw/cfe-core/src/sb/cfe_sb_init.c | 7 +- fsw/cfe-core/src/sb/cfe_sb_msg_id_util.c | 6 +- fsw/cfe-core/src/sb/cfe_sb_priv.c | 7 +- fsw/cfe-core/src/sb/cfe_sb_priv.h | 13 +- fsw/cfe-core/src/sb/cfe_sb_task.c | 72 ++++----- fsw/cfe-core/src/sb/cfe_sb_util.c | 41 ++--- fsw/cfe-core/src/tbl/cfe_tbl_api.c | 2 +- fsw/cfe-core/src/tbl/cfe_tbl_internal.c | 24 +-- fsw/cfe-core/src/tbl/cfe_tbl_task.c | 39 ++--- fsw/cfe-core/src/tbl/cfe_tbl_task.h | 6 +- fsw/cfe-core/src/tbl/cfe_tbl_task_cmds.c | 8 +- fsw/cfe-core/src/tbl/cfe_tbl_task_cmds.h | 4 +- fsw/cfe-core/src/time/cfe_time_task.c | 113 +++++++------- fsw/cfe-core/src/time/cfe_time_tone.c | 14 +- fsw/cfe-core/src/time/cfe_time_utils.c | 34 ++-- fsw/cfe-core/src/time/cfe_time_utils.h | 6 +- 30 files changed, 511 insertions(+), 499 deletions(-) diff --git a/fsw/cfe-core/src/es/cfe_es_task.c b/fsw/cfe-core/src/es/cfe_es_task.c index 75af1e6e9..49198cef2 100644 --- a/fsw/cfe-core/src/es/cfe_es_task.c +++ b/fsw/cfe-core/src/es/cfe_es_task.c @@ -252,23 +252,23 @@ int32 CFE_ES_TaskInit(void) /* ** Initialize housekeeping packet (clear user data area) */ - CFE_SB_InitMsg(&CFE_ES_TaskData.HkPacket, - CFE_SB_ValueToMsgId(CFE_ES_HK_TLM_MID), - sizeof(CFE_ES_TaskData.HkPacket), true); + CFE_MSG_Init(&CFE_ES_TaskData.HkPacket.TlmHeader.BaseMsg, + CFE_SB_ValueToMsgId(CFE_ES_HK_TLM_MID), + sizeof(CFE_ES_TaskData.HkPacket)); /* ** Initialize single application telemetry packet */ - CFE_SB_InitMsg(&CFE_ES_TaskData.OneAppPacket, - CFE_SB_ValueToMsgId(CFE_ES_APP_TLM_MID), - sizeof(CFE_ES_TaskData.OneAppPacket), true); + CFE_MSG_Init(&CFE_ES_TaskData.OneAppPacket.TlmHeader.BaseMsg, + CFE_SB_ValueToMsgId(CFE_ES_APP_TLM_MID), + sizeof(CFE_ES_TaskData.OneAppPacket)); /* ** Initialize memory pool statistics telemetry packet */ - CFE_SB_InitMsg(&CFE_ES_TaskData.MemStatsPacket, - CFE_SB_ValueToMsgId(CFE_ES_MEMSTATS_TLM_MID), - sizeof(CFE_ES_TaskData.MemStatsPacket), true); + CFE_MSG_Init(&CFE_ES_TaskData.MemStatsPacket.TlmHeader.BaseMsg, + CFE_SB_ValueToMsgId(CFE_ES_MEMSTATS_TLM_MID), + sizeof(CFE_ES_TaskData.MemStatsPacket)); /* ** Create Software Bus message pipe @@ -434,19 +434,19 @@ int32 CFE_ES_TaskInit(void) /* */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -void CFE_ES_TaskPipe(CFE_SB_MsgPtr_t Msg) +void CFE_ES_TaskPipe(CFE_MSG_Message_t *MsgPtr) { - CFE_SB_MsgId_t MessageID; - uint16 CommandCode; + CFE_SB_MsgId_t MessageID = CFE_SB_INVALID_MSG_ID; + CFE_MSG_FcnCode_t CommandCode = 0; - MessageID = CFE_SB_GetMsgId(Msg); + CFE_MSG_GetMsgId(MsgPtr, &MessageID); switch (CFE_SB_MsgIdToValue(MessageID)) { /* ** Housekeeping telemetry request */ case CFE_ES_SEND_HK_MID: - CFE_ES_HousekeepingCmd((CFE_SB_CmdHdr_t*)Msg); + CFE_ES_HousekeepingCmd((CFE_SB_CmdHdr_t*)MsgPtr); break; /* @@ -454,174 +454,174 @@ void CFE_ES_TaskPipe(CFE_SB_MsgPtr_t Msg) */ case CFE_ES_CMD_MID: - CommandCode = CFE_SB_GetCmdCode(Msg); + CFE_MSG_GetFcnCode(MsgPtr, &CommandCode); switch (CommandCode) { case CFE_ES_NOOP_CC: - if (CFE_ES_VerifyCmdLength(Msg, sizeof(CFE_ES_Noop_t))) + if (CFE_ES_VerifyCmdLength(MsgPtr, sizeof(CFE_ES_Noop_t))) { - CFE_ES_NoopCmd((CFE_ES_Noop_t*)Msg); + CFE_ES_NoopCmd((CFE_ES_Noop_t*)MsgPtr); } break; case CFE_ES_RESET_COUNTERS_CC: - if (CFE_ES_VerifyCmdLength(Msg, sizeof(CFE_ES_ResetCounters_t))) + if (CFE_ES_VerifyCmdLength(MsgPtr, sizeof(CFE_ES_ResetCounters_t))) { - CFE_ES_ResetCountersCmd((CFE_ES_ResetCounters_t*)Msg); + CFE_ES_ResetCountersCmd((CFE_ES_ResetCounters_t*)MsgPtr); } break; case CFE_ES_RESTART_CC: - if (CFE_ES_VerifyCmdLength(Msg, sizeof(CFE_ES_Restart_t))) + if (CFE_ES_VerifyCmdLength(MsgPtr, sizeof(CFE_ES_Restart_t))) { - CFE_ES_RestartCmd((CFE_ES_Restart_t*)Msg); + CFE_ES_RestartCmd((CFE_ES_Restart_t*)MsgPtr); } break; case CFE_ES_START_APP_CC: - if (CFE_ES_VerifyCmdLength(Msg, sizeof(CFE_ES_StartApp_t))) + if (CFE_ES_VerifyCmdLength(MsgPtr, sizeof(CFE_ES_StartApp_t))) { - CFE_ES_StartAppCmd((CFE_ES_StartApp_t*)Msg); + CFE_ES_StartAppCmd((CFE_ES_StartApp_t*)MsgPtr); } break; case CFE_ES_STOP_APP_CC: - if (CFE_ES_VerifyCmdLength(Msg, sizeof(CFE_ES_StopApp_t))) + if (CFE_ES_VerifyCmdLength(MsgPtr, sizeof(CFE_ES_StopApp_t))) { - CFE_ES_StopAppCmd((CFE_ES_StopApp_t*)Msg); + CFE_ES_StopAppCmd((CFE_ES_StopApp_t*)MsgPtr); } break; case CFE_ES_RESTART_APP_CC: - if (CFE_ES_VerifyCmdLength(Msg, sizeof(CFE_ES_RestartApp_t))) + if (CFE_ES_VerifyCmdLength(MsgPtr, sizeof(CFE_ES_RestartApp_t))) { - CFE_ES_RestartAppCmd((CFE_ES_RestartApp_t*)Msg); + CFE_ES_RestartAppCmd((CFE_ES_RestartApp_t*)MsgPtr); } break; case CFE_ES_RELOAD_APP_CC: - if (CFE_ES_VerifyCmdLength(Msg, sizeof(CFE_ES_ReloadApp_t))) + if (CFE_ES_VerifyCmdLength(MsgPtr, sizeof(CFE_ES_ReloadApp_t))) { - CFE_ES_ReloadAppCmd((CFE_ES_ReloadApp_t*)Msg); + CFE_ES_ReloadAppCmd((CFE_ES_ReloadApp_t*)MsgPtr); } break; case CFE_ES_QUERY_ONE_CC: - if (CFE_ES_VerifyCmdLength(Msg, sizeof(CFE_ES_QueryOne_t))) + if (CFE_ES_VerifyCmdLength(MsgPtr, sizeof(CFE_ES_QueryOne_t))) { - CFE_ES_QueryOneCmd((CFE_ES_QueryOne_t*)Msg); + CFE_ES_QueryOneCmd((CFE_ES_QueryOne_t*)MsgPtr); } break; case CFE_ES_QUERY_ALL_CC: - if (CFE_ES_VerifyCmdLength(Msg, sizeof(CFE_ES_QueryAll_t))) + if (CFE_ES_VerifyCmdLength(MsgPtr, sizeof(CFE_ES_QueryAll_t))) { - CFE_ES_QueryAllCmd((CFE_ES_QueryAll_t*)Msg); + CFE_ES_QueryAllCmd((CFE_ES_QueryAll_t*)MsgPtr); } break; case CFE_ES_QUERY_ALL_TASKS_CC: - if (CFE_ES_VerifyCmdLength(Msg, sizeof(CFE_ES_QueryAllTasks_t))) + if (CFE_ES_VerifyCmdLength(MsgPtr, sizeof(CFE_ES_QueryAllTasks_t))) { - CFE_ES_QueryAllTasksCmd((CFE_ES_QueryAllTasks_t*)Msg); + CFE_ES_QueryAllTasksCmd((CFE_ES_QueryAllTasks_t*)MsgPtr); } break; case CFE_ES_CLEAR_SYSLOG_CC: - if (CFE_ES_VerifyCmdLength(Msg, sizeof(CFE_ES_ClearSyslog_t))) + if (CFE_ES_VerifyCmdLength(MsgPtr, sizeof(CFE_ES_ClearSyslog_t))) { - CFE_ES_ClearSyslogCmd((CFE_ES_ClearSyslog_t*)Msg); + CFE_ES_ClearSyslogCmd((CFE_ES_ClearSyslog_t*)MsgPtr); } break; case CFE_ES_WRITE_SYSLOG_CC: - if (CFE_ES_VerifyCmdLength(Msg, sizeof(CFE_ES_WriteSyslog_t))) + if (CFE_ES_VerifyCmdLength(MsgPtr, sizeof(CFE_ES_WriteSyslog_t))) { - CFE_ES_WriteSyslogCmd((CFE_ES_WriteSyslog_t*)Msg); + CFE_ES_WriteSyslogCmd((CFE_ES_WriteSyslog_t*)MsgPtr); } break; case CFE_ES_OVER_WRITE_SYSLOG_CC: - if (CFE_ES_VerifyCmdLength(Msg, sizeof(CFE_ES_OverWriteSyslog_t))) + if (CFE_ES_VerifyCmdLength(MsgPtr, sizeof(CFE_ES_OverWriteSyslog_t))) { - CFE_ES_OverWriteSyslogCmd((CFE_ES_OverWriteSyslog_t*)Msg); + CFE_ES_OverWriteSyslogCmd((CFE_ES_OverWriteSyslog_t*)MsgPtr); } break; case CFE_ES_CLEAR_ER_LOG_CC: - if (CFE_ES_VerifyCmdLength(Msg, sizeof(CFE_ES_ClearERLog_t))) + if (CFE_ES_VerifyCmdLength(MsgPtr, sizeof(CFE_ES_ClearERLog_t))) { - CFE_ES_ClearERLogCmd((CFE_ES_ClearERLog_t*)Msg); + CFE_ES_ClearERLogCmd((CFE_ES_ClearERLog_t*)MsgPtr); } break; case CFE_ES_WRITE_ER_LOG_CC: - if (CFE_ES_VerifyCmdLength(Msg, sizeof(CFE_ES_WriteERLog_t))) + if (CFE_ES_VerifyCmdLength(MsgPtr, sizeof(CFE_ES_WriteERLog_t))) { - CFE_ES_WriteERLogCmd((CFE_ES_WriteERLog_t*)Msg); + CFE_ES_WriteERLogCmd((CFE_ES_WriteERLog_t*)MsgPtr); } break; case CFE_ES_START_PERF_DATA_CC: - if (CFE_ES_VerifyCmdLength(Msg, sizeof(CFE_ES_StartPerfData_t))) + if (CFE_ES_VerifyCmdLength(MsgPtr, sizeof(CFE_ES_StartPerfData_t))) { - CFE_ES_StartPerfDataCmd((CFE_ES_StartPerfData_t*)Msg); + CFE_ES_StartPerfDataCmd((CFE_ES_StartPerfData_t*)MsgPtr); } break; case CFE_ES_STOP_PERF_DATA_CC: - if (CFE_ES_VerifyCmdLength(Msg, sizeof(CFE_ES_StopPerfData_t))) + if (CFE_ES_VerifyCmdLength(MsgPtr, sizeof(CFE_ES_StopPerfData_t))) { - CFE_ES_StopPerfDataCmd((CFE_ES_StopPerfData_t*)Msg); + CFE_ES_StopPerfDataCmd((CFE_ES_StopPerfData_t*)MsgPtr); } break; case CFE_ES_SET_PERF_FILTER_MASK_CC: - if (CFE_ES_VerifyCmdLength(Msg, sizeof(CFE_ES_SetPerfFilterMask_t))) + if (CFE_ES_VerifyCmdLength(MsgPtr, sizeof(CFE_ES_SetPerfFilterMask_t))) { - CFE_ES_SetPerfFilterMaskCmd((CFE_ES_SetPerfFilterMask_t*)Msg); + CFE_ES_SetPerfFilterMaskCmd((CFE_ES_SetPerfFilterMask_t*)MsgPtr); } break; case CFE_ES_SET_PERF_TRIGGER_MASK_CC: - if (CFE_ES_VerifyCmdLength(Msg, sizeof(CFE_ES_SetPerfTriggerMask_t))) + if (CFE_ES_VerifyCmdLength(MsgPtr, sizeof(CFE_ES_SetPerfTriggerMask_t))) { - CFE_ES_SetPerfTriggerMaskCmd((CFE_ES_SetPerfTriggerMask_t*)Msg); + CFE_ES_SetPerfTriggerMaskCmd((CFE_ES_SetPerfTriggerMask_t*)MsgPtr); } break; case CFE_ES_RESET_PR_COUNT_CC: - if (CFE_ES_VerifyCmdLength(Msg, sizeof(CFE_ES_ResetPRCount_t))) + if (CFE_ES_VerifyCmdLength(MsgPtr, sizeof(CFE_ES_ResetPRCount_t))) { - CFE_ES_ResetPRCountCmd((CFE_ES_ResetPRCount_t*)Msg); + CFE_ES_ResetPRCountCmd((CFE_ES_ResetPRCount_t*)MsgPtr); } break; case CFE_ES_SET_MAX_PR_COUNT_CC: - if (CFE_ES_VerifyCmdLength(Msg, sizeof(CFE_ES_SetMaxPRCount_t))) + if (CFE_ES_VerifyCmdLength(MsgPtr, sizeof(CFE_ES_SetMaxPRCount_t))) { - CFE_ES_SetMaxPRCountCmd((CFE_ES_SetMaxPRCount_t*)Msg); + CFE_ES_SetMaxPRCountCmd((CFE_ES_SetMaxPRCount_t*)MsgPtr); } break; case CFE_ES_DELETE_CDS_CC: - if (CFE_ES_VerifyCmdLength(Msg, sizeof(CFE_ES_DeleteCDS_t))) + if (CFE_ES_VerifyCmdLength(MsgPtr, sizeof(CFE_ES_DeleteCDS_t))) { - CFE_ES_DeleteCDSCmd((CFE_ES_DeleteCDS_t*)Msg); + CFE_ES_DeleteCDSCmd((CFE_ES_DeleteCDS_t*)MsgPtr); } break; case CFE_ES_SEND_MEM_POOL_STATS_CC: - if (CFE_ES_VerifyCmdLength(Msg, sizeof(CFE_ES_SendMemPoolStats_t))) + if (CFE_ES_VerifyCmdLength(MsgPtr, sizeof(CFE_ES_SendMemPoolStats_t))) { - CFE_ES_SendMemPoolStatsCmd((CFE_ES_SendMemPoolStats_t*)Msg); + CFE_ES_SendMemPoolStatsCmd((CFE_ES_SendMemPoolStats_t*)MsgPtr); } break; case CFE_ES_DUMP_CDS_REGISTRY_CC: - if (CFE_ES_VerifyCmdLength(Msg, sizeof(CFE_ES_DumpCDSRegistry_t))) + if (CFE_ES_VerifyCmdLength(MsgPtr, sizeof(CFE_ES_DumpCDSRegistry_t))) { - CFE_ES_DumpCDSRegistryCmd((CFE_ES_DumpCDSRegistry_t*)Msg); + CFE_ES_DumpCDSRegistryCmd((CFE_ES_DumpCDSRegistry_t*)MsgPtr); } break; @@ -745,8 +745,8 @@ int32 CFE_ES_HousekeepingCmd(const CFE_SB_CmdHdr_t *data) /* ** Send housekeeping telemetry packet. */ - CFE_SB_TimeStampMsg((CFE_SB_Msg_t *) &CFE_ES_TaskData.HkPacket); - CFE_SB_SendMsg((CFE_SB_Msg_t *) &CFE_ES_TaskData.HkPacket); + CFE_SB_TimeStampMsg((CFE_MSG_Message_t *) &CFE_ES_TaskData.HkPacket); + CFE_SB_SendMsg((CFE_MSG_Message_t *) &CFE_ES_TaskData.HkPacket); /* ** This command does not affect the command execution counter. @@ -1144,8 +1144,8 @@ int32 CFE_ES_QueryOneCmd(const CFE_ES_QueryOne_t *data) /* ** Send application status telemetry packet. */ - CFE_SB_TimeStampMsg((CFE_SB_Msg_t *) &CFE_ES_TaskData.OneAppPacket); - Result = CFE_SB_SendMsg((CFE_SB_Msg_t *) &CFE_ES_TaskData.OneAppPacket); + CFE_SB_TimeStampMsg((CFE_MSG_Message_t *) &CFE_ES_TaskData.OneAppPacket); + Result = CFE_SB_SendMsg((CFE_MSG_Message_t *) &CFE_ES_TaskData.OneAppPacket); if ( Result == CFE_SUCCESS ) { CFE_ES_TaskData.CommandCounter++; @@ -1641,22 +1641,27 @@ int32 CFE_ES_WriteERLogCmd(const CFE_ES_WriteERLog_t *data) /* */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -bool CFE_ES_VerifyCmdLength(CFE_SB_MsgPtr_t Msg, uint16 ExpectedLength) +bool CFE_ES_VerifyCmdLength(CFE_MSG_Message_t *MsgPtr, CFE_MSG_Size_t ExpectedLength) { - bool result = true; - uint16 ActualLength = CFE_SB_GetTotalMsgLength(Msg); + bool result = true; + CFE_MSG_Size_t ActualLength = 0; + CFE_MSG_FcnCode_t FcnCode = 0; + CFE_SB_MsgId_t MsgId = CFE_SB_INVALID_MSG_ID; + + CFE_MSG_GetSize(MsgPtr, &ActualLength); /* ** Verify the command packet length */ if (ExpectedLength != ActualLength) { - CFE_SB_MsgId_t MessageID = CFE_SB_GetMsgId(Msg); - uint16 CommandCode = CFE_SB_GetCmdCode(Msg); + CFE_MSG_GetMsgId(MsgPtr, &MsgId); + CFE_MSG_GetFcnCode(MsgPtr, &FcnCode); CFE_EVS_SendEvent(CFE_ES_LEN_ERR_EID, CFE_EVS_EventType_ERROR, - "Invalid cmd length: ID = 0x%X, CC = %d, Exp Len = %d, Len = %d", - (unsigned int)CFE_SB_MsgIdToValue(MessageID), (int)CommandCode, (int)ExpectedLength, (int)ActualLength); + "Invalid msg length: ID = 0x%X, CC = %u, Len = %u, Expected = %u", + (unsigned int)CFE_SB_MsgIdToValue(MsgId), (unsigned int)FcnCode, + (unsigned int)ActualLength, (unsigned int)ExpectedLength); result = false; CFE_ES_TaskData.CommandErrorCounter++; } @@ -1807,8 +1812,8 @@ int32 CFE_ES_SendMemPoolStatsCmd(const CFE_ES_SendMemPoolStats_t *data) /* ** Send memory statistics telemetry packet. */ - CFE_SB_TimeStampMsg((CFE_SB_Msg_t *) &CFE_ES_TaskData.MemStatsPacket); - CFE_SB_SendMsg((CFE_SB_Msg_t *) &CFE_ES_TaskData.MemStatsPacket); + CFE_SB_TimeStampMsg((CFE_MSG_Message_t *) &CFE_ES_TaskData.MemStatsPacket); + CFE_SB_SendMsg((CFE_MSG_Message_t *) &CFE_ES_TaskData.MemStatsPacket); CFE_ES_TaskData.CommandCounter++; CFE_EVS_SendEvent(CFE_ES_TLM_POOL_STATS_INFO_EID, CFE_EVS_EventType_DEBUG, diff --git a/fsw/cfe-core/src/es/cfe_es_task.h b/fsw/cfe-core/src/es/cfe_es_task.h index 83e142ac8..e687db466 100644 --- a/fsw/cfe-core/src/es/cfe_es_task.h +++ b/fsw/cfe-core/src/es/cfe_es_task.h @@ -120,8 +120,8 @@ typedef struct /* ** ES Task operational data (not reported in housekeeping) */ - CFE_SB_MsgPtr_t MsgPtr; - CFE_SB_PipeId_t CmdPipe; + CFE_MSG_Message_t *MsgPtr; + CFE_SB_PipeId_t CmdPipe; /* ** ES Task initialization data (not reported in housekeeping) @@ -160,7 +160,7 @@ extern CFE_ES_TaskData_t CFE_ES_TaskData; */ void CFE_ES_TaskMain(void); int32 CFE_ES_TaskInit(void); -void CFE_ES_TaskPipe(CFE_SB_MsgPtr_t Msg); +void CFE_ES_TaskPipe(CFE_MSG_Message_t *MsgPtr); /* @@ -204,7 +204,7 @@ int32 CFE_ES_DumpCDSRegistryCmd(const CFE_ES_DumpCDSRegistry_t *data); ** Message Handler Helper Functions */ bool CFE_ES_ValidateHandle(CFE_ES_MemHandle_t Handle); -bool CFE_ES_VerifyCmdLength(CFE_SB_MsgPtr_t msg, uint16 ExpectedLength); +bool CFE_ES_VerifyCmdLength(CFE_MSG_Message_t *MsgPtr, CFE_MSG_Size_t ExpectedLength); void CFE_ES_FileWriteByteCntErr(const char *Filename,uint32 Requested,uint32 Actual); /*************************************************************************/ diff --git a/fsw/cfe-core/src/evs/cfe_evs_task.c b/fsw/cfe-core/src/evs/cfe_evs_task.c index e5baec3cb..d9cd5f31b 100644 --- a/fsw/cfe-core/src/evs/cfe_evs_task.c +++ b/fsw/cfe-core/src/evs/cfe_evs_task.c @@ -53,8 +53,8 @@ CFE_EVS_GlobalData_t CFE_EVS_GlobalData; /* ** Local function prototypes. */ -void CFE_EVS_ProcessGroundCommand ( CFE_SB_MsgPtr_t EVS_MsgPtr ); -bool CFE_EVS_VerifyCmdLength(CFE_SB_MsgPtr_t Msg, uint16 ExpectedLength); +void CFE_EVS_ProcessGroundCommand(CFE_MSG_Message_t *MsgPtr, CFE_SB_MsgId_t MsgId); +bool CFE_EVS_VerifyCmdLength(CFE_MSG_Message_t *MsgPtr, CFE_MSG_Size_t ExpectedLength); /* Function Definitions */ @@ -86,8 +86,8 @@ int32 CFE_EVS_EarlyInit ( void ) memset(&CFE_EVS_GlobalData, 0, sizeof(CFE_EVS_GlobalData_t)); /* Initialize housekeeping packet */ - CFE_SB_InitMsg(&CFE_EVS_GlobalData.EVS_TlmPkt, CFE_SB_ValueToMsgId(CFE_EVS_HK_TLM_MID), - sizeof(CFE_EVS_GlobalData.EVS_TlmPkt), false); + CFE_MSG_Init(&CFE_EVS_GlobalData.EVS_TlmPkt.TlmHeader.BaseMsg, CFE_SB_ValueToMsgId(CFE_EVS_HK_TLM_MID), + sizeof(CFE_EVS_GlobalData.EVS_TlmPkt)); /* Elements stored in the hk packet that have non-zero default values */ CFE_EVS_GlobalData.EVS_TlmPkt.Payload.MessageFormatMode = CFE_PLATFORM_EVS_DEFAULT_MSG_FORMAT_MODE; @@ -212,8 +212,8 @@ int32 CFE_EVS_CleanUpApp(CFE_ES_ResourceID_t AppID) */ void CFE_EVS_TaskMain(void) { - int32 Status; - CFE_SB_MsgPtr_t EVS_MsgPtr; /* Pointer to SB message */ + int32 Status; + CFE_MSG_Message_t *MsgPtr; /* Pointer to SB message */ CFE_ES_PerfLogEntry(CFE_MISSION_EVS_MAIN_PERF_ID); @@ -244,7 +244,7 @@ void CFE_EVS_TaskMain(void) CFE_ES_PerfLogExit(CFE_MISSION_EVS_MAIN_PERF_ID); /* Pend on receipt of packet */ - Status = CFE_SB_RcvMsg(&EVS_MsgPtr, + Status = CFE_SB_RcvMsg(&MsgPtr, CFE_EVS_GlobalData.EVS_CommandPipe, CFE_SB_PEND_FOREVER); @@ -253,7 +253,7 @@ void CFE_EVS_TaskMain(void) if (Status == CFE_SUCCESS) { /* Process cmd pipe msg */ - CFE_EVS_ProcessCommandPacket(EVS_MsgPtr); + CFE_EVS_ProcessCommandPacket(MsgPtr); }else{ CFE_ES_WriteToSysLog("EVS:Error reading cmd pipe,RC=0x%08X\n",(unsigned int)Status); }/* end if */ @@ -352,23 +352,23 @@ int32 CFE_EVS_TaskInit ( void ) ** Assumptions and Notes: ** */ -void CFE_EVS_ProcessCommandPacket ( CFE_SB_MsgPtr_t EVS_MsgPtr ) +void CFE_EVS_ProcessCommandPacket(CFE_MSG_Message_t *MsgPtr) { - CFE_SB_MsgId_t MessageID; + CFE_SB_MsgId_t MessageID = CFE_SB_INVALID_MSG_ID; - MessageID = CFE_SB_GetMsgId(EVS_MsgPtr); + CFE_MSG_GetMsgId(MsgPtr, &MessageID); /* Process all SB messages */ switch (CFE_SB_MsgIdToValue(MessageID)) { case CFE_EVS_CMD_MID: /* EVS task specific command */ - CFE_EVS_ProcessGroundCommand(EVS_MsgPtr); + CFE_EVS_ProcessGroundCommand(MsgPtr, MessageID); break; case CFE_EVS_SEND_HK_MID: /* Housekeeping request */ - CFE_EVS_ReportHousekeepingCmd((CFE_SB_CmdHdr_t*)EVS_MsgPtr); + CFE_EVS_ReportHousekeepingCmd((CFE_SB_CmdHdr_t*)MsgPtr); break; default: @@ -396,179 +396,182 @@ void CFE_EVS_ProcessCommandPacket ( CFE_SB_MsgPtr_t EVS_MsgPtr ) ** Assumptions and Notes: ** */ -void CFE_EVS_ProcessGroundCommand ( CFE_SB_MsgPtr_t EVS_MsgPtr ) +void CFE_EVS_ProcessGroundCommand(CFE_MSG_Message_t *MsgPtr, CFE_SB_MsgId_t MsgId) { /* status will get reset if it passes length check */ - int32 Status = CFE_STATUS_WRONG_MSG_LENGTH; + int32 Status = CFE_STATUS_WRONG_MSG_LENGTH; + CFE_MSG_FcnCode_t FcnCode = 0; + + CFE_MSG_GetFcnCode(MsgPtr, &FcnCode); /* Process "known" EVS task ground commands */ - switch (CFE_SB_GetCmdCode(EVS_MsgPtr)) + switch (FcnCode) { case CFE_EVS_NOOP_CC: - if (CFE_EVS_VerifyCmdLength(EVS_MsgPtr, sizeof(CFE_EVS_Noop_t))) + if (CFE_EVS_VerifyCmdLength(MsgPtr, sizeof(CFE_EVS_Noop_t))) { - Status = CFE_EVS_NoopCmd((CFE_EVS_Noop_t*)EVS_MsgPtr); + Status = CFE_EVS_NoopCmd((CFE_EVS_Noop_t*)MsgPtr); } break; case CFE_EVS_RESET_COUNTERS_CC: - if (CFE_EVS_VerifyCmdLength(EVS_MsgPtr, sizeof(CFE_EVS_ResetCounters_t))) + if (CFE_EVS_VerifyCmdLength(MsgPtr, sizeof(CFE_EVS_ResetCounters_t))) { - Status = CFE_EVS_ResetCountersCmd((CFE_EVS_ResetCounters_t*)EVS_MsgPtr); + Status = CFE_EVS_ResetCountersCmd((CFE_EVS_ResetCounters_t*)MsgPtr); } break; case CFE_EVS_ENABLE_EVENT_TYPE_CC: - if (CFE_EVS_VerifyCmdLength(EVS_MsgPtr, sizeof(CFE_EVS_EnableEventType_t))) + if (CFE_EVS_VerifyCmdLength(MsgPtr, sizeof(CFE_EVS_EnableEventType_t))) { - Status = CFE_EVS_EnableEventTypeCmd((CFE_EVS_EnableEventType_t*)EVS_MsgPtr); + Status = CFE_EVS_EnableEventTypeCmd((CFE_EVS_EnableEventType_t*)MsgPtr); } break; case CFE_EVS_DISABLE_EVENT_TYPE_CC: - if (CFE_EVS_VerifyCmdLength(EVS_MsgPtr, sizeof(CFE_EVS_DisableEventType_t))) + if (CFE_EVS_VerifyCmdLength(MsgPtr, sizeof(CFE_EVS_DisableEventType_t))) { - Status = CFE_EVS_DisableEventTypeCmd((CFE_EVS_DisableEventType_t*)EVS_MsgPtr); + Status = CFE_EVS_DisableEventTypeCmd((CFE_EVS_DisableEventType_t*)MsgPtr); } break; case CFE_EVS_SET_EVENT_FORMAT_MODE_CC: - if (CFE_EVS_VerifyCmdLength(EVS_MsgPtr, sizeof(CFE_EVS_SetEventFormatMode_t))) + if (CFE_EVS_VerifyCmdLength(MsgPtr, sizeof(CFE_EVS_SetEventFormatMode_t))) { - Status = CFE_EVS_SetEventFormatModeCmd((CFE_EVS_SetEventFormatMode_t*)EVS_MsgPtr); + Status = CFE_EVS_SetEventFormatModeCmd((CFE_EVS_SetEventFormatMode_t*)MsgPtr); } break; case CFE_EVS_ENABLE_APP_EVENT_TYPE_CC: - if (CFE_EVS_VerifyCmdLength(EVS_MsgPtr, sizeof(CFE_EVS_EnableAppEventType_t))) + if (CFE_EVS_VerifyCmdLength(MsgPtr, sizeof(CFE_EVS_EnableAppEventType_t))) { - Status = CFE_EVS_EnableAppEventTypeCmd((CFE_EVS_EnableAppEventType_t*)EVS_MsgPtr); + Status = CFE_EVS_EnableAppEventTypeCmd((CFE_EVS_EnableAppEventType_t*)MsgPtr); } break; case CFE_EVS_DISABLE_APP_EVENT_TYPE_CC: - if (CFE_EVS_VerifyCmdLength(EVS_MsgPtr, sizeof(CFE_EVS_DisableAppEventType_t))) + if (CFE_EVS_VerifyCmdLength(MsgPtr, sizeof(CFE_EVS_DisableAppEventType_t))) { - Status = CFE_EVS_DisableAppEventTypeCmd((CFE_EVS_DisableAppEventType_t*)EVS_MsgPtr); + Status = CFE_EVS_DisableAppEventTypeCmd((CFE_EVS_DisableAppEventType_t*)MsgPtr); } break; case CFE_EVS_ENABLE_APP_EVENTS_CC: - if (CFE_EVS_VerifyCmdLength(EVS_MsgPtr, sizeof(CFE_EVS_EnableAppEvents_t))) + if (CFE_EVS_VerifyCmdLength(MsgPtr, sizeof(CFE_EVS_EnableAppEvents_t))) { - Status = CFE_EVS_EnableAppEventsCmd((CFE_EVS_EnableAppEvents_t*)EVS_MsgPtr); + Status = CFE_EVS_EnableAppEventsCmd((CFE_EVS_EnableAppEvents_t*)MsgPtr); } break; case CFE_EVS_DISABLE_APP_EVENTS_CC: - if (CFE_EVS_VerifyCmdLength(EVS_MsgPtr, sizeof(CFE_EVS_DisableAppEvents_t))) + if (CFE_EVS_VerifyCmdLength(MsgPtr, sizeof(CFE_EVS_DisableAppEvents_t))) { - Status = CFE_EVS_DisableAppEventsCmd((CFE_EVS_DisableAppEvents_t*)EVS_MsgPtr); + Status = CFE_EVS_DisableAppEventsCmd((CFE_EVS_DisableAppEvents_t*)MsgPtr); } break; case CFE_EVS_RESET_APP_COUNTER_CC: - if (CFE_EVS_VerifyCmdLength(EVS_MsgPtr, sizeof(CFE_EVS_ResetAppCounter_t))) + if (CFE_EVS_VerifyCmdLength(MsgPtr, sizeof(CFE_EVS_ResetAppCounter_t))) { - Status = CFE_EVS_ResetAppCounterCmd((CFE_EVS_ResetAppCounter_t*)EVS_MsgPtr); + Status = CFE_EVS_ResetAppCounterCmd((CFE_EVS_ResetAppCounter_t*)MsgPtr); } break; case CFE_EVS_SET_FILTER_CC: - if (CFE_EVS_VerifyCmdLength(EVS_MsgPtr, (uint16) sizeof(CFE_EVS_SetFilter_t))) + if (CFE_EVS_VerifyCmdLength(MsgPtr, (uint16) sizeof(CFE_EVS_SetFilter_t))) { - Status = CFE_EVS_SetFilterCmd((CFE_EVS_SetFilter_t*)EVS_MsgPtr); + Status = CFE_EVS_SetFilterCmd((CFE_EVS_SetFilter_t*)MsgPtr); } break; case CFE_EVS_ENABLE_PORTS_CC: - if (CFE_EVS_VerifyCmdLength(EVS_MsgPtr, sizeof(CFE_EVS_EnablePorts_t))) + if (CFE_EVS_VerifyCmdLength(MsgPtr, sizeof(CFE_EVS_EnablePorts_t))) { - Status = CFE_EVS_EnablePortsCmd((CFE_EVS_EnablePorts_t*)EVS_MsgPtr); + Status = CFE_EVS_EnablePortsCmd((CFE_EVS_EnablePorts_t*)MsgPtr); } break; case CFE_EVS_DISABLE_PORTS_CC: - if (CFE_EVS_VerifyCmdLength(EVS_MsgPtr, sizeof(CFE_EVS_DisablePorts_t))) + if (CFE_EVS_VerifyCmdLength(MsgPtr, sizeof(CFE_EVS_DisablePorts_t))) { - Status = CFE_EVS_DisablePortsCmd((CFE_EVS_DisablePorts_t*)EVS_MsgPtr); + Status = CFE_EVS_DisablePortsCmd((CFE_EVS_DisablePorts_t*)MsgPtr); } break; case CFE_EVS_RESET_FILTER_CC: - if (CFE_EVS_VerifyCmdLength(EVS_MsgPtr, sizeof(CFE_EVS_ResetFilter_t))) + if (CFE_EVS_VerifyCmdLength(MsgPtr, sizeof(CFE_EVS_ResetFilter_t))) { - Status = CFE_EVS_ResetFilterCmd((CFE_EVS_ResetFilter_t*)EVS_MsgPtr); + Status = CFE_EVS_ResetFilterCmd((CFE_EVS_ResetFilter_t*)MsgPtr); } break; case CFE_EVS_RESET_ALL_FILTERS_CC: - if (CFE_EVS_VerifyCmdLength(EVS_MsgPtr, sizeof(CFE_EVS_ResetAllFilters_t))) + if (CFE_EVS_VerifyCmdLength(MsgPtr, sizeof(CFE_EVS_ResetAllFilters_t))) { - Status = CFE_EVS_ResetAllFiltersCmd((CFE_EVS_ResetAllFilters_t*)EVS_MsgPtr); + Status = CFE_EVS_ResetAllFiltersCmd((CFE_EVS_ResetAllFilters_t*)MsgPtr); } break; case CFE_EVS_ADD_EVENT_FILTER_CC: - if (CFE_EVS_VerifyCmdLength(EVS_MsgPtr, sizeof(CFE_EVS_AddEventFilter_t))) + if (CFE_EVS_VerifyCmdLength(MsgPtr, sizeof(CFE_EVS_AddEventFilter_t))) { - Status = CFE_EVS_AddEventFilterCmd((CFE_EVS_AddEventFilter_t*)EVS_MsgPtr); + Status = CFE_EVS_AddEventFilterCmd((CFE_EVS_AddEventFilter_t*)MsgPtr); } break; case CFE_EVS_DELETE_EVENT_FILTER_CC: - if (CFE_EVS_VerifyCmdLength(EVS_MsgPtr, sizeof(CFE_EVS_DeleteEventFilter_t))) + if (CFE_EVS_VerifyCmdLength(MsgPtr, sizeof(CFE_EVS_DeleteEventFilter_t))) { - Status = CFE_EVS_DeleteEventFilterCmd((CFE_EVS_DeleteEventFilter_t*)EVS_MsgPtr); + Status = CFE_EVS_DeleteEventFilterCmd((CFE_EVS_DeleteEventFilter_t*)MsgPtr); } break; case CFE_EVS_WRITE_APP_DATA_FILE_CC: - if (CFE_EVS_VerifyCmdLength(EVS_MsgPtr, sizeof(CFE_EVS_WriteAppDataFile_t))) + if (CFE_EVS_VerifyCmdLength(MsgPtr, sizeof(CFE_EVS_WriteAppDataFile_t))) { - Status = CFE_EVS_WriteAppDataFileCmd((CFE_EVS_WriteAppDataFile_t*)EVS_MsgPtr); + Status = CFE_EVS_WriteAppDataFileCmd((CFE_EVS_WriteAppDataFile_t*)MsgPtr); } break; case CFE_EVS_SET_LOG_MODE_CC: - if (CFE_EVS_VerifyCmdLength(EVS_MsgPtr, sizeof(CFE_EVS_SetLogMode_t))) + if (CFE_EVS_VerifyCmdLength(MsgPtr, sizeof(CFE_EVS_SetLogMode_t))) { - Status = CFE_EVS_SetLogModeCmd((CFE_EVS_SetLogMode_t*)EVS_MsgPtr); + Status = CFE_EVS_SetLogModeCmd((CFE_EVS_SetLogMode_t*)MsgPtr); } break; case CFE_EVS_CLEAR_LOG_CC: - if (CFE_EVS_VerifyCmdLength(EVS_MsgPtr, sizeof(CFE_EVS_ClearLog_t))) + if (CFE_EVS_VerifyCmdLength(MsgPtr, sizeof(CFE_EVS_ClearLog_t))) { - Status = CFE_EVS_ClearLogCmd((CFE_EVS_ClearLog_t *)EVS_MsgPtr); + Status = CFE_EVS_ClearLogCmd((CFE_EVS_ClearLog_t *)MsgPtr); } break; case CFE_EVS_WRITE_LOG_DATA_FILE_CC: - if (CFE_EVS_VerifyCmdLength(EVS_MsgPtr, sizeof(CFE_EVS_WriteLogDataFile_t))) + if (CFE_EVS_VerifyCmdLength(MsgPtr, sizeof(CFE_EVS_WriteLogDataFile_t))) { - Status = CFE_EVS_WriteLogDataFileCmd((CFE_EVS_WriteLogDataFile_t*)EVS_MsgPtr); + Status = CFE_EVS_WriteLogDataFileCmd((CFE_EVS_WriteLogDataFile_t*)MsgPtr); } break; @@ -576,9 +579,9 @@ void CFE_EVS_ProcessGroundCommand ( CFE_SB_MsgPtr_t EVS_MsgPtr ) default: EVS_SendEvent(CFE_EVS_ERR_CC_EID, CFE_EVS_EventType_ERROR, - "Invalid command code -- ID = 0x%08x, CC = %d", - (unsigned int)CFE_SB_MsgIdToValue(CFE_SB_GetMsgId(EVS_MsgPtr)), - (int)CFE_SB_GetCmdCode(EVS_MsgPtr)); + "Invalid command code -- ID = 0x%08x, CC = %u", + (unsigned int)CFE_SB_MsgIdToValue(MsgId), + (unsigned int)FcnCode); Status = CFE_STATUS_BAD_COMMAND_CODE; break; @@ -608,23 +611,27 @@ void CFE_EVS_ProcessGroundCommand ( CFE_SB_MsgPtr_t EVS_MsgPtr ) ** Assumptions and Notes: ** */ -bool CFE_EVS_VerifyCmdLength(CFE_SB_MsgPtr_t Msg, uint16 ExpectedLength) +bool CFE_EVS_VerifyCmdLength(CFE_MSG_Message_t *MsgPtr, CFE_MSG_Size_t ExpectedLength) { - bool result = true; - uint16 ActualLength = CFE_SB_GetTotalMsgLength(Msg); + bool result = true; + CFE_MSG_Size_t ActualLength = 0; + CFE_MSG_FcnCode_t FcnCode = 0; + CFE_SB_MsgId_t MsgId = CFE_SB_INVALID_MSG_ID; + + CFE_MSG_GetSize(MsgPtr, &ActualLength); /* ** Verify the command packet length */ if (ExpectedLength != ActualLength) { - CFE_SB_MsgId_t MessageID = CFE_SB_GetMsgId(Msg); - uint16 CommandCode = CFE_SB_GetCmdCode(Msg); + CFE_MSG_GetMsgId(MsgPtr, &MsgId); + CFE_MSG_GetFcnCode(MsgPtr, &FcnCode); EVS_SendEvent(CFE_EVS_LEN_ERR_EID, CFE_EVS_EventType_ERROR, - "Invalid cmd length: ID = 0x%X, CC = %d, Exp Len = %d, Len = %d", - (unsigned int)CFE_SB_MsgIdToValue(MessageID), - (int)CommandCode, (int)ExpectedLength, (int)ActualLength); + "Invalid msg length: ID = 0x%X, CC = %u, Len = %u, Expected = %u", + (unsigned int)CFE_SB_MsgIdToValue(MsgId), (unsigned int)FcnCode, + (unsigned int)ActualLength, (unsigned int)ExpectedLength); result = false; } @@ -725,9 +732,9 @@ int32 CFE_EVS_ReportHousekeepingCmd (const CFE_SB_CmdHdr_t *data) AppTlmDataPtr->AppMessageSentCounter = 0; } - CFE_SB_TimeStampMsg((CFE_SB_Msg_t *) &CFE_EVS_GlobalData.EVS_TlmPkt); + CFE_SB_TimeStampMsg((CFE_MSG_Message_t *) &CFE_EVS_GlobalData.EVS_TlmPkt); - CFE_SB_SendMsg((CFE_SB_Msg_t *) &CFE_EVS_GlobalData.EVS_TlmPkt); + CFE_SB_SendMsg((CFE_MSG_Message_t *) &CFE_EVS_GlobalData.EVS_TlmPkt); return CFE_STATUS_NO_COUNTER_INCREMENT; } /* End of CFE_EVS_ReportHousekeepingCmd() */ diff --git a/fsw/cfe-core/src/evs/cfe_evs_task.h b/fsw/cfe-core/src/evs/cfe_evs_task.h index 15a1ad321..bf6007f3b 100644 --- a/fsw/cfe-core/src/evs/cfe_evs_task.h +++ b/fsw/cfe-core/src/evs/cfe_evs_task.h @@ -140,7 +140,7 @@ extern CFE_EVS_GlobalData_t CFE_EVS_GlobalData; * Functions used within this module and by the unit test */ extern int32 CFE_EVS_TaskInit (void); -extern void CFE_EVS_ProcessCommandPacket ( CFE_SB_MsgPtr_t EVS_MsgPtr ); +extern void CFE_EVS_ProcessCommandPacket(CFE_MSG_Message_t *MsgPtr); /* * EVS Message Handler Functions diff --git a/fsw/cfe-core/src/evs/cfe_evs_utils.c b/fsw/cfe-core/src/evs/cfe_evs_utils.c index 906d808b0..41c12a961 100644 --- a/fsw/cfe-core/src/evs/cfe_evs_utils.c +++ b/fsw/cfe-core/src/evs/cfe_evs_utils.c @@ -404,8 +404,8 @@ void EVS_GenerateEventTelemetry(EVS_AppData_t *AppDataPtr, uint16 EventID, uint1 int ExpandedLength; /* Initialize EVS event packets */ - CFE_SB_InitMsg(&LongEventTlm, CFE_SB_ValueToMsgId(CFE_EVS_LONG_EVENT_MSG_MID), - sizeof(LongEventTlm), true); + CFE_MSG_Init(&LongEventTlm.TlmHeader.BaseMsg, CFE_SB_ValueToMsgId(CFE_EVS_LONG_EVENT_MSG_MID), + sizeof(LongEventTlm)); LongEventTlm.Payload.PacketID.EventID = EventID; LongEventTlm.Payload.PacketID.EventType = EventType; @@ -428,7 +428,7 @@ void EVS_GenerateEventTelemetry(EVS_AppData_t *AppDataPtr, uint16 EventID, uint1 LongEventTlm.Payload.PacketID.ProcessorID = CFE_PSP_GetProcessorId(); /* Set the packet timestamp */ - CFE_SB_SetMsgTime((CFE_SB_Msg_t *) &LongEventTlm, *TimeStamp); + CFE_MSG_SetMsgTime((CFE_MSG_Message_t *) &LongEventTlm, *TimeStamp); /* Write event to the event log */ EVS_AddLog(&LongEventTlm); @@ -439,7 +439,7 @@ void EVS_GenerateEventTelemetry(EVS_AppData_t *AppDataPtr, uint16 EventID, uint1 if (CFE_EVS_GlobalData.EVS_TlmPkt.Payload.MessageFormatMode == CFE_EVS_MsgFormat_LONG) { /* Send long event via SoftwareBus */ - CFE_SB_SendMsg((CFE_SB_Msg_t *) &LongEventTlm); + CFE_SB_SendMsg((CFE_MSG_Message_t *) &LongEventTlm); } else if (CFE_EVS_GlobalData.EVS_TlmPkt.Payload.MessageFormatMode == CFE_EVS_MsgFormat_SHORT) { @@ -449,11 +449,11 @@ void EVS_GenerateEventTelemetry(EVS_AppData_t *AppDataPtr, uint16 EventID, uint1 * * This goes out on a separate message ID. */ - CFE_SB_InitMsg(&ShortEventTlm, CFE_SB_ValueToMsgId(CFE_EVS_SHORT_EVENT_MSG_MID), - sizeof(ShortEventTlm), true); - CFE_SB_SetMsgTime((CFE_SB_Msg_t *) &ShortEventTlm, *TimeStamp); + CFE_MSG_Init(&ShortEventTlm.TlmHeader.BaseMsg, CFE_SB_ValueToMsgId(CFE_EVS_SHORT_EVENT_MSG_MID), + sizeof(ShortEventTlm)); + CFE_MSG_SetMsgTime((CFE_MSG_Message_t *) &ShortEventTlm, *TimeStamp); ShortEventTlm.Payload.PacketID = LongEventTlm.Payload.PacketID; - CFE_SB_SendMsg((CFE_SB_Msg_t *) &ShortEventTlm); + CFE_SB_SendMsg((CFE_MSG_Message_t *) &ShortEventTlm); } /* Increment message send counters (prevent rollover) */ diff --git a/fsw/cfe-core/src/inc/cfe_error.h b/fsw/cfe-core/src/inc/cfe_error.h index 4a62d6ac0..b561c2bfa 100644 --- a/fsw/cfe-core/src/inc/cfe_error.h +++ b/fsw/cfe-core/src/inc/cfe_error.h @@ -856,7 +856,7 @@ typedef int32 CFE_Status_t; /** * @brief Wrong Message Type * - * This error code will be returned when a request such as #CFE_SB_SetMsgTime + * This error code will be returned when a request such as #CFE_MSG_SetMsgTime * is made on a packet that does not include a field for msg time. * */ diff --git a/fsw/cfe-core/src/inc/cfe_es_msg.h b/fsw/cfe-core/src/inc/cfe_es_msg.h index 5f6b71ff3..2f370a55f 100644 --- a/fsw/cfe-core/src/inc/cfe_es_msg.h +++ b/fsw/cfe-core/src/inc/cfe_es_msg.h @@ -1531,7 +1531,7 @@ typedef struct CFE_ES_OneAppTlm_Payload typedef struct CFE_ES_OneAppTlm { - uint8 TlmHeader[CFE_SB_TLM_HDR_SIZE]; /**< \brief cFE Software Bus Telemetry Message Header */ + CFE_SB_TlmHdr_t TlmHeader; /**< \brief cFE Software Bus Telemetry Message Header */ CFE_ES_OneAppTlm_Payload_t Payload; } CFE_ES_OneAppTlm_t; @@ -1547,7 +1547,7 @@ typedef struct CFE_ES_PoolStatsTlm_Payload typedef struct CFE_ES_MemStatsTlm { - uint8 TlmHeader[CFE_SB_TLM_HDR_SIZE]; /**< \brief cFE Software Bus Telemetry Message Header */ + CFE_SB_TlmHdr_t TlmHeader; /**< \brief cFE Software Bus Telemetry Message Header */ CFE_ES_PoolStatsTlm_Payload_t Payload; } CFE_ES_MemStatsTlm_t; @@ -1644,8 +1644,8 @@ typedef struct CFE_ES_HousekeepingTlm_Payload typedef struct CFE_ES_HousekeepingTlm { - uint8 TlmHeader[CFE_SB_TLM_HDR_SIZE]; /**< \brief cFE Software Bus Telemetry Message Header */ - CFE_ES_HousekeepingTlm_Payload_t Payload; + CFE_SB_TlmHdr_t TlmHeader; /**< \brief cFE Software Bus Telemetry Message Header */ + CFE_ES_HousekeepingTlm_Payload_t Payload; } CFE_ES_HousekeepingTlm_t; diff --git a/fsw/cfe-core/src/inc/cfe_evs_msg.h b/fsw/cfe-core/src/inc/cfe_evs_msg.h index 23e7cda08..63c9496ef 100644 --- a/fsw/cfe-core/src/inc/cfe_evs_msg.h +++ b/fsw/cfe-core/src/inc/cfe_evs_msg.h @@ -1181,7 +1181,7 @@ typedef struct CFE_EVS_HousekeepingTlm_Payload { } CFE_EVS_HousekeepingTlm_Payload_t; typedef struct CFE_EVS_HousekeepingTlm { - uint8 TlmHeader[CFE_SB_TLM_HDR_SIZE]; + CFE_SB_TlmHdr_t TlmHeader; CFE_EVS_HousekeepingTlm_Payload_t Payload; } CFE_EVS_HousekeepingTlm_t; @@ -1224,13 +1224,13 @@ typedef struct CFE_EVS_ShortEventTlm_Payload { } CFE_EVS_ShortEventTlm_Payload_t; typedef struct CFE_EVS_LongEventTlm { - uint8 TlmHeader[CFE_SB_TLM_HDR_SIZE]; + CFE_SB_TlmHdr_t TlmHeader; CFE_EVS_LongEventTlm_Payload_t Payload; } CFE_EVS_LongEventTlm_t; typedef struct CFE_EVS_ShortEventTlm { - uint8 TlmHeader[CFE_SB_TLM_HDR_SIZE]; + CFE_SB_TlmHdr_t TlmHeader; CFE_EVS_ShortEventTlm_Payload_t Payload; } CFE_EVS_ShortEventTlm_t; diff --git a/fsw/cfe-core/src/inc/cfe_sb.h b/fsw/cfe-core/src/inc/cfe_sb.h index 59b9ac419..e4bb24a49 100644 --- a/fsw/cfe-core/src/inc/cfe_sb.h +++ b/fsw/cfe-core/src/inc/cfe_sb.h @@ -103,14 +103,16 @@ */ #define CFE_SB_INVALID_MSG_ID CFE_SB_MSGID_RESERVED +#ifndef CFE_OMIT_DEPRECATED_6_8 /** * \defgroup CFESBPktTypeDefs cFE SB Packet Type Defines * \{ */ -#define CFE_SB_PKTTYPE_INVALID 0 /**< \brief #CFE_SB_GetPktType response if message type can not be determined */ -#define CFE_SB_PKTTYPE_CMD 1 /**< \brief #CFE_SB_GetPktType response for command packets */ -#define CFE_SB_PKTTYPE_TLM 2 /**< \brief #CFE_SB_GetPktType response for telemetry packets */ +#define CFE_SB_PKTTYPE_INVALID CFE_MSG_Type_Invalid /**< \brief #CFE_SB_GetPktType response if message type can not be determined */ +#define CFE_SB_PKTTYPE_CMD CFE_MSG_Type_Cmd /**< \brief #CFE_SB_GetPktType response for command packets */ +#define CFE_SB_PKTTYPE_TLM CFE_MSG_Type_Tlm /**< \brief #CFE_SB_GetPktType response for telemetry packets */ /** \} */ +#endif /* CFE_OMIT_DEPRECATED_6_8 */ /* ** Macro Definitions @@ -147,19 +149,21 @@ ** Type Definitions */ +#ifndef CFE_OMIT_DEPRECATED_6_8 /** \brief Software Bus generic message */ typedef CFE_MSG_Message_t CFE_SB_Msg_t; +#endif /* CFE_OMIT_DEPRECATED_6_8 */ /** \brief Aligned Software Bus command header */ typedef union CFE_SB_CmdHdr { CFE_MSG_CommandHeader_t Cmd; - CFE_SB_Msg_t BaseMsg; + CFE_MSG_Message_t BaseMsg; } CFE_SB_CmdHdr_t; /** \brief Aligned Software Bus telemetry header */ typedef union CFE_SB_TlmHdr { CFE_MSG_TelemetryHeader_t Tlm; - CFE_SB_Msg_t BaseMsg; + CFE_MSG_Message_t BaseMsg; } CFE_SB_TlmHdr_t; #define CFE_SB_CMD_HDR_SIZE (sizeof(CFE_SB_CmdHdr_t))/**< \brief Size of #CFE_SB_CmdHdr_t in bytes */ @@ -179,11 +183,13 @@ typedef uint32 CFE_SB_TimeOut_t; */ typedef uint8 CFE_SB_PipeId_t; -/** \brief CFE_SB_MsgPtr_t defined as a pointer to an SB Message */ -typedef CFE_SB_Msg_t *CFE_SB_MsgPtr_t; +#ifndef CFE_OMIT_DEPRECATED_6_8 +/** \brief Pointer to an SB Message */ +typedef CFE_MSG_Message_t *CFE_SB_MsgPtr_t; /** \brief CFE_SB_MsgPayloadPtr_t defined as an opaque pointer to a message Payload portion */ typedef uint8 *CFE_SB_MsgPayloadPtr_t; +#endif /* CFE_OMIT_DEPRECATED_6_8 */ /** \brief CFE_SB_ZeroCopyHandle_t to primitive type definition ** @@ -542,8 +548,8 @@ CFE_Status_t CFE_SB_UnsubscribeLocal(CFE_SB_MsgId_t MsgId, CFE_SB_PipeId_t PipeI ** of a telemetry message. ** ** \param[in] MsgPtr A pointer to the message to be sent. This must point -** to the first byte of the software bus message header -** (#CFE_SB_Msg_t). +** to the first byte of the message header +** (#CFE_MSG_Message_t). ** ** \return Execution status, see \ref CFEReturnCodes ** \retval #CFE_SUCCESS \copybrief CFE_SUCCESS @@ -553,7 +559,7 @@ CFE_Status_t CFE_SB_UnsubscribeLocal(CFE_SB_MsgId_t MsgId, CFE_SB_PipeId_t PipeI ** ** \sa #CFE_SB_RcvMsg, #CFE_SB_ZeroCopySend, #CFE_SB_PassMsg **/ -CFE_Status_t CFE_SB_SendMsg(CFE_SB_Msg_t *MsgPtr); +CFE_Status_t CFE_SB_SendMsg(CFE_MSG_Message_t *MsgPtr); /*****************************************************************************/ /** @@ -575,8 +581,8 @@ CFE_Status_t CFE_SB_SendMsg(CFE_SB_Msg_t *MsgPtr); ** sequence counter in a telemetry message. ** ** \param[in] MsgPtr A pointer to the message to be sent. This must point -** to the first byte of the software bus message header -** (#CFE_SB_Msg_t). +** to the first byte of the message header +** (#CFE_MSG_Message_t). ** ** \return Execution status, see \ref CFEReturnCodes ** \retval #CFE_SUCCESS \copybrief CFE_SUCCESS @@ -586,7 +592,7 @@ CFE_Status_t CFE_SB_SendMsg(CFE_SB_Msg_t *MsgPtr); ** ** \sa #CFE_SB_RcvMsg, #CFE_SB_ZeroCopySend, #CFE_SB_SendMsg **/ -CFE_Status_t CFE_SB_PassMsg(CFE_SB_Msg_t *MsgPtr); +CFE_Status_t CFE_SB_PassMsg(CFE_MSG_Message_t *MsgPtr); /*****************************************************************************/ /** @@ -602,16 +608,17 @@ CFE_Status_t CFE_SB_PassMsg(CFE_SB_Msg_t *MsgPtr); ** random. Therefore, it is recommended that the return code be tested ** for CFE_SUCCESS before processing the message. ** -** \param[in, out] BufPtr A pointer to a local variable of type #CFE_SB_MsgPtr_t. -** Typically a caller declares a ptr of type CFE_SB_Msg_t -** (i.e. CFE_SB_Msg_t *Ptr) then gives the address of that +** \param[in, out] BufPtr A pointer to a message pointer. +** Typically a caller declares a ptr of type CFE_MSG_Message_t +** (i.e. CFE_MSG_Message_t *Ptr) then gives the address of that ** pointer (&Ptr) as this parmeter. After a successful ** receipt of a message, *BufPtr will point to the first ** byte of the software bus message header. This should be ** used as a read-only pointer (in systems with an MMU, ** writes to this pointer may cause a memory protection fault). ** The *BufPtr is valid only until the next call to -** CFE_SB_RcvMsg for the same pipe. \n *BufPtr is a pointer to the message obtained from the pipe. Valid +** CFE_SB_RcvMsg for the same pipe. \n *BufPtr is a pointer +** to the message obtained from the pipe. Valid ** only until the next call to CFE_SB_RcvMsg for the same pipe. ** ** \param[in] PipeId The pipe ID of the pipe containing the message to be obtained. @@ -630,7 +637,7 @@ CFE_Status_t CFE_SB_PassMsg(CFE_SB_Msg_t *MsgPtr); ** ** \sa #CFE_SB_SendMsg, #CFE_SB_ZeroCopySend **/ -CFE_Status_t CFE_SB_RcvMsg(CFE_SB_MsgPtr_t *BufPtr, CFE_SB_PipeId_t PipeId, int32 TimeOut); +CFE_Status_t CFE_SB_RcvMsg(CFE_MSG_Message_t **BufPtr, CFE_SB_PipeId_t PipeId, int32 TimeOut); /**@}*/ /** @defgroup CFEAPISBZeroCopy cFE Zero Copy Message APIs @@ -671,8 +678,8 @@ CFE_Status_t CFE_SB_RcvMsg(CFE_SB_MsgPtr_t *BufPtr, CFE_SB_PipeId_t PipeId, int ** ** \sa #CFE_SB_ZeroCopyReleasePtr, #CFE_SB_ZeroCopySend **/ -CFE_SB_Msg_t *CFE_SB_ZeroCopyGetPtr(uint16 MsgSize, - CFE_SB_ZeroCopyHandle_t *BufferHandle); +CFE_MSG_Message_t *CFE_SB_ZeroCopyGetPtr(uint16 MsgSize, + CFE_SB_ZeroCopyHandle_t *BufferHandle); /*****************************************************************************/ /** @@ -701,7 +708,7 @@ CFE_SB_Msg_t *CFE_SB_ZeroCopyGetPtr(uint16 MsgSize, ** ** \sa #CFE_SB_ZeroCopyGetPtr, #CFE_SB_ZeroCopySend **/ -CFE_Status_t CFE_SB_ZeroCopyReleasePtr(CFE_SB_Msg_t *Ptr2Release, CFE_SB_ZeroCopyHandle_t BufferHandle); +CFE_Status_t CFE_SB_ZeroCopyReleasePtr(CFE_MSG_Message_t *Ptr2Release, CFE_SB_ZeroCopyHandle_t BufferHandle); /*****************************************************************************/ /** @@ -741,7 +748,7 @@ CFE_Status_t CFE_SB_ZeroCopyReleasePtr(CFE_SB_Msg_t *Ptr2Release, CFE_SB_ZeroCop ** ** \sa #CFE_SB_SendMsg, #CFE_SB_RcvMsg, #CFE_SB_ZeroCopyReleasePtr, #CFE_SB_ZeroCopyGetPtr **/ -CFE_Status_t CFE_SB_ZeroCopySend(CFE_SB_Msg_t *MsgPtr, CFE_SB_ZeroCopyHandle_t BufferHandle); +CFE_Status_t CFE_SB_ZeroCopySend(CFE_MSG_Message_t *MsgPtr, CFE_SB_ZeroCopyHandle_t BufferHandle); /*****************************************************************************/ /** @@ -783,16 +790,19 @@ CFE_Status_t CFE_SB_ZeroCopySend(CFE_SB_Msg_t *MsgPtr, CFE_SB_ZeroCopyHandle_t B ** ** \sa #CFE_SB_PassMsg, #CFE_SB_ZeroCopySend, #CFE_SB_ZeroCopyReleasePtr, #CFE_SB_ZeroCopyGetPtr **/ -CFE_Status_t CFE_SB_ZeroCopyPass(CFE_SB_Msg_t *MsgPtr, CFE_SB_ZeroCopyHandle_t BufferHandle); +CFE_Status_t CFE_SB_ZeroCopyPass(CFE_MSG_Message_t *MsgPtr, CFE_SB_ZeroCopyHandle_t BufferHandle); /**@}*/ /** @defgroup CFEAPISBSetMessage cFE Setting Message Characteristics APIs * @{ */ +#ifndef CFE_OMIT_DEPRECATED_6_8 + /*****************************************************************************/ /** -** \brief Initialize a buffer for a software bus message. +** \brief DEPRECATED - Initialize a buffer for a software bus message. +** \deprecated Use CFE_MSG_Init ** ** \par Description ** This routine fills in the header information needed to create a @@ -814,9 +824,6 @@ CFE_Status_t CFE_SB_ZeroCopyPass(CFE_SB_Msg_t *MsgPtr, CFE_SB_ZeroCopyHandle_t B ** \param[in] Clear A flag indicating whether to clear the rest of the message: ** \arg true - fill sequence count and packet data with zeroes. ** \arg false - leave sequence count and packet data unchanged. -** -** \sa #CFE_SB_SetMsgId, #CFE_SB_SetUserDataLength, #CFE_SB_SetTotalMsgLength, -** #CFE_SB_SetMsgTime, #CFE_SB_TimeStampMsg, #CFE_SB_SetCmdCode **/ void CFE_SB_InitMsg(void *MsgPtr, CFE_SB_MsgId_t MsgId, @@ -825,7 +832,8 @@ void CFE_SB_InitMsg(void *MsgPtr, /*****************************************************************************/ /** -** \brief Sets the message ID of a software bus message. +** \brief DEPRECATED - Sets the message ID of a software bus message. +** \deprecated Use CFE_MSG_SetMsgId ** ** \par Description ** This routine sets the Message ID in a software bus message header. @@ -837,13 +845,10 @@ void CFE_SB_InitMsg(void *MsgPtr, ** This must point to the first byte of the message header. ** ** \param[in] MsgId The message ID to put into the message header. -** -** -** \sa #CFE_SB_GetMsgId, #CFE_SB_SetUserDataLength, #CFE_SB_SetTotalMsgLength, -** #CFE_SB_SetMsgTime, #CFE_SB_TimeStampMsg, #CFE_SB_SetCmdCode, #CFE_SB_InitMsg **/ -void CFE_SB_SetMsgId(CFE_SB_MsgPtr_t MsgPtr, +void CFE_SB_SetMsgId(CFE_MSG_Message_t *MsgPtr, CFE_SB_MsgId_t MsgId); +#endif /* CFE_OMIT_DEPRECATED_6_8 */ /*****************************************************************************/ /** @@ -864,15 +869,14 @@ void CFE_SB_SetMsgId(CFE_SB_MsgPtr_t MsgPtr, ** This must point to the first byte of the message header. ** ** \param[in] DataLength The length to set (size of the user data, in bytes). -** -** \sa #CFE_SB_SetMsgId, #CFE_SB_GetUserDataLength, #CFE_SB_SetTotalMsgLength, -** #CFE_SB_SetMsgTime, #CFE_SB_TimeStampMsg, #CFE_SB_SetCmdCode, #CFE_SB_InitMsg **/ -void CFE_SB_SetUserDataLength(CFE_SB_MsgPtr_t MsgPtr,uint16 DataLength); +void CFE_SB_SetUserDataLength(CFE_MSG_Message_t *MsgPtr,uint16 DataLength); +#ifndef CFE_OMIT_DEPRECATED_6_8 /*****************************************************************************/ /** -** \brief Sets the total length of a software bus message. +** \brief DEPRECATED: Sets the total length of a software bus message. +** \deprecated Use CFE_MSG_SetSize ** ** \par Description ** This routine sets the field in the SB message header that determines @@ -889,20 +893,18 @@ void CFE_SB_SetUserDataLength(CFE_SB_MsgPtr_t MsgPtr,uint16 DataLength); ** ** \param[in] TotalLength The length to set (total size of the message, in bytes, ** including headers). -** -** \sa #CFE_SB_SetMsgId, #CFE_SB_SetUserDataLength, #CFE_SB_GetTotalMsgLength, -** #CFE_SB_SetMsgTime, #CFE_SB_TimeStampMsg, #CFE_SB_SetCmdCode, #CFE_SB_InitMsg **/ -void CFE_SB_SetTotalMsgLength(CFE_SB_MsgPtr_t MsgPtr,uint16 TotalLength); +void CFE_SB_SetTotalMsgLength(CFE_MSG_Message_t *MsgPtr,uint16 TotalLength); /*****************************************************************************/ /** ** \brief Sets the time field in a software bus message. +** \deprecated Use CFE_MSG_SetMsgTime ** ** \par Description ** This routine sets the time of a software bus message. Most applications ** will want to use #CFE_SB_TimeStampMsg instead of this function. But, -** when needed, #CFE_SB_SetMsgTime can be used to send a group of SB messages +** when needed, this API can be used to send a group of SB messages ** with identical time stamps. ** ** \par Assumptions, External Events, and Notes: @@ -921,11 +923,10 @@ void CFE_SB_SetTotalMsgLength(CFE_SB_MsgPtr_t MsgPtr,uint16 TotalLength); ** \return Execution status, see \ref CFEReturnCodes ** \retval #CFE_SUCCESS \copybrief CFE_SUCCESS ** \retval #CFE_SB_WRONG_MSG_TYPE \copybrief CFE_SB_WRONG_MSG_TYPE -** -** \sa #CFE_SB_SetMsgId, #CFE_SB_SetUserDataLength, #CFE_SB_SetTotalMsgLength, -** #CFE_SB_GetMsgTime, #CFE_SB_TimeStampMsg, #CFE_SB_SetCmdCode, #CFE_SB_InitMsg **/ -CFE_Status_t CFE_SB_SetMsgTime(CFE_SB_MsgPtr_t MsgPtr, CFE_TIME_SysTime_t Time); +CFE_Status_t CFE_SB_SetMsgTime(CFE_MSG_Message_t *MsgPtr, CFE_TIME_SysTime_t Time); +#endif /* CFE_OMIT_DEPRECATED_6_8 */ + /*****************************************************************************/ /** @@ -942,15 +943,14 @@ CFE_Status_t CFE_SB_SetMsgTime(CFE_SB_MsgPtr_t MsgPtr, CFE_TIME_SysTime_t Time); ** ** \param[in] MsgPtr A pointer to the buffer that contains the software bus message. ** This must point to the first byte of the message header. -** -** \sa #CFE_SB_SetMsgId, #CFE_SB_SetUserDataLength, #CFE_SB_SetTotalMsgLength, -** #CFE_SB_SetMsgTime, #CFE_SB_SetCmdCode, #CFE_SB_InitMsg **/ -void CFE_SB_TimeStampMsg(CFE_SB_MsgPtr_t MsgPtr); +void CFE_SB_TimeStampMsg(CFE_MSG_Message_t *MsgPtr); +#ifndef CFE_OMIT_DEPRECATED_6_8 /*****************************************************************************/ /** -** \brief Sets the command code field in a software bus message. +** \brief DEPRECATED:Sets the command code field in a software bus message. +** \deprecated Use CFE_MSG_SetFcnCode ** ** \par Description ** This routine sets the command code of a software bus message (if SB @@ -969,11 +969,9 @@ void CFE_SB_TimeStampMsg(CFE_SB_MsgPtr_t MsgPtr); ** \return Execution status, see \ref CFEReturnCodes ** \retval #CFE_SUCCESS \copybrief CFE_SUCCESS ** \retval #CFE_SB_WRONG_MSG_TYPE \copybrief CFE_SB_WRONG_MSG_TYPE -** -** \sa #CFE_SB_SetMsgId, #CFE_SB_SetUserDataLength, #CFE_SB_SetTotalMsgLength, -** #CFE_SB_SetMsgTime, #CFE_SB_TimeStampMsg, #CFE_SB_GetCmdCode, #CFE_SB_InitMsg **/ -CFE_Status_t CFE_SB_SetCmdCode(CFE_SB_MsgPtr_t MsgPtr, uint16 CmdCode); +CFE_Status_t CFE_SB_SetCmdCode(CFE_MSG_Message_t *MsgPtr, uint16 CmdCode); +#endif /* CFE_OMIT_DEPRECATED_6_8 */ /******************************************************************************/ /** @@ -1030,15 +1028,15 @@ int32 CFE_SB_MessageStringSet(char *DestStringPtr, const char *SourceStringPtr, ** \param[in] MsgPtr A pointer to the buffer that contains the software bus message. ** ** \return A pointer to the first byte of user data within the software bus message. -** -** \sa #CFE_SB_GetMsgId, #CFE_SB_GetUserDataLength, #CFE_SB_GetTotalMsgLength, -** #CFE_SB_GetMsgTime, #CFE_SB_GetCmdCode, #CFE_SB_GetChecksum **/ -void *CFE_SB_GetUserData(CFE_SB_MsgPtr_t MsgPtr); +void *CFE_SB_GetUserData(CFE_MSG_Message_t *MsgPtr); + +#ifndef CFE_OMIT_DEPRECATED_6_8 /*****************************************************************************/ /** -** \brief Get the message ID of a software bus message. +** \brief DEPRECATED:Get the message ID of a software bus message. +** \deprecated Use CFE_MSG_GetMsgId ** ** \par Description ** This routine returns the message ID from a software bus message. @@ -1049,11 +1047,9 @@ void *CFE_SB_GetUserData(CFE_SB_MsgPtr_t MsgPtr); ** \param[in] MsgPtr A pointer to the buffer that contains the software bus message. ** ** \return The software bus Message ID from the message header. -** -** \sa #CFE_SB_GetUserData, #CFE_SB_SetMsgId, #CFE_SB_GetUserDataLength, #CFE_SB_GetTotalMsgLength, -** #CFE_SB_GetMsgTime, #CFE_SB_GetCmdCode, #CFE_SB_GetChecksum **/ -CFE_SB_MsgId_t CFE_SB_GetMsgId(const CFE_SB_Msg_t *MsgPtr); +CFE_SB_MsgId_t CFE_SB_GetMsgId(const CFE_MSG_Message_t *MsgPtr); +#endif /* CFE_OMIT_DEPRECATED_6_8 */ /*****************************************************************************/ /** @@ -1069,15 +1065,15 @@ CFE_SB_MsgId_t CFE_SB_GetMsgId(const CFE_SB_Msg_t *MsgPtr); ** This must point to the first byte of the message header. ** ** \return The size (in bytes) of the user data in the software bus message. -** -** \sa #CFE_SB_GetUserData, #CFE_SB_GetMsgId, #CFE_SB_SetUserDataLength, #CFE_SB_GetTotalMsgLength, -** #CFE_SB_GetMsgTime, #CFE_SB_GetCmdCode, #CFE_SB_GetChecksum **/ -uint16 CFE_SB_GetUserDataLength(const CFE_SB_Msg_t *MsgPtr); +uint16 CFE_SB_GetUserDataLength(const CFE_MSG_Message_t *MsgPtr); + +#ifndef CFE_OMIT_DEPRECATED_6_8 /*****************************************************************************/ /** -** \brief Gets the total length of a software bus message. +** \brief DEPRECATED: Gets the total length of a software bus message. +** \deprecated Use CFE_MSG_GetSize ** ** \par Description ** This routine returns the total size of the software bus message. @@ -1090,15 +1086,13 @@ uint16 CFE_SB_GetUserDataLength(const CFE_SB_Msg_t *MsgPtr); ** This must point to the first byte of the message header. ** ** \return The total size (in bytes) of the software bus message, including headers. -** -** \sa #CFE_SB_GetUserData, #CFE_SB_GetMsgId, #CFE_SB_GetUserDataLength, #CFE_SB_SetTotalMsgLength, -** #CFE_SB_GetMsgTime, #CFE_SB_GetCmdCode, #CFE_SB_GetChecksum **/ -uint16 CFE_SB_GetTotalMsgLength(const CFE_SB_Msg_t *MsgPtr); +uint16 CFE_SB_GetTotalMsgLength(const CFE_MSG_Message_t *MsgPtr); /*****************************************************************************/ /** -** \brief Gets the command code field from a software bus message. +** \brief DEPRECATED: Gets the command code field from a software bus message. +** \deprecated Use CFE_MSG_GetFcnCode ** ** \par Description ** This routine gets the command code from a software bus message (if @@ -1114,15 +1108,13 @@ uint16 CFE_SB_GetTotalMsgLength(const CFE_SB_Msg_t *MsgPtr); ** ** \return The command code included in the software bus message header (if present). ** Otherwise, returns a command code value of zero. -** -** \sa #CFE_SB_GetUserData, #CFE_SB_GetMsgId, #CFE_SB_GetUserDataLength, #CFE_SB_GetTotalMsgLength, -** #CFE_SB_GetMsgTime, #CFE_SB_SetCmdCode, #CFE_SB_GetChecksum **/ -uint16 CFE_SB_GetCmdCode(CFE_SB_MsgPtr_t MsgPtr); +uint16 CFE_SB_GetCmdCode(CFE_MSG_Message_t *MsgPtr); /*****************************************************************************/ /** -** \brief Gets the time field from a software bus message. +** \brief DEPRECATED: Gets the time field from a software bus message. +** \deprecated Use CFE_MSG_GetMsgTime ** ** \par Description ** This routine gets the time from a software bus message. @@ -1137,11 +1129,9 @@ uint16 CFE_SB_GetCmdCode(CFE_SB_MsgPtr_t MsgPtr); ** ** \return The system time included in the software bus message header (if present), ** otherwise, returns a time value of zero. -** -** \sa #CFE_SB_GetUserData, #CFE_SB_GetMsgId, #CFE_SB_GetUserDataLength, #CFE_SB_GetTotalMsgLength, -** #CFE_SB_SetMsgTime, #CFE_SB_GetCmdCode, #CFE_SB_GetChecksum **/ -CFE_TIME_SysTime_t CFE_SB_GetMsgTime(CFE_SB_MsgPtr_t MsgPtr); +CFE_TIME_SysTime_t CFE_SB_GetMsgTime(CFE_MSG_Message_t *MsgPtr); +#endif /* CFE_OMIT_DEPRECATED_6_8 */ /******************************************************************************/ /** @@ -1185,13 +1175,15 @@ CFE_TIME_SysTime_t CFE_SB_GetMsgTime(CFE_SB_MsgPtr_t MsgPtr); int32 CFE_SB_MessageStringGet(char *DestStringPtr, const char *SourceStringPtr, const char *DefaultString, uint32 DestMaxSize, uint32 SourceMaxSize); /**@}*/ +#ifndef CFE_OMIT_DEPRECATED_6_8 /** @defgroup CFEAPISBChecksum cFE Checksum Control APIs * @{ */ /*****************************************************************************/ /** -** \brief Gets the checksum field from a software bus message. +** \brief DEPRECATED:Gets the checksum field from a software bus message. +** \deprecated No use case ** ** \par Description ** This routine gets the checksum (or other message integrity check @@ -1210,16 +1202,13 @@ int32 CFE_SB_MessageStringGet(char *DestStringPtr, const char *SourceStringPtr, ** ** \return The checksum included in the software bus message header (if present), otherwise, ** returns a checksum value of zero. -** -** \sa #CFE_SB_GetUserData, #CFE_SB_GetMsgId, #CFE_SB_GetUserDataLength, #CFE_SB_GetTotalMsgLength, -** #CFE_SB_GetMsgTime, #CFE_SB_GetCmdCode, #CFE_SB_GetChecksum -** #CFE_SB_ValidateChecksum, #CFE_SB_GenerateChecksum **/ -uint16 CFE_SB_GetChecksum(CFE_SB_MsgPtr_t MsgPtr); +uint16 CFE_SB_GetChecksum(CFE_MSG_Message_t *MsgPtr); /*****************************************************************************/ /** -** \brief Calculates and sets the checksum of a software bus message +** \brief DEPRECATED:Calculates and sets the checksum of a software bus message +** \deprecated Use CFE_MSG_GenerateChecksum ** ** \par Description ** This routine calculates the checksum of a software bus message according @@ -1234,14 +1223,13 @@ uint16 CFE_SB_GetChecksum(CFE_SB_MsgPtr_t MsgPtr); ** ** \param[in] MsgPtr A pointer to the buffer that contains the software bus message. ** This must point to the first byte of the message header. -** -** \sa #CFE_SB_ValidateChecksum, #CFE_SB_GetChecksum **/ -void CFE_SB_GenerateChecksum(CFE_SB_MsgPtr_t MsgPtr); +void CFE_SB_GenerateChecksum(CFE_MSG_Message_t *MsgPtr); /*****************************************************************************/ /** -** \brief Validates the checksum of a software bus message. +** \brief DEPRECATED:Validates the checksum of a software bus message. +** \deprecated Use CFE_MSG_ValidateChecksum ** ** \par Description ** This routine calculates the expected checksum of a software bus message @@ -1260,11 +1248,10 @@ void CFE_SB_GenerateChecksum(CFE_SB_MsgPtr_t MsgPtr); ** \return Boolean checksum result ** \retval true The checksum field in the packet is valid. ** \retval false The checksum field in the packet is not valid or the message type is wrong. -** -** \sa #CFE_SB_GenerateChecksum, #CFE_SB_GetChecksum **/ -bool CFE_SB_ValidateChecksum(CFE_SB_MsgPtr_t MsgPtr); +bool CFE_SB_ValidateChecksum(CFE_MSG_Message_t *MsgPtr); /**@}*/ +#endif /* CFE_OMIT_DEPRECATED_6_8 */ /** @defgroup CFEAPISBMessageID cFE Message ID APIs * @{ @@ -1368,6 +1355,7 @@ static inline CFE_SB_MsgId_t CFE_SB_ValueToMsgId(CFE_SB_MsgId_Atom_t MsgIdValue) return Result; } +#ifndef CFE_OMIT_DEPRECATED_6_8 /*****************************************************************************/ /** * \brief Identifies packet type given message ID @@ -1376,11 +1364,12 @@ static inline CFE_SB_MsgId_t CFE_SB_ValueToMsgId(CFE_SB_MsgId_Atom_t MsgIdValue) * Provides the packet type associated with the given message ID * * \return Packet type - * \retval #CFE_SB_PKTTYPE_CMD Command packet type - * \retval #CFE_SB_PKTTYPE_TLM Telemetry packet type - * \retval #CFE_SB_PKTTYPE_INVALID Invalid/unknown packet type + * \retval #CFE_MSG_Type_Cmd Command packet type + * \retval #CFE_MSG_Type_Tlm Telemetry packet type + * \retval #CFE_MSG_Type_Invalid Invalid/unknown packet type */ uint32 CFE_SB_GetPktType(CFE_SB_MsgId_t MsgId); +#endif /* CFE_OMIT_DEPRECATED_6_8 */ /**@}*/ diff --git a/fsw/cfe-core/src/inc/cfe_sb_events.h b/fsw/cfe-core/src/inc/cfe_sb_events.h index c99e55eed..464d4a519 100644 --- a/fsw/cfe-core/src/inc/cfe_sb_events.h +++ b/fsw/cfe-core/src/inc/cfe_sb_events.h @@ -713,8 +713,8 @@ **/ #define CFE_SB_BAD_CMD_CODE_EID 42 -/** \brief 'Invalid Cmd, Unexpected Msg Id: 0x\%04x' -** \event 'Invalid Cmd, Unexpected Msg Id: 0x\%04x' +/** \brief 'Invalid Cmd, Unexpected Msg Id: 0x\%x' +** \event 'Invalid Cmd, Unexpected Msg Id: 0x\%x' ** ** \par Type: ERROR ** diff --git a/fsw/cfe-core/src/inc/cfe_tbl.h b/fsw/cfe-core/src/inc/cfe_tbl.h index 4e29481d2..057a74173 100644 --- a/fsw/cfe-core/src/inc/cfe_tbl.h +++ b/fsw/cfe-core/src/inc/cfe_tbl.h @@ -45,6 +45,7 @@ #include "common_types.h" /* Basic Data Types */ #include "cfe_time.h" #include "osconfig.h" +#include "cfe_msg_typedefs.h" /******************* Macro Definitions ***********************/ @@ -812,7 +813,7 @@ CFE_Status_t CFE_TBL_GetInfo(CFE_TBL_Info_t *TblInfoPtr, const char *TblName); ** \sa #CFE_TBL_Register ** ******************************************************************************/ -CFE_Status_t CFE_TBL_NotifyByMessage(CFE_TBL_Handle_t TblHandle, CFE_SB_MsgId_t MsgId, uint16 CommandCode, uint32 Parameter); +CFE_Status_t CFE_TBL_NotifyByMessage(CFE_TBL_Handle_t TblHandle, CFE_SB_MsgId_t MsgId, CFE_MSG_FcnCode_t CommandCode, uint32 Parameter); /**@}*/ #endif /* _cfe_tbl_ */ diff --git a/fsw/cfe-core/src/inc/cfe_tbl_msg.h b/fsw/cfe-core/src/inc/cfe_tbl_msg.h index b93445fea..8a758ebb6 100644 --- a/fsw/cfe-core/src/inc/cfe_tbl_msg.h +++ b/fsw/cfe-core/src/inc/cfe_tbl_msg.h @@ -762,8 +762,8 @@ typedef struct CFE_TBL_HousekeepingTlm_Payload typedef struct CFE_TBL_HousekeepingTlm { - uint8 TlmHeader[CFE_SB_TLM_HDR_SIZE]; /**< \brief cFE Software Bus Telemetry Message Header */ - CFE_TBL_HousekeepingTlm_Payload_t Payload; + CFE_SB_TlmHdr_t TlmHeader; /**< \brief cFE Software Bus Telemetry Message Header */ + CFE_TBL_HousekeepingTlm_Payload_t Payload; } CFE_TBL_HousekeepingTlm_t; @@ -810,8 +810,8 @@ typedef struct CFE_TBL_TblRegPacket_Payload typedef struct CFE_TBL_TableRegistryTlm { - uint8 TlmHeader[CFE_SB_TLM_HDR_SIZE]; /**< \brief cFE Software Bus Telemetry Message Header */ - CFE_TBL_TblRegPacket_Payload_t Payload; + CFE_SB_TlmHdr_t TlmHeader; /**< \brief cFE Software Bus Telemetry Message Header */ + CFE_TBL_TblRegPacket_Payload_t Payload; } CFE_TBL_TableRegistryTlm_t; diff --git a/fsw/cfe-core/src/inc/cfe_time_msg.h b/fsw/cfe-core/src/inc/cfe_time_msg.h index d381cab8d..e0f2b7b12 100644 --- a/fsw/cfe-core/src/inc/cfe_time_msg.h +++ b/fsw/cfe-core/src/inc/cfe_time_msg.h @@ -977,8 +977,8 @@ typedef struct CFE_TIME_HousekeepingTlm_Payload typedef struct CFE_TIME_HousekeepingTlm { - uint8 TlmHeader[CFE_SB_TLM_HDR_SIZE]; - CFE_TIME_HousekeepingTlm_Payload_t Payload; + CFE_SB_TlmHdr_t TlmHeader; + CFE_TIME_HousekeepingTlm_Payload_t Payload; } CFE_TIME_HousekeepingTlm_t; @@ -1135,7 +1135,7 @@ typedef struct CFE_TIME_DiagnosticTlm_Payload typedef struct CFE_TIME_DiagnosticTlm { - uint8 TlmHeader[CFE_SB_TLM_HDR_SIZE]; + CFE_SB_TlmHdr_t TlmHeader; CFE_TIME_DiagnosticTlm_Payload_t Payload; } CFE_TIME_DiagnosticTlm_t; diff --git a/fsw/cfe-core/src/sb/cfe_sb_api.c b/fsw/cfe-core/src/sb/cfe_sb_api.c index 736fac134..c233c2b81 100644 --- a/fsw/cfe-core/src/sb/cfe_sb_api.c +++ b/fsw/cfe-core/src/sb/cfe_sb_api.c @@ -293,7 +293,7 @@ int32 CFE_SB_DeletePipeFull(CFE_SB_PipeId_t PipeId,CFE_ES_ResourceID_t AppId) int32 Stat; CFE_ES_ResourceID_t Owner; CFE_ES_ResourceID_t TskId; - CFE_SB_Msg_t *PipeMsgPtr; + CFE_MSG_Message_t *PipeMsgPtr; char FullName[(OS_MAX_API_NAME * 2)]; CFE_SB_RemovePipeCallback_t Args; @@ -876,7 +876,7 @@ int32 CFE_SB_SubscribeFull(CFE_SB_MsgId_t MsgId, CFE_SB.SubRprtMsg.Payload.Qos.Reliability = Quality.Reliability; CFE_SB.SubRprtMsg.Payload.SubType = CFE_SB_SUBSCRIPTION; CFE_SB_UnlockSharedData(__func__,__LINE__); - Stat = CFE_SB_SendMsg((CFE_SB_Msg_t *)&CFE_SB.SubRprtMsg); + Stat = CFE_SB_SendMsg((CFE_MSG_Message_t *)&CFE_SB.SubRprtMsg); CFE_EVS_SendEventWithAppID(CFE_SB_SUBSCRIPTION_RPT_EID,CFE_EVS_EventType_DEBUG,CFE_SB.AppId, "Sending Subscription Report Msg=0x%x,Pipe=%d,Stat=0x%x", (unsigned int)CFE_SB_MsgIdToValue(MsgId), @@ -1102,7 +1102,7 @@ int32 CFE_SB_UnsubscribeFull(CFE_SB_MsgId_t MsgId,CFE_SB_PipeId_t PipeId, /* * Function: CFE_SB_SendMsg - See API and header file for details */ -int32 CFE_SB_SendMsg(CFE_SB_Msg_t *MsgPtr) +int32 CFE_SB_SendMsg(CFE_MSG_Message_t *MsgPtr) { int32 Status = 0; @@ -1117,7 +1117,7 @@ int32 CFE_SB_SendMsg(CFE_SB_Msg_t *MsgPtr) /* * Function: CFE_SB_PassMsg - See API and header file for details */ -int32 CFE_SB_PassMsg(CFE_SB_Msg_t *MsgPtr) +int32 CFE_SB_PassMsg(CFE_MSG_Message_t *MsgPtr) { int32 Status = 0; @@ -1154,17 +1154,17 @@ int32 CFE_SB_PassMsg(CFE_SB_Msg_t *MsgPtr) ** Status ** ******************************************************************************/ -int32 CFE_SB_SendMsgFull(CFE_SB_Msg_t *MsgPtr, - uint32 TlmCntIncrements, - uint32 CopyMode) +int32 CFE_SB_SendMsgFull(CFE_MSG_Message_t *MsgPtr, + uint32 TlmCntIncrements, + uint32 CopyMode) { - CFE_SB_MsgId_t MsgId; + CFE_SB_MsgId_t MsgId = CFE_SB_INVALID_MSG_ID; int32 Status; CFE_SB_DestinationD_t *DestPtr = NULL; CFE_SB_PipeD_t *PipeDscPtr; CFE_SBR_RouteId_t RouteId; CFE_SB_BufferD_t *BufDscPtr; - uint16 TotalMsgSize; + CFE_MSG_Size_t TotalMsgSize = 0; CFE_ES_ResourceID_t AppId; CFE_ES_ResourceID_t TskId; uint32 i; @@ -1172,6 +1172,7 @@ int32 CFE_SB_SendMsgFull(CFE_SB_Msg_t *MsgPtr, CFE_SB_EventBuf_t SBSndErr; char PipeName[OS_MAX_API_NAME] = {'\0'}; CFE_SB_PipeDepthStats_t *StatObj; + CFE_MSG_Type_t MsgType = CFE_MSG_Type_Invalid; SBSndErr.EvtsToSnd = 0; @@ -1192,7 +1193,7 @@ int32 CFE_SB_SendMsgFull(CFE_SB_Msg_t *MsgPtr, return CFE_SB_BAD_ARGUMENT; }/* end if */ - MsgId = CFE_SB_GetMsgId(MsgPtr); + CFE_MSG_GetMsgId(MsgPtr, &MsgId); /* validate the msgid in the message */ if(!CFE_SB_IsValidMsgId(MsgId)) @@ -1212,7 +1213,7 @@ int32 CFE_SB_SendMsgFull(CFE_SB_Msg_t *MsgPtr, return CFE_SB_BAD_ARGUMENT; }/* end if */ - TotalMsgSize = CFE_SB_GetTotalMsgLength(MsgPtr); + CFE_MSG_GetSize(MsgPtr, &TotalMsgSize); /* Verify the size of the pkt is < or = the mission defined max */ if(TotalMsgSize > CFE_MISSION_SB_MAX_SB_MSG_SIZE){ @@ -1294,14 +1295,15 @@ int32 CFE_SB_SendMsgFull(CFE_SB_Msg_t *MsgPtr, /* Copy the packet into the SB memory space */ if (CopyMode != CFE_SB_SEND_ZEROCOPY){ /* Copy the packet into the SB memory space */ - memcpy( BufDscPtr->Buffer, MsgPtr, (uint16)TotalMsgSize ); + memcpy(BufDscPtr->Buffer, MsgPtr, TotalMsgSize); } /* For Tlm packets, increment the seq count if requested */ - if((CFE_SB_GetPktType(MsgId)==CFE_SB_PKTTYPE_TLM) && + CFE_MSG_GetType(MsgPtr, &MsgType); + if((MsgType == CFE_MSG_Type_Tlm) && (TlmCntIncrements==CFE_SB_INCREMENT_TLM)){ CFE_SBR_IncrementSequenceCounter(RouteId); - CFE_SB_SetMsgSeqCnt((CFE_SB_Msg_t *)BufDscPtr->Buffer, CFE_SBR_GetSequenceCounter(RouteId)); + CFE_MSG_SetSequenceCount((CFE_MSG_Message_t *)BufDscPtr->Buffer, CFE_SBR_GetSequenceCounter(RouteId)); }/* end if */ /* Send the packet to all destinations */ @@ -1458,9 +1460,9 @@ int32 CFE_SB_SendMsgFull(CFE_SB_Msg_t *MsgPtr, /* * Function: CFE_SB_RcvMsg - See API and header file for details */ -int32 CFE_SB_RcvMsg(CFE_SB_MsgPtr_t *BufPtr, - CFE_SB_PipeId_t PipeId, - int32 TimeOut) +int32 CFE_SB_RcvMsg(CFE_MSG_Message_t **BufPtr, + CFE_SB_PipeId_t PipeId, + int32 TimeOut) { int32 Status; CFE_SB_BufferD_t *Message; @@ -1535,7 +1537,7 @@ int32 CFE_SB_RcvMsg(CFE_SB_MsgPtr_t *BufPtr, PipeDscPtr->CurrentBuff = Message; /* Set the Receivers pointer to the address of the actual message */ - *BufPtr = (CFE_SB_MsgPtr_t) Message->Buffer; + *BufPtr = (CFE_MSG_Message_t*) Message->Buffer; /* get pointer to destination to be used in decrementing msg limit cnt*/ RouteId = CFE_SBR_GetRouteId(PipeDscPtr->CurrentBuff->MsgId); @@ -1583,8 +1585,8 @@ int32 CFE_SB_RcvMsg(CFE_SB_MsgPtr_t *BufPtr, /* * Function: CFE_SB_ZeroCopyGetPtr - See API and header file for details */ -CFE_SB_Msg_t *CFE_SB_ZeroCopyGetPtr(uint16 MsgSize, - CFE_SB_ZeroCopyHandle_t *BufferHandle) +CFE_MSG_Message_t *CFE_SB_ZeroCopyGetPtr(uint16 MsgSize, + CFE_SB_ZeroCopyHandle_t *BufferHandle) { int32 stat1; CFE_ES_ResourceID_t AppId; @@ -1665,7 +1667,7 @@ CFE_SB_Msg_t *CFE_SB_ZeroCopyGetPtr(uint16 MsgSize, bd->Size = MsgSize; bd->Buffer = (void *)address; - return (CFE_SB_Msg_t *)address; + return (CFE_MSG_Message_t *)address; }/* CFE_SB_ZeroCopyGetPtr */ @@ -1673,7 +1675,7 @@ CFE_SB_Msg_t *CFE_SB_ZeroCopyGetPtr(uint16 MsgSize, /* * Function: CFE_SB_ZeroCopyReleasePtr - See API and header file for details */ -int32 CFE_SB_ZeroCopyReleasePtr(CFE_SB_Msg_t *Ptr2Release, +int32 CFE_SB_ZeroCopyReleasePtr(CFE_MSG_Message_t *Ptr2Release, CFE_SB_ZeroCopyHandle_t BufferHandle) { int32 Status; @@ -1725,8 +1727,8 @@ int32 CFE_SB_ZeroCopyReleasePtr(CFE_SB_Msg_t *Ptr2Release, ** Status ** ******************************************************************************/ -int32 CFE_SB_ZeroCopyReleaseDesc(CFE_SB_Msg_t *Ptr2Release, - CFE_SB_ZeroCopyHandle_t BufferHandle) +int32 CFE_SB_ZeroCopyReleaseDesc(CFE_MSG_Message_t *Ptr2Release, + CFE_SB_ZeroCopyHandle_t BufferHandle) { int32 Stat; CFE_SB_ZeroCopyD_t *zcd = (CFE_SB_ZeroCopyD_t *) BufferHandle; @@ -1768,7 +1770,7 @@ int32 CFE_SB_ZeroCopyReleaseDesc(CFE_SB_Msg_t *Ptr2Release, /* * Function: CFE_SB_ZeroCopySend - See API and header file for details */ -int32 CFE_SB_ZeroCopySend(CFE_SB_Msg_t *MsgPtr, +int32 CFE_SB_ZeroCopySend(CFE_MSG_Message_t *MsgPtr, CFE_SB_ZeroCopyHandle_t BufferHandle) { int32 Status = 0; @@ -1787,7 +1789,7 @@ int32 CFE_SB_ZeroCopySend(CFE_SB_Msg_t *MsgPtr, /* * Function: CFE_SB_ZeroCopyPass - See API and header file for details */ -int32 CFE_SB_ZeroCopyPass(CFE_SB_Msg_t *MsgPtr, +int32 CFE_SB_ZeroCopyPass(CFE_MSG_Message_t *MsgPtr, CFE_SB_ZeroCopyHandle_t BufferHandle) { int32 Status = 0; diff --git a/fsw/cfe-core/src/sb/cfe_sb_init.c b/fsw/cfe-core/src/sb/cfe_sb_init.c index 2a6d25e5f..e8e711c84 100644 --- a/fsw/cfe-core/src/sb/cfe_sb_init.c +++ b/fsw/cfe-core/src/sb/cfe_sb_init.c @@ -116,10 +116,9 @@ int32 CFE_SB_EarlyInit (void) { CFE_SBR_Init(); /* Initialize the SB Statistics Pkt */ - CFE_SB_InitMsg(&CFE_SB.StatTlmMsg, - CFE_SB_ValueToMsgId(CFE_SB_STATS_TLM_MID), - sizeof(CFE_SB.StatTlmMsg), - true); + CFE_MSG_Init(&CFE_SB.StatTlmMsg.Hdr.BaseMsg, + CFE_SB_ValueToMsgId(CFE_SB_STATS_TLM_MID), + sizeof(CFE_SB.StatTlmMsg)); CFE_SB.ZeroCopyTail = NULL; diff --git a/fsw/cfe-core/src/sb/cfe_sb_msg_id_util.c b/fsw/cfe-core/src/sb/cfe_sb_msg_id_util.c index 6aae29dcc..299dc931e 100644 --- a/fsw/cfe-core/src/sb/cfe_sb_msg_id_util.c +++ b/fsw/cfe-core/src/sb/cfe_sb_msg_id_util.c @@ -34,10 +34,11 @@ #include "cfe_sb_priv.h" #include "cfe_msg_api.h" +#ifndef CFE_OMIT_DEPRECATED_6_8 /* * Function: CFE_SB_GetMsgId - See API and header file for details */ -CFE_SB_MsgId_t CFE_SB_GetMsgId(const CFE_SB_Msg_t *MsgPtr) +CFE_SB_MsgId_t CFE_SB_GetMsgId(const CFE_MSG_Message_t *MsgPtr) { CFE_SB_MsgId_t MsgId; @@ -52,7 +53,7 @@ CFE_SB_MsgId_t CFE_SB_GetMsgId(const CFE_SB_Msg_t *MsgPtr) /* * Function: CFE_SB_SetMsgId - See API and header file for details */ -void CFE_SB_SetMsgId(CFE_SB_MsgPtr_t MsgPtr, +void CFE_SB_SetMsgId(CFE_MSG_Message_t *MsgPtr, CFE_SB_MsgId_t MsgId) { @@ -75,6 +76,7 @@ uint32 CFE_SB_GetPktType(CFE_SB_MsgId_t MsgId) return type; }/* end CFE_SB_GetPktType */ +#endif /* CFE_OMIT_DEPRECATED_6_8 */ /* * Function: CFE_SB_IsValidMsgId - See API and header file for details diff --git a/fsw/cfe-core/src/sb/cfe_sb_priv.c b/fsw/cfe-core/src/sb/cfe_sb_priv.c index 95798a70b..f6eeb5623 100644 --- a/fsw/cfe-core/src/sb/cfe_sb_priv.c +++ b/fsw/cfe-core/src/sb/cfe_sb_priv.c @@ -302,6 +302,7 @@ CFE_SB_DestinationD_t *CFE_SB_GetDestPtr(CFE_SBR_RouteId_t RouteId, CFE_SB_PipeI return destptr; } +#ifndef CFE_OMIT_DEPRECATED_6_8 /****************************************************************************** ** Function: CFE_SB_SetMsgSeqCnt() ** @@ -316,12 +317,12 @@ CFE_SB_DestinationD_t *CFE_SB_GetDestPtr(CFE_SBR_RouteId_t RouteId, CFE_SB_PipeI ** Return: ** None */ -void CFE_SB_SetMsgSeqCnt(CFE_SB_MsgPtr_t MsgPtr,uint32 Count){ +void CFE_SB_SetMsgSeqCnt(CFE_MSG_Message_t *MsgPtr,uint32 Count){ CFE_MSG_SetSequenceCount(MsgPtr, Count); }/* end CFE_SB_SetMsgSeqCnt */ - +#endif /* CFE_OMIT_DEPRECATED_6_8 */ /****************************************************************************** ** Function: CFE_SB_ValidateMsgId() @@ -607,7 +608,7 @@ int32 CFE_SB_ZeroCopyReleaseAppId(CFE_ES_ResourceID_t AppId) prev = (CFE_SB_ZeroCopyD_t *) (zcd->Prev); if( CFE_ES_ResourceID_Equal(zcd->AppID, AppId) ) { - CFE_SB_ZeroCopyReleasePtr((CFE_SB_Msg_t *) zcd->Buffer, (CFE_SB_ZeroCopyHandle_t) zcd); + CFE_SB_ZeroCopyReleasePtr((CFE_MSG_Message_t *) zcd->Buffer, (CFE_SB_ZeroCopyHandle_t) zcd); } zcd = prev; } diff --git a/fsw/cfe-core/src/sb/cfe_sb_priv.h b/fsw/cfe-core/src/sb/cfe_sb_priv.h index efc015f79..a74eaf8cc 100644 --- a/fsw/cfe-core/src/sb/cfe_sb_priv.h +++ b/fsw/cfe-core/src/sb/cfe_sb_priv.h @@ -194,7 +194,7 @@ typedef struct CFE_SB_HousekeepingTlm_t HKTlmMsg; CFE_SB_StatsTlm_t StatTlmMsg; CFE_SB_PipeId_t CmdPipe; - CFE_SB_Msg_t *CmdPipePktPtr; + CFE_MSG_Message_t *CmdPipePktPtr; CFE_SB_MemParams_t Mem; CFE_SB_AllSubscriptionsTlm_t PrevSubMsg; CFE_SB_SingleSubscriptionTlm_t SubRprtMsg; @@ -247,7 +247,7 @@ uint8 CFE_SB_GetPipeIdx(CFE_SB_PipeId_t PipeId); int32 CFE_SB_ReturnBufferToPool(CFE_SB_BufferD_t *bd); void CFE_SB_ProcessCmdPipePkt(void); void CFE_SB_ResetCounters(void); -void CFE_SB_SetMsgSeqCnt(CFE_SB_MsgPtr_t MsgPtr,uint32 Count); +void CFE_SB_SetMsgSeqCnt(CFE_MSG_Message_t *MsgPtr,uint32 Count); char *CFE_SB_GetAppTskName(CFE_ES_ResourceID_t TaskId, char* FullName); CFE_SB_BufferD_t *CFE_SB_GetBufferFromPool(CFE_SB_MsgId_t MsgId, uint16 Size); CFE_SB_BufferD_t *CFE_SB_GetBufferFromCaller(CFE_SB_MsgId_t MsgId, void *Address); @@ -266,11 +266,11 @@ int32 CFE_SB_UnsubscribeWithAppId(CFE_SB_MsgId_t MsgId, CFE_SB_PipeId_t PipeId, int32 CFE_SB_UnsubscribeFull(CFE_SB_MsgId_t MsgId, CFE_SB_PipeId_t PipeId, uint8 Scope, CFE_ES_ResourceID_t AppId); -int32 CFE_SB_SendMsgFull(CFE_SB_Msg_t *MsgPtr, uint32 TlmCntIncrements, uint32 CopyMode); +int32 CFE_SB_SendMsgFull(CFE_MSG_Message_t *MsgPtr, uint32 TlmCntIncrements, uint32 CopyMode); int32 CFE_SB_SendRtgInfo(const char *Filename); int32 CFE_SB_SendPipeInfo(const char *Filename); int32 CFE_SB_SendMapInfo(const char *Filename); -int32 CFE_SB_ZeroCopyReleaseDesc(CFE_SB_Msg_t *Ptr2Release, CFE_SB_ZeroCopyHandle_t BufferHandle); +int32 CFE_SB_ZeroCopyReleaseDesc(CFE_MSG_Message_t *Ptr2Release, CFE_SB_ZeroCopyHandle_t BufferHandle); int32 CFE_SB_ZeroCopyReleaseAppId(CFE_ES_ResourceID_t AppId); int32 CFE_SB_DecrBufUseCnt(CFE_SB_BufferD_t *bd); int32 CFE_SB_ValidateMsgId(CFE_SB_MsgId_t MsgId); @@ -356,11 +356,8 @@ CFE_SB_DestinationD_t *CFE_SB_GetDestPtr(CFE_SBR_RouteId_t RouteId, CFE_SB_PipeI ** ** \returns The number of bytes in the software bus message header for ** messages with the given \c MsgId. -** -** \sa #CFE_SB_GetUserData, #CFE_SB_GetMsgId, #CFE_SB_GetUserDataLength, #CFE_SB_GetTotalMsgLength, -** #CFE_SB_GetMsgTime, #CFE_SB_GetCmdCode, #CFE_SB_GetChecksum **/ -uint16 CFE_SB_MsgHdrSize(const CFE_SB_Msg_t *MsgPtr); +uint16 CFE_SB_MsgHdrSize(const CFE_MSG_Message_t *MsgPtr); /* diff --git a/fsw/cfe-core/src/sb/cfe_sb_task.c b/fsw/cfe-core/src/sb/cfe_sb_task.c index 97c587186..6991b7fab 100644 --- a/fsw/cfe-core/src/sb/cfe_sb_task.c +++ b/fsw/cfe-core/src/sb/cfe_sb_task.c @@ -224,20 +224,17 @@ int32 CFE_SB_AppInit(void){ CFE_ES_WriteToSysLog("SB:Registered %d events for filtering\n",(int)CfgFileEventsToFilter); - CFE_SB_InitMsg(&CFE_SB.HKTlmMsg, - CFE_SB_ValueToMsgId(CFE_SB_HK_TLM_MID), - sizeof(CFE_SB.HKTlmMsg), - true); + CFE_MSG_Init(&CFE_SB.HKTlmMsg.Hdr.BaseMsg, + CFE_SB_ValueToMsgId(CFE_SB_HK_TLM_MID), + sizeof(CFE_SB.HKTlmMsg)); - CFE_SB_InitMsg(&CFE_SB.PrevSubMsg, - CFE_SB_ValueToMsgId(CFE_SB_ALLSUBS_TLM_MID), - sizeof(CFE_SB.PrevSubMsg), - true); + CFE_MSG_Init(&CFE_SB.PrevSubMsg.Hdr.BaseMsg, + CFE_SB_ValueToMsgId(CFE_SB_ALLSUBS_TLM_MID), + sizeof(CFE_SB.PrevSubMsg)); - CFE_SB_InitMsg(&CFE_SB.SubRprtMsg, - CFE_SB_ValueToMsgId(CFE_SB_ONESUB_TLM_MID), - sizeof(CFE_SB.SubRprtMsg), - true); + CFE_MSG_Init(&CFE_SB.SubRprtMsg.Hdr.BaseMsg, + CFE_SB_ValueToMsgId(CFE_SB_ONESUB_TLM_MID), + sizeof(CFE_SB.SubRprtMsg)); /* Populate the fixed fields in the HK Tlm Msg */ CFE_SB.HKTlmMsg.Payload.MemPoolHandle = CFE_SB.Mem.PoolHdl; @@ -323,23 +320,27 @@ int32 CFE_SB_AppInit(void){ ** Return: ** true if length is acceptable */ -bool CFE_SB_VerifyCmdLength(CFE_SB_MsgPtr_t Msg, uint16 ExpectedLength) +bool CFE_SB_VerifyCmdLength(CFE_MSG_Message_t *MsgPtr, CFE_MSG_Size_t ExpectedLength) { - bool result = true; - uint16 ActualLength = CFE_SB_GetTotalMsgLength(Msg); + bool result = true; + CFE_MSG_Size_t ActualLength = 0; + CFE_MSG_FcnCode_t FcnCode = 0; + CFE_SB_MsgId_t MsgId = CFE_SB_INVALID_MSG_ID; + + CFE_MSG_GetSize(MsgPtr, &ActualLength); /* ** Verify the command packet length */ if (ExpectedLength != ActualLength) { - CFE_SB_MsgId_t MessageID = CFE_SB_GetMsgId(Msg); - uint16 CommandCode = CFE_SB_GetCmdCode(Msg); + CFE_MSG_GetMsgId(MsgPtr, &MsgId); + CFE_MSG_GetFcnCode(MsgPtr, &FcnCode); CFE_EVS_SendEvent(CFE_SB_LEN_ERR_EID, CFE_EVS_EventType_ERROR, - "Invalid cmd length: ID = 0x%X, CC = %d, Exp Len = %d, Len = %d", - (unsigned int)CFE_SB_MsgIdToValue(MessageID), (int)CommandCode, - (int)ExpectedLength, (int)ActualLength); + "Invalid msg length: ID = 0x%X, CC = %u, Len = %u, Expected = %u", + (unsigned int)CFE_SB_MsgIdToValue(MsgId), (unsigned int)FcnCode, + (unsigned int)ActualLength, (unsigned int)ExpectedLength); result = false; ++CFE_SB.HKTlmMsg.Payload.CommandErrorCounter; } @@ -363,9 +364,10 @@ bool CFE_SB_VerifyCmdLength(CFE_SB_MsgPtr_t Msg, uint16 ExpectedLength) ** none */ void CFE_SB_ProcessCmdPipePkt(void) { - CFE_SB_MsgId_t MessageID; + CFE_SB_MsgId_t MessageID = CFE_SB_INVALID_MSG_ID; + CFE_MSG_FcnCode_t FcnCode = 0; - MessageID = CFE_SB_GetMsgId(CFE_SB.CmdPipePktPtr); + CFE_MSG_GetMsgId(CFE_SB.CmdPipePktPtr, &MessageID); switch(CFE_SB_MsgIdToValue(MessageID)){ @@ -376,7 +378,8 @@ void CFE_SB_ProcessCmdPipePkt(void) { case CFE_SB_SUB_RPT_CTRL_MID: /* Note: Command counter not incremented for this command */ - switch (CFE_SB_GetCmdCode(CFE_SB.CmdPipePktPtr)) { + CFE_MSG_GetFcnCode(CFE_SB.CmdPipePktPtr, &FcnCode); + switch (FcnCode) { case CFE_SB_SEND_PREV_SUBS_CC: if (CFE_SB_VerifyCmdLength(CFE_SB.CmdPipePktPtr, sizeof(CFE_SB_SendPrevSubs_t))) { @@ -400,15 +403,15 @@ void CFE_SB_ProcessCmdPipePkt(void) { default: CFE_EVS_SendEvent(CFE_SB_BAD_CMD_CODE_EID,CFE_EVS_EventType_ERROR, - "Invalid Cmd, Unexpected Command Code %d", - (int)CFE_SB_GetCmdCode(CFE_SB.CmdPipePktPtr)); + "Invalid Cmd, Unexpected Command Code %u", (unsigned int)FcnCode); CFE_SB.HKTlmMsg.Payload.CommandErrorCounter++; break; } /* end switch on cmd code */ break; case CFE_SB_CMD_MID: - switch (CFE_SB_GetCmdCode(CFE_SB.CmdPipePktPtr)) { + CFE_MSG_GetFcnCode(CFE_SB.CmdPipePktPtr, &FcnCode); + switch (FcnCode) { case CFE_SB_NOOP_CC: if (CFE_SB_VerifyCmdLength(CFE_SB.CmdPipePktPtr, sizeof(CFE_SB_Noop_t))) { @@ -468,8 +471,7 @@ void CFE_SB_ProcessCmdPipePkt(void) { default: CFE_EVS_SendEvent(CFE_SB_BAD_CMD_CODE_EID,CFE_EVS_EventType_ERROR, - "Invalid Cmd, Unexpected Command Code %d", - (int)CFE_SB_GetCmdCode(CFE_SB.CmdPipePktPtr)); + "Invalid Cmd, Unexpected Command Code %u", FcnCode); CFE_SB.HKTlmMsg.Payload.CommandErrorCounter++; break; } /* end switch on cmd code */ @@ -477,7 +479,7 @@ void CFE_SB_ProcessCmdPipePkt(void) { default: CFE_EVS_SendEvent(CFE_SB_BAD_MSGID_EID,CFE_EVS_EventType_ERROR, - "Invalid Cmd, Unexpected Msg Id: 0x%04x", + "Invalid Cmd, Unexpected Msg Id: 0x%x", (unsigned int)CFE_SB_MsgIdToValue(MessageID)); CFE_SB.HKTlmMsg.Payload.CommandErrorCounter++; break; @@ -568,8 +570,8 @@ int32 CFE_SB_SendHKTlmCmd(const CFE_SB_CmdHdr_t *data) CFE_SB.HKTlmMsg.Payload.MemInUse = CFE_SB.StatTlmMsg.Payload.MemInUse; CFE_SB.HKTlmMsg.Payload.UnmarkedMem = CFE_PLATFORM_SB_BUF_MEMORY_BYTES - CFE_SB.StatTlmMsg.Payload.PeakMemInUse; - CFE_SB_TimeStampMsg((CFE_SB_Msg_t *) &CFE_SB.HKTlmMsg); - CFE_SB_SendMsg((CFE_SB_Msg_t *)&CFE_SB.HKTlmMsg); + CFE_SB_TimeStampMsg((CFE_MSG_Message_t *) &CFE_SB.HKTlmMsg); + CFE_SB_SendMsg((CFE_MSG_Message_t *)&CFE_SB.HKTlmMsg); return CFE_SUCCESS; }/* end CFE_SB_SendHKTlmCmd */ @@ -750,8 +752,8 @@ int32 CFE_SB_DisableRouteCmd(const CFE_SB_DisableRoute_t *data) int32 CFE_SB_SendStatsCmd(const CFE_SB_SendSbStats_t *data) { - CFE_SB_TimeStampMsg((CFE_SB_Msg_t *) &CFE_SB.StatTlmMsg); - CFE_SB_SendMsg((CFE_SB_Msg_t *)&CFE_SB.StatTlmMsg); + CFE_SB_TimeStampMsg((CFE_MSG_Message_t *) &CFE_SB.StatTlmMsg); + CFE_SB_SendMsg((CFE_MSG_Message_t *)&CFE_SB.StatTlmMsg); CFE_EVS_SendEvent(CFE_SB_SND_STATS_EID,CFE_EVS_EventType_DEBUG, "Software Bus Statistics packet sent"); @@ -1158,7 +1160,7 @@ void CFE_SB_SendRouteSub(CFE_SBR_RouteId_t RouteId, void *ArgPtr) if(CFE_SB.PrevSubMsg.Payload.Entries >= CFE_SB_SUB_ENTRIES_PER_PKT) { CFE_SB_UnlockSharedData(__func__,__LINE__); - status = CFE_SB_SendMsg((CFE_SB_Msg_t *)&CFE_SB.PrevSubMsg); + status = CFE_SB_SendMsg((CFE_MSG_Message_t *)&CFE_SB.PrevSubMsg); CFE_EVS_SendEvent(CFE_SB_FULL_SUB_PKT_EID, CFE_EVS_EventType_DEBUG, "Full Sub Pkt %d Sent,Entries=%d,Stat=0x%x\n", (int)CFE_SB.PrevSubMsg.Payload.PktSegment, @@ -1216,7 +1218,7 @@ int32 CFE_SB_SendPrevSubsCmd(const CFE_SB_SendPrevSubs_t *data) /* if pkt has any number of entries, send it as a partial pkt */ if(CFE_SB.PrevSubMsg.Payload.Entries > 0) { - status = CFE_SB_SendMsg((CFE_SB_Msg_t *)&CFE_SB.PrevSubMsg); + status = CFE_SB_SendMsg((CFE_MSG_Message_t *)&CFE_SB.PrevSubMsg); CFE_EVS_SendEvent(CFE_SB_PART_SUB_PKT_EID, CFE_EVS_EventType_DEBUG, "Partial Sub Pkt %d Sent,Entries=%d,Stat=0x%x", (int)CFE_SB.PrevSubMsg.Payload.PktSegment, (int)CFE_SB.PrevSubMsg.Payload.Entries, diff --git a/fsw/cfe-core/src/sb/cfe_sb_util.c b/fsw/cfe-core/src/sb/cfe_sb_util.c index 6086f22b1..cee644719 100644 --- a/fsw/cfe-core/src/sb/cfe_sb_util.c +++ b/fsw/cfe-core/src/sb/cfe_sb_util.c @@ -42,6 +42,7 @@ #include +#ifndef CFE_OMIT_DEPRECATED_6_8 /* * Function: CFE_SB_InitMsg - See API and header file for details */ @@ -54,6 +55,7 @@ void CFE_SB_InitMsg(void *MsgPtr, CFE_MSG_Init((CFE_MSG_Message_t *)MsgPtr, MsgId, Length); } /* end CFE_SB_InitMsg */ +#endif /****************************************************************************** ** Function: CFE_SB_MsgHdrSize() @@ -67,7 +69,7 @@ void CFE_SB_InitMsg(void *MsgPtr, ** Return: ** Size of Message Header. */ -uint16 CFE_SB_MsgHdrSize(const CFE_SB_Msg_t *MsgPtr) +uint16 CFE_SB_MsgHdrSize(const CFE_MSG_Message_t *MsgPtr) { uint16 size = 0; @@ -100,7 +102,7 @@ uint16 CFE_SB_MsgHdrSize(const CFE_SB_Msg_t *MsgPtr) /* * Function: CFE_SB_GetUserData - See API and header file for details */ -void *CFE_SB_GetUserData(CFE_SB_MsgPtr_t MsgPtr) +void *CFE_SB_GetUserData(CFE_MSG_Message_t *MsgPtr) { uint8 *BytePtr; uint16 HdrSize; @@ -115,7 +117,7 @@ void *CFE_SB_GetUserData(CFE_SB_MsgPtr_t MsgPtr) /* * Function: CFE_SB_GetUserDataLength - See API and header file for details */ -uint16 CFE_SB_GetUserDataLength(const CFE_SB_Msg_t *MsgPtr) +uint16 CFE_SB_GetUserDataLength(const CFE_MSG_Message_t *MsgPtr) { uint32 TotalMsgSize; uint16 HdrSize; @@ -130,7 +132,7 @@ uint16 CFE_SB_GetUserDataLength(const CFE_SB_Msg_t *MsgPtr) /* * Function: CFE_SB_SetUserDataLength - See API and header file for details */ -void CFE_SB_SetUserDataLength(CFE_SB_MsgPtr_t MsgPtr, uint16 DataLength) +void CFE_SB_SetUserDataLength(CFE_MSG_Message_t *MsgPtr, uint16 DataLength) { uint32 TotalMsgSize, HdrSize; @@ -141,10 +143,11 @@ void CFE_SB_SetUserDataLength(CFE_SB_MsgPtr_t MsgPtr, uint16 DataLength) }/* end CFE_SB_SetUserDataLength */ +#ifndef CFE_OMIT_DEPRECATED_6_8 /* * Function: CFE_SB_GetTotalMsgLength - See API and header file for details */ -uint16 CFE_SB_GetTotalMsgLength(const CFE_SB_Msg_t *MsgPtr) +uint16 CFE_SB_GetTotalMsgLength(const CFE_MSG_Message_t *MsgPtr) { CFE_MSG_Size_t size; @@ -156,22 +159,20 @@ uint16 CFE_SB_GetTotalMsgLength(const CFE_SB_Msg_t *MsgPtr) }/* end CFE_SB_GetTotalMsgLength */ - /* * Function: CFE_SB_SetTotalMsgLength - See API and header file for details */ -void CFE_SB_SetTotalMsgLength(CFE_SB_MsgPtr_t MsgPtr,uint16 TotalLength) +void CFE_SB_SetTotalMsgLength(CFE_MSG_Message_t *MsgPtr,uint16 TotalLength) { CFE_MSG_SetSize(MsgPtr, TotalLength); }/* end CFE_SB_SetTotalMsgLength */ - /* * Function: CFE_SB_GetMsgTime - See API and header file for details */ -CFE_TIME_SysTime_t CFE_SB_GetMsgTime(CFE_SB_MsgPtr_t MsgPtr) +CFE_TIME_SysTime_t CFE_SB_GetMsgTime(CFE_MSG_Message_t *MsgPtr) { CFE_TIME_SysTime_t TimeFromMsg = {0}; @@ -181,32 +182,31 @@ CFE_TIME_SysTime_t CFE_SB_GetMsgTime(CFE_SB_MsgPtr_t MsgPtr) }/* end CFE_SB_GetMsgTime */ - /* * Function: CFE_SB_SetMsgTime - See API and header file for details */ -int32 CFE_SB_SetMsgTime(CFE_SB_MsgPtr_t MsgPtr, CFE_TIME_SysTime_t NewTime) +int32 CFE_SB_SetMsgTime(CFE_MSG_Message_t *MsgPtr, CFE_TIME_SysTime_t NewTime) { return CFE_MSG_SetMsgTime(MsgPtr, NewTime); }/* end CFE_SB_SetMsgTime */ - +#endif /* CFE_OMIT_DEPRECATED_6_8 */ /* * Function: CFE_SB_TimeStampMsg - See API and header file for details */ -void CFE_SB_TimeStampMsg(CFE_SB_MsgPtr_t MsgPtr) +void CFE_SB_TimeStampMsg(CFE_MSG_Message_t *MsgPtr) { - CFE_SB_SetMsgTime(MsgPtr,CFE_TIME_GetTime()); + CFE_MSG_SetMsgTime(MsgPtr,CFE_TIME_GetTime()); }/* end CFE_SB_TimeStampMsg */ - +#ifndef CFE_OMIT_DEPRECATED_6_8 /* * Function: CFE_SB_GetCmdCode - See API and header file for details */ -uint16 CFE_SB_GetCmdCode(CFE_SB_MsgPtr_t MsgPtr) +uint16 CFE_SB_GetCmdCode(CFE_MSG_Message_t *MsgPtr) { CFE_MSG_FcnCode_t fc; @@ -221,7 +221,7 @@ uint16 CFE_SB_GetCmdCode(CFE_SB_MsgPtr_t MsgPtr) /* * Function: CFE_SB_SetCmdCode - See API and header file for details */ -int32 CFE_SB_SetCmdCode(CFE_SB_MsgPtr_t MsgPtr, +int32 CFE_SB_SetCmdCode(CFE_MSG_Message_t *MsgPtr, uint16 CmdCode) { @@ -232,7 +232,7 @@ int32 CFE_SB_SetCmdCode(CFE_SB_MsgPtr_t MsgPtr, /* * Function: CFE_SB_GetChecksum - See API and header file for details */ -uint16 CFE_SB_GetChecksum(CFE_SB_MsgPtr_t MsgPtr) +uint16 CFE_SB_GetChecksum(CFE_MSG_Message_t *MsgPtr) { CFE_MSG_Type_t type = CFE_MSG_Type_Invalid; @@ -255,7 +255,7 @@ uint16 CFE_SB_GetChecksum(CFE_SB_MsgPtr_t MsgPtr) /* * Function: CFE_SB_GenerateChecksum - See API and header file for details */ -void CFE_SB_GenerateChecksum(CFE_SB_MsgPtr_t MsgPtr) +void CFE_SB_GenerateChecksum(CFE_MSG_Message_t *MsgPtr) { CFE_MSG_GenerateChecksum(MsgPtr); @@ -266,7 +266,7 @@ void CFE_SB_GenerateChecksum(CFE_SB_MsgPtr_t MsgPtr) /* * Function: CFE_SB_ValidateChecksum - See API and header file for details */ -bool CFE_SB_ValidateChecksum(CFE_SB_MsgPtr_t MsgPtr) +bool CFE_SB_ValidateChecksum(CFE_MSG_Message_t *MsgPtr) { bool isvalid = false; @@ -275,6 +275,7 @@ bool CFE_SB_ValidateChecksum(CFE_SB_MsgPtr_t MsgPtr) return isvalid; }/* end CFE_SB_ValidateChecksum */ +#endif /* CFE_OMIT_DEPRECATED_6_8 */ /* * Function: CFE_SB_MessageStringGet - See API and header file for details diff --git a/fsw/cfe-core/src/tbl/cfe_tbl_api.c b/fsw/cfe-core/src/tbl/cfe_tbl_api.c index b28e72232..7eb9e2003 100644 --- a/fsw/cfe-core/src/tbl/cfe_tbl_api.c +++ b/fsw/cfe-core/src/tbl/cfe_tbl_api.c @@ -1539,7 +1539,7 @@ int32 CFE_TBL_Modified( CFE_TBL_Handle_t TblHandle ) /* * Function: CFE_TBL_NotifyByMessage - See API and header file for details */ -int32 CFE_TBL_NotifyByMessage(CFE_TBL_Handle_t TblHandle, CFE_SB_MsgId_t MsgId, uint16 CommandCode, uint32 Parameter) +int32 CFE_TBL_NotifyByMessage(CFE_TBL_Handle_t TblHandle, CFE_SB_MsgId_t MsgId, CFE_MSG_FcnCode_t CommandCode, uint32 Parameter) { int32 Status; CFE_TBL_AccessDescriptor_t *AccessDescPtr = NULL; diff --git a/fsw/cfe-core/src/tbl/cfe_tbl_internal.c b/fsw/cfe-core/src/tbl/cfe_tbl_internal.c index d5334759d..1aca77d6c 100644 --- a/fsw/cfe-core/src/tbl/cfe_tbl_internal.c +++ b/fsw/cfe-core/src/tbl/cfe_tbl_internal.c @@ -142,16 +142,16 @@ int32 CFE_TBL_EarlyInit (void) /* ** Initialize housekeeping packet (clear user data area)... */ - CFE_SB_InitMsg(&CFE_TBL_TaskData.HkPacket, - CFE_SB_ValueToMsgId(CFE_TBL_HK_TLM_MID), - sizeof(CFE_TBL_TaskData.HkPacket), true); + CFE_MSG_Init(&CFE_TBL_TaskData.HkPacket.TlmHeader.BaseMsg, + CFE_SB_ValueToMsgId(CFE_TBL_HK_TLM_MID), + sizeof(CFE_TBL_TaskData.HkPacket)); /* ** Initialize table registry report packet (clear user data area)... */ - CFE_SB_InitMsg(&CFE_TBL_TaskData.TblRegPacket, - CFE_SB_ValueToMsgId(CFE_TBL_REG_TLM_MID), - sizeof(CFE_TBL_TaskData.TblRegPacket), true); + CFE_MSG_Init(&CFE_TBL_TaskData.TblRegPacket.TlmHeader.BaseMsg, + CFE_SB_ValueToMsgId(CFE_TBL_REG_TLM_MID), + sizeof(CFE_TBL_TaskData.TblRegPacket)); /* Initialize memory partition and allocate shared table buffers. */ Status = CFE_ES_PoolCreate(&CFE_TBL_TaskData.Buf.PoolHdl, @@ -1511,18 +1511,18 @@ int32 CFE_TBL_SendNotificationMsg(CFE_TBL_RegistryRec_t *RegRecPtr) /* ** Initialize notification message packet (clear user data area)... */ - CFE_SB_InitMsg(&CFE_TBL_TaskData.NotifyMsg, - RegRecPtr->NotificationMsgId, - sizeof(CFE_TBL_NotifyCmd_t), true); + CFE_MSG_Init((CFE_MSG_Message_t *)&CFE_TBL_TaskData.NotifyMsg, + RegRecPtr->NotificationMsgId, + sizeof(CFE_TBL_NotifyCmd_t)); /* Set the command code */ - CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t) &CFE_TBL_TaskData.NotifyMsg, RegRecPtr->NotificationCC); + CFE_MSG_SetFcnCode((CFE_MSG_Message_t *) &CFE_TBL_TaskData.NotifyMsg, RegRecPtr->NotificationCC); /* Set the command parameter */ CFE_TBL_TaskData.NotifyMsg.Payload.Parameter = RegRecPtr->NotificationParam; - CFE_SB_TimeStampMsg((CFE_SB_Msg_t *) &CFE_TBL_TaskData.NotifyMsg); - Status = CFE_SB_SendMsg((CFE_SB_Msg_t *) &CFE_TBL_TaskData.NotifyMsg); + CFE_SB_TimeStampMsg((CFE_MSG_Message_t *) &CFE_TBL_TaskData.NotifyMsg); + Status = CFE_SB_SendMsg((CFE_MSG_Message_t *) &CFE_TBL_TaskData.NotifyMsg); if (Status != CFE_SUCCESS) { diff --git a/fsw/cfe-core/src/tbl/cfe_tbl_task.c b/fsw/cfe-core/src/tbl/cfe_tbl_task.c index d1b4ffa59..828796f95 100644 --- a/fsw/cfe-core/src/tbl/cfe_tbl_task.c +++ b/fsw/cfe-core/src/tbl/cfe_tbl_task.c @@ -245,29 +245,30 @@ void CFE_TBL_InitData(void) strncpy(CFE_TBL_TaskData.PipeName, CFE_TBL_TASK_PIPE_NAME, 16); /* Initialize Packet Headers */ - CFE_SB_InitMsg(&CFE_TBL_TaskData.HkPacket, - CFE_SB_ValueToMsgId(CFE_TBL_HK_TLM_MID), - sizeof(CFE_TBL_TaskData.HkPacket), - true); + CFE_MSG_Init(&CFE_TBL_TaskData.HkPacket.TlmHeader.BaseMsg, + CFE_SB_ValueToMsgId(CFE_TBL_HK_TLM_MID), + sizeof(CFE_TBL_TaskData.HkPacket)); - CFE_SB_InitMsg(&CFE_TBL_TaskData.TblRegPacket, - CFE_SB_ValueToMsgId(CFE_TBL_REG_TLM_MID), - sizeof(CFE_TBL_TaskData.TblRegPacket), - true); + CFE_MSG_Init(&CFE_TBL_TaskData.TblRegPacket.TlmHeader.BaseMsg, + CFE_SB_ValueToMsgId(CFE_TBL_REG_TLM_MID), + sizeof(CFE_TBL_TaskData.TblRegPacket)); } /* End of CFE_TBL_InitData() */ /******************************************************************************/ -void CFE_TBL_TaskPipe(CFE_SB_Msg_t *MessagePtr) +void CFE_TBL_TaskPipe(CFE_MSG_Message_t *MessagePtr) { - CFE_SB_MsgId_t MessageID = CFE_SB_GetMsgId(MessagePtr); - uint16 CommandCode = CFE_SB_GetCmdCode(MessagePtr); + CFE_SB_MsgId_t MessageID = CFE_SB_INVALID_MSG_ID; + CFE_MSG_FcnCode_t CommandCode = 0; int16 CmdIndx; - uint32 ActualLength; + CFE_MSG_Size_t ActualLength = 0; CFE_TBL_CmdProcRet_t CmdStatus = CFE_TBL_INC_ERR_CTR; /* Assume a failed command */ + CFE_MSG_GetMsgId(MessagePtr, &MessageID); + CFE_MSG_GetFcnCode(MessagePtr, &CommandCode); + /* Search the Command Handler Table for a matching message */ CmdIndx = CFE_TBL_SearchCmdHndlrTbl(MessageID, CommandCode); @@ -275,7 +276,7 @@ void CFE_TBL_TaskPipe(CFE_SB_Msg_t *MessagePtr) if (CmdIndx >= 0) { /* Verify Message Length before processing */ - ActualLength = CFE_SB_GetTotalMsgLength(MessagePtr); + CFE_MSG_GetSize(MessagePtr, &ActualLength); if (ActualLength == CFE_TBL_CmdHandlerTbl[CmdIndx].ExpectedLength) { /* All checks have passed, call the appropriate message handler */ @@ -284,10 +285,10 @@ void CFE_TBL_TaskPipe(CFE_SB_Msg_t *MessagePtr) else /* Bad Message Length */ { CFE_EVS_SendEvent( CFE_TBL_LEN_ERR_EID, CFE_EVS_EventType_ERROR, - "Invalid msg length -- ID = 0x%04X, CC = %d, Len = %d (!= %d)", + "Invalid msg length -- ID = 0x%X, CC = %u, Len = %u, Expected = %u", (unsigned int)CFE_SB_MsgIdToValue(MessageID), - (int)CommandCode, (int)ActualLength, - (int)CFE_TBL_CmdHandlerTbl[CmdIndx].ExpectedLength ); + (unsigned int)CommandCode, (unsigned int)ActualLength, + (unsigned int)CFE_TBL_CmdHandlerTbl[CmdIndx].ExpectedLength ); } /* Only update command counters when message has a command code */ @@ -310,9 +311,9 @@ void CFE_TBL_TaskPipe(CFE_SB_Msg_t *MessagePtr) if (CmdIndx == CFE_TBL_BAD_CMD_CODE) { CFE_EVS_SendEvent(CFE_TBL_CC1_ERR_EID, CFE_EVS_EventType_ERROR, - "Invalid command code -- ID = 0x%04X, CC = %d", + "Invalid command code -- ID = 0x%X, CC = %u", (unsigned int)CFE_SB_MsgIdToValue(MessageID), - (int)CommandCode); + (unsigned int)CommandCode); /* Update the command error counter */ CFE_TBL_TaskData.CommandErrorCounter++; @@ -320,7 +321,7 @@ void CFE_TBL_TaskPipe(CFE_SB_Msg_t *MessagePtr) else /* CmdIndx == CFE_TBL_BAD_MSG_ID */ { CFE_EVS_SendEvent(CFE_TBL_MID_ERR_EID, CFE_EVS_EventType_ERROR, - "Invalid message ID -- ID = 0x%04X", + "Invalid message ID -- ID = 0x%X", (unsigned int)CFE_SB_MsgIdToValue(MessageID)); /* ** Note: we only increment the command error counter when diff --git a/fsw/cfe-core/src/tbl/cfe_tbl_task.h b/fsw/cfe-core/src/tbl/cfe_tbl_task.h index 96af49979..3a27b6a5b 100644 --- a/fsw/cfe-core/src/tbl/cfe_tbl_task.h +++ b/fsw/cfe-core/src/tbl/cfe_tbl_task.h @@ -197,7 +197,7 @@ typedef struct int32 ValidateInactiveIndex; /**< \brief Index to Validation Request on Inactive Table Result data */ int32 DumpControlIndex; /**< \brief Index to Dump Control Block */ CFE_ES_CDSHandle_t CDSHandle; /**< \brief Handle to Critical Data Store for Critical Tables */ - uint16 NotificationCC; /**< \brief Command Code of an associated management notification message */ + CFE_MSG_FcnCode_t NotificationCC; /**< \brief Command Code of an associated management notification message */ bool CriticalTable; /**< \brief Flag indicating whether table is a Critical Table */ bool TableLoadedOnce; /**< \brief Flag indicating whether table has been loaded once or not */ bool LoadPending; /**< \brief Flag indicating an inactive buffer is ready to be copied */ @@ -308,7 +308,7 @@ typedef struct /* ** Task operational data (not reported in housekeeping)... */ - CFE_SB_Msg_t *MsgPtr; /**< \brief Pointer to most recently received command message */ + CFE_MSG_Message_t *MsgPtr; /**< \brief Pointer to most recently received command message */ CFE_SB_PipeId_t CmdPipe; /**< \brief Table Task command pipe ID as obtained from Software Bus */ /* @@ -404,7 +404,7 @@ int32 CFE_TBL_TaskInit(void); ** ** ******************************************************************************/ -void CFE_TBL_TaskPipe(CFE_SB_Msg_t *MessagePtr); +void CFE_TBL_TaskPipe(CFE_MSG_Message_t *MessagePtr); /*****************************************************************************/ /** diff --git a/fsw/cfe-core/src/tbl/cfe_tbl_task_cmds.c b/fsw/cfe-core/src/tbl/cfe_tbl_task_cmds.c index 39048e696..68ab370c8 100644 --- a/fsw/cfe-core/src/tbl/cfe_tbl_task_cmds.c +++ b/fsw/cfe-core/src/tbl/cfe_tbl_task_cmds.c @@ -69,8 +69,8 @@ int32 CFE_TBL_HousekeepingCmd(const CFE_SB_CmdHdr_t *data) /* ** Send housekeeping telemetry packet */ - CFE_SB_TimeStampMsg((CFE_SB_Msg_t *) &CFE_TBL_TaskData.HkPacket); - Status = CFE_SB_SendMsg((CFE_SB_Msg_t *) &CFE_TBL_TaskData.HkPacket); + CFE_SB_TimeStampMsg((CFE_MSG_Message_t *) &CFE_TBL_TaskData.HkPacket); + Status = CFE_SB_SendMsg((CFE_MSG_Message_t *) &CFE_TBL_TaskData.HkPacket); if (Status != CFE_SUCCESS) { @@ -88,8 +88,8 @@ int32 CFE_TBL_HousekeepingCmd(const CFE_SB_CmdHdr_t *data) /* ** Send Table Registry Info Packet */ - CFE_SB_TimeStampMsg((CFE_SB_Msg_t *) &CFE_TBL_TaskData.TblRegPacket); - CFE_SB_SendMsg((CFE_SB_Msg_t *) &CFE_TBL_TaskData.TblRegPacket); + CFE_SB_TimeStampMsg((CFE_MSG_Message_t *) &CFE_TBL_TaskData.TblRegPacket); + CFE_SB_SendMsg((CFE_MSG_Message_t *) &CFE_TBL_TaskData.TblRegPacket); /* Once the data has been sent, clear the index so that we don't send it again and again */ CFE_TBL_TaskData.HkTlmTblRegIndex = CFE_TBL_NOT_FOUND; diff --git a/fsw/cfe-core/src/tbl/cfe_tbl_task_cmds.h b/fsw/cfe-core/src/tbl/cfe_tbl_task_cmds.h index c2f4f1aeb..dbbcb7c8d 100644 --- a/fsw/cfe-core/src/tbl/cfe_tbl_task_cmds.h +++ b/fsw/cfe-core/src/tbl/cfe_tbl_task_cmds.h @@ -72,8 +72,8 @@ typedef enum */ typedef struct { CFE_SB_MsgId_t MsgId; /**< \brief Acceptable Message ID */ - uint32 CmdCode; /**< \brief Acceptable Command Code (if necessary) */ - uint32 ExpectedLength; /**< \brief Expected Message Length (in bytes) including message header */ + CFE_MSG_FcnCode_t CmdCode; /**< \brief Acceptable Command Code (if necessary) */ + CFE_MSG_Size_t ExpectedLength; /**< \brief Expected Message Length (in bytes) including message header */ CFE_TBL_MsgProcFuncPtr_t MsgProcFuncPtr; /**< \brief Pointer to function to handle message */ CFE_TBL_MsgType_t MsgTypes; /**< \brief Message Type (i.e. - with/without Cmd Code) */ } CFE_TBL_CmdHandlerTblRec_t; diff --git a/fsw/cfe-core/src/time/cfe_time_task.c b/fsw/cfe-core/src/time/cfe_time_task.c index 0f7ef3a50..7fbc7fa9d 100644 --- a/fsw/cfe-core/src/time/cfe_time_task.c +++ b/fsw/cfe-core/src/time/cfe_time_task.c @@ -427,23 +427,27 @@ int32 CFE_TIME_TaskInit(void) ** Return: ** true if length is acceptable */ -bool CFE_TIME_VerifyCmdLength(CFE_SB_MsgPtr_t Msg, uint16 ExpectedLength) +bool CFE_TIME_VerifyCmdLength(CFE_MSG_Message_t *MsgPtr, CFE_MSG_Size_t ExpectedLength) { - bool result = true; - uint16 ActualLength = CFE_SB_GetTotalMsgLength(Msg); + bool result = true; + CFE_MSG_Size_t ActualLength = 0; + CFE_MSG_FcnCode_t FcnCode = 0; + CFE_SB_MsgId_t MsgId = CFE_SB_INVALID_MSG_ID; + + CFE_MSG_GetSize(MsgPtr, &ActualLength); /* ** Verify the command packet length */ if (ExpectedLength != ActualLength) { - CFE_SB_MsgId_t MessageID = CFE_SB_GetMsgId(Msg); - uint16 CommandCode = CFE_SB_GetCmdCode(Msg); + CFE_MSG_GetMsgId(MsgPtr, &MsgId); + CFE_MSG_GetFcnCode(MsgPtr, &FcnCode); CFE_EVS_SendEvent(CFE_TIME_LEN_ERR_EID, CFE_EVS_EventType_ERROR, - "Invalid cmd length: ID = 0x%X, CC = %d, Exp Len = %d, Len = %d", - (unsigned int)CFE_SB_MsgIdToValue(MessageID), - (int)CommandCode, (int)ExpectedLength, (int)ActualLength); + "Invalid msg length: ID = 0x%X, CC = %u, Len = %u, Expected = %u", + (unsigned int)CFE_SB_MsgIdToValue(MsgId), (unsigned int)FcnCode, + (unsigned int)ActualLength, (unsigned int)ExpectedLength); result = false; ++CFE_TIME_TaskData.CommandErrorCounter; } @@ -459,40 +463,41 @@ bool CFE_TIME_VerifyCmdLength(CFE_SB_MsgPtr_t Msg, uint16 ExpectedLength) /* */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -void CFE_TIME_TaskPipe(CFE_SB_MsgPtr_t MessagePtr) +void CFE_TIME_TaskPipe(CFE_MSG_Message_t *MsgPtr) { - CFE_SB_MsgId_t MessageID; - uint16 CommandCode; + CFE_SB_MsgId_t MessageID = CFE_SB_INVALID_MSG_ID; + CFE_MSG_FcnCode_t CommandCode = 0; + + CFE_MSG_GetMsgId(MsgPtr, &MessageID); - MessageID = CFE_SB_GetMsgId(MessagePtr); switch (CFE_SB_MsgIdToValue(MessageID)) { /* ** Housekeeping telemetry request... */ case CFE_TIME_SEND_HK_MID: - CFE_TIME_HousekeepingCmd((CFE_SB_CmdHdr_t *)MessagePtr); + CFE_TIME_HousekeepingCmd((CFE_SB_CmdHdr_t *)MsgPtr); break; /* ** Time at the tone "signal"... */ case CFE_TIME_TONE_CMD_MID: - CFE_TIME_ToneSignalCmd((CFE_SB_CmdHdr_t *)MessagePtr); + CFE_TIME_ToneSignalCmd((CFE_SB_CmdHdr_t *)MsgPtr); break; /* ** Time at the tone "data"... */ case CFE_TIME_DATA_CMD_MID: - CFE_TIME_ToneDataCmd((CFE_TIME_ToneDataCmd_t *)MessagePtr); + CFE_TIME_ToneDataCmd((CFE_TIME_ToneDataCmd_t *)MsgPtr); break; /* ** Run time state machine at 1Hz... */ case CFE_TIME_1HZ_CMD_MID: - CFE_TIME_OneHzCmd((CFE_SB_CmdHdr_t *)MessagePtr); + CFE_TIME_OneHzCmd((CFE_SB_CmdHdr_t *)MsgPtr); break; /* @@ -500,7 +505,7 @@ void CFE_TIME_TaskPipe(CFE_SB_MsgPtr_t MessagePtr) */ #if (CFE_PLATFORM_TIME_CFG_SERVER == true) case CFE_TIME_SEND_CMD_MID: - CFE_TIME_ToneSendCmd((CFE_SB_CmdHdr_t *)MessagePtr); + CFE_TIME_ToneSendCmd((CFE_SB_CmdHdr_t *)MsgPtr); break; #endif @@ -509,48 +514,48 @@ void CFE_TIME_TaskPipe(CFE_SB_MsgPtr_t MessagePtr) */ case CFE_TIME_CMD_MID: - CommandCode = CFE_SB_GetCmdCode(MessagePtr); + CFE_MSG_GetFcnCode(MsgPtr, &CommandCode); switch (CommandCode) { case CFE_TIME_NOOP_CC: - if (CFE_TIME_VerifyCmdLength(MessagePtr, sizeof(CFE_TIME_Noop_t))) + if (CFE_TIME_VerifyCmdLength(MsgPtr, sizeof(CFE_TIME_Noop_t))) { - CFE_TIME_NoopCmd((CFE_TIME_Noop_t *)MessagePtr); + CFE_TIME_NoopCmd((CFE_TIME_Noop_t *)MsgPtr); } break; case CFE_TIME_RESET_COUNTERS_CC: - if (CFE_TIME_VerifyCmdLength(MessagePtr, sizeof(CFE_TIME_ResetCounters_t))) + if (CFE_TIME_VerifyCmdLength(MsgPtr, sizeof(CFE_TIME_ResetCounters_t))) { - CFE_TIME_ResetCountersCmd((CFE_TIME_ResetCounters_t *)MessagePtr); + CFE_TIME_ResetCountersCmd((CFE_TIME_ResetCounters_t *)MsgPtr); } break; case CFE_TIME_SEND_DIAGNOSTIC_TLM_CC: - if (CFE_TIME_VerifyCmdLength(MessagePtr, sizeof(CFE_TIME_SendDiagnosticTlm_t))) + if (CFE_TIME_VerifyCmdLength(MsgPtr, sizeof(CFE_TIME_SendDiagnosticTlm_t))) { - CFE_TIME_SendDiagnosticTlm((CFE_TIME_SendDiagnosticTlm_t *)MessagePtr); + CFE_TIME_SendDiagnosticTlm((CFE_TIME_SendDiagnosticTlm_t *)MsgPtr); } break; case CFE_TIME_SET_STATE_CC: - if (CFE_TIME_VerifyCmdLength(MessagePtr, sizeof(CFE_TIME_SetState_t))) + if (CFE_TIME_VerifyCmdLength(MsgPtr, sizeof(CFE_TIME_SetState_t))) { - CFE_TIME_SetStateCmd((CFE_TIME_SetState_t *)MessagePtr); + CFE_TIME_SetStateCmd((CFE_TIME_SetState_t *)MsgPtr); } break; case CFE_TIME_SET_SOURCE_CC: - if (CFE_TIME_VerifyCmdLength(MessagePtr, sizeof(CFE_TIME_SetSource_t))) + if (CFE_TIME_VerifyCmdLength(MsgPtr, sizeof(CFE_TIME_SetSource_t))) { - CFE_TIME_SetSourceCmd((CFE_TIME_SetSource_t *)MessagePtr); + CFE_TIME_SetSourceCmd((CFE_TIME_SetSource_t *)MsgPtr); } break; case CFE_TIME_SET_SIGNAL_CC: - if (CFE_TIME_VerifyCmdLength(MessagePtr, sizeof(CFE_TIME_SetSignal_t))) + if (CFE_TIME_VerifyCmdLength(MsgPtr, sizeof(CFE_TIME_SetSignal_t))) { - CFE_TIME_SetSignalCmd((CFE_TIME_SetSignal_t *)MessagePtr); + CFE_TIME_SetSignalCmd((CFE_TIME_SetSignal_t *)MsgPtr); } break; @@ -558,16 +563,16 @@ void CFE_TIME_TaskPipe(CFE_SB_MsgPtr_t MessagePtr) ** Time Clients process "tone delay" commands... */ case CFE_TIME_ADD_DELAY_CC: - if (CFE_TIME_VerifyCmdLength(MessagePtr, sizeof(CFE_TIME_AddDelay_t))) + if (CFE_TIME_VerifyCmdLength(MsgPtr, sizeof(CFE_TIME_AddDelay_t))) { - CFE_TIME_AddDelayCmd((CFE_TIME_AddDelay_t *)MessagePtr); + CFE_TIME_AddDelayCmd((CFE_TIME_AddDelay_t *)MsgPtr); } break; case CFE_TIME_SUB_DELAY_CC: - if (CFE_TIME_VerifyCmdLength(MessagePtr, sizeof(CFE_TIME_SubDelay_t))) + if (CFE_TIME_VerifyCmdLength(MsgPtr, sizeof(CFE_TIME_SubDelay_t))) { - CFE_TIME_SubDelayCmd((CFE_TIME_SubDelay_t *)MessagePtr); + CFE_TIME_SubDelayCmd((CFE_TIME_SubDelay_t *)MsgPtr); } break; @@ -575,58 +580,58 @@ void CFE_TIME_TaskPipe(CFE_SB_MsgPtr_t MessagePtr) ** Time Servers process "set time" commands... */ case CFE_TIME_SET_TIME_CC: - if (CFE_TIME_VerifyCmdLength(MessagePtr, sizeof(CFE_TIME_SetTime_t))) + if (CFE_TIME_VerifyCmdLength(MsgPtr, sizeof(CFE_TIME_SetTime_t))) { - CFE_TIME_SetTimeCmd((CFE_TIME_SetTime_t *)MessagePtr); + CFE_TIME_SetTimeCmd((CFE_TIME_SetTime_t *)MsgPtr); } break; case CFE_TIME_SET_MET_CC: - if (CFE_TIME_VerifyCmdLength(MessagePtr, sizeof(CFE_TIME_SetMET_t))) + if (CFE_TIME_VerifyCmdLength(MsgPtr, sizeof(CFE_TIME_SetMET_t))) { - CFE_TIME_SetMETCmd((CFE_TIME_SetMET_t *)MessagePtr); + CFE_TIME_SetMETCmd((CFE_TIME_SetMET_t *)MsgPtr); } break; case CFE_TIME_SET_STCF_CC: - if (CFE_TIME_VerifyCmdLength(MessagePtr, sizeof(CFE_TIME_SetSTCF_t))) + if (CFE_TIME_VerifyCmdLength(MsgPtr, sizeof(CFE_TIME_SetSTCF_t))) { - CFE_TIME_SetSTCFCmd((CFE_TIME_SetSTCF_t *)MessagePtr); + CFE_TIME_SetSTCFCmd((CFE_TIME_SetSTCF_t *)MsgPtr); } break; case CFE_TIME_SET_LEAP_SECONDS_CC: - if (CFE_TIME_VerifyCmdLength(MessagePtr, sizeof(CFE_TIME_SetLeapSeconds_t))) + if (CFE_TIME_VerifyCmdLength(MsgPtr, sizeof(CFE_TIME_SetLeapSeconds_t))) { - CFE_TIME_SetLeapSecondsCmd((CFE_TIME_SetLeapSeconds_t *)MessagePtr); + CFE_TIME_SetLeapSecondsCmd((CFE_TIME_SetLeapSeconds_t *)MsgPtr); } break; case CFE_TIME_ADD_ADJUST_CC: - if (CFE_TIME_VerifyCmdLength(MessagePtr, sizeof(CFE_TIME_AddAdjust_t))) + if (CFE_TIME_VerifyCmdLength(MsgPtr, sizeof(CFE_TIME_AddAdjust_t))) { - CFE_TIME_AddAdjustCmd((CFE_TIME_AddAdjust_t *)MessagePtr); + CFE_TIME_AddAdjustCmd((CFE_TIME_AddAdjust_t *)MsgPtr); } break; case CFE_TIME_SUB_ADJUST_CC: - if (CFE_TIME_VerifyCmdLength(MessagePtr, sizeof(CFE_TIME_SubAdjust_t))) + if (CFE_TIME_VerifyCmdLength(MsgPtr, sizeof(CFE_TIME_SubAdjust_t))) { - CFE_TIME_SubAdjustCmd((CFE_TIME_SubAdjust_t *)MessagePtr); + CFE_TIME_SubAdjustCmd((CFE_TIME_SubAdjust_t *)MsgPtr); } break; case CFE_TIME_ADD_1HZ_ADJUSTMENT_CC: - if (CFE_TIME_VerifyCmdLength(MessagePtr, sizeof(CFE_TIME_Add1HZAdjustment_t))) + if (CFE_TIME_VerifyCmdLength(MsgPtr, sizeof(CFE_TIME_Add1HZAdjustment_t))) { - CFE_TIME_Add1HZAdjustmentCmd((CFE_TIME_Add1HZAdjustment_t *)MessagePtr); + CFE_TIME_Add1HZAdjustmentCmd((CFE_TIME_Add1HZAdjustment_t *)MsgPtr); } break; case CFE_TIME_SUB_1HZ_ADJUSTMENT_CC: - if (CFE_TIME_VerifyCmdLength(MessagePtr, sizeof(CFE_TIME_Sub1HZAdjustment_t))) + if (CFE_TIME_VerifyCmdLength(MsgPtr, sizeof(CFE_TIME_Sub1HZAdjustment_t))) { - CFE_TIME_Sub1HZAdjustmentCmd((CFE_TIME_Sub1HZAdjustment_t *)MessagePtr); + CFE_TIME_Sub1HZAdjustmentCmd((CFE_TIME_Sub1HZAdjustment_t *)MsgPtr); } break; @@ -687,8 +692,8 @@ int32 CFE_TIME_HousekeepingCmd(const CFE_SB_CmdHdr_t *data) /* ** Send housekeeping telemetry packet... */ - CFE_SB_TimeStampMsg((CFE_SB_Msg_t *) &CFE_TIME_TaskData.HkPacket); - CFE_SB_SendMsg((CFE_SB_Msg_t *) &CFE_TIME_TaskData.HkPacket); + CFE_SB_TimeStampMsg((CFE_MSG_Message_t *) &CFE_TIME_TaskData.HkPacket); + CFE_SB_SendMsg((CFE_MSG_Message_t *) &CFE_TIME_TaskData.HkPacket); /* ** Note: we only increment the command execution counter when @@ -883,8 +888,8 @@ int32 CFE_TIME_SendDiagnosticTlm(const CFE_TIME_SendDiagnosticTlm_t *data) /* ** Send housekeeping telemetry packet... */ - CFE_SB_TimeStampMsg((CFE_SB_Msg_t *) &CFE_TIME_TaskData.DiagPacket); - CFE_SB_SendMsg((CFE_SB_Msg_t *) &CFE_TIME_TaskData.DiagPacket); + CFE_SB_TimeStampMsg((CFE_MSG_Message_t *) &CFE_TIME_TaskData.DiagPacket); + CFE_SB_SendMsg((CFE_MSG_Message_t *) &CFE_TIME_TaskData.DiagPacket); CFE_EVS_SendEvent(CFE_TIME_DIAG_EID, CFE_EVS_EventType_DEBUG, "Request diagnostics command"); diff --git a/fsw/cfe-core/src/time/cfe_time_tone.c b/fsw/cfe-core/src/time/cfe_time_tone.c index ae1ca4295..b5cfd312e 100644 --- a/fsw/cfe-core/src/time/cfe_time_tone.c +++ b/fsw/cfe-core/src/time/cfe_time_tone.c @@ -165,7 +165,7 @@ void CFE_TIME_ToneSend(void) /* ** Send "time at the tone" command data packet... */ - CFE_SB_SendMsg((CFE_SB_Msg_t *) &CFE_TIME_TaskData.ToneDataCmd); + CFE_SB_SendMsg((CFE_MSG_Message_t *) &CFE_TIME_TaskData.ToneDataCmd); /* ** Count of "time at the tone" commands sent with internal data... @@ -305,7 +305,7 @@ int32 CFE_TIME_ToneSendMET(CFE_TIME_SysTime_t NewMET) /* ** Send "time at the tone" command data packet... */ - CFE_SB_SendMsg((CFE_SB_Msg_t *) &CFE_TIME_TaskData.ToneDataCmd); + CFE_SB_SendMsg((CFE_MSG_Message_t *) &CFE_TIME_TaskData.ToneDataCmd); /* ** Count of "time at the tone" commands sent with external data... @@ -459,7 +459,7 @@ int32 CFE_TIME_ToneSendGPS(CFE_TIME_SysTime_t NewTime, int16 NewLeaps) /* ** Send "time at the tone" command data packet... */ - CFE_SB_SendMsg((CFE_SB_Msg_t *) &CFE_TIME_TaskData.ToneDataCmd); + CFE_SB_SendMsg((CFE_MSG_Message_t *) &CFE_TIME_TaskData.ToneDataCmd); /* ** Count of "time at the tone" commands sent with external data... @@ -612,7 +612,7 @@ int32 CFE_TIME_ToneSendTime(CFE_TIME_SysTime_t NewTime) /* ** Send "time at the tone" command data packet... */ - CFE_SB_SendMsg((CFE_SB_Msg_t *) &CFE_TIME_TaskData.ToneDataCmd); + CFE_SB_SendMsg((CFE_MSG_Message_t *) &CFE_TIME_TaskData.ToneDataCmd); /* ** Count of "time at the tone" commands sent with external data... @@ -1217,7 +1217,7 @@ void CFE_TIME_Tone1HzTask(void) /* ** Send tone signal command packet... */ - CFE_SB_SendMsg((CFE_SB_Msg_t *) &CFE_TIME_TaskData.ToneSignalCmd); + CFE_SB_SendMsg((CFE_MSG_Message_t *) &CFE_TIME_TaskData.ToneSignalCmd); #if (CFE_MISSION_TIME_CFG_FAKE_TONE == true) /* @@ -1225,7 +1225,7 @@ void CFE_TIME_Tone1HzTask(void) ** to send the tone to other time clients. ** (this is done by scheduler in non-fake mode) */ - CFE_SB_SendMsg((CFE_SB_Msg_t *) &CFE_TIME_TaskData.ToneSendCmd); + CFE_SB_SendMsg((CFE_MSG_Message_t *) &CFE_TIME_TaskData.ToneSendCmd); #endif /* @@ -1434,7 +1434,7 @@ void CFE_TIME_Local1HzTask(void) ** This used to be optional in previous CFE versions, but it is now required ** as TIME subscribes to this itself to do state machine tasks. */ - CFE_SB_SendMsg((CFE_SB_Msg_t *) &CFE_TIME_TaskData.Local1HzCmd); + CFE_SB_SendMsg((CFE_MSG_Message_t *) &CFE_TIME_TaskData.Local1HzCmd); CFE_TIME_TaskData.LocalTaskCounter++; } diff --git a/fsw/cfe-core/src/time/cfe_time_utils.c b/fsw/cfe-core/src/time/cfe_time_utils.c index fec19f7a9..0130d15f0 100644 --- a/fsw/cfe-core/src/time/cfe_time_utils.c +++ b/fsw/cfe-core/src/time/cfe_time_utils.c @@ -388,48 +388,48 @@ void CFE_TIME_InitData(void) /* ** Initialize housekeeping packet (clear user data area)... */ - CFE_SB_InitMsg(&CFE_TIME_TaskData.HkPacket, - CFE_SB_ValueToMsgId(CFE_TIME_HK_TLM_MID), - sizeof(CFE_TIME_TaskData.HkPacket), true); + CFE_MSG_Init(&CFE_TIME_TaskData.HkPacket.TlmHeader.BaseMsg, + CFE_SB_ValueToMsgId(CFE_TIME_HK_TLM_MID), + sizeof(CFE_TIME_TaskData.HkPacket)); /* ** Initialize diagnostic packet (clear user data area)... */ - CFE_SB_InitMsg(&CFE_TIME_TaskData.DiagPacket, - CFE_SB_ValueToMsgId(CFE_TIME_DIAG_TLM_MID), - sizeof(CFE_TIME_TaskData.DiagPacket), true); + CFE_MSG_Init(&CFE_TIME_TaskData.DiagPacket.TlmHeader.BaseMsg, + CFE_SB_ValueToMsgId(CFE_TIME_DIAG_TLM_MID), + sizeof(CFE_TIME_TaskData.DiagPacket)); /* ** Initialize "time at the tone" signal command packet... */ - CFE_SB_InitMsg(&CFE_TIME_TaskData.ToneSignalCmd, - CFE_SB_ValueToMsgId(CFE_TIME_TONE_CMD_MID), - sizeof(CFE_TIME_TaskData.ToneSignalCmd), true); + CFE_MSG_Init(&CFE_TIME_TaskData.ToneSignalCmd.CmdHeader.BaseMsg, + CFE_SB_ValueToMsgId(CFE_TIME_TONE_CMD_MID), + sizeof(CFE_TIME_TaskData.ToneSignalCmd)); /* ** Initialize "time at the tone" data command packet... */ #if (CFE_PLATFORM_TIME_CFG_SERVER == true) - CFE_SB_InitMsg(&CFE_TIME_TaskData.ToneDataCmd, - CFE_SB_ValueToMsgId(CFE_TIME_DATA_CMD_MID), - sizeof(CFE_TIME_TaskData.ToneDataCmd), true); + CFE_MSG_Init((CFE_MSG_Message_t *)&CFE_TIME_TaskData.ToneDataCmd, + CFE_SB_ValueToMsgId(CFE_TIME_DATA_CMD_MID), + sizeof(CFE_TIME_TaskData.ToneDataCmd)); #endif /* ** Initialize simulated tone send message ("fake tone" mode only)... */ #if (CFE_MISSION_TIME_CFG_FAKE_TONE == true) - CFE_SB_InitMsg(&CFE_TIME_TaskData.ToneSendCmd, - CFE_SB_ValueToMsgId(CFE_TIME_SEND_CMD_MID), - sizeof(CFE_TIME_TaskData.ToneSendCmd), true); + CFE_MSG_Init(&CFE_TIME_TaskData.ToneSendCmd.BaseMsg, + CFE_SB_ValueToMsgId(CFE_TIME_SEND_CMD_MID), + sizeof(CFE_TIME_TaskData.ToneSendCmd)); #endif /* ** Initialize local 1Hz "wake-up" command packet (optional)... */ - CFE_SB_InitMsg(&CFE_TIME_TaskData.Local1HzCmd, + CFE_MSG_Init((CFE_MSG_Message_t *)&CFE_TIME_TaskData.Local1HzCmd, CFE_SB_ValueToMsgId(CFE_TIME_1HZ_CMD_MID), - sizeof(CFE_TIME_TaskData.Local1HzCmd), true); + sizeof(CFE_TIME_TaskData.Local1HzCmd)); return; diff --git a/fsw/cfe-core/src/time/cfe_time_utils.h b/fsw/cfe-core/src/time/cfe_time_utils.h index d89f19350..facd2d773 100644 --- a/fsw/cfe-core/src/time/cfe_time_utils.h +++ b/fsw/cfe-core/src/time/cfe_time_utils.h @@ -183,8 +183,8 @@ typedef struct /* ** Task operational data (not reported in housekeeping)... */ - CFE_SB_MsgPtr_t MsgPtr; - CFE_SB_PipeId_t CmdPipe; + CFE_MSG_Message_t *MsgPtr; + CFE_SB_PipeId_t CmdPipe; /* ** Task initialization data (not reported in housekeeping)... @@ -349,7 +349,7 @@ CFE_TIME_SysTime_t CFE_TIME_LatchClock(void); ** Function prototypes (Time Services utilities data)... */ int32 CFE_TIME_TaskInit (void); -void CFE_TIME_TaskPipe(CFE_SB_MsgPtr_t MessagePtr); +void CFE_TIME_TaskPipe(CFE_MSG_Message_t *MsgPtr); void CFE_TIME_InitData(void); void CFE_TIME_QueryResetVars(void); void CFE_TIME_UpdateResetVars(const CFE_TIME_Reference_t *Reference);