|
nros rmw-cffi
C vtable for plugging a third-party RMW backend into nros
|
Typed entity structs for the nros RMW C surface. More...
#include <stdbool.h>#include <stdint.h>#include <stddef.h>

Go to the source code of this file.
Data Structures | |
| struct | nros_rmw_publisher_t |
| struct | nros_rmw_qos_t |
| struct | nros_rmw_service_client_t |
| struct | nros_rmw_service_server_t |
| struct | nros_rmw_session_t |
| struct | nros_rmw_subscriber_t |
Macros | |
| #define | NROS_RMW_DURABILITY_TRANSIENT_LOCAL 1 |
| #define | NROS_RMW_DURABILITY_VOLATILE 0 |
| #define | NROS_RMW_HISTORY_KEEP_ALL 1 |
| #define | NROS_RMW_HISTORY_KEEP_LAST 0 |
| #define | NROS_RMW_QOS_PROFILE_DEFAULT |
| #define | NROS_RMW_QOS_PROFILE_PARAMETERS |
| #define | NROS_RMW_QOS_PROFILE_SENSOR_DATA |
| #define | NROS_RMW_QOS_PROFILE_SERVICES_DEFAULT NROS_RMW_QOS_PROFILE_DEFAULT |
| #define | NROS_RMW_QOS_PROFILE_SYSTEM_DEFAULT NROS_RMW_QOS_PROFILE_DEFAULT |
| #define | NROS_RMW_RELIABILITY_BEST_EFFORT 0 |
| #define | NROS_RMW_RELIABILITY_RELIABLE 1 |
Enumerations | |
| enum | nros_rmw_liveliness_kind_t { NROS_RMW_LIVELINESS_NONE = 0 , NROS_RMW_LIVELINESS_AUTOMATIC = 1 , NROS_RMW_LIVELINESS_MANUAL_BY_TOPIC = 2 , NROS_RMW_LIVELINESS_MANUAL_BY_NODE = 3 } |
Typed entity structs for the nros RMW C surface.
Same shape as upstream rmw.h's rmw_publisher_t / rmw_subscription_t family: visible metadata + a void * data tail (named backend_data here). No generic-handle typedef.
Lifetime rule. All const char * string fields are borrowed pointers — the storage pointing at them is owned by the caller (the runtime) and must outlive the entity. Backends never free or reallocate these strings; they hold them as-is for the entity's lifetime.
ABI commitment. These structs are part of the public ABI. Adding or reordering fields is a major version bump. Backends compile against this header and consumers compile against backend libraries — both sides must agree on the layout.
Forward-compat reserved bytes. Each entity carries an explicit _reserved[N] byte array sized to fill the natural alignment slot before backend_data. New fields up to N bytes can be added later without changing the struct's overall size or any field's offset after backend_data. Backends and runtime must zero the reserved bytes; the runtime relies on them being zero on read.
No-alloc + no-std preserved. No struct here owns heap-allocated storage. All metadata is either inline POD or a borrowed pointer.
| #define NROS_RMW_DURABILITY_TRANSIENT_LOCAL 1 |
| #define NROS_RMW_DURABILITY_VOLATILE 0 |
Durability policy values for nros_rmw_qos_t::durability.
| #define NROS_RMW_HISTORY_KEEP_ALL 1 |
| #define NROS_RMW_HISTORY_KEEP_LAST 0 |
History policy values for nros_rmw_qos_t::history.
| #define NROS_RMW_QOS_PROFILE_DEFAULT |
rmw_qos_profile_default-equivalent: reliable + volatile + keep-last(10), automatic liveliness, no deadline / lifespan.
| #define NROS_RMW_QOS_PROFILE_PARAMETERS |
rmw_qos_profile_parameters-equivalent: reliable + volatile + keep-last(1000).
| #define NROS_RMW_QOS_PROFILE_SENSOR_DATA |
rmw_qos_profile_sensor_data-equivalent: best-effort + volatile + keep-last(5).
| #define NROS_RMW_QOS_PROFILE_SERVICES_DEFAULT NROS_RMW_QOS_PROFILE_DEFAULT |
rmw_qos_profile_services_default-equivalent: reliable + volatile + keep-last(10).
| #define NROS_RMW_QOS_PROFILE_SYSTEM_DEFAULT NROS_RMW_QOS_PROFILE_DEFAULT |
rmw_qos_profile_system_default-equivalent: same as DEFAULT.
| #define NROS_RMW_RELIABILITY_BEST_EFFORT 0 |
Reliability policy values for nros_rmw_qos_t::reliability.
| #define NROS_RMW_RELIABILITY_RELIABLE 1 |
Liveliness kind values for nros_rmw_qos_t::liveliness_kind.