File tree Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (c) 2024 Nordic Semiconductor ASA
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+
7
+ #ifndef ZEPHYR_LOG_BACKEND_WS_H_
8
+ #define ZEPHYR_LOG_BACKEND_WS_H_
9
+
10
+ #include <stdbool.h>
11
+
12
+ #ifdef __cplusplus
13
+ extern "C" {
14
+ #endif
15
+
16
+ /**
17
+ * @brief Register websocket socket where the logging output is sent.
18
+ *
19
+ * @param fd Websocket socket value.
20
+ *
21
+ * @return 0 if ok, <0 if error
22
+ */
23
+ int log_backend_ws_register (int fd );
24
+
25
+ /**
26
+ * @brief Unregister websocket socket where the logging output was sent.
27
+ *
28
+ * @details After this the websocket output is disabled.
29
+ *
30
+ * @param fd Websocket socket value.
31
+ *
32
+ * @return 0 if ok, <0 if error
33
+ */
34
+ int log_backend_ws_unregister (int fd );
35
+
36
+ /**
37
+ * @brief Get the websocket logger backend
38
+ *
39
+ * @details This function returns the websocket logger backend.
40
+ *
41
+ * @return Pointer to the websocket logger backend.
42
+ */
43
+ const struct log_backend * log_backend_ws_get (void );
44
+
45
+ /**
46
+ * @brief Start the websocket logger backend
47
+ *
48
+ * @details This function starts the websocket logger backend.
49
+ */
50
+ void log_backend_ws_start (void );
51
+
52
+ #ifdef __cplusplus
53
+ }
54
+ #endif
55
+
56
+ #endif /* ZEPHYR_LOG_BACKEND_WS_H_ */
You can’t perform that action at this time.
0 commit comments