Zephyr API Documentation  3.7.0
A Scalable Open Source RTOS
3.7.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
hawkbit.h File Reference

Go to the source code of this file.

Data Structures

struct  hawkbit_runtime_config
 hawkBit configuration structure. More...
 

Macros

#define HAWKBIT_JSON_URL   "/default/controller/v1"
 

Typedefs

typedef int(* hawkbit_config_device_data_cb_handler_t) (const char *device_id, uint8_t *buffer, const size_t buffer_size)
 Callback to provide the custom data to the hawkBit server.
 
typedef bool(* hawkbit_get_device_identity_cb_handler_t) (char *id, int id_max_len)
 Callback to get the device identity.
 

Enumerations

enum  hawkbit_response {
  HAWKBIT_NETWORKING_ERROR , HAWKBIT_UNCONFIRMED_IMAGE , HAWKBIT_PERMISSION_ERROR , HAWKBIT_METADATA_ERROR ,
  HAWKBIT_DOWNLOAD_ERROR , HAWKBIT_OK , HAWKBIT_UPDATE_INSTALLED , HAWKBIT_NO_UPDATE ,
  HAWKBIT_CANCEL_UPDATE , HAWKBIT_NOT_INITIALIZED , HAWKBIT_PROBE_IN_PROGRESS
}
 Response message from hawkBit. More...
 

Functions

int hawkbit_set_custom_data_cb (hawkbit_config_device_data_cb_handler_t cb)
 Set the custom data callback.
 
int hawkbit_init (void)
 Init the flash partition.
 
void hawkbit_autohandler (void)
 Runs hawkBit probe and hawkBit update automatically.
 
enum hawkbit_response hawkbit_probe (void)
 The hawkBit probe verify if there is some update to be performed.
 
void hawkbit_reboot (void)
 Request system to reboot.
 
int hawkbit_set_device_identity_cb (hawkbit_get_device_identity_cb_handler_t cb)
 Set the device identity callback.
 
int hawkbit_set_config (struct hawkbit_runtime_config *config)
 Set the hawkBit server configuration settings.
 
struct hawkbit_runtime_config hawkbit_get_config (void)
 Get the hawkBit server configuration settings.
 
static int hawkbit_set_server_addr (char *addr_str)
 Set the hawkBit server address.
 
static int hawkbit_set_server_port (uint16_t port)
 Set the hawkBit server port.
 
static int hawkbit_set_ddi_security_token (char *token)
 Set the hawkBit security token.
 
static int hawkbit_set_tls_tag (sec_tag_t tag)
 Set the hawkBit TLS tag.
 
static char * hawkbit_get_server_addr (void)
 Get the hawkBit server address.
 
static uint16_t hawkbit_get_server_port (void)
 Get the hawkBit server port.
 
static char * hawkbit_get_ddi_security_token (void)
 Get the hawkBit security token.
 
static sec_tag_t hawkbit_get_tls_tag (void)
 Get the hawkBit TLS tag.
 
int32_t hawkbit_get_action_id (void)
 Get the hawkBit action id.
 
int hawkbit_reset_action_id (void)
 Resets the hawkBit action id, that is saved in settings.