From 215b887bf284967d1ffa7366de8b4f4052dbc661 Mon Sep 17 00:00:00 2001 From: Avi Weiss Date: Wed, 17 Jan 2024 16:28:29 +1000 Subject: [PATCH] Fix #10, Rename `MM_ResetHk` to `MM_ResetHkData` to improve clarity --- fsw/src/mm_app.c | 4 ++-- fsw/src/mm_utils.c | 2 +- fsw/src/mm_utils.h | 2 +- unit-test/mm_utils_tests.c | 6 +++--- unit-test/stubs/mm_utils_stubs.c | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/fsw/src/mm_app.c b/fsw/src/mm_app.c index c4267de..21c9cf1 100644 --- a/fsw/src/mm_app.c +++ b/fsw/src/mm_app.c @@ -210,7 +210,7 @@ CFE_Status_t MM_AppInit(void) /* ** Initialize MM housekeeping information */ - MM_ResetHk(); + MM_ResetHkData(); /* ** Application startup event message @@ -251,7 +251,7 @@ void MM_AppPipe(const CFE_SB_Buffer_t *BufPtr) ** MM ground commands */ case MM_CMD_MID: - MM_ResetHk(); /* Clear all "Last Action" data */ + MM_ResetHkData(); /* Clear all "Last Action" data */ CFE_MSG_GetFcnCode(&BufPtr->Msg, &CommandCode); switch (CommandCode) diff --git a/fsw/src/mm_utils.c b/fsw/src/mm_utils.c index 3bc16bf..3f727b6 100644 --- a/fsw/src/mm_utils.c +++ b/fsw/src/mm_utils.c @@ -49,7 +49,7 @@ extern MM_AppData_t MM_AppData; /* Reset the local housekeeping variables to default parameters */ /* */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -void MM_ResetHk(void) +void MM_ResetHkData(void) { MM_AppData.HkPacket.Payload.LastAction = MM_NOACTION; MM_AppData.HkPacket.Payload.MemType = MM_NOMEMTYPE; diff --git a/fsw/src/mm_utils.h b/fsw/src/mm_utils.h index 30a3b50..f65d41c 100644 --- a/fsw/src/mm_utils.h +++ b/fsw/src/mm_utils.h @@ -45,7 +45,7 @@ * This function does not zero the command execution counter * or the command error counter */ -void MM_ResetHk(void); +void MM_ResetHkData(void); /** * \brief Segment break diff --git a/unit-test/mm_utils_tests.c b/unit-test/mm_utils_tests.c index 27e5740..3de1a83 100644 --- a/unit-test/mm_utils_tests.c +++ b/unit-test/mm_utils_tests.c @@ -54,7 +54,7 @@ uint8 call_count_CFE_EVS_SendEvent; * Function Definitions */ -void MM_ResetHk_Test(void) +void MM_ResetHkData_Test(void) { MM_AppData.HkPacket.Payload.LastAction = 1; MM_AppData.HkPacket.Payload.MemType = 2; @@ -64,7 +64,7 @@ void MM_ResetHk_Test(void) MM_AppData.HkPacket.Payload.FileName[0] = 6; /* Execute the function being tested */ - MM_ResetHk(); + MM_ResetHkData(); /* Verify results */ UtAssert_True(MM_AppData.HkPacket.Payload.LastAction == MM_NOACTION, "MM_AppData.HkPacket.Payload.LastAction == MM_NOACTION"); @@ -3571,7 +3571,7 @@ void MM_ComputeCRCFromFile_Test(void) */ void UtTest_Setup(void) { - UtTest_Add(MM_ResetHk_Test, MM_Test_Setup, MM_Test_TearDown, "MM_ResetHk_Test"); + UtTest_Add(MM_ResetHkData_Test, MM_Test_Setup, MM_Test_TearDown, "MM_ResetHkData_Test"); UtTest_Add(MM_VerifyCmdLength_Test_Nominal, MM_Test_Setup, MM_Test_TearDown, "MM_VerifyCmdLength_Test_Nominal"); UtTest_Add(MM_VerifyCmdLength_Test_HKRequestLengthError, MM_Test_Setup, MM_Test_TearDown, "MM_VerifyCmdLength_Test_HKRequestLengthError"); diff --git a/unit-test/stubs/mm_utils_stubs.c b/unit-test/stubs/mm_utils_stubs.c index 2ecdebe..9bba7a1 100644 --- a/unit-test/stubs/mm_utils_stubs.c +++ b/unit-test/stubs/mm_utils_stubs.c @@ -38,9 +38,9 @@ #include "utassert.h" #include "utstubs.h" -void MM_ResetHk(void) +void MM_ResetHkData(void) { - UT_DEFAULT_IMPL(MM_ResetHk); + UT_DEFAULT_IMPL(MM_ResetHkData); } void MM_SegmentBreak(void)