56 static_assert(std::is_move_constructible<T>::value,
57 "T must be move constructible!");
59 static_assert(std::is_base_of<Sensor<typename T::DataType>, T>::value,
60 "T must inherit from Sensor<T::DataType>");
62 using UpdateFn = std::function<
typename T::DataType(
void)>;
95 auto realSample = T::sampleImpl();
134static void hillificator(std::unique_ptr<T>& sensor,
bool enableHw,
139 sensor = std::make_unique<Boardcore::HILSensor<T>>(
140 std::move(*sensor), enableHw, std::move(updateData));
Class that wraps a real sensor to perform HIL simulations.
T::DataType sampleImpl() override
Overridden sampleImpl method so that the data could be actually taken from the simulator.
T::DataType lastRealSample
miosix::FastMutex mutexRealData
T::DataType getRealLastSample()
Method analogous to getLastSample but returns the real sample taken from the hardware sensor.
HILSensor(T &&sensor, bool enableHw, UpdateFn updateData)
Constructor of the HILSensor which decorates the passed sensor with the sampling of the simulator dat...
std::function< typename T::DataType(void)> UpdateFn
This file includes all the types the logdecoder script will decode.