|
nros rmw-cffi
C vtable for plugging a third-party RMW backend into nros
|
Tier-1 status events: liveliness changes, deadline misses, message loss. More...


Go to the source code of this file.
Data Structures | |
| struct | nros_rmw_count_status_t |
| union | nros_rmw_event_payload_t |
| struct | nros_rmw_liveliness_changed_status_t |
Typedefs | |
| typedef void(* | nros_rmw_event_callback_t) (nros_rmw_event_kind_t kind, const nros_rmw_event_payload_t *payload, void *user_context) |
Enumerations | |
| enum | nros_rmw_event_kind_t { NROS_RMW_EVENT_LIVELINESS_CHANGED = 0 , NROS_RMW_EVENT_REQUESTED_DEADLINE_MISSED = 1 , NROS_RMW_EVENT_MESSAGE_LOST = 2 , NROS_RMW_EVENT_LIVELINESS_LOST = 3 , NROS_RMW_EVENT_OFFERED_DEADLINE_MISSED = 4 } |
Tier-1 status events: liveliness changes, deadline misses, message loss.
The status-event surface for the nros RMW C vtable. Backends advertise per-event support; applications register a callback per (entity, event kind) pair.
Dispatch model. Callback-on-entity. Backends fire registered callbacks from inside drive_io when the event is detected — same thread, same priority, same constraints as message callbacks. No waitset, no take-event polling. See book/src/concepts/status-events.md and book/src/design/rmw-vs-upstream.md Section 8 for the design.
Tier-2 / Tier-3 events skipped. MATCHED (Tier-2) is deferred until dynamic-discovery use cases appear — additive without ABI break (the enum is integer-valued; unknown values pass through). QOS_INCOMPATIBLE and INCOMPATIBLE_TYPE (Tier-3) are surfaced synchronously at create-time as nros_rmw_ret_t codes (NROS_RMW_RET_INCOMPATIBLE_QOS, NROS_RMW_RET_TOPIC_NAME_INVALID) rather than as runtime events.
| typedef void(* nros_rmw_event_callback_t) (nros_rmw_event_kind_t kind, const nros_rmw_event_payload_t *payload, void *user_context) |
User callback invoked when an event fires.
| kind | Identifies which member of payload is valid. |
| payload | Pointer is valid for the duration of this call only — copy fields if needed beyond return. |
| user_context | Opaque pointer registered with the callback. |
Threading. Invoked from inside drive_io on the executor thread. Must not block; long work should defer via a guard condition or queue.
Tier-1 event kinds. Stable integer values; future kinds (Tier-2) extend the enum at end.