A generic battery interface. More...
#include <yarp/dev/IBattery.h>
Public Types | |
enum | Battery_status { BATTERY_OK_STANBY = 0, BATTERY_OK_IN_CHARGE = 1, BATTERY_OK_IN_USE = 2, BATTERY_GENERAL_ERROR = 3, BATTERY_TIMEOUT = 4, BATTERY_LOW_WARNING = 5, BATTERY_CRITICAL_WARNING = 6 } |
Public Member Functions | |
virtual | ~IBattery () |
virtual bool | getBatteryVoltage (double &voltage)=0 |
Get the instantaneous voltage measurement. More... | |
virtual bool | getBatteryCurrent (double ¤t)=0 |
Get the instantaneous current measurement. More... | |
virtual bool | getBatteryCharge (double &charge)=0 |
get the battery status of charge More... | |
virtual bool | getBatteryStatus (Battery_status &status)=0 |
get the battery status More... | |
virtual bool | getBatteryTemperature (double &temperature)=0 |
get the battery temperature More... | |
virtual bool | getBatteryInfo (std::string &battery_info)=0 |
get the battery hardware characteristics (e.g. More... | |
A generic battery interface.
Definition at line 32 of file IBattery.h.
Enumerator | |
---|---|
BATTERY_OK_STANBY | |
BATTERY_OK_IN_CHARGE | |
BATTERY_OK_IN_USE | |
BATTERY_GENERAL_ERROR | |
BATTERY_TIMEOUT | |
BATTERY_LOW_WARNING | |
BATTERY_CRITICAL_WARNING |
Definition at line 35 of file IBattery.h.
|
virtualdefault |
|
pure virtual |
get the battery status of charge
charge | the charge measurement (0-100%) |
Implemented in UpowerBattery, FakeBattery, and BatteryClient.
|
pure virtual |
Get the instantaneous current measurement.
current | the current measurement |
Implemented in UpowerBattery, FakeBattery, and BatteryClient.
|
pure virtual |
get the battery hardware characteristics (e.g.
max voltage etc)
a | string containing the battery infos |
Implemented in UpowerBattery, FakeBattery, and BatteryClient.
|
pure virtual |
get the battery status
status | the battery status |
Implemented in UpowerBattery, FakeBattery, and BatteryClient.
|
pure virtual |
get the battery temperature
temperature | the battery temperature |
Implemented in UpowerBattery, FakeBattery, and BatteryClient.
|
pure virtual |
Get the instantaneous voltage measurement.
voltage | the voltage measurement |
Implemented in UpowerBattery, FakeBattery, and BatteryClient.