![]() |
EduArt Sensor Ring Library 4.0.0
|
Device wrapper for an HTPA32 thermal sensor on the sensorring bus. More...
#include <HTPA32_Device.hpp>
Public Member Functions | |
| HTPA32_Device (HTPA32_Params params, com::ComInterfaceID interface, unsigned int idx) | |
| Construct a new HTPA32 device instance. | |
| ~HTPA32_Device () | |
| Destructor. | |
| const HTPA32_Params & | getParams () const override |
| Get the sensor parameters used to configure this device. | |
| bool | configure () override |
| Configure the device. Reads the EEPROM once on first call. | |
| std::future< bool > | getEepromAsync (std::chrono::milliseconds timeout) |
| Request the EEPROM content asynchronously. | |
| bool | stopCalibration () override |
| Stop any ongoing thermal calibration sequence. | |
| bool | startCalibration (unsigned int window) override |
| Start a thermal calibration over a sliding window of frames. | |
| Public Member Functions inherited from eduart::sensorring::device::ThermalSensor | |
| ThermalSensor (DeviceID id, com::ComInterface *interface, com::ComEndpoint target) | |
| Construct a ThermalSensor with Device params. | |
| ~ThermalSensor () override=default | |
| Virtual destructor. | |
| const measurement::ThermalMeasurement & | getLatestMeasurement () const |
| Get the most recent measurement. | |
| subscription::Subscription | subscribe (std::function< void(const measurement::ThermalMeasurement &)> callback) |
| Subscribe to thermal measurements from this sensor. | |
| virtual void | publishMeasurement () |
| Build a ThermalMeasurement from internal state and publish to all subscribers. | |
| Public Member Functions inherited from eduart::sensorring::device::Sensor | |
| Sensor (DeviceID id, com::ComInterface *interface, com::ComEndpoint target) | |
| Construct the sensor with identity and communication link. | |
| std::future< bool > | measure (std::uint8_t sequence_number) |
| std::future< bool > | fetch () |
| std::future< bool > | beginMeasurementWait () |
| Begin an asynchronous wait for the next measurement trigger. | |
| void | setMeasurementReady (bool success) |
| Satisfy the pending measurement-wait future. | |
| std::future< bool > | beginDataAvailableWait () |
| Begin an asynchronous wait for new data to become available. | |
| void | setDataAvailableReady (bool success) |
| Satisfy the pending data-available-wait future. | |
| void | resetSensorState () |
| Reset the device to its initialised state, clearing all error flags. | |
| void | clearDataFlag () |
| Clear the data-available flag so the device can accept the next measurement cycle. | |
| Public Member Functions inherited from eduart::sensorring::device::Device | |
| Device (DeviceID id, com::ComInterface *interface, com::ComEndpoint target) | |
| Construct the device with identity and communication link. | |
| DeviceID | getDeviceID () const |
| Return the full device identifier (type + index). | |
| unsigned int | getHwIdx () const |
| Return the zero-based hardware board index on its bus (used for CAN addressing and protocol bitmasks). | |
| void | setDeviceIndex (unsigned int index) |
| Reassign the logical device index (DeviceID.index) without changing the hardware index. | |
| void | setBoardContext (const board::SensorBoardParams *board_params) |
| Initialize board-level context pointer (non-owning). | |
| const board::SensorBoardParams * | getBoardContext () const |
| Return the board-level context pointer (non-owning). | |
| void | setPoseOffset (const math::Pose &offset) |
| Store a pose offset relative to the board centre. | |
| math::Pose | getPoseOffset () const |
| Return the stored pose offset relative to the board centre. | |
| math::Pose | getGlobalPose () const |
| Compute and return the global pose in the ring coordinate frame. | |
| Public Member Functions inherited from eduart::sensorring::ActionDispatcher | |
| void | setQueue (ActionQueue *queue) |
| void | clearQueue () |
| bool | isManaged () const |
| void | execute (Action action) |
| void | execute (std::string_view key, Action action) |
Protected Member Functions | |
| bool | sendMeasurementRequest (std::uint8_t sequence_number) override |
| bool | sendMeasurementTransmissionRequest () override |
| Protected Member Functions inherited from eduart::sensorring::device::Sensor | |
| virtual void | onResetSensorState () |
| Protected Member Functions inherited from eduart::sensorring::device::Device | |
| virtual void | comCallback (const com::ComEndpoint source, std::uint8_t command, const std::vector< std::uint8_t > &data)=0 |
Friends | |
| class | HTPA32_DeviceImpl |
| class | HTPA32_DeviceTestAccess |
Additional Inherited Members | |
| Public Types inherited from eduart::sensorring::device::ThermalSensor | |
| using | MeasurementType = measurement::ThermalMeasurement |
| Measurement type produced by this sensor category. | |
| Static Public Member Functions inherited from eduart::sensorring::ActionDispatcher | |
| static void | globalExecute (Action action) |
| Protected Attributes inherited from eduart::sensorring::device::ThermalSensor | |
| measurement::ThermalMeasurement | _latest_measurement |
| subscription::Publisher< const measurement::ThermalMeasurement & > | _thermal_publisher |
| Publisher that delivers thermal measurements to subscribers. | |
| Protected Attributes inherited from eduart::sensorring::device::Sensor | |
| DeviceState | _state |
| std::mutex | _state_mutex |
| std::mutex | _promise_mutex |
| std::optional< std::promise< bool > > | _data_available_promise |
| std::optional< std::promise< bool > > | _measurement_promise |
| Protected Attributes inherited from eduart::sensorring::device::Device | |
| DeviceID | _id |
| unsigned int | _hw_idx |
| com::ComInterface * | _interface |
| const board::SensorBoardParams * | _board_params = nullptr |
| math::Pose | _offset |
| subscription::Subscription | _com_subscription |
Device wrapper for an HTPA32 thermal sensor on the sensorring bus.
Measurements contain a reconstructed row-major temperature image. A board orientation of Left rotates the image by 180 degrees; Right and None leave its mounting orientation unchanged. Calibration remains in sensor order.
| eduart::sensorring::device::HTPA32_Device::HTPA32_Device | ( | HTPA32_Params | params, |
| com::ComInterfaceID | interface, | ||
| unsigned int | idx ) |
Construct a new HTPA32 device instance.
| [in] | params | Sensor configuration parameters. |
| [in] | interface | Communication interface used to talk to the device. |
| [in] | idx | Index of the sensor on the bus. |
|
overridevirtual |
Configure the device. Reads the EEPROM once on first call.
Reimplemented from eduart::sensorring::device::Device.
| std::future< bool > eduart::sensorring::device::HTPA32_Device::getEepromAsync | ( | std::chrono::milliseconds | timeout | ) |
Request the EEPROM content asynchronously.
| [in] | timeout | Maximum time to wait for completion. |
|
overridevirtual |
Get the sensor parameters used to configure this device.
Implements eduart::sensorring::device::ThermalSensor.
|
overrideprotectedvirtual |
Implements eduart::sensorring::device::Sensor.
|
overrideprotectedvirtual |
Implements eduart::sensorring::device::Sensor.
|
overridevirtual |
Start a thermal calibration over a sliding window of frames.
| [in] | window | Number of frames to average for calibration. |
Implements eduart::sensorring::device::ThermalSensor.
|
overridevirtual |
Stop any ongoing thermal calibration sequence.
Implements eduart::sensorring::device::ThermalSensor.