47 #ifndef _MIRA_BATTERYSTATE_H_ 48 #define _MIRA_BATTERYSTATE_H_ 52 namespace mira {
namespace robot {
87 uint8 iPercent, int16 iTime,
bool iCharging,
88 bool iPowerSupplyPresent) :
95 template<
typename Reflector>
98 int v = r.version(2,
this);
100 r.member(
"Voltage",
voltage,
"The voltage in [V]");
101 r.member(
"Current",
current,
"The current in [A]");
103 "The battery life percent [0..100] or 255 if unknown");
105 "The battery life time in minutes or -1 if unknown");
106 r.member(
"Charging",
charging,
"Is the battery being charged");
110 r.member(
"CellVoltage",
cellVoltage,
"The voltage of the single cells in [V]");
112 "Is the robot powered by an external power supply");
std::vector< float > cellVoltage
The voltage of the single battery cells in [V].
Definition: BatteryState.h:139
void reflect(Reflector &r)
Definition: BatteryState.h:96
BatteryState(float iVoltage, float iCurrent, uint8 iPercent, int16 iTime, bool iCharging, bool iPowerSupplyPresent)
Construct a new battery state object with specified parameters.
Definition: BatteryState.h:86
uint8 lifePercent
The battery life percent [0..100] or 255 if unknown.
Definition: BatteryState.h:127
float current
The battery current in [A].
Definition: BatteryState.h:124
float voltage
The battery voltage in [V].
Definition: BatteryState.h:121
BatteryState()
The constructor.
Definition: BatteryState.h:72
bool powerSupplyPresent
Is the robot powered by an external power supply.
Definition: BatteryState.h:136
int16 lifeTime
The battery life time in minutes or -1 if unknown.
Definition: BatteryState.h:130
bool charging
Is the battery currently being charged.
Definition: BatteryState.h:133
A class for holding the current battery state.
Definition: BatteryState.h:65