lsm_battery_list - Man Page

Gets a list of batteries on this connection.

Synopsis

int lsm_battery_list (lsm_connect *conn, const char *search_key, const char *search_value, lsm_battery **bs[], uint32_t *count, lsm_flag flags);

Arguments

conn

Valid lsm_connect pointer.

search_key

Search key (NULL for all) Valid search keys are: "id", and "system_id".

search_value

Search value.

bs[]

Output pointer of lsm_battery array. Returned value must be freed by calling lsm_battery_record_array_free.

count

Output pointer of uint32_t. Number of batteries.

flags

Reserved for future use, must be LSM_CLIENT_FLAG_RSVD.

Version

1.3.

Description

Gets a list of batteries on this connection. When present, super capacitors will also be included. Battery properties could be retrieved by these functions:
   * lsm_battery_id_get
   * lsm_battery_name_get
   * lsm_battery_system_id_get
   * lsm_battery_type_get
   * lsm_battery_status_get

Capability

LSM_CAP_BATTERIES

Return

Error code as enumerated by 'lsm_error_number'.
   * LSM_ERR_OK
       On success or searched value not found.
   * LSM_ERR_INVALID_ARGUMENT
       When any argument is NULL or invalid flags or invalid search
       key.
   * LSM_ERR_NO_SUPPORT
       Not supported.

Info

April 2023 Libstoragemgmt C API Manual