Skip to main content

rmw_qos_profile_t

Struct rmw_qos_profile_t 

Source
#[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 upstream RMW_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: u32

Subscription: max acceptable inter-arrival time, ms. Publisher: max acceptable inter-publish (offered rate), ms. 0 = infinite (no deadline).

§lifespan_ms: u32

Sample expiry, ms. Subscription filters samples older than this. 0 = infinite (no expiry).

§liveliness_lease_ms: u32

Liveliness lease, ms. Publisher must assert liveliness within this window or be considered dead. 0 = infinite.

§avoid_ros_namespace_conventions: u8

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.)

§_reserved1: [u8; 3]

< Reserved; must be zero.

Trait Implementations§

Source§

impl Clone for rmw_qos_profile_t

Source§

fn clone(&self) -> rmw_qos_profile_t

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for rmw_qos_profile_t

Source§

impl Debug for rmw_qos_profile_t

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for rmw_qos_profile_t

Source§

impl PartialEq for rmw_qos_profile_t

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.