Skip to content

Commit a98c165

Browse files
committed
Fix nasa#50, Apply consistent Event ID names to common events in MM
1 parent a4d4d0c commit a98c165

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

fsw/inc/mm_events.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@
228228
* This event message is issued when a software bus message is received
229229
* with an invalid command code.
230230
*/
231-
#define MM_CC1_ERR_EID 17
231+
#define MM_CC_ERR_EID 17
232232

233233
/**
234234
* \brief MM Command Message Length Invalid Event ID
@@ -240,7 +240,7 @@
240240
* This event message is issued when command message is received with a message
241241
* length that doesn't match the expected value.
242242
*/
243-
#define MM_LEN_ERR_EID 18
243+
#define MM_CMD_LEN_ERR_EID 18
244244

245245
/**
246246
* \brief MM Commanded Memory Type Invalid Event ID

fsw/src/mm_app.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ void MM_AppPipe(const CFE_SB_Buffer_t *BufPtr)
348348

349349
default:
350350
CmdResult = false;
351-
CFE_EVS_SendEvent(MM_CC1_ERR_EID, CFE_EVS_EventType_ERROR,
351+
CFE_EVS_SendEvent(MM_CC_ERR_EID, CFE_EVS_EventType_ERROR,
352352
"Invalid ground command code: ID = 0x%08lX, CC = %d",
353353
(unsigned long)CFE_SB_MsgIdToValue(MessageID), CommandCode);
354354
break;

fsw/src/mm_utils.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ bool MM_VerifyCmdLength(const CFE_MSG_Message_t *MsgPtr, size_t ExpectedLength)
117117
}
118118
else
119119
{
120-
CFE_EVS_SendEvent(MM_LEN_ERR_EID, CFE_EVS_EventType_ERROR,
120+
CFE_EVS_SendEvent(MM_CMD_LEN_ERR_EID, CFE_EVS_EventType_ERROR,
121121
"Invalid msg length: ID = 0x%08lX, CC = %d, Len = %d, Expected = %d",
122122
(unsigned long)CFE_SB_MsgIdToValue(MessageID), CommandCode, (int)ActualLength,
123123
(int)ExpectedLength);

fsw/src/mm_utils.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ void MM_SegmentBreak(void);
7979
* \retval true Length matches expected
8080
* \retval false Length does not match expected
8181
*
82-
* \sa #MM_LEN_ERR_EID
82+
* \sa #MM_CMD_LEN_ERR_EID
8383
*/
8484
bool MM_VerifyCmdLength(const CFE_MSG_Message_t *MsgPtr, size_t ExpectedLength);
8585

unit-test/mm_app_tests.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1100,7 +1100,7 @@ void MM_AppPipe_Test_InvalidCommandCode(void)
11001100
UtAssert_INT32_EQ(MM_AppData.HkPacket.Payload.CmdCounter, 0);
11011101
UtAssert_INT32_EQ(MM_AppData.HkPacket.Payload.ErrCounter, 1);
11021102

1103-
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, MM_CC1_ERR_EID);
1103+
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, MM_CC_ERR_EID);
11041104
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventType, CFE_EVS_EventType_ERROR);
11051105

11061106
strCmpResult = strncmp(ExpectedEventString, context_CFE_EVS_SendEvent[0].Spec, CFE_MISSION_EVS_MAX_MESSAGE_LENGTH);

unit-test/mm_utils_tests.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ void MM_VerifyCmdLength_Test_LengthError(void)
180180
/* Verify results */
181181
UtAssert_True(Result == false, "Result == false");
182182

183-
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, MM_LEN_ERR_EID);
183+
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, MM_CMD_LEN_ERR_EID);
184184
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventType, CFE_EVS_EventType_ERROR);
185185

186186
strCmpResult = strncmp(ExpectedEventString, context_CFE_EVS_SendEvent[0].Spec, CFE_MISSION_EVS_MAX_MESSAGE_LENGTH);

0 commit comments

Comments
 (0)