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
38
69
78
87
107
116
129
151/* Phase 376 W5 — `rmw_status_event_callback_t`, NOT `rmw_event_callback_t`.
152 *
153 * Upstream binds `rmw_event_callback_t` to a DIFFERENT signature —
154 * `void(const void *user_data, size_t number_of_events)`, the callback
155 * `rmw_{service,client,subscription}_set_on_new_*_callback` install. Ours is
156 * the DDS STATUS-event callback: a kind, a payload union, and a context.
157 *
158 * Two types of one name whose shapes disagree is exactly the hazard
159 * `rmw_vtable.h`'s `#error` guard exists for — except this one would have been
160 * INSIDE our own header, where the guard cannot see it, and
161 * `scripts/rmw-abi-shape.py` compares parameter type NAMES, so it would have
162 * reported the `set_on_new_*` slots as matching upstream exactly while they
163 * took a callback of the wrong shape. Introduced by W3.a's rename; caught by
164 * the W5 audit before any slot depended on it. */
166 rmw_event_type_t kind,
167 const rmw_event_payload_t *payload,
168 void *user_context);
169
170
175typedef void (*rmw_event_callback_t)(const void *user_data, size_t number_of_events);
176
177#endif /* NROS_RMW_EVENT_H */
void(* rmw_event_callback_t)(const void *user_data, size_t number_of_events)
Definition rmw_event.h:175
void(* rmw_status_event_callback_t)(rmw_event_type_t kind, const rmw_event_payload_t *payload, void *user_context)
Definition rmw_event.h:165
rmw_event_type_t
Definition rmw_event.h:41
@ NROS_RMW_EVENT_SUBSCRIPTION_MATCHED
Definition rmw_event.h:59
@ NROS_RMW_EVENT_LIVELINESS_CHANGED
Definition rmw_event.h:43
@ NROS_RMW_EVENT_REQUESTED_DEADLINE_MISSED
Definition rmw_event.h:46
@ NROS_RMW_EVENT_SUBSCRIPTION_INCOMPATIBLE_TYPE
Definition rmw_event.h:67
@ NROS_RMW_EVENT_LIVELINESS_LOST
Definition rmw_event.h:50
@ NROS_RMW_EVENT_PUBLICATION_MATCHED
Definition rmw_event.h:56
@ NROS_RMW_EVENT_PUBLISHER_INCOMPATIBLE_TYPE
Definition rmw_event.h:63
@ NROS_RMW_EVENT_OFFERED_DEADLINE_MISSED
Definition rmw_event.h:52
@ NROS_RMW_EVENT_MESSAGE_LOST
Definition rmw_event.h:48
Return-code constants for the nros RMW C vtable.
Definition rmw_event.h:83
uint32_t total_count
Definition rmw_event.h:84
uint32_t total_count_change
Definition rmw_event.h:85
Definition rmw_event.h:112
uint32_t total_count_change
Definition rmw_event.h:114
uint32_t total_count
Definition rmw_event.h:113
Definition rmw_event.h:72
int16_t alive_count_change
Definition rmw_event.h:75
int16_t not_alive_count_change
Definition rmw_event.h:76
uint16_t alive_count
Definition rmw_event.h:73
uint16_t not_alive_count
Definition rmw_event.h:74
Definition rmw_event.h:96
int32_t current_count_change
Definition rmw_event.h:105
uint32_t current_count
Definition rmw_event.h:102
uint32_t total_count
Definition rmw_event.h:98
uint32_t total_count_change
Definition rmw_event.h:100
Definition rmw_event.h:123
rmw_liveliness_changed_status_t liveliness_changed
Definition rmw_event.h:124
rmw_matched_status_t matched
Definition rmw_event.h:126
rmw_incompatible_type_status_t incompatible_type
Definition rmw_event.h:127
rmw_count_status_t count
Definition rmw_event.h:125