Go to the documentation of this file.
25 #include <IceUtil/Time.h>
27 #include "../SensorValues/SensorValueBase.h"
38 using namespace DeviceTags;
71 virtual const SensorValueBase* getSensorValue()
const = 0;
78 return getSensorValue()->asA<
const T*>();
87 std::string getSensorValueType(
bool withoutNamespaceSpecifier =
false)
const;
91 virtual std::string getReportingFrame()
const;
107 std::atomic<RobotUnitModule::Devices*> owner{
nullptr};
110 template <
class SensorValueType>
114 "SensorValueType has to inherit SensorValueBase");
121 const SensorValueType* getSensorValue() const final override;
123 SensorValueType sensorValue;
133 return getSensorValue()->getSensorValueType(withoutNamespaceSpecifier);
142 template <
class SensorValueType>
143 inline const SensorValueType*
static const SensorDevicePtr NullPtr
A static const nullptr in case a const ref to a nullptr needs to be returned.
virtual std::string getReportingFrame() const
virtual void rtReadSensorValues(const IceUtil::Time &sensorValuesTimestamp, const IceUtil::Time &timeSinceLastIteration)
This is a hook for implementations to read the sensor value from a bus.
const T * getSensorValue() const
TYPEDEF_PTRS_HANDLE(Devices)
TYPEDEF_PTRS_SHARED(ControlDevice)
SensorDeviceTemplate(const std::string &name)
std::shared_ptr< Value > value()
This class represents some part of the robot providing sensor values.
const SensorValueType * getSensorValue() const final override
armarx::core::time::DateTime Time
This Module manages sensor and control devices for a RobotUnit and only allows save and sane access.
std::string getSensorValueType(bool withoutNamespaceSpecifier=false) const
Returns the SensorValue's type as a string.
SensorDevice(const std::string &name)
Create a SensorDevice with the given name.
This file offers overloads of toIce() and fromIce() functions for STL container types.