Sensor Class Reference

Abstract class for sensors that have no specific position at the robots skeleton. More...

#include <sensor.h>

Inherited by AxisOrientationSensor, RelativePositionSensor, and SpeedSensor.

Inheritance diagram for Sensor:

Inheritance graph
[legend]
List of all members.

Public Types

enum  Dimensions { X = 1, Y = 2, Z = 4 }
 defines which dimensions should be sensed. The meaning is sensor specific. More...

Public Member Functions

 Sensor ()
virtual ~Sensor ()
virtual void init (Primitive *own)=0
 initialises sensor with body of robot.
virtual bool sense (const GlobalData &globaldata)=0
 performs sense action
virtual int getSensorNumber () const =0
 returns the number of sensors values produced by this sensor
virtual std::list< sensorget () const =0
 returns a list of sensor values (usually in the range [0,1] )
virtual int get (sensor *sensors, int length) const =0
 writes the sensor values (usually in the range [0,1] ) into the giben sensor array and returns the number of sensors written

Static Public Member Functions

std::list< sensorselectrows (const matrix::Matrix &m, short dimensions)
 selects the rows specified by dimensions (X->0, Y->1, Z->2)
int selectrows (sensor *sensors, int length, const matrix::Matrix &m, short dimensions)
 selects the rows specified by dimensions (X->0, Y->1, Z->2)

Detailed Description

Abstract class for sensors that have no specific position at the robots skeleton.


Member Enumeration Documentation

enum Dimensions
 

defines which dimensions should be sensed. The meaning is sensor specific.

Enumeration values:
X 
Y 
Z 


Constructor & Destructor Documentation

Sensor  )  [inline]
 

virtual ~Sensor  )  [inline, virtual]
 


Member Function Documentation

virtual int get sensor sensors,
int  length
const [pure virtual]
 

writes the sensor values (usually in the range [0,1] ) into the giben sensor array and returns the number of sensors written

Parameters:
sensors call by refernce array which received the values
length capacity of sensors array
Returns:
number of sensor values written

Implemented in AxisOrientationSensor, RelativePositionSensor, and SpeedSensor.

virtual std::list<sensor> get  )  const [pure virtual]
 

returns a list of sensor values (usually in the range [0,1] )

Implemented in AxisOrientationSensor, RelativePositionSensor, and SpeedSensor.

virtual int getSensorNumber  )  const [pure virtual]
 

returns the number of sensors values produced by this sensor

Implemented in AxisOrientationSensor, RelativePositionSensor, and SpeedSensor.

virtual void init Primitive own  )  [pure virtual]
 

initialises sensor with body of robot.

This is usually done by the robot itself.

Implemented in AxisOrientationSensor, RelativePositionSensor, and SpeedSensor.

int selectrows sensor sensors,
int  length,
const matrix::Matrix m,
short  dimensions
[inline, static]
 

selects the rows specified by dimensions (X->0, Y->1, Z->2)

std::list<sensor> selectrows const matrix::Matrix m,
short  dimensions
[inline, static]
 

selects the rows specified by dimensions (X->0, Y->1, Z->2)

virtual bool sense const GlobalData globaldata  )  [pure virtual]
 

performs sense action

Implemented in AxisOrientationSensor, RelativePositionSensor, and SpeedSensor.


The documentation for this class was generated from the following file:
Generated on Tue Jan 16 02:14:56 2007 for Robotsystem of the Robot Group Leipzig by doxygen 1.3.8