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
67
74
96/* Phase 376 W5 — `rmw_status_event_callback_t`, NOT `rmw_event_callback_t`.
97 *
98 * Upstream binds `rmw_event_callback_t` to a DIFFERENT signature —
99 * `void(const void *user_data, size_t number_of_events)`, the callback
100 * `rmw_{service,client,subscription}_set_on_new_*_callback` install. Ours is
101 * the DDS STATUS-event callback: a kind, a payload union, and a context.
102 *
103 * Two types of one name whose shapes disagree is exactly the hazard
104 * `rmw_vtable.h`'s `#error` guard exists for — except this one would have been
105 * INSIDE our own header, where the guard cannot see it, and
106 * `scripts/rmw-abi-shape.py` compares parameter type NAMES, so it would have
107 * reported the `set_on_new_*` slots as matching upstream exactly while they
108 * took a callback of the wrong shape. Introduced by W3.a's rename; caught by
109 * the W5 audit before any slot depended on it. */
111 rmw_event_type_t kind,
112 const rmw_event_payload_t *payload,
113 void *user_context);
114
115
120typedef void (*rmw_event_callback_t)(const void *user_data, size_t number_of_events);
121
122#endif /* NROS_RMW_EVENT_H */
void(* rmw_event_callback_t)(const void *user_data, size_t number_of_events)
Definition rmw_event.h:120
void(* rmw_status_event_callback_t)(rmw_event_type_t kind, const rmw_event_payload_t *payload, void *user_context)
Definition rmw_event.h:110
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:63
uint32_t total_count
Definition rmw_event.h:64
uint32_t total_count_change
Definition rmw_event.h:65
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:70
rmw_liveliness_changed_status_t liveliness_changed
Definition rmw_event.h:71
rmw_count_status_t count
Definition rmw_event.h:72