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

Represents a bumper. More...

#include <Bumper.h>

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

Public Member Functions

 Bumper (const ComId &id)
 
void setComId (const ComId &id)
 
void processEvents ()
 
bool value () const
 
virtual void bumperEvent (bool hasContact)
 
- Public Member Functions inherited from rec::robotino::api2::ComObject
 ComObject ()
 
virtual ~ComObject ()
 
ComId comId () const
 

Friends

class BumperImpl
 

Additional Inherited Members

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

Detailed Description

Represents a bumper.

Member Function Documentation

virtual void rec::robotino::api2::Bumper::bumperEvent ( bool  hasContact)
virtual

Called when new readings are available.

Remarks
This function is called from the thread in which Com::processEvents() is called.
See also
Com::processEvents
void rec::robotino::api2::Bumper::processEvents ( )

Call this function from your main thread to get the virtual Bumper functions called. The virtual functions are called directly by a call of this function

Exceptions
nothing
See also
Com::processEvents
void rec::robotino::api2::Bumper::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
bool rec::robotino::api2::Bumper::value ( ) const

Returns the current state of the bumper.

Returns
TRUE if the bumper has contact, FALSE otherwise
Exceptions
RobotinoExceptionif the underlying communication object is invalid
See also
ComObject::setComId

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