Edgehog Device SDK ESP32
ESP32 device SDK for the Edgehog platform
|
Edgehog device battery status API. More...
#include "edgehog_device.h"
Go to the source code of this file.
Data Structures | |
struct | edgehog_battery_status_t |
Enumerations | |
enum | edgehog_battery_state { BATTERY_INVALID = 0 , BATTERY_IDLE , BATTERY_CHARGING , BATTERY_DISCHARGING , BATTERY_IDLE_OR_CHARGING , BATTERY_FAILURE , BATTERY_REMOVED , BATTERY_UNKNOWN } |
Edgehog Battery state codes. More... | |
Functions | |
void | edgehog_battery_status_update (edgehog_device_handle_t edgehog_device, const edgehog_battery_status_t *battery_status) |
Update battery status info. More... | |
void | edgehog_battery_status_publish (edgehog_device_handle_t edgehog_device) |
Publish battery status info. More... | |
Edgehog device battery status API.
Edgehog Battery state codes.
void edgehog_battery_status_publish | ( | edgehog_device_handle_t | edgehog_device | ) |
Publish battery status info.
This function publishes to Astarte all available battery status updates.
edgehog_device | A valid Edgehog device handle. |
void edgehog_battery_status_update | ( | edgehog_device_handle_t | edgehog_device, |
const edgehog_battery_status_t * | battery_status | ||
) |
Update battery status info.
This function updates battery status info. This function does not immediately publish the update.
edgehog_device | A valid Edgehog device handle. |
battery_status | A battery status structure that contains current battery status. It can be safely allocated on the stack, a copy of it is automatically stored. |