diff --git a/.github/workflows/snapshot-module.yml b/.github/workflows/snapshot-module.yml
new file mode 100644
index 0000000..64d56b8
--- /dev/null
+++ b/.github/workflows/snapshot-module.yml
@@ -0,0 +1,35 @@
+name: Snapshot CFS module
+
+on:
+ workflow_dispatch:
+ inputs:
+ base-branch:
+ description: 'The base branch to merge into'
+ type: string
+ required: false
+ default: 'main'
+ ic-branch:
+ description: 'The temporary integration branch to create (ic)'
+ type: string
+ required: false
+ default: 'ic-snapshot-dev'
+ dev-branch:
+ description: 'The branch to pull in'
+ type: string
+ required: false
+ default: 'dev'
+ pr-label:
+ description: 'The label(s) to apply to the generated PR'
+ type: string
+ required: false
+ default: ''
+
+jobs:
+ snapshot-module:
+ name: Snapshot module
+ uses: nasa/cFS/.github/workflows/snapshot-module-reusable.yml@dev
+ with:
+ base-branch: ${{ inputs.base-branch }}
+ ic-branch: ${{ inputs.ic-branch }}
+ dev-branch: ${{ inputs.dev-branch }}
+ pr-label: ${{ inputs.pr-label }}
diff --git a/config/default_hs_fcncode_values.h b/config/default_hs_fcncode_values.h
index a58523c..0875157 100644
--- a/config/default_hs_fcncode_values.h
+++ b/config/default_hs_fcncode_values.h
@@ -37,7 +37,7 @@
enum HS_FunctionCode_
{
HS_FunctionCode_NOOP = 0,
- HS_FunctionCode_RESET = 1,
+ HS_FunctionCode_RESET_COUNTERS = 1,
HS_FunctionCode_ENABLE_APP_MON = 2,
HS_FunctionCode_DISABLE_APP_MON = 3,
HS_FunctionCode_ENABLE_EVENT_MON = 4,
diff --git a/config/default_hs_msgdefs.h b/config/default_hs_msgdefs.h
index 68de57e..b501d7d 100644
--- a/config/default_hs_msgdefs.h
+++ b/config/default_hs_msgdefs.h
@@ -43,14 +43,14 @@ typedef struct
*/
typedef struct
{
- uint8 CmdCount; /**< \brief HS Application Command Counter */
- uint8 CmdErrCount; /**< \brief HS Application Command Error Counter */
+ uint8 CommandCounter; /**< \brief HS Application Command Counter */
+ uint8 CommandErrCounter; /**< \brief HS Application Command Error Counter */
uint8 CurrentAppMonState; /**< \brief Status of HS Application Monitor */
uint8 CurrentEventMonState; /**< \brief Status of HS Event Monitor */
uint8 CurrentAlivenessState; /**< \brief Status of HS Aliveness Indicator */
uint8 CurrentCPUHogState; /**< \brief Status of HS Hogging Indicator */
uint8 StatusFlags; /**< \brief Internal HS Error States */
- uint8 SpareBytes; /**< \brief Alignment Spares */
+ uint8 Padding; /**< \brief Alignment Spares */
uint16 ResetsPerformed; /**< \brief HS Performed Processor Reset Count */
uint16 MaxResets; /**< \brief HS Maximum Processor Reset Count */
uint32 EventsMonitoredCount; /**< \brief Total count of Event Messages Monitored */
diff --git a/config/default_hs_msgstruct.h b/config/default_hs_msgstruct.h
index 7292a77..c91a213 100644
--- a/config/default_hs_msgstruct.h
+++ b/config/default_hs_msgstruct.h
@@ -57,12 +57,12 @@ typedef struct
/**
* \brief No Arguments Command
*
- * For command details see #HS_RESET_CC
+ * For command details see #HS_RESET_COUNTERS_CC
*/
typedef struct
{
CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command header */
-} HS_ResetCmd_t;
+} HS_ResetCountersCmd_t;
/**
* \brief No Arguments Command
diff --git a/eds/HS.xml b/eds/HS.xml
index 5fc0848..7134d39 100644
--- a/eds/HS.xml
+++ b/eds/HS.xml
@@ -73,15 +73,15 @@
-
-
+
+
-
+
@@ -100,7 +100,7 @@
-
+
@@ -116,7 +116,7 @@
-
+
diff --git a/fsw/inc/hs_fcncodes.h b/fsw/inc/hs_fcncodes.h
index 8a22492..0a5164d 100644
--- a/fsw/inc/hs_fcncodes.h
+++ b/fsw/inc/hs_fcncodes.h
@@ -51,7 +51,7 @@
* \par Command Verification
* Successful execution of this command may be verified with
* the following telemetry:
- * - #HS_HkTlm_Payload_t.CmdCount will increment
+ * - #HS_HkTlm_Payload_t.CommandCounter will increment
* - The #HS_NOOP_INF_EID informational event message will be
* generated when the command is received
*
@@ -60,13 +60,13 @@
* - Command packet length not as expected
*
* \par Evidence of failure may be found in the following telemetry:
- * - #HS_HkTlm_Payload_t.CmdErrCount will increment
+ * - #HS_HkTlm_Payload_t.CommandErrCounter will increment
* - Error specific event message #HS_CMD_LEN_ERR_EID
*
* \par Criticality
* None
*
- * \sa #HS_RESET_CC
+ * \sa #HS_RESET_COUNTERS_CC
*/
#define HS_NOOP_CC HS_CCVAL(NOOP)
@@ -77,12 +77,12 @@
* Resets the HS housekeeping counters
*
* \par Command Structure
- * #HS_ResetCmd_t
+ * #HS_ResetCountersCmd_t
*
* \par Command Verification
* Successful execution of this command may be verified with
* the following telemetry:
- * - #HS_HkTlm_Payload_t.CmdCount will be cleared
+ * - #HS_HkTlm_Payload_t.CommandCounter will be cleared
* - The #HS_RESET_INF_EID informational event message will be
* generated when the command is executed
*
@@ -91,7 +91,7 @@
* - Command packet length not as expected
*
* \par Evidence of failure may be found in the following telemetry:
- * - #HS_HkTlm_Payload_t.CmdErrCount will increment
+ * - #HS_HkTlm_Payload_t.CommandErrCounter will increment
* - Error specific event message #HS_CMD_LEN_ERR_EID
*
* \par Criticality
@@ -99,7 +99,7 @@
*
* \sa #HS_NOOP_CC
*/
-#define HS_RESET_CC HS_CCVAL(RESET)
+#define HS_RESET_COUNTERS_CC HS_CCVAL(RESET_COUNTERS)
/**
* \brief Enable Applications Monitor
@@ -113,7 +113,7 @@
* \par Command Verification
* Successful execution of this command may be verified with
* the following telemetry:
- * - #HS_HkTlm_Payload_t.CmdCount will increment
+ * - #HS_HkTlm_Payload_t.CommandCounter will increment
* - #HS_HkTlm_Payload_t.CurrentAppMonState will be set to Enabled
* - The #HS_ENABLE_APPMON_INF_EID informational event message will be
* generated when the command is executed
@@ -123,7 +123,7 @@
* - Command packet length not as expected
*
* \par Evidence of failure may be found in the following telemetry:
- * - #HS_HkTlm_Payload_t.CmdErrCount will increment
+ * - #HS_HkTlm_Payload_t.CommandErrCounter will increment
* - Error specific event message #HS_CMD_LEN_ERR_EID
*
* \par Criticality
@@ -145,7 +145,7 @@
* \par Command Verification
* Successful execution of this command may be verified with
* the following telemetry:
- * - #HS_HkTlm_Payload_t.CmdCount will increment
+ * - #HS_HkTlm_Payload_t.CommandCounter will increment
* - #HS_HkTlm_Payload_t.CurrentAppMonState will be set to Disabled
* - The #HS_DISABLE_APPMON_INF_EID informational event message will be
* generated when the command is executed
@@ -155,7 +155,7 @@
* - Command packet length not as expected
*
* \par Evidence of failure may be found in the following telemetry:
- * - #HS_HkTlm_Payload_t.CmdErrCount will increment
+ * - #HS_HkTlm_Payload_t.CommandErrCounter will increment
* - Error specific event message #HS_CMD_LEN_ERR_EID
*
* \par Criticality
@@ -177,7 +177,7 @@
* \par Command Verification
* Successful execution of this command may be verified with
* the following telemetry:
- * - #HS_HkTlm_Payload_t.CmdCount will increment
+ * - #HS_HkTlm_Payload_t.CommandCounter will increment
* - #HS_HkTlm_Payload_t.CurrentEventMonState will be set to Enabled
* - The #HS_ENABLE_EVENTMON_INF_EID informational event message will be
* generated when the command is executed
@@ -187,7 +187,7 @@
* - Command packet length not as expected
*
* \par Evidence of failure may be found in the following telemetry:
- * - #HS_HkTlm_Payload_t.CmdErrCount will increment
+ * - #HS_HkTlm_Payload_t.CommandErrCounter will increment
* - Error specific event message #HS_CMD_LEN_ERR_EID
*
* \par Criticality
@@ -209,7 +209,7 @@
* \par Command Verification
* Successful execution of this command may be verified with
* the following telemetry:
- * - #HS_HkTlm_Payload_t.CmdCount will increment
+ * - #HS_HkTlm_Payload_t.CommandCounter will increment
* - #HS_HkTlm_Payload_t.CurrentEventMonState will be set to Disabled
* - The #HS_DISABLE_EVENTMON_INF_EID informational event message will be
* generated when the command is executed
@@ -219,7 +219,7 @@
* - Command packet length not as expected
*
* \par Evidence of failure may be found in the following telemetry:
- * - #HS_HkTlm_Payload_t.CmdErrCount will increment
+ * - #HS_HkTlm_Payload_t.CommandErrCounter will increment
* - Error specific event message #HS_CMD_LEN_ERR_EID
*
* \par Criticality
@@ -241,7 +241,7 @@
* \par Command Verification
* Successful execution of this command may be verified with
* the following telemetry:
- * - #HS_HkTlm_Payload_t.CmdCount will increment
+ * - #HS_HkTlm_Payload_t.CommandCounter will increment
* - #HS_HkTlm_Payload_t.CurrentAlivenessState will be set to Enabled
* - The #HS_ENABLE_ALIVENESS_INF_EID informational event message will be
* generated when the command is executed
@@ -251,7 +251,7 @@
* - Command packet length not as expected
*
* \par Evidence of failure may be found in the following telemetry:
- * - #HS_HkTlm_Payload_t.CmdErrCount will increment
+ * - #HS_HkTlm_Payload_t.CommandErrCounter will increment
* - Error specific event message #HS_CMD_LEN_ERR_EID
*
* \par Criticality
@@ -273,7 +273,7 @@
* \par Command Verification
* Successful execution of this command may be verified with
* the following telemetry:
- * - #HS_HkTlm_Payload_t.CmdCount will increment
+ * - #HS_HkTlm_Payload_t.CommandCounter will increment
* - #HS_HkTlm_Payload_t.CurrentAlivenessState will be set to Disabled
* - The #HS_DISABLE_ALIVENESS_INF_EID informational event message will be
* generated when the command is executed
@@ -283,7 +283,7 @@
* - Command packet length not as expected
*
* \par Evidence of failure may be found in the following telemetry:
- * - #HS_HkTlm_Payload_t.CmdErrCount will increment
+ * - #HS_HkTlm_Payload_t.CommandErrCounter will increment
* - Error specific event message #HS_CMD_LEN_ERR_EID
*
* \par Criticality
@@ -305,7 +305,7 @@
* \par Command Verification
* Successful execution of this command may be verified with
* the following telemetry:
- * - #HS_HkTlm_Payload_t.CmdCount will increment
+ * - #HS_HkTlm_Payload_t.CommandCounter will increment
* - #HS_HkTlm_Payload_t.ResetsPerformed will be set to 0
* - The #HS_RESET_RESETS_INF_EID informational event message will be
* generated when the command is executed
@@ -315,7 +315,7 @@
* - Command packet length not as expected
*
* \par Evidence of failure may be found in the following telemetry:
- * - #HS_HkTlm_Payload_t.CmdErrCount will increment
+ * - #HS_HkTlm_Payload_t.CommandErrCounter will increment
* - Error specific event message #HS_CMD_LEN_ERR_EID
*
* \par Criticality
@@ -337,7 +337,7 @@
* \par Command Verification
* Successful execution of this command may be verified with
* the following telemetry:
- * - #HS_HkTlm_Payload_t.CmdCount will increment
+ * - #HS_HkTlm_Payload_t.CommandCounter will increment
* - #HS_HkTlm_Payload_t.MaxResets will be set to the provided value
* - The #HS_SET_MAX_RESETS_INF_EID informational event message will be
* generated when the command is executed
@@ -347,7 +347,7 @@
* - Command packet length not as expected
*
* \par Evidence of failure may be found in the following telemetry:
- * - #HS_HkTlm_Payload_t.CmdErrCount will increment
+ * - #HS_HkTlm_Payload_t.CommandErrCounter will increment
* - Error specific event message #HS_CMD_LEN_ERR_EID
*
* \par Criticality
@@ -369,7 +369,7 @@
* \par Command Verification
* Successful execution of this command may be verified with
* the following telemetry:
- * - #HS_HkTlm_Payload_t.CmdCount will increment
+ * - #HS_HkTlm_Payload_t.CommandCounter will increment
* - #HS_HkTlm_Payload_t.CurrentCPUHogState will be set to Enabled
* - The #HS_ENABLE_CPUHOG_INF_EID informational event message will be
* generated when the command is executed
@@ -379,7 +379,7 @@
* - Command packet length not as expected
*
* \par Evidence of failure may be found in the following telemetry:
- * - #HS_HkTlm_Payload_t.CmdErrCount will increment
+ * - #HS_HkTlm_Payload_t.CommandErrCounter will increment
* - Error specific event message #HS_CMD_LEN_ERR_EID
*
* \par Criticality
@@ -401,7 +401,7 @@
* \par Command Verification
* Successful execution of this command may be verified with
* the following telemetry:
- * - #HS_HkTlm_Payload_t.CmdCount will increment
+ * - #HS_HkTlm_Payload_t.CommandCounter will increment
* - #HS_HkTlm_Payload_t.CurrentCPUHogState will be set to Disabled
* - The #HS_DISABLE_CPUHOG_INF_EID informational event message will be
* generated when the command is executed
@@ -411,7 +411,7 @@
* - Command packet length not as expected
*
* \par Evidence of failure may be found in the following telemetry:
- * - #HS_HkTlm_Payload_t.CmdErrCount will increment
+ * - #HS_HkTlm_Payload_t.CommandErrCounter will increment
* - Error specific event message #HS_CMD_LEN_ERR_EID
*
* \par Criticality
diff --git a/fsw/src/hs_app.c b/fsw/src/hs_app.c
index 8381a94..8349b71 100644
--- a/fsw/src/hs_app.c
+++ b/fsw/src/hs_app.c
@@ -294,8 +294,6 @@ CFE_Status_t HS_AppInit(void)
*/
HS_SetCDSData(0, HS_MAX_RESTART_ACTIONS);
}
-
- Status = CFE_SUCCESS;
}
else if (Status == CFE_SUCCESS)
{
@@ -451,7 +449,7 @@ CFE_Status_t HS_SbInit(void)
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
CFE_Status_t HS_TblInit(void)
{
- size_t TableSize = 0;
+ size_t TableSize;
CFE_Status_t Status;
/* Register The HS Applications Monitor Table */
@@ -592,7 +590,7 @@ CFE_Status_t HS_TblInit(void)
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
CFE_Status_t HS_ProcessMain(void)
{
- CFE_Status_t Status = CFE_SUCCESS;
+ CFE_Status_t Status;
const char *AliveString = HS_CPU_ALIVE_STRING;
/*
diff --git a/fsw/src/hs_app.h b/fsw/src/hs_app.h
index 4971472..455a52b 100644
--- a/fsw/src/hs_app.h
+++ b/fsw/src/hs_app.h
@@ -114,8 +114,8 @@ typedef struct
uint8 SpareBytes[3]; /**< \brief Spare bytes for 32 bit alignment padding */
- uint8 CmdCount; /**< \brief Number of valid commands received */
- uint8 CmdErrCount; /**< \brief Number of invalid commands received */
+ uint8 CommandCounter; /**< \brief Number of valid commands received */
+ uint8 CommandErrCounter; /**< \brief Number of invalid commands received */
uint32 EventsMonitoredCount; /**< \brief Total count of event messages monitored */
uint32 InactiveEventMonCount; /**< \brief Count of event monitors for which the target is not active */
diff --git a/fsw/src/hs_app_monitor.c b/fsw/src/hs_app_monitor.c
index 192a84a..cce299d 100644
--- a/fsw/src/hs_app_monitor.c
+++ b/fsw/src/hs_app_monitor.c
@@ -309,7 +309,7 @@ int32 HS_AppMon_ValidateTable(void *TableData)
HS_AMTEntry_t *TableArray = (HS_AMTEntry_t *)TableData;
int32 TableResult = CFE_SUCCESS;
- uint32 TableIndex = 0;
+ uint32 TableIndex;
int32 EntryResult;
uint16 ActionType;
diff --git a/fsw/src/hs_cmds.c b/fsw/src/hs_cmds.c
index 09dba1d..79229b8 100644
--- a/fsw/src/hs_cmds.c
+++ b/fsw/src/hs_cmds.c
@@ -66,8 +66,8 @@ CFE_Status_t HS_SendHkCmd(const HS_SendHkCmd_t *BufPtr)
/*
** Update HK variables
*/
- PayloadPtr->CmdCount = HS_AppData.CmdCount;
- PayloadPtr->CmdErrCount = HS_AppData.CmdErrCount;
+ PayloadPtr->CommandCounter = HS_AppData.CommandCounter;
+ PayloadPtr->CommandErrCounter = HS_AppData.CommandErrCounter;
PayloadPtr->CurrentAppMonState = HS_AppData.CurrentAppMonState;
PayloadPtr->CurrentEventMonState = HS_AppData.CurrentEventMonState;
PayloadPtr->CurrentAlivenessState = HS_AppData.CurrentAlivenessState;
@@ -112,7 +112,7 @@ CFE_Status_t HS_SendHkCmd(const HS_SendHkCmd_t *BufPtr)
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
CFE_Status_t HS_NoopCmd(const HS_NoopCmd_t *BufPtr)
{
- HS_AppData.CmdCount++;
+ HS_AppData.CommandCounter++;
CFE_EVS_SendEvent(HS_NOOP_INF_EID,
CFE_EVS_EventType_INFORMATION,
@@ -130,10 +130,10 @@ CFE_Status_t HS_NoopCmd(const HS_NoopCmd_t *BufPtr)
/* Reset counters command */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-CFE_Status_t HS_ResetCmd(const HS_ResetCmd_t *BufPtr)
+CFE_Status_t HS_ResetCountersCmd(const HS_ResetCountersCmd_t *BufPtr)
{
- HS_AppData.CmdCount = 0;
- HS_AppData.CmdErrCount = 0;
+ HS_AppData.CommandCounter = 0;
+ HS_AppData.CommandErrCounter = 0;
HS_AppData.EventsMonitoredCount = 0;
HS_AppData.MsgActExec = 0;
@@ -148,7 +148,7 @@ CFE_Status_t HS_ResetCmd(const HS_ResetCmd_t *BufPtr)
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
CFE_Status_t HS_EnableAppMonCmd(const HS_EnableAppMonCmd_t *BufPtr)
{
- HS_AppData.CmdCount++;
+ HS_AppData.CommandCounter++;
if (HS_AppData.CurrentAppMonState == HS_State_ENABLED)
{
@@ -173,7 +173,7 @@ CFE_Status_t HS_EnableAppMonCmd(const HS_EnableAppMonCmd_t *BufPtr)
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
CFE_Status_t HS_DisableAppMonCmd(const HS_DisableAppMonCmd_t *BufPtr)
{
- HS_AppData.CmdCount++;
+ HS_AppData.CommandCounter++;
if (HS_AppData.CurrentAppMonState == HS_State_DISABLED)
{
@@ -244,11 +244,11 @@ CFE_Status_t HS_EnableEventMonCmd(const HS_EnableEventMonCmd_t *BufPtr)
if (Status == CFE_SUCCESS)
{
- HS_AppData.CmdCount++;
+ HS_AppData.CommandCounter++;
}
else
{
- HS_AppData.CmdErrCount++;
+ HS_AppData.CommandErrCounter++;
}
return CFE_SUCCESS;
@@ -303,11 +303,11 @@ CFE_Status_t HS_DisableEventMonCmd(const HS_DisableEventMonCmd_t *BufPtr)
if (Status == CFE_SUCCESS)
{
- HS_AppData.CmdCount++;
+ HS_AppData.CommandCounter++;
}
else
{
- HS_AppData.CmdErrCount++;
+ HS_AppData.CommandErrCounter++;
}
return CFE_SUCCESS;
@@ -320,7 +320,7 @@ CFE_Status_t HS_DisableEventMonCmd(const HS_DisableEventMonCmd_t *BufPtr)
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
CFE_Status_t HS_EnableAlivenessCmd(const HS_EnableAlivenessCmd_t *BufPtr)
{
- HS_AppData.CmdCount++;
+ HS_AppData.CommandCounter++;
if (HS_AppData.CurrentAlivenessState == HS_State_ENABLED)
{
@@ -344,7 +344,7 @@ CFE_Status_t HS_EnableAlivenessCmd(const HS_EnableAlivenessCmd_t *BufPtr)
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
CFE_Status_t HS_DisableAlivenessCmd(const HS_DisableAlivenessCmd_t *BufPtr)
{
- HS_AppData.CmdCount++;
+ HS_AppData.CommandCounter++;
if (HS_AppData.CurrentAlivenessState == HS_State_DISABLED)
{
@@ -368,7 +368,7 @@ CFE_Status_t HS_DisableAlivenessCmd(const HS_DisableAlivenessCmd_t *BufPtr)
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
CFE_Status_t HS_EnableCpuHogCmd(const HS_EnableCpuHogCmd_t *BufPtr)
{
- HS_AppData.CmdCount++;
+ HS_AppData.CommandCounter++;
if (HS_AppData.CurrentCPUHogState == HS_State_ENABLED)
{
@@ -392,7 +392,7 @@ CFE_Status_t HS_EnableCpuHogCmd(const HS_EnableCpuHogCmd_t *BufPtr)
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
CFE_Status_t HS_DisableCpuHogCmd(const HS_DisableCpuHogCmd_t *BufPtr)
{
- HS_AppData.CmdCount++;
+ HS_AppData.CommandCounter++;
if (HS_AppData.CurrentCPUHogState == HS_State_DISABLED)
{
@@ -416,7 +416,7 @@ CFE_Status_t HS_DisableCpuHogCmd(const HS_DisableCpuHogCmd_t *BufPtr)
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
CFE_Status_t HS_ResetResetsPerformedCmd(const HS_ResetResetsPerformedCmd_t *BufPtr)
{
- HS_AppData.CmdCount++;
+ HS_AppData.CommandCounter++;
HS_SetCDSData(0, HS_AppData.CDSData.MaxResets);
CFE_EVS_SendEvent(HS_RESET_RESETS_INF_EID,
CFE_EVS_EventType_INFORMATION,
@@ -434,7 +434,7 @@ CFE_Status_t HS_SetMaxResetsCmd(const HS_SetMaxResetsCmd_t *BufPtr)
{
const HS_SetMaxResets_Payload_t *CmdPtr;
- HS_AppData.CmdCount++;
+ HS_AppData.CommandCounter++;
CmdPtr = HS_GET_PAYLOAD(BufPtr, const HS_SetMaxResetsCmd_t);
HS_SetCDSData(HS_AppData.CDSData.ResetsPerformed, CmdPtr->MaxResets);
diff --git a/fsw/src/hs_cmds.h b/fsw/src/hs_cmds.h
index d0b7ba0..b9377ef 100644
--- a/fsw/src/hs_cmds.h
+++ b/fsw/src/hs_cmds.h
@@ -76,9 +76,9 @@ CFE_Status_t HS_NoopCmd(const HS_NoopCmd_t *BufPtr);
*
* \param[in] BufPtr Pointer to Software Bus buffer
*
- * \sa #HS_RESET_CC
+ * \sa #HS_RESET_COUNTERS_CC
*/
-CFE_Status_t HS_ResetCmd(const HS_ResetCmd_t *BufPtr);
+CFE_Status_t HS_ResetCountersCmd(const HS_ResetCountersCmd_t *BufPtr);
/**
* \brief Process an enable critical applications monitor command
diff --git a/fsw/src/hs_dispatch.c b/fsw/src/hs_dispatch.c
index 741128b..6c525e4 100644
--- a/fsw/src/hs_dispatch.c
+++ b/fsw/src/hs_dispatch.c
@@ -80,7 +80,7 @@ bool HS_VerifyMsgLength(const CFE_MSG_Message_t *MsgPtr, size_t ExpectedLength)
(int)CommandCode,
(int)ActualLength,
(int)ExpectedLength);
- HS_AppData.CmdErrCount++;
+ HS_AppData.CommandErrCounter++;
}
result = false;
@@ -107,7 +107,7 @@ void HS_AppProcessGroundCmd(const CFE_SB_Buffer_t *BufPtr)
HS_NoopVerifyDispatch(BufPtr);
break;
- case HS_RESET_CC:
+ case HS_RESET_COUNTERS_CC:
HS_ResetVerifyDispatch(BufPtr);
break;
@@ -158,7 +158,7 @@ void HS_AppProcessGroundCmd(const CFE_SB_Buffer_t *BufPtr)
(unsigned long)CFE_SB_MsgIdToValue(MessageID),
CommandCode);
- HS_AppData.CmdErrCount++;
+ HS_AppData.CommandErrCounter++;
break;
} /* end CommandCode switch */
@@ -204,7 +204,7 @@ void HS_AppPipe(const CFE_SB_Buffer_t *BufPtr)
/*
** Unrecognized Message ID
*/
- HS_AppData.CmdErrCount++;
+ HS_AppData.CommandErrCounter++;
CFE_EVS_SendEvent(HS_MID_ERR_EID,
CFE_EVS_EventType_ERROR,
"Invalid command pipe message ID: 0x%08lX",
@@ -255,14 +255,14 @@ void HS_NoopVerifyDispatch(const CFE_SB_Buffer_t *BufPtr)
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void HS_ResetVerifyDispatch(const CFE_SB_Buffer_t *BufPtr)
{
- size_t ExpectedLength = sizeof(HS_ResetCmd_t);
+ size_t ExpectedLength = sizeof(HS_ResetCountersCmd_t);
/*
** Verify message packet length
*/
if (HS_VerifyMsgLength(&BufPtr->Msg, ExpectedLength))
{
- HS_ResetCmd((const HS_ResetCmd_t *)BufPtr);
+ HS_ResetCountersCmd((const HS_ResetCountersCmd_t *)BufPtr);
}
}
diff --git a/fsw/src/hs_dispatch.h b/fsw/src/hs_dispatch.h
index 4914436..ee853b1 100644
--- a/fsw/src/hs_dispatch.h
+++ b/fsw/src/hs_dispatch.h
@@ -91,7 +91,7 @@ void HS_NoopVerifyDispatch(const CFE_SB_Buffer_t *BufPtr);
*
* Verifies and processes the received command
*
- * \sa #HS_RESET_CC
+ * \sa #HS_RESET_COUNTERS_CC
*/
void HS_ResetVerifyDispatch(const CFE_SB_Buffer_t *BufPtr);
diff --git a/fsw/src/hs_eds_dispatch.c b/fsw/src/hs_eds_dispatch.c
index fd646f1..74d9cf9 100644
--- a/fsw/src/hs_eds_dispatch.c
+++ b/fsw/src/hs_eds_dispatch.c
@@ -52,7 +52,7 @@ static const EdsDispatchTable_EdsComponent_HS_Application_CFE_SB_Telecommand_t H
.EnableCpuHogCmd_indication = HS_EnableCpuHogCmd,
.EnableEventMonCmd_indication = HS_EnableEventMonCmd,
.NoopCmd_indication = HS_NoopCmd,
- .ResetCmd_indication = HS_ResetCmd,
+ .ResetCountersCmd_indication = HS_ResetCountersCmd,
.ResetResetsPerformedCmd_indication = HS_ResetResetsPerformedCmd,
.SetMaxResetsCmd_indication = HS_SetMaxResetsCmd,
},
@@ -91,7 +91,7 @@ void HS_AppPipe(const CFE_SB_Buffer_t *BufPtr)
CFE_EVS_EventType_ERROR,
"Invalid command pipe message ID: 0x%08lX",
(unsigned long)CFE_SB_MsgIdToValue(MsgId));
- HS_AppData.CmdErrCount++;
+ HS_AppData.CommandErrCounter++;
}
else if (Status == CFE_STATUS_WRONG_MSG_LENGTH)
{
@@ -119,7 +119,7 @@ void HS_AppPipe(const CFE_SB_Buffer_t *BufPtr)
(unsigned long)CFE_SB_MsgIdToValue(MsgId),
(int)MsgFc,
(int)MsgSize);
- HS_AppData.CmdErrCount++;
+ HS_AppData.CommandErrCounter++;
}
}
else
@@ -129,7 +129,7 @@ void HS_AppPipe(const CFE_SB_Buffer_t *BufPtr)
"Invalid command code: ID = 0x%08lX, CC = %d",
(unsigned long)CFE_SB_MsgIdToValue(MsgId),
(int)MsgFc);
- HS_AppData.CmdErrCount++;
+ HS_AppData.CommandErrCounter++;
}
}
}
diff --git a/fsw/src/hs_event_monitor.c b/fsw/src/hs_event_monitor.c
index d84cb06..a7d4903 100644
--- a/fsw/src/hs_event_monitor.c
+++ b/fsw/src/hs_event_monitor.c
@@ -82,8 +82,8 @@ static void HS_EventMon_FailCallback(uint32 MsgActsIndex, const void *Arg)
*-----------------------------------------------------------------*/
void HS_EventMon_TriggerAction(const HS_EMTEntry_t *EMEntryPtr)
{
- CFE_Status_t Status = CFE_SUCCESS;
- CFE_ES_AppId_t AppId = CFE_ES_APPID_UNDEFINED;
+ CFE_Status_t Status;
+ CFE_ES_AppId_t AppId = CFE_ES_APPID_UNDEFINED;
/*
** Perform the action if the strings also match
@@ -191,7 +191,7 @@ void HS_EventMon_TriggerAction(const HS_EMTEntry_t *EMEntryPtr)
*-----------------------------------------------------------------*/
void HS_EventMon_Check(const CFE_EVS_LongEventTlm_t *EventPtr)
{
- uint32 TableIndex = 0;
+ uint32 TableIndex;
HS_EMTEntry_t *EMEntryPtr;
for (TableIndex = 0;; ++TableIndex)
@@ -225,7 +225,7 @@ int32 HS_EventMon_ValidateTable(void *TableData)
HS_EMTEntry_t *TableArray = (HS_EMTEntry_t *)TableData;
int32 TableResult = CFE_SUCCESS;
- uint32 TableIndex = 0;
+ uint32 TableIndex;
int32 EntryResult;
uint16 ActionType;
diff --git a/fsw/src/hs_exec_monitor.c b/fsw/src/hs_exec_monitor.c
index 54f3ba8..b67e384 100644
--- a/fsw/src/hs_exec_monitor.c
+++ b/fsw/src/hs_exec_monitor.c
@@ -529,7 +529,6 @@ void HS_ExecMon_CheckEntries(void)
break;
}
- Status = CFE_STATUS_NOT_IMPLEMENTED; /* placeholder*/
XCStatePtr = HS_GetXCStateByIndex(TableIndex);
if (XCStatePtr->Enable)
{
diff --git a/fsw/src/hs_msg_action.c b/fsw/src/hs_msg_action.c
index 3fb6b9c..74dc589 100644
--- a/fsw/src/hs_msg_action.c
+++ b/fsw/src/hs_msg_action.c
@@ -87,13 +87,13 @@ int32 HS_MsgAct_ValidateTable(void *TableData)
HS_MATEntry_t *TableArray = (HS_MATEntry_t *)TableData;
int32 TableResult = CFE_SUCCESS;
- uint32 TableIndex = 0;
- size_t Length = 0;
+ uint32 TableIndex;
+ size_t Length = 0;
uint16 EnableState;
int32 EntryResult;
CFE_SB_MsgId_t MessageID = CFE_SB_INVALID_MSG_ID;
- const CFE_MSG_Message_t *MsgPtr = NULL;
+ const CFE_MSG_Message_t *MsgPtr;
uint32 GoodCount = 0;
uint32 BadCount = 0;
@@ -281,7 +281,7 @@ void HS_MsgAct_AcquirePointers(void)
*-----------------------------------------------------------------*/
void HS_MsgAct_Cooldown(void)
{
- uint32 i = 0;
+ uint32 i;
HS_MsgActState_t *MAStatePtr;
/*
diff --git a/unit-test/hs_app_tests.c b/unit-test/hs_app_tests.c
index 37d4a91..4982eee 100644
--- a/unit-test/hs_app_tests.c
+++ b/unit-test/hs_app_tests.c
@@ -540,8 +540,8 @@ void HS_AppInit_Test_Nominal(void)
HS_AppData.CurrentEventMonState = 99;
HS_AppData.CurrentAlivenessState = 99;
HS_AppData.CurrentCPUHogState = 99;
- HS_AppData.CmdCount = 99;
- HS_AppData.CmdErrCount = 99;
+ HS_AppData.CommandCounter = 99;
+ HS_AppData.CommandErrCounter = 99;
HS_AppData.UtilCpuPeak = 99;
HS_AppData.UtilCpuAvg = 99;
@@ -564,8 +564,8 @@ void HS_AppInit_Test_Nominal(void)
* subfunction that we don't care about here */
UtAssert_UINT32_EQ(HS_AppData.CurrentAlivenessState, HS_ALIVENESS_DEFAULT_STATE);
UtAssert_UINT32_EQ(HS_AppData.CurrentCPUHogState, HS_CPUHOG_DEFAULT_STATE);
- UtAssert_UINT8_EQ(HS_AppData.CmdCount, 0);
- UtAssert_UINT8_EQ(HS_AppData.CmdErrCount, 0);
+ UtAssert_UINT8_EQ(HS_AppData.CommandCounter, 0);
+ UtAssert_UINT8_EQ(HS_AppData.CommandErrCounter, 0);
UtAssert_UINT32_EQ(HS_AppData.UtilCpuPeak, 0);
UtAssert_UINT32_EQ(HS_AppData.UtilCpuAvg, 0);
@@ -1741,7 +1741,7 @@ void HS_ProcessCommands_Test(void)
UtAssert_STUB_COUNT(HS_AppPipe, 1);
UtAssert_STUB_COUNT(HS_EventMon_Check, 1);
- UtAssert_UINT32_EQ(HS_AppData.CmdErrCount, 0);
+ UtAssert_UINT32_EQ(HS_AppData.CommandErrCounter, 0);
}
void HS_ProcessCommands_Test_NullMsgPtr(void)
@@ -1777,7 +1777,7 @@ void HS_ProcessCommands_Test_NullMsgPtr(void)
UtAssert_STUB_COUNT(CFE_SB_ReceiveBuffer, 4);
UtAssert_STUB_COUNT(HS_AppPipe, 0);
- UtAssert_UINT32_EQ(HS_AppData.CmdErrCount, 0);
+ UtAssert_UINT32_EQ(HS_AppData.CommandErrCounter, 0);
}
void HS_ComputeStatusFlags_Test(void)
diff --git a/unit-test/hs_cmds_tests.c b/unit-test/hs_cmds_tests.c
index fe7b503..038a7f8 100644
--- a/unit-test/hs_cmds_tests.c
+++ b/unit-test/hs_cmds_tests.c
@@ -69,8 +69,8 @@ void HS_SendHkCmd_Test_InvalidEventMon(void)
/* Fail first, succeed on second */
UT_SetDeferredRetcode(UT_KEY(CFE_ES_GetAppIDByName), 1, -1);
- HS_AppData.CmdCount = 1;
- HS_AppData.CmdErrCount = 2;
+ HS_AppData.CommandCounter = 1;
+ HS_AppData.CommandErrCounter = 2;
HS_AppData.CurrentAppMonState = 3;
HS_AppData.CurrentEventMonState = 4;
HS_AppData.CurrentAlivenessState = 5;
@@ -93,8 +93,8 @@ void HS_SendHkCmd_Test_InvalidEventMon(void)
/* Verify results */
PayloadPtr = &HkPkt.Payload;
- UtAssert_UINT32_EQ(PayloadPtr->CmdCount, 1);
- UtAssert_UINT32_EQ(PayloadPtr->CmdErrCount, 2);
+ UtAssert_UINT32_EQ(PayloadPtr->CommandCounter, 1);
+ UtAssert_UINT32_EQ(PayloadPtr->CommandErrCounter, 2);
UtAssert_UINT32_EQ(PayloadPtr->CurrentAppMonState, 3);
UtAssert_UINT32_EQ(PayloadPtr->CurrentEventMonState, 4);
UtAssert_UINT32_EQ(PayloadPtr->CurrentAlivenessState, 5);
@@ -145,8 +145,8 @@ void HS_SendHkCmd_Test_NullEventMonTable(void)
UT_SetDeferredRetcode(UT_KEY(CFE_ES_GetAppIDByName), 1, -1);
/* initialize hk counters */
- HS_AppData.CmdCount = 1;
- HS_AppData.CmdErrCount = 2;
+ HS_AppData.CommandCounter = 1;
+ HS_AppData.CommandErrCounter = 2;
HS_AppData.CurrentAppMonState = 3;
HS_AppData.CurrentEventMonState = 4;
HS_AppData.CurrentAlivenessState = 5;
@@ -168,8 +168,8 @@ void HS_SendHkCmd_Test_NullEventMonTable(void)
/* Verify general housekeeping fields weren't affected */
PayloadPtr = &HkPkt.Payload;
- UtAssert_UINT8_EQ(PayloadPtr->CmdCount, 1);
- UtAssert_UINT8_EQ(PayloadPtr->CmdErrCount, 2);
+ UtAssert_UINT8_EQ(PayloadPtr->CommandCounter, 1);
+ UtAssert_UINT8_EQ(PayloadPtr->CommandErrCounter, 2);
UtAssert_UINT8_EQ(PayloadPtr->CurrentAppMonState, 3);
UtAssert_UINT8_EQ(PayloadPtr->CurrentEventMonState, 4);
UtAssert_UINT8_EQ(PayloadPtr->CurrentAlivenessState, 5);
@@ -233,8 +233,8 @@ void HS_SendHkCmd_Test_AllFlagsEnabled(void)
HS_AppData.EMTablePtr[0].ActionType = HS_EMTActType_NOACT;
- HS_AppData.CmdCount = 1;
- HS_AppData.CmdErrCount = 2;
+ HS_AppData.CommandCounter = 1;
+ HS_AppData.CommandErrCounter = 2;
HS_AppData.CurrentAppMonState = 3;
HS_AppData.CurrentEventMonState = 4;
HS_AppData.CurrentAlivenessState = 5;
@@ -261,8 +261,8 @@ void HS_SendHkCmd_Test_AllFlagsEnabled(void)
/* Verify results */
PayloadPtr = &HkPkt.Payload;
- UtAssert_UINT32_EQ(PayloadPtr->CmdCount, 1);
- UtAssert_UINT32_EQ(PayloadPtr->CmdErrCount, 2);
+ UtAssert_UINT32_EQ(PayloadPtr->CommandCounter, 1);
+ UtAssert_UINT32_EQ(PayloadPtr->CommandErrCounter, 2);
UtAssert_UINT32_EQ(PayloadPtr->CurrentAppMonState, 3);
UtAssert_UINT32_EQ(PayloadPtr->CurrentEventMonState, 4);
UtAssert_UINT32_EQ(PayloadPtr->CurrentAlivenessState, 5);
@@ -314,7 +314,7 @@ void HS_Noop_Test(void)
HS_NoopCmd(&UT_CmdBuf.NoopCmd);
/* Verify results */
- UtAssert_UINT32_EQ(HS_AppData.CmdCount, 1);
+ UtAssert_UINT32_EQ(HS_AppData.CommandCounter, 1);
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, HS_NOOP_INF_EID);
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventType, CFE_EVS_EventType_INFORMATION);
@@ -337,18 +337,18 @@ void HS_ResetCmd_Test(void)
snprintf(ExpectedEventString[0], CFE_MISSION_EVS_MAX_MESSAGE_LENGTH, "Reset counters command");
TestMsgId = CFE_SB_ValueToMsgId(HS_CMD_MID);
- FcnCode = HS_RESET_CC;
+ FcnCode = HS_RESET_COUNTERS_CC;
MsgSize = sizeof(UT_CmdBuf.ResetCmd);
UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &TestMsgId, sizeof(TestMsgId), false);
UT_SetDataBuffer(UT_KEY(CFE_MSG_GetFcnCode), &FcnCode, sizeof(FcnCode), false);
UT_SetDataBuffer(UT_KEY(CFE_MSG_GetSize), &MsgSize, sizeof(MsgSize), false);
/* Execute the function being tested */
- HS_ResetCmd(&UT_CmdBuf.ResetCmd);
+ HS_ResetCountersCmd(&UT_CmdBuf.ResetCmd);
/* Verify results */
- UtAssert_UINT32_EQ(HS_AppData.CmdCount, 0);
- UtAssert_UINT32_EQ(HS_AppData.CmdErrCount, 0);
+ UtAssert_UINT32_EQ(HS_AppData.CommandCounter, 0);
+ UtAssert_UINT32_EQ(HS_AppData.CommandErrCounter, 0);
UtAssert_UINT32_EQ(HS_AppData.EventsMonitoredCount, 0);
UtAssert_UINT32_EQ(HS_AppData.MsgActExec, 0);
@@ -391,7 +391,7 @@ void HS_EnableAppMonCmd_Test(void)
HS_EnableAppMonCmd(&UT_CmdBuf.EnableAppMonCmd);
/* Verify results */
- UtAssert_UINT32_EQ(HS_AppData.CmdCount, 1);
+ UtAssert_UINT32_EQ(HS_AppData.CommandCounter, 1);
UtAssert_UINT32_EQ(HS_AppData.CurrentAppMonState, HS_State_ENABLED);
@@ -428,7 +428,7 @@ void HS_EnableAppMonCmd_Test_NotLoaded(void)
HS_EnableAppMonCmd(&UT_CmdBuf.EnableAppMonCmd);
/* Verify results */
- UtAssert_UINT32_EQ(HS_AppData.CmdCount, 1);
+ UtAssert_UINT32_EQ(HS_AppData.CommandCounter, 1);
UtAssert_UINT32_EQ(HS_AppData.CurrentAppMonState, HS_State_ENABLED);
@@ -466,7 +466,7 @@ void HS_EnableAppMonCmd_Test_AlreadyEnabled(void)
HS_EnableAppMonCmd(&UT_CmdBuf.EnableAppMonCmd);
/* Verify results */
- UtAssert_UINT32_EQ(HS_AppData.CmdCount, 1);
+ UtAssert_UINT32_EQ(HS_AppData.CommandCounter, 1);
UtAssert_UINT32_EQ(HS_AppData.CurrentAppMonState, HS_State_ENABLED);
@@ -504,7 +504,7 @@ void HS_DisableAppMonCmd_Test(void)
HS_DisableAppMonCmd(&UT_CmdBuf.DisableAppMonCmd);
/* Verify results */
- UtAssert_UINT32_EQ(HS_AppData.CmdCount, 1);
+ UtAssert_UINT32_EQ(HS_AppData.CommandCounter, 1);
UtAssert_UINT32_EQ(HS_AppData.CurrentAppMonState, HS_State_DISABLED);
@@ -544,7 +544,7 @@ void HS_DisableAppMonCmd_Test_AlreadyDisabled(void)
HS_DisableAppMonCmd(&UT_CmdBuf.DisableAppMonCmd);
/* Verify results */
- UtAssert_UINT32_EQ(HS_AppData.CmdCount, 1);
+ UtAssert_UINT32_EQ(HS_AppData.CommandCounter, 1);
UtAssert_UINT32_EQ(HS_AppData.CurrentAppMonState, HS_State_DISABLED);
@@ -581,7 +581,7 @@ void HS_EnableEventMonCmd_Test_Disabled(void)
HS_EnableEventMonCmd(&UT_CmdBuf.EnableEventMonCmd);
/* Verify results */
- UtAssert_UINT32_EQ(HS_AppData.CmdCount, 1);
+ UtAssert_UINT32_EQ(HS_AppData.CommandCounter, 1);
UtAssert_UINT32_EQ(HS_AppData.CurrentEventMonState, HS_State_ENABLED);
@@ -618,7 +618,7 @@ void HS_EnableEventMonCmd_Test_AlreadyEnabled(void)
HS_EnableEventMonCmd(&UT_CmdBuf.EnableEventMonCmd);
/* Verify results */
- UtAssert_UINT32_EQ(HS_AppData.CmdCount, 1);
+ UtAssert_UINT32_EQ(HS_AppData.CommandCounter, 1);
UtAssert_UINT32_EQ(HS_AppData.CurrentEventMonState, HS_State_ENABLED);
@@ -659,7 +659,7 @@ void HS_EnableEventMonCmd_Test_SubscribeLongError(void)
HS_EnableEventMonCmd(&UT_CmdBuf.EnableEventMonCmd);
/* Verify results */
- UtAssert_UINT32_EQ(HS_AppData.CmdErrCount, 1);
+ UtAssert_UINT32_EQ(HS_AppData.CommandErrCounter, 1);
UtAssert_UINT32_EQ(HS_AppData.CurrentEventMonState, HS_State_DISABLED);
@@ -700,7 +700,7 @@ void HS_EnableEventMonCmd_Test_SubscribeShortError(void)
HS_EnableEventMonCmd(&UT_CmdBuf.EnableEventMonCmd);
/* Verify results */
- UtAssert_UINT32_EQ(HS_AppData.CmdErrCount, 1);
+ UtAssert_UINT32_EQ(HS_AppData.CommandErrCounter, 1);
UtAssert_UINT32_EQ(HS_AppData.CurrentEventMonState, HS_State_DISABLED);
@@ -737,7 +737,7 @@ void HS_DisableEventMonCmd_Test_Enabled(void)
HS_DisableEventMonCmd(&UT_CmdBuf.DisableEventMonCmd);
/* Verify results */
- UtAssert_UINT32_EQ(HS_AppData.CmdCount, 1);
+ UtAssert_UINT32_EQ(HS_AppData.CommandCounter, 1);
UtAssert_UINT32_EQ(HS_AppData.CurrentEventMonState, HS_State_DISABLED);
@@ -774,7 +774,7 @@ void HS_DisableEventMonCmd_Test_AlreadyDisabled(void)
HS_DisableEventMonCmd(&UT_CmdBuf.DisableEventMonCmd);
/* Verify results */
- UtAssert_UINT32_EQ(HS_AppData.CmdCount, 1);
+ UtAssert_UINT32_EQ(HS_AppData.CommandCounter, 1);
UtAssert_UINT32_EQ(HS_AppData.CurrentEventMonState, HS_State_DISABLED);
@@ -815,7 +815,7 @@ void HS_DisableEventMonCmd_Test_UnsubscribeLongError(void)
HS_DisableEventMonCmd(&UT_CmdBuf.DisableEventMonCmd);
/* Verify results */
- UtAssert_UINT32_EQ(HS_AppData.CmdErrCount, 1);
+ UtAssert_UINT32_EQ(HS_AppData.CommandErrCounter, 1);
UtAssert_UINT32_EQ(HS_AppData.CurrentEventMonState, HS_State_ENABLED);
@@ -856,7 +856,7 @@ void HS_DisableEventMonCmd_Test_UnsubscribeShortError(void)
HS_DisableEventMonCmd(&UT_CmdBuf.DisableEventMonCmd);
/* Verify results */
- UtAssert_UINT32_EQ(HS_AppData.CmdErrCount, 1);
+ UtAssert_UINT32_EQ(HS_AppData.CommandErrCounter, 1);
UtAssert_UINT32_EQ(HS_AppData.CurrentEventMonState, HS_State_ENABLED);
@@ -893,7 +893,7 @@ void HS_EnableAlivenessCmd_Test(void)
HS_EnableAlivenessCmd(&UT_CmdBuf.EnableAlivenessCmd);
/* Verify results */
- UtAssert_UINT32_EQ(HS_AppData.CmdCount, 1);
+ UtAssert_UINT32_EQ(HS_AppData.CommandCounter, 1);
UtAssert_UINT32_EQ(HS_AppData.CurrentAlivenessState, HS_State_ENABLED);
@@ -930,7 +930,7 @@ void HS_EnableAlivenessCmd_Test_AlreadyEnabled(void)
HS_EnableAlivenessCmd(&UT_CmdBuf.EnableAlivenessCmd);
/* Verify results */
- UtAssert_UINT32_EQ(HS_AppData.CmdCount, 1);
+ UtAssert_UINT32_EQ(HS_AppData.CommandCounter, 1);
UtAssert_UINT32_EQ(HS_AppData.CurrentAlivenessState, HS_State_ENABLED);
@@ -967,7 +967,7 @@ void HS_DisableAlivenessCmd_Test(void)
HS_DisableAlivenessCmd(&UT_CmdBuf.DisableAlivenessCmd);
/* Verify results */
- UtAssert_UINT32_EQ(HS_AppData.CmdCount, 1);
+ UtAssert_UINT32_EQ(HS_AppData.CommandCounter, 1);
UtAssert_UINT32_EQ(HS_AppData.CurrentAlivenessState, HS_State_DISABLED);
@@ -1004,7 +1004,7 @@ void HS_DisableAlivenessCmd_Test_AlreadyDisabled(void)
HS_DisableAlivenessCmd(&UT_CmdBuf.DisableAlivenessCmd);
/* Verify results */
- UtAssert_UINT32_EQ(HS_AppData.CmdCount, 1);
+ UtAssert_UINT32_EQ(HS_AppData.CommandCounter, 1);
UtAssert_UINT32_EQ(HS_AppData.CurrentAlivenessState, HS_State_DISABLED);
@@ -1041,7 +1041,7 @@ void HS_EnableCpuHogCmd_Test(void)
HS_EnableCpuHogCmd(&UT_CmdBuf.EnableCpuHogCmd);
/* Verify results */
- UtAssert_UINT32_EQ(HS_AppData.CmdCount, 1);
+ UtAssert_UINT32_EQ(HS_AppData.CommandCounter, 1);
UtAssert_UINT32_EQ(HS_AppData.CurrentCPUHogState, HS_State_ENABLED);
@@ -1078,7 +1078,7 @@ void HS_EnableCpuHogCmd_Test_AlreadyEnabled(void)
HS_EnableCpuHogCmd(&UT_CmdBuf.EnableCpuHogCmd);
/* Verify results */
- UtAssert_UINT32_EQ(HS_AppData.CmdCount, 1);
+ UtAssert_UINT32_EQ(HS_AppData.CommandCounter, 1);
UtAssert_UINT32_EQ(HS_AppData.CurrentCPUHogState, HS_State_ENABLED);
@@ -1115,7 +1115,7 @@ void HS_DisableCpuHogCmd_Test(void)
HS_DisableCpuHogCmd(&UT_CmdBuf.DisableCpuHogCmd);
/* Verify results */
- UtAssert_UINT32_EQ(HS_AppData.CmdCount, 1);
+ UtAssert_UINT32_EQ(HS_AppData.CommandCounter, 1);
UtAssert_UINT32_EQ(HS_AppData.CurrentCPUHogState, HS_State_DISABLED);
@@ -1152,7 +1152,7 @@ void HS_DisableCpuHogCmd_Test_AlreadyDisabled(void)
HS_DisableCpuHogCmd(&UT_CmdBuf.DisableCpuHogCmd);
/* Verify results */
- UtAssert_UINT32_EQ(HS_AppData.CmdCount, 1);
+ UtAssert_UINT32_EQ(HS_AppData.CommandCounter, 1);
UtAssert_UINT32_EQ(HS_AppData.CurrentCPUHogState, HS_State_DISABLED);
@@ -1189,7 +1189,7 @@ void HS_ResetResetsPerformedCmd_Test(void)
HS_ResetResetsPerformedCmd(&UT_CmdBuf.ResetResetsPerformedCmd);
/* Verify results */
- UtAssert_UINT32_EQ(HS_AppData.CmdCount, 1);
+ UtAssert_UINT32_EQ(HS_AppData.CommandCounter, 1);
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, HS_RESET_RESETS_INF_EID);
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventType, CFE_EVS_EventType_INFORMATION);
@@ -1231,7 +1231,7 @@ void HS_SetMaxResetsCmd_Test(void)
HS_SetMaxResetsCmd(&UT_CmdBuf.SetMaxResetsCmd);
/* Verify results */
- UtAssert_UINT32_EQ(HS_AppData.CmdCount, 1);
+ UtAssert_UINT32_EQ(HS_AppData.CommandCounter, 1);
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, HS_SET_MAX_RESETS_INF_EID);
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventType, CFE_EVS_EventType_INFORMATION);
diff --git a/unit-test/hs_dispatch_tests.c b/unit-test/hs_dispatch_tests.c
index 3d2e932..4f43ddf 100644
--- a/unit-test/hs_dispatch_tests.c
+++ b/unit-test/hs_dispatch_tests.c
@@ -77,7 +77,7 @@ void HS_VerifyMsgLength_Test(void)
UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1);
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, HS_HKREQ_LEN_ERR_EID);
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventType, CFE_EVS_EventType_ERROR);
- UtAssert_UINT8_EQ(HS_AppData.CmdErrCount, 0);
+ UtAssert_UINT8_EQ(HS_AppData.CommandErrCounter, 0);
HS_Dispatch_Test_SetupMsg(CFE_SB_ValueToMsgId(HS_CMD_MID), 0, 1);
@@ -87,7 +87,7 @@ void HS_VerifyMsgLength_Test(void)
UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 2);
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[1].EventID, HS_CMD_LEN_ERR_EID);
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[1].EventType, CFE_EVS_EventType_ERROR);
- UtAssert_UINT8_EQ(HS_AppData.CmdErrCount, 1);
+ UtAssert_UINT8_EQ(HS_AppData.CommandErrCounter, 1);
}
void HS_AppPipe_Test_SendHK(void)
@@ -132,20 +132,20 @@ void HS_AppPipe_Test_Noop(void)
void HS_AppPipe_Test_Reset(void)
{
- HS_Dispatch_Test_SetupMsg(CFE_SB_ValueToMsgId(HS_CMD_MID), HS_RESET_CC, sizeof(UT_CmdBuf.ResetCmd));
+ HS_Dispatch_Test_SetupMsg(CFE_SB_ValueToMsgId(HS_CMD_MID), HS_RESET_COUNTERS_CC, sizeof(UT_CmdBuf.ResetCmd));
/* Execute the function being tested */
HS_AppPipe(&UT_CmdBuf.Buf);
- UtAssert_STUB_COUNT(HS_ResetCmd, 1);
+ UtAssert_STUB_COUNT(HS_ResetCountersCmd, 1);
/* Now with an invalid size */
- HS_Dispatch_Test_SetupMsg(CFE_SB_ValueToMsgId(HS_CMD_MID), HS_RESET_CC, 1);
+ HS_Dispatch_Test_SetupMsg(CFE_SB_ValueToMsgId(HS_CMD_MID), HS_RESET_COUNTERS_CC, 1);
/* Execute the function being tested */
HS_AppPipe(&UT_CmdBuf.Buf);
/* Should NOT have invoked the handler */
- UtAssert_STUB_COUNT(HS_ResetCmd, 1);
+ UtAssert_STUB_COUNT(HS_ResetCountersCmd, 1);
}
void HS_AppPipe_Test_EnableAppMon(void)
@@ -350,7 +350,7 @@ void HS_AppPipe_Test_InvalidCC(void)
HS_AppPipe(&UT_CmdBuf.Buf);
/* Verify results */
- UtAssert_UINT8_EQ(HS_AppData.CmdErrCount, 1);
+ UtAssert_UINT8_EQ(HS_AppData.CommandErrCounter, 1);
UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1);
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, HS_CC_ERR_EID);
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventType, CFE_EVS_EventType_ERROR);
@@ -364,7 +364,7 @@ void HS_AppPipe_Test_InvalidMID(void)
HS_AppPipe(&UT_CmdBuf.Buf);
/* Verify results */
- UtAssert_UINT8_EQ(HS_AppData.CmdErrCount, 1);
+ UtAssert_UINT8_EQ(HS_AppData.CommandErrCounter, 1);
UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1);
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, HS_MID_ERR_EID);
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventType, CFE_EVS_EventType_ERROR);
diff --git a/unit-test/stubs/hs_cmds_stubs.c b/unit-test/stubs/hs_cmds_stubs.c
index 077291c..28df5ad 100644
--- a/unit-test/stubs/hs_cmds_stubs.c
+++ b/unit-test/stubs/hs_cmds_stubs.c
@@ -174,15 +174,15 @@ CFE_Status_t HS_NoopCmd(const HS_NoopCmd_t *BufPtr)
* Generated stub function for HS_ResetCmd()
* ----------------------------------------------------
*/
-CFE_Status_t HS_ResetCmd(const HS_ResetCmd_t *BufPtr)
+CFE_Status_t HS_ResetCountersCmd(const HS_ResetCountersCmd_t *BufPtr)
{
- UT_GenStub_SetupReturnBuffer(HS_ResetCmd, CFE_Status_t);
+ UT_GenStub_SetupReturnBuffer(HS_ResetCountersCmd, CFE_Status_t);
- UT_GenStub_AddParam(HS_ResetCmd, const HS_ResetCmd_t *, BufPtr);
+ UT_GenStub_AddParam(HS_ResetCountersCmd, const HS_ResetCountersCmd_t *, BufPtr);
- UT_GenStub_Execute(HS_ResetCmd, Basic, NULL);
+ UT_GenStub_Execute(HS_ResetCountersCmd, Basic, NULL);
- return UT_GenStub_GetReturnValue(HS_ResetCmd, CFE_Status_t);
+ return UT_GenStub_GetReturnValue(HS_ResetCountersCmd, CFE_Status_t);
}
/*
diff --git a/unit-test/utilities/hs_test_utils.h b/unit-test/utilities/hs_test_utils.h
index 1b661a2..61ca3a5 100644
--- a/unit-test/utilities/hs_test_utils.h
+++ b/unit-test/utilities/hs_test_utils.h
@@ -67,7 +67,7 @@ typedef union
CFE_MSG_Message_t Msg;
HS_NoopCmd_t NoopCmd;
- HS_ResetCmd_t ResetCmd;
+ HS_ResetCountersCmd_t ResetCmd;
HS_EnableAppMonCmd_t EnableAppMonCmd;
HS_DisableAppMonCmd_t DisableAppMonCmd;
HS_EnableEventMonCmd_t EnableEventMonCmd;