diff --git a/config/default_sc_fcncodes.h b/config/default_sc_fcncodes.h index 51fe355..86b58b4 100644 --- a/config/default_sc_fcncodes.h +++ b/config/default_sc_fcncodes.h @@ -238,7 +238,7 @@ * Successful execution of this command may be verified with * the following telemetry: * - #SC_HkTlm_Payload_t.CmdCtr will increment - * - The #SC_DISABLE_RTS_DEB_EID will be sent + * - The #SC_DISABLE_RTS_INF_EID will be sent * * \par Error Conditions * This command may fail for the following reason(s): @@ -269,7 +269,7 @@ * Successful execution of this command may be verified with * the following telemetry: * - #SC_HkTlm_Payload_t.CmdCtr will increment - * - The #SC_ENABLE_RTS_DEB_EID will be sent + * - The #SC_ENABLE_RTS_INF_EID will be sent * * \par Error Conditions * This command may fail for the following reason(s): @@ -362,7 +362,7 @@ * Successful execution of this command may be verified with * the following telemetry: * - #SC_HkTlm_Payload_t.CmdCtr will increment - * - The #SC_CONT_CMD_DEB_EID will be sent + * - The #SC_CONT_CMD_INF_EID will be sent * * \par Error Conditions * This command may fail for the following reason(s): @@ -430,6 +430,7 @@ * \par Command Verification * Successful execution of this command may be verified via: * - cFE Table Services housekeeping telemetry + * - The #SC_TABLE_MANAGE_INF_EID will be sent * * \par Error Conditions * This command may fail for the following reason(s): diff --git a/fsw/inc/sc_events.h b/fsw/inc/sc_events.h index 9d566ee..0b9c179 100644 --- a/fsw/inc/sc_events.h +++ b/fsw/inc/sc_events.h @@ -414,13 +414,13 @@ /** * \brief SC Continue ATS On Failure Command Event ID * - * \par Type: DEBUG + * \par Type: INFORMATIONAL * * \par Cause: * This event message is issued when the #SC_CONTINUE_ATS_ON_FAILURE_CC command was received and * the state was changed successfully */ -#define SC_CONT_CMD_DEB_EID 43 +#define SC_CONT_CMD_INF_EID 43 /** * \brief SC ATS Command Skipped Checksum Failed Event ID @@ -503,12 +503,13 @@ /** * \brief SC Reset Counters Command Event ID * - * \par Type: DEBUG + * \par Type: INFORMATIONAL * * \par Cause: - * This event message is issued when the #SC_RESET_COUNTERS_CC command was received + * This event message is issued when the #SC_RESET_COUNTERS_CC command was + * received */ -#define SC_RESET_DEB_EID 51 +#define SC_RESET_INF_EID 51 /** * \brief SC No-op Command Event ID @@ -751,12 +752,13 @@ /** * \brief SC Disable RTS Command Event ID * - * \par Type: DEBUG + * \par Type: INFORMATIONAL * * \par Cause: - * This event message is issued when a #SC_DISABLE_RTS_CC command was received, and executed successfully + * This event message is issued when a #SC_DISABLE_RTS_CC command was received, + * and executed successfully */ -#define SC_DISABLE_RTS_DEB_EID 80 +#define SC_DISABLE_RTS_INF_EID 80 /** * \brief SC Disable RTS Rejected RTS ID Invalid Event ID @@ -772,12 +774,13 @@ /** * \brief SC Enable RTS Command ID Event ID * - * \par Type: DEBUG + * \par Type: INFORMATIONAL * * \par Cause: - * This event message is issued when a #SC_ENABLE_RTS_CC command was received, and executed successfully + * This event message is issued when a #SC_ENABLE_RTS_CC command was received, + * and executed successfully */ -#define SC_ENABLE_RTS_DEB_EID 82 +#define SC_ENABLE_RTS_INF_EID 82 /** * \brief SC Enable RTS Rejected RTS ID Invalid Event ID @@ -1351,6 +1354,17 @@ */ #define SC_AUTOSTART_RTS_INV_ID_ERR_EID 138 +/** + * \brief SC Manage Table Command Event ID + * + * \par Type: INFORMATION + * + * \par Cause: + * This event message is issued when the #SC_MANAGE_TABLE_CC command + * was received and processed successfully. + */ +#define SC_TABLE_MANAGE_INF_EID 139 + /**\}*/ #endif diff --git a/fsw/src/sc_atsrq.c b/fsw/src/sc_atsrq.c index 6dd536a..0efeebc 100644 --- a/fsw/src/sc_atsrq.c +++ b/fsw/src/sc_atsrq.c @@ -656,7 +656,8 @@ void SC_ContinueAtsOnFailureCmd(const SC_ContinueAtsOnFailureCmd_t *Cmd) SC_OperData.HkPacket.Payload.CmdCtr++; - CFE_EVS_SendEvent(SC_CONT_CMD_DEB_EID, CFE_EVS_EventType_DEBUG, "Continue-ATS-On-Failure command, State: %lu", + CFE_EVS_SendEvent(SC_CONT_CMD_INF_EID, CFE_EVS_EventType_INFORMATION, + "Continue-ATS-On-Failure command, State: %lu", (unsigned long)State); } } diff --git a/fsw/src/sc_cmds.c b/fsw/src/sc_cmds.c index 84ab048..aee5353 100644 --- a/fsw/src/sc_cmds.c +++ b/fsw/src/sc_cmds.c @@ -59,12 +59,12 @@ void SC_ProcessAtpCmd(void) SC_CommandIndex_t CmdIndex; /* ATS command index */ CFE_Status_t Result; bool AbortATS = false; - SC_AtsEntry_t * EntryPtr; + SC_AtsEntry_t *EntryPtr; CFE_SB_MsgId_t MessageID = CFE_SB_INVALID_MSG_ID; CFE_MSG_FcnCode_t CommandCode = 0; bool ChecksumValid; SC_AtsCmdEntryOffsetRecord_t *CmdOffsetRec; /* ATS entry location in table */ - SC_AtsCmdStatusEntry_t * StatusEntryPtr; + SC_AtsCmdStatusEntry_t *StatusEntryPtr; /* ** The following conditions must be met before the ATS command will be @@ -289,7 +289,7 @@ void SC_ProcessAtpCmd(void) void SC_ProcessRtpCommand(void) { - SC_RtsEntry_t * EntryPtr; /* a pointer to an RTS entry header */ + SC_RtsEntry_t *EntryPtr; /* a pointer to an RTS entry header */ SC_RtsIndex_t RtsIndex; /* the RTS index for the cmd */ SC_EntryOffset_t CmdOffset; /* the location of the cmd */ CFE_Status_t Result; @@ -518,7 +518,7 @@ void SC_SendHkCmd(const SC_SendHkCmd_t *Cmd) void SC_ResetCountersCmd(const SC_ResetCountersCmd_t *Cmd) { - CFE_EVS_SendEvent(SC_RESET_DEB_EID, CFE_EVS_EventType_DEBUG, "Reset counters command"); + CFE_EVS_SendEvent(SC_RESET_INF_EID, CFE_EVS_EventType_INFORMATION, "Reset counters command"); SC_OperData.HkPacket.Payload.CmdCtr = 0; SC_OperData.HkPacket.Payload.CmdErrCtr = 0; @@ -606,49 +606,50 @@ void SC_NoopCmd(const SC_NoopCmd_t *Cmd) void SC_ManageTableCmd(const SC_ManageTableCmd_t *Cmd) { - int32 ArrayIndex; - int32 TableID = Cmd->Payload.Parameter; + int32 ArrayIndex; + int32 TableID = Cmd->Payload.Parameter; + CFE_Status_t Status = SC_ERROR; /* Manage selected table as appropriate for each table type */ if ((TableID >= SC_TBL_ID_ATS_0) && (TableID < (SC_TBL_ID_ATS_0 + SC_NUMBER_OF_ATS))) { ArrayIndex = TableID - SC_TBL_ID_ATS_0; - SC_ManageAtsTable(ArrayIndex); + Status = SC_ManageAtsTable(ArrayIndex); } else if (TableID == SC_TBL_ID_APPEND) { - SC_ManageTable(APPEND, -1); + Status = SC_ManageTable(APPEND, -1); } else if ((TableID >= SC_TBL_ID_RTS_0) && (TableID < (SC_TBL_ID_RTS_0 + SC_NUMBER_OF_RTS))) { ArrayIndex = TableID - SC_TBL_ID_RTS_0; - SC_ManageRtsTable(ArrayIndex); + Status = SC_ManageRtsTable(ArrayIndex); } else if (TableID == SC_TBL_ID_RTS_INFO) { /* No need to release dump only table pointer */ - CFE_TBL_Manage(SC_OperData.RtsInfoHandle); + Status = CFE_TBL_Manage(SC_OperData.RtsInfoHandle); } else if (TableID == SC_TBL_ID_RTP_CTRL) { /* No need to release dump only table pointer */ - CFE_TBL_Manage(SC_OperData.RtsCtrlBlckHandle); + Status = CFE_TBL_Manage(SC_OperData.RtsCtrlBlckHandle); } else if (TableID == SC_TBL_ID_ATS_INFO) { /* No need to release dump only table pointer */ - CFE_TBL_Manage(SC_OperData.AtsInfoHandle); + Status = CFE_TBL_Manage(SC_OperData.AtsInfoHandle); } else if (TableID == SC_TBL_ID_ATP_CTRL) { /* No need to release dump only table pointer */ - CFE_TBL_Manage(SC_OperData.AtsCtrlBlckHandle); + Status = CFE_TBL_Manage(SC_OperData.AtsCtrlBlckHandle); } else if ((TableID >= SC_TBL_ID_ATS_CMD_0) && (TableID < (SC_TBL_ID_ATS_CMD_0 + SC_NUMBER_OF_ATS))) { /* No need to release dump only table pointer */ ArrayIndex = TableID - SC_TBL_ID_ATS_CMD_0; - CFE_TBL_Manage(SC_OperData.AtsCmdStatusHandle[ArrayIndex]); + Status = CFE_TBL_Manage(SC_OperData.AtsCmdStatusHandle[ArrayIndex]); } else { @@ -656,6 +657,11 @@ void SC_ManageTableCmd(const SC_ManageTableCmd_t *Cmd) CFE_EVS_SendEvent(SC_TABLE_MANAGE_ID_ERR_EID, CFE_EVS_EventType_ERROR, "Table manage command packet error: table ID = %d", (int)TableID); } + + if (Status >= CFE_SUCCESS) + { + CFE_EVS_SendEvent(SC_TABLE_MANAGE_INF_EID, CFE_EVS_EventType_INFORMATION, "Table manage command."); + } } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -664,17 +670,22 @@ void SC_ManageTableCmd(const SC_ManageTableCmd_t *Cmd) /* */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -void SC_ManageRtsTable(int32 ArrayIndex) +CFE_Status_t SC_ManageRtsTable(int32 ArrayIndex) { + CFE_Status_t Status = SC_ERROR; + /* validate array index */ if (ArrayIndex >= SC_NUMBER_OF_RTS) { CFE_EVS_SendEvent(SC_TABLE_MANAGE_RTS_INV_INDEX_ERR_EID, CFE_EVS_EventType_ERROR, "RTS table manage error: invalid RTS index %d", (int)ArrayIndex); - return; + } + else + { + Status = SC_ManageTable(RTS, ArrayIndex); } - SC_ManageTable(RTS, ArrayIndex); + return Status; } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -683,17 +694,22 @@ void SC_ManageRtsTable(int32 ArrayIndex) /* */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -void SC_ManageAtsTable(int32 ArrayIndex) +CFE_Status_t SC_ManageAtsTable(int32 ArrayIndex) { + CFE_Status_t Status = SC_ERROR; + /* validate array index */ if (ArrayIndex >= SC_NUMBER_OF_ATS) { CFE_EVS_SendEvent(SC_TABLE_MANAGE_ATS_INV_INDEX_ERR_EID, CFE_EVS_EventType_ERROR, "ATS table manage error: invalid ATS index %d", (int)ArrayIndex); - return; + } + else + { + Status = SC_ManageTable(ATS, ArrayIndex); } - SC_ManageTable(ATS, ArrayIndex); + return Status; } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -702,12 +718,12 @@ void SC_ManageAtsTable(int32 ArrayIndex) /* */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -void SC_ManageTable(SC_TableType type, int32 ArrayIndex) +CFE_Status_t SC_ManageTable(SC_TableType type, int32 ArrayIndex) { CFE_Status_t Result; CFE_TBL_Handle_t TblHandle; - uint32 ** TblAddr; - void * TblPtrNew; + uint32 **TblAddr; + void *TblPtrNew; switch (type) { @@ -773,4 +789,5 @@ void SC_ManageTable(SC_TableType type, int32 ArrayIndex) } } + return Result; } /* End SC_ManageTable() */ diff --git a/fsw/src/sc_cmds.h b/fsw/src/sc_cmds.h index 2d35a08..9e98095 100644 --- a/fsw/src/sc_cmds.h +++ b/fsw/src/sc_cmds.h @@ -69,9 +69,12 @@ void SC_ManageTableCmd(const SC_ManageTableCmd_t *Cmd); * * \param [in] ArrayIndex index into array of RTS tables * + * \return CFE_SUCCESS on success, a non-negative informational return + * code (e.g. CFE_TBL_INFO_UPDATED) or a (negative) error code + * * \sa #SC_ManageTableCmd */ -void SC_ManageRtsTable(int32 ArrayIndex); +CFE_Status_t SC_ManageRtsTable(int32 ArrayIndex); /** * \brief Manage pending update to an ATS table @@ -88,9 +91,12 @@ void SC_ManageRtsTable(int32 ArrayIndex); * * \param [in] ArrayIndex index into array of ATS tables * + * \return CFE_SUCCESS on success, a non-negative informational return + * code (e.g. CFE_TBL_INFO_UPDATED) or a (negative) error code + * * \sa #SC_ManageTableCmd */ -void SC_ManageAtsTable(int32 ArrayIndex); +CFE_Status_t SC_ManageAtsTable(int32 ArrayIndex); /** * \brief Manage pending update to a table @@ -105,9 +111,12 @@ void SC_ManageAtsTable(int32 ArrayIndex); * \par Assumptions, External Events, and Notes: * None * + * \return CFE_SUCCESS on success, a non-negative informational return + * code (e.g. CFE_TBL_INFO_UPDATED) or a (negative) error code + * * \sa #SC_ManageTableCmd */ -void SC_ManageTable(SC_TableType type, int32 ArrayIndex); +CFE_Status_t SC_ManageTable(SC_TableType type, int32 ArrayIndex); /** * \brief Sends out an Event message diff --git a/fsw/src/sc_rtsrq.c b/fsw/src/sc_rtsrq.c index 72c900d..1f3bcbc 100644 --- a/fsw/src/sc_rtsrq.c +++ b/fsw/src/sc_rtsrq.c @@ -367,8 +367,8 @@ void SC_DisableRtsCmd(const SC_DisableRtsCmd_t *Cmd) /* update the command status */ SC_OperData.HkPacket.Payload.CmdCtr++; - CFE_EVS_SendEvent(SC_DISABLE_RTS_DEB_EID, CFE_EVS_EventType_DEBUG, "Disabled RTS %03u", - SC_IDNUM_AS_UINT(RtsNum)); + CFE_EVS_SendEvent(SC_DISABLE_RTS_INF_EID, CFE_EVS_EventType_INFORMATION, + "Disabled RTS %03u", SC_IDNUM_AS_UINT(RtsNum)); } else { /* it is not a valid RTS id */ @@ -458,7 +458,8 @@ void SC_EnableRtsCmd(const SC_EnableRtsCmd_t *Cmd) /* update the command status */ SC_OperData.HkPacket.Payload.CmdCtr++; - CFE_EVS_SendEvent(SC_ENABLE_RTS_DEB_EID, CFE_EVS_EventType_DEBUG, "Enabled RTS %03u", SC_IDNUM_AS_UINT(RtsNum)); + CFE_EVS_SendEvent(SC_ENABLE_RTS_INF_EID, CFE_EVS_EventType_INFORMATION, + "Enabled RTS %03u", SC_IDNUM_AS_UINT(RtsNum)); } else { /* it is not a valid RTS id */ diff --git a/unit-test/sc_atsrq_tests.c b/unit-test/sc_atsrq_tests.c index c5c1302..569dfc5 100644 --- a/unit-test/sc_atsrq_tests.c +++ b/unit-test/sc_atsrq_tests.c @@ -952,7 +952,8 @@ void ContinueAtsOnFailureCmd_Test_Nominal(void) UtAssert_BOOL_TRUE(SC_OperData.HkPacket.Payload.ContinueAtsOnFailureFlag); UtAssert_True(SC_OperData.HkPacket.Payload.CmdCtr == 1, "SC_OperData.HkPacket.Payload.CmdCtr == 1"); - UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, SC_CONT_CMD_DEB_EID); + UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, + SC_CONT_CMD_INF_EID); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); } @@ -974,7 +975,8 @@ void ContinueAtsOnFailureCmd_Test_FalseState(void) "SC_OperData.HkPacket.Payload.ContinueAtsOnFailureFlag == false"); UtAssert_True(SC_OperData.HkPacket.Payload.CmdCtr == 1, "SC_OperData.HkPacket.Payload.CmdCtr == 1"); - UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, SC_CONT_CMD_DEB_EID); + UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, + SC_CONT_CMD_INF_EID); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); } diff --git a/unit-test/sc_cmds_tests.c b/unit-test/sc_cmds_tests.c index 1025f5e..08d85e4 100644 --- a/unit-test/sc_cmds_tests.c +++ b/unit-test/sc_cmds_tests.c @@ -1204,7 +1204,7 @@ void SC_ProcessCommand_Test_ResetCounters(void) UtAssert_True(SC_OperData.HkPacket.Payload.RtsActiveCtr == 0, "RtsActiveCtr == 0"); UtAssert_True(SC_OperData.HkPacket.Payload.RtsActiveErrCtr == 0, "RtsActiveErrCtr == 0"); - UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, SC_RESET_DEB_EID); + UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, SC_RESET_INF_EID); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); } @@ -1306,7 +1306,9 @@ void SC_ProcessCommand_Test_TableManageAtsTableNominal(void) /* Execute the function being tested */ UtAssert_VOIDCALL(SC_ManageTableCmd(&UT_CmdBuf.ManageTableCmd)); - /* This function is already verified to work correctly in another file, so no verifications here. */ + /* Verify that no errors occured. */ + UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, SC_TABLE_MANAGE_INF_EID); + UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); } void SC_ProcessCommand_Test_TableManageAtsTableGetAddressError(void) @@ -1396,7 +1398,9 @@ void SC_ProcessCommand_Test_TableManageAtsTableGetAddressSuccess(void) /* Execute the function being tested */ UtAssert_VOIDCALL(SC_ManageTableCmd(&UT_CmdBuf.ManageTableCmd)); - /* This function is already verified to work correctly in another file, so no verifications here. */ + /* Verify that no errors occured. */ + UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, SC_TABLE_MANAGE_INF_EID); + UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); } void SC_ProcessCommand_Test_TableManageAppendTableNominal(void) @@ -1422,7 +1426,9 @@ void SC_ProcessCommand_Test_TableManageAppendTableNominal(void) /* Execute the function being tested */ UtAssert_VOIDCALL(SC_ManageTableCmd(&UT_CmdBuf.ManageTableCmd)); - /* This function is already verified to work correctly in another file, so no verifications here. */ + /* Verify that no errors occured. */ + UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, SC_TABLE_MANAGE_INF_EID); + UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); } void SC_ProcessCommand_Test_TableManageAppendTableGetAddressError(void) @@ -1487,7 +1493,9 @@ void SC_ProcessCommand_Test_TableManageAppendTableGetAddressSuccess(void) /* Execute the function being tested */ UtAssert_VOIDCALL(SC_ManageTableCmd(&UT_CmdBuf.ManageTableCmd)); - /* This function is already verified to work correctly in another file, so no verifications here. */ + /* Verify that no errors occured. */ + UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, SC_TABLE_MANAGE_INF_EID); + UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); } void SC_ProcessCommand_Test_TableManageRtsTableNominal(void) @@ -1500,7 +1508,9 @@ void SC_ProcessCommand_Test_TableManageRtsTableNominal(void) /* Execute the function being tested */ UtAssert_VOIDCALL(SC_ManageTableCmd(&UT_CmdBuf.ManageTableCmd)); - /* This function is already verified to work correctly in another file, so no verifications here. */ + /* Verify that no errors occured. */ + UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, SC_TABLE_MANAGE_INF_EID); + UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); } void SC_ProcessCommand_Test_TableManageRtsTableGetAddressError(void) @@ -1565,7 +1575,9 @@ void SC_ProcessCommand_Test_TableManageRtsTableGetAddressSuccess(void) /* Execute the function being tested */ UtAssert_VOIDCALL(SC_ManageTableCmd(&UT_CmdBuf.ManageTableCmd)); - /* This function is already verified to work correctly in another file, so no verifications here. */ + /* Verify that no errors occured. */ + UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, SC_TABLE_MANAGE_INF_EID); + UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); } void SC_ProcessCommand_Test_TableManageRtsInfo(void) diff --git a/unit-test/sc_rtsrq_tests.c b/unit-test/sc_rtsrq_tests.c index c4f4a0b..0a01362 100644 --- a/unit-test/sc_rtsrq_tests.c +++ b/unit-test/sc_rtsrq_tests.c @@ -634,7 +634,8 @@ void SC_DisableRtsCmd_Test_Nominal(void) UtAssert_True(RtsInfoPtr->DisabledFlag == true, "RtsInfoPtr->DisabledFlag == true"); UtAssert_True(SC_OperData.HkPacket.Payload.CmdCtr == 1, "SC_OperData.HkPacket.Payload.CmdCtr == 1"); - UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, SC_DISABLE_RTS_DEB_EID); + UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, + SC_DISABLE_RTS_INF_EID); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); } @@ -802,7 +803,8 @@ void SC_EnableRtsCmd_Test_Nominal(void) UtAssert_True(RtsInfoPtr->DisabledFlag == false, "RtsInfoPtr->DisabledFlag == false"); UtAssert_True(SC_OperData.HkPacket.Payload.CmdCtr == 1, "SC_OperData.HkPacket.Payload.CmdCtr == 1"); - UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, SC_ENABLE_RTS_DEB_EID); + UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, + SC_ENABLE_RTS_INF_EID); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); } diff --git a/unit-test/stubs/sc_cmds_stubs.c b/unit-test/stubs/sc_cmds_stubs.c index e3681b1..ca51588 100644 --- a/unit-test/stubs/sc_cmds_stubs.c +++ b/unit-test/stubs/sc_cmds_stubs.c @@ -31,11 +31,15 @@ * Generated stub function for SC_ManageAtsTable() * ---------------------------------------------------- */ -void SC_ManageAtsTable(int32 ArrayIndex) +CFE_Status_t SC_ManageAtsTable(int32 ArrayIndex) { + UT_GenStub_SetupReturnBuffer(SC_ManageAtsTable, CFE_Status_t); + UT_GenStub_AddParam(SC_ManageAtsTable, int32, ArrayIndex); UT_GenStub_Execute(SC_ManageAtsTable, Basic, NULL); + + return UT_GenStub_GetReturnValue(SC_ManageAtsTable, CFE_Status_t); } /* @@ -43,11 +47,15 @@ void SC_ManageAtsTable(int32 ArrayIndex) * Generated stub function for SC_ManageRtsTable() * ---------------------------------------------------- */ -void SC_ManageRtsTable(int32 ArrayIndex) +CFE_Status_t SC_ManageRtsTable(int32 ArrayIndex) { + UT_GenStub_SetupReturnBuffer(SC_ManageRtsTable, CFE_Status_t); + UT_GenStub_AddParam(SC_ManageRtsTable, int32, ArrayIndex); UT_GenStub_Execute(SC_ManageRtsTable, Basic, NULL); + + return UT_GenStub_GetReturnValue(SC_ManageRtsTable, CFE_Status_t); } /* @@ -55,12 +63,16 @@ void SC_ManageRtsTable(int32 ArrayIndex) * Generated stub function for SC_ManageTable() * ---------------------------------------------------- */ -void SC_ManageTable(SC_TableType type, int32 ArrayIndex) +CFE_Status_t SC_ManageTable(SC_TableType type, int32 ArrayIndex) { + UT_GenStub_SetupReturnBuffer(SC_ManageTable, CFE_Status_t); + UT_GenStub_AddParam(SC_ManageTable, SC_TableType, type); UT_GenStub_AddParam(SC_ManageTable, int32, ArrayIndex); UT_GenStub_Execute(SC_ManageTable, Basic, NULL); + + return UT_GenStub_GetReturnValue(SC_ManageTable, CFE_Status_t); } /*