Skyward boardcore
|
Utility class to manually post events to specific topics. More...
#include <EventInjector.h>
Protected Member Functions | |
void | run () override |
![]() | |
bool | shouldStop () |
Tells whether or not the ActiveObject should stop its execution. | |
Additional Inherited Members | |
![]() | |
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. | |
virtual void | stop () |
Signals the runner thread to terminate and joins the thread. | |
bool | isRunning () |
![]() | |
miosix::Thread * | thread = nullptr |
Gives access to the thread object. | |
std::atomic< bool > | stopFlag {false} |
std::atomic< bool > | running {false} |
Utility class to manually post events to specific topics.
Definition at line 42 of file EventInjector.h.
|
inlineoverrideprotectedvirtual |
The thread that will be spawned just calls this function. Override it to implement your logic. Remember to frequently check for shouldStop() to see if you should terminate the execution of the thread.
Implements Boardcore::ActiveObject.
Definition at line 46 of file EventInjector.h.