Skip to content

Commit b8fb572

Browse files
authored
Merge pull request #51 from thnkslprpt/fix-50-apply-consistent-event-id-names
Fix #50, Apply consistent Event ID names to common events
2 parents 4b24eba + cc1834f commit b8fb572

File tree

7 files changed

+20
-20
lines changed

7 files changed

+20
-20
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/inc/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_Payload_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_Payload_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
@@ -176,7 +176,7 @@
176176
*
177177
* \par Evidence of failure may be found in the following telemetry:
178178
* - #MM_HkPacket_Payload_t.ErrCounter will increment
179-
* - Error specific event message #MM_LEN_ERR_EID
179+
* - Error specific event message #MM_CMD_LEN_ERR_EID
180180
* - Error specific event message #MM_SYMNAME_ERR_EID
181181
* - Error specific event message #MM_DATA_SIZE_BITS_ERR_EID
182182
* - Error specific event message #MM_MEMTYPE_ERR_EID
@@ -235,7 +235,7 @@
235235
*
236236
* \par Evidence of failure may be found in the following telemetry:
237237
* - #MM_HkPacket_Payload_t.ErrCounter will increment
238-
* - Error specific event message #MM_LEN_ERR_EID
238+
* - Error specific event message #MM_CMD_LEN_ERR_EID
239239
* - Error specific event message #MM_SYMNAME_ERR_EID
240240
* - Error specific event message #MM_DATA_SIZE_BITS_ERR_EID
241241
* - Error specific event message #MM_MEMTYPE_ERR_EID
@@ -295,7 +295,7 @@
295295
*
296296
* \par Evidence of failure may be found in the following telemetry:
297297
* - #MM_HkPacket_Payload_t.ErrCounter will increment
298-
* - Error specific event message #MM_LEN_ERR_EID
298+
* - Error specific event message #MM_CMD_LEN_ERR_EID
299299
* - Error specific event message #MM_SYMNAME_ERR_EID
300300
* - Error specific event message #MM_LOAD_WID_CRC_ERR_EID
301301
* - Error specific event message #MM_OS_MEMVALIDATE_ERR_EID
@@ -359,7 +359,7 @@
359359
*
360360
* \par Evidence of failure may be found in the following telemetry:
361361
* - #MM_HkPacket_Payload_t.ErrCounter will increment
362-
* - Error specific event message #MM_LEN_ERR_EID
362+
* - Error specific event message #MM_CMD_LEN_ERR_EID
363363
* - Error specific event message #MM_OS_OPEN_ERR_EID
364364
* - Error specific event message #MM_OS_CLOSE_ERR_EID
365365
* - Error specific event message #MM_OS_READ_EXP_ERR_EID
@@ -432,7 +432,7 @@
432432
*
433433
* \par Evidence of failure may be found in the following telemetry:
434434
* - #MM_HkPacket_Payload_t.ErrCounter will increment
435-
* - Error specific event message #MM_LEN_ERR_EID
435+
* - Error specific event message #MM_CMD_LEN_ERR_EID
436436
* - Error specific event message #MM_SYMNAME_ERR_EID
437437
* - Error specific event message #MM_OS_CREAT_ERR_EID
438438
* - Error specific event message #MM_CFE_FS_WRITEHDR_ERR_EID
@@ -490,7 +490,7 @@
490490
*
491491
* \par Evidence of failure may be found in the following telemetry:
492492
* - #MM_HkPacket_Payload_t.ErrCounter will increment
493-
* - Error specific event message #MM_LEN_ERR_EID
493+
* - Error specific event message #MM_CMD_LEN_ERR_EID
494494
* - Error specific event message #MM_SYMNAME_ERR_EID
495495
* - Error specific event message #MM_OS_MEMVALIDATE_ERR_EID
496496
* - Error specific event message #MM_DATA_SIZE_BYTES_ERR_EID
@@ -544,7 +544,7 @@
544544
*
545545
* \par Evidence of failure may be found in the following telemetry:
546546
* - #MM_HkPacket_Payload_t.ErrCounter will increment
547-
* - Error specific event message #MM_LEN_ERR_EID
547+
* - Error specific event message #MM_CMD_LEN_ERR_EID
548548
* - Error specific event message #MM_SYMNAME_ERR_EID
549549
* - Error specific event message #MM_OS_MEMVALIDATE_ERR_EID
550550
* - Error specific event message #MM_DATA_SIZE_BYTES_ERR_EID
@@ -594,7 +594,7 @@
594594
*
595595
* \par Evidence of failure may be found in the following telemetry:
596596
* - #MM_HkPacket_Payload_t.ErrCounter will increment
597-
* - Error specific event message #MM_LEN_ERR_EID
597+
* - Error specific event message #MM_CMD_LEN_ERR_EID
598598
* - Error specific event message #MM_SYMNAME_NUL_ERR_EID
599599
* - Error specific event message #MM_SYMNAME_ERR_EID
600600
*
@@ -632,7 +632,7 @@
632632
*
633633
* \par Evidence of failure may be found in the following telemetry:
634634
* - #MM_HkPacket_Payload_t.ErrCounter will increment
635-
* - Error specific event message #MM_LEN_ERR_EID
635+
* - Error specific event message #MM_CMD_LEN_ERR_EID
636636
* - Error specific event message #MM_SYMFILENAME_NUL_ERR_EID
637637
* - Error specific event message #MM_SYMTBL_TO_FILE_FAIL_ERR_EID
638638
*
@@ -670,7 +670,7 @@
670670
*
671671
* \par Evidence of failure may be found in the following telemetry:
672672
* - #MM_HkPacket_Payload_t.ErrCounter will increment
673-
* - Error specific event message #MM_LEN_ERR_EID
673+
* - Error specific event message #MM_CMD_LEN_ERR_EID
674674
* - Error specific event message #MM_EEPROM_WRITE_ENA_ERR_EID
675675
*
676676
* \par Criticality
@@ -708,7 +708,7 @@
708708
*
709709
* \par Evidence of failure may be found in the following telemetry:
710710
* - #MM_HkPacket_Payload_t.ErrCounter will increment
711-
* - Error specific event message #MM_LEN_ERR_EID
711+
* - Error specific event message #MM_CMD_LEN_ERR_EID
712712
* - Error specific event message #MM_EEPROM_WRITE_DIS_ERR_EID
713713
*
714714
* \par Criticality

fsw/src/mm_app.c

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

351351
default:
352352
CmdResult = false;
353-
CFE_EVS_SendEvent(MM_CC1_ERR_EID, CFE_EVS_EventType_ERROR,
353+
CFE_EVS_SendEvent(MM_CC_ERR_EID, CFE_EVS_EventType_ERROR,
354354
"Invalid ground command code: ID = 0x%08lX, CC = %d",
355355
(unsigned long)CFE_SB_MsgIdToValue(MessageID), CommandCode);
356356
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
@@ -1102,7 +1102,7 @@ void MM_AppPipe_Test_InvalidCommandCode(void)
11021102
UtAssert_INT32_EQ(MM_AppData.HkPacket.Payload.CmdCounter, 0);
11031103
UtAssert_INT32_EQ(MM_AppData.HkPacket.Payload.ErrCounter, 1);
11041104

1105-
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, MM_CC1_ERR_EID);
1105+
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, MM_CC_ERR_EID);
11061106
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventType, CFE_EVS_EventType_ERROR);
11071107

11081108
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
@@ -183,7 +183,7 @@ void MM_VerifyCmdLength_Test_LengthError(void)
183183
/* Verify results */
184184
UtAssert_True(Result == false, "Result == false");
185185

186-
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, MM_LEN_ERR_EID);
186+
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, MM_CMD_LEN_ERR_EID);
187187
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventType, CFE_EVS_EventType_ERROR);
188188

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

0 commit comments

Comments
 (0)