Zephyr Project API 4.4.99
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
12
19
20#ifndef ZEPHYR_INCLUDE_MGMT_HAWKBIT_CONFIG_H_
21#define ZEPHYR_INCLUDE_MGMT_HAWKBIT_CONFIG_H_
22
23#include <stdint.h>
25
47
57
64
73static inline int hawkbit_set_server_domain(char *domain_str)
74{
75 struct hawkbit_runtime_config set_config = {
76 .server_addr = NULL,
77 .server_domain = domain_str,
78 .server_port = 0,
79 .auth_token = NULL,
80 .tls_tag = 0,
81 };
82
83 return hawkbit_set_config(&set_config);
84}
85
94static inline int hawkbit_set_server_addr(char *addr_str)
95{
96 struct hawkbit_runtime_config set_config = {
97 .server_addr = addr_str,
98 .server_domain = NULL,
99 .server_port = 0,
100 .auth_token = NULL,
101 .tls_tag = 0,
102 };
103
104 return hawkbit_set_config(&set_config);
105}
106
114static inline int hawkbit_set_server_port(uint16_t port)
115{
116 struct hawkbit_runtime_config set_config = {
117 .server_addr = NULL,
118 .server_domain = NULL,
119 .server_port = port,
120 .auth_token = NULL,
121 .tls_tag = 0,
122 };
123
124 return hawkbit_set_config(&set_config);
125}
126
134static inline int hawkbit_set_ddi_security_token(char *token)
135{
136 struct hawkbit_runtime_config set_config = {
137 .server_addr = NULL,
138 .server_domain = NULL,
139 .server_port = 0,
140 .auth_token = token,
141 .tls_tag = 0,
142 };
143
144 return hawkbit_set_config(&set_config);
145}
146
154static inline int hawkbit_set_tls_tag(sec_tag_t tag)
155{
156 struct hawkbit_runtime_config set_config = {
157 .server_addr = NULL,
158 .server_domain = NULL,
159 .server_port = 0,
160 .auth_token = NULL,
161 .tls_tag = tag,
162 };
163
164 return hawkbit_set_config(&set_config);
165}
166
172static inline char *hawkbit_get_server_addr(void)
173{
175}
176
182static inline char *hawkbit_get_server_domain(void)
183{
185}
186
193{
195}
196
202static inline char *hawkbit_get_ddi_security_token(void)
203{
205}
206
213{
215}
216
223
230
234
235#endif /* ZEPHYR_INCLUDE_MGMT_HAWKBIT_CONFIG_H_ */
int32_t hawkbit_get_action_id(void)
Get the hawkBit action id.
static int hawkbit_set_server_domain(char *domain_str)
Set the hawkBit server hostname.
Definition config.h:73
static uint16_t hawkbit_get_server_port(void)
Get the hawkBit server port.
Definition config.h:192
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:154
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:212
static int hawkbit_set_server_port(uint16_t port)
Set the hawkBit server port.
Definition config.h:114
static int hawkbit_set_ddi_security_token(char *token)
Set the hawkBit security token.
Definition config.h:134
static int hawkbit_set_server_addr(char *addr_str)
Set the hawkBit server address.
Definition config.h:94
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:172
static char * hawkbit_get_ddi_security_token(void)
Get the hawkBit security token.
Definition config.h:202
static char * hawkbit_get_server_domain(void)
Get the hawkBit server hostname.
Definition config.h:182
int sec_tag_t
Secure tag, a reference to TLS credential.
Definition tls_credentials.h:90
#define NULL
Definition iar_missing_defs.h:20
__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:32
sec_tag_t tls_tag
TLS tag.
Definition config.h:45
uint16_t server_port
Server port.
Definition config.h:41
char * server_domain
Server domain name.
Definition config.h:39
char * auth_token
Security token.
Definition config.h:43
char * server_addr
Server address (domain name or IP address if CONFIG_HAWKBIT_USE_DOMAIN_NAME is enabled).
Definition config.h:37
TLS credentials management.