52 if (text ==
nullptr) {
56 const long value = std::strtol(text, &end, 10);
60 while (*end ==
' ' || *end ==
'\t' || *end ==
'\n' || *end ==
'\r') {
69 out =
static_cast<int>(value);
Process-wide runtime configuration shared by every ROS 2 middleware implementation (FastDDS,...
static int GetEffectiveDomainId()
static ResolvedDomainId ResolveEffective()
Resolve the effective domain id and its source from the configured value, the ROS_DOMAIN_ID environme...
static void SetDomainId(int id)
Configure the ROS 2 domain id for all subsequent transport contexts.
static Data & Storage()
Function-local static: a single instance shared across all translation units.
bool IsValidDomainId(int id)
constexpr int kMinDomainId
Lowest valid ROS 2 domain id.
constexpr int kDefaultDomainId
Domain id used when neither the command line nor the environment provides one.
constexpr int kMaxDomainId
Highest valid ROS 2 domain id (RTPS maximum).
ResolvedDomainId ResolveDomainId(int cli_value, const char *env_value)
Resolve the effective domain id from a command line value and an environment value,...
constexpr int kUnsetDomainId
Sentinel domain id meaning "no domain id was configured on the command line"; each middleware falls b...
bool TryParseDomainId(const char *text, int &out)
Parse a ROS_DOMAIN_ID-style string into a valid domain id.
DomainIdSource
Where the effective domain id came from, in priority order.
@ Environment
From the ROS_DOMAIN_ID environment variable.
@ Default
Neither was set; the default domain (0) is used.
@ CommandLine
From the –ros-domain-id command line option.
constexpr char kRosDomainIdEnvVar[]
Name of the standard ROS 2 environment variable that selects the domain id.
This file contains definitions of common data structures used in traffic manager.
The resolved domain id together with the source it came from.