|
nros rmw-cffi
C vtable for plugging a third-party RMW backend into nros
|
#include <rmw_entity.h>

Data Fields | |
| uint8_t | _reserved [7] |
| void * | backend_data |
| bool | can_loan_messages |
| rmw_qos_profile_t | qos |
| const char * | topic_name |
| const char * | type_name |
Publisher entity.
Created by vtable->create_publisher; destroyed by vtable->destroy_publisher. The runtime owns the storage; the runtime fills topic_name / type_name / qos before the create call. The backend writes backend_data.
can_loan_messages matches upstream rmw_publisher_t's field of the same name — true means the backend exposes the loan_publish / commit_publish primitive (Phase 99).
The runtime DERIVES it; a backend does not write it (issue 0814). Its value is exactly vtable->borrow_loaned_message != NULL, because that is the same fact, and a fact with two spellings drifts — this one had drifted in both directions at once. Anything a backend writes here is overwritten.
This paragraph used to read "the runtime reads it once at create time
and picks the publish path accordingly; no per-call probe". That was never true: nothing has ever branched on the field, and the publish path is chosen per call from vtable->borrow_loaned_message itself.
To refuse a loan for a PARTICULAR entity, return RMW_RET_UNSUPPORTED from borrow_loaned_message. The per-entity answer belongs on the call, which the runtime consults; not on this flag, which it does not.
| uint8_t rmw_publisher_t::_reserved[7] |
Reserved for future fields; must be zero.
| void* rmw_publisher_t::backend_data |
Opaque backend state. NULL if creation failed.
| bool rmw_publisher_t::can_loan_messages |
Backend exposes loan_publish / commit_publish (Phase 99). DERIVED by the runtime from vtable->borrow_loaned_message; a backend's write is overwritten (issue 0814).
| rmw_qos_profile_t rmw_publisher_t::qos |
QoS subset honoured by this publisher.
| const char* rmw_publisher_t::topic_name |
Topic name (borrowed; outlives the publisher).
| const char* rmw_publisher_t::type_name |
ROS-2-style fully-qualified type name (e.g., "std_msgs/msg/Int32"). Borrowed; outlives the publisher.