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

Represents a Gyroscope. More...

#include <Gyroscope.h>

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

Public Member Functions

void setComId (const ComId &id)
 
void processEvents ()
 
float angle () const
 
float rate () const
 
virtual void gyroscopeEvent (float angle, float rate)
 
- Public Member Functions inherited from rec::robotino::api2::ComObject
 ComObject ()
 
virtual ~ComObject ()
 
ComId comId () const
 

Friends

class GyroscopeImpl
 

Additional Inherited Members

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

Detailed Description

Represents a Gyroscope.

Member Function Documentation

float rec::robotino::api2::Gyroscope::angle ( ) const

Returns the current angle.

Returns
The angle in radians.
Exceptions
RobotinoExceptionif the underlying communication object is invalid
See also
ComObject::setComId
virtual void rec::robotino::api2::Gyroscope::gyroscopeEvent ( float  angle,
float  rate 
)
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::Gyroscope::processEvents ( )

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

Exceptions
nothing
See also
Com::processEvents
float rec::robotino::api2::Gyroscope::rate ( ) const

Returns the current rate.

Returns
The rotation rate in radians/second.
Exceptions
RobotinoExceptionif the underlying communication object is invalid
See also
ComObject::setComId
void rec::robotino::api2::Gyroscope::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

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