EduArt Sensor Ring Library 3.0.0
Loading...
Searching...
No Matches
BaseDevice.hpp
Go to the documentation of this file.
1// Copyright (c) 2026 EduArt Robotik GmbH
2
9
10#pragma once
11
13
14#include "BaseSensor.hpp"
15#include "DeviceID.hpp"
16#include "DeviceState.hpp"
17#include "IDevice.hpp"
18
19namespace eduart {
20
21namespace device {
22
24class SENSORRING_EXPORT DeviceImpl;
25
38
43class SENSORRING_EXPORT BaseDevice : public IDevice, public BaseSensor {
44public:
52 BaseDevice(DeviceID id, com::ComInterface* interface, com::ComEndpoint target, bool enable);
53
59
64 void setPoseOffset(const DevicePoseOffset& offset) { _pose_offset = offset; }
65
71
72 // void setEnable(bool enable);
73 // bool getEnable() const;
74
75protected:
78
81
83 bool _enable;
84
87 { 0.0, 0.0, 0.0 },
88 { 0.0, 0.0, 0.0 }
89 };
90};
91
92} // namespace device
93
94} // namespace eduart
class SENSORRING_EXPORT DeviceImpl
Forward declaration of implementation of BaseDevice.
Definition BaseDevice.hpp:24
Base class for sensors using a communication interface.
Device identifier (type, name, index) for device registration.
Unified device state enum covering lifecycle and runtime health.
DeviceState
Unified lifecycle and runtime state of a device.
Definition DeviceState.hpp:28
Collection of math functions.
Uniquely identifies a communication endpoint by its string ID.
Definition ComEndpoint.hpp:25
bool _enable
Whether the device is enabled.
Definition BaseDevice.hpp:83
DeviceID getDeviceID() const
Returns the device identifier.
BaseDevice(DeviceID id, com::ComInterface *interface, com::ComEndpoint target, bool enable)
Constructs the device with the given ID, communication interface, endpoint, and enable flag.
void setPoseOffset(const DevicePoseOffset &offset)
Set the pose offset of this device relative to the board center.
Definition BaseDevice.hpp:64
DevicePoseOffset _pose_offset
Pose offset of the device relative to the sensor board center.
Definition BaseDevice.hpp:86
DevicePoseOffset getPoseOffset() const
Get the pose offset of this device relative to the board center.
Definition BaseDevice.hpp:70
DeviceID _id
Device identifier.
Definition BaseDevice.hpp:80
DeviceState _state
Current lifecycle/runtime state.
Definition BaseDevice.hpp:77
BaseSensor(com::ComInterface *interface, com::ComEndpoint target, unsigned int idx, bool enable)
Construct a base sensor and register it with the communication interface.
Identifier for a device: type, human-readable name, and index.
Definition DeviceID.hpp:24
Pose offset of a device relative to the center of its sensor board.
Definition BaseDevice.hpp:30
math::Vector3 board_center_translation_offset
Translation offset from the board center.
Definition BaseDevice.hpp:33
math::Vector3 board_center_rotation_offset
Rotation offset from the board center.
Definition BaseDevice.hpp:36
Thin base interface for all concrete devices in the SensorRing.
Definition IDevice.hpp:18
Vector of length 3.
Definition Vector3.hpp:25