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/* 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
80
81/* ---- 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 (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 (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 (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/* 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 (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 (rmw's term; was `service_server`) ---- */
307 /* `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);
343 rmw_mut_byte_span_t *request, int64_t *seq_out, bool *taken);
347 bool *out_has_request);
349 int64_t seq, rmw_byte_span_t response);
350
351 /* ---- Client (rmw's term; was `service_client`) ---- */
353 const rmw_service_type_support_t *type_support,
354 const char *service_name,
355 uint32_t domain_id, const rmw_qos_profile_t *qos,
356 rmw_client_t *out);
358
389 rmw_byte_span_t request, int64_t *sequence_id);
390
418 rmw_mut_byte_span_t *reply, int64_t *seq_out, bool *taken);
419
420 /* ---- Status events (optional) ---- */
428 const rmw_subscription_t *subscription,
429 rmw_event_type_t kind,
430 uint32_t deadline_ms,
432 void *user_context);
433
438 /* How status events map onto the three upstream parts.
439 *
440 * Upstream's model is three-part: `*_event_init` fills an `rmw_event_t`
441 * HANDLE, `rmw_event_set_callback` attaches a callback to that handle, and
442 * `rmw_take_event` polls it for a status.
443 *
444 * - `rmw_event_set_callback` is FUSED into `*_event_init`, which takes the
445 * callback directly. There is no handle to attach one to afterwards.
446 * What that costs is real and small: upstream can replace or clear a
447 * callback later, and we cannot.
448 *
449 * - `rmw_take_event` is a SLOT, split per entity kind
450 * because we have no `rmw_event_t` to carry the entity — see
451 * `subscription_take_event` / `publisher_take_event` below.
452 *
453 * It was DECLINED until 2026-08-25 on two clauses that both turned out
454 * false, and they are worth recording because each sounded right:
455 *
456 * "Upstream polls because the WAIT SET said one was ready, and the wait
457 * set is declined here, so a poll would be blind."
458 * — This ABI is a poll-WITHOUT-a-wait-set design by construction.
459 * `has_data`'s own doc says so: "the poll a loop with no wait-set
460 * needs, and it allocates nothing." A poll with no wait set is the
461 * model here, not a blindness.
462 *
463 * "Our callback already runs on the safe context — from inside
464 * `drive_io`, on the executor thread, never an ISR or a transport
465 * thread."
466 * — True of no backend. zenoh fires from `take` and
467 * `has_data`; cyclonedds' DDS listeners fire on Cyclone's own
468 * worker thread while its `drive_io` is a sleep with no callback
469 * path at all. So a cyclonedds status event has nowhere safe to be
470 * delivered from, and buffer-plus-poll IS `take_event`. A
471 * per-backend fact stated ABI-wide — the same shape as the
472 * network-flow decline W5 flipped.
473 */
474
491 rmw_event_type_t kind, rmw_event_payload_t *out, bool *taken);
492
497 rmw_event_type_t kind, rmw_event_payload_t *out, bool *taken);
498
500 const rmw_publisher_t *publisher,
501 rmw_event_type_t kind,
502 uint32_t deadline_ms,
504 void *user_context);
505
513 const rmw_publisher_t *publisher);
514
515 /* ---- Executor wake + next-deadline hints (optional) ---- */
540 uint32_t *out_ms, bool *has_deadline);
541
570 void (*cb)(void *ctx),
571 void *ctx);
572
573 /* ---- Zero-copy loans (optional) ---- */
608 size_t requested_len,
609 rmw_mut_byte_span_t *out_slot,
610 rmw_loan_token_t **out_token);
611
621 rmw_loan_token_t *token,
622 size_t actual_len);
623
631
659 rmw_byte_span_t *out_view,
660 rmw_loan_token_t **out_token,
661 bool *taken);
662
671
672 /* ---- Service-server availability (optional) ---- */
716 const rmw_client_t *client,
717 bool *out_available);
718
719 /* ---- Batched take + streamed publish (optional) ---- */
762 uint8_t *buf,
763 size_t per_msg_cap,
764 size_t max_msgs,
765 size_t *out_lens,
766 size_t *taken);
767
816 rmw_publisher_t *publisher,
817 void (*size_cb)(size_t *out_total_len, void *user_ctx),
818 void (*chunk_cb)(uint8_t *out_buf, size_t cap,
819 size_t *out_written, void *user_ctx),
820 void *user_ctx);
821
822 /* ---- Session liveness probe (optional) ---- */
858 rmw_session_t *session,
859 int32_t timeout_ms);
860
861 /* ---- Zero-copy in-place subscription take ---- */
862
893 rmw_subscription_t *subscription,
894 bool *out_supports);
895
929 rmw_subscription_t *subscription,
930 void *ctx,
931 void (*cb)(void *ctx, rmw_byte_span_t message),
932 bool *out_processed);
933 /* ---- Identity + matched counts (all optional) ---- */
934
969 const char *(*get_implementation_identifier)(void);
970
997 const char *(*get_serialization_format)(void);
998
1016
1021 rmw_gid_t *gid);
1022
1029 const rmw_publisher_t *publisher, size_t *subscription_count);
1030
1033 const rmw_subscription_t *subscription, size_t *publisher_count);
1034
1035 /* ---- QoS read-back + clean shutdown (all optional) ---- */
1036
1066 rmw_qos_profile_t *qos);
1067
1070 rmw_qos_profile_t *qos);
1071
1080 rmw_qos_profile_t *qos);
1081
1084 rmw_qos_profile_t *qos);
1085
1088 rmw_qos_profile_t *qos);
1089
1092 rmw_qos_profile_t *qos);
1093
1106 uint32_t timeout_ms);
1107
1108 /* ---- With-info takes + entity callbacks (optional) ---- */
1109
1131 rmw_mut_byte_span_t *message, bool *taken, rmw_message_info_t *message_info);
1132
1138 rmw_byte_span_t *out_view, rmw_loan_token_t **out_token,
1139 bool *taken, rmw_message_info_t *message_info);
1140
1141 /* ---- Graph introspection (all optional) ----
1142 *
1143 * NONE of these may block on the wire, and none takes a timeout: this
1144 * vtable's premise is that no background transport thread is assumed, so a
1145 * query-based backend keeps a `drive_io`-fed cache or leaves the slot NULL
1146 * rather than stalling the executor's only thread inside an introspection
1147 * call.
1148 *
1149 * A 128 KiB target cannot hold a graph cache, and NULL is the expected
1150 * answer there — the runtime surfaces UNSUPPORTED. XRCE cannot enumerate
1151 * participants at all; it answers `get_node_names` alone, from the
1152 * `ros_discovery_info` samples it reads through the Agent.
1153 */
1154
1162 rmw_node_visitor_t visitor);
1163
1166 bool no_demangle, rmw_names_and_types_visitor_t visitor);
1167
1171
1174 const char *node_name, const char *node_namespace, bool no_demangle,
1176
1179 const char *node_name, const char *node_namespace, bool no_demangle,
1181
1184 const char *node_name, const char *node_namespace,
1186
1189 const char *node_name, const char *node_namespace,
1191
1194 const char *topic_name, bool no_mangle,
1196
1199 const char *topic_name, bool no_mangle,
1201
1204 const char *topic_name, size_t *count);
1205
1208 const char *topic_name, size_t *count);
1209
1246 rmw_event_callback_t callback, const void *user_data);
1247
1248 /* ---- Graph node lifecycle (optional) ----
1249 *
1250 * The rest of upstream's lifecycle group is deliberately absent, and the
1251 * absences are decisions rather than omissions:
1252 *
1253 * - `rmw_init` / `rmw_shutdown` / `rmw_context_fini` are
1254 * `create_session` / `destroy_session`. There is no second teardown
1255 * phase: the session shell is caller-owned, so there is nothing left to
1256 * free after the backend releases `backend_data`.
1257 *
1258 * - `rmw_init_options_{init,copy,fini}` have nothing to do here. Upstream
1259 * needs the trio because its options OWN heap and carry an
1260 * `rcutils_allocator_t`, which cannot cross this seam; ours is a
1261 * build-time POD, so "copy" is `=` and "fini" is nothing.
1262 *
1263 * This does NOT decide what the options CARRY. Of Humble's eight
1264 * fields, `create_session` takes `domain_id`; `implementation_identifier`
1265 * and `impl` are answered elsewhere (the identity slot,
1266 * `rmw_session_t::backend_data`); `allocator` is declined ABI-wide and
1267 * `instance_id` is rcl-side process identity. `security_options` is
1268 * declined on the target: it is a DDS-SROS2 keystore PATH plus an
1269 * enforcement switch, and neither a filesystem nor a security plugin
1270 * exists where this ABI runs. `localhost_only` and `enclave` are
1271 * CARRIED, by `create_session`'s NULLable `rmw_session_options_t`
1272 * (which closed the two gaps): Cyclone honours
1273 * `localhost_only` by restricting discovery to loopback, and a backend
1274 * with no discovery to restrict ignores both, as it does `mode`.
1275 *
1276 * `discovery_options` is NOT in this list: it is an IRON field, and the
1277 * recorded contract is Humble. It was named here once, the
1278 * third unchecked sentence about an upstream struct in this campaign.
1279 * Read the header, not the memory.
1280 *
1281 * - `rmw_wait`, the wait set, and the guard conditions are declined
1282 * together, because `has_data` / `has_request` + `drive_io` +
1283 * `set_wake_callback` + `next_deadline_ms` ARE upstream's `rmw_wait`,
1284 * decomposed. What a vtable `wait` would add is only the BLOCK, moved
1285 * from the platform into the backend — and the block cannot live there:
1286 * one executor drives sessions from several backends at once
1287 * (`create_node_on(name, rmw)`), timers fire off the platform clock, and
1288 * guard conditions fire from another thread or an ISR. A backend can
1289 * only block on its own handles. `next_deadline_ms` is exactly the piece
1290 * of `rmw_wait` that CANNOT be answered above the seam, and it is
1291 * already a slot; that is the decomposition working, not a gap.
1292 */
1293
1307 const char *name, const char *namespace_,
1308 rmw_node_t *out);
1309
1324
1350
1351 /* `required_rx_bytes` (slot "how many take-buffer bytes does
1352 * this type need") is DELETED, not reserved. Nothing ever dispatched it:
1353 * the work that owned the dispatch site closed by sizing every
1354 * receive buffer from the message type's own bound instead (via
1355 * `RosMessage`), so the runtime never needed to ask. Its one body —
1356 * zenoh-pico's — answered the hint itself for every bounded type, and
1357 * refused only a hint no size class could hold, which
1358 * `create_subscription` already refuses. A query whose answer equals its
1359 * own argument, with no caller, is not parity shape (upstream has no such
1360 * symbol); it is a body nobody can reach. `rx_buffer_hint` in
1361 * `rmw_subscription_options_t` remains the one carrier of the size. */
1362
1363 /* ---- Which QoS policies THIS backend honours ---- */
1364
1425 uint32_t *out_mask);
1426
1427 /* ---- Per-entity new-data callbacks ---- */
1428
1460 rmw_subscription_t *subscription, rmw_event_callback_t callback,
1461 const void *user_data);
1462
1467 rmw_event_callback_t callback, const void *user_data);
1468
1473 rmw_event_callback_t callback, const void *user_data);
1474
1475 /* ---- The Jazzy contract's four ADOPT additions ----
1476 *
1477 * Jazzy's `rmw_implementation` dispatch table carries seven symbols
1478 * Humble's does not; three are dynamic typesupport (declined, see
1479 * `docs/reference/rmw-api-map.toml`) and these four were adopted. All
1480 * optional, appended, NULL = UNSUPPORTED like their siblings. */
1481
1492 const char *service_name, size_t *count);
1493
1497 const char *service_name, size_t *count);
1498
1505
1524
1549 rmw_mut_byte_span_t *request, int64_t *seq_out, bool *taken,
1550 rmw_service_info_t *service_info);
1551
1579 rmw_mut_byte_span_t *reply, int64_t *seq_out, bool *taken,
1580 rmw_service_info_t *service_info);
1581
1609 uint8_t *out_kind, int32_t *out_handle);
1610
1612
1614#define NROS_RMW_READINESS_NONE 0u
1615#define NROS_RMW_READINESS_NOTIFY 1u
1616#define NROS_RMW_READINESS_WAITABLE 2u
1617
1648
1669 const nros_rmw_vtable_t *vtable);
1670
1675
1681size_t nros_rmw_cffi_registered_names(const char **buf, size_t cap);
1682
1683
1715#if (defined(__GNUC__) || defined(__clang__)) && !defined(__ZEPHYR__) && \
1716 !defined(__NuttX__) && !defined(ESP_PLATFORM) && !defined(__VXWORKS__)
1717#define NROS_RMW_REGISTER_BACKEND(REGISTER_FN) \
1718 __attribute__((constructor)) static void nros_rmw_ctor_##REGISTER_FN( \
1719 void) { \
1720 (void) REGISTER_FN(); \
1721 }
1722#else
1723/* Embedded / unsupported toolchain: board calls nros_rmw_<x>_register(). */
1724#define NROS_RMW_REGISTER_BACKEND(REGISTER_FN)
1725#endif
1726
1727#ifdef __cplusplus
1728}
1729#endif
1730
1731#endif /* NROS_RMW_VTABLE_H */
Typed entity structs for the nros RMW C surface.
rmw_log_severity_t
Definition rmw_entity.h:594
rmw_feature_t
Definition rmw_entity.h:101
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: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
Return-code constants for the nros RMW C vtable.
int32_t rmw_ret_t
Definition rmw_ret.h:72
#define NROS_RMW_ASSERT_ENUM_INT_WIDTH(T)
Definition rmw_ret.h:226
size_t nros_rmw_cffi_registered_names(const char **buf, size_t cap)
nros_rmw_session_mode_t
Definition rmw_vtable.h:1638
@ NROS_RMW_SESSION_MODE_PEER
Definition rmw_vtable.h:1642
@ NROS_RMW_SESSION_MODE_CLIENT
Definition rmw_vtable.h:1640
@ NROS_RMW_SESSION_MODE_FORCE_INT_WIDTH_
Definition rmw_vtable.h:1645
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:1028
rmw_ret_t(* set_log_severity)(rmw_log_severity_t severity)
Definition rmw_vtable.h:1349
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:928
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:1137
rmw_ret_t(* count_publishers)(const rmw_session_t *session, const char *topic_name, size_t *count)
Definition rmw_vtable.h:1203
rmw_ret_t(* count_clients)(const rmw_session_t *session, const char *service_name, size_t *count)
Definition rmw_vtable.h:1491
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:1130
rmw_ret_t(* send_response)(const rmw_service_t *server, int64_t seq, rmw_byte_span_t response)
Definition rmw_vtable.h:348
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:342
rmw_ret_t(* get_gid_for_client)(const rmw_client_t *client, rmw_gid_t *gid)
Definition rmw_vtable.h:1504
rmw_ret_t(* subscription_set_on_new_message_callback)(rmw_subscription_t *subscription, rmw_event_callback_t callback, const void *user_data)
Definition rmw_vtable.h:1459
rmw_ret_t(* get_service_names_and_types)(const rmw_session_t *session, rmw_names_and_types_visitor_t visitor)
Definition rmw_vtable.h:1169
rmw_ret_t(* publisher_assert_liveliness)(const rmw_publisher_t *publisher)
Definition rmw_vtable.h:512
rmw_ret_t(* next_deadline_ms)(const rmw_session_t *session, uint32_t *out_ms, bool *has_deadline)
Definition rmw_vtable.h:539
rmw_ret_t(* take_response_with_info)(const rmw_client_t *client, rmw_mut_byte_span_t *reply, int64_t *seq_out, bool *taken, rmw_service_info_t *service_info)
Definition rmw_vtable.h:1578
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:1165
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:417
rmw_ret_t(* get_gid_for_publisher)(const rmw_publisher_t *publisher, rmw_gid_t *gid)
Definition rmw_vtable.h:1020
rmw_ret_t(* service_response_publisher_get_actual_qos)(const rmw_service_t *service, rmw_qos_profile_t *qos)
Definition rmw_vtable.h:1091
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:1105
rmw_ret_t(* client_request_publisher_get_actual_qos)(const rmw_client_t *client, rmw_qos_profile_t *qos)
Definition rmw_vtable.h:1079
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:569
rmw_ret_t(* publish_loaned_message)(const rmw_publisher_t *publisher, rmw_loan_token_t *token, size_t actual_len)
Definition rmw_vtable.h:620
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:496
rmw_ret_t(* return_loaned_message_from_subscription)(const rmw_subscription_t *subscription, rmw_loan_token_t *token)
Definition rmw_vtable.h:670
rmw_ret_t(* take_request_with_info)(const rmw_service_t *server, rmw_mut_byte_span_t *request, int64_t *seq_out, bool *taken, rmw_service_info_t *service_info)
Definition rmw_vtable.h:1548
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:1032
bool(* event_type_is_supported)(rmw_event_type_t event_type)
Definition rmw_vtable.h:1523
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:1193
rmw_ret_t(* service_request_subscription_get_actual_qos)(const rmw_service_t *service, rmw_qos_profile_t *qos)
Definition rmw_vtable.h:1087
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:427
rmw_ret_t(* destroy_node)(rmw_node_t *node)
Definition rmw_vtable.h:1323
bool(* feature_supported)(rmw_feature_t feature)
Definition rmw_vtable.h:1015
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:857
rmw_ret_t(* count_subscribers)(const rmw_session_t *session, const char *topic_name, size_t *count)
Definition rmw_vtable.h:1207
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:490
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:1198
rmw_ret_t(* service_server_is_available)(const rmw_client_t *client, bool *out_available)
Definition rmw_vtable.h:715
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:1183
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:1069
rmw_ret_t(* supported_qos_policies)(const rmw_session_t *session, uint32_t *out_mask)
Definition rmw_vtable.h:1424
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:1188
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(* readiness_source)(const rmw_session_t *session, uint8_t *out_kind, int32_t *out_handle)
Definition rmw_vtable.h:1608
rmw_ret_t(* count_services)(const rmw_session_t *session, const char *service_name, size_t *count)
Definition rmw_vtable.h:1496
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:1173
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:761
rmw_ret_t(* subscription_supports_in_place)(rmw_subscription_t *subscription, bool *out_supports)
Definition rmw_vtable.h:892
rmw_ret_t(* has_request)(rmw_service_t *server, bool *out_has_request)
Definition rmw_vtable.h:346
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:499
rmw_ret_t(* send_request)(const rmw_client_t *client, rmw_byte_span_t request, int64_t *sequence_id)
Definition rmw_vtable.h:388
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:1245
rmw_ret_t(* return_loaned_message_from_publisher)(const rmw_publisher_t *publisher, rmw_loan_token_t *token)
Definition rmw_vtable.h:630
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:815
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:352
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:658
rmw_ret_t(* get_node_names)(const rmw_session_t *session, rmw_node_visitor_t visitor)
Definition rmw_vtable.h:1161
rmw_ret_t(* create_node)(rmw_session_t *session, const char *name, const char *namespace_, rmw_node_t *out)
Definition rmw_vtable.h:1306
rmw_ret_t(* service_set_on_new_request_callback)(rmw_service_t *service, rmw_event_callback_t callback, const void *user_data)
Definition rmw_vtable.h:1466
rmw_ret_t(* destroy_client)(rmw_client_t *client)
Definition rmw_vtable.h:357
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:1178
rmw_ret_t(* client_set_on_new_response_callback)(rmw_client_t *client, rmw_event_callback_t callback, const void *user_data)
Definition rmw_vtable.h:1472
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:607
rmw_ret_t(* publisher_get_actual_qos)(const rmw_publisher_t *publisher, rmw_qos_profile_t *qos)
Definition rmw_vtable.h:1065
rmw_ret_t(* client_response_subscription_get_actual_qos)(const rmw_client_t *client, rmw_qos_profile_t *qos)
Definition rmw_vtable.h:1083
Definition rmw_entity.h:149
Definition rmw_entity.h:1286
Definition rmw_entity.h:274
Definition rmw_entity.h:306
Definition rmw_entity.h:247
Definition rmw_entity.h:171
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:1175
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:809
Definition rmw_entity.h:1219
Definition rmw_entity.h:440
Definition rmw_entity.h:363
Definition rmw_entity.h:1271
Definition rmw_entity.h:263
Definition rmw_entity.h:782
Definition rmw_entity.h:1124
Definition rmw_entity.h:823
Definition rmw_entity.h:1241
Definition rmw_entity.h:623
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:127