Skyward boardcore
|
#include <HSM.h>
Public Types | |
typedef State(T::* | StateHandler) (const Event &) |
Public Member Functions | |
HSM (StateHandler initialState, unsigned int stacksize=miosix::STACK_DEFAULT_FOR_PTHREAD, miosix::Priority priority=miosix::MAIN_PRIORITY) | |
virtual | ~HSM () |
bool | start () override |
Start the thread associated with this active object. | |
State | transition (StateHandler nextState) |
Performs a transition to the specified state. | |
State | tranSuper (StateHandler superState) |
Performs a transaction to the specified super state. | |
bool | testState (StateHandler testState) |
Test if the state machine is in the specified state. | |
![]() | |
EventHandler (unsigned int stacksize=miosix::STACK_DEFAULT_FOR_PTHREAD, miosix::Priority priority=miosix::MAIN_PRIORITY) | |
virtual | ~EventHandler () |
void | postEvent (const Event &ev) override |
void | stop () override |
Signals the runner thread to terminate and joins the thread. | |
![]() | |
EventHandlerBase () | |
virtual | ~EventHandlerBase () |
![]() | |
ActiveObject (unsigned int stacksize=miosix::STACK_DEFAULT_FOR_PTHREAD, miosix::Priority priority=miosix::MAIN_PRIORITY) | |
virtual | ~ActiveObject () |
bool | isRunning () |
Public Attributes | |
StateHandler | state |
StateHandler | temp |
Protected Member Functions | |
void | handleEvent (const Event &event) override |
Makes the current state handle the event and changes the state accordingly. | |
State | state_top (const Event &) |
![]() | |
void | run () override |
![]() | |
bool | shouldStop () |
Tells whether or not the ActiveObject should stop its execution. | |
Additional Inherited Members | |
![]() | |
SynchronizedQueue< Event > | eventList |
![]() | |
miosix::Thread * | thread = nullptr |
Gives access to the thread object. | |
std::atomic< bool > | stopFlag {false} |
std::atomic< bool > | running {false} |
typedef State(T::* Boardcore::HSM< T >::StateHandler) (const Event &) |
|
inline |
|
inlinevirtual |
|
inlineoverrideprotectedvirtual |
Makes the current state handle the event and changes the state accordingly.
event | The event to handle. |
Implements Boardcore::EventHandler.
|
inlineoverridevirtual |
Start the thread associated with this active object.
Call stop() to terminate execution of the thread.
Reimplemented from Boardcore::ActiveObject.
|
inlineprotected |
|
inline |
|
inline |
|
inline |
StateHandler Boardcore::HSM< T >::state |
StateHandler Boardcore::HSM< T >::temp |