MIRA
|
A class for holding the current battery state. More...
#include <robot/BatteryState.h>
Public Member Functions | |
Constructors and reflect | |
BatteryState () | |
The constructor. More... | |
BatteryState (float iVoltage, float iCurrent, uint8 iPercent, int16 iTime, bool iCharging, bool iPowerSupplyPresent) | |
Construct a new battery state object with specified parameters. More... | |
template<typename Reflector > | |
void | reflect (Reflector &r) |
Public Attributes | |
float | voltage |
The battery voltage in [V]. More... | |
float | current |
The battery current in [A]. More... | |
uint8 | lifePercent |
The battery life percent [0..100] or 255 if unknown. More... | |
int16 | lifeTime |
The battery life time in minutes or -1 if unknown. More... | |
bool | charging |
Is the battery currently being charged. More... | |
bool | powerSupplyPresent |
Is the robot powered by an external power supply. More... | |
std::vector< float > | cellVoltage |
The voltage of the single battery cells in [V]. More... | |
A class for holding the current battery state.
The battery state is described by the current voltage, the battery current, the charge state in percent, an estimated life time in minutes and a flag, which indicates if the battery is currently charged or not.
The battery life percent and battery life time are optional values.
|
inline |
The constructor.
|
inline |
Construct a new battery state object with specified parameters.
[in] | iVoltage | The current voltage in [V]. |
[in] | iCurrent | The current current in [A]. |
[in] | iPercent | The current battery capacity in [%] (255 if unknown). |
[in] | iTime | The estimated life time in minutes (-1 if unknown). |
[in] | iCharging | Charging flag. |
[in] | iPowerSupplyPresent | External power supply connected flag. |
|
inline |
float voltage |
The battery voltage in [V].
float current |
The battery current in [A].
uint8 lifePercent |
The battery life percent [0..100] or 255 if unknown.
int16 lifeTime |
The battery life time in minutes or -1 if unknown.
bool charging |
Is the battery currently being charged.
bool powerSupplyPresent |
Is the robot powered by an external power supply.
std::vector<float> cellVoltage |
The voltage of the single battery cells in [V].