Skyward boardcore
|
Single interface to the hardware-in-the-loop framework. More...
#include <HIL.h>
Public Member Functions | |
HIL (HILTransceiver< FlightPhases, SimulatorData, ActuatorData > *hilTransceiver, HILPhasesManager< FlightPhases, SimulatorData, ActuatorData > *hilPhasesManager, std::function< ActuatorData()> updateActuatorData, int simulationPeriod) | |
Constructor of the HIL framework. | |
bool | start () override |
Start the needed hardware-in-the-loop components. | |
void | stop () |
Signals the runner thread to terminate and joins the thread. | |
void | waitStartSimulation () |
void | registerToFlightPhase (const FlightPhases &flag, const PhasesCallback &func) |
int | getSimulationPeriod () const |
int64_t | getTimestampSimulatorData () const |
const SimulatorData * | getSensorData () const |
![]() | |
ActiveObject (unsigned int stacksize=miosix::STACK_DEFAULT_FOR_PTHREAD, miosix::Priority priority=miosix::MAIN_PRIORITY) | |
virtual | ~ActiveObject () |
bool | isRunning () |
Protected Attributes | |
HILTransceiver< FlightPhases, SimulatorData, ActuatorData > * | hilTransceiver |
HILPhasesManager< FlightPhases, SimulatorData, ActuatorData > * | hilPhasesManager |
![]() | |
miosix::Thread * | thread = nullptr |
Gives access to the thread object. | |
std::atomic< bool > | stopFlag {false} |
std::atomic< bool > | running {false} |
Additional Inherited Members | |
![]() | |
bool | shouldStop () |
Tells whether or not the ActiveObject should stop its execution. | |
Single interface to the hardware-in-the-loop framework.
|
inline |
Constructor of the HIL framework.
hilTransceiver | The pointer to the already built HILTransceiver. |
hilPhasesManager | The pointer to the already built HILPhasesManager. |
updateActuatorData | Function which returns the current ActuatorData situation. |
simulationPeriod | Period of the simulation [ms]. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineoverridevirtual |
Start the needed hardware-in-the-loop components.
Reimplemented from Boardcore::ActiveObject.
|
inlinevirtual |
Signals the runner thread to terminate and joins the thread.
This is a blocking call that will not return until the thread terminates! Your run() implementation must check shouldStop() and terminate ASAP if it returns true.
Reimplemented from Boardcore::ActiveObject.
|
inline |
|
protected |
|
protected |