EduArt Sensor Ring Library 3.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
16namespace eduart {
17
18namespace device {
19
24struct DeviceID {
25public:
28
30 unsigned int index = 0;
31
36 DeviceType getType() const;
37
42 unsigned int getIndex() const;
43
48 bool isValid() const;
49};
50
52 return type;
53}
54
55inline unsigned int DeviceID::getIndex() const {
56 return index;
57}
58
59inline bool DeviceID::isValid() const {
61}
62
63} // namespace device
64
65} // namespace eduart
Enumeration of supported device hardware types.
DeviceType
Supported device hardware types used for device registration and grouping.
Definition DeviceType.hpp:25
@ UNDEFINED
Undefined device type.
Definition DeviceType.hpp:33
Identifier for a device: type, human-readable name, and index.
Definition DeviceID.hpp:24
unsigned int getIndex() const
Returns the instance index when multiple devices of the same type exist.
Definition DeviceID.hpp:55
bool isValid() const
Check if the device ID belongs to a valid device.
Definition DeviceID.hpp:59
unsigned int index
Instance index when multiple devices of same type exist.
Definition DeviceID.hpp:30
DeviceType type
Hardware device type.
Definition DeviceID.hpp:27
DeviceType getType() const
Returns the hardware device type.
Definition DeviceID.hpp:51