nros C++ API
Lightweight ROS 2 client for embedded real-time systems (C++ headers)
Loading...
Searching...
No Matches
Files
init

Library initialisation, the global session, and nros::ok(). More...

Files

file  nros.hpp
 Umbrella header — pulls in every public C++ API surface.
 

Detailed Description

Library initialisation, the global session, and nros::ok().

nros::init() boots the transport; nros::shutdown() tears it down. nros::ok() reports whether the global session is alive (false after shutdown or after a fatal transport error).

NROS_TRY(nros::init("tcp/127.0.0.1:7447"));
while (nros::ok()) nros::spin_once(100);
Result spin_once(int32_t timeout_ms=10)
Definition nros.hpp:62
Result shutdown()
Definition node.hpp:663
bool ok()
Check if the nros session is initialized.
Definition node.hpp:717
Result init(const char *locator=nullptr, uint8_t domain_id=0)
Definition node.hpp:568
#define NROS_TRY(expr)
Definition result.hpp:90
See also
node, Getting Started