Skyward boardcore
|
#include <FSM.h>
Public Member Functions | |
FSM (void(T::*initialState)(const Event &), unsigned int stacksize=miosix::STACK_DEFAULT_FOR_PTHREAD, miosix::Priority priority=miosix::MAIN_PRIORITY) | |
virtual | ~FSM () |
void | transition (void(T::*nextState)(const Event &)) |
bool | testState (void(T::*testState)(const Event &)) |
Test if the FSM is in the given 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 () |
virtual bool | start () |
Start the thread associated with this active object. | |
bool | isRunning () |
Protected Member Functions | |
void | handleEvent (const Event &e) override |
![]() | |
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} |
Boardcore::FSM< T >::FSM | ( | void(T::*)(const Event &) | initialState, |
unsigned int | stacksize = miosix::STACK_DEFAULT_FOR_PTHREAD, | ||
miosix::Priority | priority = miosix::MAIN_PRIORITY ) |
|
virtual |
|
overrideprotectedvirtual |
Implements Boardcore::EventHandler.
bool Boardcore::FSM< T >::testState | ( | void(T::*)(const Event &) | testState | ) |
void Boardcore::FSM< T >::transition | ( | void(T::*)(const Event &) | nextState | ) |