Zephyr Project API 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
shell_remote_common.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2026 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
12
13#ifndef ZEPHYR_INCLUDE_SHELL_SHELL_REMOTE_COMMON_H_
14#define ZEPHYR_INCLUDE_SHELL_SHELL_REMOTE_COMMON_H_
15
16#include <zephyr/shell/shell.h>
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
27
29#define SHELL_REMOTE_MSG_PRINT 1
30
32#define SHELL_REMOTE_MSG_CMD_GET 2
33
35#define SHELL_REMOTE_MSG_CMD 3
36
38#define SHELL_REMOTE_MSG_EXEC 4
39
41#define SHELL_REMOTE_MSG_RESULT 5
42
44
50
60
74
82
92
108
124
125#ifdef __cplusplus
126}
127#endif
128
129#endif /* ZEPHYR_INCLUDE_SHELL_SHELL_REMOTE_COMMON_H_ */
int(* shell_cmd_handler)(const struct shell *sh, size_t argc, char **argv)
Shell command handler prototype.
Definition shell.h:259
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Get command.
Definition shell_remote_common.h:84
const struct shell_static_entry * parent
Parent command.
Definition shell_remote_common.h:88
size_t idx
Index.
Definition shell_remote_common.h:90
uint8_t id
Message ID.
Definition shell_remote_common.h:86
Response to get command.
Definition shell_remote_common.h:94
shell_cmd_handler handler
Command handler.
Definition shell_remote_common.h:102
const struct shell_static_entry * entry
Entry.
Definition shell_remote_common.h:100
char data[0]
Data (null-terminated syntax followed by optional help).
Definition shell_remote_common.h:106
struct shell_static_args args
Command parameters.
Definition shell_remote_common.h:104
uint8_t id
Message ID.
Definition shell_remote_common.h:96
const union shell_cmd_entry * subcmd
Subcommand.
Definition shell_remote_common.h:98
Execute command.
Definition shell_remote_common.h:62
uint8_t id
Message ID.
Definition shell_remote_common.h:64
uint8_t cmd_lvl
Command level.
Definition shell_remote_common.h:68
shell_cmd_handler handler
Command handler.
Definition shell_remote_common.h:70
uint8_t argc
Number of arguments.
Definition shell_remote_common.h:66
uint8_t data[0]
Command arguments.
Definition shell_remote_common.h:72
Generic message.
Definition shell_remote_common.h:46
uint8_t id
Message ID.
Definition shell_remote_common.h:48
Print message.
Definition shell_remote_common.h:52
uint8_t color
Color.
Definition shell_remote_common.h:56
uint8_t data[0]
Cbprintf package (pre-padded to be aligned to 8 bytes).
Definition shell_remote_common.h:58
uint8_t id
Message ID.
Definition shell_remote_common.h:54
Result.
Definition shell_remote_common.h:76
uint8_t id
Message ID.
Definition shell_remote_common.h:78
int result
Result.
Definition shell_remote_common.h:80
Definition shell.h:112
Definition shell.h:291
Shell command descriptor.
Definition shell.h:102
Union of remote shell messages.
Definition shell_remote_common.h:110
struct shell_remote_msg_print * print
Print message.
Definition shell_remote_common.h:114
struct shell_remote_msg_exec * exec
Execute command.
Definition shell_remote_common.h:120
struct shell_remote_msg_cmd_get * cmd_get
Get command.
Definition shell_remote_common.h:118
struct shell_remote_msg_result * result
Result.
Definition shell_remote_common.h:122
struct shell_remote_msg_cmd * cmd
Command.
Definition shell_remote_common.h:116