Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[22627] Rename EASY_MODE_URI and easy_mode_env() #5593

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/cpp/rtps/RTPSDomain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -520,9 +520,9 @@ RTPSParticipant* RTPSDomainImpl::clientServerEnvironmentCreationOverride(
RTPSParticipantAttributes client_att(att);

// Check whether we need to initialize in easy mode
const std::string& easy_mode_env_value = easy_mode_env();
const std::string& ros_easy_mode_env_value = ros_easy_mode_env();

if (easy_mode_env_value.empty())
if (ros_easy_mode_env_value.empty())
{
// Retrieve the info from the environment variable
LocatorList_t& server_list = client_att.builtin.discovery_config.m_DiscoveryServers;
Expand Down Expand Up @@ -622,7 +622,7 @@ RTPSParticipant* RTPSDomainImpl::clientServerEnvironmentCreationOverride(
.verb(FAST_DDS_DEFAULT_CLI_AUTO_VERB)
.arg("-d")
.value(std::to_string(domain_id))
.value(easy_mode_env_value + ":" + std::to_string(domain_id))
.value(ros_easy_mode_env_value + ":" + std::to_string(domain_id))
.build_and_call();
#ifndef _WIN32
// Adecuate Python subprocess return
Expand Down
4 changes: 2 additions & 2 deletions src/cpp/rtps/attributes/ServerAttributes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ const std::string& ros_discovery_server_env()
return servers;
}

const std::string& easy_mode_env()
const std::string& ros_easy_mode_env()
{
static std::string ip_value;
SystemInfo::get_env(EASY_MODE_URI, ip_value);
SystemInfo::get_env(ROS2_EASY_MODE_URI, ip_value);
return ip_value;
}

Expand Down
8 changes: 4 additions & 4 deletions src/cpp/rtps/attributes/ServerAttributes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ const char* const DEFAULT_ROS2_MASTER_URI = "ROS_DISCOVERY_SERVER";
* - Set the transports to TCP and SHM.
* - Make the participant a SUPER_CLIENT.
*/
const char* const EASY_MODE_URI = "ROS2_EASY_MODE";
const char* const ROS2_EASY_MODE_URI = "ROS2_EASY_MODE";

/* Environment variable to transform a SIMPLE participant in a SUPER CLIENT.
* If the participant is not SIMPLE, the variable doesn't have any effects.
Expand Down Expand Up @@ -197,10 +197,10 @@ bool load_environment_server_info(
const std::string& ros_discovery_server_env();

/**
* Get the value of environment variable EASY_MODE_URI
* @return The value of environment variable EASY_MODE_URI. Empty string if the variable is not defined.
* Get the value of environment variable ROS2_EASY_MODE_URI
* @return The value of environment variable ROS2_EASY_MODE_URI. Empty string if the variable is not defined.
*/
const std::string& easy_mode_env();
const std::string& ros_easy_mode_env();

/**
* Get the value of environment variable ROS_SUPER_CLIENT
Expand Down
Loading