#include <sensor.h>
Inherited by AxisOrientationSensor, RelativePositionSensor, and SpeedSensor.
Inheritance diagram for Sensor:

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< sensor > | get () 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< sensor > | selectrows (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) | |
|
|
defines which dimensions should be sensed. The meaning is sensor specific.
|
|
|
|
|
|
|
|
||||||||||||
|
writes the sensor values (usually in the range [0,1] ) into the giben sensor array and returns the number of sensors written
Implemented in AxisOrientationSensor, RelativePositionSensor, and SpeedSensor.
|
|
|
returns a list of sensor values (usually in the range [0,1] )
Implemented in AxisOrientationSensor, RelativePositionSensor, and SpeedSensor.
|
|
|
returns the number of sensors values produced by this sensor
Implemented in AxisOrientationSensor, RelativePositionSensor, and SpeedSensor.
|
|
|
initialises sensor with body of robot. This is usually done by the robot itself. Implemented in AxisOrientationSensor, RelativePositionSensor, and SpeedSensor.
|
|
||||||||||||||||||||
|
selects the rows specified by dimensions (X->0, Y->1, Z->2)
|
|
||||||||||||
|
selects the rows specified by dimensions (X->0, Y->1, Z->2)
|
|
|
performs sense action
Implemented in AxisOrientationSensor, RelativePositionSensor, and SpeedSensor.
|
1.3.8