Zephyr API Documentation 4.1.99
A Scalable Open Source RTOS
 4.1.99
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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
46
56
63
72static inline int hawkbit_set_server_domain(char *domain_str)
73{
74 struct hawkbit_runtime_config set_config = {
75 .server_addr = NULL,
76 .server_domain = domain_str,
77 .server_port = 0,
78 .auth_token = NULL,
79 .tls_tag = 0,
80 };
81
82 return hawkbit_set_config(&set_config);
83}
84
93static inline int hawkbit_set_server_addr(char *addr_str)
94{
95 struct hawkbit_runtime_config set_config = {
96 .server_addr = addr_str,
97 .server_domain = NULL,
98 .server_port = 0,
99 .auth_token = NULL,
100 .tls_tag = 0,
101 };
102
103 return hawkbit_set_config(&set_config);
104}
105
113static inline int hawkbit_set_server_port(uint16_t port)
114{
115 struct hawkbit_runtime_config set_config = {
116 .server_addr = NULL,
117 .server_domain = NULL,
118 .server_port = port,
119 .auth_token = NULL,
120 .tls_tag = 0,
121 };
122
123 return hawkbit_set_config(&set_config);
124}
125
133static inline int hawkbit_set_ddi_security_token(char *token)
134{
135 struct hawkbit_runtime_config set_config = {
136 .server_addr = NULL,
137 .server_domain = NULL,
138 .server_port = 0,
139 .auth_token = token,
140 .tls_tag = 0,
141 };
142
143 return hawkbit_set_config(&set_config);
144}
145
153static inline int hawkbit_set_tls_tag(sec_tag_t tag)
154{
155 struct hawkbit_runtime_config set_config = {
156 .server_addr = NULL,
157 .server_domain = NULL,
158 .server_port = 0,
159 .auth_token = NULL,
160 .tls_tag = tag,
161 };
162
163 return hawkbit_set_config(&set_config);
164}
165
171static inline char *hawkbit_get_server_addr(void)
172{
174}
175
181static inline char *hawkbit_get_server_domain(void)
182{
184}
185
192{
194}
195
201static inline char *hawkbit_get_ddi_security_token(void)
202{
204}
205
212{
214}
215
222
229
234#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:72
static uint16_t hawkbit_get_server_port(void)
Get the hawkBit server port.
Definition config.h:191
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:153
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:211
static int hawkbit_set_server_port(uint16_t port)
Set the hawkBit server port.
Definition config.h:113
static int hawkbit_set_ddi_security_token(char *token)
Set the hawkBit security token.
Definition config.h:133
static int hawkbit_set_server_addr(char *addr_str)
Set the hawkBit server address.
Definition config.h:93
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:171
static char * hawkbit_get_ddi_security_token(void)
Get the hawkBit security token.
Definition config.h:201
static char * hawkbit_get_server_domain(void)
Get the hawkBit server hostname.
Definition config.h:181
int sec_tag_t
Secure tag, a reference to TLS credential.
Definition tls_credentials.h:78
#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:31
sec_tag_t tls_tag
TLS tag.
Definition config.h:44
uint16_t server_port
Server port.
Definition config.h:40
char * server_domain
Server domain name.
Definition config.h:38
char * auth_token
Security token.
Definition config.h:42
char * server_addr
Server address (domain name or IP address if CONFIG_HAWKBIT_USE_DOMAIN_NAME is enabled)
Definition config.h:36
TLS credentials management.