Skyward boardcore
Loading...
Searching...
No Matches
Boardcore::EventInjector Class Reference

Utility class to manually post events to specific topics. More...

#include <EventInjector.h>

Inheritance diagram for Boardcore::EventInjector:
Collaboration diagram for Boardcore::EventInjector:

Protected Member Functions

void run () override
 
- Protected Member Functions inherited from Boardcore::ActiveObject
bool shouldStop ()
 Tells whether or not the ActiveObject should stop its execution.
 

Additional Inherited Members

- Public Member Functions inherited from Boardcore::ActiveObject
 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 ()
 
- Protected Attributes inherited from Boardcore::ActiveObject
miosix::Thread * thread = nullptr
 Gives access to the thread object.
 
std::atomic< bool > stopFlag {false}
 
std::atomic< bool > running {false}
 

Detailed Description

Utility class to manually post events to specific topics.

Definition at line 42 of file EventInjector.h.

Member Function Documentation

◆ run()

void Boardcore::EventInjector::run ( )
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.


The documentation for this class was generated from the following file: