From f4a2c35afd113f8fd1e7376bef66014431d19516 Mon Sep 17 00:00:00 2001 From: Avi Weiss Date: Sat, 8 Jun 2024 08:06:54 +0200 Subject: [PATCH] Fix #128, Standardize command responses --- fsw/inc/ds_events.h | 4 ++-- fsw/inc/ds_msgdefs.h | 4 ++-- fsw/src/ds_cmds.c | 2 +- unit-test/ds_cmds_tests.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/fsw/inc/ds_events.h b/fsw/inc/ds_events.h index 7deab6d..d1dfcf0 100644 --- a/fsw/inc/ds_events.h +++ b/fsw/inc/ds_events.h @@ -284,7 +284,7 @@ /** * \brief DS Reset Counters Command Event ID * - * \par Type: DEBUG + * \par Type: INFORMATION * * \par Cause: * @@ -292,7 +292,7 @@ * counters command. The command is used primarily to clear counters * that have already been examined. */ -#define DS_RESET_CMD_EID 33 +#define DS_RESET_INF_EID 33 /** * \brief DS Reset Counters Command Invalid Length Event ID diff --git a/fsw/inc/ds_msgdefs.h b/fsw/inc/ds_msgdefs.h index 471a8af..aebc03e 100644 --- a/fsw/inc/ds_msgdefs.h +++ b/fsw/inc/ds_msgdefs.h @@ -70,7 +70,7 @@ * \par Command Verification * Evidence of success may be found in the following telemetry: * - #DS_HkTlm_Payload_t.CmdAcceptedCounter will reset to zero - * - The #DS_RESET_CMD_EID debug event message will be sent + * - The #DS_RESET_INF_EID informational event message will be sent * * \par Error Conditions * This command can fail for the following reasons: @@ -612,4 +612,4 @@ /**\}*/ -#endif \ No newline at end of file +#endif diff --git a/fsw/src/ds_cmds.c b/fsw/src/ds_cmds.c index 581f034..c40752b 100644 --- a/fsw/src/ds_cmds.c +++ b/fsw/src/ds_cmds.c @@ -103,7 +103,7 @@ void DS_ResetCountersCmd(const CFE_SB_Buffer_t *BufPtr) DS_AppData.FilterTblLoadCounter = 0; DS_AppData.FilterTblErrCounter = 0; - CFE_EVS_SendEvent(DS_RESET_CMD_EID, CFE_EVS_EventType_DEBUG, "Reset counters command"); + CFE_EVS_SendEvent(DS_RESET_INF_EID, CFE_EVS_EventType_INFORMATION, "Reset counters command"); } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/unit-test/ds_cmds_tests.c b/unit-test/ds_cmds_tests.c index 376a601..76908e5 100644 --- a/unit-test/ds_cmds_tests.c +++ b/unit-test/ds_cmds_tests.c @@ -90,8 +90,8 @@ void DS_ResetCountersCmd_Test_Nominal(void) UtAssert_ZERO(DS_AppData.FilterTblErrCounter); UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1); - UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, DS_RESET_CMD_EID); - UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventType, CFE_EVS_EventType_DEBUG); + UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, DS_RESET_INF_EID); + UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventType, CFE_EVS_EventType_INFORMATION); /* Verify command struct size minus header is at least explicitly padded to 32-bit boundaries */ UtAssert_True(CMD_STRUCT_DATA_IS_32_ALIGNED(DS_ResetCountersCmd_t), "DS_ResetCountersCmd_t is 32-bit aligned");