mutek/shell.h header reference
[Kernel services module]

The source code of this header can be browsed online.

Description [link] 

Interactive shell

Members [link] 

Types [link] 

Functions [link] 

Macros [link] 

Members detail [link] 

TERMUI_CON_ARGS_COLLECT_PROTOTYPE(shell_opt_buffer_comp ) [link] 

This constructor is declared in mutek/shell.h source file, line 217.

Documentation from alternate declaration:

This is available when CONFIG_MUTEK_SHELL_BUFFER is defined.

This constructor is for internal use only.

Alternate declarations with same identifier: [1], [2], [3], [4], [5].

Preprocessor condition: defined( CONFIG_MUTEK_SHELL )

TERMUI_CON_ARGS_COLLECT_PROTOTYPE(shell_opt_buffer_name_comp ) [link] 

This constructor is declared in mutek/shell.h source file, line 220.

This is available when CONFIG_MUTEK_SHELL_BUFFER is defined.

This constructor is for internal use only.

Alternate declarations with same identifier: [1], [2], [3], [4], [5].

Preprocessor condition: defined( CONFIG_MUTEK_SHELL )

TERMUI_CON_PARSE_OPT_PROTOTYPE(shell_opt_buffer_raw_parse ) [link] 

This constructor is declared in mutek/shell.h source file, line 212.

Documentation from alternate declaration:

This is available when CONFIG_MUTEK_SHELL_BUFFER is defined.

This constructor is for internal use only.

Alternate declarations with same identifier: [1], [2], [3], [4], [5], [6], [7].

Preprocessor condition: defined( CONFIG_MUTEK_SHELL )

TERMUI_CON_PARSE_OPT_PROTOTYPE(shell_opt_buffer_get_parse ) [link] 

This constructor is declared in mutek/shell.h source file, line 215.

This is available when CONFIG_MUTEK_SHELL_BUFFER is defined.

This constructor is for internal use only.

Alternate declarations with same identifier: [1], [2], [3], [4], [5], [6], [7].

Preprocessor condition: defined( CONFIG_MUTEK_SHELL )

#define GCT_CONTAINER_ALGO_shell_buffer [link] 

This macro is declared in mutek/shell.h source file, line 50.

Preprocessor condition: defined( CONFIG_MUTEK_SHELL_BUFFER )

#define MUTEK_SHELL_H_ [link] 

This macro is declared in mutek/shell.h source file, line 30.

#define MUTEK_SHELL_ROOT_ENTRY(decl, ...) [link] 

This macro is declared in mutek/shell.h source file, line 255.

Preprocessor condition: defined( CONFIG_MUTEK_SHELL )

#define MUTEK_SHELL_ROOT_ENTRY(decl, ...) [link] 

This macro is declared in mutek/shell.h source file, line 261.

Preprocessor condition: not defined( CONFIG_MUTEK_SHELL )

#define MUTEK_SHELL_ROOT_GROUP(group, name) [link] 

This macro is declared in mutek/shell.h source file, line 251.

Preprocessor condition: defined( CONFIG_MUTEK_SHELL )

#define MUTEK_SHELL_ROOT_GROUP(group, name) [link] 

This macro is declared in mutek/shell.h source file, line 260.

Preprocessor condition: not defined( CONFIG_MUTEK_SHELL )

#define TERMUI_CON_OPT_SHELL_BUFFER_GET_ENTRY(sname_, lname_, id_, type_, field_, typeptr_, ...) [link] 

This macro is declared in mutek/shell.h source file, line 235.

This macro can be used to declare a libtermui console option which specifies a shell buffer or raw data.

#define TERMUI_CON_OPT_SHELL_BUFFER_RAW_ENTRY(sname_, lname_, id_, type_, field_, typeptr_, ...) [link] 

This macro is declared in mutek/shell.h source file, line 224.

This macro can be used to declare a libtermui console option which accepts an exisiting shell buffer or raw data.

error_t mutek_shell_start(const struct device_char_s *c, const char *term, const struct termui_con_entry_s *const*root, const char *prompt) [link] 

This function is declared in mutek/shell.h source file, line 172.

This function starts an interactive shell. This function does not returns until the shell is exited by the user.

This is available when CONFIG_MUTEK_SHELL is defined.

void shell_buffer_advertise(struct termui_console_s *con, void *data, size_t size) [link] 

This function is declared in mutek/shell.h source file, line 134.

This function can be used to advertise the availability of new data in a buffer. When the CONFIG_MUTEK_SHELL_BUFFER token is defined, this show the name of the buffer. In the other case, it hexdumps the buffer content.

This is available when CONFIG_MUTEK_SHELL is defined.

void shell_buffer_collect(const struct termui_console_s *con, const char *name) [link] 

This function is declared in mutek/shell.h source file, line 160.

This function destroy a buffer which is not in use. All buffers are released when the name pointer is NULL.

This is available when CONFIG_MUTEK_SHELL_BUFFER is defined.

void shell_buffer_drop(void *data) [link] 

This function is declared in mutek/shell.h source file, line 125.

This function drops the reference to a buffer. The buffer is released when the shell_buffer_collect function is called provided that no one else has taken the reference.

When the CONFIG_MUTEK_SHELL_BUFFER token is undefined, this is equivalent to calling mem_free.

This is available when CONFIG_MUTEK_SHELL is defined.

typedef void * shell_buffer_entry_t [link] 

This typedef is declared in mutek/shell.h source file, line 67.

Preprocessor condition: defined( CONFIG_MUTEK_SHELL_BUFFER )

void * shell_buffer_get(const struct termui_console_s *con, const char *name, size_t *size, const void *type) [link] 

This function is declared in mutek/shell.h source file, line 150.

This function takes a reference to a buffer. If the name parameter is not NULL, a buffer with the specified name must exist for the function to succeed. If the name parameter is NULL, the last created buffer is returned.

The current size of the buffer is stored in size if not NULL. The reference to the buffer must be released by calling the shell_buffer_drop function.

The function return NULL on failure.

This is available when CONFIG_MUTEK_SHELL_BUFFER is defined.

See also TERMUI_CON_OPT_SHELL_BUFFER_GET_ENTRY.

typedef struct mutek_shell_buffer_s * shell_buffer_item_t [link] 

This typedef is declared in mutek/shell.h source file, line 67.

Preprocessor condition: defined( CONFIG_MUTEK_SHELL_BUFFER )

const char * shell_buffer_name(void *data) [link] 

This function is declared in mutek/shell.h source file, line 154.

This function returns the name of a referenced buffer

This is available when CONFIG_MUTEK_SHELL_BUFFER is defined.

void * shell_buffer_new(const struct termui_console_s *con, size_t size, const char *prefix, const void *type, bool_t nocopy) [link] 

This function is declared in mutek/shell.h source file, line 100.

This function allocates a new buffer. The reference to the buffer must be released by calling the shell_buffer_drop function.

The type argument can be used to indentify the type of data contained in the buffer. It allows trusting the content of an existing buffer for casting to a C structure. Editing the buffer at byte level from the shell will change the type to NULL. The nocopy flag can also be used to drop the type when the buffer is duplicated.

When the CONFIG_MUTEK_SHELL_BUFFER token is undefined, this is equivalent to calling mem_alloc.

This is available when CONFIG_MUTEK_SHELL is defined.

void * shell_buffer_reuse(const struct termui_console_s *con, size_t size, const char *prefix, const void *type, bool_t nocopy) [link] 

This function is declared in mutek/shell.h source file, line 115.

This function lookup a buffer with a matching type and a no reference. If no such buffer exist a new buffer is allocated. The reference to the buffer must be released by calling the shell_buffer_drop function.

The function return NULL if the allocation failed.

When the CONFIG_MUTEK_SHELL_BUFFER token is undefined, this is equivalent to calling mem_alloc.

This is available when CONFIG_MUTEK_SHELL is defined.

typedef void * shell_buffer_root_t [link] 

This typedef is declared in mutek/shell.h source file, line 67.

Preprocessor condition: defined( CONFIG_MUTEK_SHELL_BUFFER )

void shell_hexdump(struct termui_console_s *con, const uint8_t *data, uintptr_t offset, size_t size, size_t dump_size) [link] 

This function is declared in mutek/shell.h source file, line 270.

This function output a memory dump. The address column is printed according to offset. The dump will be advertised as partial when size is greater that dump_size.

This is available when CONFIG_MUTEK_SHELL is defined.

void * shell_opt_buffer_new_if_null(struct shell_opt_buffer_s *b, const struct termui_console_s *con, size_t size, const char *prefix, const void *type, bool_t nocopy) [link] 

This function is declared in mutek/shell.h source file, line 208.

This function calls shell_buffer_new only if the TERMUI_CON_OPT_SHELL_BUFFER_GET_ENTRY option has not parsed a buffer. In either cases the buffer should be released by the options cleanup handler.

This is available when CONFIG_MUTEK_SHELL_BUFFER is defined.

struct shell_opt_buffer_s [link] 

This struct is declared in mutek/shell.h source file, line 178.

This is used to store a pointer to a shell buffer or other storage in a console options parsing context.

See also TERMUI_CON_OPT_SHELL_BUFFER_GET_ENTRY.

FieldDescription
void * addr;pointer to storage
uintptr_t size:31;size storage
uintptr_t buffered:1;this is set when the shell_buffer_drop function must be called on cleanup.

struct mutek_shell_buffer_s [link] 

This struct is declared in mutek/shell.h source file, line 56.

This struct is for internal use only.

Preprocessor condition: defined( CONFIG_MUTEK_SHELL_BUFFER )

FieldDescription
char name[16];
struct mutek_shell_context_s * sctx;
const void * type;
uintptr_t size:24;
uintptr_t use:1;
uintptr_t nocopy:1;
uint8_t data[0];

See also shell_buffer_item_t.

struct mutek_shell_context_s [link] 

This struct is declared in mutek/shell.h source file, line 76.

This struct is for internal use only.

struct mutek_shell_root_groups_s [link] 

This struct is declared in mutek/shell.h source file, line 247.

This struct is for internal use only.

FieldDescription
const struct termui_con_entry_s * e;

bool_t shell_buffer_collect_all(struct mutek_shell_context_s *sctx) [link] 

This function is declared in mutek/shell.h source file, line 165.

This is for internal purpose, shell context must be locked.

This is available when CONFIG_MUTEK_SHELL_BUFFER is defined.

This function is for internal use only.

struct shell_opt_buffer_desc_s [link] 

This struct is declared in mutek/shell.h source file, line 192.

This struct is for internal use only.

See also TERMUI_CON_OPT_SHELL_BUFFER_GET_ENTRY.

FieldDescription
struct termui_con_opts_s opt;
const void * type;
uint16_t offset;
Valid XHTML 1.0 StrictGenerated by diaxen on Thu Aug 4 15:44:06 2022 using MkDoc