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 #95, Standardize command responses #96

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ A clear and concise description of what the contribution is.
**Testing performed**
Steps taken to test the contribution:
1. Build steps '...'
1. Execution steps '...'
2. Execution steps '...'

**Expected behavior changes**
A clear and concise description of how this contribution will change behavior and level of impact.
Expand Down
60 changes: 30 additions & 30 deletions fsw/inc/cs_events.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,15 @@
/**
* \brief CS cFE Core Checksum Recompute Started Event ID
*
* \par Type: DEBUG
* \par Type: INFORMATION
*
* \par Cause:
*
* This event message is issued when a recompute baseline
* for the cFE core command has been received and the
* recompute task has been started.
*/
#define CS_RECOMPUTE_CFECORE_STARTED_DBG_EID 14
#define CS_RECOMPUTE_CFECORE_STARTED_INF_EID 14

/**
* \brief CS cFE Core Checksum Failed Child Task Create Event ID
Expand Down Expand Up @@ -230,15 +230,15 @@
/**
* \brief CS OS Code Checksum Recompute Started Event ID
*
* \par Type: DEBUG
* \par Type: INFORMATION
*
* \par Cause:
*
* This event message is issued when a recompute baseline
* for the OS code segment command has been received and the
* recompute task has been started.
*/
#define CS_RECOMPUTE_OS_STARTED_DBG_EID 17
#define CS_RECOMPUTE_OS_STARTED_INF_EID 17

/**
* \brief CS OS Code Checksum Recompute Failed Child Task Create Event ID
Expand Down Expand Up @@ -271,14 +271,14 @@
/**
* \brief CS Oneshot Checksum Started Event ID
*
* \par Type: DEBUG
* \par Type: INFORMATION
*
* \par Cause:
*
* This event message is issued when a OneShot calculation
* command has been received and the OneShot task has been started.
*/
#define CS_ONESHOT_STARTED_DBG_EID 20
#define CS_ONESHOT_STARTED_INF_EID 20

/**
* \brief CS Oneshot Checksum Failed Child Task Create Event ID
Expand Down Expand Up @@ -547,15 +547,15 @@
/**
* \brief CS EEPROM Checksum Recompute Started Event ID
*
* \par Type: DEBUG
* \par Type: INFORMATION
*
* \par Cause:
*
* This event message is issued when a recompute baseline
* for the specified EEPROM Entry ID command has been received and the
* recompute task has been started.
*/
#define CS_RECOMPUTE_EEPROM_STARTED_DBG_EID 42
#define CS_RECOMPUTE_EEPROM_STARTED_INF_EID 42

/**
* \brief CS EEPROM Checksum Recompute Failed Child Task Create Event ID
Expand Down Expand Up @@ -746,15 +746,15 @@
/**
* \brief CS Memory Checksum Recompute Started Event ID
*
* \par Type: DEBUG
* \par Type: INFORMATION
*
* \par Cause:
*
* This event message is issued when a recompute baseline
* for the specified Memory Entry ID command has been received and the
* recompute task has been started.
*/
#define CS_RECOMPUTE_MEMORY_STARTED_DBG_EID 57
#define CS_RECOMPUTE_MEMORY_STARTED_INF_EID 57

/**
* \brief CS Memory Checksum Recompute Failed Child Task Create Event ID
Expand Down Expand Up @@ -947,15 +947,15 @@
/**
* \brief CS Table Checksum Recompute Started Event ID
*
* \par Type: DEBUG
* \par Type: INFORMATION
*
* \par Cause:
*
* This event message is issued when a recompute baseline
* for the specified table command has been received and the
* recompute task has been started.
*/
#define CS_RECOMPUTE_TABLES_STARTED_DBG_EID 72
#define CS_RECOMPUTE_TABLES_STARTED_INF_EID 72

/**
* \brief CS Table Checksum Recompute Failed Child Task Create Event ID
Expand Down Expand Up @@ -1120,15 +1120,15 @@
/**
* \brief CS App Checksum Recompute Started Event ID
*
* \par Type: DEBUG
* \par Type: INFORMATION
*
* \par Cause:
*
* This event message is issued when a recompute baseline
* for the specified app command has been received and the
* recompute task has been started.
*/
#define CS_RECOMPUTE_APP_STARTED_DBG_EID 85
#define CS_RECOMPUTE_APP_STARTED_INF_EID 85

/**
* \brief CS App Checksum Recompute Failed Create Child Task Event ID
Expand Down Expand Up @@ -1657,106 +1657,106 @@
/**
* \brief CS Table Enable Checksum Unable To Find Entry In Definition Table Event ID
*
* \par Type: DEBUG
* \par Type: ERROR
*
* \par Cause:
*
* This event message is issued when CS successfully enables an entry (specified
* by name) in the Tables results table but is unable to find the same entry
* in the definition table (or the entry is marked as #CS_STATE_EMPTY).
*/
#define CS_ENABLE_TABLE_DEF_NOT_FOUND_DBG_EID 129
#define CS_ENABLE_TABLE_DEF_NOT_FOUND_ERR_EID 129

/**
* \brief CS Table Disable Checksum Unable To Find Entry In Definition Table Event ID
*
* \par Type: DEBUG
* \par Type: ERROR
*
* \par Cause:
*
* This event message is issued when CS successfully disables an entry (specified
* by name) in the Tables results table but is unable to find the same entry
* in the definition table (or the entry is marked as #CS_STATE_EMPTY).
*/
#define CS_DISABLE_TABLE_DEF_NOT_FOUND_DBG_EID 130
#define CS_DISABLE_TABLE_DEF_NOT_FOUND_ERR_EID 130

/**
* \brief CS App Enable Checksum Unable To Find Entry In Definition Table Event ID
*
* \par Type: DEBUG
* \par Type: ERROR
*
* \par Cause:
*
* This event message is issued when CS successfully enables an entry (specified
* by name) in the Apps results table but is unable to find the same entry
* in the definition table (or the entry is marked as #CS_STATE_EMPTY).
*/
#define CS_ENABLE_APP_DEF_NOT_FOUND_DBG_EID 131
#define CS_ENABLE_APP_DEF_NOT_FOUND_ERR_EID 131

/**
* \brief CS App Disable Checksum Unable To Find Entry In Definition Table Event ID
*
* \par Type: DEBUG
* \par Type: ERROR
*
* \par Cause:
*
* This event message is issued when CS successfully disables an entry (specified
* by name) in the Apps results table but is unable to find the same entry
* in the definition table (or the entry is marked as #CS_STATE_EMPTY).
*/
#define CS_DISABLE_APP_DEF_NOT_FOUND_DBG_EID 132
#define CS_DISABLE_APP_DEF_NOT_FOUND_ERR_EID 132

/**
* \brief CS Memory Disable Checksum Unable To Find Entry In Definition Table Event ID
*
* \par Type: DEBUG
* \par Type: ERROR
*
* \par Cause:
*
* This event message is issued when CS successfully disables an entry (specified
* by name) in the Memory results table but identifies the corresponding entry in
* the definitions table to be set to #CS_STATE_EMPTY.
*/
#define CS_DISABLE_MEMORY_DEF_EMPTY_DBG_EID 133
#define CS_DISABLE_MEMORY_DEF_EMPTY_ERR_EID 133
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this changed to error, as opposed to info? There were a good handful of others that were also changed to error and I'm not sure why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's been a while mate, but I think it was just based on the issue description which specifically listed those as not complying with the current standard as debug and should be considered an ERROR.


/**
* \brief CS Memory Enable Checksum Unable To Find Entry In Definition Table Event ID
*
* \par Type: DEBUG
* \par Type: ERROR
*
* \par Cause:
*
* This event message is issued when CS successfully enables an entry (specified
* by name) in the Memory results table but identifies the corresponding entry in
* the definitions table to be set to #CS_STATE_EMPTY.
*/
#define CS_ENABLE_MEMORY_DEF_EMPTY_DBG_EID 134
#define CS_ENABLE_MEMORY_DEF_EMPTY_ERR_EID 134

/**
* \brief CS EEPROM Disable Checksum Unable To Find Entry In Definition Table Event ID
*
* \par Type: DEBUG
* \par Type: ERROR
*
* \par Cause:
*
* This event message is issued when CS successfully disables an entry (specified
* by name) in the EEPROM results table but identifies the corresponding entry in
* the definitions table to be set to #CS_STATE_EMPTY.
*/
#define CS_DISABLE_EEPROM_DEF_EMPTY_DBG_EID 135
#define CS_DISABLE_EEPROM_DEF_EMPTY_ERR_EID 135

/**
* \brief CS EEPROM Enable Checksum Unable To Find Entry In Definition Table Event ID
*
* \par Type: DEBUG
* \par Type: ERROR
*
* \par Cause:
*
* This event message is issued when CS successfully enables an entry (specified
* by name) in the EEPROM results table but identifies the corresponding entry in
* the definitions table to be set to #CS_STATE_EMPTY.
*/
#define CS_ENABLE_EEPROM_DEF_EMPTY_DBG_EID 136
#define CS_ENABLE_EEPROM_DEF_EMPTY_ERR_EID 136

/**
* \brief CS Tables Table Validate Failed Duplicate Name Event ID
Expand Down
20 changes: 10 additions & 10 deletions fsw/inc/cs_msgdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@
* Successful execution of this command may be verified with
* the following telemetry:
* - #CS_HkPacket_Payload_t.CmdCounter will increment
* - The #CS_ONESHOT_STARTED_DBG_EID debug event message will be
* - The #CS_ONESHOT_STARTED_INF_EID informational event message will be
* generated when the command is received
* - The CS_ONESHOT_FINISHED_INF_EID informational message will
* be generated when the compuation finishes.
* be generated when the computation finishes.
* - #CS_HkPacket_Payload_t.LastOneShotChecksum will be updated to the new value
*
* \par Error Conditions
Expand Down Expand Up @@ -356,8 +356,8 @@
* Successful execution of this command may be verified with
* the following telemetry:
* - #CS_HkPacket_Payload_t.CmdCounter will increment
* - The #CS_RECOMPUTE_CFECORE_STARTED_DBG_EID debug event message will be
* generated when the command is received
* - The #CS_RECOMPUTE_CFECORE_STARTED_INF_EID informational event message
* will be generated when the command is received
*
* \par Error Conditions
* This command may fail for the following reason(s):
Expand Down Expand Up @@ -495,8 +495,8 @@
* Successful execution of this command may be verified with
* the following telemetry:
* - #CS_HkPacket_Payload_t.CmdCounter will increment
* - The #CS_RECOMPUTE_OS_STARTED_DBG_EID debug event message will be
* generated when the command is received
* - The #CS_RECOMPUTE_OS_STARTED_INF_EID informational event message
* will be generated when the command is received
*
* \par Error Conditions
* This command may fail for the following reason(s):
Expand Down Expand Up @@ -637,7 +637,7 @@
* Successful execution of this command may be verified with
* the following telemetry:
* - #CS_HkPacket_Payload_t.CmdCounter will increment
* - The #CS_RECOMPUTE_EEPROM_STARTED_DBG_EID debug event
* - The #CS_RECOMPUTE_EEPROM_STARTED_INF_EID informational event
* message will be generated when the command is received
* - The #CS_RECOMPUTE_FINISH_EEPROM_MEMORY_INF_EID informational event
* message will be generated when the recompute is finished
Expand Down Expand Up @@ -881,7 +881,7 @@
* Successful execution of this command may be verified with
* the following telemetry:
* - #CS_HkPacket_Payload_t.CmdCounter will increment
* - The #CS_RECOMPUTE_MEMORY_STARTED_DBG_EID debug event
* - The #CS_RECOMPUTE_MEMORY_STARTED_INF_EID informational event
* message will be generated when the command is received
* - The #CS_RECOMPUTE_FINISH_EEPROM_MEMORY_INF_EID informational event
* message will be generated when the recompute is finished
Expand Down Expand Up @@ -1126,7 +1126,7 @@
* Successful execution of this command may be verified with
* the following telemetry:
* - #CS_HkPacket_Payload_t.CmdCounter will increment
* - The #CS_RECOMPUTE_TABLES_STARTED_DBG_EID debug event
* - The #CS_RECOMPUTE_TABLES_STARTED_INF_EID informational event
* message will be generated when the command is received
* - The #CS_RECOMPUTE_FINISH_TABLES_INF_EID informational event
* message will be generated when the recompute is finished.
Expand Down Expand Up @@ -1344,7 +1344,7 @@
* Successful execution of this command may be verified with
* the following telemetry:
* - #CS_HkPacket_Payload_t.CmdCounter will increment
* - The #CS_RECOMPUTE_APP_STARTED_DBG_EID debug event
* - The #CS_RECOMPUTE_APP_STARTED_INF_EID informational event
* message will be generated when the command is received
* - The #CS_RECOMPUTE_FINISH_APP_INF_EID informational event
* message will be generated when the recompute is finished
Expand Down
2 changes: 1 addition & 1 deletion fsw/inc/cs_tbldefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ typedef struct
uint32 ComparisonValue; /**< \brief The Memory Integrity Value */
uint32 ByteOffset; /**< \brief Where a previous unfinished calc left off */
uint32 TempChecksumValue; /**< \brief The unfinished caluculation */
CFE_TBL_Handle_t TblHandle; /**< \brief handle recieved from CFE_TBL */
CFE_TBL_Handle_t TblHandle; /**< \brief handle received from CFE_TBL */
bool IsCSOwner; /**< \brief Is CS the original owner of this table */
bool Filler8; /**< \brief Padding */
char Name[CFE_TBL_MAX_FULL_NAME_LEN]; /**< \brief name of the table */
Expand Down
6 changes: 3 additions & 3 deletions fsw/src/cs_app_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ void CS_RecomputeBaselineAppCmd(const CS_AppNameCmd_t *CmdPtr)
CFE_PLATFORM_ES_DEFAULT_STACK_SIZE, CS_CHILD_TASK_PRIORITY, 0);
if (Status == CFE_SUCCESS)
{
CFE_EVS_SendEvent(CS_RECOMPUTE_APP_STARTED_DBG_EID, CFE_EVS_EventType_DEBUG,
CFE_EVS_SendEvent(CS_RECOMPUTE_APP_STARTED_INF_EID, CFE_EVS_EventType_INFORMATION,
"Recompute baseline of app %s started", Name);
CS_AppData.HkPacket.Payload.CmdCounter++;
}
Expand Down Expand Up @@ -214,7 +214,7 @@ void CS_DisableNameAppCmd(const CS_AppNameCmd_t *CmdPtr)
}
else
{
CFE_EVS_SendEvent(CS_DISABLE_APP_DEF_NOT_FOUND_DBG_EID, CFE_EVS_EventType_DEBUG,
CFE_EVS_SendEvent(CS_DISABLE_APP_DEF_NOT_FOUND_ERR_EID, CFE_EVS_EventType_ERROR,
"CS unable to update apps definition table for entry %s", Name);
}

Expand Down Expand Up @@ -262,7 +262,7 @@ void CS_EnableNameAppCmd(const CS_AppNameCmd_t *CmdPtr)
}
else
{
CFE_EVS_SendEvent(CS_ENABLE_APP_DEF_NOT_FOUND_DBG_EID, CFE_EVS_EventType_DEBUG,
CFE_EVS_SendEvent(CS_ENABLE_APP_DEF_NOT_FOUND_ERR_EID, CFE_EVS_EventType_ERROR,
"CS unable to update apps definition table for entry %s", Name);
}

Expand Down
8 changes: 4 additions & 4 deletions fsw/src/cs_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void CS_ResetCmd(const CS_NoArgsCmd_t *CmdPtr)
CS_AppData.HkPacket.Payload.OSCSErrCounter = 0;
CS_AppData.HkPacket.Payload.PassCounter = 0;

CFE_EVS_SendEvent(CS_RESET_INF_EID, CFE_EVS_EventType_DEBUG, "Reset Counters command recieved");
CFE_EVS_SendEvent(CS_RESET_INF_EID, CFE_EVS_EventType_INFORMATION, "Reset Counters command received");
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down Expand Up @@ -366,7 +366,7 @@ void CS_RecomputeBaselineCfeCoreCmd(const CS_NoArgsCmd_t *CmdPtr)

if (Status == CFE_SUCCESS)
{
CFE_EVS_SendEvent(CS_RECOMPUTE_CFECORE_STARTED_DBG_EID, CFE_EVS_EventType_DEBUG,
CFE_EVS_SendEvent(CS_RECOMPUTE_CFECORE_STARTED_INF_EID, CFE_EVS_EventType_INFORMATION,
"Recompute of cFE core started");
CS_AppData.HkPacket.Payload.CmdCounter++;
}
Expand Down Expand Up @@ -414,7 +414,7 @@ void CS_RecomputeBaselineOSCmd(const CS_NoArgsCmd_t *CmdPtr)
CFE_PLATFORM_ES_DEFAULT_STACK_SIZE, CS_CHILD_TASK_PRIORITY, 0);
if (Status == CFE_SUCCESS)
{
CFE_EVS_SendEvent(CS_RECOMPUTE_OS_STARTED_DBG_EID, CFE_EVS_EventType_DEBUG,
CFE_EVS_SendEvent(CS_RECOMPUTE_OS_STARTED_INF_EID, CFE_EVS_EventType_INFORMATION,
"Recompute of OS code segment started");
CS_AppData.HkPacket.Payload.CmdCounter++;
}
Expand Down Expand Up @@ -476,7 +476,7 @@ void CS_OneShotCmd(const CS_OneShotCmd_t *CmdPtr)
CFE_PLATFORM_ES_DEFAULT_STACK_SIZE, CS_CHILD_TASK_PRIORITY, 0);
if (Status == CFE_SUCCESS)
{
CFE_EVS_SendEvent(CS_ONESHOT_STARTED_DBG_EID, CFE_EVS_EventType_DEBUG,
CFE_EVS_SendEvent(CS_ONESHOT_STARTED_INF_EID, CFE_EVS_EventType_INFORMATION,
"OneShot checksum started on address: 0x%08X, size: %d",
(unsigned int)(CmdPtr->Payload.Address), (int)(CmdPtr->Payload.Size));

Expand Down
Loading
Loading