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 Subscription / Publisher), not via upstream’s waitset-take pattern.

Events fire from inside Session::drive_io on the executor thread, the same as message callbacks. (Phase 105 counted both against a per-spin cap, max_callbacks_per_spin; the executor has no such cap now.)

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

§Matched and incompatible-type (issue 1972)

Iron/Jazzy’s *_MATCHED and *_INCOMPATIBLE_TYPE kinds are appended after the Tier-1 set (EventKind::PublicationMatched onward), with payloads MatchedStatus and IncompatibleTypeStatus. Upstream’s QOS_INCOMPATIBLE is still surfaced synchronously at create time as TransportError::IncompatibleQos (NROS_RMW_RET_INCOMPATIBLE_QOS at the C boundary); no runtime event for it.

Structs§

CountStatus
Deadline / message-lost payload. Used for RequestedDeadlineMissed, LivelinessLost, OfferedDeadlineMissed, MessageLost — same shape.
IncompatibleTypeCounter
Turns successive snapshots of an incompatible-type count into IncompatibleTypeStatus reports. Same bound as MatchedCounter: only increases between polls are counted.
IncompatibleTypeStatus
Incompatible-type payload — upstream rmw_incompatible_type_status_t (Iron+), issue 1972. u32 where upstream has int32_t: both only grow.
LivelinessChangedStatus
Liveliness-status payload. Mirrors DDS rmw_liveliness_changed_status_t shape.
MatchedCounter
Turns successive SNAPSHOTS of a matched count into MatchedStatus reports — issue 1972. no_std, no allocation, eight bytes.
MatchedStatus
Matched payload — upstream rmw_matched_status_t (Iron+), issue 1972.

Enums§

EventKind
Status-event kinds. #[non_exhaustive] so adding a variant later is not a break for matchers. Discriminants equal the C rmw_event_type_t values, which only ever grow at the end.
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.