EduArt Sensor Ring Library 4.0.0
Loading...
Searching...
No Matches
DeviceID.hpp
Go to the documentation of this file.
1// Copyright (c) 2026 EduArt Robotik GmbH
2
9
10#pragma once
11
12#include <string>
13
15#include "sensorring/platform/SensorringExport.hpp"
16
17namespace eduart {
18
19namespace sensorring {
20
21namespace device {
22
27struct SENSORRING_EXPORT DeviceID {
28public:
31
33 unsigned int index = 0;
34
39 DeviceType getType() const;
40
45 unsigned int getIndex() const;
46
51 bool isValid() const;
52};
53
55 return type;
56}
57
58inline unsigned int DeviceID::getIndex() const {
59 return index;
60}
61
62inline bool DeviceID::isValid() const {
64}
65
66} // namespace device
67
68} // namespace sensorring
69
70} // namespace eduart
Enumeration of supported device hardware types.
DeviceType
Supported device hardware types used for device registration and grouping.
Definition DeviceType.hpp:27
@ Undefined
Undefined device type.
Definition DeviceType.hpp:39
Identifier for a device: type, human-readable name, and index.
Definition DeviceID.hpp:27
DeviceType getType() const
Returns the hardware device type.
Definition DeviceID.hpp:54
unsigned int index
Instance index when multiple devices of same type exist.
Definition DeviceID.hpp:33
DeviceType type
Hardware device type.
Definition DeviceID.hpp:30
bool isValid() const
Check if the device ID belongs to a valid device.
Definition DeviceID.hpp:62
unsigned int getIndex() const
Returns the instance index when multiple devices of the same type exist.
Definition DeviceID.hpp:58