nros rmw-cffi
C vtable for plugging a third-party RMW backend into nros
Loading...
Searching...
No Matches
rmw_vtable.h
Go to the documentation of this file.
1#ifndef NROS_RMW_VTABLE_H
2#define NROS_RMW_VTABLE_H
3
4/* Phase 376 W3.a — this header defines the GENERIC RMW ABI: its types are
5 * `rmw_publisher_t`, `rmw_ret_t`, and so on, with no vendor prefix, because a
6 * backend author implements RMW rather than nano-ros.
7 *
8 * That makes it impossible to share a translation unit with upstream's
9 * `<rmw/rmw.h>`, which defines the same names differently. Refuse LOUDLY rather
10 * than let one definition silently win a redefinition race — two types of one
11 * name whose layouts disagree is the class this repo has already paid for three
12 * times in hand-mirrored FFI structs.
13 *
14 * A target image never links real rmw, and host-side consumers reach the
15 * backend through Rust, so nothing in this repo trips this today. It exists for
16 * the day something does. */
17#if defined(RMW_RMW_H_) || defined(RMW__RMW_H_)
18#error "nros/rmw_vtable.h defines the generic RMW ABI and cannot share a translation unit with upstream <rmw/rmw.h>. Include one or the other."
19#endif
20
21#include <stdbool.h>
22#include <stdint.h>
23#include <stddef.h>
24
25#include "nros/rmw_ret.h"
26#include "nros/rmw_entity.h"
27#include "nros/rmw_event.h"
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
81/* ---- Phase 376 W4 — graph enumeration visitors ----
82 *
83 * Upstream returns `rcutils_string_array_t` and `rmw_names_and_types_t`, which
84 * ALLOCATE — two levels deep for names-and-types. There is no allocator at this
85 * seam, and a caller-provides-the-buffer shape is worse than it looks: the ROS
86 * graph has no bound the CALLER can know, so a 128 KiB image would have to
87 * reserve permanently for the worst graph it might ever meet, and the backend
88 * would still have to materialise the whole list to fill the buffer.
89 *
90 * So enumeration is a VISITOR. Peak extra RAM is one entry, the backend streams
91 * from state it already holds, and a caller with a bound stops early by
92 * returning `false` — a normal outcome, not a truncation error. Same shape as
93 * `process_raw_in_place` and `publish_streamed` already use here.
94 *
95 * Every string handed to a visitor is BORROWED for that call only.
96 */
97
101typedef bool (*rmw_node_visit_fn)(void *ctx, const char *node_name,
102 const char *node_namespace, const char *enclave);
103
107typedef bool (*rmw_names_and_types_visit_fn)(void *ctx, const char *name,
108 const char *const *types, size_t types_count);
109
111typedef bool (*rmw_topic_endpoint_info_visit_fn)(void *ctx,
112 const rmw_topic_endpoint_info_t *info);
113
130
150#define NROS_RMW_VISITOR_DEFINED 1
151typedef struct rmw_node_visitor_t {
152 /* Named `visit`, not `fn`: `fn` is a Rust keyword, and this struct is
153 mirrored into Rust by bindgen (RFC-0054 — the C header is the SSoT,
154 so the C side is where a name has to be chosen that both languages
155 can spell). */
157 void *ctx;
159
161 /* Named `visit`, not `fn`: `fn` is a Rust keyword, and this struct is
162 mirrored into Rust by bindgen (RFC-0054 — the C header is the SSoT,
163 so the C side is where a name has to be chosen that both languages
164 can spell). */
166 void *ctx;
168
170 /* Named `visit`, not `fn`: `fn` is a Rust keyword, and this struct is
171 mirrored into Rust by bindgen (RFC-0054 — the C header is the SSoT,
172 so the C side is where a name has to be chosen that both languages
173 can spell). */
175 void *ctx;
177
178
179/* Phase 376 W5 — teardown and loan-return REPORT.
180 *
181 * These six returned `void`. That was never a target constraint: upstream
182 * returns `rmw_ret_t` from all of them, and a backend that cannot release a
183 * handle — a queue still draining, a token from another publisher, a
184 * double-destroy — had no way to say so. The runtime then reported success it
185 * had not verified, which on an RTOS is the difference between a leak that
186 * shows up in a log and a leak that shows up as an allocation failure an hour
187 * later with no provenance.
188 *
189 * A caller that genuinely has nothing to do with the status may ignore it;
190 * `void` denied it the choice. Backends that cannot fail return
191 * `NROS_RMW_RET_OK` unconditionally, which costs one instruction and keeps the
192 * signature honest for the ones that can.
193 */
194typedef struct nros_rmw_vtable_t {
195 /* ---- Session lifecycle ---- */
213 rmw_ret_t (*create_session)(const char *locator, uint8_t mode,
214 uint32_t domain_id, const char *node_name,
215 const rmw_session_options_t *options,
216 rmw_session_t *out);
218 rmw_ret_t (*drive_io)(rmw_session_t *session, int32_t timeout_ms);
219
220 /* ---- Publisher ---- */
228 const rmw_message_type_support_t *type_support,
229 const char *topic_name,
230 uint32_t domain_id, const rmw_qos_profile_t *qos,
231 const rmw_publisher_options_t *options,
232 rmw_publisher_t *out);
234 rmw_ret_t (*publish)(const rmw_publisher_t *publisher,
235 rmw_byte_span_t payload);
236
237 /* ---- Subscription (phase-301: rmw's term; was `subscriber`) ---- */
241 const rmw_message_type_support_t *type_support,
242 const char *topic_name,
243 uint32_t domain_id, const rmw_qos_profile_t *qos,
244 const rmw_subscription_options_t *options,
245 rmw_subscription_t *out);
285 rmw_ret_t (*take)(const rmw_subscription_t *subscription,
286 rmw_mut_byte_span_t *out, bool *taken);
304 bool *out_has_data);
305
306 /* ---- Service (phase-301: rmw's term; was `service_server`) ---- */
307 /* Phase 193.1b — `qos` applies to both the request + reply endpoints
308 (one profile per service, mirrors create_publisher/subscription). */
310 const rmw_service_type_support_t *type_support,
311 const char *service_name,
312 uint32_t domain_id, const rmw_qos_profile_t *qos,
313 rmw_service_t *out);
341 rmw_mut_byte_span_t *request, int64_t *seq_out, bool *taken);
345 bool *out_has_request);
347 int64_t seq, rmw_byte_span_t response);
348
349 /* ---- Client (phase-301: rmw's term; was `service_client`) ---- */
351 const rmw_service_type_support_t *type_support,
352 const char *service_name,
353 uint32_t domain_id, const rmw_qos_profile_t *qos,
354 rmw_client_t *out);
356
382 rmw_byte_span_t request, int64_t *sequence_id);
383
401 rmw_mut_byte_span_t *reply, int64_t *seq_out, bool *taken);
402
403 /* ---- Phase 108 — status events (optional) ---- */
411 const rmw_subscription_t *subscription,
412 rmw_event_type_t kind,
413 uint32_t deadline_ms,
415 void *user_context);
416
421 /* ---- Status events: how the three upstream parts map here ----
422 *
423 * Upstream's model is three-part: `*_event_init` fills an `rmw_event_t`
424 * HANDLE, `rmw_event_set_callback` attaches a callback to that handle, and
425 * `rmw_take_event` polls it for a status.
426 *
427 * - `rmw_event_set_callback` is FUSED into `*_event_init`, which takes the
428 * callback directly. There is no handle to attach one to afterwards.
429 * What that costs is real and small: upstream can replace or clear a
430 * callback later, and we cannot.
431 *
432 * - `rmw_take_event` is a SLOT (issue 0780), split per entity kind
433 * because we have no `rmw_event_t` to carry the entity — see
434 * `subscription_take_event` / `publisher_take_event` below.
435 *
436 * It was DECLINED until 2026-08-25 on two clauses that both turned out
437 * false, and they are worth recording because each sounded right:
438 *
439 * "Upstream polls because the WAIT SET said one was ready, and the wait
440 * set is declined here, so a poll would be blind."
441 * — This ABI is a poll-WITHOUT-a-wait-set design by construction.
442 * `has_data`'s own doc says so: "the poll a loop with no wait-set
443 * needs, and it allocates nothing." A poll with no wait set is the
444 * model here, not a blindness.
445 *
446 * "Our callback already runs on the safe context — from inside
447 * `drive_io`, on the executor thread, never an ISR or a transport
448 * thread."
449 * — True of no backend. zenoh fires from `take` and
450 * `has_data`; cyclonedds' DDS listeners fire on Cyclone's own
451 * worker thread while its `drive_io` is a sleep with no callback
452 * path at all. So a cyclonedds status event has nowhere safe to be
453 * delivered from, and buffer-plus-poll IS `take_event`. A
454 * per-backend fact stated ABI-wide — the same shape as the
455 * network-flow decline W5 flipped.
456 */
457
474 rmw_event_type_t kind, rmw_event_payload_t *out, bool *taken);
475
480 rmw_event_type_t kind, rmw_event_payload_t *out, bool *taken);
481
483 const rmw_publisher_t *publisher,
484 rmw_event_type_t kind,
485 uint32_t deadline_ms,
487 void *user_context);
488
496 const rmw_publisher_t *publisher);
497
522 uint32_t *out_ms, bool *has_deadline);
523
543 void (*cb)(void *ctx),
544 void *ctx);
545
580 size_t requested_len,
581 rmw_mut_byte_span_t *out_slot,
582 rmw_loan_token_t **out_token);
583
593 rmw_loan_token_t *token,
594 size_t actual_len);
595
603
631 rmw_byte_span_t *out_view,
632 rmw_loan_token_t **out_token,
633 bool *taken);
634
643
687 const rmw_client_t *client,
688 bool *out_available);
689
732 uint8_t *buf,
733 size_t per_msg_cap,
734 size_t max_msgs,
735 size_t *out_lens,
736 size_t *taken);
737
786 rmw_publisher_t *publisher,
787 void (*size_cb)(size_t *out_total_len, void *user_ctx),
788 void (*chunk_cb)(uint8_t *out_buf, size_t cap,
789 size_t *out_written, void *user_ctx),
790 void *user_ctx);
791
821 rmw_session_t *session,
822 int32_t timeout_ms);
823
824 /* ---- Phase 231 (RFC-0038) — zero-copy in-place subscription take ---- */
825
856 rmw_subscription_t *subscription,
857 bool *out_supports);
858
892 rmw_subscription_t *subscription,
893 void *ctx,
894 void (*cb)(void *ctx, rmw_byte_span_t message),
895 bool *out_processed);
896 /* ---- Phase 376 W4 — identity + matched counts (all optional) ---- */
897
922 const char *(*get_implementation_identifier)(void);
923
950 const char *(*get_serialization_format)(void);
951
969
974 rmw_gid_t *gid);
975
982 const rmw_publisher_t *publisher, size_t *subscription_count);
983
986 const rmw_subscription_t *subscription, size_t *publisher_count);
987
988 /* ---- Phase 376 W4 — QoS read-back + clean shutdown (all optional) ---- */
989
1019 rmw_qos_profile_t *qos);
1020
1023 rmw_qos_profile_t *qos);
1024
1033 rmw_qos_profile_t *qos);
1034
1037 rmw_qos_profile_t *qos);
1038
1041 rmw_qos_profile_t *qos);
1042
1045 rmw_qos_profile_t *qos);
1046
1059 uint32_t timeout_ms);
1060
1061 /* ---- Phase 376 W4 — with-info takes + entity callbacks (optional) ---- */
1062
1084 rmw_mut_byte_span_t *message, bool *taken, rmw_message_info_t *message_info);
1085
1091 rmw_byte_span_t *out_view, rmw_loan_token_t **out_token,
1092 bool *taken, rmw_message_info_t *message_info);
1093
1094 /* ---- Phase 376 W4 — graph introspection (all optional) ----
1095 *
1096 * NONE of these may block on the wire, and none takes a timeout: this
1097 * vtable's premise is that no background transport thread is assumed, so a
1098 * query-based backend keeps a `drive_io`-fed cache or leaves the slot NULL
1099 * rather than stalling the executor's only thread inside an introspection
1100 * call.
1101 *
1102 * A 128 KiB target cannot hold a graph cache, and NULL is the expected
1103 * answer there — the runtime surfaces UNSUPPORTED. XRCE cannot enumerate
1104 * participants at all.
1105 */
1106
1114 rmw_node_visitor_t visitor);
1115
1118 bool no_demangle, rmw_names_and_types_visitor_t visitor);
1119
1123
1126 const char *node_name, const char *node_namespace, bool no_demangle,
1128
1131 const char *node_name, const char *node_namespace, bool no_demangle,
1133
1136 const char *node_name, const char *node_namespace,
1138
1141 const char *node_name, const char *node_namespace,
1143
1146 const char *topic_name, bool no_mangle,
1148
1151 const char *topic_name, bool no_mangle,
1153
1156 const char *topic_name, size_t *count);
1157
1160 const char *topic_name, size_t *count);
1161
1198 rmw_event_callback_t callback, const void *user_data);
1199
1200 /* ---- Phase 376 W4 — graph node lifecycle (optional) ----
1201 *
1202 * The rest of upstream's lifecycle group is deliberately absent, and the
1203 * absences are decisions rather than omissions:
1204 *
1205 * - `rmw_init` / `rmw_shutdown` / `rmw_context_fini` are
1206 * `create_session` / `destroy_session`. There is no second teardown
1207 * phase: the session shell is caller-owned, so there is nothing left to
1208 * free after the backend releases `backend_data`.
1209 *
1210 * - `rmw_init_options_{init,copy,fini}` have nothing to do here. Upstream
1211 * needs the trio because its options OWN heap and carry an
1212 * `rcutils_allocator_t`, which cannot cross this seam; ours is a
1213 * build-time POD, so "copy" is `=` and "fini" is nothing.
1214 *
1215 * This does NOT decide what the options CARRY. Of Humble's eight
1216 * fields, `create_session` takes `domain_id`; `implementation_identifier`
1217 * and `impl` are answered elsewhere (the identity slot,
1218 * `rmw_session_t::backend_data`); `allocator` is declined ABI-wide and
1219 * `instance_id` is rcl-side process identity. `security_options` is
1220 * declined on the target: it is a DDS-SROS2 keystore PATH plus an
1221 * enforcement switch, and neither a filesystem nor a security plugin
1222 * exists where this ABI runs. `localhost_only` and `enclave` are real
1223 * GAPS — issue 0785, to be carried by whatever shape issue 0808 gives
1224 * backend-private session config, because this flat argument list
1225 * cannot grow either without another ABI break.
1226 *
1227 * `discovery_options` is NOT in this list: it is an IRON field, and the
1228 * recorded contract is Humble. It was named here until issue 0785, the
1229 * third unchecked sentence about an upstream struct in this campaign
1230 * (issue 0777 supplied the other two). Read the header, not the memory.
1231 *
1232 * - `rmw_wait`, the wait set, and the guard conditions are declined
1233 * together, because `has_data` / `has_request` + `drive_io` +
1234 * `set_wake_callback` + `next_deadline_ms` ARE upstream's `rmw_wait`,
1235 * decomposed. What a vtable `wait` would add is only the BLOCK, moved
1236 * from the platform into the backend — and the block cannot live there:
1237 * one executor drives sessions from several backends at once
1238 * (`create_node_on(name, rmw)`), timers fire off the platform clock, and
1239 * guard conditions fire from another thread or an ISR. A backend can
1240 * only block on its own handles. `next_deadline_ms` is exactly the piece
1241 * of `rmw_wait` that CANNOT be answered above the seam, and it is
1242 * already a slot; that is the decomposition working, not a gap.
1243 */
1244
1258 const char *name, const char *namespace_,
1259 rmw_node_t *out);
1260
1275
1301
1302 /* ---- Phase 403 W1 — receive-buffer sizing (optional) ---- */
1303
1398 rmw_ret_t (*required_rx_bytes)(const char *type_name,
1399 const char *type_hash, size_t hint, size_t *out_bytes);
1400
1401 /* ---- issue 1329 — which QoS policies THIS backend honours ---- */
1402
1463 uint32_t *out_mask);
1464
1466
1497
1518 const nros_rmw_vtable_t *vtable);
1519
1524
1530size_t nros_rmw_cffi_registered_names(const char **buf, size_t cap);
1531
1532
1564#if (defined(__GNUC__) || defined(__clang__)) && !defined(__ZEPHYR__) && \
1565 !defined(__NuttX__) && !defined(ESP_PLATFORM) && !defined(__VXWORKS__)
1566#define NROS_RMW_REGISTER_BACKEND(REGISTER_FN) \
1567 __attribute__((constructor)) static void nros_rmw_ctor_##REGISTER_FN( \
1568 void) { \
1569 (void) REGISTER_FN(); \
1570 }
1571#else
1572/* Embedded / unsupported toolchain: board calls nros_rmw_<x>_register(). */
1573#define NROS_RMW_REGISTER_BACKEND(REGISTER_FN)
1574#endif
1575
1576#ifdef __cplusplus
1577}
1578#endif
1579
1580#endif /* NROS_RMW_VTABLE_H */
Typed entity structs for the nros RMW C surface.
rmw_log_severity_t
Definition rmw_entity.h:488
rmw_feature_t
Definition rmw_entity.h:92
Tier-1 status events: liveliness changes, deadline misses, message loss.
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
Return-code constants for the nros RMW C vtable.
int32_t rmw_ret_t
Definition rmw_ret.h:72
size_t nros_rmw_cffi_registered_names(const char **buf, size_t cap)
nros_rmw_session_mode_t
Definition rmw_vtable.h:1491
@ NROS_RMW_SESSION_MODE_PEER
Definition rmw_vtable.h:1495
@ NROS_RMW_SESSION_MODE_CLIENT
Definition rmw_vtable.h:1493
struct rmw_loan_token_t rmw_loan_token_t
Definition rmw_vtable.h:129
const nros_rmw_vtable_t * nros_rmw_cffi_lookup(const char *name)
bool(* rmw_names_and_types_visit_fn)(void *ctx, const char *name, const char *const *types, size_t types_count)
Definition rmw_vtable.h:107
rmw_ret_t nros_rmw_cffi_register_named(const char *name, const nros_rmw_vtable_t *vtable)
bool(* rmw_topic_endpoint_info_visit_fn)(void *ctx, const rmw_topic_endpoint_info_t *info)
Definition rmw_vtable.h:111
bool(* rmw_node_visit_fn)(void *ctx, const char *node_name, const char *node_namespace, const char *enclave)
Definition rmw_vtable.h:101
Definition rmw_vtable.h:194
rmw_ret_t(* publisher_count_matched_subscriptions)(const rmw_publisher_t *publisher, size_t *subscription_count)
Definition rmw_vtable.h:981
rmw_ret_t(* set_log_severity)(rmw_log_severity_t severity)
Definition rmw_vtable.h:1300
rmw_ret_t(* process_raw_in_place)(rmw_subscription_t *subscription, void *ctx, void(*cb)(void *ctx, rmw_byte_span_t message), bool *out_processed)
Definition rmw_vtable.h:891
rmw_ret_t(* take_loaned_message_with_info)(const rmw_subscription_t *subscription, rmw_byte_span_t *out_view, rmw_loan_token_t **out_token, bool *taken, rmw_message_info_t *message_info)
Definition rmw_vtable.h:1090
rmw_ret_t(* count_publishers)(const rmw_session_t *session, const char *topic_name, size_t *count)
Definition rmw_vtable.h:1155
rmw_ret_t(* required_rx_bytes)(const char *type_name, const char *type_hash, size_t hint, size_t *out_bytes)
Definition rmw_vtable.h:1398
rmw_ret_t(* destroy_publisher)(rmw_publisher_t *publisher)
Definition rmw_vtable.h:233
rmw_ret_t(* take_with_info)(const rmw_subscription_t *subscription, rmw_mut_byte_span_t *message, bool *taken, rmw_message_info_t *message_info)
Definition rmw_vtable.h:1083
rmw_ret_t(* send_response)(const rmw_service_t *server, int64_t seq, rmw_byte_span_t response)
Definition rmw_vtable.h:346
rmw_ret_t(* take_request)(const rmw_service_t *server, rmw_mut_byte_span_t *request, int64_t *seq_out, bool *taken)
Definition rmw_vtable.h:340
rmw_ret_t(* get_service_names_and_types)(const rmw_session_t *session, rmw_names_and_types_visitor_t visitor)
Definition rmw_vtable.h:1121
rmw_ret_t(* publisher_assert_liveliness)(const rmw_publisher_t *publisher)
Definition rmw_vtable.h:495
rmw_ret_t(* next_deadline_ms)(const rmw_session_t *session, uint32_t *out_ms, bool *has_deadline)
Definition rmw_vtable.h:521
rmw_ret_t(* get_topic_names_and_types)(const rmw_session_t *session, bool no_demangle, rmw_names_and_types_visitor_t visitor)
Definition rmw_vtable.h:1117
rmw_ret_t(* take_response)(const rmw_client_t *client, rmw_mut_byte_span_t *reply, int64_t *seq_out, bool *taken)
Definition rmw_vtable.h:400
rmw_ret_t(* get_gid_for_publisher)(const rmw_publisher_t *publisher, rmw_gid_t *gid)
Definition rmw_vtable.h:973
rmw_ret_t(* service_response_publisher_get_actual_qos)(const rmw_service_t *service, rmw_qos_profile_t *qos)
Definition rmw_vtable.h:1044
rmw_ret_t(* create_session)(const char *locator, uint8_t mode, uint32_t domain_id, const char *node_name, const rmw_session_options_t *options, rmw_session_t *out)
Definition rmw_vtable.h:213
rmw_ret_t(* publisher_wait_for_all_acked)(const rmw_publisher_t *publisher, uint32_t timeout_ms)
Definition rmw_vtable.h:1058
rmw_ret_t(* client_request_publisher_get_actual_qos)(const rmw_client_t *client, rmw_qos_profile_t *qos)
Definition rmw_vtable.h:1032
rmw_ret_t(* destroy_session)(rmw_session_t *session)
Definition rmw_vtable.h:217
rmw_ret_t(* set_wake_callback)(rmw_session_t *session, void(*cb)(void *ctx), void *ctx)
Definition rmw_vtable.h:542
rmw_ret_t(* publish_loaned_message)(const rmw_publisher_t *publisher, rmw_loan_token_t *token, size_t actual_len)
Definition rmw_vtable.h:592
rmw_ret_t(* publisher_take_event)(const rmw_publisher_t *publisher, rmw_event_type_t kind, rmw_event_payload_t *out, bool *taken)
Definition rmw_vtable.h:479
rmw_ret_t(* return_loaned_message_from_subscription)(const rmw_subscription_t *subscription, rmw_loan_token_t *token)
Definition rmw_vtable.h:642
rmw_ret_t(* create_publisher)(const rmw_node_t *node, const rmw_message_type_support_t *type_support, const char *topic_name, uint32_t domain_id, const rmw_qos_profile_t *qos, const rmw_publisher_options_t *options, rmw_publisher_t *out)
Definition rmw_vtable.h:227
rmw_ret_t(* subscription_count_matched_publishers)(const rmw_subscription_t *subscription, size_t *publisher_count)
Definition rmw_vtable.h:985
rmw_ret_t(* get_publishers_info_by_topic)(const rmw_session_t *session, const char *topic_name, bool no_mangle, rmw_topic_endpoint_info_visitor_t visitor)
Definition rmw_vtable.h:1145
rmw_ret_t(* service_request_subscription_get_actual_qos)(const rmw_service_t *service, rmw_qos_profile_t *qos)
Definition rmw_vtable.h:1040
rmw_ret_t(* subscription_event_init)(const rmw_subscription_t *subscription, rmw_event_type_t kind, uint32_t deadline_ms, rmw_status_event_callback_t cb, void *user_context)
Definition rmw_vtable.h:410
rmw_ret_t(* destroy_node)(rmw_node_t *node)
Definition rmw_vtable.h:1274
bool(* feature_supported)(rmw_feature_t feature)
Definition rmw_vtable.h:968
rmw_ret_t(* drive_io)(rmw_session_t *session, int32_t timeout_ms)
Definition rmw_vtable.h:218
rmw_ret_t(* ping_session)(rmw_session_t *session, int32_t timeout_ms)
Definition rmw_vtable.h:820
rmw_ret_t(* count_subscribers)(const rmw_session_t *session, const char *topic_name, size_t *count)
Definition rmw_vtable.h:1159
rmw_ret_t(* create_service)(const rmw_node_t *node, const rmw_service_type_support_t *type_support, const char *service_name, uint32_t domain_id, const rmw_qos_profile_t *qos, rmw_service_t *out)
Definition rmw_vtable.h:309
rmw_ret_t(* subscription_take_event)(const rmw_subscription_t *subscription, rmw_event_type_t kind, rmw_event_payload_t *out, bool *taken)
Definition rmw_vtable.h:473
rmw_ret_t(* get_subscriptions_info_by_topic)(const rmw_session_t *session, const char *topic_name, bool no_mangle, rmw_topic_endpoint_info_visitor_t visitor)
Definition rmw_vtable.h:1150
rmw_ret_t(* service_server_is_available)(const rmw_client_t *client, bool *out_available)
Definition rmw_vtable.h:686
rmw_ret_t(* create_subscription)(const rmw_node_t *node, const rmw_message_type_support_t *type_support, const char *topic_name, uint32_t domain_id, const rmw_qos_profile_t *qos, const rmw_subscription_options_t *options, rmw_subscription_t *out)
Definition rmw_vtable.h:240
rmw_ret_t(* get_service_names_and_types_by_node)(const rmw_session_t *session, const char *node_name, const char *node_namespace, rmw_names_and_types_visitor_t visitor)
Definition rmw_vtable.h:1135
rmw_ret_t(* has_data)(rmw_subscription_t *subscription, bool *out_has_data)
Definition rmw_vtable.h:303
rmw_ret_t(* subscription_get_actual_qos)(const rmw_subscription_t *subscription, rmw_qos_profile_t *qos)
Definition rmw_vtable.h:1022
rmw_ret_t(* supported_qos_policies)(const rmw_session_t *session, uint32_t *out_mask)
Definition rmw_vtable.h:1462
rmw_ret_t(* get_client_names_and_types_by_node)(const rmw_session_t *session, const char *node_name, const char *node_namespace, rmw_names_and_types_visitor_t visitor)
Definition rmw_vtable.h:1140
rmw_ret_t(* take)(const rmw_subscription_t *subscription, rmw_mut_byte_span_t *out, bool *taken)
Definition rmw_vtable.h:285
rmw_ret_t(* get_publisher_names_and_types_by_node)(const rmw_session_t *session, const char *node_name, const char *node_namespace, bool no_demangle, rmw_names_and_types_visitor_t visitor)
Definition rmw_vtable.h:1125
rmw_ret_t(* destroy_service)(rmw_service_t *server)
Definition rmw_vtable.h:314
rmw_ret_t(* publish)(const rmw_publisher_t *publisher, rmw_byte_span_t payload)
Definition rmw_vtable.h:234
rmw_ret_t(* take_sequence)(const rmw_subscription_t *subscription, uint8_t *buf, size_t per_msg_cap, size_t max_msgs, size_t *out_lens, size_t *taken)
Definition rmw_vtable.h:731
rmw_ret_t(* subscription_supports_in_place)(rmw_subscription_t *subscription, bool *out_supports)
Definition rmw_vtable.h:855
rmw_ret_t(* has_request)(rmw_service_t *server, bool *out_has_request)
Definition rmw_vtable.h:344
rmw_ret_t(* publisher_event_init)(const rmw_publisher_t *publisher, rmw_event_type_t kind, uint32_t deadline_ms, rmw_status_event_callback_t cb, void *user_context)
Definition rmw_vtable.h:482
rmw_ret_t(* send_request)(const rmw_client_t *client, rmw_byte_span_t request, int64_t *sequence_id)
Definition rmw_vtable.h:381
rmw_ret_t(* node_get_graph_guard_condition)(rmw_session_t *session, rmw_event_callback_t callback, const void *user_data)
Definition rmw_vtable.h:1197
rmw_ret_t(* return_loaned_message_from_publisher)(const rmw_publisher_t *publisher, rmw_loan_token_t *token)
Definition rmw_vtable.h:602
rmw_ret_t(* publish_streamed)(rmw_publisher_t *publisher, void(*size_cb)(size_t *out_total_len, void *user_ctx), void(*chunk_cb)(uint8_t *out_buf, size_t cap, size_t *out_written, void *user_ctx), void *user_ctx)
Definition rmw_vtable.h:785
rmw_ret_t(* create_client)(const rmw_node_t *node, const rmw_service_type_support_t *type_support, const char *service_name, uint32_t domain_id, const rmw_qos_profile_t *qos, rmw_client_t *out)
Definition rmw_vtable.h:350
rmw_ret_t(* take_loaned_message)(const rmw_subscription_t *subscription, rmw_byte_span_t *out_view, rmw_loan_token_t **out_token, bool *taken)
Definition rmw_vtable.h:630
rmw_ret_t(* get_node_names)(const rmw_session_t *session, rmw_node_visitor_t visitor)
Definition rmw_vtable.h:1113
rmw_ret_t(* create_node)(rmw_session_t *session, const char *name, const char *namespace_, rmw_node_t *out)
Definition rmw_vtable.h:1257
rmw_ret_t(* destroy_client)(rmw_client_t *client)
Definition rmw_vtable.h:355
rmw_ret_t(* get_subscriber_names_and_types_by_node)(const rmw_session_t *session, const char *node_name, const char *node_namespace, bool no_demangle, rmw_names_and_types_visitor_t visitor)
Definition rmw_vtable.h:1130
rmw_ret_t(* destroy_subscription)(rmw_subscription_t *subscription)
Definition rmw_vtable.h:246
rmw_ret_t(* borrow_loaned_message)(const rmw_publisher_t *publisher, size_t requested_len, rmw_mut_byte_span_t *out_slot, rmw_loan_token_t **out_token)
Definition rmw_vtable.h:579
rmw_ret_t(* publisher_get_actual_qos)(const rmw_publisher_t *publisher, rmw_qos_profile_t *qos)
Definition rmw_vtable.h:1018
rmw_ret_t(* client_response_subscription_get_actual_qos)(const rmw_client_t *client, rmw_qos_profile_t *qos)
Definition rmw_vtable.h:1036
Definition rmw_entity.h:133
Definition rmw_entity.h:1133
Definition rmw_entity.h:234
Definition rmw_entity.h:262
Definition rmw_entity.h:211
Definition rmw_entity.h:155
Definition rmw_vtable.h:160
rmw_names_and_types_visit_fn visit
Definition rmw_vtable.h:165
void * ctx
Definition rmw_vtable.h:166
Definition rmw_entity.h:1022
Definition rmw_vtable.h:151
void * ctx
Definition rmw_vtable.h:157
rmw_node_visit_fn visit
Definition rmw_vtable.h:156
Definition rmw_entity.h:678
Definition rmw_entity.h:1066
Definition rmw_entity.h:342
Definition rmw_entity.h:1118
Definition rmw_entity.h:227
Definition rmw_entity.h:651
Definition rmw_entity.h:971
Definition rmw_entity.h:692
Definition rmw_entity.h:1088
Definition rmw_entity.h:509
Definition rmw_vtable.h:169
rmw_topic_endpoint_info_visit_fn visit
Definition rmw_vtable.h:174
void * ctx
Definition rmw_vtable.h:175
Definition rmw_event.h:70