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
79/* ---- Phase 376 W4 — graph enumeration visitors ----
80 *
81 * Upstream returns `rcutils_string_array_t` and `rmw_names_and_types_t`, which
82 * ALLOCATE — two levels deep for names-and-types. There is no allocator at this
83 * seam, and a caller-provides-the-buffer shape is worse than it looks: the ROS
84 * graph has no bound the CALLER can know, so a 128 KiB image would have to
85 * reserve permanently for the worst graph it might ever meet, and the backend
86 * would still have to materialise the whole list to fill the buffer.
87 *
88 * So enumeration is a VISITOR. Peak extra RAM is one entry, the backend streams
89 * from state it already holds, and a caller with a bound stops early by
90 * returning `false` — a normal outcome, not a truncation error. Same shape as
91 * `process_raw_in_place` and `publish_streamed` already use here.
92 *
93 * Every string handed to a visitor is BORROWED for that call only.
94 */
95
99typedef bool (*rmw_node_visit_fn)(void *ctx, const char *node_name,
100 const char *node_namespace, const char *enclave);
101
105typedef bool (*rmw_names_and_types_visit_fn)(void *ctx, const char *name,
106 const char *const *types, size_t types_count);
107
109typedef bool (*rmw_topic_endpoint_info_visit_fn)(void *ctx,
110 const rmw_topic_endpoint_info_t *info);
111
128
148#define NROS_RMW_VISITOR_DEFINED 1
149typedef struct rmw_node_visitor_t {
150 /* Named `visit`, not `fn`: `fn` is a Rust keyword, and this struct is
151 mirrored into Rust by bindgen (RFC-0054 — the C header is the SSoT,
152 so the C side is where a name has to be chosen that both languages
153 can spell). */
155 void *ctx;
157
159 /* Named `visit`, not `fn`: `fn` is a Rust keyword, and this struct is
160 mirrored into Rust by bindgen (RFC-0054 — the C header is the SSoT,
161 so the C side is where a name has to be chosen that both languages
162 can spell). */
164 void *ctx;
166
168 /* Named `visit`, not `fn`: `fn` is a Rust keyword, and this struct is
169 mirrored into Rust by bindgen (RFC-0054 — the C header is the SSoT,
170 so the C side is where a name has to be chosen that both languages
171 can spell). */
173 void *ctx;
175
176
177/* Phase 376 W5 — teardown and loan-return REPORT.
178 *
179 * These six returned `void`. That was never a target constraint: upstream
180 * returns `rmw_ret_t` from all of them, and a backend that cannot release a
181 * handle — a queue still draining, a token from another publisher, a
182 * double-destroy — had no way to say so. The runtime then reported success it
183 * had not verified, which on an RTOS is the difference between a leak that
184 * shows up in a log and a leak that shows up as an allocation failure an hour
185 * later with no provenance.
186 *
187 * A caller that genuinely has nothing to do with the status may ignore it;
188 * `void` denied it the choice. Backends that cannot fail return
189 * `NROS_RMW_RET_OK` unconditionally, which costs one instruction and keeps the
190 * signature honest for the ones that can.
191 */
192typedef struct nros_rmw_vtable_t {
193 /* ---- Session lifecycle ---- */
211 rmw_ret_t (*create_session)(const char *locator, uint8_t mode,
212 uint32_t domain_id, const char *node_name,
213 const rmw_session_options_t *options,
214 rmw_session_t *out);
216 rmw_ret_t (*drive_io)(rmw_session_t *session, int32_t timeout_ms);
217
218 /* ---- Publisher ---- */
226 const rmw_message_type_support_t *type_support,
227 const char *topic_name,
228 uint32_t domain_id, const rmw_qos_profile_t *qos,
229 const rmw_publisher_options_t *options,
230 rmw_publisher_t *out);
232 rmw_ret_t (*publish)(const rmw_publisher_t *publisher,
233 rmw_byte_span_t payload);
234
235 /* ---- Subscription (phase-301: rmw's term; was `subscriber`) ---- */
239 const rmw_message_type_support_t *type_support,
240 const char *topic_name,
241 uint32_t domain_id, const rmw_qos_profile_t *qos,
242 const rmw_subscription_options_t *options,
243 rmw_subscription_t *out);
278 rmw_ret_t (*take)(const rmw_subscription_t *subscription,
279 rmw_mut_byte_span_t *out, bool *taken);
297 bool *out_has_data);
298
299 /* ---- Service (phase-301: rmw's term; was `service_server`) ---- */
300 /* Phase 193.1b — `qos` applies to both the request + reply endpoints
301 (one profile per service, mirrors create_publisher/subscription). */
303 const rmw_service_type_support_t *type_support,
304 const char *service_name,
305 uint32_t domain_id, const rmw_qos_profile_t *qos,
306 rmw_service_t *out);
320 rmw_mut_byte_span_t *request, int64_t *seq_out, bool *taken);
324 bool *out_has_request);
326 int64_t seq, rmw_byte_span_t response);
327
328 /* ---- Client (phase-301: rmw's term; was `service_client`) ---- */
330 const rmw_service_type_support_t *type_support,
331 const char *service_name,
332 uint32_t domain_id, const rmw_qos_profile_t *qos,
333 rmw_client_t *out);
335
361 rmw_byte_span_t request, int64_t *sequence_id);
362
377 rmw_mut_byte_span_t *reply, int64_t *seq_out, bool *taken);
378
379 /* ---- Phase 108 — status events (optional) ---- */
387 const rmw_subscription_t *subscription,
388 rmw_event_type_t kind,
389 uint32_t deadline_ms,
391 void *user_context);
392
396 /* ---- Status events: how the three upstream parts map here ----
397 *
398 * Upstream's model is three-part: `*_event_init` fills an `rmw_event_t`
399 * HANDLE, `rmw_event_set_callback` attaches a callback to that handle, and
400 * `rmw_take_event` polls it for a status.
401 *
402 * - `rmw_event_set_callback` is FUSED into `*_event_init`, which takes the
403 * callback directly. There is no handle to attach one to afterwards.
404 * What that costs is real and small: upstream can replace or clear a
405 * callback later, and we cannot.
406 *
407 * - `rmw_take_event` is a SLOT (issue 0780), split per entity kind
408 * because we have no `rmw_event_t` to carry the entity — see
409 * `subscription_take_event` / `publisher_take_event` below.
410 *
411 * It was DECLINED until 2026-08-25 on two clauses that both turned out
412 * false, and they are worth recording because each sounded right:
413 *
414 * "Upstream polls because the WAIT SET said one was ready, and the wait
415 * set is declined here, so a poll would be blind."
416 * — This ABI is a poll-WITHOUT-a-wait-set design by construction.
417 * `has_data`'s own doc says so: "the poll a loop with no wait-set
418 * needs, and it allocates nothing." A poll with no wait set is the
419 * model here, not a blindness.
420 *
421 * "Our callback already runs on the safe context — from inside
422 * `drive_io`, on the executor thread, never an ISR or a transport
423 * thread."
424 * — True of no backend. zenoh fires from `try_recv_raw` and
425 * `has_data`; cyclonedds' DDS listeners fire on Cyclone's own
426 * worker thread while its `drive_io` is a sleep with no callback
427 * path at all. So a cyclonedds status event has nowhere safe to be
428 * delivered from, and buffer-plus-poll IS `take_event`. A
429 * per-backend fact stated ABI-wide — the same shape as the
430 * network-flow decline W5 flipped.
431 */
432
449 rmw_event_type_t kind, rmw_event_payload_t *out, bool *taken);
450
455 rmw_event_type_t kind, rmw_event_payload_t *out, bool *taken);
456
458 const rmw_publisher_t *publisher,
459 rmw_event_type_t kind,
460 uint32_t deadline_ms,
462 void *user_context);
463
471 const rmw_publisher_t *publisher);
472
497 uint32_t *out_ms, bool *has_deadline);
498
518 void (*cb)(void *ctx),
519 void *ctx);
520
539 size_t requested_len,
540 rmw_mut_byte_span_t *out_slot,
541 rmw_loan_token_t **out_token);
542
552 rmw_loan_token_t *token,
553 size_t actual_len);
554
562
604 rmw_byte_span_t *out_view,
605 rmw_loan_token_t **out_token,
606 bool *taken);
607
616
657 const rmw_client_t *client,
658 bool *out_available);
659
709 uint8_t *buf,
710 size_t per_msg_cap,
711 size_t max_msgs,
712 size_t *out_lens,
713 size_t *taken);
714
757 rmw_publisher_t *publisher,
758 void (*size_cb)(size_t *out_total_len, void *user_ctx),
759 void (*chunk_cb)(uint8_t *out_buf, size_t cap,
760 size_t *out_written, void *user_ctx),
761 void *user_ctx);
762
788 rmw_session_t *session,
789 int32_t timeout_ms);
790
791 /* ---- Phase 231 (RFC-0038) — zero-copy in-place subscription take ---- */
792
823 rmw_subscription_t *subscription,
824 bool *out_supports);
825
859 rmw_subscription_t *subscription,
860 void *ctx,
861 void (*cb)(void *ctx, rmw_byte_span_t message),
862 bool *out_processed);
863 /* ---- Phase 376 W4 — identity + matched counts (all optional) ---- */
864
889 const char *(*get_implementation_identifier)(void);
890
917 const char *(*get_serialization_format)(void);
918
929
934 rmw_gid_t *gid);
935
942 const rmw_publisher_t *publisher, size_t *subscription_count);
943
946 const rmw_subscription_t *subscription, size_t *publisher_count);
947
948 /* ---- Phase 376 W4 — QoS read-back + clean shutdown (all optional) ---- */
949
979 rmw_qos_profile_t *qos);
980
983 rmw_qos_profile_t *qos);
984
993 rmw_qos_profile_t *qos);
994
997 rmw_qos_profile_t *qos);
998
1001 rmw_qos_profile_t *qos);
1002
1005 rmw_qos_profile_t *qos);
1006
1019 uint32_t timeout_ms);
1020
1021 /* ---- Phase 376 W4 — with-info takes + entity callbacks (optional) ---- */
1022
1039 rmw_mut_byte_span_t *message, bool *taken, rmw_message_info_t *message_info);
1040
1046 rmw_byte_span_t *out_view, rmw_loan_token_t **out_token,
1047 bool *taken, rmw_message_info_t *message_info);
1048
1049 /* ---- Phase 376 W4 — graph introspection (all optional) ----
1050 *
1051 * NONE of these may block on the wire, and none takes a timeout: this
1052 * vtable's premise is that no background transport thread is assumed, so a
1053 * query-based backend keeps a `drive_io`-fed cache or leaves the slot NULL
1054 * rather than stalling the executor's only thread inside an introspection
1055 * call.
1056 *
1057 * A 128 KiB target cannot hold a graph cache, and NULL is the expected
1058 * answer there — the runtime surfaces UNSUPPORTED. XRCE cannot enumerate
1059 * participants at all.
1060 */
1061
1069 rmw_node_visitor_t visitor);
1070
1073 bool no_demangle, rmw_names_and_types_visitor_t visitor);
1074
1078
1081 const char *node_name, const char *node_namespace, bool no_demangle,
1083
1086 const char *node_name, const char *node_namespace, bool no_demangle,
1088
1091 const char *node_name, const char *node_namespace,
1093
1096 const char *node_name, const char *node_namespace,
1098
1101 const char *topic_name, bool no_mangle,
1103
1106 const char *topic_name, bool no_mangle,
1108
1111 const char *topic_name, size_t *count);
1112
1115 const char *topic_name, size_t *count);
1116
1133 rmw_event_callback_t callback, const void *user_data);
1134
1135 /* ---- Phase 376 W4 — graph node lifecycle (optional) ----
1136 *
1137 * The rest of upstream's lifecycle group is deliberately absent, and the
1138 * absences are decisions rather than omissions:
1139 *
1140 * - `rmw_init` / `rmw_shutdown` / `rmw_context_fini` are
1141 * `create_session` / `destroy_session`. There is no second teardown
1142 * phase: the session shell is caller-owned, so there is nothing left to
1143 * free after the backend releases `backend_data`.
1144 *
1145 * - `rmw_init_options_{init,copy,fini}` have nothing to do here. Upstream
1146 * needs the trio because its options OWN heap and carry an
1147 * `rcutils_allocator_t`, which cannot cross this seam; ours is a
1148 * build-time POD, so "copy" is `=` and "fini" is nothing.
1149 *
1150 * This does NOT decide what the options CARRY. Of Humble's eight
1151 * fields, `create_session` takes `domain_id`; `implementation_identifier`
1152 * and `impl` are answered elsewhere (the identity slot,
1153 * `rmw_session_t::backend_data`); `allocator` is declined ABI-wide and
1154 * `instance_id` is rcl-side process identity. `security_options` is
1155 * declined on the target: it is a DDS-SROS2 keystore PATH plus an
1156 * enforcement switch, and neither a filesystem nor a security plugin
1157 * exists where this ABI runs. `localhost_only` and `enclave` are real
1158 * GAPS — issue 0785, to be carried by whatever shape issue 0808 gives
1159 * backend-private session config, because this flat argument list
1160 * cannot grow either without another ABI break.
1161 *
1162 * `discovery_options` is NOT in this list: it is an IRON field, and the
1163 * recorded contract is Humble. It was named here until issue 0785, the
1164 * third unchecked sentence about an upstream struct in this campaign
1165 * (issue 0777 supplied the other two). Read the header, not the memory.
1166 *
1167 * - `rmw_wait`, the wait set, and the guard conditions are declined
1168 * together, because `has_data` / `has_request` + `drive_io` +
1169 * `set_wake_callback` + `next_deadline_ms` ARE upstream's `rmw_wait`,
1170 * decomposed. What a vtable `wait` would add is only the BLOCK, moved
1171 * from the platform into the backend — and the block cannot live there:
1172 * one executor drives sessions from several backends at once
1173 * (`create_node_on(name, rmw)`), timers fire off the platform clock, and
1174 * guard conditions fire from another thread or an ISR. A backend can
1175 * only block on its own handles. `next_deadline_ms` is exactly the piece
1176 * of `rmw_wait` that CANNOT be answered above the seam, and it is
1177 * already a slot; that is the decomposition working, not a gap.
1178 */
1179
1193 const char *name, const char *namespace_,
1194 rmw_node_t *out);
1195
1210
1236
1237 /* ---- Phase 403 W1 — receive-buffer sizing (optional) ---- */
1238
1333 rmw_ret_t (*required_rx_bytes)(const char *type_name,
1334 const char *type_hash, size_t hint, size_t *out_bytes);
1335
1337
1368
1378
1398 const nros_rmw_vtable_t *vtable);
1399
1404
1410size_t nros_rmw_cffi_registered_names(const char **buf, size_t cap);
1411
1412
1444#if (defined(__GNUC__) || defined(__clang__)) && !defined(__ZEPHYR__) && \
1445 !defined(__NuttX__) && !defined(ESP_PLATFORM) && !defined(__VXWORKS__)
1446#define NROS_RMW_REGISTER_BACKEND(REGISTER_FN) \
1447 __attribute__((constructor)) static void nros_rmw_ctor_##REGISTER_FN( \
1448 void) { \
1449 (void) REGISTER_FN(); \
1450 }
1451#else
1452/* Embedded / unsupported toolchain: board calls nros_rmw_<x>_register(). */
1453#define NROS_RMW_REGISTER_BACKEND(REGISTER_FN)
1454#endif
1455
1456#ifdef __cplusplus
1457}
1458#endif
1459
1460#endif /* NROS_RMW_VTABLE_H */
Typed entity structs for the nros RMW C surface.
rmw_log_severity_t
Definition rmw_entity.h:464
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: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
Return-code constants for the nros RMW C vtable.
int32_t rmw_ret_t
Definition rmw_ret.h:58
rmw_ret_t nros_rmw_cffi_register(const nros_rmw_vtable_t *vtable)
size_t nros_rmw_cffi_registered_names(const char **buf, size_t cap)
nros_rmw_session_mode_t
Definition rmw_vtable.h:1362
@ NROS_RMW_SESSION_MODE_PEER
Definition rmw_vtable.h:1366
@ NROS_RMW_SESSION_MODE_CLIENT
Definition rmw_vtable.h:1364
struct rmw_loan_token_t rmw_loan_token_t
Definition rmw_vtable.h:127
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:105
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:109
bool(* rmw_node_visit_fn)(void *ctx, const char *node_name, const char *node_namespace, const char *enclave)
Definition rmw_vtable.h:99
Definition rmw_vtable.h:192
rmw_ret_t(* publisher_count_matched_subscriptions)(const rmw_publisher_t *publisher, size_t *subscription_count)
Definition rmw_vtable.h:941
rmw_ret_t(* set_log_severity)(rmw_log_severity_t severity)
Definition rmw_vtable.h:1235
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:858
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:1045
rmw_ret_t(* count_publishers)(const rmw_session_t *session, const char *topic_name, size_t *count)
Definition rmw_vtable.h:1110
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:1333
rmw_ret_t(* destroy_publisher)(rmw_publisher_t *publisher)
Definition rmw_vtable.h:231
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:1038
rmw_ret_t(* send_response)(const rmw_service_t *server, int64_t seq, rmw_byte_span_t response)
Definition rmw_vtable.h:325
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:319
rmw_ret_t(* get_service_names_and_types)(const rmw_session_t *session, rmw_names_and_types_visitor_t visitor)
Definition rmw_vtable.h:1076
rmw_ret_t(* publisher_assert_liveliness)(const rmw_publisher_t *publisher)
Definition rmw_vtable.h:470
rmw_ret_t(* next_deadline_ms)(const rmw_session_t *session, uint32_t *out_ms, bool *has_deadline)
Definition rmw_vtable.h:496
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:1072
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:376
rmw_ret_t(* get_gid_for_publisher)(const rmw_publisher_t *publisher, rmw_gid_t *gid)
Definition rmw_vtable.h:933
rmw_ret_t(* service_response_publisher_get_actual_qos)(const rmw_service_t *service, rmw_qos_profile_t *qos)
Definition rmw_vtable.h:1004
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:211
rmw_ret_t(* publisher_wait_for_all_acked)(const rmw_publisher_t *publisher, uint32_t timeout_ms)
Definition rmw_vtable.h:1018
rmw_ret_t(* client_request_publisher_get_actual_qos)(const rmw_client_t *client, rmw_qos_profile_t *qos)
Definition rmw_vtable.h:992
rmw_ret_t(* destroy_session)(rmw_session_t *session)
Definition rmw_vtable.h:215
rmw_ret_t(* set_wake_callback)(rmw_session_t *session, void(*cb)(void *ctx), void *ctx)
Definition rmw_vtable.h:517
rmw_ret_t(* publish_loaned_message)(const rmw_publisher_t *publisher, rmw_loan_token_t *token, size_t actual_len)
Definition rmw_vtable.h:551
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:454
rmw_ret_t(* return_loaned_message_from_subscription)(const rmw_subscription_t *subscription, rmw_loan_token_t *token)
Definition rmw_vtable.h:615
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:225
rmw_ret_t(* subscription_count_matched_publishers)(const rmw_subscription_t *subscription, size_t *publisher_count)
Definition rmw_vtable.h:945
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:1100
rmw_ret_t(* service_request_subscription_get_actual_qos)(const rmw_service_t *service, rmw_qos_profile_t *qos)
Definition rmw_vtable.h:1000
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:386
rmw_ret_t(* destroy_node)(rmw_node_t *node)
Definition rmw_vtable.h:1209
bool(* feature_supported)(rmw_feature_t feature)
Definition rmw_vtable.h:928
rmw_ret_t(* drive_io)(rmw_session_t *session, int32_t timeout_ms)
Definition rmw_vtable.h:216
rmw_ret_t(* ping_session)(rmw_session_t *session, int32_t timeout_ms)
Definition rmw_vtable.h:787
rmw_ret_t(* count_subscribers)(const rmw_session_t *session, const char *topic_name, size_t *count)
Definition rmw_vtable.h:1114
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:302
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:448
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:1105
rmw_ret_t(* service_server_is_available)(const rmw_client_t *client, bool *out_available)
Definition rmw_vtable.h:656
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:238
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:1090
rmw_ret_t(* has_data)(rmw_subscription_t *subscription, bool *out_has_data)
Definition rmw_vtable.h:296
rmw_ret_t(* subscription_get_actual_qos)(const rmw_subscription_t *subscription, rmw_qos_profile_t *qos)
Definition rmw_vtable.h:982
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:1095
rmw_ret_t(* take)(const rmw_subscription_t *subscription, rmw_mut_byte_span_t *out, bool *taken)
Definition rmw_vtable.h:278
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:1080
rmw_ret_t(* destroy_service)(rmw_service_t *server)
Definition rmw_vtable.h:307
rmw_ret_t(* publish)(const rmw_publisher_t *publisher, rmw_byte_span_t payload)
Definition rmw_vtable.h:232
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:708
rmw_ret_t(* subscription_supports_in_place)(rmw_subscription_t *subscription, bool *out_supports)
Definition rmw_vtable.h:822
rmw_ret_t(* has_request)(rmw_service_t *server, bool *out_has_request)
Definition rmw_vtable.h:323
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:457
rmw_ret_t(* send_request)(const rmw_client_t *client, rmw_byte_span_t request, int64_t *sequence_id)
Definition rmw_vtable.h:360
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:1132
rmw_ret_t(* return_loaned_message_from_publisher)(const rmw_publisher_t *publisher, rmw_loan_token_t *token)
Definition rmw_vtable.h:561
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:756
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:329
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:603
rmw_ret_t(* get_node_names)(const rmw_session_t *session, rmw_node_visitor_t visitor)
Definition rmw_vtable.h:1068
rmw_ret_t(* create_node)(rmw_session_t *session, const char *name, const char *namespace_, rmw_node_t *out)
Definition rmw_vtable.h:1192
rmw_ret_t(* destroy_client)(rmw_client_t *client)
Definition rmw_vtable.h:334
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:1085
rmw_ret_t(* destroy_subscription)(rmw_subscription_t *subscription)
Definition rmw_vtable.h:244
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:538
rmw_ret_t(* publisher_get_actual_qos)(const rmw_publisher_t *publisher, rmw_qos_profile_t *qos)
Definition rmw_vtable.h:978
rmw_ret_t(* client_response_subscription_get_actual_qos)(const rmw_client_t *client, rmw_qos_profile_t *qos)
Definition rmw_vtable.h:996
Definition rmw_entity.h:133
Definition rmw_entity.h:995
Definition rmw_entity.h:212
Definition rmw_entity.h:238
Definition rmw_entity.h:189
Definition rmw_entity.h:155
Definition rmw_vtable.h:158
rmw_names_and_types_visit_fn visit
Definition rmw_vtable.h:163
void * ctx
Definition rmw_vtable.h:164
Definition rmw_entity.h:884
Definition rmw_vtable.h:149
void * ctx
Definition rmw_vtable.h:155
rmw_node_visit_fn visit
Definition rmw_vtable.h:154
Definition rmw_entity.h:654
Definition rmw_entity.h:928
Definition rmw_entity.h:318
Definition rmw_entity.h:980
Definition rmw_entity.h:205
Definition rmw_entity.h:627
Definition rmw_entity.h:833
Definition rmw_entity.h:668
Definition rmw_entity.h:950
Definition rmw_entity.h:485
Definition rmw_vtable.h:167
rmw_topic_endpoint_info_visit_fn visit
Definition rmw_vtable.h:172
void * ctx
Definition rmw_vtable.h:173
Definition rmw_event.h:69