Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
shell_dummy.h File Reference
#include <shell/shell.h>

Go to the source code of this file.

Data Structures

struct  shell_dummy
 

Macros

#define SHELL_DUMMY_DEFINE(_name)
 

Functions

const struct shellshell_backend_dummy_get_ptr (void)
 This function shall not be used directly. It provides pointer to shell dummy backend instance. More...
 
const char * shell_backend_dummy_get_output (const struct shell *shell, size_t *sizep)
 Returns the buffered output in the shell and resets the pointer. More...
 
void shell_backend_dummy_clear_output (const struct shell *shell)
 Clears the output buffer in the shell backend. More...
 

Variables

const struct shell_transport_api shell_dummy_transport_api
 

Macro Definition Documentation

◆ SHELL_DUMMY_DEFINE

#define SHELL_DUMMY_DEFINE (   _name)
Value:
static struct shell_dummy _name##_shell_dummy; \
struct shell_transport _name = { \
.ctx = (struct shell_dummy *)&_name##_shell_dummy \
}
const struct shell_transport_api shell_dummy_transport_api
Definition: shell_dummy.h:20
Definition: shell.h:597
const struct shell_transport_api * api
Definition: shell.h:598

Function Documentation

◆ shell_backend_dummy_clear_output()

void shell_backend_dummy_clear_output ( const struct shell shell)

Clears the output buffer in the shell backend.

Parameters
shellShell pointer

◆ shell_backend_dummy_get_output()

const char * shell_backend_dummy_get_output ( const struct shell shell,
size_t *  sizep 
)

Returns the buffered output in the shell and resets the pointer.

The returned data is always followed by a nul character at position *sizep

Parameters
shellShell pointer
sizepReturns size of data in shell buffer
Returns
pointer to buffer containing shell output

◆ shell_backend_dummy_get_ptr()

const struct shell * shell_backend_dummy_get_ptr ( void  )

This function shall not be used directly. It provides pointer to shell dummy backend instance.

Function returns pointer to the shell dummy instance. This instance can be next used with shell_execute_cmd function in order to test commands behavior.

Returns
Pointer to the shell instance.

Variable Documentation

◆ shell_dummy_transport_api

const struct shell_transport_api shell_dummy_transport_api
extern