Skip to content

Commit 8ff4138

Browse files
committedOct 21, 2022
Fix #50, Apply consistent Event ID names to common events
1 parent 2efdc96 commit 8ff4138

File tree

7 files changed

+20
-20
lines changed

7 files changed

+20
-20
lines changed
 

‎fsw/src/mm_app.c

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

307307
default:
308308
CmdResult = false;
309-
CFE_EVS_SendEvent(MM_CC1_ERR_EID, CFE_EVS_EventType_ERROR,
309+
CFE_EVS_SendEvent(MM_CC_ERR_EID, CFE_EVS_EventType_ERROR,
310310
"Invalid ground command code: ID = 0x%08lX, CC = %d",
311311
(unsigned long)CFE_SB_MsgIdToValue(MessageID), CommandCode);
312312
break;

‎fsw/src/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_msgdefs.h

+13-13
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
*
100100
* \par Evidence of failure may be found in the following telemetry:
101101
* - #MM_HkPacket_t.ErrCounter will increment
102-
* - Error specific event message #MM_LEN_ERR_EID
102+
* - Error specific event message #MM_CMD_LEN_ERR_EID
103103
*
104104
* \par Criticality
105105
* None
@@ -131,7 +131,7 @@
131131
*
132132
* \par Evidence of failure may be found in the following telemetry:
133133
* - #MM_HkPacket_t.ErrCounter will increment
134-
* - Error specific event message #MM_LEN_ERR_EID
134+
* - Error specific event message #MM_CMD_LEN_ERR_EID
135135
*
136136
* \par Criticality
137137
* None
@@ -175,7 +175,7 @@
175175
*
176176
* \par Evidence of failure may be found in the following telemetry:
177177
* - #MM_HkPacket_t.ErrCounter will increment
178-
* - Error specific event message #MM_LEN_ERR_EID
178+
* - Error specific event message #MM_CMD_LEN_ERR_EID
179179
* - Error specific event message #MM_SYMNAME_ERR_EID
180180
* - Error specific event message #MM_DATA_SIZE_BITS_ERR_EID
181181
* - Error specific event message #MM_MEMTYPE_ERR_EID
@@ -233,7 +233,7 @@
233233
*
234234
* \par Evidence of failure may be found in the following telemetry:
235235
* - #MM_HkPacket_t.ErrCounter will increment
236-
* - Error specific event message #MM_LEN_ERR_EID
236+
* - Error specific event message #MM_CMD_LEN_ERR_EID
237237
* - Error specific event message #MM_SYMNAME_ERR_EID
238238
* - Error specific event message #MM_DATA_SIZE_BITS_ERR_EID
239239
* - Error specific event message #MM_MEMTYPE_ERR_EID
@@ -293,7 +293,7 @@
293293
*
294294
* \par Evidence of failure may be found in the following telemetry:
295295
* - #MM_HkPacket_t.ErrCounter will increment
296-
* - Error specific event message #MM_LEN_ERR_EID
296+
* - Error specific event message #MM_CMD_LEN_ERR_EID
297297
* - Error specific event message #MM_SYMNAME_ERR_EID
298298
* - Error specific event message #MM_LOAD_WID_CRC_ERR_EID
299299
* - Error specific event message #MM_OS_MEMVALIDATE_ERR_EID
@@ -357,7 +357,7 @@
357357
*
358358
* \par Evidence of failure may be found in the following telemetry:
359359
* - #MM_HkPacket_t.ErrCounter will increment
360-
* - Error specific event message #MM_LEN_ERR_EID
360+
* - Error specific event message #MM_CMD_LEN_ERR_EID
361361
* - Error specific event message #MM_OS_OPEN_ERR_EID
362362
* - Error specific event message #MM_OS_CLOSE_ERR_EID
363363
* - Error specific event message #MM_OS_READ_EXP_ERR_EID
@@ -430,7 +430,7 @@
430430
*
431431
* \par Evidence of failure may be found in the following telemetry:
432432
* - #MM_HkPacket_t.ErrCounter will increment
433-
* - Error specific event message #MM_LEN_ERR_EID
433+
* - Error specific event message #MM_CMD_LEN_ERR_EID
434434
* - Error specific event message #MM_SYMNAME_ERR_EID
435435
* - Error specific event message #MM_OS_CREAT_ERR_EID
436436
* - Error specific event message #MM_CFE_FS_WRITEHDR_ERR_EID
@@ -488,7 +488,7 @@
488488
*
489489
* \par Evidence of failure may be found in the following telemetry:
490490
* - #MM_HkPacket_t.ErrCounter will increment
491-
* - Error specific event message #MM_LEN_ERR_EID
491+
* - Error specific event message #MM_CMD_LEN_ERR_EID
492492
* - Error specific event message #MM_SYMNAME_ERR_EID
493493
* - Error specific event message #MM_OS_MEMVALIDATE_ERR_EID
494494
* - Error specific event message #MM_DATA_SIZE_BYTES_ERR_EID
@@ -542,7 +542,7 @@
542542
*
543543
* \par Evidence of failure may be found in the following telemetry:
544544
* - #MM_HkPacket_t.ErrCounter will increment
545-
* - Error specific event message #MM_LEN_ERR_EID
545+
* - Error specific event message #MM_CMD_LEN_ERR_EID
546546
* - Error specific event message #MM_SYMNAME_ERR_EID
547547
* - Error specific event message #MM_OS_MEMVALIDATE_ERR_EID
548548
* - Error specific event message #MM_DATA_SIZE_BYTES_ERR_EID
@@ -592,7 +592,7 @@
592592
*
593593
* \par Evidence of failure may be found in the following telemetry:
594594
* - #MM_HkPacket_t.ErrCounter will increment
595-
* - Error specific event message #MM_LEN_ERR_EID
595+
* - Error specific event message #MM_CMD_LEN_ERR_EID
596596
* - Error specific event message #MM_SYMNAME_NUL_ERR_EID
597597
* - Error specific event message #MM_SYMNAME_ERR_EID
598598
*
@@ -630,7 +630,7 @@
630630
*
631631
* \par Evidence of failure may be found in the following telemetry:
632632
* - #MM_HkPacket_t.ErrCounter will increment
633-
* - Error specific event message #MM_LEN_ERR_EID
633+
* - Error specific event message #MM_CMD_LEN_ERR_EID
634634
* - Error specific event message #MM_SYMFILENAME_NUL_ERR_EID
635635
* - Error specific event message #MM_SYMTBL_TO_FILE_FAIL_ERR_EID
636636
*
@@ -668,7 +668,7 @@
668668
*
669669
* \par Evidence of failure may be found in the following telemetry:
670670
* - #MM_HkPacket_t.ErrCounter will increment
671-
* - Error specific event message #MM_LEN_ERR_EID
671+
* - Error specific event message #MM_CMD_LEN_ERR_EID
672672
* - Error specific event message #MM_EEPROM_WRITE_ENA_ERR_EID
673673
*
674674
* \par Criticality
@@ -706,7 +706,7 @@
706706
*
707707
* \par Evidence of failure may be found in the following telemetry:
708708
* - #MM_HkPacket_t.ErrCounter will increment
709-
* - Error specific event message #MM_LEN_ERR_EID
709+
* - Error specific event message #MM_CMD_LEN_ERR_EID
710710
* - Error specific event message #MM_EEPROM_WRITE_DIS_ERR_EID
711711
*
712712
* \par Criticality

‎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
@@ -1095,7 +1095,7 @@ void MM_AppPipe_Test_InvalidCommandCode(void)
10951095
UtAssert_INT32_EQ(MM_AppData.HkPacket.CmdCounter, 0);
10961096
UtAssert_INT32_EQ(MM_AppData.HkPacket.ErrCounter, 1);
10971097

1098-
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, MM_CC1_ERR_EID);
1098+
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, MM_CC_ERR_EID);
10991099
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventType, CFE_EVS_EventType_ERROR);
11001100

11011101
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)