Skip to content

Commit

Permalink
Fix #2410, document ES Perf enums
Browse files Browse the repository at this point in the history
  • Loading branch information
irowebbn committed Dec 5, 2023
1 parent ee18742 commit 1733ffe
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
2 changes: 1 addition & 1 deletion modules/es/config/default_cfe_es_msgdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ typedef struct CFE_ES_DeleteCDSCmd_Payload
**/
typedef struct CFE_ES_StartPerfCmd_Payload
{
uint32 TriggerMode; /**< \brief Desired trigger position (Start, Center, End) */
uint32 TriggerMode; /**< \brief Desired trigger position (Start, Center, End). Values defined by #CFE_ES_PerfMode. */
} CFE_ES_StartPerfCmd_Payload_t;

/**
Expand Down
30 changes: 22 additions & 8 deletions modules/es/fsw/src/cfe_es_perf.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,36 @@
** Defines
*/

enum CFE_ES_PerfState_t

/** @defgroup CFEESPerf Performance Analyzer Data Structures
* @{
*/

/**
* @brief Internal states for Performance Analyzer
*/
enum CFE_ES_PerfState
{
CFE_ES_PERF_IDLE = 0,
CFE_ES_PERF_WAITING_FOR_TRIGGER,
CFE_ES_PERF_TRIGGERED,
CFE_ES_PERF_MAX_STATES
};

enum CFE_ES_PerfMode_t
/**
* @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
};

/*
* Perflog Dump Background Job states
/**
* @brief Perflog Dump Background Job states
*
* Writing performance log data is now handled by a state machine that runs
* as a background job in Executive services. When a performance log dump is
Expand All @@ -81,8 +93,8 @@ typedef enum
CFE_ES_PerfDumpState_MAX /* Placeholder for last state, no action, always last */
} CFE_ES_PerfDumpState_t;

/*
* Performance log dump state structure
/**
* @brief Performance log dump state structure
*
* This structure is stored in global memory and keeps the state
* of the performance log dump from one iteration to the next.
Expand Down Expand Up @@ -110,8 +122,8 @@ typedef struct
size_t FileSize; /* Total file size, for progress reporting in telemetry */
} CFE_ES_PerfDumpGlobal_t;

/*
* Helper function to obtain the progress/remaining items from
/**
* @brief Helper function to obtain the progress/remaining items from
* the background task that is writing the performance log data
*
* This is no longer just simply reading a single value from a struct,
Expand All @@ -137,4 +149,6 @@ uint32 CFE_ES_GetPerfLogDumpRemaining(void);
*/
bool CFE_ES_RunPerfLogDump(uint32 ElapsedTime, void *Arg);

/** @} */

#endif /* CFE_ES_PERF_H */

0 comments on commit 1733ffe

Please sign in to comment.