#include <stddef.h>
#include <stdbool.h>
Go to the source code of this file.
Classes | |
struct | event |
Event. More... | |
struct | transition |
Transition between a state and another state. More... | |
struct | state |
State. More... | |
struct | stateMachine |
State machine. More... |
Enumerations | |
enum | stateM_handleEventRetVals { stateM_errArg = -2, stateM_errorStateReached, stateM_stateChanged, stateM_stateLoopSelf, stateM_noStateChange, stateM_finalStateReached } |
stateM_handleEvent() return values More... |
Functions | |
void | stateM_init (struct stateMachine *stateMachine, struct state *initialState, struct state *errorState) |
Initialise the state machine. | |
int | stateM_handleEvent (struct stateMachine *stateMachine, struct event *event) |
Pass an event to the state machine. | |
struct state * | stateM_currentState (struct stateMachine *stateMachine) |
Get the current state. | |
struct state * | stateM_previousState (struct stateMachine *stateMachine) |
Get the previous state. | |
bool | stateM_stopped (struct stateMachine *stateMachine) |
Check if the state machine has stopped. |