1lsm_battery_status_get(3) Libstoragemgmt C API Manuallsm_battery_status_get(3)
2
3
4
6 lsm_battery_status_get - Retrieves status of the battery.
7
9 uint64_t lsm_battery_status_get (lsm_battery *b);
10
12 b Battery to retrieve status for.
13
15 1.3
16
18 Retrieves status of the battery.
19
21 uint64_t. Status of the specified battery which is a bit sensitive
22 field. Possible values are:
23 * LSM_BATTERY_STATUS_UNKNOWN
24 Unknown or invalid lsm_battery pointer.
25 * LSM_BATTERY_STATUS_OTHER
26 Vendor specific status.
27 * LSM_BATTERY_STATUS_OK
28 Battery is healthy and charged.
29 * LSM_BATTERY_STATUS_DISCHARGING
30 Battery is disconnected from power source and discharging.
31 * LSM_BATTERY_STATUS_CHARGING
32 Battery is not fully charged and charging.
33 * LSM_BATTERY_STATUS_LEARNING
34 System is trying to discharge and recharge the battery to
35 learn its capability.
36 * LSM_BATTERY_STATUS_DEGRADED
37 Battery is degraded and should be checked or replaced.
38 * LSM_BATTERY_STATUS_ERROR
39 Battery is dead and should be replaced.
40
41
42
43May 2018 lsm_battery_status_get lsm_battery_status_get(3)