Skip to content

Commit

Permalink
Fix nasa#2502, correct name mismatches in ES
Browse files Browse the repository at this point in the history
Corrects cases where ES symbol names did not exactly match expected
conventions.
  • Loading branch information
jphickey committed Jan 25, 2024
1 parent 37f1d28 commit 644baa6
Show file tree
Hide file tree
Showing 11 changed files with 79 additions and 80 deletions.
4 changes: 2 additions & 2 deletions docs/src/cfe_es.dox
Original file line number Diff line number Diff line change
Expand Up @@ -693,13 +693,13 @@
The System Log is an array of bytes that contains back-to-back printf type
messages from applications. The cFE internal applications use this log when
errors are encountered during initialization before the Event Manager is fully
initialized. To view the information the #CFE_ES_WRITE_SYSLOG_CC command must
initialized. To view the information the #CFE_ES_WRITE_SYS_LOG_CC command must
be sent. This command will write the log to a binary file. The path and
filename may be specified in the command. If the filename command field
contains an empty string, the configuration parameter
#CFE_PLATFORM_ES_DEFAULT_SYSLOG_FILE is used to specify the path and filename. Use the
ground system to get the file and display the contents. The
#CFE_ES_CLEAR_SYSLOG_CC is used to clear the System log.
#CFE_ES_CLEAR_SYS_LOG_CC is used to clear the System log.

The size of the System log is defined by the platform configuration parameter
#CFE_PLATFORM_ES_SYSTEM_LOG_SIZE. This log is preserved after a processor reset and
Expand Down
2 changes: 1 addition & 1 deletion modules/core_api/eds/cfe_fs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<Enumeration label="ES_SYSLOG" value="2" shortDescription="Executive Services System Log Type">
<LongDescription>
Executive Services System Log File which is generated in response to a
\link #CFE_ES_WRITE_SYSLOG_CC \ES_WRITESYSLOG2FILE \endlink
\link #CFE_ES_WRITE_SYS_LOG_CC \ES_WRITESYSLOG2FILE \endlink
command.
</LongDescription>
</Enumeration>
Expand Down
20 changes: 10 additions & 10 deletions modules/es/config/default_cfe_es_fcncodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -457,10 +457,10 @@
** This command is not dangerous. However, any previously logged data
** will be lost.
**
** \sa #CFE_ES_WRITE_SYSLOG_CC, #CFE_ES_CLEAR_ER_LOG_CC, #CFE_ES_WRITE_ER_LOG_CC,
** #CFE_ES_OVER_WRITE_SYSLOG_CC
** \sa #CFE_ES_WRITE_SYS_LOG_CC, #CFE_ES_CLEAR_ER_LOG_CC, #CFE_ES_WRITE_ER_LOG_CC,
** #CFE_ES_OVER_WRITE_SYS_LOG_CC
*/
#define CFE_ES_CLEAR_SYSLOG_CC 10
#define CFE_ES_CLEAR_SYS_LOG_CC 10

/** \cfeescmd Writes contents of Executive Services System Log to a File
**
Expand Down Expand Up @@ -500,10 +500,10 @@
** if performed repeatedly without sufficient file management by the
** operator, fill the file system.
**
** \sa #CFE_ES_CLEAR_SYSLOG_CC, #CFE_ES_CLEAR_ER_LOG_CC, #CFE_ES_WRITE_ER_LOG_CC,
** #CFE_ES_OVER_WRITE_SYSLOG_CC
** \sa #CFE_ES_CLEAR_SYS_LOG_CC, #CFE_ES_CLEAR_ER_LOG_CC, #CFE_ES_WRITE_ER_LOG_CC,
** #CFE_ES_OVER_WRITE_SYS_LOG_CC
*/
#define CFE_ES_WRITE_SYSLOG_CC 11
#define CFE_ES_WRITE_SYS_LOG_CC 11

/** \cfeescmd Clears the contents of the Exception and Reset Log
**
Expand Down Expand Up @@ -535,7 +535,7 @@
** This command is not dangerous. However, any previously logged data
** will be lost.
**
** \sa #CFE_ES_CLEAR_SYSLOG_CC, #CFE_ES_WRITE_SYSLOG_CC, #CFE_ES_WRITE_ER_LOG_CC
** \sa #CFE_ES_CLEAR_SYS_LOG_CC, #CFE_ES_WRITE_SYS_LOG_CC, #CFE_ES_WRITE_ER_LOG_CC
*/
#define CFE_ES_CLEAR_ER_LOG_CC 12

Expand Down Expand Up @@ -578,7 +578,7 @@
** if performed repeatedly without sufficient file management by the
** operator, fill the file system.
**
** \sa #CFE_ES_CLEAR_SYSLOG_CC, #CFE_ES_WRITE_SYSLOG_CC, #CFE_ES_CLEAR_ER_LOG_CC
** \sa #CFE_ES_CLEAR_SYS_LOG_CC, #CFE_ES_WRITE_SYS_LOG_CC, #CFE_ES_CLEAR_ER_LOG_CC
*/
#define CFE_ES_WRITE_ER_LOG_CC 13

Expand Down Expand Up @@ -787,9 +787,9 @@
** identifying the cause of a problem to be lost by a subsequent flood of
** additional messages).
**
** \sa #CFE_ES_CLEAR_SYSLOG_CC, #CFE_ES_WRITE_SYSLOG_CC
** \sa #CFE_ES_CLEAR_SYS_LOG_CC, #CFE_ES_WRITE_SYS_LOG_CC
*/
#define CFE_ES_OVER_WRITE_SYSLOG_CC 18
#define CFE_ES_OVER_WRITE_SYS_LOG_CC 18

/** \cfeescmd Resets the Processor Reset Counter to Zero
**
Expand Down
16 changes: 8 additions & 8 deletions modules/es/config/default_cfe_es_msgdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ typedef struct CFE_ES_RestartCmd_Payload
**
** This format is shared by several executive services commands.
** For command details, see #CFE_ES_QUERY_ALL_CC, #CFE_ES_QUERY_ALL_TASKS_CC,
** #CFE_ES_WRITE_SYSLOG_CC, and #CFE_ES_WRITE_ER_LOG_CC
** #CFE_ES_WRITE_SYS_LOG_CC, and #CFE_ES_WRITE_ER_LOG_CC
**
**/
typedef struct CFE_ES_FileNameCmd_Payload
Expand All @@ -64,7 +64,7 @@ typedef struct CFE_ES_FileNameCmd_Payload
/**
** \brief Overwrite/Discard System Log Configuration Command Payload
**
** For command details, see #CFE_ES_OVER_WRITE_SYSLOG_CC
** For command details, see #CFE_ES_OVER_WRITE_SYS_LOG_CC
**
**/
typedef struct CFE_ES_OverWriteSysLogCmd_Payload
Expand Down Expand Up @@ -146,13 +146,12 @@ typedef struct CFE_ES_DeleteCDSCmd_Payload
/**
* @brief Labels for values to use in #CFE_ES_StartPerfCmd_Payload.TriggerMode
* @sa CFE_ES_StartPerfCmd_Payload
*/
*/
enum CFE_ES_PerfMode
{
CFE_ES_PERF_TRIGGER_START = 0,
CFE_ES_PERF_TRIGGER_CENTER,
CFE_ES_PERF_TRIGGER_END,
CFE_ES_PERF_MAX_MODES
CFE_ES_PerfTrigger_START = 0,
CFE_ES_PerfTrigger_CENTER,
CFE_ES_PerfTrigger_END
};

typedef uint32 CFE_ES_PerfMode_Enum_t;
Expand All @@ -165,7 +164,8 @@ typedef uint32 CFE_ES_PerfMode_Enum_t;
**/
typedef struct CFE_ES_StartPerfCmd_Payload
{
CFE_ES_PerfMode_Enum_t TriggerMode; /**< \brief Desired trigger position (Start, Center, End). Values defined by #CFE_ES_PerfMode. */
CFE_ES_PerfMode_Enum_t
TriggerMode; /**< \brief Desired trigger position (Start, Center, End). Values defined by #CFE_ES_PerfMode. */
} CFE_ES_StartPerfCmd_Payload_t;

/**
Expand Down
16 changes: 8 additions & 8 deletions modules/es/eds/cfe_es.xml
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@

<ContainerDataType name="OverWriteSysLogCmd_Payload" shortDescription="Overwrite/Discard System Log Configuration Command">
<LongDescription>
For command details, see #CFE_ES_OVERWRITE_SYSLOG_CC
For command details, see #CFE_ES_OVERWRITE_SYS_LOG_CC
</LongDescription>
<EntryList>
<Entry name="Mode" type="LogMode">
Expand Down Expand Up @@ -1300,8 +1300,8 @@
This command is not dangerous. However, any previously logged data
will be lost.

\sa #CFE_ES_WRITE_SYSLOG_CC, #CFE_ES_CLEAR_ERLOG_CC, #CFE_ES_WRITE_ERLOG_CC,
#CFE_ES_OVERWRITE_SYSLOG_CC
\sa #CFE_ES_WRITE_SYS_LOG_CC, #CFE_ES_CLEAR_ERLOG_CC, #CFE_ES_WRITE_ERLOG_CC,
#CFE_ES_OVERWRITE_SYS_LOG_CC
</LongDescription>
<ConstraintSet>
<ValueConstraint entry="Sec.FunctionCode" value="10" />
Expand Down Expand Up @@ -1351,8 +1351,8 @@
if performed repeatedly without sufficient file management by the
operator, fill the file system.

\sa #CFE_ES_CLEAR_SYSLOG_CC, #CFE_ES_CLEAR_ERLOG_CC, #CFE_ES_WRITE_ERLOG_CC,
#CFE_ES_OVERWRITE_SYSLOG_CC
\sa #CFE_ES_CLEAR_SYS_LOG_CC, #CFE_ES_CLEAR_ERLOG_CC, #CFE_ES_WRITE_ERLOG_CC,
#CFE_ES_OVERWRITE_SYS_LOG_CC
</LongDescription>
<ConstraintSet>
<ValueConstraint entry="Sec.FunctionCode" value="11" />
Expand Down Expand Up @@ -1400,7 +1400,7 @@
This command is not dangerous. However, any previously logged data
will be lost.

\sa #CFE_ES_CLEAR_SYSLOG_CC, #CFE_ES_WRITE_SYSLOG_CC, #CFE_ES_WRITE_ERLOG_CC
\sa #CFE_ES_CLEAR_SYS_LOG_CC, #CFE_ES_WRITE_SYS_LOG_CC, #CFE_ES_WRITE_ERLOG_CC
</LongDescription>
<ConstraintSet>
<ValueConstraint entry="Sec.FunctionCode" value="12" />
Expand Down Expand Up @@ -1450,7 +1450,7 @@
if performed repeatedly without sufficient file management by the
operator, fill the file system.

\sa #CFE_ES_CLEAR_SYSLOG_CC, #CFE_ES_WRITE_SYSLOG_CC, #CFE_ES_CLEAR_ERLOG_CC
\sa #CFE_ES_CLEAR_SYS_LOG_CC, #CFE_ES_WRITE_SYS_LOG_CC, #CFE_ES_CLEAR_ERLOG_CC
</LongDescription>
<ConstraintSet>
<ValueConstraint entry="Sec.FunctionCode" value="13" />
Expand Down Expand Up @@ -1710,7 +1710,7 @@
identifying the cause of a problem to be lost by a subsequent flood of
additional messages).

\sa #CFE_ES_CLEAR_SYSLOG_CC, #CFE_ES_WRITE_SYSLOG_CC
\sa #CFE_ES_CLEAR_SYS_LOG_CC, #CFE_ES_WRITE_SYS_LOG_CC
</LongDescription>
<ConstraintSet>
<ValueConstraint entry="Sec.FunctionCode" value="18" />
Expand Down
10 changes: 5 additions & 5 deletions modules/es/fsw/inc/cfe_es_eventids.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
*
* \par Cause:
*
* \link #CFE_ES_CLEAR_SYSLOG_CC ES Clear System Log Command \endlink success.
* \link #CFE_ES_CLEAR_SYS_LOG_CC ES Clear System Log Command \endlink success.
*/
#define CFE_ES_SYSLOG1_INF_EID 17

Expand All @@ -223,7 +223,7 @@
*
* \par Cause:
*
* \link #CFE_ES_CLEAR_SYSLOG_CC ES Write System Log Command \endlink success.
* \link #CFE_ES_CLEAR_SYS_LOG_CC ES Write System Log Command \endlink success.
*/
#define CFE_ES_SYSLOG2_EID 18

Expand Down Expand Up @@ -608,7 +608,7 @@
*
* \par Cause:
*
* \link #CFE_ES_WRITE_SYSLOG_CC ES Write System Log Command \endlink failed parsing file
* \link #CFE_ES_WRITE_SYS_LOG_CC ES Write System Log Command \endlink failed parsing file
* name or creating the file. OVERLOADED
*/
#define CFE_ES_SYSLOG2_ERR_EID 55
Expand Down Expand Up @@ -772,7 +772,7 @@
*
* \par Cause:
*
* \link #CFE_ES_OVER_WRITE_SYSLOG_CC ES Set System Log Overwrite Mode Command \endlink success.
* \link #CFE_ES_OVER_WRITE_SYS_LOG_CC ES Set System Log Overwrite Mode Command \endlink success.
*/
#define CFE_ES_SYSLOGMODE_EID 70

Expand All @@ -783,7 +783,7 @@
*
* \par Cause:
*
* \link #CFE_ES_OVER_WRITE_SYSLOG_CC ES Set System Log Overwrite Mode Command \endlink failed
* \link #CFE_ES_OVER_WRITE_SYS_LOG_CC ES Set System Log Overwrite Mode Command \endlink failed
* due to invalid mode requested.
*/
#define CFE_ES_ERR_SYSLOGMODE_EID 71
Expand Down
6 changes: 3 additions & 3 deletions modules/es/fsw/src/cfe_es_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,21 +168,21 @@ void CFE_ES_TaskPipe(const CFE_SB_Buffer_t *SBBufPtr)
}
break;

case CFE_ES_CLEAR_SYSLOG_CC:
case CFE_ES_CLEAR_SYS_LOG_CC:
if (CFE_ES_VerifyCmdLength(&SBBufPtr->Msg, sizeof(CFE_ES_ClearSysLogCmd_t)))
{
CFE_ES_ClearSysLogCmd((const CFE_ES_ClearSysLogCmd_t *)SBBufPtr);
}
break;

case CFE_ES_WRITE_SYSLOG_CC:
case CFE_ES_WRITE_SYS_LOG_CC:
if (CFE_ES_VerifyCmdLength(&SBBufPtr->Msg, sizeof(CFE_ES_WriteSysLogCmd_t)))
{
CFE_ES_WriteSysLogCmd((const CFE_ES_WriteSysLogCmd_t *)SBBufPtr);
}
break;

case CFE_ES_OVER_WRITE_SYSLOG_CC:
case CFE_ES_OVER_WRITE_SYS_LOG_CC:
if (CFE_ES_VerifyCmdLength(&SBBufPtr->Msg, sizeof(CFE_ES_OverWriteSysLogCmd_t)))
{
CFE_ES_OverWriteSysLogCmd((const CFE_ES_OverWriteSysLogCmd_t *)SBBufPtr);
Expand Down
12 changes: 6 additions & 6 deletions modules/es/fsw/src/cfe_es_perf.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void CFE_ES_SetupPerfVariables(uint32 ResetType)

/* set data collection state to waiting for command state */
Perf->MetaData.State = CFE_ES_PERF_IDLE;
Perf->MetaData.Mode = CFE_ES_PERF_TRIGGER_START;
Perf->MetaData.Mode = CFE_ES_PerfTrigger_START;
Perf->MetaData.TriggerCount = 0;
Perf->MetaData.DataStart = 0;
Perf->MetaData.DataEnd = 0;
Expand Down Expand Up @@ -155,7 +155,7 @@ int32 CFE_ES_StartPerfDataCmd(const CFE_ES_StartPerfDataCmd_t *data)
PerfDumpState->PendingState == CFE_ES_PerfDumpState_IDLE)
{
/* Make sure Trigger Mode is valid */
if (CmdPtr->TriggerMode < CFE_ES_PERF_MAX_MODES)
if (CmdPtr->TriggerMode <= CFE_ES_PerfTrigger_END)
{
CFE_ES_Global.TaskData.CommandCounter++;

Expand All @@ -180,7 +180,7 @@ int32 CFE_ES_StartPerfDataCmd(const CFE_ES_StartPerfDataCmd_t *data)
CFE_ES_Global.TaskData.CommandErrorCounter++;
CFE_EVS_SendEvent(CFE_ES_PERF_STARTCMD_TRIG_ERR_EID, CFE_EVS_EventType_ERROR,
"Cannot start collecting performance data, trigger mode (%d) out of range (%d to %d)",
(int)CmdPtr->TriggerMode, (int)CFE_ES_PERF_TRIGGER_START, (int)CFE_ES_PERF_TRIGGER_END);
(int)CmdPtr->TriggerMode, (int)CFE_ES_PerfTrigger_START, (int)CFE_ES_PerfTrigger_END);
}
}
else
Expand Down Expand Up @@ -668,21 +668,21 @@ void CFE_ES_PerfLogAdd(uint32 Marker, uint32 EntryExit)
if (Perf->MetaData.State == CFE_ES_PERF_TRIGGERED)
{
Perf->MetaData.TriggerCount++;
if (Perf->MetaData.Mode == CFE_ES_PERF_TRIGGER_START)
if (Perf->MetaData.Mode == CFE_ES_PerfTrigger_START)
{
if (Perf->MetaData.TriggerCount >= CFE_PLATFORM_ES_PERF_DATA_BUFFER_SIZE)
{
Perf->MetaData.State = CFE_ES_PERF_IDLE;
}
}
else if (Perf->MetaData.Mode == CFE_ES_PERF_TRIGGER_CENTER)
else if (Perf->MetaData.Mode == CFE_ES_PerfTrigger_CENTER)
{
if (Perf->MetaData.TriggerCount >= CFE_PLATFORM_ES_PERF_DATA_BUFFER_SIZE / 2)
{
Perf->MetaData.State = CFE_ES_PERF_IDLE;
}
}
else if (Perf->MetaData.Mode == CFE_ES_PERF_TRIGGER_END)
else if (Perf->MetaData.Mode == CFE_ES_PerfTrigger_END)
{
Perf->MetaData.State = CFE_ES_PERF_IDLE;
}
Expand Down
Loading

0 comments on commit 644baa6

Please sign in to comment.