Skip to content
Snippets Groups Projects
Commit dc2ebfba authored by Emilio Corigliano's avatar Emilio Corigliano
Browse files

[HIL] Updated the framework structure

In general the framework now is a lot more versatile since the application specific structures are passed as templates.

[HIL]
- HIL accepts a pointer to the HILTransceiver and HILPhasesManager objects and manages their insertion, start and stop just by interacting with the HIL instance.
- HIL now exposes a method to wait until the simulation started (first packet from simulator is received).
- HIL now is an Active Object. The run method implements the periodic setting of the ActuatorData through an updateActuatorData function passed in the constructor.

[HILTransceiver]
- HILTransceiver now is templated on the flightPhases flags, SimulatorData and ActuatorData
- HILTransceiver now extends a base class to perform type erasure and get more easily the class from ModuleManager
- HILTransceiver now has an internal variable to store the number of lost updates
- HILTransceiver now has a PrintLogger
- HILTransceiver::getSensorData now returns a constant pointer since the values of the sensorData struct shouldn't be changed outside of this class

[HILPhasesManager]
- HILPhasesManager now is templated on the flightPhases flags, SimulatorData and ActuatorData
- HILPhasesManager now extends a base class to perform type erasure and get more easily the class from ModuleManager
- HILPhasesManager is now a virtual class. Every simulation should create its own HILPhasesManager implementing the methods processFlags, printOutcomes, handleEvent, updateSimulatorFlags

[HILSensor]
- HILSensor now is templated on HILSensorData (the structure the sensor outputs), SimulatorSensorData (the structure the simulator sends), N_DATA (the number of samples the simulator sends).
- As a constructor parameter, a pointer to a SimulatorSensorData
- Using the PrintLogger
- Every particular HILSensor implements his SimulatorData structure (e.g. AccelerometerSimulatorData), which is templated on the N_DATA parameter

[HILSimulationConfig]
- Implemented an example of implementation of the HIL components
- Created a types to simplify usage of the HIL framework
parent cb35f4f4
No related branches found
No related tags found
No related merge requests found
Showing
with 970 additions and 1264 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment