Skip to content

Commit

Permalink
Merge pull request #2411 from irowebbn:2410-doc-triggermode
Browse files Browse the repository at this point in the history
Fix #2410, document ES Perf enums
  • Loading branch information
dzbaker committed Dec 12, 2023
2 parents 68da2a7 + e56d5e0 commit 7ae394d
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 17 deletions.
16 changes: 15 additions & 1 deletion modules/es/config/default_cfe_es_msgdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,20 @@ typedef struct CFE_ES_DeleteCDSCmd_Payload
CdsName[CFE_MISSION_ES_CDS_MAX_FULL_NAME_LEN]; /**< \brief ASCII text string containing name of CDS to delete */
} CFE_ES_DeleteCDSCmd_Payload_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
};

typedef uint32 CFE_ES_PerfMode_Enum_t;

/**
** \brief Start Performance Analyzer Command Payload
**
Expand All @@ -151,7 +165,7 @@ typedef struct CFE_ES_DeleteCDSCmd_Payload
**/
typedef struct CFE_ES_StartPerfCmd_Payload
{
uint32 TriggerMode; /**< \brief Desired trigger position (Start, Center, End) */
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
34 changes: 18 additions & 16 deletions modules/es/fsw/src/cfe_es_perf.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,24 @@
** Defines
*/

enum CFE_ES_PerfState_t

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

/**
* @brief Internal states for Performance Analyzer
*/
typedef 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
{
CFE_ES_PERF_TRIGGER_START = 0,
CFE_ES_PERF_TRIGGER_CENTER,
CFE_ES_PERF_TRIGGER_END,
CFE_ES_PERF_MAX_MODES
};
} CFE_ES_PerfState_t;

/*
* 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 +81,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 +110,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 +137,6 @@ uint32 CFE_ES_GetPerfLogDumpRemaining(void);
*/
bool CFE_ES_RunPerfLogDump(uint32 ElapsedTime, void *Arg);

/** @} */

#endif /* CFE_ES_PERF_H */

0 comments on commit 7ae394d

Please sign in to comment.