A generic battery interface. More...
#include <yarp/dev/IBattery.h>
Public Types | |
enum | Battery_status { BATTERY_OK_STANDBY = 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. | |
virtual bool | getBatteryCurrent (double ¤t)=0 |
Get the instantaneous current measurement. | |
virtual bool | getBatteryCharge (double &charge)=0 |
get the battery status of charge | |
virtual bool | getBatteryStatus (Battery_status &status)=0 |
get the battery status | |
virtual bool | getBatteryTemperature (double &temperature)=0 |
get the battery temperature | |
virtual bool | getBatteryInfo (std::string &battery_info)=0 |
get the battery hardware characteristics (e.g. | |
A generic battery interface.
Definition at line 27 of file IBattery.h.
Enumerator | |
---|---|
BATTERY_OK_STANDBY | |
BATTERY_OK_IN_CHARGE | |
BATTERY_OK_IN_USE | |
BATTERY_GENERAL_ERROR | |
BATTERY_TIMEOUT | |
BATTERY_LOW_WARNING | |
BATTERY_CRITICAL_WARNING |
Definition at line 30 of file IBattery.h.
|
virtualdefault |
|
pure virtual |
get the battery status of charge
charge | the charge measurement (0-100%) |
Implemented in FakeBattery, Battery_nwc_yarp, and UpowerBattery.
|
pure virtual |
Get the instantaneous current measurement.
current | the current measurement |
Implemented in FakeBattery, Battery_nwc_yarp, and UpowerBattery.
|
pure virtual |
get the battery hardware characteristics (e.g.
max voltage etc)
a | string containing the battery infos |
Implemented in Battery_nwc_yarp, FakeBattery, and UpowerBattery.
|
pure virtual |
get the battery status
status | the battery status |
Implemented in FakeBattery, Battery_nwc_yarp, and UpowerBattery.
|
pure virtual |
get the battery temperature
temperature | the battery temperature |
Implemented in FakeBattery, Battery_nwc_yarp, and UpowerBattery.
|
pure virtual |
Get the instantaneous voltage measurement.
voltage | the voltage measurement |
Implemented in FakeBattery, Battery_nwc_yarp, and UpowerBattery.