EduArt Sensor Ring Library 4.0.0
Loading...
Searching...
No Matches
MeasurementManager.hpp
Go to the documentation of this file.
1// Copyright (c) 2026 EduArt Robotik GmbH
2
9
10#pragma once
11
12#include <functional>
13#include <memory>
14
23#include "sensorring/platform/SensorringExport.hpp"
25
26namespace eduart {
27
28namespace sensorring {
29
30namespace manager {
31
33class SENSORRING_EXPORT MeasurementManagerImpl;
34
40class SENSORRING_EXPORT MeasurementManager {
41public:
48
54 MeasurementManager(ManagerParams params, std::unique_ptr<SensorRing> sensor_ring);
55
58
63 bool measureSome() noexcept;
64
69 bool startMeasuring() noexcept;
70
75 bool stopMeasuring() noexcept;
76
81 bool isMeasuring() noexcept;
82
88 subscription::Subscription subscribeToStateChanges(std::function<void(ManagerState state)> callback);
89
94 ManagerState getManagerState() const noexcept;
95
100 ManagerParams getParams() const noexcept;
101
106 device::Group<device::DepthSensor> depthSensors() const noexcept;
107
112 device::Group<device::ThermalSensor> thermalSensors() const noexcept;
113
118 device::Group<device::Light> lights() const noexcept;
119
121 SensorRing* getRing() const noexcept;
122
123private:
124 std::unique_ptr<MeasurementManagerImpl> _mm_impl;
125};
126
127} // namespace manager
128
129} // namespace sensorring
130
131} // namespace eduart
Abstract interface for depth-sensing devices (ToF, structured light, etc.).
Typed container for a group of devices with subscribe() and iteration.
Abstract interface for light/LED actuator devices.
Parameter structure for the MeasurementManager.
ManagerState and helpers for the MeasurementManager.
ManagerState
Health state of the sensorring state machine worker.
Definition ManagerState.hpp:27
class SENSORRING_EXPORT MeasurementManagerImpl
Forward declaration of implementation class.
Definition MeasurementManager.hpp:33
Factory for creating sensor rings via auto-discovery, configured expectations, or a mix of both.
Top-level container managing multiple sensor buses.
RAII wrapper pairing a SubscriberToken with its cancel function.
Abstract interface for thermal-sensing devices.
Factory for creating a SensorRing.
Definition SensorRingFactory.hpp:76
Top-level container managing multiple sensor buses and coordinating operations across them.
Definition SensorRing.hpp:31
MeasurementManager(ManagerParams params, std::unique_ptr< SensorRing > sensor_ring)
Construct the manager from a pre-built SensorRing (expert-user constructor).
ManagerState getManagerState() const noexcept
Return the current health state of the state machine worker.
ManagerParams getParams() const noexcept
Return the parameters used to initialize the manager.
bool isMeasuring() noexcept
Report whether the measurement worker thread is running.
MeasurementManager(ManagerParams params, SensorRingFactory &factory)
Construct the manager from a configured factory. Builds the SensorRing internally.
SensorRing * getRing() const noexcept
Access the underlying sensor ring.
subscription::Subscription subscribeToStateChanges(std::function< void(ManagerState state)> callback)
Subscribe to state changes; callback is invoked when the state changes.
bool startMeasuring() noexcept
Start the state machine worker loop in a dedicated thread.
device::Group< device::Light > lights() const noexcept
Return all lights.
device::Group< device::DepthSensor > depthSensors() const noexcept
Return all depth sensors.
bool measureSome() noexcept
Run one processing cycle of the state machine worker.
bool stopMeasuring() noexcept
Stop the state machine worker loop and join the thread.
device::Group< device::ThermalSensor > thermalSensors() const noexcept
Return all thermal sensors.
Parameter structure of the MeasurementManager. The MeasurementManager handles the timing and communic...
Definition ManagerParams.hpp:26