Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

C++ API

The C++ user-facing surface lives in packages/core/nros-cpp/include/nros/*.hpp. Generated by Doxygen; always reflects the current main branch.

API reference

C++ API Doxygen — start here.

The umbrella header nros/nros.hpp pulls in every public surface a user application needs.

Where to start

The library is freestanding C++14 — no STL, no exceptions. Define NROS_CPP_STD if you want the optional std::string / std::function / std::chrono overloads.

Two-layer API. The nros::ActionServer<A> / ActionClient<A> templates are L2 callback handles (set callbacks via nros_cpp_action_server_set_callbacks, dispatched by the executor). The new nros::PollingActionServer<A> / PollingActionClient<A> are L1 polling templates with the same typed serdes glue but caller-driven control flow. Subscriptions / services / service clients are already L1-shaped in nros-cpp. See Two-Layer API for the per-layer rationale.

Event-driven wake callbacks. PollingActionServer<A> and PollingActionClient<A> expose a nested WakeState POD and typed set_{goal,cancel,get_result,goal_response, cancel_response,result,feedback}_wake_callback(state, cb, ctx) methods. Pair an nros_cpp_wake_state_t with each entity / channel to wake on rx instead of polling.

Generating locally

doxygen packages/core/nros-cpp/Doxyfile
xdg-open target/doc/cpp-api/html/index.html