Orocos Real-Time Toolkit  2.9.0
Public Types | Public Member Functions | Protected Attributes | List of all members
RTT::dev::SensorInterface< SensorData > Class Template Referenceabstract

An interface that describes a general sensor You can read a value/structure. More...

#include <rtt/extras/dev/rtt-dev-fwd.hpp>

Inheritance diagram for RTT::dev::SensorInterface< SensorData >:
RTT::dev::CalibrationInterface

Public Types

typedef SensorData DataType
 

Public Member Functions

virtual ~SensorInterface ()
 
virtual int readSensor (DataType &p) const =0
 Read the Data, the structure that this sensor 'exports'. More...
 
virtual DataType readSensor () const =0
 Return the last measurement. More...
 
virtual DataType maxMeasurement () const =0
 Returns the maximum value this sensor can read. More...
 
virtual DataType minMeasurement () const =0
 Returns the minimum value this sensor can read. More...
 
virtual DataType zeroMeasurement () const =0
 Returns the value which would be given with the sensor in ideal rest. More...
 
virtual void calibrate ()
 Start or perform calibration. More...
 
virtual bool isCalibrated () const
 Inspect if a calibration has been done. More...
 
virtual void unCalibrate ()
 Undo any previous calibration ( this function may have no effect ). More...
 

Protected Attributes

bool calibrated
 

Detailed Description

template<class SensorData>
class RTT::dev::SensorInterface< SensorData >

An interface that describes a general sensor You can read a value/structure.

The OutputData is the actual SI unit of the measured data (e.g. force, velocity,...) and is in case of a 1D sensor a double.

If the sensor is not calibrated, the minMeasurement() and maxMeasurement() functions should return std::numeric_limits<SensorData>::min() and std::numeric_limits<SensorData>::max() respectively.

See also
CalibrationInterface

Definition at line 61 of file rtt-dev-fwd.hpp.

Member Typedef Documentation

template<class SensorData >
typedef SensorData RTT::dev::SensorInterface< SensorData >::DataType

Definition at line 73 of file SensorInterface.hpp.

Constructor & Destructor Documentation

template<class SensorData >
virtual RTT::dev::SensorInterface< SensorData >::~SensorInterface ( )
inlinevirtual

Definition at line 70 of file SensorInterface.hpp.

Member Function Documentation

virtual void RTT::dev::CalibrationInterface::calibrate ( )
inlinevirtualinherited

Start or perform calibration.

Definition at line 62 of file CalibrationInterface.hpp.

virtual bool RTT::dev::CalibrationInterface::isCalibrated ( ) const
inlinevirtualinherited

Inspect if a calibration has been done.

Returns
True if so.

Definition at line 70 of file CalibrationInterface.hpp.

template<class SensorData >
virtual DataType RTT::dev::SensorInterface< SensorData >::maxMeasurement ( ) const
pure virtual

Returns the maximum value this sensor can read.

template<class SensorData >
virtual DataType RTT::dev::SensorInterface< SensorData >::minMeasurement ( ) const
pure virtual

Returns the minimum value this sensor can read.

template<class SensorData >
virtual int RTT::dev::SensorInterface< SensorData >::readSensor ( DataType p) const
pure virtual

Read the Data, the structure that this sensor 'exports'.

Returns
0 on success
-1 on failure
template<class SensorData >
virtual DataType RTT::dev::SensorInterface< SensorData >::readSensor ( ) const
pure virtual

Return the last measurement.

virtual void RTT::dev::CalibrationInterface::unCalibrate ( )
inlinevirtualinherited

Undo any previous calibration ( this function may have no effect ).

Definition at line 76 of file CalibrationInterface.hpp.

template<class SensorData >
virtual DataType RTT::dev::SensorInterface< SensorData >::zeroMeasurement ( ) const
pure virtual

Returns the value which would be given with the sensor in ideal rest.

Member Data Documentation

bool RTT::dev::CalibrationInterface::calibrated
protectedinherited

Definition at line 55 of file CalibrationInterface.hpp.


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