|
nros rmw-cffi
C vtable for plugging a third-party RMW backend into nros
|
#include <rmw_entity.h>
Data Fields | |
| uint16_t | _reserved0 |
| uint8_t | _reserved1 [3] |
| uint8_t | avoid_ros_namespace_conventions |
| uint32_t | deadline_ms |
| uint16_t | depth |
| uint8_t | durability |
| uint8_t | history |
| uint32_t | lifespan_ms |
| uint8_t | liveliness_kind |
| uint32_t | liveliness_lease_ms |
| uint8_t | reliability |
Full DDS-shaped QoS profile.
Matches the field set of upstream rmw_qos_profile_t. Backends advertise per-policy support via the runtime's supported_qos_policies() query; entities created with a profile the active backend can't honour return NROS_RMW_RET_INCOMPATIBLE_QOS synchronously at create time — no silent downgrade.
Zero-valued fields ("off") preserve the cheap default for apps that don't request the policy:
deadline_ms = 0 → infinite deadline (no check).lifespan_ms = 0 → infinite lifespan (no expiry).liveliness_kind = NONE → no liveliness tracking.liveliness_lease_ms = 0 → infinite lease.Boundary semantics (phase-301, issue 0241). Durations are u32 MILLISECONDS; that width is part of the contract:
0 = unset/no-check (matches upstream RMW_QOS_*_DEFAULT, the zero time — a "real 0-duration" is inexpressible upstream too).NROS_RMW_DURATION_INFINITE_MS = explicit infinite.NROS_RMW_RET_INVALID_ARGUMENT) — never clamp.depth is uint16_t (max 65 535). Embedded ROS application queue depths are typically 1–100; the 16-bit width saves two bytes per entity vs the upstream 32-bit choice. A requested depth the width cannot represent is a create-time error, never a silent saturate (phase-301, issue 0241).
Pure policy mirror (phase-301, issue 0240). Transport hints (tx_express, rx_buffer_hint) moved OUT of this struct into rmw_publisher_options_t / rmw_subscription_options_t — the upstream rmw_publisher_options_t / rmw_subscription_options_t home for exactly that class. QoS carries DDS policy only; hint growth no longer churns this ABI.
| uint16_t rmw_qos_profile_t::_reserved0 |
Reserved; must be zero.
| uint8_t rmw_qos_profile_t::_reserved1[3] |
Reserved; must be zero.
| uint8_t rmw_qos_profile_t::avoid_ros_namespace_conventions |
If non-zero, topic-name encoding skips the ROS /rt/ prefix and uses raw application names. Matches upstream avoid_ros_namespace_conventions. 0 = false, non-zero = true. (uint8_t instead of bool; sizeof(_Bool) is impl- defined per C99 — uint8_t keeps the layout stable across toolchains.)
| uint32_t rmw_qos_profile_t::deadline_ms |
Subscription: max acceptable inter-arrival time, ms. Publisher: max acceptable inter-publish (offered rate), ms. 0 = infinite (no deadline).
| uint16_t rmw_qos_profile_t::depth |
| uint8_t rmw_qos_profile_t::durability |
| uint8_t rmw_qos_profile_t::history |
| uint32_t rmw_qos_profile_t::lifespan_ms |
Sample expiry, ms. Subscription filters samples older than this. 0 = infinite (no expiry).
| uint8_t rmw_qos_profile_t::liveliness_kind |
| uint32_t rmw_qos_profile_t::liveliness_lease_ms |
Liveliness lease, ms. Publisher must assert liveliness within this window or be considered dead. 0 = infinite.
| uint8_t rmw_qos_profile_t::reliability |