EduArt Sensor Ring Library 3.0.0
Loading...
Searching...
No Matches
HTPA32_Device.hpp
Go to the documentation of this file.
1// Copyright (c) 2026 EduArt Robotik GmbH
2
9
10#pragma once
11
12#include <chrono>
13#include <future>
14#include <memory>
15#include <vector>
16
18#include "sensorring/device/hardware/htpa32/HTPA32_Params.hpp"
21#include "sensorring/platform/SensorringExport.hpp"
22
23namespace eduart {
24
25namespace device {
26
27class HTPA32_DeviceImpl;
28
33class SENSORRING_EXPORT HTPA32_Device : public BaseDevice {
34public:
41 HTPA32_Device(HTPA32_Params params, com::ComInterfaceID interface, unsigned int idx);
42
45
50 const HTPA32_Params& getParams() const;
51
56 std::pair<const measurement::GrayscaleImage&, DeviceState> getLatestGrayscaleImage() const;
61 std::pair<const measurement::FalseColorImage&, DeviceState> getLatestFalseColorImage() const;
62
68 std::future<bool> getEepromAsync(std::chrono::milliseconds timeout);
79 bool startCalibration(unsigned int window);
84 std::pair<const measurement::ThermalMeasurement&, DeviceState> getLatestMeasurement() const;
85
86 // std::future<bool> requestThermalMeasurementAsync(std::chrono::milliseconds timeout);
87 // std::future<bool> fetchThermalMeasurementAsync(std::chrono::milliseconds timeout);
94 static std::future<bool> requestThermalMeasurementAsync(const std::vector<HTPA32_Device*>& devices, std::chrono::milliseconds timeout);
101 static std::future<bool> fetchThermalMeasurementAsync(const std::vector<HTPA32_Device*>& devices, std::chrono::milliseconds timeout);
102
103private:
109 void comCallback(const com::ComEndpoint source, const std::vector<uint8_t>& data) override;
110
111 void onResetSensorState() override;
112 void onClearDataFlag() override;
113
114 friend class HTPA32_DeviceImpl;
115 std::unique_ptr<HTPA32_DeviceImpl> _impl;
116};
117
118} // namespace device
119
120} // namespace eduart
Base device combining IDevice and BaseSensor with device ID and state.
Interface type definition.
Structures for thermal measurements.
Uniquely identifies a communication endpoint by its string ID.
Definition ComEndpoint.hpp:25
BaseDevice(DeviceID id, com::ComInterface *interface, com::ComEndpoint target, bool enable)
Constructs the device with the given ID, communication interface, endpoint, and enable flag.
HTPA32_Device(HTPA32_Params params, com::ComInterfaceID interface, unsigned int idx)
Construct a new HTPA32 device instance.
std::pair< const measurement::ThermalMeasurement &, DeviceState > getLatestMeasurement() const
Get the latest thermal measurement and current sensor state.
const HTPA32_Params & getParams() const
Get the sensor parameters used to configure this device.
std::pair< const measurement::GrayscaleImage &, DeviceState > getLatestGrayscaleImage() const
Get the most recent grayscale image and current sensor state.
static std::future< bool > fetchThermalMeasurementAsync(const std::vector< HTPA32_Device * > &devices, std::chrono::milliseconds timeout)
Fetch thermal measurements asynchronously from a set of devices.
std::pair< const measurement::FalseColorImage &, DeviceState > getLatestFalseColorImage() const
Get the most recent false-color image and current sensor state.
bool startCalibration(unsigned int window)
Start a thermal calibration over a sliding window of frames.
static std::future< bool > requestThermalMeasurementAsync(const std::vector< HTPA32_Device * > &devices, std::chrono::milliseconds timeout)
Request thermal measurements asynchronously on a set of devices.
bool stopCalibration()
Stop any ongoing thermal calibration sequence.
std::future< bool > getEepromAsync(std::chrono::milliseconds timeout)
Request the EEPROM content asynchronously.
Definition ComInterfaceID.hpp:32
Parameter structure of the thermal sensor of a sensor board.
Definition HTPA32_Params.hpp:21