SensorDeviceTemplate< SensorValueType > Class Template Reference

#include <RobotAPI/components/units/RobotUnit/Devices/SensorDevice.h>

+ Inheritance diagram for SensorDeviceTemplate< SensorValueType >:

Public Member Functions

const SensorValueType * getSensorValue () const final override
 
 SensorDeviceTemplate (const std::string &name)
 
- Public Member Functions inherited from SensorDevice
virtual std::string getReportingFrame () const
 
template<class T>
const T * getSensorValue () const
 
std::string getSensorValueType (bool withoutNamespaceSpecifier=false) const
 Returns the SensorValue's type as a string.
 
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.
 
 SensorDevice (const std::string &name)
 Create a SensorDevice with the given name.
 
- Public Member Functions inherited from DeviceBase
 DeviceBase (const std::string &name)
 Create a Device with the given name.
 
const std::string & getDeviceName () const
 
const std::set< std::string > & getTags () const
 
virtual bool hasError ()
 
bool hasTag (const std::string &tag) const
 
const char * rtGetDeviceName () const
 
virtual ~DeviceBase ()=default
 

Public Attributes

SensorValueType sensorValue
 

Additional Inherited Members

- Static Public Attributes inherited from SensorDevice
static const SensorDevicePtr NullPtr {nullptr}
 A static const nullptr in case a const ref to a nullptr needs to be returned.
 
- Protected Member Functions inherited from DeviceBase
void addDeviceTag (const std::string &tag)
 adds the given tag to the Device
 

Constructor & Destructor Documentation

◆ SensorDeviceTemplate()

template<class SensorValueType>
SensorDeviceTemplate ( const std::string & name)
inline

Member Function Documentation

◆ getSensorValue()

template<class SensorValueType>
const SensorValueType * getSensorValue ( ) const
inlinefinaloverridevirtual
Returns
The SensorDevice's sensor value

Implements SensorDevice.

Member Data Documentation

◆ sensorValue

template<class SensorValueType>
SensorValueType sensorValue

The documentation for this class was generated from the following file: