Skip to content

Commit

Permalink
Refs #21129: Remove DiscoveryProtocol_t typedef
Browse files Browse the repository at this point in the history
Signed-off-by: elianalf <[email protected]>
  • Loading branch information
elianalf committed Jun 13, 2024
1 parent d9aa594 commit 289caee
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ The *Fast DDS* XML schema was duly updated to accommodate the new Discovery Serv
- The participant profile ``<builtin>`` tag contains a ``<discovery_config>`` tag where all discovery-related info is
gathered. This new tag contains the following new XML child elements:
- ``<discoveryProtocol>``: specifies the discovery type through the ``DiscoveryProtocol_t`` enumeration.
- ``<discoveryProtocol>``: specifies the discovery type through the ``DiscoveryProtocol`` enumeration.
- ``<discoveryServersList>``: specifies the server or servers to which a Client/Server connects.
- ``<clientAnnouncementPeriod>``: specifies the time span between PDP metatraffic exchange.
Expand Down
2 changes: 1 addition & 1 deletion examples/HelloWorldExampleDS/HelloWorldPublisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ bool HelloWorldPublisher::init(
participant_qos.wire_protocol().builtin.discovery_config.m_DiscoveryServers.push_back(ratt);
}

participant_qos.wire_protocol().builtin.discovery_config.discoveryProtocol = DiscoveryProtocol_t::CLIENT;
participant_qos.wire_protocol().builtin.discovery_config.discoveryProtocol = DiscoveryProtocol::CLIENT;
participant_qos.wire_protocol().participant_id = 2;
participant_qos.wire_protocol().builtin.discovery_config.leaseDuration = eprosima::fastdds::c_TimeInfinite;
participant_qos.name("Participant_pub");
Expand Down
2 changes: 1 addition & 1 deletion examples/HelloWorldExampleDS/HelloWorldServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ bool HelloWorldServer::init(

DomainParticipantQos participant_qos = PARTICIPANT_QOS_DEFAULT;

participant_qos.wire_protocol().builtin.discovery_config.discoveryProtocol = DiscoveryProtocol_t::SERVER;
participant_qos.wire_protocol().builtin.discovery_config.discoveryProtocol = DiscoveryProtocol::SERVER;
std::istringstream iss("44.49.53.43.53.45.52.56.45.52.5F.31");
iss >> participant_qos.wire_protocol().prefix;
participant_qos.wire_protocol().builtin.discovery_config.leaseDuration = c_TimeInfinite;
Expand Down
2 changes: 1 addition & 1 deletion examples/HelloWorldExampleDS/HelloWorldSubscriber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ bool HelloWorldSubscriber::init(
participant_qos.wire_protocol().builtin.discovery_config.m_DiscoveryServers.push_back(ratt);
}

participant_qos.wire_protocol().builtin.discovery_config.discoveryProtocol = DiscoveryProtocol_t::CLIENT;
participant_qos.wire_protocol().builtin.discovery_config.discoveryProtocol = DiscoveryProtocol::CLIENT;
participant_qos.wire_protocol().participant_id = 3;
participant_qos.wire_protocol().builtin.discovery_config.leaseDuration = eprosima::fastdds::c_TimeInfinite;
participant_qos.name("Participant_sub");
Expand Down
6 changes: 3 additions & 3 deletions src/DiscoveryServerManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1004,8 +1004,8 @@ void DiscoveryServerManager::loadClient(

// we must assert that DiscoveryProtocol is CLIENT

if (dpQOS.wire_protocol().builtin.discovery_config.discoveryProtocol != DiscoveryProtocol_t::CLIENT &&
dpQOS.wire_protocol().builtin.discovery_config.discoveryProtocol != DiscoveryProtocol_t::SUPER_CLIENT)
if (dpQOS.wire_protocol().builtin.discovery_config.discoveryProtocol != DiscoveryProtocol::CLIENT &&
dpQOS.wire_protocol().builtin.discovery_config.discoveryProtocol != DiscoveryProtocol::SUPER_CLIENT)
{
LOG_ERROR(
"DiscoveryServerManager::loadClient try to create a client with an incompatible profile: " <<
Expand Down Expand Up @@ -1277,7 +1277,7 @@ void DiscoveryServerManager::loadSimple(
}

// we must assert that DiscoveryProtocol is CLIENT
if (dpQOS.wire_protocol().builtin.discovery_config.discoveryProtocol != DiscoveryProtocol_t::SIMPLE)
if (dpQOS.wire_protocol().builtin.discovery_config.discoveryProtocol != DiscoveryProtocol::SIMPLE)
{
LOG_ERROR(
"DiscoveryServerManager::loadSimple try to create a simple participant with an incompatible profile: " <<
Expand Down

0 comments on commit 289caee

Please sign in to comment.