Zephyr Project API 3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
log_multidomain_helper.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2022 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_LOGGING_LOG_MULTIDOMAIN_HELPER_H_
8#define ZEPHYR_INCLUDE_LOGGING_LOG_MULTIDOMAIN_HELPER_H_
9
30#define Z_LOG_MULTIDOMAIN_ID_MSG 0
31
33#define Z_LOG_MULTIDOMAIN_ID_GET_DOMAIN_CNT 1
34
36#define Z_LOG_MULTIDOMAIN_ID_GET_SOURCE_CNT 2
37
39#define Z_LOG_MULTIDOMAIN_ID_GET_DOMAIN_NAME 3
40
42#define Z_LOG_MULTIDOMAIN_ID_GET_SOURCE_NAME 4
43
45#define Z_LOG_MULTIDOMAIN_ID_GET_LEVELS 5
46
48#define Z_LOG_MULTIDOMAIN_ID_SET_RUNTIME_LEVEL 6
49
51#define Z_LOG_MULTIDOMAIN_ID_DROPPED 7
52
54#define Z_LOG_MULTIDOMAIN_ID_READY 8
55
65#define Z_LOG_MULTIDOMAIN_STATUS_OK 0
67#define Z_LOG_MULTIDOMAIN_STATUS_ERR 1
68
74} __packed;
75
80
86
92
99
107
114
119
131
138
141
144 int (*init)(struct log_multidomain_link *link);
145 int (*send)(struct log_multidomain_link *link, void *data, size_t len);
146};
147
151
152 struct {
153 char *dst;
154 size_t *len;
156
157 struct {
161
162 struct {
165};
166
169
179
182
185 int (*init)(struct log_multidomain_backend *backend);
186 int (*send)(struct log_multidomain_backend *backend, void *data, size_t len);
187};
188
191
201
209 const void *data, size_t len);
210
217
224
232 const void *data, size_t len);
233
240
247
250#endif /* ZEPHYR_INCLUDE_LOGGING_LOG_MULTIDOMAIN_HELPER_H_ */
void log_multidomain_backend_on_error(struct log_multidomain_backend *backend, int err)
Function called on error reported by transport layer.
void log_multidomain_backend_on_recv_cb(struct log_multidomain_backend *backend, const void *data, size_t len)
Function to be called when data is received from remote.
struct log_link_api log_multidomain_link_api
Remote link API.
void log_multidomain_link_on_recv_cb(struct log_multidomain_link *link, const void *data, size_t len)
Function to be called when data is received from remote.
const struct log_backend_api log_multidomain_backend_api
Remote backend API.
void log_multidomain_link_on_started(struct log_multidomain_link *link, int err)
Function called when connection with remote is established.
void log_multidomain_backend_on_started(struct log_multidomain_backend *backend, int err)
Function called when connection with remote is established.
void log_multidomain_link_on_error(struct log_multidomain_link *link, int err)
Function called on error reported by transport layer.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
Logger backend API.
Definition log_backend.h:63
Logger backend structure.
Definition log_backend.h:94
Definition log_msg.h:94
Backend transport API.
Definition log_multidomain_helper.h:184
int(* send)(struct log_multidomain_backend *backend, void *data, size_t len)
Definition log_multidomain_helper.h:186
int(* init)(struct log_multidomain_backend *backend)
Definition log_multidomain_helper.h:185
Remote backend structure.
Definition log_multidomain_helper.h:193
const struct log_multidomain_backend_transport_api * transport_api
Definition log_multidomain_helper.h:194
bool panic
Definition log_multidomain_helper.h:197
int status
Definition log_multidomain_helper.h:198
struct k_sem rdy_sem
Definition log_multidomain_helper.h:196
const struct log_backend * log_backend
Definition log_multidomain_helper.h:195
bool ready
Definition log_multidomain_helper.h:199
Content of the domain count message.
Definition log_multidomain_helper.h:77
uint16_t count
Definition log_multidomain_helper.h:78
Content of the domain name message.
Definition log_multidomain_helper.h:88
char name[0]
Definition log_multidomain_helper.h:90
uint8_t domain_id
Definition log_multidomain_helper.h:89
Content of the message for getting amount of dropped messages.
Definition log_multidomain_helper.h:116
uint32_t dropped
Definition log_multidomain_helper.h:117
Content of the message for getting logging levels.
Definition log_multidomain_helper.h:101
uint16_t source_id
Definition log_multidomain_helper.h:103
uint8_t runtime_level
Definition log_multidomain_helper.h:105
uint8_t domain_id
Definition log_multidomain_helper.h:102
uint8_t level
Definition log_multidomain_helper.h:104
Content of the logging message.
Definition log_multidomain_helper.h:72
uint8_t data[0]
Definition log_multidomain_helper.h:73
Message.
Definition log_multidomain_helper.h:133
uint8_t status
Definition log_multidomain_helper.h:135
union log_multidomain_msg_data data
Definition log_multidomain_helper.h:136
uint8_t id
Definition log_multidomain_helper.h:134
Content of the message for setting logging level.
Definition log_multidomain_helper.h:109
uint16_t source_id
Definition log_multidomain_helper.h:111
uint8_t runtime_level
Definition log_multidomain_helper.h:112
uint8_t domain_id
Definition log_multidomain_helper.h:110
Content of the source count message.
Definition log_multidomain_helper.h:82
uint8_t domain_id
Definition log_multidomain_helper.h:83
uint16_t count
Definition log_multidomain_helper.h:84
Content of the source name message.
Definition log_multidomain_helper.h:94
uint8_t domain_id
Definition log_multidomain_helper.h:95
uint16_t source_id
Definition log_multidomain_helper.h:96
char name[0]
Definition log_multidomain_helper.h:97
static fdata_t data[2]
Definition test_fifo_contexts.c:15
Union with all message types.
Definition log_multidomain_helper.h:121
struct log_multidomain_source_cnt source_cnt
Definition log_multidomain_helper.h:124
struct log_multidomain_domain_cnt domain_cnt
Definition log_multidomain_helper.h:123
struct log_multidomain_source_name source_name
Definition log_multidomain_helper.h:126
struct log_multidomain_domain_name domain_name
Definition log_multidomain_helper.h:125
struct log_multidomain_dropped dropped
Definition log_multidomain_helper.h:129
struct log_multidomain_levels levels
Definition log_multidomain_helper.h:127
struct log_multidomain_set_runtime_level set_rt_level
Definition log_multidomain_helper.h:128