Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
shell_dummy.h File Reference

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.
 
const char * shell_backend_dummy_get_output (const struct shell *sh, size_t *sizep)
 Returns the buffered output in the shell and resets the pointer.
 
void shell_backend_dummy_clear_output (const struct shell *sh)
 Clears the output buffer in the shell backend.
 

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:724

Function Documentation

◆ shell_backend_dummy_clear_output()

void shell_backend_dummy_clear_output ( const struct shell * sh)

Clears the output buffer in the shell backend.

Parameters
shShell pointer

◆ shell_backend_dummy_get_output()

const char * shell_backend_dummy_get_output ( const struct shell * sh,
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
shShell 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