Data Structures | |
| struct | stmElementInfo_t |
| A singular event. More... | |
| struct | stmPerfInfo_t |
| A singular perfInfo event. More... | |
| struct | stmStateInfo_t |
| A singular State Manager event. More... | |
| struct | stmHeaderInfo_t |
| STM Log Header Information needed by STM Analytics. More... | |
Macros | |
| #define | STM_RESOURCE_NAME_MAX (41) |
| #define | STM_MAX_SCHEDULES (8) |
Typedefs | |
| typedef enum stmEventType_t | stmEventType_t |
| Types of Events logged by STM. More... | |
| typedef uint16_t | stmElementOptionalVal |
| typedef uint64_t | stmElementTimestamp |
| typedef int(* | stmLoggingEventCallback_t) (void *userdata, stmElementInfo_t *buf, size_t size) |
| Function signature for STM event log callbacks. More... | |
| typedef int(* | stmLoggingStateCallback_t) (void *userdata, stmStateInfo_t *buf, size_t size) |
| Function signature for STM state manager log callbacks. More... | |
| typedef int(* | stmLoggingPerfInfoCallback_t) (void *userdata, stmPerfInfo_t *buf, size_t size) |
| Function signature for perfInfo log Callbacks. More... | |
Functions | |
| STM_API stmErrorCode_t | stmLoggerInit (stmHeaderInfo_t *header) |
| Initialize STM logger context. More... | |
| STM_API stmErrorCode_t | stmLoggerInitWithDiscriminator (int32_t discriminator, stmHeaderInfo_t *header) |
| Initialize STM logger context with a discriminator. More... | |
| STM_API stmErrorCode_t | stmRegisterEventCallBack (stmLoggingEventCallback_t func, void *userdata) |
| Registers a callback function with the Logger to be invoked during a event buffer write. More... | |
| STM_API stmErrorCode_t | stmRegisterStateCallBack (stmLoggingStateCallback_t func, void *userdata) |
| Registers a callback function with the Logger to be invoked during a state buffer write. More... | |
| STM_API stmErrorCode_t | stmRegisterPerfInfoCallBack (stmLoggingPerfInfoCallback_t func, void *userdata) |
| Registers a callback function with the Logger to be invoked during a perfInfo buffer write. More... | |
| STM_API stmErrorCode_t | stmEnterLoggingLoop () |
| Enters logging loop which logs at a set frequency. More... | |
| STM_API stmErrorCode_t | stmLoggerFlush (void) |
| Flush all buffers to the callbacks. More... | |
| STM_API stmErrorCode_t | stmLoggerExit (void) |
| Cleans up STM logger context. More... | |
| #define STM_MAX_SCHEDULES (8) |
Definition at line 55 of file stm_logging.h.
| #define STM_RESOURCE_NAME_MAX (41) |
Definition at line 53 of file stm_logging.h.
| typedef uint16_t stmElementOptionalVal |
Definition at line 141 of file stm_logging.h.
| typedef uint64_t stmElementTimestamp |
Definition at line 142 of file stm_logging.h.
| typedef enum stmEventType_t stmEventType_t |
Types of Events logged by STM.
| typedef int(* stmLoggingEventCallback_t) (void *userdata, stmElementInfo_t *buf, size_t size) |
Function signature for STM event log callbacks.
| [in] | userdata | Pointer to any data needed by the event callback |
| [in] | buf | Element log buffer containing STM runtime events |
| [in] | size | Size of the element buffer |
Definition at line 270 of file stm_logging.h.
| typedef int(* stmLoggingPerfInfoCallback_t) (void *userdata, stmPerfInfo_t *buf, size_t size) |
Function signature for perfInfo log Callbacks.
| [in] | userdata | Pointer to any data needed by the perfInfo callback |
| [in] | buf | perfInfo log buffer containing STM perfInfo events |
| [in] | size | Size of the perfInfo log buffer |
Definition at line 292 of file stm_logging.h.
| typedef int(* stmLoggingStateCallback_t) (void *userdata, stmStateInfo_t *buf, size_t size) |
Function signature for STM state manager log callbacks.
| [in] | userdata | Pointer to any data needed by the state callback |
| [in] | buf | state log buffer containing STM state manager events |
| [in] | size | Size of the state log buffer |
Definition at line 281 of file stm_logging.h.
| enum stmClockInfo_t |
Types of Clocks used by STM.
Definition at line 60 of file stm_logging.h.
| enum stmEventType_t |
Types of Events logged by STM.
Definition at line 76 of file stm_logging.h.
Type of event being logged for STM_EVENT_PERFORMANCE events.
Definition at line 147 of file stm_logging.h.
| STM_API stmErrorCode_t stmEnterLoggingLoop | ( | ) |
Enters logging loop which logs at a set frequency.
| STM_API stmErrorCode_t stmLoggerExit | ( | void | ) |
Cleans up STM logger context.
No STM logging APIs can be called after this.
| STM_API stmErrorCode_t stmLoggerFlush | ( | void | ) |
Flush all buffers to the callbacks.
Useful for ensuring all data is written before a non-graceful exit.
| STM_API stmErrorCode_t stmLoggerInit | ( | stmHeaderInfo_t * | header | ) |
Initialize STM logger context.
discriminator = -1.| [out] | header | Header for the LogFile. |
| STM_API stmErrorCode_t stmLoggerInitWithDiscriminator | ( | int32_t | discriminator, |
| stmHeaderInfo_t * | header | ||
| ) |
Initialize STM logger context with a discriminator.
discriminator is started. Logger's context should be cleaned up with stmLoggerExit() after STM has completed its execution. Logger must call at most one of the two: stmLoggerInit() or stmLoggerInitWithDiscriminator(), if both are called single or multiple times, it will cause undefined behavior. There is only one logger in the system. All negative values of discriminator are equivalent and the same as calling stmScheduleManagerInit()| [in] | discriminator | Used to distinguish instance of STM. |
| [out] | header | Header for the LogFile. |
| STM_API stmErrorCode_t stmRegisterEventCallBack | ( | stmLoggingEventCallback_t | func, |
| void * | userdata | ||
| ) |
Registers a callback function with the Logger to be invoked during a event buffer write.
| [in] | func | The callback function to be executed. |
| [in] | userdata | Optional pointer to any data needed by the callback. |
| STM_API stmErrorCode_t stmRegisterPerfInfoCallBack | ( | stmLoggingPerfInfoCallback_t | func, |
| void * | userdata | ||
| ) |
Registers a callback function with the Logger to be invoked during a perfInfo buffer write.
| [in] | func | The callback function to be executed. |
| [in] | userdata | Optional pointer to any data needed by the callback. |
| STM_API stmErrorCode_t stmRegisterStateCallBack | ( | stmLoggingStateCallback_t | func, |
| void * | userdata | ||
| ) |
Registers a callback function with the Logger to be invoked during a state buffer write.
| [in] | func | The callback function to be executed. |
| [in] | userdata | Optional pointer to any data needed by the callback. |