Zephyr API Documentation 4.0.0-rc3
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
config.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Vogl Electronic GmbH
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
19#ifndef ZEPHYR_INCLUDE_MGMT_HAWKBIT_CONFIG_H_
20#define ZEPHYR_INCLUDE_MGMT_HAWKBIT_CONFIG_H_
21
22#include <stdint.h>
24
41
50
57
65static inline int hawkbit_set_server_addr(char *addr_str)
66{
67 struct hawkbit_runtime_config set_config = {
68 .server_addr = addr_str,
69 .server_port = 0,
70 .auth_token = NULL,
71 .tls_tag = 0,
72 };
73
74 return hawkbit_set_config(&set_config);
75}
76
84static inline int hawkbit_set_server_port(uint16_t port)
85{
86 struct hawkbit_runtime_config set_config = {
87 .server_addr = NULL,
88 .server_port = port,
89 .auth_token = NULL,
90 .tls_tag = 0,
91 };
92
93 return hawkbit_set_config(&set_config);
94}
95
103static inline int hawkbit_set_ddi_security_token(char *token)
104{
105 struct hawkbit_runtime_config set_config = {
106 .server_addr = NULL,
107 .server_port = 0,
108 .auth_token = token,
109 .tls_tag = 0,
110 };
111
112 return hawkbit_set_config(&set_config);
113}
114
122static inline int hawkbit_set_tls_tag(sec_tag_t tag)
123{
124 struct hawkbit_runtime_config set_config = {
125 .server_addr = NULL,
126 .server_port = 0,
127 .auth_token = NULL,
128 .tls_tag = tag,
129 };
130
131 return hawkbit_set_config(&set_config);
132}
133
139static inline char *hawkbit_get_server_addr(void)
140{
142}
143
150{
152}
153
159static inline char *hawkbit_get_ddi_security_token(void)
160{
162}
163
170{
172}
173
180
187
192#endif /* ZEPHYR_INCLUDE_MGMT_HAWKBIT_CONFIG_H_ */
int32_t hawkbit_get_action_id(void)
Get the hawkBit action id.
static uint16_t hawkbit_get_server_port(void)
Get the hawkBit server port.
Definition config.h:149
uint32_t hawkbit_get_poll_interval(void)
Get the hawkBit poll interval.
static int hawkbit_set_tls_tag(sec_tag_t tag)
Set the hawkBit TLS tag.
Definition config.h:122
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 config.h:169
static int hawkbit_set_server_port(uint16_t port)
Set the hawkBit server port.
Definition config.h:84
static int hawkbit_set_ddi_security_token(char *token)
Set the hawkBit security token.
Definition config.h:103
static int hawkbit_set_server_addr(char *addr_str)
Set the hawkBit server address.
Definition config.h:65
struct hawkbit_runtime_config hawkbit_get_config(void)
Get the hawkBit server configuration settings.
static char * hawkbit_get_server_addr(void)
Get the hawkBit server address.
Definition config.h:139
static char * hawkbit_get_ddi_security_token(void)
Get the hawkBit security token.
Definition config.h:159
int sec_tag_t
Secure tag, a reference to TLS credential.
Definition tls_credentials.h:74
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__INT32_TYPE__ int32_t
Definition stdint.h:74
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
hawkBit configuration structure.
Definition config.h:31
sec_tag_t tls_tag
TLS tag.
Definition config.h:39
uint16_t server_port
Server port.
Definition config.h:35
char * auth_token
Security token.
Definition config.h:37
char * server_addr
Server address.
Definition config.h:33
TLS credentials management.