lsm_battery_status_get(3) | Libstoragemgmt C API Manual | lsm_battery_status_get(3) |
NAME¶
lsm_battery_status_get - Retrieves status of the battery.
SYNOPSIS¶
uint64_t lsm_battery_status_get (lsm_battery *b);
ARGUMENTS¶
- b
- Battery to retrieve status for.
VERSION¶
1.3
DESCRIPTION¶
Retrieves status of the battery.
RETURN¶
uint64_t. Status of the specified battery which is a bit sensitive
field. Possible values are:
* LSM_BATTERY_STATUS_UNKNOWN
Unknown or invalid lsm_battery pointer.
* LSM_BATTERY_STATUS_OTHER
Vendor specific status.
* LSM_BATTERY_STATUS_OK
Battery is healthy and charged.
* LSM_BATTERY_STATUS_DISCHARGING
Battery is disconnected from power source and discharging.
* LSM_BATTERY_STATUS_CHARGING
Battery is not fully charged and charging.
* LSM_BATTERY_STATUS_LEARNING
System is trying to discharge and recharge the battery to
learn its capability.
* LSM_BATTERY_STATUS_DEGRADED
Battery is degraded and should be checked or replaced.
* LSM_BATTERY_STATUS_ERROR
Battery is dead and should be replaced.
lsm_battery_status_get | January 2023 |