Skip to main content

Module event

Module event 

Source
Expand description

Status-event surface (Phase 108).

Tier-1 events that backends optionally surface — liveliness changes, deadline misses, message loss. Dispatched via callback-on-entity (registration on Subscriber / Publisher), not via upstream’s waitset-take pattern.

Events fire from inside Session::drive_io on the executor thread, the same as message callbacks. They count against the executor’s max_callbacks_per_spin cap (Phase 105) the same way.

See book/src/concepts/status-events.md for the user-facing patterns and book/src/design/rmw-vs-upstream.md Section 8 for the design rationale.

§Tier-2 / Tier-3 deliberately skipped

Upstream rmw_event_type_t includes MATCHED, QOS_INCOMPATIBLE, and INCOMPATIBLE_TYPE. The first is deferred until dynamic- discovery use cases appear; additive without an ABI break. The latter two are surfaced synchronously at create time as TransportError::IncompatibleQos / TopicNameInvalid (mapped to NROS_RMW_RET_INCOMPATIBLE_QOS / NROS_RMW_RET_TOPIC_NAME_INVALID at the C boundary). No runtime event needed.

Structs§

CountStatus
Deadline / message-lost payload. Used for RequestedDeadlineMissed, LivelinessLost, OfferedDeadlineMissed, MessageLost — same shape.
LivelinessChangedStatus
Liveliness-status payload. Mirrors DDS rmw_liveliness_changed_status_t shape.

Enums§

EventKind
Tier-1 status-event kinds. #[non_exhaustive] so adding a Tier-2 (MATCHED) variant later is not an ABI break for matchers.
EventPayload
Borrow-shaped event payload union. Variant selection mirrors EventKind.

Functions§

payload_from_raw
Helper: convert a raw (kind, payload_ptr) pair into a typed EventPayload borrow. Used inside EventCallback trampolines.

Type Aliases§

DeadlineMissedStatus
Type alias: the deadline-missed shape is identical to CountStatus.
EventCallback
Raw event callback. Identical Rust + C ABI; no_std + alloc-free.
MessageLostStatus
Type alias: the message-lost shape is identical to CountStatus.