|
Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
|
Dummy shell backend for testing. More...
#include <zephyr/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 shell * | shell_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. | |
| int | shell_backend_dummy_push_input (const struct shell *sh, const char *data, size_t len) |
| Push input data to the dummy shell backend. | |
| void | shell_backend_dummy_clear_input (const struct shell *sh) |
| Clear the input buffer in the shell backend. | |
Variables | |
| const struct shell_transport_api | shell_dummy_transport_api |
Dummy shell backend for testing.
| #define SHELL_DUMMY_DEFINE | ( | _name | ) |
| void shell_backend_dummy_clear_input | ( | const struct shell * | sh | ) |
Clear the input buffer in the shell backend.
| sh | Shell pointer |
| void shell_backend_dummy_clear_output | ( | const struct shell * | sh | ) |
Clears the output buffer in the shell backend.
| sh | Shell pointer |
Returns the buffered output in the shell and resets the pointer.
The returned data is always followed by a nul character at position *sizep
| sh | Shell pointer |
| sizep | Returns size of data in shell buffer |
| 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.
Push input data to the dummy shell backend.
This function queues input data that will be returned by subsequent read operations. Useful for testing shell input handling.
| sh | Shell pointer |
| data | Input data to push |
| len | Length of input data |
|
extern |