brainaccess.core.full_battery_info#

Classes#

EBaChargeLevel

Enumeration of the battery charge levels.

EBaChargeStates

Enumeration of the possible battery charging states.

FullBatteryInfo

Provides comprehensive information about the device's battery.

Module Contents#

class brainaccess.core.full_battery_info.EBaChargeLevel(*args, **kwds)[source]#

Bases: enum.Enum

Enumeration of the battery charge levels.

e_ba_charge_level_critical = 3[source]#
e_ba_charge_level_good = 1[source]#
e_ba_charge_level_last = 4[source]#
e_ba_charge_level_low = 2[source]#
e_ba_charge_level_unknown = 0[source]#
class brainaccess.core.full_battery_info.EBaChargeStates(*args, **kwds)[source]#

Bases: enum.Enum

Enumeration of the possible battery charging states.

e_ba_charge_states_charging = 1[source]#
e_ba_charge_states_discharging_active = 2[source]#
e_ba_charge_states_discharging_inactive = 3[source]#
e_ba_charge_states_last = 4[source]#
e_ba_charge_states_unknown = 0[source]#
class brainaccess.core.full_battery_info.FullBatteryInfo[source]#

Bases: ctypes.Structure

Provides comprehensive information about the device’s battery.

This class extends the basic battery info with more detailed metrics such as health, voltage, and current, providing a complete picture of the battery’s status.

is_charger_connected#

True if a charger is connected to the device.

Type:

bool

level#

The battery charge percentage (0-100).

Type:

int

health#

The battery health percentage (0-100).

Type:

float

voltage#

The battery voltage in volts.

Type:

float

current#

The current flow in amps (negative for discharge, positive for charge).

Type:

float

charge_state[source]#

The current charging state of the battery.

Type:

EBaChargeStates

charge_level[source]#

The current charge level of the battery.

Type:

EBaChargeLevel

Initialize self.  See help(type(self)) for accurate signature.
property charge_level[source]#

The current charge level of the battery.

property charge_state[source]#

The current charging state of the battery.