|
CARLA
|
Process-wide runtime configuration shared by every ROS 2 middleware implementation (FastDDS, CycloneDDS, and future ones such as Zenoh). More...
#include <MiddlewareConfig.h>
Classes | |
| struct | Data |
Static Public Member Functions | |
| static int | GetDomainId () |
| static int | GetEffectiveDomainId () |
| static ResolvedDomainId | ResolveEffective () |
| Resolve the effective domain id and its source from the configured value, the ROS_DOMAIN_ID environment variable, and the default. | |
| static void | SetDomainId (int id) |
| Configure the ROS 2 domain id for all subsequent transport contexts. | |
Static Private Member Functions | |
| static Data & | Storage () |
| Function-local static: a single instance shared across all translation units. | |
Process-wide runtime configuration shared by every ROS 2 middleware implementation (FastDDS, CycloneDDS, and future ones such as Zenoh).
This belongs to the middleware abstraction layer, not to any single vendor: each concrete middleware reads this configuration when it establishes its transport context (a DDS DomainParticipant, a Zenoh session, ...) and translates the abstract values into its own mechanism, mapping kUnsetDomainId to its native default.
Set once at startup (via ROS2::Enable) before any publisher or subscriber is created. Reads after that point are stable. Because it is set before any entity exists, no synchronisation is required.
Definition at line 103 of file MiddlewareConfig.h.
|
inlinestatic |
Definition at line 112 of file MiddlewareConfig.h.
References carla::ros2::MiddlewareConfig::Data::domain_id, and Storage().
Referenced by ResolveEffective(), TEST_F(), TEST_F(), and TEST_F().
|
inlinestatic |
Definition at line 126 of file MiddlewareConfig.h.
References carla::ros2::ResolvedDomainId::id, and ResolveEffective().
Referenced by carla::ros2::FastDDSSharedParticipant::acquire(), TEST_F(), TEST_F(), and TEST_F().
|
inlinestatic |
Resolve the effective domain id and its source from the configured value, the ROS_DOMAIN_ID environment variable, and the default.
See ResolveDomainId for the priority order.
Definition at line 119 of file MiddlewareConfig.h.
References GetDomainId(), carla::ros2::kRosDomainIdEnvVar, and carla::ros2::ResolveDomainId().
Referenced by GetEffectiveDomainId(), and carla::ros2::SetActiveDomainId().
|
inlinestatic |
Configure the ROS 2 domain id for all subsequent transport contexts.
Pass kUnsetDomainId to keep each middleware's native default.
Definition at line 107 of file MiddlewareConfig.h.
References carla::ros2::MiddlewareConfig::Data::domain_id, and Storage().
Referenced by carla::ros2::SetActiveDomainId(), RosDomainIdEnvFixture::SetUp(), MiddlewareConfigFixture::TearDown(), RosDomainIdEnvFixture::TearDown(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
|
inlinestaticprivate |
Function-local static: a single instance shared across all translation units.
Definition at line 136 of file MiddlewareConfig.h.
Referenced by GetDomainId(), and SetDomainId().