File distro.hpp
FileList > astutedds > rmw > distro.hpp
Go to the source code of this file
Single source of truth for ROS 2 distro / rmw-version compatibility. More...
Macros
| Type | Name |
|---|---|
| define | RMW_ASTUTEDDS_DISTRO_JAZZY ([**RMW\_ASTUTEDDS\_RMW\_VERSION\_MAJOR**](distro_8hpp.md#define-rmw_astutedds_rmw_version_major) < 13)True when building against the Jazzy-era interface (rmw 7.x–12.x). |
| define | RMW_ASTUTEDDS_DISTRO_LYRICAL ([**RMW\_ASTUTEDDS\_RMW\_VERSION\_MAJOR**](distro_8hpp.md#define-rmw_astutedds_rmw_version_major) >= 13)True when building against the Lyrical-era interface (rmw >= 13). |
| define | RMW_ASTUTEDDS_HAS_SERVICE_ENDPOINT_INFO 0 |
| define | RMW_ASTUTEDDS_RMW_VERSION_MAJOR 7 |
Detailed Description
The AstuteDDS RMW plugin ships one distro-agnostic src/ tree that builds against multiple ROS 2 releases — currently Jazzy (Ubuntu 24.04, rmw 7) and Lyrical (Ubuntu 26.04, rmw >= 13). The two interfaces are almost identical; the differences are additive (new functions and headers appear in the newer release).
This header is the ONLY place that performs version or feature detection. Every entry-point translation unit includes it and branches solely on the clean RMW_ASTUTEDDS_* flags defined here — never on raw __has_include or version arithmetic. Keeping all gating centralised keeps the guards in the implementation files coarse and readable, and means adding support for a future distro touches exactly one file.
Detection uses two complementary mechanisms:
* __has_include — for features gated behind a new rmw header (the most reliable signal, since the header simply is or is not installed).
* RMW_ASTUTEDDS_RMW_VERSION_MAJOR — injected by CMake (target_compile_definitions, derived from rmw_VERSION) for the rare gate that is not tied to a header. The rmw package does not define a RMW_VERSION preprocessor macro, so this must come from the build system; we fall back to Jazzy (7) if it was not supplied.
Macro Definition Documentation
define RMW_ASTUTEDDS_DISTRO_JAZZY
True when building against the Jazzy-era interface (rmw 7.x–12.x).
#define RMW_ASTUTEDDS_DISTRO_JAZZY `( RMW_ASTUTEDDS_RMW_VERSION_MAJOR < 13)`
define RMW_ASTUTEDDS_DISTRO_LYRICAL
True when building against the Lyrical-era interface (rmw >= 13).
#define RMW_ASTUTEDDS_DISTRO_LYRICAL `( RMW_ASTUTEDDS_RMW_VERSION_MAJOR >= 13)`
define RMW_ASTUTEDDS_HAS_SERVICE_ENDPOINT_INFO
#define RMW_ASTUTEDDS_HAS_SERVICE_ENDPOINT_INFO `0`
Per-service endpoint introspection: rmw_get_clients_info_by_service / rmw_get_servers_info_by_service (rmw/get_service_endpoint_info.h). Added after Jazzy (Kilted+ / Lyrical).
define RMW_ASTUTEDDS_RMW_VERSION_MAJOR
#define RMW_ASTUTEDDS_RMW_VERSION_MAJOR `7`
The documentation for this class was generated from the following file include/astutedds/rmw/distro.hpp