rec::robotino::com::DistanceSensor Class Reference

Represents an IR distance sensor. More...

#include <DistanceSensor.h>

List of all members.

Public Member Functions

void setSensorNumber (unsigned int n)
float voltage () const
unsigned int heading () const

Static Public Member Functions

static unsigned int numDistanceSensors ()


Detailed Description

Represents an IR distance sensor.

Member Function Documentation

static unsigned int rec::robotino::com::DistanceSensor::numDistanceSensors (  )  [static]

Returns:
Returns the number of distance sensors.

void rec::robotino::com::DistanceSensor::setSensorNumber ( unsigned int  n  ) 

Sets the number of this distance sensor.

Parameters:
n The input number. Range [0; Robotstate::numDistanceSensors]
Exceptions:
RobotinoException if the given sensor number is invalid.

float rec::robotino::com::DistanceSensor::voltage (  )  const

Returns the current voltage of this distance sensor. The voltage is correlated to the measured distance, see the documentation for further details. See http://www.acroname.com/robotics/info/articles/irlinear/irlinear.html for an explanation how to convert the measured voltage into distance value.

Returns:
The current voltage of this sensor.
Exceptions:
RobotinoException if the underlying communication object is invalid
See also:
setSensorNumber, Actor::setComId

unsigned int rec::robotino::com::DistanceSensor::heading (  )  const

Returns the heading of this distance sensor.

Returns:
The heading in degrees. [0; 360]
Exceptions:
RobotinoException if the underlying communication object is invalid
See also:
setSensorNumber, Actor::setComId


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

Generated on Thu Dec 30 08:47:34 2010 for rec_robotino_com_c by  doxygen 1.5.5