Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #81, use payload sub-structure #87

Merged
merged 1 commit into from
Apr 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 96 additions & 20 deletions fsw/inc/lc_msg.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,17 @@ typedef struct
CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command Header */
} 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
*
Expand All @@ -86,10 +97,20 @@ typedef struct
{
CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command Header */

uint16 NewLCState; /**< \brief New LC application state */
uint16 Padding; /**< \brief Structure padding */
LC_SetLCState_Payload_t Payload;
} LC_SetLCStateCmd_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 AP (Actionpoint) State Command
*
Expand All @@ -99,65 +120,112 @@ typedef struct
{
CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command Header */

uint16 APNumber; /**< \brief Which actionpoint(s) to change */
uint16 NewAPState; /**< \brief New actionpoint state */
LC_SetAPState_Payload_t Payload;
} LC_SetAPStateCmd_t;

/**
* \brief Set AP (Actionpoint) Permanently Off
* \brief Set AP (Actionpoint) Permanently Off Payload
*
* For command details see #LC_SET_AP_PERM_OFF_CC
*/
typedef struct
{
CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command Header */

uint16 APNumber; /**< \brief Which actionpoint to change */
uint16 Padding; /**< \brief Structure padding */
} LC_SetAPPermOffCmd_t;
} LC_SetAPPermOff_Payload_t;

/**
* \brief Reset AP (Actionpoint) Statistics
* \brief Set AP (Actionpoint) Permanently Off Command
*
* For command details see #LC_RESET_AP_STATS_CC
* For command details see #LC_SET_AP_PERM_OFF_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_ResetAPStatsCmd_t;
} LC_ResetAPStats_Payload_t;

/**
* \brief Reset WP (Watchpoint) Statistics
* \brief Reset AP (Actionpoint) Statistics Command
*
* For command details see #LC_RESET_WP_STATS_CC
* For command details see #LC_RESET_AP_STATS_CC
*/
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_ResetWPStatsCmd_t;
} LC_ResetWPStats_Payload_t;

/**
* \brief Sample AP (Actionpoint) Request
* \brief Reset WP (Watchpoint) Statistics Command
*
* See #LC_SAMPLE_AP_MID
* For command details see #LC_RESET_WP_STATS_CC
*/
typedef struct
{
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 */
} LC_RTSRequest_Payload_t;

/**
* \brief Send Command to Start a Stored Command RTS
*
Expand All @@ -175,7 +243,7 @@ typedef struct
{
CFE_MSG_CommandHeader_t CommandHeader; /**< \brief Command Header */

uint16 RTSId; /**< \brief RTS Id to start */
LC_RTSRequest_Payload_t Payload;
} LC_RTSRequestCmd_t;

/**\}*/
Expand All @@ -186,12 +254,10 @@ typedef struct
*/

/**
* \brief Housekeeping Packet Structure
* \brief Housekeeping Payload Structure
*/
typedef struct
{
CFE_MSG_TelemetryHeader_t TelemetryHeader; /**< \brief Telemetry Header */

uint8 CmdCount; /**< \brief LC Application Command Counter */
uint8 CmdErrCount; /**< \brief LC Application Command Error Counter */
uint8 CurrentLCState; /**< \brief Current LC application operating state */
Expand All @@ -214,6 +280,16 @@ typedef struct
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_HkPacket_t;

/**\}*/
Expand Down
30 changes: 15 additions & 15 deletions fsw/inc/lc_msgdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
* \par Command Verification
* Successful execution of this command may be verified with
* the following telemetry:
* - #LC_HkPacket_t.CmdCount will increment
* - #LC_HkTlm_Payload_t.CmdCount will increment
* - The #LC_NOOP_INF_EID informational event message will be
* generated when the command is received
*
Expand All @@ -142,7 +142,7 @@
* - Command packet length not as expected
*
* \par Evidence of failure may be found in the following telemetry:
* - #LC_HkPacket_t.CmdErrCount will increment
* - #LC_HkTlm_Payload_t.CmdErrCount will increment
* - Error specific event message #LC_LEN_ERR_EID
*
* \par Criticality
Expand All @@ -164,7 +164,7 @@
* \par Command Verification
* Successful execution of this command may be verified with
* the following telemetry:
* - #LC_HkPacket_t.CmdCount will be cleared
* - #LC_HkTlm_Payload_t.CmdCount will be cleared
* - The #LC_RESET_DBG_EID debug event message will be
* generated when the command is executed
*
Expand All @@ -173,7 +173,7 @@
* - Command packet length not as expected
*
* \par Evidence of failure may be found in the following telemetry:
* - #LC_HkPacket_t.CmdErrCount will increment
* - #LC_HkTlm_Payload_t.CmdErrCount will increment
* - Error specific event message #LC_LEN_ERR_EID
*
* \par Criticality
Expand All @@ -195,8 +195,8 @@
* \par Command Verification
* Successful execution of this command may be verified with
* the following telemetry:
* - #LC_HkPacket_t.CmdCount will increment
* - #LC_HkPacket_t.CurrentLCState will be set to the new state
* - #LC_HkTlm_Payload_t.CmdCount 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
*
Expand All @@ -206,7 +206,7 @@
* - Invalid new state specified in command message
*
* \par Evidence of failure may be found in the following telemetry:
* - #LC_HkPacket_t.CmdErrCount will increment
* - #LC_HkTlm_Payload_t.CmdErrCount will increment
* - Error specific event message #LC_LEN_ERR_EID
* - Error specific event message #LC_LCSTATE_ERR_EID
*
Expand All @@ -228,7 +228,7 @@
* \par Command Verification
* Successful execution of this command may be verified with
* the following telemetry:
* - #LC_HkPacket_t.CmdCount will increment
* - #LC_HkTlm_Payload_t.CmdCount will increment
* - The #LC_APSTATE_INF_EID informational event message will be
* generated when the command is executed
*
Expand All @@ -242,7 +242,7 @@
* or #LC_APSTATE_PERMOFF
*
* \par Evidence of failure may be found in the following telemetry:
* - #LC_HkPacket_t.CmdErrCount will increment
* - #LC_HkTlm_Payload_t.CmdErrCount will increment
* - Error specific event message #LC_LEN_ERR_EID
* - Error specific event message #LC_APSTATE_NEW_ERR_EID
* - Error specific event message #LC_APSTATE_APNUM_ERR_EID
Expand All @@ -266,7 +266,7 @@
* \par Command Verification
* Successful execution of this command may be verified with
* the following telemetry:
* - #LC_HkPacket_t.CmdCount will increment
* - #LC_HkTlm_Payload_t.CmdCount will increment
* - The #LC_APOFF_INF_EID informational event message will be
* generated when the command is executed
*
Expand All @@ -278,7 +278,7 @@
* - Actionpoint current state is not #LC_APSTATE_DISABLED
*
* \par Evidence of failure may be found in the following telemetry:
* - #LC_HkPacket_t.CmdErrCount will increment
* - #LC_HkTlm_Payload_t.CmdErrCount will increment
* - Error specific event message #LC_LEN_ERR_EID
* - Error specific event message #LC_APOFF_APNUM_ERR_EID
* - Error specific event message #LC_APOFF_CURR_ERR_EID
Expand All @@ -301,7 +301,7 @@
* \par Command Verification
* Successful execution of this command may be verified with
* the following telemetry:
* - #LC_HkPacket_t.CmdCount will increment
* - #LC_HkTlm_Payload_t.CmdCount will increment
* - The #LC_APSTATS_INF_EID informational event message will be
* generated when the command is executed
*
Expand All @@ -312,7 +312,7 @@
* out of range
*
* \par Evidence of failure may be found in the following telemetry:
* - #LC_HkPacket_t.CmdErrCount will increment
* - #LC_HkTlm_Payload_t.CmdErrCount will increment
* - Error specific event message #LC_LEN_ERR_EID
* - Error specific event message #LC_APSTATS_APNUM_ERR_EID
*
Expand All @@ -335,7 +335,7 @@
* \par Command Verification
* Successful execution of this command may be verified with
* the following telemetry:
* - #LC_HkPacket_t.CmdCount will increment
* - #LC_HkTlm_Payload_t.CmdCount will increment
* - The #LC_WPSTATS_INF_EID informational event message will be
* generated when the command is executed
*
Expand All @@ -346,7 +346,7 @@
* out of range
*
* \par Evidence of failure may be found in the following telemetry:
* - #LC_HkPacket_t.CmdErrCount will increment
* - #LC_HkTlm_Payload_t.CmdErrCount will increment
* - Error specific event message #LC_LEN_ERR_EID
* - Error specific event message #LC_WPSTATS_WPNUM_ERR_EID
*
Expand Down
Loading