Go to the source code of this file.
Generic state machine framework declarations
Definition in file ocs_sm.h.
Data Structures | |
| struct | ocs_sm_ctx_t |
| State machine context header. More... | |
Macros | |
| #define | OCS_SM_EVENT_SHIFT 24 |
| #define | OCS_SM_EVENT_START(id) ((id) << OCS_SM_EVENT_SHIFT) |
| #define | smtrace(...) |
Typedefs | |
| typedef void *(* | ocs_sm_function_t )(ocs_sm_ctx_t *, ocs_sm_event_t, void *) |
Functions | |
| int | ocs_sm_post_event (ocs_sm_ctx_t *, ocs_sm_event_t, void *) |
| Post an event to a context. More... | |
| void | ocs_sm_transition (ocs_sm_ctx_t *, ocs_sm_function_t, void *) |
| Transition to a new state. More... | |
| void | ocs_sm_disable (ocs_sm_ctx_t *ctx) |
| Disable further state machine processing. More... | |
| const char * | ocs_sm_event_name (ocs_sm_event_t evt) |
Variables | |
| const char * | ocs_sm_id [] |
| #define OCS_SM_EVENT_START | ( | id | ) | ((id) << OCS_SM_EVENT_SHIFT) |
| typedef void*(* ocs_sm_function_t)(ocs_sm_ctx_t *, ocs_sm_event_t, void *) |
| anonymous enum |
| enum ocs_sm_event_t |
State Machine Events.
string format of above enums
| void ocs_sm_disable | ( | ocs_sm_ctx_t * | ctx | ) |
| const char* ocs_sm_event_name | ( | ocs_sm_event_t | evt | ) |
| int ocs_sm_post_event | ( | ocs_sm_ctx_t * | ctx, |
| ocs_sm_event_t | evt, | ||
| void * | data | ||
| ) |
| void ocs_sm_transition | ( | ocs_sm_ctx_t * | , |
| ocs_sm_function_t | , | ||
| void * | |||
| ) |