![]() |
EduArt Sensor Ring Library 3.0.0
|
The public interface has two measurement related components:
In addition to the measurement related interface the library provides a logger interface:
The EduArt Sensor Ring is a system that collects and combines measurements from multiple individual sensors. The individual sensors are daisy chained together in series and share a communication interface and a power supply. The chain of sensor is terminated by a master device at one end e.g. a Raspberry Pi or a CAN to USB converter. It is possible to use multiple communication interfaces to distribute the sensor data and enable the use of more sensors simultaneously. The following class diagram illustrates the topology and the reflection of the hardware layers in the library.
The SensorRingFactory is the primary way to create a SensorRing instance. It handles hardware discovery, board validation and device instantiation in a single build() call.
The minimal workflow is:
The returned SensorRing is passed to the MeasurementManager as before:
The build() method accepts a ValidationMode that controls how expectations are matched against discovered hardware.
| Mode | Behaviour |
|---|---|
| Strict | Expectations are matched 1:1 by index against discovered boards. Any mismatch in board type, device type or board count returns nullptr. |
| Relaxed | For each expectation the factory searches all unclaimed boards for the first compatible one. Boards that are not claimed by any expectation remain unconfigured. Mismatches are logged as warnings. |
In strict mode the order and count of expectBoard() calls must match the physical bus exactly. In relaxed mode the factory finds compatible boards regardless of their position on the bus.
Auto-discovery (no expectations): every board found on the bus is used with default configuration.
Board type constraint: only boards of the specified type are accepted.
Explicit device params: only the specified device types are instantiated on the matched board.
Default device params: applied to every device of that type when no explicit params are given.
The factory can enumerate hardware without building a SensorRing:
The EnumerationMap returned by enumerate() or getLatestEnumerationResult() maps each ComInterfaceID to a vector of EnumerationInformation structs that report board type, connection state, configuration state and available device types.
The ManagerParams configure the runtime behaviour of the MeasurementManager. They are passed as constructor argument and cannot be changed after instantiation.
| Parameter | Description |
|---|---|
| timeout | Duration after which the manager shuts down automatically |
| enable_brs | Enable CAN FD bit rate switching |
| repair_errors | Attempt automatic error recovery |
| frequency_tof_hz | Target frequency for ToF measurements |
| frequency_thermal_hz | Target frequency for thermal measurements |