lsm_battery_status_get - Man Page

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.

Info

April 2023 Libstoragemgmt C API Manual