From 28f39250e60aca5da6c1275cef7d02c3aea2e152 Mon Sep 17 00:00:00 2001 From: Avi Date: Tue, 18 Oct 2022 17:55:56 +1000 Subject: [PATCH] Fix #262, Update inaccurate event ID name --- fsw/inc/cf_events.h | 2 +- fsw/src/cf_cfdp_types.h | 1 - fsw/src/cf_dispatch.c | 2 +- unit-test/cf_dispatch_tests.c | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/fsw/inc/cf_events.h b/fsw/inc/cf_events.h index bd12f644..28c1ff72 100644 --- a/fsw/inc/cf_events.h +++ b/fsw/inc/cf_events.h @@ -132,7 +132,7 @@ * * Invalid message ID received on the software bus pipe */ -#define CF_EID_ERR_INVALID_MID (28) +#define CF_MID_ERR_EID (28) /** * \brief CF SB Receive Buffer Failed Event ID diff --git a/fsw/src/cf_cfdp_types.h b/fsw/src/cf_cfdp_types.h index 3b3f2b30..f2051511 100644 --- a/fsw/src/cf_cfdp_types.h +++ b/fsw/src/cf_cfdp_types.h @@ -163,7 +163,6 @@ typedef enum /* keep last */ CF_TxnStatus_MAX = 22 - } CF_TxnStatus_t; /** diff --git a/fsw/src/cf_dispatch.c b/fsw/src/cf_dispatch.c index 7fb323b1..3442d82b 100644 --- a/fsw/src/cf_dispatch.c +++ b/fsw/src/cf_dispatch.c @@ -151,7 +151,7 @@ void CF_AppPipe(const CFE_SB_Buffer_t *msg) default: ++CF_AppData.hk.Payload.counters.err; - CFE_EVS_SendEvent(CF_EID_ERR_INVALID_MID, CFE_EVS_EventType_ERROR, "CF: invalid command packet id=0x%lx", + CFE_EVS_SendEvent(CF_MID_ERR_EID, CFE_EVS_EventType_ERROR, "CF: invalid command packet id=0x%lx", (unsigned long)CFE_SB_MsgIdToValue(msg_id)); break; } diff --git a/unit-test/cf_dispatch_tests.c b/unit-test/cf_dispatch_tests.c index 37d89d83..d5083c38 100644 --- a/unit-test/cf_dispatch_tests.c +++ b/unit-test/cf_dispatch_tests.c @@ -262,7 +262,7 @@ void Test_CF_AppPipe_UnrecognizedCommandEnterDefaultPath(void) /* Assert */ UtAssert_UINT32_EQ(CF_AppData.hk.Payload.counters.err, 1); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UT_CF_AssertEventID(CF_EID_ERR_INVALID_MID); + UT_CF_AssertEventID(CF_MID_ERR_EID); } void add_CF_ProcessGroundCommand_tests(void)