Soletta™ Framework
|
Power Supply API provides a way to get information about battery, UPS, AC or DC power supply. More...
Go to the source code of this file.
Functions | |
int | sol_power_supply_exists (const char *name, bool *exist) |
Check if a given power supply can be found. More... | |
int | sol_power_supply_free_list (struct sol_ptr_vector *list) |
Free a list of power supply names. More... | |
int | sol_power_supply_get_capacity (const char *name, int *capacity) |
Get power supply capacity percentage. More... | |
int | sol_power_supply_get_capacity_level (const char *name, enum sol_power_supply_capacity_level *capacity_level) |
Get capacity level, as provided by driver (critical, low, normal, high, full). More... | |
int | sol_power_supply_get_list (struct sol_ptr_vector *list) |
Retrieves a list of names of all power supplies found. More... | |
int | sol_power_supply_get_list_by_type (struct sol_ptr_vector *list, enum sol_power_supply_type type) |
Retrieves a list of names of all power supplies found that match a specified type. More... | |
int | sol_power_supply_get_manufacturer (const char *name, struct sol_buffer *manufacturer_buf) |
Get manufacturer of a given power supply. More... | |
int | sol_power_supply_get_max_voltage (const char *name, int *voltage) |
Get maximum voltage measured by hardware. More... | |
int | sol_power_supply_get_max_voltage_design (const char *name, int *voltage) |
Get value of voltage when supply is full as defined by design. More... | |
int | sol_power_supply_get_min_voltage (const char *name, int *voltage) |
Get minimum voltage measured by hardware. More... | |
int | sol_power_supply_get_min_voltage_design (const char *name, int *voltage) |
Get value of voltage when supply is empty as defined by design. More... | |
int | sol_power_supply_get_model_name (const char *name, struct sol_buffer *model_name_buf) |
Get model name of a given power supply. More... | |
int | sol_power_supply_get_serial_number (const char *name, struct sol_buffer *serial_number_buf) |
Get serial number of a given power supply. More... | |
int | sol_power_supply_get_status (const char *name, enum sol_power_supply_status *status) |
Get power supply status (charging, discharging, not charging, full). More... | |
int | sol_power_supply_get_type (const char *name, enum sol_power_supply_type *type) |
Get type of power supply (battery, USB, ...) More... | |
int | sol_power_supply_get_voltage (const char *name, int *voltage) |
Get current voltage. More... | |
int | sol_power_supply_is_online (const char *name, bool *online) |
Check if a power supply is online. More... | |
int | sol_power_supply_is_present (const char *name, bool *present) |
Check if a power supply is present. More... | |
Power Supply API provides a way to get information about battery, UPS, AC or DC power supply.
Some information only is provided by some kinds of power supplies and depends on platform and drivers.