RTT::SensorInterface< SensorData > Class Template Reference
[Device Interfaces]

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

#include <rtt/dev/SensorInterface.hpp>

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

List of all members.

Public Types

typedef SensorData DataType

Public Member Functions

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

Protected Attributes

bool calibrated

Detailed Description

template<class SensorData>
class RTT::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 65 of file SensorInterface.hpp.


Member Function Documentation

virtual bool RTT::CalibrationInterface::isCalibrated (  )  const [inline, virtual, inherited]

Inspect if a calibration has been done.

Returns:
True if so.

Definition at line 69 of file CalibrationInterface.hpp.

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

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

Returns:
0 on success
-1 on failure

The documentation for this class was generated from the following file:
Generated on Thu Dec 23 13:22:42 2010 for Orocos Real-Time Toolkit by  doxygen 1.6.3