25#include <IceUtil/Time.h>
100 const IceUtil::Time& timeSinceLastIteration)
107 std::atomic<RobotUnitModule::Devices*> owner{
nullptr};
110 template <
class SensorValueType>
113 static_assert(std::is_base_of<SensorValueBase, SensorValueType>::value,
114 "SensorValueType has to inherit SensorValueBase");
133 return getSensorValue()->getSensorValueType(withoutNamespaceSpecifier);
142 template <
class SensorValueType>
143 inline const SensorValueType*
#define TYPEDEF_PTRS_SHARED(T)
#define TYPEDEF_PTRS_HANDLE(T)
DeviceBase(const std::string &name)
Create a Device with the given name.
This Module manages sensor and control devices for a RobotUnit and only allows save and sane access.
SensorDeviceTemplate(const std::string &name)
const SensorValueType * getSensorValue() const final override
SensorValueType sensorValue
This class represents some part of the robot providing sensor values.
virtual std::string getReportingFrame() const
std::string getSensorValueType(bool withoutNamespaceSpecifier=false) const
Returns the SensorValue's type as a string.
const T * getSensorValue() 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.
static const SensorDevicePtr NullPtr
A static const nullptr in case a const ref to a nullptr needs to be returned.
SensorDevice(const std::string &name)
Create a SensorDevice with the given name.
virtual const SensorValueBase * getSensorValue() const =0
The SensorValueBase class.
This file offers overloads of toIce() and fromIce() functions for STL container types.