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
73
82
91
111
120
133
155/* `rmw_status_event_callback_t`, NOT `rmw_event_callback_t`.
156 *
157 * Upstream binds `rmw_event_callback_t` to a DIFFERENT signature —
158 * `void(const void *user_data, size_t number_of_events)`, the callback
159 * `rmw_{service,client,subscription}_set_on_new_*_callback` install. Ours is
160 * the DDS STATUS-event callback: a kind, a payload union, and a context.
161 *
162 * Two types of one name whose shapes disagree is exactly the hazard
163 * `rmw_vtable.h`'s `#error` guard exists for — except this one would have been
164 * INSIDE our own header, where the guard cannot see it, and
165 * `scripts/rmw-abi-shape.py` compares parameter type NAMES, so it would have
166 * reported the `set_on_new_*` slots as matching upstream exactly while they
167 * took a callback of the wrong shape. Introduced by W3.a's rename; caught by
168 * the W5 audit before any slot depended on it. */
170 rmw_event_type_t kind,
171 const rmw_event_payload_t *payload,
172 void *user_context);
173
174
179typedef void (*rmw_event_callback_t)(const void *user_data, size_t number_of_events);
180
181#endif /* NROS_RMW_EVENT_H */
void(* rmw_event_callback_t)(const void *user_data, size_t number_of_events)
Definition rmw_event.h:179
void(* rmw_status_event_callback_t)(rmw_event_type_t kind, const rmw_event_payload_t *payload, void *user_context)
Definition rmw_event.h:169
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_FORCE_INT_WIDTH_
Definition rmw_event.h:70
@ 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.
#define NROS_RMW_ASSERT_ENUM_INT_WIDTH(T)
Definition rmw_ret.h:226
Definition rmw_event.h:87
uint32_t total_count
Definition rmw_event.h:88
uint32_t total_count_change
Definition rmw_event.h:89
Definition rmw_event.h:116
uint32_t total_count_change
Definition rmw_event.h:118
uint32_t total_count
Definition rmw_event.h:117
Definition rmw_event.h:76
int16_t alive_count_change
Definition rmw_event.h:79
int16_t not_alive_count_change
Definition rmw_event.h:80
uint16_t alive_count
Definition rmw_event.h:77
uint16_t not_alive_count
Definition rmw_event.h:78
Definition rmw_event.h:100
int32_t current_count_change
Definition rmw_event.h:109
uint32_t current_count
Definition rmw_event.h:106
uint32_t total_count
Definition rmw_event.h:102
uint32_t total_count_change
Definition rmw_event.h:104
Definition rmw_event.h:127
rmw_liveliness_changed_status_t liveliness_changed
Definition rmw_event.h:128
rmw_matched_status_t matched
Definition rmw_event.h:130
rmw_incompatible_type_status_t incompatible_type
Definition rmw_event.h:131
rmw_count_status_t count
Definition rmw_event.h:129