|
This class represents some part of the robot providing sensor values. More...
#include <RobotAPI/components/units/RobotUnit/Devices/SensorDevice.h>
Public Member Functions | |
virtual std::string | getReportingFrame () const |
template<class T > | |
const T * | getSensorValue () const |
virtual const SensorValueBase * | getSensorValue () const =0 |
std::string | getSensorValueType (bool withoutNamespaceSpecifier=false) const |
Returns the SensorValue's type as a string. More... | |
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. More... | |
SensorDevice (const std::string &name) | |
Create a SensorDevice with the given name. More... | |
Public Member Functions inherited from DeviceBase | |
DeviceBase (const std::string &name) | |
Create a Device with the given name. More... | |
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 |
Static Public Attributes | |
static const SensorDevicePtr | NullPtr {nullptr} |
A static const nullptr in case a const ref to a nullptr needs to be returned. More... | |
Friends | |
class | RobotUnitModule::Devices |
Additional Inherited Members | |
Protected Member Functions inherited from DeviceBase | |
void | addDeviceTag (const std::string &tag) |
adds the given tag to the Device More... | |
This class represents some part of the robot providing sensor values.
The SensorValue is accessed via getSensorValue.
A SensorDevice could also represent a virtual sensor reporting some status of the software (e.g. Timings): Examples for Sensorvalues are:
Definition at line 59 of file SensorDevice.h.
|
inline |
Create a SensorDevice with the given name.
Definition at line 66 of file SensorDevice.h.
|
inlinevirtual |
Reimplemented in GlobalRobotPoseSensorDevice, GlobalRobotPoseCorrectionSensorDevice, GlobalRobotPoseSimulationSensorDevice, and ForceTorqueSimulationSensorDevice.
Definition at line 137 of file SensorDevice.h.
|
inline |
Definition at line 76 of file SensorDevice.h.
|
pure virtual |
Implemented in RTThreadTimingsSensorDevice, SlaveErrorRegistersDevice, RTThreadTimingsSensorDeviceImpl< SensorValueType >, GlobalRobotPoseSensorDevice, GlobalRobotPoseCorrectionSensorDevice, GlobalRobotPoseSimulationSensorDevice, IMUSimulationSensorDevice, and SensorDeviceTemplate< SensorValueType >.
|
inline |
Returns the SensorValue's type as a string.
withoutNamespaceSpecifier | Whether namespace specifiers should be removed from the name. |
Definition at line 131 of file SensorDevice.h.
|
inlinevirtual |
This is a hook for implementations to read the sensor value from a bus.
sensorValuesTimestamp | The current timestamp |
timeSinceLastIteration | The time delta since the last call |
Reimplemented in GlobalRobotLocalizationSensorDevice, GlobalRobotPoseSensorDevice, and GlobalRobotPoseCorrectionSensorDevice.
Definition at line 99 of file SensorDevice.h.
|
friend |
Definition at line 105 of file SensorDevice.h.
|
static |
A static const nullptr in case a const ref to a nullptr needs to be returned.
Definition at line 63 of file SensorDevice.h.