Skip to main content

Module session_props

Module session_props 

Source
Expand description

A bringup’s own RMW session configuration, baked into the image as ONE const table – RFC-0109 D8, phase-514 W3.

The user writes their middleware’s own file (rmw/zenoh.json5, the document rmw_zenoh reads from ZENOH_SESSION_CONFIG_URI). The build lowers it ON THE HOST into the backend’s session properties (nros-zenoh-session-config), and the generated entry hands the result to the runtime once, before the board runner opens any session (set_session_properties, nros_cpp_set_session_properties) – the same shape as the launch remap table (super::launch_remap). Every crate::Executor::open that is not given properties of its own passes these to the backend as RmwConfig::properties.

The table describes the image’s DEFAULT session. A second session (crate::SessionSpec, a bridge’s other domain) is not given it.

Structs§

SessionProperty
One session property, as the generated entry emits it: two NUL-terminated strings in .rodata. #[repr(C)] so the C table (nros_cpp_session_property_t) is this struct.

Enums§

BadSessionProperties
Why set_session_properties refused a table.

Constants§

MAX_SESSION_PROPERTIES
The most rows one session open hands the backend. The zenoh shim’s own cap is lower on an embedded build and refuses a longer list there, naming it; this one bounds the stack copy with_session_properties makes.

Functions§

lent_session_properties⚠
Read a table a caller LENDS for one multi-session open (issue 2123): the C/C++ spelling of crate::SessionSpec::properties, rows/len straight off NrosCppSessionSpec or rclc_session_spec_t. Writes the rows into the front of out and returns how many; rows NULL with len == 0 is no table. Refuses (writing nothing usable) a NULL rows with len > 0 or a row that does not read (BadSessionProperties::Row), and more rows than one session open carries or than out holds (BadSessionProperties::TooMany).
session_properties
The installed table (empty until set_session_properties).
set_session_properties
Install the image’s baked session properties. Call it ONCE, at boot, before any executor opens a session – the generated entry calls it before the board runner. A row that does not read refuses the whole table and installs nothing.
with_session_properties
Run f over the properties a session open hands its backend: explicit when the caller supplied any, else the installed table. Every road’s open goes through here (Executor::open, the C API’s open_session), so the table cannot reach one road and miss another.