13#ifndef ZEPHYR_INCLUDE_MGMT_HAWKBIT_H_
14#define ZEPHYR_INCLUDE_MGMT_HAWKBIT_H_
18#define HAWKBIT_JSON_URL "/default/controller/v1"
67 const size_t buffer_size);
166 .
server_addr = addr_str, .server_port = 0, .auth_token = NULL, .tls_tag = 0};
181 .
server_addr = NULL, .server_port = port, .auth_token = NULL, .tls_tag = 0};
196 .
server_addr = NULL, .server_port = 0, .auth_token = token, .tls_tag = 0};
211 .
server_addr = NULL, .server_port = 0, .auth_token = NULL, .tls_tag =
tag};
void hawkbit_reboot(void)
Request system to reboot.
int32_t hawkbit_get_action_id(void)
Get the hawkBit action id.
int hawkbit_init(void)
Init the flash partition.
bool(* hawkbit_get_device_identity_cb_handler_t)(char *id, int id_max_len)
Callback to get the device identity.
Definition hawkbit.h:126
int hawkbit_reset_action_id(void)
Resets the hawkBit action id, that is saved in settings.
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.
Definition hawkbit.h:66
static uint16_t hawkbit_get_server_port(void)
Get the hawkBit server port.
Definition hawkbit.h:231
int hawkbit_set_device_identity_cb(hawkbit_get_device_identity_cb_handler_t cb)
Set the device identity callback.
enum hawkbit_response hawkbit_probe(void)
The hawkBit probe verify if there is some update to be performed.
static int hawkbit_set_tls_tag(sec_tag_t tag)
Set the hawkBit TLS tag.
Definition hawkbit.h:208
int hawkbit_set_config(struct hawkbit_runtime_config *config)
Set the hawkBit server configuration settings.
static sec_tag_t hawkbit_get_tls_tag(void)
Get the hawkBit TLS tag.
Definition hawkbit.h:251
static int hawkbit_set_server_port(uint16_t port)
Set the hawkBit server port.
Definition hawkbit.h:178
hawkbit_response
Response message from hawkBit.
Definition hawkbit.h:28
static int hawkbit_set_ddi_security_token(char *token)
Set the hawkBit security token.
Definition hawkbit.h:193
static int hawkbit_set_server_addr(char *addr_str)
Set the hawkBit server address.
Definition hawkbit.h:163
struct hawkbit_runtime_config hawkbit_get_config(void)
Get the hawkBit server configuration settings.
void hawkbit_autohandler(void)
Runs hawkBit probe and hawkBit update automatically.
static char * hawkbit_get_server_addr(void)
Get the hawkBit server address.
Definition hawkbit.h:221
int hawkbit_set_custom_data_cb(hawkbit_config_device_data_cb_handler_t cb)
Set the custom data callback.
static char * hawkbit_get_ddi_security_token(void)
Get the hawkBit security token.
Definition hawkbit.h:241
@ HAWKBIT_PERMISSION_ERROR
Definition hawkbit.h:31
@ HAWKBIT_PROBE_IN_PROGRESS
Definition hawkbit.h:39
@ HAWKBIT_METADATA_ERROR
Definition hawkbit.h:32
@ HAWKBIT_NETWORKING_ERROR
Definition hawkbit.h:29
@ HAWKBIT_OK
Definition hawkbit.h:34
@ HAWKBIT_CANCEL_UPDATE
Definition hawkbit.h:37
@ HAWKBIT_UPDATE_INSTALLED
Definition hawkbit.h:35
@ HAWKBIT_NOT_INITIALIZED
Definition hawkbit.h:38
@ HAWKBIT_NO_UPDATE
Definition hawkbit.h:36
@ HAWKBIT_UNCONFIRMED_IMAGE
Definition hawkbit.h:30
@ HAWKBIT_DOWNLOAD_ERROR
Definition hawkbit.h:33
int sec_tag_t
Secure tag, a reference to TLS credential.
Definition tls_credentials.h:72
#define bool
Definition stdbool.h:13
__INT32_TYPE__ int32_t
Definition stdint.h:74
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
hawkBit configuration structure.
Definition hawkbit.h:48
sec_tag_t tls_tag
Definition hawkbit.h:52
uint16_t server_port
Definition hawkbit.h:50
char * auth_token
Definition hawkbit.h:51
char * server_addr
Definition hawkbit.h:49
static ZTEST_BMEM char buffer[8]
Definition test_mbox_api.c:433
static const char * tag(void)
Definition main.c:27
TLS credentials management.