44typedef const char * (*cs_fsm_state_to_str_fn)(
struct cs_fsm* fsm, int32_t state);
45typedef const char * (*cs_fsm_event_to_str_fn)(
struct cs_fsm* fsm, int32_t event);
48 int32_t next_state, int32_t fsm_event,
void *data);
50#define CS_FSM_NEXT_STATE_SIZE 32
52#define CS_FSM_STATE_NONE -1
54#define CS_FSM_CB_EVENT_PROCESS_NF 0
55#define CS_FSM_CB_EVENT_STATE_SET 1
56#define CS_FSM_CB_EVENT_STATE_SET_NF 2
80static inline void cs_fsm_process (
struct cs_fsm *fsm, int32_t new_event,
void * data,
cs_fsm_cb cb)
84 for (i = 0; i < fsm->
entries; i++) {
101static inline void cs_fsm_state_set (
struct cs_fsm* fsm, int32_t next_state,
void* data,
cs_fsm_cb cb)
const char *(* cs_fsm_state_to_str_fn)(struct cs_fsm *fsm, int32_t state)
#define CS_FSM_CB_EVENT_PROCESS_NF
const char *(* cs_fsm_event_to_str_fn)(struct cs_fsm *fsm, int32_t event)
void(* cs_fsm_cb)(struct cs_fsm *fsm, int cb_event, int32_t curr_state, int32_t next_state, int32_t fsm_event, void *data)
#define CS_FSM_NEXT_STATE_SIZE
#define CS_FSM_CB_EVENT_STATE_SET
#define CS_FSM_CB_EVENT_STATE_SET_NF
#define CS_FSM_STATE_NONE
void(* cs_fsm_event_action_fn)(struct cs_fsm *fsm, int32_t event, void *data)
int32_t next_states[CS_FSM_NEXT_STATE_SIZE]
cs_fsm_event_action_fn handler_fn
cs_fsm_state_to_str_fn state_to_str
struct cs_fsm_entry * table
cs_fsm_event_to_str_fn event_to_str