17#include "sensorring/platform/SensorringExport.hpp"
Thread-safe, deadlock-free publish/subscribe template.
Base class for all sensor devices, adding measurement synchronisation to Device.
RAII wrapper pairing a SubscriberToken with its cancel function.
Structures for thermal measurements.
Parameter structure for the ThermalSensorParams.
Sensor(DeviceID id, com::ComInterface *interface, com::ComEndpoint target)
Construct the sensor with identity and communication link.
ThermalSensor(DeviceID id, com::ComInterface *interface, com::ComEndpoint target)
Construct a ThermalSensor with Device params.
virtual bool startCalibration(unsigned int window)=0
Start a thermal calibration over a sliding window of frames.
measurement::ThermalMeasurement MeasurementType
Measurement type produced by this sensor category.
Definition ThermalSensor.hpp:39
~ThermalSensor() override=default
Virtual destructor.
virtual bool stopCalibration()=0
Stop any ongoing thermal calibration sequence.
subscription::Publisher< const measurement::ThermalMeasurement & > _thermal_publisher
Publisher that delivers thermal measurements to subscribers.
Definition ThermalSensor.hpp:93
const measurement::ThermalMeasurement & getLatestMeasurement() const
Get the most recent measurement.
virtual const ThermalSensorParams & getParams() const =0
Get the current ThermalSensor parameters.
virtual void publishMeasurement()
Build a ThermalMeasurement from internal state and publish to all subscribers.
subscription::Subscription subscribe(std::function< void(const measurement::ThermalMeasurement &)> callback)
Subscribe to thermal measurements from this sensor.
Definition ThermalSensor.hpp:69
Generic thread-safe publisher that manages callback subscriptions.
Definition Publisher.hpp:37
Move-only RAII wrapper that pairs a SubscriberToken with an unsubscribe callable. Destroying a Subscr...
Definition Subscription.hpp:32
Uniquely identifies a communication endpoint as a (Direction, BoardAddress, DeviceId) tuple.
Definition ComEndpoint.hpp:37
Identifier for a device: type, human-readable name, and index.
Definition DeviceID.hpp:27
Parameter structure of the ThermalSensorParams.
Definition ThermalSensorParams.hpp:25
Structure for holding a measurement from a thermal sensor.
Definition ThermalMeasurement.hpp:79