diff --git a/fsw/inc/fm_events.h b/fsw/inc/fm_events.h index ba3e1c1..82533f8 100644 --- a/fsw/inc/fm_events.h +++ b/fsw/inc/fm_events.h @@ -39,7 +39,7 @@ * This event message is issued after the File Manager application has * successfully completed startup initialization. */ -#define FM_STARTUP_EID 1 +#define FM_INIT_INF_EID 1 /** * \brief FM Initialization Register For Event Services Failed Event ID @@ -71,7 +71,7 @@ * This is a fatal error that will cause the File Manager application * to terminate. */ -#define FM_STARTUP_CREAT_PIPE_ERR_EID 3 +#define FM_CR_PIPE_ERR_EID 3 /** * \brief FM Initialization Subscribe to HK Request Failed Event ID @@ -188,7 +188,7 @@ * This event message is generated upon receipt of a housekeeping * request command packet with an invalid length. */ -#define FM_HK_REQ_ERR_EID 11 +#define FM_HKREQ_LEN_ERR_EID 11 /** * \brief FM No-op Command Event ID @@ -200,7 +200,7 @@ * This event message signals the successful completion of a * /FM_Noop command. */ -#define FM_NOOP_CMD_EID 12 +#define FM_NOOP_INF_EID 12 /** * \brief FM No-op Command Length Invalid Event ID @@ -227,7 +227,7 @@ * This event message signals the successful completion of a * /FM_ResetCtrs command. */ -#define FM_RESET_CMD_EID 14 +#define FM_RESET_INF_EID 14 /** * \brief FM Reset Counters Command Length Invalid Event ID diff --git a/fsw/inc/fm_msgdefs.h b/fsw/inc/fm_msgdefs.h index 6fa0e41..6270143 100644 --- a/fsw/inc/fm_msgdefs.h +++ b/fsw/inc/fm_msgdefs.h @@ -44,7 +44,7 @@ * #FM_NoopCmd_t * * \par Command Success Verification - * - Informational event #FM_NOOP_CMD_EID will be sent + * - Informational event #FM_NOOP_INF_EID will be sent * - #FM_HousekeepingPkt_Payload_t.CommandCounter will increment * * \par Command Error Conditions @@ -75,7 +75,7 @@ * * \par Command Success Verification * - Command counters will be set to zero (see description) - * - Debug event #FM_RESET_CMD_EID will be sent + * - Debug event #FM_RESET_INF_EID will be sent * * \par Command Error Conditions * - Invalid command packet length diff --git a/fsw/src/fm_app.c b/fsw/src/fm_app.c index a00def3..ed87c2e 100644 --- a/fsw/src/fm_app.c +++ b/fsw/src/fm_app.c @@ -186,8 +186,8 @@ int32 FM_AppInit(void) Result = CFE_SB_CreatePipe(&FM_GlobalData.CmdPipe, FM_APP_PIPE_DEPTH, FM_APP_PIPE_NAME); if (Result != CFE_SUCCESS) { - CFE_EVS_SendEvent(FM_STARTUP_CREAT_PIPE_ERR_EID, CFE_EVS_EventType_ERROR, - "%s create SB input pipe: result = 0x%08X", ErrText, (unsigned int)Result); + CFE_EVS_SendEvent(FM_CR_PIPE_ERR_EID, CFE_EVS_EventType_ERROR, "%s create SB input pipe: result = 0x%08X", + ErrText, (unsigned int)Result); } else { @@ -229,7 +229,7 @@ int32 FM_AppInit(void) FM_ChildInit(); /* Application startup event message */ - CFE_EVS_SendEvent(FM_STARTUP_EID, CFE_EVS_EventType_INFORMATION, + CFE_EVS_SendEvent(FM_INIT_INF_EID, CFE_EVS_EventType_INFORMATION, "Initialization complete: version %d.%d.%d.%d", FM_MAJOR_VERSION, FM_MINOR_VERSION, FM_REVISION, FM_MISSION_REV); } @@ -394,7 +394,7 @@ void FM_SendHkCmd(const CFE_SB_Buffer_t *BufPtr) FM_HousekeepingPkt_Payload_t *PayloadPtr; /* Verify command packet length */ - Result = FM_IsValidCmdPktLength(CFE_MSG_PTR(*BufPtr), sizeof(FM_SendHkCmd_t), FM_HK_REQ_ERR_EID, CmdText); + Result = FM_IsValidCmdPktLength(CFE_MSG_PTR(*BufPtr), sizeof(FM_SendHkCmd_t), FM_HKREQ_LEN_ERR_EID, CmdText); if (Result == true) { diff --git a/fsw/src/fm_cmds.c b/fsw/src/fm_cmds.c index 84b6f42..a46abc7 100644 --- a/fsw/src/fm_cmds.c +++ b/fsw/src/fm_cmds.c @@ -64,7 +64,7 @@ bool FM_NoopCmd(const CFE_SB_Buffer_t *BufPtr) /* Send command completion event (info) */ if (CommandResult == true) { - CFE_EVS_SendEvent(FM_NOOP_CMD_EID, CFE_EVS_EventType_INFORMATION, "%s command: FM version %d.%d.%d.%d", CmdText, + CFE_EVS_SendEvent(FM_NOOP_INF_EID, CFE_EVS_EventType_INFORMATION, "%s command: FM version %d.%d.%d.%d", CmdText, FM_MAJOR_VERSION, FM_MINOR_VERSION, FM_REVISION, FM_MISSION_REV); } @@ -96,7 +96,7 @@ bool FM_ResetCountersCmd(const CFE_SB_Buffer_t *BufPtr) FM_GlobalData.ChildCmdWarnCounter = 0; /* Send command completion event (debug) */ - CFE_EVS_SendEvent(FM_RESET_CMD_EID, CFE_EVS_EventType_DEBUG, "%s command", CmdText); + CFE_EVS_SendEvent(FM_RESET_INF_EID, CFE_EVS_EventType_DEBUG, "%s command", CmdText); } return CommandResult; diff --git a/unit-test/fm_app_tests.c b/unit-test/fm_app_tests.c index 28556a1..0d5aa33 100644 --- a/unit-test/fm_app_tests.c +++ b/unit-test/fm_app_tests.c @@ -94,7 +94,7 @@ void Test_FM_AppMain_SBReceiveBufferDefaultOption(void) UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 3); UtAssert_STUB_COUNT(CFE_ES_ExitApp, 1); UtAssert_STUB_COUNT(CFE_SB_ReceiveBuffer, 1); - UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, FM_STARTUP_EID); + UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, FM_INIT_INF_EID); UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventType, CFE_EVS_EventType_INFORMATION); UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[1].EventID, FM_SB_RECEIVE_ERR_EID); UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[1].EventType, CFE_EVS_EventType_ERROR); @@ -260,7 +260,7 @@ void Test_FM_AppInit_CreatePipeFail(void) UtAssert_STUB_COUNT(CFE_EVS_Register, 1); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); UtAssert_STUB_COUNT(CFE_SB_CreatePipe, 1); - UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, FM_STARTUP_CREAT_PIPE_ERR_EID); + UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, FM_CR_PIPE_ERR_EID); UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventType, CFE_EVS_EventType_ERROR); } @@ -340,7 +340,7 @@ void Test_FM_AppInit_TableInitSuccess(void) UtAssert_STUB_COUNT(CFE_SB_CreatePipe, 1); UtAssert_STUB_COUNT(CFE_SB_Subscribe, 2); UtAssert_STUB_COUNT(FM_ChildInit, 1); - UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, FM_STARTUP_EID); + UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, FM_INIT_INF_EID); UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventType, CFE_EVS_EventType_INFORMATION); } diff --git a/unit-test/fm_child_tests.c b/unit-test/fm_child_tests.c index 5233524..54179c7 100644 --- a/unit-test/fm_child_tests.c +++ b/unit-test/fm_child_tests.c @@ -1683,9 +1683,11 @@ void Test_FM_ChildDirListPktCmd_DirListOffsetNotExceeded(void) FM_DirListPkt_Payload_t *ReportPtr; /* Arrange */ - FM_ChildQueueEntry_t queue_entry = { - .CommandCode = FM_GET_DIR_LIST_PKT_CC, .Source1 = "dummy_source1", .Source2 = "dummy_source2", .DirListOffset = 1}; - os_dirent_t direntry = {.FileName = "filename"}; + FM_ChildQueueEntry_t queue_entry = {.CommandCode = FM_GET_DIR_LIST_PKT_CC, + .Source1 = "dummy_source1", + .Source2 = "dummy_source2", + .DirListOffset = 1}; + os_dirent_t direntry = {.FileName = "filename"}; UT_SetDeferredRetcode(UT_KEY(OS_DirectoryRead), 2, !OS_SUCCESS); UT_SetDataBuffer(UT_KEY(OS_DirectoryRead), &direntry, sizeof(direntry), false); diff --git a/unit-test/fm_cmds_tests.c b/unit-test/fm_cmds_tests.c index ce551ca..6be9d5b 100644 --- a/unit-test/fm_cmds_tests.c +++ b/unit-test/fm_cmds_tests.c @@ -76,7 +76,7 @@ void Test_FM_NoopCmd_Success(void) UtAssert_INT32_EQ(call_count_CFE_EVS_SendEvent, 1); - UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, FM_NOOP_CMD_EID); + UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, FM_NOOP_INF_EID); UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventType, CFE_EVS_EventType_INFORMATION); @@ -133,7 +133,7 @@ void Test_FM_ResetCountersCmd_Success(void) UtAssert_INT32_EQ(call_count_CFE_EVS_SendEvent, 1); - UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, FM_RESET_CMD_EID); + UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, FM_RESET_INF_EID); UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventType, CFE_EVS_EventType_DEBUG);