rec::robotino::api2 C++ interface
Public Member Functions | Static Public Member Functions | Friends | List of all members
rec::robotino::api2::LaserRangeFinder Class Reference

Access to Robotino's (optional) laser rangefinder. More...

#include <LaserRangeFinder.h>

Inheritance diagram for rec::robotino::api2::LaserRangeFinder:
rec::robotino::api2::ComObject

Public Member Functions

 LaserRangeFinder (const ComId &id)
 
void setLaserRangeFinderNumber (int number)
 
int laserRangeFinderNumber () const
 
void setComId (const ComId &id)
 
LaserRangeFinderReadings readings () const
 
virtual void scanEvent (const LaserRangeFinderReadings &scan)
 
- Public Member Functions inherited from rec::robotino::api2::ComObject
 ComObject ()
 
virtual ~ComObject ()
 
ComId comId () const
 

Static Public Member Functions

static unsigned int numLaserRangeFinders ()
 

Friends

class LaserRangeFinderImpl
 

Additional Inherited Members

- Protected Attributes inherited from rec::robotino::api2::ComObject
ComId _comID
 

Detailed Description

Access to Robotino's (optional) laser rangefinder.

Member Function Documentation

int rec::robotino::api2::LaserRangeFinder::laserRangeFinderNumber ( ) const

Get the current camera number.

Returns
Returns the current rangefinder number or -1 if no rangefinder is selected.
Exceptions
nothing
See also
setLaserRangeFinderNumber
static unsigned int rec::robotino::api2::LaserRangeFinder::numLaserRangeFinders ( )
static
Returns
Returns the number of supported rangefinders.
LaserRangeFinderReadings rec::robotino::api2::LaserRangeFinder::readings ( ) const

Get the current readings.

Returns
The latest readings.
Exceptions
nothing
Remarks
This function is thread save
virtual void rec::robotino::api2::LaserRangeFinder::scanEvent ( const LaserRangeFinderReadings scan)
virtual

Called when new scan data is available.

Parameters
scanThe sensor readings.
Remarks
This function is called from the thread in which Com::processEvents() is called.
See also
Com::processEvents
void rec::robotino::api2::LaserRangeFinder::setComId ( const ComId id)

Sets the associated communication object.

Parameters
idThe id of the associated communication object.
Exceptions
RobotinoExceptionif given id is invalid.
Remarks
This function is thread save
void rec::robotino::api2::LaserRangeFinder::setLaserRangeFinderNumber ( int  number)

Sets the number of this rangefinder device.

Set the number of this rangefinder to number. The default rangefinder number is 0. Setting the rangefinder number only makes sense when your Robotino is equipped with more than one rangefinder.

Parameters
numberThe rangefinder number. Range [0; numLaserRangeFinders()-1]. When setting number < 0 no rangefinder is selected.
Exceptions
RobotinoExceptionif the given input number is out of range. RobotinoException if given com object is invalid.
See also
numCameras

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