|
oveRTOS C++ API
C++20 RAII wrappers for the oveRTOS C API
|
C++23 RAII wrappers for the oveRTOS embedded RTOS framework. These wrappers provide type-safe, move-only handles with automatic resource cleanup, compile-time stack sizing, Result<T> (std::expected-based) error handling, and fluent LVGL widget builders.
The C++ binding builds with -std=c++23 across all backends (POSIX, FreeRTOS, NuttX, Zephyr).
Include every module at once with the umbrella header:
Every fallible operation returns ove::Result<T> — an alias for std::expected<T, ove::Error>. The error side is a typed enum class ove::Error mirroring every substrate OVE_ERR_* constant, and round-trips through std::error_code via the bundled category.
Forever-blocking forms (lock(), send() without a timeout, …) return void and abort via OVE_STATIC_INIT_ASSERT on substrate failure — a substrate error in an indefinite wait is treated as a programming error rather than a recoverable condition.
| Class | Header | Description |
|---|---|---|
ove::Thread<StackSize> | ove/thread.hpp | Compile-time stack-sized thread with move semantics |
ove::Mutex | ove/sync.hpp | Non-recursive mutex |
ove::RecursiveMutex | ove/sync.hpp | Recursive mutex |
ove::Semaphore | ove/sync.hpp | Counting semaphore |
ove::Event | ove/sync.hpp | Binary event flag |
ove::CondVar | ove/sync.hpp | Condition variable |
ove::LockGuard | ove/sync.hpp | RAII mutex lock guard |
ove::Queue<T, N> | ove/queue.hpp | Type-safe, fixed-depth message queue |
ove::Timer | ove/timer.hpp | Software timer |
ove::EventGroup | ove/eventgroup.hpp | Multi-bit event flags |
ove::Workqueue / ove::Work | ove/workqueue.hpp | Deferred work queue |
ove::Stream | ove/stream.hpp | Byte-stream ring buffer |
ove::time:: | ove/time.hpp | Monotonic clock and delay helpers |
| Class / namespace | Header | Description |
|---|---|---|
ove::board:: | ove/board.hpp | Board lifecycle and descriptor helpers |
ove::gpio:: | ove/gpio.hpp | GPIO pin configuration and interrupt callbacks |
ove::led:: | ove/led.hpp | On-board LED helpers |
ove::Watchdog | ove/watchdog.hpp | Hardware watchdog timer |
ove::console:: | ove/console.hpp | Serial console I/O helpers |
ove::Uart | ove/uart.hpp | UART driver wrapper |
ove::Spi | ove/spi.hpp | SPI driver wrapper |
ove::I2c | ove/i2c.hpp | I2C driver wrapper |
| Class / namespace | Header | Description |
|---|---|---|
ove::fs::File / ove::fs::Dir | ove/fs.hpp | RAII file and directory handles |
ove::nvs:: | ove/nvs.hpp | Non-volatile key-value storage helpers |
| Class / namespace | Header | Description |
|---|---|---|
ove::audio:: | ove/audio.hpp | Audio graph engine (sources, processors, sinks) |
ove::infer:: | ove/infer.hpp | RAII wrappers for TFLite Micro model lifecycle |
| Class / namespace | Header | Description |
|---|---|---|
ove::net:: | ove/net.hpp | Sockets, addresses, DNS helpers |
ove::tls:: | ove/net_tls.hpp | TLS session wrapper (mbedTLS) |
ove::http::Client | ove/net_http.hpp | HTTP/1.1 client |
ove::mqtt::Client | ove/net_mqtt.hpp | MQTT 3.1.1 client |
ove::httpd:: / ove::ws:: | ove/net_httpd.hpp | Embedded HTTP server with WebSocket support |
ove::sntp:: | ove/net_sntp.hpp | SNTP time sync helpers |
| Class / namespace | Header | Description |
|---|---|---|
ove::pm:: | ove/pm.hpp | Sleep states, wake sources, power domains |
| Class / namespace | Header | Description |
|---|---|---|
ove::shell:: | ove/shell.hpp | Interactive shell registration helpers |
ove::bench:: | ove/bench.hpp | Common latency / throughput benchmarking utilities |
When CONFIG_OVE_LVGL is enabled, ove/lvgl.hpp provides:
| Class | Description |
|---|---|
ove::lvgl::LvglGuard | RAII guard for the LVGL display lock |
ove::lvgl::Component<T> | CRTP base for composable widget components |
ove::lvgl::State<T> | Reactive observable value (uses LV_USE_OBSERVER) |
ove::lvgl::Label / ove::lvgl::Bar / ove::lvgl::Box | Fluent widget builders |
_destroy() calls needed.Result<T> everywhere**: Fallible operations return std::expected-based results with a typed Error enum — no magic-number return codes, no out-parameters for byte counts or response objects.ove::Mutex satisfies the Lockable requirement (composes with std::lock_guard, std::scoped_lock); ove::stop_token / ove::stop_source mirror their std:: counterparts; ove::this_thread::* mirrors std::this_thread::*.For setup, build, configuration, and example walkthroughs, see the oveRTOS documentation site.