oveRTOS C++ API
C++20 RAII wrappers for the oveRTOS C API
Loading...
Searching...
No Matches
shell.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2026 Kamil Lulko <kamil.lulko@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 *
6 * This file is part of oveRTOS.
7 */
8
14#pragma once
15
16#include <ove/shell.h>
17#include <ove/types.hpp>
18
19#ifdef CONFIG_OVE_SHELL
20
21namespace ove {
22
29namespace shell {
30
35[[nodiscard]] inline int init() {
36 return ove_shell_init();
37}
38
44[[nodiscard]] inline int register_cmd(const struct ove_shell_cmd *cmd) {
45 return ove_shell_register_cmd(cmd);
46}
47
55inline void process_char(int c) {
56 ove_shell_process_char(c);
57}
58
63inline void process_line(const char *line) {
64 ove_shell_process_line(line);
65}
66
71inline void set_output_hook(ove_shell_output_hook_t hook) {
72 ove_shell_set_output_hook(hook);
73}
74
75} /* namespace shell */
76
77} // namespace ove
78
79#endif /* CONFIG_OVE_SHELL */
void process_char(int c)
Feeds a single character into the shell input processor.
Definition shell.hpp:55
void process_line(const char *line)
Process a complete input line through the shell.
Definition shell.hpp:63
int register_cmd(const struct ove_shell_cmd *cmd)
Registers a shell command.
Definition shell.hpp:44
int init()
Initialises the shell subsystem.
Definition shell.hpp:35
void set_output_hook(ove_shell_output_hook_t hook)
Set a hook to capture shell output.
Definition shell.hpp:71
Top-level namespace for all oveRTOS C++ abstractions.
Definition app.hpp:19
Common type definitions and concepts for the C++ wrapper layer.