Represents the power management of Robotino.
More...
#include <PowerManagement.h>
|
| 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) |
|
| ComObject () |
|
virtual | ~ComObject () |
|
ComId | comId () const |
|
|
class | PowerManagementImpl |
|
Represents the power management of Robotino.
float rec::robotino::api2::PowerManagement::current |
( |
| ) |
const |
Retrieves the current power drain.
- Returns
- The power drain in A.
- Exceptions
-
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
-
- 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
-
current | The current. |
voltage | The current voltage. |
- See also
- Com::processEvents
void rec::robotino::api2::PowerManagement::setComId |
( |
const ComId & |
id | ) |
|
Sets the associated communication object.
- Parameters
-
id | The id of the associated communication object. |
- Exceptions
-
float rec::robotino::api2::PowerManagement::voltage |
( |
| ) |
const |
Retrieves the battery voltage.
- Returns
- Battery voltage in V.
- Exceptions
-
The documentation for this class was generated from the following file: