ALBattery API¶
NAOqi Sensors & LEDs - Overview | API
See also
Namespace : AL
#include <alproxies/albatteryproxy.h>
Method list¶
This module has the following methods:
-
class
ALBatteryProxy
¶
Deprecated methods
This module also inherits methods from ALModule API. Those inherited methods are deprecated.
Event list¶
Methods¶
Events¶
-
Event:callback(std::string eventName, bool connected, std::string subscriberIdentifier)¶
"ALBattery/ConnectedToChargingStation"
Pepper Only.
Raised when the robot is connected and disconnected to charging station, irrespectively of the charging station being powered or not.
Parameters: - eventName (std::string) – “ALBattery/ConnectedToChargingStation”
- connected – True when the robot is connected, false otherwise.
- subscriberIdentifier (std::string) –
-
Event:callback(std::string eventName, bool open, std::string subscriberIdentifier)¶
"BatteryTrapIsOpen"
Pepper Only.
Raised when the power hatch is opened or closed.
Parameters: - eventName (std::string) – “BatteryTrapIsOpen”
- connected – True when the power hatch is opened, false otherwise.
- subscriberIdentifier (std::string) –
-
Event:callback(std::string eventName, bool charging, std::string subscriberIdentifier)¶
"BatteryChargingFlagChanged"
Identical to
BatteryPowerPluggedChanged()
.
-
Event:callback(std::string eventName, bool charging, std::string subscriberIdentifier)¶
"BatteryPowerPluggedChanged"
Raised when the battery is connected to or disconnected from a powered-on battery charger. The connection may occur through the power socket or through the charging station.
Caution: some battery models do not provide information whether the power is plugged or not. In this case, the power plugged state is inferred from the electric current consumed by the battery. As a consequence, this event is less reliable when the battery is fully charged (because no current is consumed by the battery) or when the motors are used intensely (because current is drawn from both the charger and the battery).
For further details see: Battery Hardware.
Parameters: - eventName (std::string) – “BatteryPowerPluggedChanged”
- charging – True when the battery is connected to a power source, false otherwise.
- subscriberIdentifier (std::string) –
-
Event:callback(std::string eventName, int percentage, std::string subscriberIdentifier)¶
"BatteryChargeChanged"
Raised when the battery level percentage changes.
Parameters: - eventName (std::string) – “BatteryChargeChanged”
- percentage – The percent of the battery that remains.
- subscriberIdentifier (std::string) –