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

Represents the power management of Robotino. More...

#include <PowerManagement.h>

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

Public Member Functions

 PowerManagement (const ComId &id)
 
void setComId (const ComId &id)
 
void processEvents ()
 
float current () const
 
float voltage () const
 
bool ext_power () const
 
int num_chargers () const
 
const char * batteryType () const
 
bool batteryLow () const
 
int batteryLowShutdownCounter () const
 
virtual void readingsEvent (float battery_voltage, float system_current, bool ext_power, int num_chargers, const char *batteryType, bool batteryLow, int batteryLowShutdownCounter)
 
- Public Member Functions inherited from rec::robotino::api2::ComObject
 ComObject ()
 
virtual ~ComObject ()
 
ComId comId () const
 

Friends

class PowerManagementImpl
 

Additional Inherited Members

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

Detailed Description

Represents the power management of Robotino.

Member Function Documentation

float rec::robotino::api2::PowerManagement::current ( ) const

Retrieves the current power drain.

Returns
The power drain in A.
Exceptions
nothing
void rec::robotino::api2::PowerManagement::processEvents ( )

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

Exceptions
nothing
See also
Com::processEvents
virtual void rec::robotino::api2::PowerManagement::readingsEvent ( float  battery_voltage,
float  system_current,
bool  ext_power,
int  num_chargers,
const char *  batteryType,
bool  batteryLow,
int  batteryLowShutdownCounter 
)
virtual

Called when new data is available.

Parameters
currentThe current.
voltageThe current voltage.
Remarks
This function is called from the thread in which Com::processEvents() is called.
See also
Com::processEvents
void rec::robotino::api2::PowerManagement::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
float rec::robotino::api2::PowerManagement::voltage ( ) const

Retrieves the battery voltage.

Returns
Battery voltage in V.
Exceptions
nothing

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