EduArt Sensor Ring Library 4.0.0
Loading...
Searching...
No Matches
DeviceType.hpp
Go to the documentation of this file.
1// Copyright (c) 2026 EduArt Robotik GmbH
2
9
10#pragma once
11
12#include <ostream>
13#include <string>
14
15#include "sensorring/platform/SensorringExport.hpp"
16
17namespace eduart {
18
19namespace sensorring {
20
21namespace device {
22
47
52SENSORRING_EXPORT std::string toString(DeviceType type) noexcept;
53
57SENSORRING_EXPORT bool isCategory(DeviceType type) noexcept;
58
63SENSORRING_EXPORT bool deviceMatchesExpected(DeviceType actual, DeviceType expected) noexcept;
64
71SENSORRING_EXPORT std::ostream& operator<<(std::ostream& os, const DeviceType type) noexcept;
72
73} // namespace device
74
75} // namespace sensorring
76
77} // namespace eduart
SENSORRING_EXPORT bool deviceMatchesExpected(DeviceType actual, DeviceType expected) noexcept
Returns true if actual matches expected exactly, or if expected is a category wildcard and actual bel...
DeviceType
Supported device hardware types used for device registration and grouping.
Definition DeviceType.hpp:27
@ AnyDepth
Category wildcard: matches any depth sensor (VL53L8CX, TMF8829, ...).
Definition DeviceType.hpp:41
@ HTPA32
Thermal sensor (HTPA32).
Definition DeviceType.hpp:33
@ WS2812b
LED strip (WS2812b).
Definition DeviceType.hpp:35
@ AnyThermal
Category wildcard: matches any thermal sensor (HTPA32, ...).
Definition DeviceType.hpp:43
@ SensorBoard
Base board (for reset, firmware revision, etc.).
Definition DeviceType.hpp:29
@ AnyLight
Category wildcard: matches any light device (WS2812b, ...).
Definition DeviceType.hpp:45
@ VL53L8CX
Time-of-flight sensor (VL53L8CX).
Definition DeviceType.hpp:31
@ TMF8829
Time-of-flight sensor (TMF8829).
Definition DeviceType.hpp:37
SENSORRING_EXPORT bool isCategory(DeviceType type) noexcept
Returns true if type is a category wildcard (AnyDepth, AnyThermal, AnyLight).
SENSORRING_EXPORT std::ostream & operator<<(std::ostream &os, ResolutionMode mode) noexcept
Output stream operator for the ResolutionMode enum class members.
SENSORRING_EXPORT std::string toString(ResolutionMode mode) noexcept
Function to convert the ResolutionMode enum class members to string.