inc/ecu/fsm.h Source File
|
ECU
|
fsm.h
Go to the documentation of this file.
void ecu_fsm_start(struct ecu_fsm *me)
Runs the initial state's entry handler and manages all state transition logic if any state changes we...
void ecu_fsm_ctor(struct ecu_fsm *me, const struct ecu_fsm_state *state)
Fsm constructor.
void ecu_fsm_change_state(struct ecu_fsm *me, const struct ecu_fsm_state *state)
Transitions fsm into a new state.
void ecu_fsm_dispatch(struct ecu_fsm *me, const void *event)
Relays event to fsm where it is processed by the current state's handler function....
Single state in fsm, initialized via ECU_FSM_STATE_CTOR(). Pointers are const-qualified to only allow...
Definition: fsm.h:105
void(*const exit)(struct ecu_fsm *fsm)
Executes when state exits. Optional.
Definition: fsm.h:123
void(*const entry)(struct ecu_fsm *fsm)
Executes when state first entered. Optional.
Definition: fsm.h:120
void(*const handler)(struct ecu_fsm *fsm, const void *event)
Processes events dispatched to this state. Mandatory.
Definition: fsm.h:126
Finite state machine. Users create their own FSMs by containing this as an intrusive member.
Definition: fsm.h:138
uint32_t transition
Bitmap representing fsm's state transition context.
Definition: fsm.h:143
Generated by