diff --git a/examples/cpp/discovery_server/ClientPublisherApp.cpp b/examples/cpp/discovery_server/ClientPublisherApp.cpp index 466e0fdd190..4a125771cf5 100644 --- a/examples/cpp/discovery_server/ClientPublisherApp.cpp +++ b/examples/cpp/discovery_server/ClientPublisherApp.cpp @@ -79,7 +79,7 @@ ClientPublisherApp::ClientPublisherApp( // Create DS locator eprosima::fastdds::rtps::Locator server_locator; - eprosima::fastrtps::rtps::IPLocator::setPhysicalPort(server_locator, server_port); + eprosima::fastdds::rtps::IPLocator::setPhysicalPort(server_locator, server_port); std::shared_ptr descriptor; @@ -97,7 +97,7 @@ ClientPublisherApp::ClientPublisherApp( descriptor = descriptor_tmp; server_locator.kind = LOCATOR_KIND_UDPv4; - eprosima::fastrtps::rtps::IPLocator::setIPv4(server_locator, ip_server_address); + eprosima::fastdds::rtps::IPLocator::setIPv4(server_locator, ip_server_address); break; } @@ -108,7 +108,7 @@ ClientPublisherApp::ClientPublisherApp( descriptor = descriptor_tmp; server_locator.kind = LOCATOR_KIND_UDPv6; - eprosima::fastrtps::rtps::IPLocator::setIPv6(server_locator, ip_server_address); + eprosima::fastdds::rtps::IPLocator::setIPv6(server_locator, ip_server_address); break; } @@ -119,8 +119,8 @@ ClientPublisherApp::ClientPublisherApp( descriptor = descriptor_tmp; server_locator.kind = LOCATOR_KIND_TCPv4; - eprosima::fastrtps::rtps::IPLocator::setLogicalPort(server_locator, server_port); - eprosima::fastrtps::rtps::IPLocator::setIPv4(server_locator, ip_server_address); + eprosima::fastdds::rtps::IPLocator::setLogicalPort(server_locator, server_port); + eprosima::fastdds::rtps::IPLocator::setIPv4(server_locator, ip_server_address); break; } @@ -131,8 +131,8 @@ ClientPublisherApp::ClientPublisherApp( descriptor = descriptor_tmp; server_locator.kind = LOCATOR_KIND_TCPv6; - eprosima::fastrtps::rtps::IPLocator::setLogicalPort(server_locator, server_port); - eprosima::fastrtps::rtps::IPLocator::setIPv6(server_locator, ip_server_address); + eprosima::fastdds::rtps::IPLocator::setLogicalPort(server_locator, server_port); + eprosima::fastdds::rtps::IPLocator::setIPv6(server_locator, ip_server_address); break; } @@ -142,7 +142,7 @@ ClientPublisherApp::ClientPublisherApp( // Set participant as DS CLIENT pqos.wire_protocol().builtin.discovery_config.discoveryProtocol = - eprosima::fastrtps::rtps::DiscoveryProtocol_t::CLIENT; + eprosima::fastdds::rtps::DiscoveryProtocol::CLIENT; // Add remote SERVER to CLIENT's list of SERVERs pqos.wire_protocol().builtin.discovery_config.m_DiscoveryServers.push_back(server_locator); diff --git a/examples/cpp/discovery_server/ClientSubscriberApp.cpp b/examples/cpp/discovery_server/ClientSubscriberApp.cpp index f75ab6d79ba..8f50af191a1 100644 --- a/examples/cpp/discovery_server/ClientSubscriberApp.cpp +++ b/examples/cpp/discovery_server/ClientSubscriberApp.cpp @@ -77,7 +77,7 @@ ClientSubscriberApp::ClientSubscriberApp( // Create DS SERVER locator eprosima::fastdds::rtps::Locator server_locator; - eprosima::fastrtps::rtps::IPLocator::setPhysicalPort(server_locator, server_port); + eprosima::fastdds::rtps::IPLocator::setPhysicalPort(server_locator, server_port); std::shared_ptr descriptor; @@ -95,7 +95,7 @@ ClientSubscriberApp::ClientSubscriberApp( descriptor = descriptor_tmp; server_locator.kind = LOCATOR_KIND_UDPv4; - eprosima::fastrtps::rtps::IPLocator::setIPv4(server_locator, ip_server_address); + eprosima::fastdds::rtps::IPLocator::setIPv4(server_locator, ip_server_address); break; } @@ -106,7 +106,7 @@ ClientSubscriberApp::ClientSubscriberApp( descriptor = descriptor_tmp; server_locator.kind = LOCATOR_KIND_UDPv6; - eprosima::fastrtps::rtps::IPLocator::setIPv6(server_locator, ip_server_address); + eprosima::fastdds::rtps::IPLocator::setIPv6(server_locator, ip_server_address); break; } @@ -119,8 +119,8 @@ ClientSubscriberApp::ClientSubscriberApp( descriptor = descriptor_tmp; server_locator.kind = LOCATOR_KIND_TCPv4; - eprosima::fastrtps::rtps::IPLocator::setLogicalPort(server_locator, server_port); - eprosima::fastrtps::rtps::IPLocator::setIPv4(server_locator, ip_server_address); + eprosima::fastdds::rtps::IPLocator::setLogicalPort(server_locator, server_port); + eprosima::fastdds::rtps::IPLocator::setIPv4(server_locator, ip_server_address); break; } @@ -133,8 +133,8 @@ ClientSubscriberApp::ClientSubscriberApp( descriptor = descriptor_tmp; server_locator.kind = LOCATOR_KIND_TCPv6; - eprosima::fastrtps::rtps::IPLocator::setLogicalPort(server_locator, server_port); - eprosima::fastrtps::rtps::IPLocator::setIPv6(server_locator, ip_server_address); + eprosima::fastdds::rtps::IPLocator::setLogicalPort(server_locator, server_port); + eprosima::fastdds::rtps::IPLocator::setIPv6(server_locator, ip_server_address); break; } @@ -144,7 +144,7 @@ ClientSubscriberApp::ClientSubscriberApp( // Set participant as DS CLIENT pqos.wire_protocol().builtin.discovery_config.discoveryProtocol = - eprosima::fastrtps::rtps::DiscoveryProtocol_t::CLIENT; + eprosima::fastdds::rtps::DiscoveryProtocol::CLIENT; // Add remote SERVER to CLIENT's list of SERVERs pqos.wire_protocol().builtin.discovery_config.m_DiscoveryServers.push_back(server_locator); diff --git a/examples/cpp/discovery_server/HelloWorldPubSubTypes.cxx b/examples/cpp/discovery_server/HelloWorldPubSubTypes.cxx index aa161b2e163..a73cf0ffa55 100644 --- a/examples/cpp/discovery_server/HelloWorldPubSubTypes.cxx +++ b/examples/cpp/discovery_server/HelloWorldPubSubTypes.cxx @@ -27,8 +27,8 @@ #include "HelloWorldCdrAux.hpp" #include "HelloWorldTypeObjectSupport.hpp" -using SerializedPayload_t = eprosima::fastrtps::rtps::SerializedPayload_t; -using InstanceHandle_t = eprosima::fastrtps::rtps::InstanceHandle_t; +using SerializedPayload_t = eprosima::fastdds::rtps::SerializedPayload_t; +using InstanceHandle_t = eprosima::fastdds::rtps::InstanceHandle_t; using DataRepresentationId_t = eprosima::fastdds::dds::DataRepresentationId_t; HelloWorldPubSubType::HelloWorldPubSubType() diff --git a/examples/cpp/discovery_server/HelloWorldPubSubTypes.h b/examples/cpp/discovery_server/HelloWorldPubSubTypes.h index 7c83d2b300b..f048c9be28e 100644 --- a/examples/cpp/discovery_server/HelloWorldPubSubTypes.h +++ b/examples/cpp/discovery_server/HelloWorldPubSubTypes.h @@ -54,18 +54,18 @@ class HelloWorldPubSubType : public eprosima::fastdds::dds::TopicDataType eProsima_user_DllExport bool serialize( void* data, - eprosima::fastrtps::rtps::SerializedPayload_t* payload) override + eprosima::fastdds::rtps::SerializedPayload_t* payload) override { return serialize(data, payload, eprosima::fastdds::dds::DEFAULT_DATA_REPRESENTATION); } eProsima_user_DllExport bool serialize( void* data, - eprosima::fastrtps::rtps::SerializedPayload_t* payload, + eprosima::fastdds::rtps::SerializedPayload_t* payload, eprosima::fastdds::dds::DataRepresentationId_t data_representation) override; eProsima_user_DllExport bool deserialize( - eprosima::fastrtps::rtps::SerializedPayload_t* payload, + eprosima::fastdds::rtps::SerializedPayload_t* payload, void* data) override; eProsima_user_DllExport std::function getSerializedSizeProvider( @@ -80,7 +80,7 @@ class HelloWorldPubSubType : public eprosima::fastdds::dds::TopicDataType eProsima_user_DllExport bool getKey( void* data, - eprosima::fastrtps::rtps::InstanceHandle_t* ihandle, + eprosima::fastdds::rtps::InstanceHandle_t* ihandle, bool force_md5 = false) override; eProsima_user_DllExport void* createData() override; diff --git a/examples/cpp/discovery_server/Helpers.hpp b/examples/cpp/discovery_server/Helpers.hpp index 3b602e640f1..fdbe4328192 100644 --- a/examples/cpp/discovery_server/Helpers.hpp +++ b/examples/cpp/discovery_server/Helpers.hpp @@ -33,15 +33,15 @@ enum class TransportKind : uint8_t SHM, }; -inline eprosima::fastrtps::rtps::GuidPrefix_t get_discovery_server_guid_from_id( +inline eprosima::fastdds::rtps::GuidPrefix_t get_discovery_server_guid_from_id( unsigned short id) { - eprosima::fastrtps::rtps::GuidPrefix_t result; + eprosima::fastdds::rtps::GuidPrefix_t result; // Get default DS guid and modify the one value expected to be changed std::istringstream(eprosima::fastdds::rtps::DEFAULT_ROS2_SERVER_GUIDPREFIX) >> result; result.value[2] = - static_cast(id); // This is done like this in Fast + static_cast(id); // This is done like this in Fast return result; } @@ -49,7 +49,7 @@ inline eprosima::fastrtps::rtps::GuidPrefix_t get_discovery_server_guid_from_id( inline bool is_ip( const std::string ip_str) { - return eprosima::fastrtps::rtps::IPLocator::isIPv4(ip_str) || eprosima::fastrtps::rtps::IPLocator::isIPv6(ip_str); + return eprosima::fastdds::rtps::IPLocator::isIPv4(ip_str) || eprosima::fastdds::rtps::IPLocator::isIPv6(ip_str); } inline std::string get_ip_from_dns( @@ -57,7 +57,7 @@ inline std::string get_ip_from_dns( TransportKind kind) { std::pair, std::set> dns_response = - eprosima::fastrtps::rtps::IPLocator::resolveNameDNS(domain_name); + eprosima::fastdds::rtps::IPLocator::resolveNameDNS(domain_name); if (kind == TransportKind::UDPv4 || kind == TransportKind::TCPv4) { diff --git a/examples/cpp/discovery_server/ServerApp.cpp b/examples/cpp/discovery_server/ServerApp.cpp index 53c8eedbad2..e6fced2ce83 100644 --- a/examples/cpp/discovery_server/ServerApp.cpp +++ b/examples/cpp/discovery_server/ServerApp.cpp @@ -80,8 +80,8 @@ ServerApp::ServerApp( // Create DS SERVER locator eprosima::fastdds::rtps::Locator listening_locator; eprosima::fastdds::rtps::Locator connection_locator; - eprosima::fastrtps::rtps::IPLocator::setPhysicalPort(listening_locator, config.listening_port); - eprosima::fastrtps::rtps::IPLocator::setPhysicalPort(connection_locator, config.connection_port); + eprosima::fastdds::rtps::IPLocator::setPhysicalPort(listening_locator, config.listening_port); + eprosima::fastdds::rtps::IPLocator::setPhysicalPort(connection_locator, config.connection_port); std::shared_ptr descriptor; @@ -99,9 +99,9 @@ ServerApp::ServerApp( descriptor = descriptor_tmp; listening_locator.kind = LOCATOR_KIND_UDPv4; - eprosima::fastrtps::rtps::IPLocator::setIPv4(listening_locator, ip_listening_address); + eprosima::fastdds::rtps::IPLocator::setIPv4(listening_locator, ip_listening_address); connection_locator.kind = LOCATOR_KIND_UDPv4; - eprosima::fastrtps::rtps::IPLocator::setIPv4(connection_locator, ip_connection_address); + eprosima::fastdds::rtps::IPLocator::setIPv4(connection_locator, ip_connection_address); break; } @@ -111,9 +111,9 @@ ServerApp::ServerApp( descriptor = descriptor_tmp; listening_locator.kind = LOCATOR_KIND_UDPv6; - eprosima::fastrtps::rtps::IPLocator::setIPv6(listening_locator, ip_listening_address); + eprosima::fastdds::rtps::IPLocator::setIPv6(listening_locator, ip_listening_address); connection_locator.kind = LOCATOR_KIND_UDPv6; - eprosima::fastrtps::rtps::IPLocator::setIPv6(connection_locator, ip_connection_address); + eprosima::fastdds::rtps::IPLocator::setIPv6(connection_locator, ip_connection_address); break; } @@ -124,11 +124,11 @@ ServerApp::ServerApp( descriptor = descriptor_tmp; listening_locator.kind = LOCATOR_KIND_TCPv4; - eprosima::fastrtps::rtps::IPLocator::setLogicalPort(listening_locator, config.listening_port); - eprosima::fastrtps::rtps::IPLocator::setIPv4(listening_locator, ip_listening_address); + eprosima::fastdds::rtps::IPLocator::setLogicalPort(listening_locator, config.listening_port); + eprosima::fastdds::rtps::IPLocator::setIPv4(listening_locator, ip_listening_address); connection_locator.kind = LOCATOR_KIND_TCPv4; - eprosima::fastrtps::rtps::IPLocator::setIPv4(connection_locator, ip_connection_address); - eprosima::fastrtps::rtps::IPLocator::setLogicalPort(connection_locator, config.connection_port); + eprosima::fastdds::rtps::IPLocator::setIPv4(connection_locator, ip_connection_address); + eprosima::fastdds::rtps::IPLocator::setLogicalPort(connection_locator, config.connection_port); break; } @@ -139,11 +139,11 @@ ServerApp::ServerApp( descriptor = descriptor_tmp; listening_locator.kind = LOCATOR_KIND_TCPv6; - eprosima::fastrtps::rtps::IPLocator::setLogicalPort(listening_locator, config.listening_port); - eprosima::fastrtps::rtps::IPLocator::setIPv6(listening_locator, ip_listening_address); + eprosima::fastdds::rtps::IPLocator::setLogicalPort(listening_locator, config.listening_port); + eprosima::fastdds::rtps::IPLocator::setIPv6(listening_locator, ip_listening_address); connection_locator.kind = LOCATOR_KIND_TCPv6; - eprosima::fastrtps::rtps::IPLocator::setIPv6(connection_locator, ip_connection_address); - eprosima::fastrtps::rtps::IPLocator::setLogicalPort(connection_locator, config.connection_port); + eprosima::fastdds::rtps::IPLocator::setIPv6(connection_locator, ip_connection_address); + eprosima::fastdds::rtps::IPLocator::setLogicalPort(connection_locator, config.connection_port); break; } @@ -156,7 +156,7 @@ ServerApp::ServerApp( // Set participant as SERVER pqos.wire_protocol().builtin.discovery_config.discoveryProtocol = - eprosima::fastrtps::rtps::DiscoveryProtocol_t::SERVER; + eprosima::fastdds::rtps::DiscoveryProtocol::SERVER; // Set SERVER's listening locator for PDP pqos.wire_protocol().builtin.metatrafficUnicastLocatorList.push_back(listening_locator); @@ -210,17 +210,17 @@ ServerApp::~ServerApp() void ServerApp::on_participant_discovery( DomainParticipant*, - fastrtps::rtps::ParticipantDiscoveryInfo&& info, + fastdds::rtps::ParticipantDiscoveryInfo&& info, bool& should_be_ignored) { static_cast(should_be_ignored); - if (info.status == eprosima::fastrtps::rtps::ParticipantDiscoveryInfo::DISCOVERED_PARTICIPANT) + if (info.status == eprosima::fastdds::rtps::ParticipantDiscoveryInfo::DISCOVERED_PARTICIPANT) { std::cout << "Discovered Participant with GUID " << info.info.m_guid << std::endl; ++matched_; } - else if (info.status == eprosima::fastrtps::rtps::ParticipantDiscoveryInfo::DROPPED_PARTICIPANT || - info.status == eprosima::fastrtps::rtps::ParticipantDiscoveryInfo::REMOVED_PARTICIPANT) + else if (info.status == eprosima::fastdds::rtps::ParticipantDiscoveryInfo::DROPPED_PARTICIPANT || + info.status == eprosima::fastdds::rtps::ParticipantDiscoveryInfo::REMOVED_PARTICIPANT) { std::cout << "Dropped Participant with GUID " << info.info.m_guid << std::endl; --matched_; diff --git a/examples/cpp/discovery_server/ServerApp.hpp b/examples/cpp/discovery_server/ServerApp.hpp index 54d7b52438f..d0d1be4280c 100644 --- a/examples/cpp/discovery_server/ServerApp.hpp +++ b/examples/cpp/discovery_server/ServerApp.hpp @@ -49,7 +49,7 @@ class ServerApp : public Application, public DomainParticipantListener //! Publisher matched method void on_participant_discovery( DomainParticipant* participant, - fastrtps::rtps::ParticipantDiscoveryInfo&& info, + fastdds::rtps::ParticipantDiscoveryInfo&& info, bool& should_be_ignored) override; //! Run publisher