#include <uFsm.hpp>
|
| uFsm (uEventHandler *trans, uint32_t maxNumTransitions, uint32_t initialState) |
|
virtual | ~uFsm (void) |
|
uint32_t | defineTransition (uint32_t sourceState, uint32_t destinationState, uint32_t event, uint32_t index) |
|
bool | control (uint32_t event, void *parameters=NULL) |
|
void | generateEvent (uint32_t event, void *parameters=NULL) |
|
Micro Event based Finite State Machine
Definition at line 46 of file uFsm.hpp.
uFsm::uFsm |
( |
uEventHandler * |
trans, |
|
|
uint32_t |
maxNumTransitions, |
|
|
uint32_t |
initialState |
|
) |
| |
uFsm - Event based Finite State Machine
- Parameters
-
trans | - Event Handler instance |
maxNumTransitions | - maximum allocation for transitions |
initialState | - machine initial state. |
Definition at line 35 of file uFsm.cpp.
Clean/deallocates transition array and Events in the queue.
Definition at line 64 of file uFsm.cpp.
bool uFsm::control |
( |
uint32_t |
event, |
|
|
void * |
parameters = NULL |
|
) |
| |
Inserts an Event in the Event queue and then process it.
- Parameters
-
event | - new event Id to add |
parameters | - pointer to location with extra data to pass on event handling or NULL |
- Returns
- true/false from the event function handler.
Definition at line 170 of file uFsm.cpp.
uint32_t uFsm::defineTransition |
( |
uint32_t |
sourceState, |
|
|
uint32_t |
destinationState, |
|
|
uint32_t |
event, |
|
|
uint32_t |
index |
|
) |
| |
Defines a transition based on an Event
- Parameters
-
sourceState | - State "from" |
destinationState | - State "to" |
event | - happened Event |
index | - function handler index |
- Returns
- hash index assigned
Definition at line 146 of file uFsm.cpp.
void uFsm::generateEvent |
( |
uint32_t |
event, |
|
|
void * |
parameters = NULL |
|
) |
| |
Add an Event to the Event queue
- Parameters
-
event | - Event type |
parameters | - data pointer to be accessed by the event handler function |
Definition at line 220 of file uFsm.cpp.
The documentation for this class was generated from the following files: