#[repr(C)]pub struct rmw_qos_profile_t {
pub reliability: u8,
pub durability: u8,
pub history: u8,
pub liveliness_kind: u8,
pub depth: u16,
pub _reserved0: u16,
pub deadline_ms: u32,
pub lifespan_ms: u32,
pub liveliness_lease_ms: u32,
pub avoid_ros_namespace_conventions: u8,
pub _reserved1: [u8; 3],
}Expand description
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 upstreamRMW_QOS_*_DEFAULT, the zero time — a “real 0-duration” is inexpressible upstream too).NROS_RMW_DURATION_INFINITE_MS= explicit infinite.- Callers lowering finer-grained times MUST round sub-ms values UP
to 1 ms (rounding down would silently turn a real deadline into
“no deadline”) and MUST reject values past the u32-ms range
(other than the infinite sentinel) at create time
(
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.
Fields§
§reliability: u8< @see NROS_RMW_RELIABILITY_*
durability: u8< @see NROS_RMW_DURABILITY_*
history: u8< @see NROS_RMW_HISTORY_*
liveliness_kind: u8< @see rmw_liveliness_kind_t
depth: u16§_reserved0: u16< Reserved; must be zero.
deadline_ms: u32Subscription: max acceptable inter-arrival time, ms. Publisher: max acceptable inter-publish (offered rate), ms. 0 = infinite (no deadline).
lifespan_ms: u32Sample expiry, ms. Subscription filters samples older than this. 0 = infinite (no expiry).
liveliness_lease_ms: u32Liveliness lease, ms. Publisher must assert liveliness within this window or be considered dead. 0 = infinite.
avoid_ros_namespace_conventions: u8If 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.)
_reserved1: [u8; 3]< Reserved; must be zero.
Trait Implementations§
Source§impl Clone for rmw_qos_profile_t
impl Clone for rmw_qos_profile_t
Source§fn clone(&self) -> rmw_qos_profile_t
fn clone(&self) -> rmw_qos_profile_t
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more