diff --git a/config/default_lc_msgdefs.h b/config/default_lc_msgdefs.h
index 085516a..f65e65b 100644
--- a/config/default_lc_msgdefs.h
+++ b/config/default_lc_msgdefs.h
@@ -35,6 +35,8 @@
/************************************************************************
* Includes
************************************************************************/
+#include "common_types.h"
+
#include "lc_interface_cfg.h"
#include "lc_fcncodes.h"
@@ -120,4 +122,108 @@
#define LC_ACTION_NOT_USED LC_APSTATE_NOT_USED
#endif
+/**
+ * \brief Reset AP (Actionpoint) Statistics Payload
+ *
+ * For command details see #LC_RESET_AP_STATS_CC,
+ * #LC_SET_AP_PERM_OFF_CC
+ */
+typedef struct
+{
+ uint16 APNumber; /**< \brief Which actionpoint(s) to change */
+ uint8 Padding[2]; /**< \brief Structure padding */
+} LC_APNumber_Payload_t;
+
+/**
+ * \brief Set AP (Actionpoint) State Payload
+ *
+ * For command details see #LC_SET_AP_STATE_CC
+ */
+typedef struct
+{
+ uint16 APNumber; /**< \brief Which actionpoint(s) to change */
+ uint16 NewAPState; /**< \brief New actionpoint state */
+} LC_SetAPState_Payload_t;
+
+/**
+ * \brief Set LC Application State Payload
+ *
+ * For command details see #LC_SET_LC_STATE_CC
+ */
+typedef struct
+{
+ uint16 NewLCState; /**< \brief New LC application state */
+ uint8 Padding[2]; /**< \brief Structure padding */
+} LC_SetLCState_Payload_t;
+
+/**
+ * \brief Sample AP (Actionpoint) Payload
+ *
+ * See #LC_SAMPLE_AP_MID
+ */
+typedef struct
+{
+ uint16 StartIndex; /**< \brief Start actionpoint to sample */
+ uint16 EndIndex; /**< \brief End actionpoint to sample */
+
+ uint16 UpdateAge; /**< \brief Update WP results age (T or F) */
+ uint8 Padding[2]; /**< \brief Structure padding */
+} LC_SampleAP_Payload_t;
+
+/**
+ * \brief Reset WP (Watchpoint) Statistics Payload
+ *
+ * For command details see #LC_RESET_WP_STATS_CC
+ */
+typedef struct
+{
+ uint16 WPNumber; /**< \brief Which watchpoint(s) to change */
+ uint8 Padding[2]; /**< \brief Structure padding */
+} LC_ResetWPStats_Payload_t;
+
+/**
+ * \brief Payload to Start a Stored Command RTS
+ */
+typedef struct
+{
+ uint16 RTSId; /**< \brief RTS Id to start */
+ uint8 Padding[2]; /**< \brief Padding */
+} LC_RTSRequest_Payload_t;
+
+/**
+ * \defgroup cfslctlm CFS Limit Checker Telemetry
+ * \{
+ */
+
+/**
+ * \brief Housekeeping Payload Structure
+ */
+typedef struct
+{
+ uint8 CommandCounter; /**< \brief LC Application Command Counter */
+ uint8 CommandErrCounter; /**< \brief LC Application Command Error Counter */
+ uint8 CurrentLCState; /**< \brief Current LC application operating state */
+
+ uint8 Padding1; /**< \brief Structure padding */
+
+ uint8 WPResults[LC_HKWR_NUM_BYTES]; /**< \brief Packed watchpoint results data, 2 bits per watchpoint */
+ uint8 APResults[LC_HKAR_NUM_BYTES]; /**< \brief Packed actionpoint results data, 4 bits per actionpoint */
+
+ uint16 PassiveRTSExecCount; /**< \brief Total count of RTS sequences not initiated because the LC state is
+ * set to #LC_STATE_PASSIVE or the state of the actionpoint that failed
+ * is set to #LC_APSTATE_PASSIVE
+ */
+
+ uint16 WPsInUse; /**< \brief How many watchpoints are currently in effect */
+ uint16 ActiveAPs; /**< \brief How many actionpoints are currently active */
+
+ uint8 Padding2[2]; /**< \brief Structure padding */
+
+ uint32 APSampleCount; /**< \brief Total count of Actionpoints sampled */
+ uint32 MonitoredMsgCount; /**< \brief Total count of messages monitored for watchpoints */
+ uint32 RTSExecCount; /**< \brief Total count of RTS sequences initiated */
+} LC_HkTlm_Payload_t;
+
+/**\}*/
+
#endif
diff --git a/config/default_lc_msgstruct.h b/config/default_lc_msgstruct.h
index 2cdfed1..d0ad7b1 100644
--- a/config/default_lc_msgstruct.h
+++ b/config/default_lc_msgstruct.h
@@ -84,38 +84,26 @@ typedef struct
} LC_ResetCountersCmd_t;
/**
- * \brief Set LC Application State Payload
- *
- * For command details see #LC_SET_LC_STATE_CC
- */
-typedef struct
-{
- uint16 NewLCState; /**< \brief New LC application state */
- uint16 Padding; /**< \brief Structure padding */
-} LC_SetLCState_Payload_t;
-
-/**
- * \brief Set LC Application State Command
+ * \brief Reset AP (Actionpoint) Statistics Command
*
- * For command details see #LC_SET_LC_STATE_CC
+ * For command details see #LC_RESET_AP_STATS_CC
*/
typedef struct
{
CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command Header */
-
- LC_SetLCState_Payload_t Payload;
-} LC_SetLCStateCmd_t;
+ LC_APNumber_Payload_t Payload;
+} LC_ResetAPStatsCmd_t;
/**
- * \brief Set AP (Actionpoint) State Payload
+ * \brief Set AP (Actionpoint) Permanently Off Command
*
- * For command details see #LC_SET_AP_STATE_CC
+ * For command details see #LC_SET_AP_PERM_OFF_CC
*/
typedef struct
{
- uint16 APNumber; /**< \brief Which actionpoint(s) to change */
- uint16 NewAPState; /**< \brief New actionpoint state */
-} LC_SetAPState_Payload_t;
+ CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command Header */
+ LC_APNumber_Payload_t Payload;
+} LC_SetAPPermOffCmd_t;
/**
* \brief Set AP (Actionpoint) State Command
@@ -125,66 +113,30 @@ typedef struct
typedef struct
{
CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command Header */
-
LC_SetAPState_Payload_t Payload;
} LC_SetAPStateCmd_t;
/**
- * \brief Set AP (Actionpoint) Permanently Off Payload
- *
- * For command details see #LC_SET_AP_PERM_OFF_CC
- */
-typedef struct
-{
- uint16 APNumber; /**< \brief Which actionpoint to change */
- uint16 Padding; /**< \brief Structure padding */
-} LC_SetAPPermOff_Payload_t;
-
-/**
- * \brief Set AP (Actionpoint) Permanently Off Command
+ * \brief Set LC Application State Command
*
- * For command details see #LC_SET_AP_PERM_OFF_CC
+ * For command details see #LC_SET_LC_STATE_CC
*/
typedef struct
{
CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command Header */
-
- LC_SetAPPermOff_Payload_t Payload;
-} LC_SetAPPermOffCmd_t;
-
-/**
- * \brief Reset AP (Actionpoint) Statistics Payload
- *
- * For command details see #LC_RESET_AP_STATS_CC
- */
-typedef struct
-{
- uint16 APNumber; /**< \brief Which actionpoint(s) to change */
- uint16 Padding; /**< \brief Structure padding */
-} LC_ResetAPStats_Payload_t;
+ LC_SetLCState_Payload_t Payload;
+} LC_SetLCStateCmd_t;
/**
- * \brief Reset AP (Actionpoint) Statistics Command
+ * \brief Sample AP (Actionpoint) Request
*
- * For command details see #LC_RESET_AP_STATS_CC
+ * See #LC_SAMPLE_AP_MID
*/
typedef struct
{
CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command Header */
-
- LC_ResetAPStats_Payload_t Payload;
-} LC_ResetAPStatsCmd_t;
-
-/**
- * \brief Reset WP (Watchpoint) Statistics Payload
- *
- * For command details see #LC_RESET_WP_STATS_CC
- */
-typedef struct
-{
- uint16 WPNumber; /**< \brief Which watchpoint(s) to change */
- uint16 Padding; /**< \brief Structure padding */
-} LC_ResetWPStats_Payload_t;
+ LC_SampleAP_Payload_t Payload;
+} LC_SampleAPCmd_t;
/**
* \brief Reset WP (Watchpoint) Statistics Command
@@ -193,46 +145,10 @@ typedef struct
*/
typedef struct
{
- CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command Header */
-
+ CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command Header */
LC_ResetWPStats_Payload_t Payload;
} LC_ResetWPStatsCmd_t;
-/**
- * \brief Sample AP (Actionpoint) Payload
- *
- * See #LC_SAMPLE_AP_MID
- */
-typedef struct
-{
- uint16 StartIndex; /**< \brief Start actionpoint to sample */
- uint16 EndIndex; /**< \brief End actionpoint to sample */
-
- uint16 UpdateAge; /**< \brief Update WP results age (T or F) */
- uint16 Padding; /**< \brief Structure padding */
-} LC_SampleAP_Payload_t;
-
-/**
- * \brief Sample AP (Actionpoint) Request
- *
- * See #LC_SAMPLE_AP_MID
- */
-typedef struct
-{
- CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command Header */
-
- LC_SampleAP_Payload_t Payload;
-} LC_SampleAPCmd_t;
-
-/**
- * \brief Payload to Start a Stored Command RTS
- */
-typedef struct
-{
- uint16 RTSId; /**< \brief RTS Id to start */
- uint16 Padding; /**< \brief Padding */
-} LC_RTSRequest_Payload_t;
-
/**
* \brief Send Command to Start a Stored Command RTS
*
@@ -249,54 +165,16 @@ typedef struct
typedef struct
{
CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command Header */
-
LC_RTSRequest_Payload_t Payload;
} LC_RTSRequestCmd_t;
-/**\}*/
-
-/**
- * \defgroup cfslctlm CFS Limit Checker Telemetry
- * \{
- */
-
-/**
- * \brief Housekeeping Payload Structure
- */
-typedef struct
-{
- uint8 CmdCount; /**< \brief LC Application Command Counter */
- uint8 CmdErrCount; /**< \brief LC Application Command Error Counter */
- uint8 CurrentLCState; /**< \brief Current LC application operating state */
-
- uint8 Pad8; /**< \brief Structure padding */
-
- uint8 WPResults[LC_HKWR_NUM_BYTES]; /**< \brief Packed watchpoint results data, 2 bits per watchpoint */
- uint8 APResults[LC_HKAR_NUM_BYTES]; /**< \brief Packed actionpoint results data, 4 bits per actionpoint */
-
- uint16 PassiveRTSExecCount; /**< \brief Total count of RTS sequences not initiated because the LC state is
- * set to #LC_STATE_PASSIVE or the state of the actionpoint that failed
- * is set to #LC_APSTATE_PASSIVE
- */
-
- uint16 WPsInUse; /**< \brief How many watchpoints are currently in effect */
- uint16 ActiveAPs; /**< \brief How many actionpoints are currently active */
-
- uint16 Pad16; /**< \brief Structure padding */
-
- uint32 APSampleCount; /**< \brief Total count of Actionpoints sampled */
- uint32 MonitoredMsgCount; /**< \brief Total count of messages monitored for watchpoints */
- uint32 RTSExecCount; /**< \brief Total count of RTS sequences initiated */
-} LC_HkTlm_Payload_t;
-
/**
* \brief Housekeeping Telemetry Structure Structure
*/
typedef struct
{
CFE_MSG_TelemetryHeader_t TelemetryHeader; /**< \brief Telemetry Header */
-
- LC_HkTlm_Payload_t Payload;
+ LC_HkTlm_Payload_t Payload;
} LC_HkPacket_t;
/**\}*/
diff --git a/eds/LC.xml b/eds/LC.xml
index 08db008..a4875c2 100644
--- a/eds/LC.xml
+++ b/eds/LC.xml
@@ -265,16 +265,16 @@
-
-
+
+
-
+
-
+
@@ -295,14 +295,7 @@
-
-
-
-
-
-
-
-
+
@@ -321,6 +314,7 @@
+
@@ -339,6 +333,7 @@
+
@@ -388,7 +383,7 @@
-
+
@@ -397,7 +392,7 @@
-
+
diff --git a/fsw/inc/lc_fcncodes.h b/fsw/inc/lc_fcncodes.h
index e851f68..88c39c9 100644
--- a/fsw/inc/lc_fcncodes.h
+++ b/fsw/inc/lc_fcncodes.h
@@ -48,7 +48,7 @@
* \par Command Verification
* Successful execution of this command may be verified with
* the following telemetry:
- * - #LC_HkTlm_Payload_t.CmdCount will increment
+ * - #LC_HkTlm_Payload_t.CommandCounter will increment
* - The #LC_NOOP_INF_EID informational event message will be
* generated when the command is received
*
@@ -57,7 +57,7 @@
* - Command packet length not as expected
*
* \par Evidence of failure may be found in the following telemetry:
- * - #LC_HkTlm_Payload_t.CmdErrCount will increment
+ * - #LC_HkTlm_Payload_t.CommandErrCounter will increment
* - Error specific event message #LC_CMD_LEN_ERR_EID
*
* \par Criticality
@@ -79,7 +79,7 @@
* \par Command Verification
* Successful execution of this command may be verified with
* the following telemetry:
- * - #LC_HkTlm_Payload_t.CmdCount will be cleared
+ * - #LC_HkTlm_Payload_t.CommandCounter will be cleared
* - The #LC_RESET_INF_EID debug event message will be
* generated when the command is executed
*
@@ -88,7 +88,7 @@
* - Command packet length not as expected
*
* \par Evidence of failure may be found in the following telemetry:
- * - #LC_HkTlm_Payload_t.CmdErrCount will increment
+ * - #LC_HkTlm_Payload_t.CommandErrCounter will increment
* - Error specific event message #LC_CMD_LEN_ERR_EID
*
* \par Criticality
@@ -110,7 +110,7 @@
* \par Command Verification
* Successful execution of this command may be verified with
* the following telemetry:
- * - #LC_HkTlm_Payload_t.CmdCount will increment
+ * - #LC_HkTlm_Payload_t.CommandCounter will increment
* - #LC_HkTlm_Payload_t.CurrentLCState will be set to the new state
* - The #LC_LCSTATE_INF_EID informational event message will be
* generated when the command is executed
@@ -121,7 +121,7 @@
* - Invalid new state specified in command message
*
* \par Evidence of failure may be found in the following telemetry:
- * - #LC_HkTlm_Payload_t.CmdErrCount will increment
+ * - #LC_HkTlm_Payload_t.CommandErrCounter will increment
* - Error specific event message #LC_CMD_LEN_ERR_EID
* - Error specific event message #LC_LCSTATE_ERR_EID
*
@@ -143,7 +143,7 @@
* \par Command Verification
* Successful execution of this command may be verified with
* the following telemetry:
- * - #LC_HkTlm_Payload_t.CmdCount will increment
+ * - #LC_HkTlm_Payload_t.CommandCounter will increment
* - The #LC_APSTATE_INF_EID informational event message will be
* generated when the command is executed
*
@@ -157,7 +157,7 @@
* or #LC_APSTATE_PERMOFF
*
* \par Evidence of failure may be found in the following telemetry:
- * - #LC_HkTlm_Payload_t.CmdErrCount will increment
+ * - #LC_HkTlm_Payload_t.CommandErrCounter will increment
* - Error specific event message #LC_CMD_LEN_ERR_EID
* - Error specific event message #LC_APSTATE_NEW_ERR_EID
* - Error specific event message #LC_APSTATE_APNUM_ERR_EID
@@ -181,7 +181,7 @@
* \par Command Verification
* Successful execution of this command may be verified with
* the following telemetry:
- * - #LC_HkTlm_Payload_t.CmdCount will increment
+ * - #LC_HkTlm_Payload_t.CommandCounter will increment
* - The #LC_APOFF_INF_EID informational event message will be
* generated when the command is executed
*
@@ -193,7 +193,7 @@
* - Actionpoint current state is not #LC_APSTATE_DISABLED
*
* \par Evidence of failure may be found in the following telemetry:
- * - #LC_HkTlm_Payload_t.CmdErrCount will increment
+ * - #LC_HkTlm_Payload_t.CommandErrCounter will increment
* - Error specific event message #LC_CMD_LEN_ERR_EID
* - Error specific event message #LC_APOFF_APNUM_ERR_EID
* - Error specific event message #LC_APOFF_CURR_ERR_EID
@@ -216,7 +216,7 @@
* \par Command Verification
* Successful execution of this command may be verified with
* the following telemetry:
- * - #LC_HkTlm_Payload_t.CmdCount will increment
+ * - #LC_HkTlm_Payload_t.CommandCounter will increment
* - The #LC_APSTATS_INF_EID informational event message will be
* generated when the command is executed
*
@@ -227,7 +227,7 @@
* out of range
*
* \par Evidence of failure may be found in the following telemetry:
- * - #LC_HkTlm_Payload_t.CmdErrCount will increment
+ * - #LC_HkTlm_Payload_t.CommandErrCounter will increment
* - Error specific event message #LC_CMD_LEN_ERR_EID
* - Error specific event message #LC_APSTATS_APNUM_ERR_EID
*
@@ -250,7 +250,7 @@
* \par Command Verification
* Successful execution of this command may be verified with
* the following telemetry:
- * - #LC_HkTlm_Payload_t.CmdCount will increment
+ * - #LC_HkTlm_Payload_t.CommandCounter will increment
* - The #LC_WPSTATS_INF_EID informational event message will be
* generated when the command is executed
*
@@ -261,7 +261,7 @@
* out of range
*
* \par Evidence of failure may be found in the following telemetry:
- * - #LC_HkTlm_Payload_t.CmdErrCount will increment
+ * - #LC_HkTlm_Payload_t.CommandErrCounter will increment
* - Error specific event message #LC_CMD_LEN_ERR_EID
* - Error specific event message #LC_WPSTATS_WPNUM_ERR_EID
*
diff --git a/fsw/src/lc_app.c b/fsw/src/lc_app.c
index 13e99cd..4ff38da 100644
--- a/fsw/src/lc_app.c
+++ b/fsw/src/lc_app.c
@@ -1002,7 +1002,13 @@ CFE_Status_t LC_LoadDefaultTables(void)
/*
** Reset application data counters reported in housekeeping
*/
- LC_ResetCounters();
+ LC_AppData.CommandCounter = 0;
+ LC_AppData.CommandErrCounter = 0;
+
+ LC_AppData.APSampleCount = 0;
+ LC_AppData.MonitoredMsgCount = 0;
+ LC_AppData.RTSExecCount = 0;
+ LC_AppData.PassiveRTSExecCount = 0;
/*
** Set LC operational state to configured startup value
diff --git a/fsw/src/lc_app.h b/fsw/src/lc_app.h
index cef4a9d..9ee6169 100644
--- a/fsw/src/lc_app.h
+++ b/fsw/src/lc_app.h
@@ -182,8 +182,8 @@ typedef struct
*/
typedef struct
{
- uint16 CmdCount; /**< \brief Command Counter */
- uint16 CmdErrCount; /**< \brief Command Error Counter */
+ uint16 CommandCounter; /**< \brief Command Counter */
+ uint16 CommandErrCounter; /**< \brief Command Error Counter */
uint32 APSampleCount; /**< \brief Total count of Actionpoints sampled */
uint32 MonitoredMsgCount; /**< \brief Total count of messages monitored */
diff --git a/fsw/src/lc_cmds.c b/fsw/src/lc_cmds.c
index 135ad22..62a3f28 100644
--- a/fsw/src/lc_cmds.c
+++ b/fsw/src/lc_cmds.c
@@ -33,21 +33,20 @@
#include "lc_watch.h"
#include "lc_platform_cfg.h"
#include "lc_utils.h"
-
-#define LC_GET_CMD_PAYLOAD(ptr, type) (&((const type *)(ptr))->Payload)
+#include "lc_msgdefs.h"
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* Sample Actionpoints Request */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-void LC_SampleAPReq(const CFE_SB_Buffer_t *BufPtr)
+void LC_SampleAPReq(const LC_SampleAPCmd_t *Msg)
{
- const LC_SampleAP_Payload_t *LC_SampleAP;
- uint16 WatchIndex;
- bool ValidSampleCmd = false;
+ uint16 WatchIndex;
+ bool ValidSampleCmd;
- LC_SampleAP = LC_GET_CMD_PAYLOAD(BufPtr, LC_SampleAPCmd_t);
+ ValidSampleCmd = false;
+ const LC_SampleAP_Payload_t *Payload = &(Msg->Payload);
/*
** Ignore AP sample requests if disabled at the application level
@@ -57,7 +56,7 @@ void LC_SampleAPReq(const CFE_SB_Buffer_t *BufPtr)
/*
** Range check the actionpoint array index arguments
*/
- if ((LC_SampleAP->StartIndex == LC_ALL_ACTIONPOINTS) && (LC_SampleAP->EndIndex == LC_ALL_ACTIONPOINTS))
+ if ((Payload->StartIndex == LC_ALL_ACTIONPOINTS) && (Payload->EndIndex == LC_ALL_ACTIONPOINTS))
{
/*
** Allow special "sample all" heritage values
@@ -65,12 +64,12 @@ void LC_SampleAPReq(const CFE_SB_Buffer_t *BufPtr)
LC_SampleAPs(0, LC_MAX_ACTIONPOINTS - 1);
ValidSampleCmd = true;
}
- else if ((LC_SampleAP->StartIndex <= LC_SampleAP->EndIndex) && (LC_SampleAP->EndIndex < LC_MAX_ACTIONPOINTS))
+ else if ((Payload->StartIndex <= Payload->EndIndex) && (Payload->EndIndex < LC_MAX_ACTIONPOINTS))
{
/*
** Start is less or equal to end, and end is within the array
*/
- LC_SampleAPs(LC_SampleAP->StartIndex, LC_SampleAP->EndIndex);
+ LC_SampleAPs(Payload->StartIndex, Payload->EndIndex);
ValidSampleCmd = true;
}
else
@@ -81,14 +80,14 @@ void LC_SampleAPReq(const CFE_SB_Buffer_t *BufPtr)
CFE_EVS_SendEvent(LC_APSAMPLE_APNUM_ERR_EID,
CFE_EVS_EventType_ERROR,
"Sample AP error: invalid AP number, start = %d, end = %d",
- LC_SampleAP->StartIndex,
- LC_SampleAP->EndIndex);
+ Payload->StartIndex,
+ Payload->EndIndex);
}
/*
** Optionally update the age of watchpoint results
*/
- if ((LC_SampleAP->UpdateAge != 0) && (ValidSampleCmd))
+ if ((Payload->UpdateAge != 0) && (ValidSampleCmd))
{
for (WatchIndex = 0; WatchIndex < LC_MAX_WATCHPOINTS; WatchIndex++)
{
@@ -111,22 +110,21 @@ void LC_SampleAPReq(const CFE_SB_Buffer_t *BufPtr)
/* Housekeeping request */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-CFE_Status_t LC_SendHkCmd(const LC_SendHkCmd_t *msg)
+CFE_Status_t LC_SendHkCmd(const LC_SendHkCmd_t *Msg)
{
- uint16 TableIndex;
- uint16 HKIndex;
- uint8 ByteData = 0;
- uint8 Shift;
- uint8 TempByteData;
- uint8 i;
-
+ uint16 TableIndex;
+ uint16 HKIndex;
+ uint8 ByteData;
+ uint8 Shift;
+ uint8 TempByteData;
+ uint8 i;
LC_HkTlm_Payload_t *PayloadPtr;
- /* Update HK variables */
PayloadPtr = &LC_OperData.HkPacket.Payload;
+ ByteData = 0;
- PayloadPtr->CmdCount = LC_AppData.CmdCount;
- PayloadPtr->CmdErrCount = LC_AppData.CmdErrCount;
+ PayloadPtr->CommandCounter = LC_AppData.CommandCounter;
+ PayloadPtr->CommandErrCounter = LC_AppData.CommandErrCounter;
PayloadPtr->APSampleCount = LC_AppData.APSampleCount;
PayloadPtr->MonitoredMsgCount = LC_AppData.MonitoredMsgCount;
PayloadPtr->RTSExecCount = LC_AppData.RTSExecCount;
@@ -264,9 +262,9 @@ CFE_Status_t LC_SendHkCmd(const LC_SendHkCmd_t *msg)
/* Noop command */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-CFE_Status_t LC_NoopCmd(const LC_NoopCmd_t *msg)
+CFE_Status_t LC_NoopCmd(const LC_NoopCmd_t *Msg)
{
- LC_AppData.CmdCount++;
+ LC_AppData.CommandCounter++;
CFE_EVS_SendEvent(LC_NOOP_INF_EID,
CFE_EVS_EventType_INFORMATION,
@@ -284,29 +282,19 @@ CFE_Status_t LC_NoopCmd(const LC_NoopCmd_t *msg)
/* Reset counters command */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-CFE_Status_t LC_ResetCountersCmd(const LC_ResetCountersCmd_t *msg)
+CFE_Status_t LC_ResetCountersCmd(const LC_ResetCountersCmd_t *Msg)
{
- LC_ResetCounters();
-
- CFE_EVS_SendEvent(LC_RESET_INF_EID, CFE_EVS_EventType_INFORMATION, "Reset counters command");
-
- return CFE_SUCCESS;
-}
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* */
-/* Reset housekeeping counters */
-/* */
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-void LC_ResetCounters(void)
-{
- LC_AppData.CmdCount = 0;
- LC_AppData.CmdErrCount = 0;
+ LC_AppData.CommandCounter = 0;
+ LC_AppData.CommandErrCounter = 0;
LC_AppData.APSampleCount = 0;
LC_AppData.MonitoredMsgCount = 0;
LC_AppData.RTSExecCount = 0;
LC_AppData.PassiveRTSExecCount = 0;
+
+ CFE_EVS_SendEvent(LC_RESET_INF_EID, CFE_EVS_EventType_INFORMATION, "Reset counters command");
+
+ return CFE_SUCCESS;
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -314,31 +302,31 @@ void LC_ResetCounters(void)
/* Set LC state command */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-CFE_Status_t LC_SetLCStateCmd(const LC_SetLCStateCmd_t *msg)
+CFE_Status_t LC_SetLCStateCmd(const LC_SetLCStateCmd_t *Msg)
{
- const LC_SetLCState_Payload_t *CmdPtr = &msg->Payload;
+ const LC_SetLCState_Payload_t *Payload = &(Msg->Payload);
- switch (CmdPtr->NewLCState)
+ switch (Payload->NewLCState)
{
case LC_STATE_ACTIVE:
case LC_STATE_PASSIVE:
case LC_STATE_DISABLED:
- LC_AppData.CurrentLCState = CmdPtr->NewLCState;
- LC_AppData.CmdCount++;
+ LC_AppData.CurrentLCState = Payload->NewLCState;
+ LC_AppData.CommandCounter++;
CFE_EVS_SendEvent(LC_LCSTATE_INF_EID,
CFE_EVS_EventType_INFORMATION,
"Set LC state command: new state = %d",
- CmdPtr->NewLCState);
+ Payload->NewLCState);
break;
default:
CFE_EVS_SendEvent(LC_LCSTATE_ERR_EID,
CFE_EVS_EventType_ERROR,
"Set LC state error: invalid state = %d",
- CmdPtr->NewLCState);
+ Payload->NewLCState);
- LC_AppData.CmdErrCount++;
+ LC_AppData.CommandErrCounter++;
break;
}
@@ -350,19 +338,22 @@ CFE_Status_t LC_SetLCStateCmd(const LC_SetLCStateCmd_t *msg)
/* Set actionpoint state command */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-CFE_Status_t LC_SetAPStateCmd(const LC_SetAPStateCmd_t *msg)
+CFE_Status_t LC_SetAPStateCmd(const LC_SetAPStateCmd_t *Msg)
{
- const LC_SetAPState_Payload_t *CmdPtr = &msg->Payload;
- uint32 TableIndex;
- uint8 CurrentAPState;
- bool ValidState = true;
- bool CmdSuccess = false;
+ uint32 TableIndex;
+ uint8 CurrentAPState;
+ bool ValidState;
+ bool CmdSuccess;
+
+ const LC_SetAPState_Payload_t *Payload = &(Msg->Payload);
+ ValidState = true;
+ CmdSuccess = false;
/*
** Do a sanity check on the new actionpoint state
** specified.
*/
- switch (CmdPtr->NewAPState)
+ switch (Payload->NewAPState)
{
case LC_APSTATE_ACTIVE:
case LC_APSTATE_PASSIVE:
@@ -374,10 +365,10 @@ CFE_Status_t LC_SetAPStateCmd(const LC_SetAPStateCmd_t *msg)
CFE_EVS_SendEvent(LC_APSTATE_NEW_ERR_EID,
CFE_EVS_EventType_ERROR,
"Set AP state error: AP = %d, Invalid new state = %d",
- CmdPtr->APNumber,
- CmdPtr->NewAPState);
+ Payload->APNumber,
+ Payload->NewAPState);
- LC_AppData.CmdErrCount++;
+ LC_AppData.CommandErrCounter++;
break;
}
@@ -386,7 +377,7 @@ CFE_Status_t LC_SetAPStateCmd(const LC_SetAPStateCmd_t *msg)
*/
if (ValidState == true)
{
- if ((CmdPtr->APNumber) == LC_ALL_ACTIONPOINTS)
+ if ((Payload->APNumber) == LC_ALL_ACTIONPOINTS)
{
/*
** Set all actionpoints to the new state except those that are not
@@ -398,7 +389,7 @@ CFE_Status_t LC_SetAPStateCmd(const LC_SetAPStateCmd_t *msg)
if ((CurrentAPState != LC_APSTATE_NOT_USED) && (CurrentAPState != LC_APSTATE_PERMOFF))
{
- LC_OperData.ARTPtr[TableIndex].CurrentState = CmdPtr->NewAPState;
+ LC_OperData.ARTPtr[TableIndex].CurrentState = Payload->NewAPState;
}
}
@@ -409,9 +400,9 @@ CFE_Status_t LC_SetAPStateCmd(const LC_SetAPStateCmd_t *msg)
}
else
{
- if ((CmdPtr->APNumber) < LC_MAX_ACTIONPOINTS)
+ if ((Payload->APNumber) < LC_MAX_ACTIONPOINTS)
{
- TableIndex = CmdPtr->APNumber;
+ TableIndex = Payload->APNumber;
CurrentAPState = LC_OperData.ARTPtr[TableIndex].CurrentState;
if ((CurrentAPState != LC_APSTATE_NOT_USED) && (CurrentAPState != LC_APSTATE_PERMOFF))
@@ -419,7 +410,7 @@ CFE_Status_t LC_SetAPStateCmd(const LC_SetAPStateCmd_t *msg)
/*
** Update state for single actionpoint specified
*/
- LC_OperData.ARTPtr[TableIndex].CurrentState = CmdPtr->NewAPState;
+ LC_OperData.ARTPtr[TableIndex].CurrentState = Payload->NewAPState;
CmdSuccess = true;
}
@@ -432,10 +423,10 @@ CFE_Status_t LC_SetAPStateCmd(const LC_SetAPStateCmd_t *msg)
CFE_EVS_SendEvent(LC_APSTATE_CURR_ERR_EID,
CFE_EVS_EventType_ERROR,
"Set AP state error: AP = %d, Invalid current AP state = %d",
- CmdPtr->APNumber,
+ Payload->APNumber,
CurrentAPState);
- LC_AppData.CmdErrCount++;
+ LC_AppData.CommandErrCounter++;
}
}
else
@@ -447,9 +438,9 @@ CFE_Status_t LC_SetAPStateCmd(const LC_SetAPStateCmd_t *msg)
CFE_EVS_SendEvent(LC_APSTATE_APNUM_ERR_EID,
CFE_EVS_EventType_ERROR,
"Set AP state error: Invalid AP number = %d",
- CmdPtr->APNumber);
+ Payload->APNumber);
- LC_AppData.CmdErrCount++;
+ LC_AppData.CommandErrCounter++;
}
}
@@ -459,13 +450,13 @@ CFE_Status_t LC_SetAPStateCmd(const LC_SetAPStateCmd_t *msg)
*/
if (CmdSuccess == true)
{
- LC_AppData.CmdCount++;
+ LC_AppData.CommandCounter++;
CFE_EVS_SendEvent(LC_APSTATE_INF_EID,
CFE_EVS_EventType_INFORMATION,
"Set AP state command: AP = %d, New state = %d",
- CmdPtr->APNumber,
- CmdPtr->NewAPState);
+ Payload->APNumber,
+ Payload->NewAPState);
}
} /* end ValidState if */
@@ -478,13 +469,14 @@ CFE_Status_t LC_SetAPStateCmd(const LC_SetAPStateCmd_t *msg)
/* Set actionpoint permanently off command */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-CFE_Status_t LC_SetAPPermOffCmd(const LC_SetAPPermOffCmd_t *msg)
+CFE_Status_t LC_SetAPPermOffCmd(const LC_SetAPPermOffCmd_t *Msg)
{
- const LC_SetAPPermOff_Payload_t *CmdPtr = &msg->Payload;
- uint32 TableIndex;
- uint8 CurrentAPState;
+ uint32 TableIndex;
+ uint8 CurrentAPState;
+
+ const LC_APNumber_Payload_t *Payload = &(Msg->Payload);
- if (((CmdPtr->APNumber) == LC_ALL_ACTIONPOINTS) || ((CmdPtr->APNumber) >= LC_MAX_ACTIONPOINTS))
+ if (((Payload->APNumber) == LC_ALL_ACTIONPOINTS) || ((Payload->APNumber) >= LC_MAX_ACTIONPOINTS))
{
/*
** Invalid actionpoint number
@@ -493,13 +485,13 @@ CFE_Status_t LC_SetAPPermOffCmd(const LC_SetAPPermOffCmd_t *msg)
CFE_EVS_SendEvent(LC_APOFF_APNUM_ERR_EID,
CFE_EVS_EventType_ERROR,
"Set AP perm off error: Invalid AP number = %d",
- CmdPtr->APNumber);
+ Payload->APNumber);
- LC_AppData.CmdErrCount++;
+ LC_AppData.CommandErrCounter++;
}
else
{
- TableIndex = CmdPtr->APNumber;
+ TableIndex = Payload->APNumber;
CurrentAPState = LC_OperData.ARTPtr[TableIndex].CurrentState;
if (CurrentAPState != LC_APSTATE_DISABLED)
@@ -511,10 +503,10 @@ CFE_Status_t LC_SetAPPermOffCmd(const LC_SetAPPermOffCmd_t *msg)
CFE_EVS_SendEvent(LC_APOFF_CURR_ERR_EID,
CFE_EVS_EventType_ERROR,
"Set AP perm off error, AP NOT Disabled: AP = %d, Current state = %d",
- CmdPtr->APNumber,
+ Payload->APNumber,
CurrentAPState);
- LC_AppData.CmdErrCount++;
+ LC_AppData.CommandErrCounter++;
}
else
{
@@ -523,15 +515,15 @@ CFE_Status_t LC_SetAPPermOffCmd(const LC_SetAPPermOffCmd_t *msg)
*/
LC_OperData.ARTPtr[TableIndex].CurrentState = LC_APSTATE_PERMOFF;
- LC_AppData.CmdCount++;
+ LC_AppData.CommandCounter++;
CFE_EVS_SendEvent(LC_APOFF_INF_EID,
CFE_EVS_EventType_INFORMATION,
"Set AP permanently off command: AP = %d",
- CmdPtr->APNumber);
+ Payload->APNumber);
}
- } /* end CmdPtr -> APNumber else */
+ } /* end Payload -> APNumber else */
return CFE_SUCCESS;
}
@@ -541,41 +533,43 @@ CFE_Status_t LC_SetAPPermOffCmd(const LC_SetAPPermOffCmd_t *msg)
/* Reset actionpoint statistics command */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-CFE_Status_t LC_ResetAPStatsCmd(const LC_ResetAPStatsCmd_t *msg)
+CFE_Status_t LC_ResetAPStatsCmd(const LC_ResetAPStatsCmd_t *Msg)
{
- const LC_ResetAPStats_Payload_t *CmdPtr = &msg->Payload;
- bool CmdSuccess = false;
+ bool CmdSuccess;
+
+ const LC_APNumber_Payload_t *Payload = &(Msg->Payload);
+ CmdSuccess = false;
/* arg may be one or all AP's */
- if (CmdPtr->APNumber == LC_ALL_ACTIONPOINTS)
+ if (Payload->APNumber == LC_ALL_ACTIONPOINTS)
{
LC_ResetResultsAP(0, LC_MAX_ACTIONPOINTS - 1, true);
CmdSuccess = true;
}
- else if (CmdPtr->APNumber < LC_MAX_ACTIONPOINTS)
+ else if (Payload->APNumber < LC_MAX_ACTIONPOINTS)
{
- LC_ResetResultsAP(CmdPtr->APNumber, CmdPtr->APNumber, true);
+ LC_ResetResultsAP(Payload->APNumber, Payload->APNumber, true);
CmdSuccess = true;
}
else
{
/* arg is out of range (zero based table index) */
- LC_AppData.CmdErrCount++;
+ LC_AppData.CommandErrCounter++;
CFE_EVS_SendEvent(LC_APSTATS_APNUM_ERR_EID,
CFE_EVS_EventType_ERROR,
"Reset AP stats error: invalid AP number = %d",
- CmdPtr->APNumber);
+ Payload->APNumber);
}
if (CmdSuccess == true)
{
- LC_AppData.CmdCount++;
+ LC_AppData.CommandCounter++;
CFE_EVS_SendEvent(LC_APSTATS_INF_EID,
CFE_EVS_EventType_INFORMATION,
"Reset AP stats command: AP = %d",
- CmdPtr->APNumber);
+ Payload->APNumber);
}
return CFE_SUCCESS;
@@ -616,41 +610,43 @@ void LC_ResetResultsAP(uint32 StartIndex, uint32 EndIndex, bool ResetStatsCmd)
/* Reset watchpoint statistics command */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-CFE_Status_t LC_ResetWPStatsCmd(const LC_ResetWPStatsCmd_t *msg)
+CFE_Status_t LC_ResetWPStatsCmd(const LC_ResetWPStatsCmd_t *Msg)
{
- const LC_ResetWPStats_Payload_t *CmdPtr = &msg->Payload;
- bool CmdSuccess = false;
+ bool CmdSuccess;
+
+ const LC_ResetWPStats_Payload_t *Payload = &(Msg->Payload);
+ CmdSuccess = false;
/* arg may be one or all WP's */
- if (CmdPtr->WPNumber == LC_ALL_WATCHPOINTS)
+ if (Payload->WPNumber == LC_ALL_WATCHPOINTS)
{
LC_ResetResultsWP(0, LC_MAX_WATCHPOINTS - 1, true);
CmdSuccess = true;
}
- else if (CmdPtr->WPNumber < LC_MAX_WATCHPOINTS)
+ else if (Payload->WPNumber < LC_MAX_WATCHPOINTS)
{
- LC_ResetResultsWP(CmdPtr->WPNumber, CmdPtr->WPNumber, true);
+ LC_ResetResultsWP(Payload->WPNumber, Payload->WPNumber, true);
CmdSuccess = true;
}
else
{
/* arg is out of range (zero based table index) */
- LC_AppData.CmdErrCount++;
+ LC_AppData.CommandErrCounter++;
CFE_EVS_SendEvent(LC_WPSTATS_WPNUM_ERR_EID,
CFE_EVS_EventType_ERROR,
"Reset WP stats error: invalid WP number = %d",
- CmdPtr->WPNumber);
+ Payload->WPNumber);
}
if (CmdSuccess == true)
{
- LC_AppData.CmdCount++;
+ LC_AppData.CommandCounter++;
CFE_EVS_SendEvent(LC_WPSTATS_INF_EID,
CFE_EVS_EventType_INFORMATION,
"Reset WP stats command: WP = %d",
- CmdPtr->WPNumber);
+ Payload->WPNumber);
}
return CFE_SUCCESS;
diff --git a/fsw/src/lc_cmds.h b/fsw/src/lc_cmds.h
index 0d6bde6..01f4856 100644
--- a/fsw/src/lc_cmds.h
+++ b/fsw/src/lc_cmds.h
@@ -34,19 +34,6 @@
* Exported Functions
*************************************************************************/
-/**
- * \brief Reset HK counters
- *
- * \par Description
- * Utility function that resets housekeeping counters to zero
- *
- * \par Assumptions, External Events, and Notes:
- * None
- *
- * \sa #LC_ResetCountersCmd
- */
-void LC_ResetCounters(void);
-
/**
* \brief Reset AP results
*
@@ -90,9 +77,9 @@ void LC_ResetResultsWP(uint32 StartIndex, uint32 EndIndex, bool ResetStatsCmd);
* \par Assumptions, External Events, and Notes:
* This message does not affect the command execution counter
*
- * \param[in] BufPtr Pointer to Software Bus buffer
+ * \param[in] Msg Pointer to command header
*/
-void LC_SampleAPReq(const CFE_SB_Buffer_t *BufPtr);
+void LC_SampleAPReq(const LC_SampleAPCmd_t *Msg);
/**
* \brief Housekeeping request
@@ -103,10 +90,10 @@ void LC_SampleAPReq(const CFE_SB_Buffer_t *BufPtr);
* \par Assumptions, External Events, and Notes:
* This message does not affect the command execution counter
*
- * \param[in] msg Pointer to command header
+ * \param[in] Msg Pointer to command header
*
*/
-CFE_Status_t LC_SendHkCmd(const LC_SendHkCmd_t *msg);
+CFE_Status_t LC_SendHkCmd(const LC_SendHkCmd_t *Msg);
/**
* \brief Noop command
@@ -117,11 +104,11 @@ CFE_Status_t LC_SendHkCmd(const LC_SendHkCmd_t *msg);
* \par Assumptions, External Events, and Notes:
* None
*
- * \param[in] msg Pointer to command message
+ * \param[in] Msg Pointer to command message
*
* \sa #LC_NOOP_CC
*/
-CFE_Status_t LC_NoopCmd(const LC_NoopCmd_t *msg);
+CFE_Status_t LC_NoopCmd(const LC_NoopCmd_t *Msg);
/**
* \brief Reset counters command
@@ -139,11 +126,11 @@ CFE_Status_t LC_NoopCmd(const LC_NoopCmd_t *msg);
* \par Assumptions, External Events, and Notes:
* None
*
- * \param[in] msg Pointer to command message
+ * \param[in] Msg Pointer to command message
*
* \sa #LC_RESET_CC
*/
-CFE_Status_t LC_ResetCountersCmd(const LC_ResetCountersCmd_t *msg);
+CFE_Status_t LC_ResetCountersCmd(const LC_ResetCountersCmd_t *Msg);
/**
* \brief Set LC state command
@@ -154,11 +141,11 @@ CFE_Status_t LC_ResetCountersCmd(const LC_ResetCountersCmd_t *msg);
* \par Assumptions, External Events, and Notes:
* None
*
- * \param[in] msg Pointer to command message
+ * \param[in] Msg Pointer to command message
*
* \sa #LC_SET_LC_STATE_CC
*/
-CFE_Status_t LC_SetLCStateCmd(const LC_SetLCStateCmd_t *msg);
+CFE_Status_t LC_SetLCStateCmd(const LC_SetLCStateCmd_t *Msg);
/**
* \brief Set AP state command
@@ -169,11 +156,11 @@ CFE_Status_t LC_SetLCStateCmd(const LC_SetLCStateCmd_t *msg);
* \par Assumptions, External Events, and Notes:
* None
*
- * \param[in] msg Pointer to command message
+ * \param[in] Msg Pointer to command message
*
* \sa #LC_SET_AP_STATE_CC
*/
-CFE_Status_t LC_SetAPStateCmd(const LC_SetAPStateCmd_t *msg);
+CFE_Status_t LC_SetAPStateCmd(const LC_SetAPStateCmd_t *Msg);
/**
* \brief Set AP permanently off command
@@ -184,11 +171,11 @@ CFE_Status_t LC_SetAPStateCmd(const LC_SetAPStateCmd_t *msg);
* \par Assumptions, External Events, and Notes:
* None
*
- * \param[in] msg Pointer to command message
+ * \param[in] Msg Pointer to command message
*
* \sa #LC_SET_AP_PERM_OFF_CC
*/
-CFE_Status_t LC_SetAPPermOffCmd(const LC_SetAPPermOffCmd_t *msg);
+CFE_Status_t LC_SetAPPermOffCmd(const LC_SetAPPermOffCmd_t *Msg);
/**
* \brief Reset AP statistics command
@@ -199,11 +186,11 @@ CFE_Status_t LC_SetAPPermOffCmd(const LC_SetAPPermOffCmd_t *msg);
* \par Assumptions, External Events, and Notes:
* None
*
- * \param[in] msg Pointer to command message
+ * \param[in] Msg Pointer to command message
*
* \sa #LC_RESET_AP_STATS_CC
*/
-CFE_Status_t LC_ResetAPStatsCmd(const LC_ResetAPStatsCmd_t *msg);
+CFE_Status_t LC_ResetAPStatsCmd(const LC_ResetAPStatsCmd_t *Msg);
/**
* \brief Reset WP statistics command
@@ -214,10 +201,10 @@ CFE_Status_t LC_ResetAPStatsCmd(const LC_ResetAPStatsCmd_t *msg);
* \par Assumptions, External Events, and Notes:
* None
*
- * \param[in] msg Pointer to command message
+ * \param[in] Msg Pointer to command message
*
* \sa #LC_RESET_WP_STATS_CC
*/
-CFE_Status_t LC_ResetWPStatsCmd(const LC_ResetWPStatsCmd_t *msg);
+CFE_Status_t LC_ResetWPStatsCmd(const LC_ResetWPStatsCmd_t *Msg);
#endif
diff --git a/fsw/src/lc_dispatch.c b/fsw/src/lc_dispatch.c
index 40e5b88..240ba54 100644
--- a/fsw/src/lc_dispatch.c
+++ b/fsw/src/lc_dispatch.c
@@ -104,7 +104,7 @@ bool LC_VerifyMsgLength(const CFE_MSG_Message_t *msgPtr, size_t ExpectedLength)
CommandCode,
(int)ActualLength,
(int)ExpectedLength);
- LC_AppData.CmdErrCount++;
+ LC_AppData.CommandErrCounter++;
}
result = false;
@@ -127,7 +127,7 @@ void LC_SampleAPVerifyDispatch(const CFE_SB_Buffer_t *BufPtr)
*/
if (LC_VerifyMsgLength(&BufPtr->Msg, ExpectedLength))
{
- LC_SampleAPReq(BufPtr);
+ LC_SampleAPReq((LC_SampleAPCmd_t *)BufPtr);
}
}
@@ -302,7 +302,7 @@ void LC_AppProcessCmd(const CFE_SB_Buffer_t *BufPtr)
"Invalid command code: ID = 0x%08lX, CC = %d",
(unsigned long)CFE_SB_MsgIdToValue(MessageID),
CommandCode);
- LC_AppData.CmdErrCount++;
+ LC_AppData.CommandErrCounter++;
break;
}
}
diff --git a/fsw/src/lc_eds_dispatch.c b/fsw/src/lc_eds_dispatch.c
index 0c89945..6500511 100644
--- a/fsw/src/lc_eds_dispatch.c
+++ b/fsw/src/lc_eds_dispatch.c
@@ -77,7 +77,7 @@ void LC_AppPipe(const CFE_SB_Buffer_t *BufPtr)
CFE_MSG_GetMsgId(&BufPtr->Msg, &MsgId);
CFE_MSG_GetSize(&BufPtr->Msg, &MsgSize);
CFE_MSG_GetFcnCode(&BufPtr->Msg, &MsgFc);
- ++LC_AppData.CmdErrCount;
+ ++LC_AppData.CommandErrCounter;
if (Status == CFE_STATUS_UNKNOWN_MSG_ID)
{
diff --git a/unit-test/lc_app_tests.c b/unit-test/lc_app_tests.c
index abc366f..7bfa404 100644
--- a/unit-test/lc_app_tests.c
+++ b/unit-test/lc_app_tests.c
@@ -330,8 +330,8 @@ void LC_AppInit_Test_Nominal(void)
/* Note: not testing LC_OperData.WatchPtLinks == 0, because it is modified by a subfunction */
UtAssert_INT32_EQ(LC_OperData.HaveActiveCDS, 0);
- UtAssert_INT32_EQ(LC_AppData.CmdCount, 0);
- UtAssert_INT32_EQ(LC_AppData.CmdErrCount, 0);
+ UtAssert_INT32_EQ(LC_AppData.CommandCounter, 0);
+ UtAssert_INT32_EQ(LC_AppData.CommandErrCounter, 0);
UtAssert_INT32_EQ(LC_AppData.APSampleCount, 0);
UtAssert_INT32_EQ(LC_AppData.MonitoredMsgCount, 0);
UtAssert_INT32_EQ(LC_AppData.RTSExecCount, 0);
@@ -575,14 +575,12 @@ void LC_TableInit_Test_LoadDefaultTables(void)
UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1);
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, LC_CDS_UPDATED_INF_EID);
- UtAssert_STUB_COUNT(LC_ResetCounters, 1); /* HK data is not stale */
UtAssert_STUB_COUNT(LC_ResetResultsWP, 1); /* Result Table is not stale */
UtAssert_STUB_COUNT(LC_ResetResultsAP, 1); /* AP Result Table is not stale */
UtAssert_UINT8_EQ(LC_AppData.CurrentLCState, LC_STATE_POWER_ON_RESET); /* CurrentState reset back to default */
/* Reset SendEvent and don't recover WDT */
UT_ResetState(UT_KEY(CFE_EVS_SendEvent));
- UT_ResetState(UT_KEY(LC_ResetCounters));
UT_ResetState(UT_KEY(LC_ResetResultsWP));
UT_ResetState(UT_KEY(LC_ResetResultsAP));
LC_OperData.TableResults = 0;
@@ -599,14 +597,12 @@ void LC_TableInit_Test_LoadDefaultTables(void)
UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1);
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, LC_CDS_UPDATED_INF_EID);
- UtAssert_STUB_COUNT(LC_ResetCounters, 1); /* HK data is not stale */
UtAssert_STUB_COUNT(LC_ResetResultsWP, 1); /* Result Table is not stale */
UtAssert_STUB_COUNT(LC_ResetResultsAP, 1); /* AP Result Table is not stale */
UtAssert_UINT8_EQ(LC_AppData.CurrentLCState, LC_STATE_POWER_ON_RESET); /* CurrentState reset back to default */
/* Reset all states and only restore WRT and ART CDS */
UT_ResetState(0);
- UT_ResetState(UT_KEY(LC_ResetCounters));
UT_ResetState(UT_KEY(LC_ResetResultsWP));
UT_ResetState(UT_KEY(LC_ResetResultsAP));
LC_AppData.CurrentLCState = 0x99;
@@ -626,14 +622,12 @@ void LC_TableInit_Test_LoadDefaultTables(void)
UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1);
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, LC_CDS_UPDATED_INF_EID);
- UtAssert_STUB_COUNT(LC_ResetCounters, 1); /* HK data is not stale */
UtAssert_STUB_COUNT(LC_ResetResultsWP, 1); /* Result Table is not stale */
UtAssert_STUB_COUNT(LC_ResetResultsAP, 1); /* AP Result Table is not stale */
UtAssert_UINT8_EQ(LC_AppData.CurrentLCState, LC_STATE_POWER_ON_RESET); /* CurrentState reset back to default */
/* Reset all states and only restore WRT */
UT_ResetState(0);
- UT_ResetState(UT_KEY(LC_ResetCounters));
UT_ResetState(UT_KEY(LC_ResetResultsWP));
UT_ResetState(UT_KEY(LC_ResetResultsAP));
LC_AppData.CurrentLCState = 0x99;
@@ -652,7 +646,6 @@ void LC_TableInit_Test_LoadDefaultTables(void)
UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1);
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, LC_CDS_UPDATED_INF_EID);
- UtAssert_STUB_COUNT(LC_ResetCounters, 1); /* HK data is not stale */
UtAssert_STUB_COUNT(LC_ResetResultsWP, 1); /* Result Table is not stale */
UtAssert_STUB_COUNT(LC_ResetResultsAP, 1); /* AP Result Table is not stale */
UtAssert_UINT8_EQ(LC_AppData.CurrentLCState, LC_STATE_POWER_ON_RESET); /* CurrentState reset back to default */
diff --git a/unit-test/lc_cmds_tests.c b/unit-test/lc_cmds_tests.c
index 1ce0b70..0002613 100644
--- a/unit-test/lc_cmds_tests.c
+++ b/unit-test/lc_cmds_tests.c
@@ -50,7 +50,7 @@ void LC_SampleAPReq_Test_StateDisabled(void)
{
LC_AppData.CurrentLCState = LC_STATE_DISABLED;
- LC_SampleAPReq(&UT_CmdBuf.Buf);
+ LC_SampleAPReq((LC_SampleAPCmd_t *)&UT_CmdBuf.Buf);
}
void LC_SampleAPReq_Test_AllowSampleAllWatchStale(void)
@@ -69,7 +69,7 @@ void LC_SampleAPReq_Test_AllowSampleAllWatchStale(void)
LC_OperData.WRTPtr[0].CountdownToStale = 1;
/* Execute the function being tested */
- LC_SampleAPReq(&UT_CmdBuf.Buf);
+ LC_SampleAPReq((LC_SampleAPCmd_t *)&UT_CmdBuf.Buf);
/* Verify results */
UtAssert_True(LC_OperData.WRTPtr[0].WatchResult == LC_WATCH_STALE,
@@ -94,7 +94,7 @@ void LC_SampleAPReq_Test_AllowSampleAllWatchNotStale(void)
LC_OperData.WRTPtr[0].CountdownToStale = 2;
/* Execute the function being tested */
- LC_SampleAPReq(&UT_CmdBuf.Buf);
+ LC_SampleAPReq((LC_SampleAPCmd_t *)&UT_CmdBuf.Buf);
/* Verify results */
call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent));
@@ -116,7 +116,7 @@ void LC_SampleAPReq_Test_StartLessOrEqualToEndAndEndWithinArrayWatchStale(void)
LC_OperData.WRTPtr[0].CountdownToStale = 1;
/* Execute the function being tested */
- LC_SampleAPReq(&UT_CmdBuf.Buf);
+ LC_SampleAPReq((LC_SampleAPCmd_t *)&UT_CmdBuf.Buf);
/* Verify results */
UtAssert_True(LC_OperData.WRTPtr[0].WatchResult == LC_WATCH_STALE,
@@ -145,7 +145,7 @@ void LC_SampleAPReq_Test_ArrayIndexOutOfRange(void)
"Sample AP error: invalid AP number, start = %%d, end = %%d");
/* Execute the function being tested */
- LC_SampleAPReq(&UT_CmdBuf.Buf);
+ LC_SampleAPReq((LC_SampleAPCmd_t *)&UT_CmdBuf.Buf);
/* Verify results */
call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent));
@@ -179,7 +179,7 @@ void LC_SampleAPReq_Test_BadSampleAllArgs(void)
LC_OperData.WRTPtr[0].CountdownToStale = 1;
/* Execute the function being tested */
- LC_SampleAPReq(&UT_CmdBuf.Buf);
+ LC_SampleAPReq((LC_SampleAPCmd_t *)&UT_CmdBuf.Buf);
call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent));
UtAssert_INT32_EQ(call_count_CFE_EVS_SendEvent, 1);
@@ -212,7 +212,7 @@ void LC_SampleAPReq_Test_ArrayEndIndexTooHigh(void)
LC_OperData.WRTPtr[0].CountdownToStale = 1;
/* Execute the function being tested */
- LC_SampleAPReq(&UT_CmdBuf.Buf);
+ LC_SampleAPReq((LC_SampleAPCmd_t *)&UT_CmdBuf.Buf);
call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent));
UtAssert_INT32_EQ(call_count_CFE_EVS_SendEvent, 1);
@@ -239,7 +239,7 @@ void LC_SampleAPReq_Test_SampleAllUpdateAgeZero(void)
LC_OperData.WRTPtr[0].CountdownToStale = 1;
/* Execute the function being tested */
- LC_SampleAPReq(&UT_CmdBuf.Buf);
+ LC_SampleAPReq((LC_SampleAPCmd_t *)&UT_CmdBuf.Buf);
/* Verify results */
@@ -268,7 +268,7 @@ void LC_SendHkCmd_Test_WatchStale(void)
UT_SetDefaultReturnValue(UT_KEY(CFE_TBL_GetAddress), CFE_SUCCESS);
/* Execute the function being tested */
- Result = LC_SendHkCmd(&UT_CmdBuf.SendHkCmd);
+ Result = LC_SendHkCmd((LC_SendHkCmd_t *)&UT_CmdBuf.SendHkCmd);
/* Verify results */
UtAssert_True(Result == CFE_SUCCESS, "Result == CFE_SUCCESS");
@@ -318,7 +318,7 @@ void LC_SendHkCmd_Test_WatchFalse(void)
UT_SetDefaultReturnValue(UT_KEY(CFE_TBL_GetAddress), CFE_SUCCESS);
/* Execute the function being tested */
- Result = LC_SendHkCmd(&UT_CmdBuf.SendHkCmd);
+ Result = LC_SendHkCmd((LC_SendHkCmd_t *)&UT_CmdBuf.SendHkCmd);
/* Verify results */
UtAssert_True(Result == CFE_SUCCESS, "Result == CFE_SUCCESS");
@@ -368,7 +368,7 @@ void LC_SendHkCmd_Test_WatchTrue(void)
UT_SetDefaultReturnValue(UT_KEY(CFE_TBL_GetAddress), CFE_SUCCESS);
/* Execute the function being tested */
- Result = LC_SendHkCmd(&UT_CmdBuf.SendHkCmd);
+ Result = LC_SendHkCmd((LC_SendHkCmd_t *)&UT_CmdBuf.SendHkCmd);
/* Verify results */
UtAssert_True(Result == CFE_SUCCESS, "Result == CFE_SUCCESS");
@@ -419,7 +419,7 @@ void LC_SendHkCmd_Test_WatchError(void)
UT_SetDefaultReturnValue(UT_KEY(CFE_TBL_GetAddress), CFE_SUCCESS);
/* Execute the function being tested */
- Result = LC_SendHkCmd(&UT_CmdBuf.SendHkCmd);
+ Result = LC_SendHkCmd((LC_SendHkCmd_t *)&UT_CmdBuf.SendHkCmd);
/* Verify results */
UtAssert_True(Result == CFE_SUCCESS, "Result == CFE_SUCCESS");
@@ -469,7 +469,7 @@ void LC_SendHkCmd_Test_DefaultWatchResult(void)
UT_SetDefaultReturnValue(UT_KEY(CFE_TBL_GetAddress), CFE_SUCCESS);
/* Execute the function being tested */
- Result = LC_SendHkCmd(&UT_CmdBuf.SendHkCmd);
+ Result = LC_SendHkCmd((LC_SendHkCmd_t *)&UT_CmdBuf.SendHkCmd);
/* Verify results */
UtAssert_True(Result == CFE_SUCCESS, "Result == CFE_SUCCESS");
@@ -520,7 +520,7 @@ void LC_SendHkCmd_Test_ActionNotUsedStale(void)
UT_SetDefaultReturnValue(UT_KEY(CFE_TBL_GetAddress), CFE_SUCCESS);
/* Execute the function being tested */
- Result = LC_SendHkCmd(&UT_CmdBuf.SendHkCmd);
+ Result = LC_SendHkCmd((LC_SendHkCmd_t *)&UT_CmdBuf.SendHkCmd);
/* Verify results */
UtAssert_True(Result == CFE_SUCCESS, "Result == CFE_SUCCESS");
@@ -571,7 +571,7 @@ void LC_SendHkCmd_Test_APStateActiveActionPass(void)
UT_SetDefaultReturnValue(UT_KEY(CFE_TBL_GetAddress), CFE_SUCCESS);
/* Execute the function being tested */
- Result = LC_SendHkCmd(&UT_CmdBuf.SendHkCmd);
+ Result = LC_SendHkCmd((LC_SendHkCmd_t *)&UT_CmdBuf.SendHkCmd);
/* Verify results */
UtAssert_True(Result == CFE_SUCCESS, "Result == CFE_SUCCESS");
@@ -624,7 +624,7 @@ void LC_SendHkCmd_Test_APStatePassiveActionFail(void)
UT_SetDefaultReturnValue(UT_KEY(CFE_TBL_GetAddress), CFE_SUCCESS);
/* Execute the function being tested */
- Result = LC_SendHkCmd(&UT_CmdBuf.SendHkCmd);
+ Result = LC_SendHkCmd((LC_SendHkCmd_t *)&UT_CmdBuf.SendHkCmd);
/* Verify results */
UtAssert_True(Result == CFE_SUCCESS, "Result == CFE_SUCCESS");
@@ -675,7 +675,7 @@ void LC_SendHkCmd_Test_APStateDisabledActionError(void)
UT_SetDefaultReturnValue(UT_KEY(CFE_TBL_GetAddress), CFE_SUCCESS);
/* Execute the function being tested */
- Result = LC_SendHkCmd(&UT_CmdBuf.SendHkCmd);
+ Result = LC_SendHkCmd((LC_SendHkCmd_t *)&UT_CmdBuf.SendHkCmd);
/* Verify results */
UtAssert_True(Result == CFE_SUCCESS, "Result == CFE_SUCCESS");
@@ -726,7 +726,7 @@ void LC_SendHkCmd_Test_APStatePermOffActionError(void)
UT_SetDefaultReturnValue(UT_KEY(CFE_TBL_GetAddress), CFE_SUCCESS);
/* Execute the function being tested */
- Result = LC_SendHkCmd(&UT_CmdBuf.SendHkCmd);
+ Result = LC_SendHkCmd((LC_SendHkCmd_t *)&UT_CmdBuf.SendHkCmd);
/* Verify results */
UtAssert_True(Result == CFE_SUCCESS, "Result == CFE_SUCCESS");
@@ -777,7 +777,7 @@ void LC_SendHkCmd_Test_DefaultCurrentStateAndActionResult(void)
UT_SetDefaultReturnValue(UT_KEY(CFE_TBL_GetAddress), CFE_SUCCESS);
/* Execute the function being tested */
- Result = LC_SendHkCmd(&UT_CmdBuf.SendHkCmd);
+ Result = LC_SendHkCmd((LC_SendHkCmd_t *)&UT_CmdBuf.SendHkCmd);
/* Verify results */
UtAssert_True(Result == CFE_SUCCESS, "Result == CFE_SUCCESS");
@@ -820,7 +820,7 @@ void LC_SendHkCmd_Test_ManageTablesError(void)
UT_SetDefaultReturnValue(UT_KEY(CFE_TBL_GetAddress), -1);
/* Execute the function being tested */
- Result = LC_SendHkCmd(&UT_CmdBuf.SendHkCmd);
+ Result = LC_SendHkCmd((LC_SendHkCmd_t *)&UT_CmdBuf.SendHkCmd);
/* Verify results */
UtAssert_True(Result == -1, "Result == -1");
@@ -831,25 +831,18 @@ void LC_SendHkCmd_Test_ManageTablesError(void)
void LC_NoopCmd_Test(void)
{
- LC_AppData.CmdCount = 1;
+ LC_AppData.CommandCounter = 1;
LC_NoopCmd(&UT_CmdBuf.NoopCmd);
- UtAssert_UINT8_EQ(LC_AppData.CmdCount, 2);
+ UtAssert_UINT8_EQ(LC_AppData.CommandCounter, 2);
UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1);
}
void LC_ResetCountersCmd_Test(void)
{
- LC_ResetCountersCmd(&UT_CmdBuf.ResetCountersCmd);
-
- UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 1);
-}
-
-void LC_ResetCounters_Test(void)
-{
- LC_AppData.CmdCount = 1;
- LC_AppData.CmdErrCount = 2;
+ LC_AppData.CommandCounter = 1;
+ LC_AppData.CommandErrCounter = 2;
LC_AppData.APSampleCount = 3;
LC_AppData.MonitoredMsgCount = 4;
@@ -857,18 +850,18 @@ void LC_ResetCounters_Test(void)
LC_AppData.PassiveRTSExecCount = 6;
/* Execute the function being tested */
- LC_ResetCounters();
+ LC_ResetCountersCmd(&UT_CmdBuf.ResetCountersCmd);
/* Verify results */
- UtAssert_True(LC_AppData.CmdCount == 0, "LC_AppData.CmdCount == 0");
- UtAssert_True(LC_AppData.CmdErrCount == 0, "LC_AppData.CmdErrCount == 0");
+ UtAssert_True(LC_AppData.CommandCounter == 0, "LC_AppData.CommandCounter == 0");
+ UtAssert_True(LC_AppData.CommandErrCounter == 0, "LC_AppData.CommandErrCounter == 0");
UtAssert_True(LC_AppData.APSampleCount == 0, "LC_AppData.APSampleCount == 0");
UtAssert_True(LC_AppData.MonitoredMsgCount == 0, "LC_AppData.MonitoredMsgCount == 0");
UtAssert_True(LC_AppData.RTSExecCount == 0, "LC_AppData.RTSExecCount == 0");
UtAssert_True(LC_AppData.PassiveRTSExecCount == 0, "LC_AppData.PassiveRTSExecCount == 0");
call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent));
- UtAssert_INT32_EQ(call_count_CFE_EVS_SendEvent, 0);
+ UtAssert_INT32_EQ(call_count_CFE_EVS_SendEvent, 1);
}
void LC_SetLCStateCmd_Test_Active(void)
@@ -890,7 +883,7 @@ void LC_SetLCStateCmd_Test_Active(void)
/* Verify results */
UtAssert_True(LC_AppData.CurrentLCState == LC_STATE_ACTIVE, "LC_AppData.CurrentLCState == LC_STATE_ACTIVE");
- UtAssert_True(LC_AppData.CmdCount == 1, "LC_AppData.CmdCount == 1");
+ UtAssert_True(LC_AppData.CommandCounter == 1, "LC_AppData.CommandCounter == 1");
call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent));
UtAssert_INT32_EQ(call_count_CFE_EVS_SendEvent, 1);
@@ -921,7 +914,7 @@ void LC_SetLCStateCmd_Test_Passive(void)
/* Verify results */
UtAssert_True(LC_AppData.CurrentLCState == LC_STATE_PASSIVE, "LC_AppData.CurrentLCState == LC_STATE_PASSIVE");
- UtAssert_True(LC_AppData.CmdCount == 1, "LC_AppData.CmdCount == 1");
+ UtAssert_True(LC_AppData.CommandCounter == 1, "LC_AppData.CommandCounter == 1");
call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent));
UtAssert_INT32_EQ(call_count_CFE_EVS_SendEvent, 1);
@@ -952,7 +945,7 @@ void LC_SetLCStateCmd_Test_Disabled(void)
/* Verify results */
UtAssert_True(LC_AppData.CurrentLCState == LC_STATE_DISABLED, "LC_AppData.CurrentLCState == LC_STATE_DISABLED");
- UtAssert_True(LC_AppData.CmdCount == 1, "LC_AppData.CmdCount == 1");
+ UtAssert_True(LC_AppData.CommandCounter == 1, "LC_AppData.CommandCounter == 1");
call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent));
UtAssert_INT32_EQ(call_count_CFE_EVS_SendEvent, 1);
@@ -982,7 +975,7 @@ void LC_SetLCStateCmd_Test_Default(void)
LC_SetLCStateCmd(&UT_CmdBuf.SetLCStateCmd);
/* Verify results */
- UtAssert_True(LC_AppData.CmdErrCount == 1, "LC_AppData.CmdErrCount == 1");
+ UtAssert_True(LC_AppData.CommandErrCounter == 1, "LC_AppData.CommandErrCounter == 1");
call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent));
UtAssert_INT32_EQ(call_count_CFE_EVS_SendEvent, 1);
@@ -1015,7 +1008,7 @@ void LC_SetAPStateCmd_Test_Default(void)
LC_SetAPStateCmd(&UT_CmdBuf.SetAPStateCmd);
/* Verify results */
- UtAssert_True(LC_AppData.CmdErrCount == 1, "LC_AppData.CmdErrCount == 1");
+ UtAssert_True(LC_AppData.CommandErrCounter == 1, "LC_AppData.CommandErrCounter == 1");
call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent));
UtAssert_INT32_EQ(call_count_CFE_EVS_SendEvent, 1);
@@ -1461,7 +1454,7 @@ void LC_SetAPStateCmd_Test_InvalidCurrentAPStateActive(void)
LC_SetAPStateCmd(&UT_CmdBuf.SetAPStateCmd);
/* Verify results */
- UtAssert_True(LC_AppData.CmdErrCount == 1, "LC_AppData.CmdErrCount == 1");
+ UtAssert_True(LC_AppData.CommandErrCounter == 1, "LC_AppData.CommandErrCounter == 1");
call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent));
UtAssert_INT32_EQ(call_count_CFE_EVS_SendEvent, 1);
@@ -1496,7 +1489,7 @@ void LC_SetAPStateCmd_Test_InvalidCurrentAPStatePassive(void)
LC_SetAPStateCmd(&UT_CmdBuf.SetAPStateCmd);
/* Verify results */
- UtAssert_True(LC_AppData.CmdErrCount == 1, "LC_AppData.CmdErrCount == 1");
+ UtAssert_True(LC_AppData.CommandErrCounter == 1, "LC_AppData.CommandErrCounter == 1");
call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent));
UtAssert_INT32_EQ(call_count_CFE_EVS_SendEvent, 1);
@@ -1531,7 +1524,7 @@ void LC_SetAPStateCmd_Test_InvalidCurrentAPStateDisabled(void)
LC_SetAPStateCmd(&UT_CmdBuf.SetAPStateCmd);
/* Verify results */
- UtAssert_True(LC_AppData.CmdErrCount == 1, "LC_AppData.CmdErrCount == 1");
+ UtAssert_True(LC_AppData.CommandErrCounter == 1, "LC_AppData.CommandErrCounter == 1");
call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent));
UtAssert_INT32_EQ(call_count_CFE_EVS_SendEvent, 1);
@@ -1563,7 +1556,7 @@ void LC_SetAPStateCmd_Test_InvalidAPNumberActive(void)
LC_SetAPStateCmd(&UT_CmdBuf.SetAPStateCmd);
/* Verify results */
- UtAssert_True(LC_AppData.CmdErrCount == 1, "LC_AppData.CmdErrCount == 1");
+ UtAssert_True(LC_AppData.CommandErrCounter == 1, "LC_AppData.CommandErrCounter == 1");
call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent));
UtAssert_INT32_EQ(call_count_CFE_EVS_SendEvent, 1);
@@ -1594,7 +1587,7 @@ void LC_SetAPStateCmd_Test_InvalidAPNumberPassive(void)
LC_SetAPStateCmd(&UT_CmdBuf.SetAPStateCmd);
/* Verify results */
- UtAssert_True(LC_AppData.CmdErrCount == 1, "LC_AppData.CmdErrCount == 1");
+ UtAssert_True(LC_AppData.CommandErrCounter == 1, "LC_AppData.CommandErrCounter == 1");
call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent));
UtAssert_INT32_EQ(call_count_CFE_EVS_SendEvent, 1);
@@ -1624,7 +1617,7 @@ void LC_SetAPStateCmd_Test_InvalidAPNumberDisabled(void)
LC_SetAPStateCmd(&UT_CmdBuf.SetAPStateCmd);
/* Verify results */
- UtAssert_True(LC_AppData.CmdErrCount == 1, "LC_AppData.CmdErrCount == 1");
+ UtAssert_True(LC_AppData.CommandErrCounter == 1, "LC_AppData.CommandErrCounter == 1");
call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent));
UtAssert_INT32_EQ(call_count_CFE_EVS_SendEvent, 1);
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, LC_APSTATE_APNUM_ERR_EID);
@@ -1636,10 +1629,10 @@ void LC_SetAPStateCmd_Test_InvalidAPNumberDisabled(void)
void LC_SetAPPermOffCmd_Test_InvalidAPNumberMaxActionpoints(void)
{
- CFE_SB_MsgId_t TestMsgId;
- LC_SetAPPermOff_Payload_t *PayloadPtr = &UT_CmdBuf.SetAPPermOffCmd.Payload;
- int32 strCmpResult;
- char ExpectedEventString[CFE_MISSION_EVS_MAX_MESSAGE_LENGTH];
+ CFE_SB_MsgId_t TestMsgId;
+ LC_APNumber_Payload_t *PayloadPtr = &UT_CmdBuf.SetAPPermOffCmd.Payload;
+ int32 strCmpResult;
+ char ExpectedEventString[CFE_MISSION_EVS_MAX_MESSAGE_LENGTH];
TestMsgId = CFE_SB_ValueToMsgId(LC_CMD_MID);
UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &TestMsgId, sizeof(TestMsgId), false);
@@ -1652,7 +1645,7 @@ void LC_SetAPPermOffCmd_Test_InvalidAPNumberMaxActionpoints(void)
LC_SetAPPermOffCmd(&UT_CmdBuf.SetAPPermOffCmd);
/* Verify results */
- UtAssert_True(LC_AppData.CmdErrCount == 1, "LC_AppData.CmdErrCount == 1");
+ UtAssert_True(LC_AppData.CommandErrCounter == 1, "LC_AppData.CommandErrCounter == 1");
call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent));
UtAssert_INT32_EQ(call_count_CFE_EVS_SendEvent, 1);
@@ -1665,10 +1658,10 @@ void LC_SetAPPermOffCmd_Test_InvalidAPNumberMaxActionpoints(void)
void LC_SetAPPermOffCmd_Test_InvalidAPNumberAllActionpoints(void)
{
- CFE_SB_MsgId_t TestMsgId;
- LC_SetAPPermOff_Payload_t *PayloadPtr = &UT_CmdBuf.SetAPPermOffCmd.Payload;
- int32 strCmpResult;
- char ExpectedEventString[CFE_MISSION_EVS_MAX_MESSAGE_LENGTH];
+ CFE_SB_MsgId_t TestMsgId;
+ LC_APNumber_Payload_t *PayloadPtr = &UT_CmdBuf.SetAPPermOffCmd.Payload;
+ int32 strCmpResult;
+ char ExpectedEventString[CFE_MISSION_EVS_MAX_MESSAGE_LENGTH];
TestMsgId = CFE_SB_ValueToMsgId(LC_CMD_MID);
UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &TestMsgId, sizeof(TestMsgId), false);
@@ -1681,7 +1674,7 @@ void LC_SetAPPermOffCmd_Test_InvalidAPNumberAllActionpoints(void)
LC_SetAPPermOffCmd(&UT_CmdBuf.SetAPPermOffCmd);
/* Verify results */
- UtAssert_True(LC_AppData.CmdErrCount == 1, "LC_AppData.CmdErrCount == 1");
+ UtAssert_True(LC_AppData.CommandErrCounter == 1, "LC_AppData.CommandErrCounter == 1");
call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent));
UtAssert_INT32_EQ(call_count_CFE_EVS_SendEvent, 1);
@@ -1694,10 +1687,10 @@ void LC_SetAPPermOffCmd_Test_InvalidAPNumberAllActionpoints(void)
void LC_SetAPPermOffCmd_Test_APNotDisabled(void)
{
- CFE_SB_MsgId_t TestMsgId;
- LC_SetAPPermOff_Payload_t *PayloadPtr = &UT_CmdBuf.SetAPPermOffCmd.Payload;
- int32 strCmpResult;
- char ExpectedEventString[CFE_MISSION_EVS_MAX_MESSAGE_LENGTH];
+ CFE_SB_MsgId_t TestMsgId;
+ LC_APNumber_Payload_t *PayloadPtr = &UT_CmdBuf.SetAPPermOffCmd.Payload;
+ int32 strCmpResult;
+ char ExpectedEventString[CFE_MISSION_EVS_MAX_MESSAGE_LENGTH];
TestMsgId = CFE_SB_ValueToMsgId(LC_CMD_MID);
UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &TestMsgId, sizeof(TestMsgId), false);
@@ -1714,7 +1707,7 @@ void LC_SetAPPermOffCmd_Test_APNotDisabled(void)
LC_SetAPPermOffCmd(&UT_CmdBuf.SetAPPermOffCmd);
/* Verify results */
- UtAssert_True(LC_AppData.CmdErrCount == 1, "LC_AppData.CmdErrCount == 1");
+ UtAssert_True(LC_AppData.CommandErrCounter == 1, "LC_AppData.CommandErrCounter == 1");
call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent));
UtAssert_INT32_EQ(call_count_CFE_EVS_SendEvent, 1);
@@ -1727,10 +1720,10 @@ void LC_SetAPPermOffCmd_Test_APNotDisabled(void)
void LC_SetAPPermOffCmd_Test_Nominal(void)
{
- CFE_SB_MsgId_t TestMsgId;
- LC_SetAPPermOff_Payload_t *PayloadPtr = &UT_CmdBuf.SetAPPermOffCmd.Payload;
- int32 strCmpResult;
- char ExpectedEventString[CFE_MISSION_EVS_MAX_MESSAGE_LENGTH];
+ CFE_SB_MsgId_t TestMsgId;
+ LC_APNumber_Payload_t *PayloadPtr = &UT_CmdBuf.SetAPPermOffCmd.Payload;
+ int32 strCmpResult;
+ char ExpectedEventString[CFE_MISSION_EVS_MAX_MESSAGE_LENGTH];
TestMsgId = CFE_SB_ValueToMsgId(LC_CMD_MID);
UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &TestMsgId, sizeof(TestMsgId), false);
@@ -1747,7 +1740,7 @@ void LC_SetAPPermOffCmd_Test_Nominal(void)
/* Verify results */
UtAssert_True(LC_OperData.ARTPtr[PayloadPtr->APNumber].CurrentState == 4,
"LC_OperData.ARTPtr[PayloadPtr->APNumber].CurrentState == 4");
- UtAssert_True(LC_AppData.CmdCount == 1, "LC_AppData.CmdCount == 1");
+ UtAssert_True(LC_AppData.CommandCounter == 1, "LC_AppData.CommandCounter == 1");
call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent));
UtAssert_INT32_EQ(call_count_CFE_EVS_SendEvent, 1);
@@ -1760,10 +1753,10 @@ void LC_SetAPPermOffCmd_Test_Nominal(void)
void LC_ResetAPStatsCmd_Test_AllActionPoints(void)
{
- CFE_SB_MsgId_t TestMsgId;
- LC_ResetAPStats_Payload_t *PayloadPtr = &UT_CmdBuf.ResetAPStatsCmd.Payload;
- int32 strCmpResult;
- char ExpectedEventString[CFE_MISSION_EVS_MAX_MESSAGE_LENGTH];
+ CFE_SB_MsgId_t TestMsgId;
+ LC_APNumber_Payload_t *PayloadPtr = &UT_CmdBuf.ResetAPStatsCmd.Payload;
+ int32 strCmpResult;
+ char ExpectedEventString[CFE_MISSION_EVS_MAX_MESSAGE_LENGTH];
TestMsgId = CFE_SB_ValueToMsgId(LC_CMD_MID);
UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &TestMsgId, sizeof(TestMsgId), false);
@@ -1776,7 +1769,7 @@ void LC_ResetAPStatsCmd_Test_AllActionPoints(void)
LC_ResetAPStatsCmd(&UT_CmdBuf.ResetAPStatsCmd);
/* Verify results */
- UtAssert_True(LC_AppData.CmdCount == 1, "LC_AppData.CmdCount == 1");
+ UtAssert_True(LC_AppData.CommandCounter == 1, "LC_AppData.CommandCounter == 1");
call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent));
UtAssert_INT32_EQ(call_count_CFE_EVS_SendEvent, 1);
@@ -1789,10 +1782,10 @@ void LC_ResetAPStatsCmd_Test_AllActionPoints(void)
void LC_ResetAPStatsCmd_Test_SingleActionPoint(void)
{
- CFE_SB_MsgId_t TestMsgId;
- LC_ResetAPStats_Payload_t *PayloadPtr = &UT_CmdBuf.ResetAPStatsCmd.Payload;
- int32 strCmpResult;
- char ExpectedEventString[CFE_MISSION_EVS_MAX_MESSAGE_LENGTH];
+ CFE_SB_MsgId_t TestMsgId;
+ LC_APNumber_Payload_t *PayloadPtr = &UT_CmdBuf.ResetAPStatsCmd.Payload;
+ int32 strCmpResult;
+ char ExpectedEventString[CFE_MISSION_EVS_MAX_MESSAGE_LENGTH];
TestMsgId = CFE_SB_ValueToMsgId(LC_CMD_MID);
UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &TestMsgId, sizeof(TestMsgId), false);
@@ -1805,7 +1798,7 @@ void LC_ResetAPStatsCmd_Test_SingleActionPoint(void)
LC_ResetAPStatsCmd(&UT_CmdBuf.ResetAPStatsCmd);
/* Verify results */
- UtAssert_True(LC_AppData.CmdCount == 1, "LC_AppData.CmdCount == 1");
+ UtAssert_True(LC_AppData.CommandCounter == 1, "LC_AppData.CommandCounter == 1");
call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent));
UtAssert_INT32_EQ(call_count_CFE_EVS_SendEvent, 1);
@@ -1818,10 +1811,10 @@ void LC_ResetAPStatsCmd_Test_SingleActionPoint(void)
void LC_ResetAPStatsCmd_Test_InvalidAPNumber(void)
{
- CFE_SB_MsgId_t TestMsgId;
- LC_ResetAPStats_Payload_t *PayloadPtr = &UT_CmdBuf.ResetAPStatsCmd.Payload;
- int32 strCmpResult;
- char ExpectedEventString[CFE_MISSION_EVS_MAX_MESSAGE_LENGTH];
+ CFE_SB_MsgId_t TestMsgId;
+ LC_APNumber_Payload_t *PayloadPtr = &UT_CmdBuf.ResetAPStatsCmd.Payload;
+ int32 strCmpResult;
+ char ExpectedEventString[CFE_MISSION_EVS_MAX_MESSAGE_LENGTH];
TestMsgId = CFE_SB_ValueToMsgId(LC_CMD_MID);
UT_SetDataBuffer(UT_KEY(CFE_MSG_GetMsgId), &TestMsgId, sizeof(TestMsgId), false);
@@ -1834,7 +1827,7 @@ void LC_ResetAPStatsCmd_Test_InvalidAPNumber(void)
LC_ResetAPStatsCmd(&UT_CmdBuf.ResetAPStatsCmd);
/* Verify results */
- UtAssert_True(LC_AppData.CmdErrCount == 1, "LC_AppData.CmdErrCount == 1");
+ UtAssert_True(LC_AppData.CommandErrCounter == 1, "LC_AppData.CommandErrCounter == 1");
call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent));
UtAssert_INT32_EQ(call_count_CFE_EVS_SendEvent, 1);
@@ -1964,7 +1957,7 @@ void LC_ResetWPStatsCmd_Test_AllWatchPoints(void)
LC_ResetWPStatsCmd(&UT_CmdBuf.ResetWPStatsCmd);
/* Verify results */
- UtAssert_True(LC_AppData.CmdCount == 1, "LC_AppData.CmdCount == 1");
+ UtAssert_True(LC_AppData.CommandCounter == 1, "LC_AppData.CommandCounter == 1");
call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent));
UtAssert_INT32_EQ(call_count_CFE_EVS_SendEvent, 1);
@@ -1993,7 +1986,7 @@ void LC_ResetWPStatsCmd_Test_SingleWatchPoint(void)
LC_ResetWPStatsCmd(&UT_CmdBuf.ResetWPStatsCmd);
/* Verify results */
- UtAssert_True(LC_AppData.CmdCount == 1, "LC_AppData.CmdCount == 1");
+ UtAssert_True(LC_AppData.CommandCounter == 1, "LC_AppData.CommandCounter == 1");
call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent));
UtAssert_INT32_EQ(call_count_CFE_EVS_SendEvent, 1);
UtAssert_INT32_EQ(context_CFE_EVS_SendEvent[0].EventID, LC_WPSTATS_INF_EID);
@@ -2021,7 +2014,7 @@ void LC_ResetWPStatsCmd_Test_InvalidWPNumber(void)
LC_ResetWPStatsCmd(&UT_CmdBuf.ResetWPStatsCmd);
/* Verify results */
- UtAssert_True(LC_AppData.CmdErrCount == 1, "LC_AppData.CmdErrCount == 1");
+ UtAssert_True(LC_AppData.CommandErrCounter == 1, "LC_AppData.CommandErrCounter == 1");
call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent));
UtAssert_INT32_EQ(call_count_CFE_EVS_SendEvent, 1);
@@ -2233,8 +2226,6 @@ void UtTest_Setup(void)
UtTest_Add(LC_NoopCmd_Test, LC_Test_Setup, LC_Test_TearDown, "LC_NoopCmd_Test");
UtTest_Add(LC_ResetCountersCmd_Test, LC_Test_Setup, LC_Test_TearDown, "LC_ResetCountersCmd_Test");
- UtTest_Add(LC_ResetCounters_Test, LC_Test_Setup, LC_Test_TearDown, "LC_ResetCounters_Test");
-
UtTest_Add(LC_SetLCStateCmd_Test_Active, LC_Test_Setup, LC_Test_TearDown, "LC_SetLCStateCmd_Test_Active");
UtTest_Add(LC_SetLCStateCmd_Test_Passive, LC_Test_Setup, LC_Test_TearDown, "LC_SetLCStateCmd_Test_Passive");
UtTest_Add(LC_SetLCStateCmd_Test_Disabled, LC_Test_Setup, LC_Test_TearDown, "LC_SetLCStateCmd_Test_Disabled");
diff --git a/unit-test/stubs/lc_cmds_stubs.c b/unit-test/stubs/lc_cmds_stubs.c
index 5771cc4..b6047a4 100644
--- a/unit-test/stubs/lc_cmds_stubs.c
+++ b/unit-test/stubs/lc_cmds_stubs.c
@@ -30,11 +30,11 @@
* Generated stub function for LC_NoopCmd()
* ----------------------------------------------------
*/
-CFE_Status_t LC_NoopCmd(const LC_NoopCmd_t *msg)
+CFE_Status_t LC_NoopCmd(const LC_NoopCmd_t *Msg)
{
UT_GenStub_SetupReturnBuffer(LC_NoopCmd, CFE_Status_t);
- UT_GenStub_AddParam(LC_NoopCmd, const LC_NoopCmd_t *, msg);
+ UT_GenStub_AddParam(LC_NoopCmd, const LC_NoopCmd_t *, Msg);
UT_GenStub_Execute(LC_NoopCmd, Basic, NULL);
@@ -46,11 +46,11 @@ CFE_Status_t LC_NoopCmd(const LC_NoopCmd_t *msg)
* Generated stub function for LC_ResetAPStatsCmd()
* ----------------------------------------------------
*/
-CFE_Status_t LC_ResetAPStatsCmd(const LC_ResetAPStatsCmd_t *msg)
+CFE_Status_t LC_ResetAPStatsCmd(const LC_ResetAPStatsCmd_t *Msg)
{
UT_GenStub_SetupReturnBuffer(LC_ResetAPStatsCmd, CFE_Status_t);
- UT_GenStub_AddParam(LC_ResetAPStatsCmd, const LC_ResetAPStatsCmd_t *, msg);
+ UT_GenStub_AddParam(LC_ResetAPStatsCmd, const LC_ResetAPStatsCmd_t *, Msg);
UT_GenStub_Execute(LC_ResetAPStatsCmd, Basic, NULL);
@@ -72,11 +72,11 @@ void LC_ResetCounters(void)
* Generated stub function for LC_ResetCountersCmd()
* ----------------------------------------------------
*/
-CFE_Status_t LC_ResetCountersCmd(const LC_ResetCountersCmd_t *msg)
+CFE_Status_t LC_ResetCountersCmd(const LC_ResetCountersCmd_t *Msg)
{
UT_GenStub_SetupReturnBuffer(LC_ResetCountersCmd, CFE_Status_t);
- UT_GenStub_AddParam(LC_ResetCountersCmd, const LC_ResetCountersCmd_t *, msg);
+ UT_GenStub_AddParam(LC_ResetCountersCmd, const LC_ResetCountersCmd_t *, Msg);
UT_GenStub_Execute(LC_ResetCountersCmd, Basic, NULL);
@@ -116,11 +116,11 @@ void LC_ResetResultsWP(uint32 StartIndex, uint32 EndIndex, bool ResetStatsCmd)
* Generated stub function for LC_ResetWPStatsCmd()
* ----------------------------------------------------
*/
-CFE_Status_t LC_ResetWPStatsCmd(const LC_ResetWPStatsCmd_t *msg)
+CFE_Status_t LC_ResetWPStatsCmd(const LC_ResetWPStatsCmd_t *Msg)
{
UT_GenStub_SetupReturnBuffer(LC_ResetWPStatsCmd, CFE_Status_t);
- UT_GenStub_AddParam(LC_ResetWPStatsCmd, const LC_ResetWPStatsCmd_t *, msg);
+ UT_GenStub_AddParam(LC_ResetWPStatsCmd, const LC_ResetWPStatsCmd_t *, Msg);
UT_GenStub_Execute(LC_ResetWPStatsCmd, Basic, NULL);
@@ -132,9 +132,9 @@ CFE_Status_t LC_ResetWPStatsCmd(const LC_ResetWPStatsCmd_t *msg)
* Generated stub function for LC_SampleAPReq()
* ----------------------------------------------------
*/
-void LC_SampleAPReq(const CFE_SB_Buffer_t *BufPtr)
+void LC_SampleAPReq(const LC_SampleAPCmd_t *Msg)
{
- UT_GenStub_AddParam(LC_SampleAPReq, const CFE_SB_Buffer_t *, BufPtr);
+ UT_GenStub_AddParam(LC_SampleAPReq, const LC_SampleAPCmd_t *, Msg);
UT_GenStub_Execute(LC_SampleAPReq, Basic, NULL);
}
@@ -144,11 +144,11 @@ void LC_SampleAPReq(const CFE_SB_Buffer_t *BufPtr)
* Generated stub function for LC_SendHkCmd()
* ----------------------------------------------------
*/
-CFE_Status_t LC_SendHkCmd(const LC_SendHkCmd_t *msg)
+CFE_Status_t LC_SendHkCmd(const LC_SendHkCmd_t *Msg)
{
UT_GenStub_SetupReturnBuffer(LC_SendHkCmd, CFE_Status_t);
- UT_GenStub_AddParam(LC_SendHkCmd, const LC_SendHkCmd_t *, msg);
+ UT_GenStub_AddParam(LC_SendHkCmd, const LC_SendHkCmd_t *, Msg);
UT_GenStub_Execute(LC_SendHkCmd, Basic, NULL);
@@ -160,11 +160,11 @@ CFE_Status_t LC_SendHkCmd(const LC_SendHkCmd_t *msg)
* Generated stub function for LC_SetAPPermOffCmd()
* ----------------------------------------------------
*/
-CFE_Status_t LC_SetAPPermOffCmd(const LC_SetAPPermOffCmd_t *msg)
+CFE_Status_t LC_SetAPPermOffCmd(const LC_SetAPPermOffCmd_t *Msg)
{
UT_GenStub_SetupReturnBuffer(LC_SetAPPermOffCmd, CFE_Status_t);
- UT_GenStub_AddParam(LC_SetAPPermOffCmd, const LC_SetAPPermOffCmd_t *, msg);
+ UT_GenStub_AddParam(LC_SetAPPermOffCmd, const LC_SetAPPermOffCmd_t *, Msg);
UT_GenStub_Execute(LC_SetAPPermOffCmd, Basic, NULL);
@@ -176,11 +176,11 @@ CFE_Status_t LC_SetAPPermOffCmd(const LC_SetAPPermOffCmd_t *msg)
* Generated stub function for LC_SetAPStateCmd()
* ----------------------------------------------------
*/
-CFE_Status_t LC_SetAPStateCmd(const LC_SetAPStateCmd_t *msg)
+CFE_Status_t LC_SetAPStateCmd(const LC_SetAPStateCmd_t *Msg)
{
UT_GenStub_SetupReturnBuffer(LC_SetAPStateCmd, CFE_Status_t);
- UT_GenStub_AddParam(LC_SetAPStateCmd, const LC_SetAPStateCmd_t *, msg);
+ UT_GenStub_AddParam(LC_SetAPStateCmd, const LC_SetAPStateCmd_t *, Msg);
UT_GenStub_Execute(LC_SetAPStateCmd, Basic, NULL);
@@ -192,11 +192,11 @@ CFE_Status_t LC_SetAPStateCmd(const LC_SetAPStateCmd_t *msg)
* Generated stub function for LC_SetLCStateCmd()
* ----------------------------------------------------
*/
-CFE_Status_t LC_SetLCStateCmd(const LC_SetLCStateCmd_t *msg)
+CFE_Status_t LC_SetLCStateCmd(const LC_SetLCStateCmd_t *Msg)
{
UT_GenStub_SetupReturnBuffer(LC_SetLCStateCmd, CFE_Status_t);
- UT_GenStub_AddParam(LC_SetLCStateCmd, const LC_SetLCStateCmd_t *, msg);
+ UT_GenStub_AddParam(LC_SetLCStateCmd, const LC_SetLCStateCmd_t *, Msg);
UT_GenStub_Execute(LC_SetLCStateCmd, Basic, NULL);