oveRTOS C++ API
C++20 RAII wrappers for the oveRTOS C API
Loading...
Searching...
No Matches
Functions
ove::shell Namespace Reference

Thin C++ wrappers around the oveRTOS interactive shell API. More...

Functions

Result< void > init () noexcept
 Initialises the shell subsystem.
 
Result< void > register_cmd (const struct ove_shell_cmd *cmd) noexcept
 Registers a shell command.
 
void process_char (int c)
 Feeds a single character into the shell input processor.
 
void process_line (const char *line)
 Process a complete input line through the shell.
 
void set_output_hook (ove_shell_output_hook_t hook)
 Set a hook to capture shell output.
 

Detailed Description

Thin C++ wrappers around the oveRTOS interactive shell API.

Available when CONFIG_OVE_SHELL is enabled.

Function Documentation

◆ init()

Result< void > ove::shell::init ( )
inlinenoexcept

Initialises the shell subsystem.

Returns
Empty Result<void> on success; unexpected Error on failure.

◆ register_cmd()

Result< void > ove::shell::register_cmd ( const struct ove_shell_cmd *  cmd)
inlinenoexcept

Registers a shell command.

Parameters
[in]cmdPointer to the command descriptor structure.
Returns
Empty Result<void> on success; unexpected Error on failure.

◆ process_char()

void ove::shell::process_char ( int  c)
inline

Feeds a single character into the shell input processor.

Typically called from the console receive path.

Parameters
[in]cThe character received from the console.

◆ process_line()

void ove::shell::process_line ( const char *  line)
inline

Process a complete input line through the shell.

Parameters
[in]lineNUL-terminated command line.

◆ set_output_hook()

void ove::shell::set_output_hook ( ove_shell_output_hook_t  hook)
inline

Set a hook to capture shell output.

Parameters
[in]hookOutput hook function (nullptr to remove).