nros rmw-cffi
C vtable for plugging a third-party RMW backend into nros
Loading...
Searching...
No Matches
rmw_event.h
Go to the documentation of this file.
1#ifndef NROS_RMW_EVENT_H
2#define NROS_RMW_EVENT_H
3
4#include <stdint.h>
5#include <stddef.h>
6
7#include "nros/rmw_ret.h"
8
49
58
66
73
95/* Phase 376 W5 — `rmw_status_event_callback_t`, NOT `rmw_event_callback_t`.
96 *
97 * Upstream binds `rmw_event_callback_t` to a DIFFERENT signature —
98 * `void(const void *user_data, size_t number_of_events)`, the callback
99 * `rmw_{service,client,subscription}_set_on_new_*_callback` install. Ours is
100 * the DDS STATUS-event callback: a kind, a payload union, and a context.
101 *
102 * Two types of one name whose shapes disagree is exactly the hazard
103 * `rmw_vtable.h`'s `#error` guard exists for — except this one would have been
104 * INSIDE our own header, where the guard cannot see it, and
105 * `scripts/rmw-abi-shape.py` compares parameter type NAMES, so it would have
106 * reported the `set_on_new_*` slots as matching upstream exactly while they
107 * took a callback of the wrong shape. Introduced by W3.a's rename; caught by
108 * the W5 audit before any slot depended on it. */
110 rmw_event_type_t kind,
111 const rmw_event_payload_t *payload,
112 void *user_context);
113
114
119typedef void (*rmw_event_callback_t)(const void *user_data, size_t number_of_events);
120
121#endif /* NROS_RMW_EVENT_H */
void(* rmw_event_callback_t)(const void *user_data, size_t number_of_events)
Definition rmw_event.h:119
void(* rmw_status_event_callback_t)(rmw_event_type_t kind, const rmw_event_payload_t *payload, void *user_context)
Definition rmw_event.h:109
rmw_event_type_t
Definition rmw_event.h:36
@ NROS_RMW_EVENT_LIVELINESS_CHANGED
Definition rmw_event.h:38
@ NROS_RMW_EVENT_REQUESTED_DEADLINE_MISSED
Definition rmw_event.h:41
@ NROS_RMW_EVENT_LIVELINESS_LOST
Definition rmw_event.h:45
@ NROS_RMW_EVENT_OFFERED_DEADLINE_MISSED
Definition rmw_event.h:47
@ NROS_RMW_EVENT_MESSAGE_LOST
Definition rmw_event.h:43
Return-code constants for the nros RMW C vtable.
Definition rmw_event.h:62
uint32_t total_count
Definition rmw_event.h:63
uint32_t total_count_change
Definition rmw_event.h:64
Definition rmw_event.h:52
int16_t alive_count_change
Definition rmw_event.h:55
int16_t not_alive_count_change
Definition rmw_event.h:56
uint16_t alive_count
Definition rmw_event.h:53
uint16_t not_alive_count
Definition rmw_event.h:54
Definition rmw_event.h:69
rmw_liveliness_changed_status_t liveliness_changed
Definition rmw_event.h:70
rmw_count_status_t count
Definition rmw_event.h:71