Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
shell_ctx Struct Reference

Shell instance context. More...

#include <shell.h>

Data Fields

const char * prompt
 
enum shell_state state
 Internal module state.
 
enum shell_receive_state receive_state
 Escape sequence indicator.
 
struct shell_static_entry active_cmd
 Currently executed command.
 
const struct shell_static_entryselected_cmd
 New root command.
 
struct shell_vt100_ctx vt100_ctx
 VT100 color and cursor position, terminal width.
 
shell_uninit_cb_t uninit_cb
 Callback called from shell thread context when unitialization is completed just before aborting shell thread.
 
shell_bypass_cb_t bypass
 When bypass is set, all incoming data is passed to the callback.
 
uint32_t log_level
 
uint16_t cmd_buff_len
 Command length.
 
uint16_t cmd_buff_pos
 Command buffer cursor position.
 
uint16_t cmd_tmp_buff_len
 Command length in tmp buffer.
 
char cmd_buff [0]
 Command input buffer.
 
char temp_buff [0]
 Command temporary buffer.
 
char printf_buff [0]
 Printf buffer size.
 
volatile union shell_backend_cfg cfg
 
volatile union shell_backend_ctx ctx
 
struct k_poll_signal signals [SHELL_SIGNALS]
 
struct k_poll_event events [SHELL_SIGNALS]
 Events that should be used only internally by shell thread.
 
struct k_mutex wr_mtx
 
k_tid_t tid
 
int ret_val
 

Detailed Description

Shell instance context.

Field Documentation

◆ active_cmd

struct shell_static_entry shell_ctx::active_cmd

Currently executed command.

◆ bypass

shell_bypass_cb_t shell_ctx::bypass

When bypass is set, all incoming data is passed to the callback.

Logging level for a backend.

◆ cfg

volatile union shell_backend_cfg shell_ctx::cfg

◆ cmd_buff

char shell_ctx::cmd_buff[0]

Command input buffer.

◆ cmd_buff_len

uint16_t shell_ctx::cmd_buff_len

Command length.

◆ cmd_buff_pos

uint16_t shell_ctx::cmd_buff_pos

Command buffer cursor position.

◆ cmd_tmp_buff_len

uint16_t shell_ctx::cmd_tmp_buff_len

Command length in tmp buffer.

◆ ctx

volatile union shell_backend_ctx shell_ctx::ctx

◆ events

struct k_poll_event shell_ctx::events[SHELL_SIGNALS]

Events that should be used only internally by shell thread.

Event for SHELL_SIGNAL_TXDONE is initialized but unused.

◆ log_level

uint32_t shell_ctx::log_level

◆ printf_buff

char shell_ctx::printf_buff[0]

Printf buffer size.

◆ prompt

const char* shell_ctx::prompt

◆ receive_state

enum shell_receive_state shell_ctx::receive_state

Escape sequence indicator.

◆ ret_val

int shell_ctx::ret_val

◆ selected_cmd

const struct shell_static_entry* shell_ctx::selected_cmd

New root command.

If NULL shell uses default root commands.

◆ signals

struct k_poll_signal shell_ctx::signals[SHELL_SIGNALS]

◆ state

enum shell_state shell_ctx::state

Internal module state.

◆ temp_buff

char shell_ctx::temp_buff[0]

Command temporary buffer.

◆ tid

k_tid_t shell_ctx::tid

◆ uninit_cb

shell_uninit_cb_t shell_ctx::uninit_cb

Callback called from shell thread context when unitialization is completed just before aborting shell thread.

◆ vt100_ctx

struct shell_vt100_ctx shell_ctx::vt100_ctx

VT100 color and cursor position, terminal width.

◆ wr_mtx

struct k_mutex shell_ctx::wr_mtx

The documentation for this struct was generated from the following file: