Skip to content

Feature/publish-participant-hostname #5793

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

Open
wants to merge 2 commits 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
7 changes: 7 additions & 0 deletions include/fastdds/dds/core/policy/ParameterTypes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1203,6 +1203,13 @@ const std::string parameter_property_current_ds_version = "2.0";
*/
const char* const parameter_policy_physical_data_host = "fastdds.physical_data.host";

/**
* Parameter property value for Hostname physical data
*
* @ingroup PARAMETER_MODULE
*/
const char* const parameter_policy_physical_data_hostname = "fastdds.physical_data.hostname";

/**
* Parameter property value for User physical data
*
Expand Down
7 changes: 7 additions & 0 deletions src/cpp/fastdds/domain/DomainParticipantImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,13 @@ DomainParticipantImpl::DomainParticipantImpl(
}
}

property_value = fastdds::rtps::PropertyPolicyHelper::find_property(
qos_.properties(), parameter_policy_physical_data_hostname);
if (nullptr != property_value && property_value->empty())
{
property_value->assign(asio::ip::host_name());
}

property_value = fastdds::rtps::PropertyPolicyHelper::find_property(
qos_.properties(), parameter_policy_physical_data_user);
if (nullptr != property_value && property_value->empty())
Expand Down