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

Unique network flows [10624] #1772

Merged
merged 3 commits into from
Mar 1, 2021
Merged
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 examples/C++/DDS/Benchmark/BenchmarkSubscriber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <fastdds/dds/publisher/qos/DataWriterQos.hpp>
#include <fastdds/dds/subscriber/qos/DataReaderQos.hpp>
#include <fastdds/dds/subscriber/SampleInfo.hpp>
#include <fastdds/rtps/common/Locator.h>
#include <fastdds/rtps/transport/TCPv4TransportDescriptor.h>
#include <fastdds/rtps/transport/TCPv6TransportDescriptor.h>

Expand All @@ -31,7 +32,6 @@
using namespace eprosima::fastdds::dds;
using namespace eprosima::fastdds::rtps;

using Locator_t = eprosima::fastrtps::rtps::Locator_t;
using IPLocator = eprosima::fastrtps::rtps::IPLocator;

BenchMarkSubscriber::BenchMarkSubscriber()
Expand Down Expand Up @@ -74,7 +74,7 @@ bool BenchMarkSubscriber::init(
{
int32_t kind = LOCATOR_KIND_TCPv4;

Locator_t initial_peer_locator;
Locator initial_peer_locator;
initial_peer_locator.kind = kind;
IPLocator::setIPv4(initial_peer_locator, "127.0.0.1");
initial_peer_locator.port = 5100;
Expand All @@ -95,7 +95,7 @@ bool BenchMarkSubscriber::init(
uint32_t kind = LOCATOR_KIND_TCPv6;
pqos.transport().use_builtin_transports = false;

Locator_t initial_peer_locator;
Locator initial_peer_locator;
initial_peer_locator.kind = kind;
IPLocator::setIPv6(initial_peer_locator, "::1");
initial_peer_locator.port = 5100;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
using namespace eprosima::fastdds::dds;
using namespace eprosima::fastdds::rtps;

using Locator_t = eprosima::fastrtps::rtps::Locator_t;
using IPLocator = eprosima::fastrtps::rtps::IPLocator;

HelloWorldSubscriber::HelloWorldSubscriber()
Expand All @@ -49,7 +48,7 @@ bool HelloWorldSubscriber::init(
DomainParticipantQos pqos;
int32_t kind = LOCATOR_KIND_TCPv4;

Locator_t initial_peer_locator;
Locator initial_peer_locator;
initial_peer_locator.kind = kind;

std::shared_ptr<TCPv4TransportDescriptor> descriptor = std::make_shared<TCPv4TransportDescriptor>();
Expand Down
4 changes: 2 additions & 2 deletions include/fastdds/dds/core/policy/ParameterTypes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ class ParameterLocator_t : public Parameter_t
public:

//!Locator
fastrtps::rtps::Locator_t locator;
rtps::Locator locator;

/**
* @brief Constructor without parameters
Expand Down Expand Up @@ -263,7 +263,7 @@ class ParameterLocator_t : public Parameter_t
ParameterLocator_t(
ParameterId_t pid,
uint16_t in_length,
const fastrtps::rtps::Locator_t& loc)
const rtps::Locator& loc)
: Parameter_t(pid, in_length)
, locator(loc)
{
Expand Down
19 changes: 11 additions & 8 deletions include/fastdds/dds/core/policy/QosPolicies.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,17 @@
#define _FASTDDS_DDS_QOS_QOSPOLICIES_HPP_

#include <vector>
#include <fastdds/rtps/common/Types.h>
#include <fastdds/rtps/common/Time_t.h>

#include <fastdds/dds/core/policy/ParameterTypes.hpp>

#include <fastdds/rtps/attributes/PropertyPolicy.h>
#include <fastdds/rtps/attributes/RTPSParticipantAllocationAttributes.hpp>
#include <fastdds/rtps/attributes/RTPSParticipantAttributes.h>
#include <fastdds/rtps/common/LocatorList.hpp>
#include <fastdds/rtps/common/Types.h>
#include <fastdds/rtps/common/Time_t.h>
#include <fastdds/rtps/resources/ResourceManagement.h>
#include <fastdds/rtps/attributes/PropertyPolicy.h>

#include <fastrtps/types/TypeObject.h>
#include <fastrtps/utils/collections/ResourceLimitedVector.hpp>

Expand Down Expand Up @@ -2621,13 +2624,13 @@ class WireProtocolConfigQos : public QosPolicy
* Default list of Unicast Locators to be used for any Endpoint defined inside this RTPSParticipant in the case
* that it was defined with NO UnicastLocators. At least ONE locator should be included in this list.
*/
fastrtps::rtps::LocatorList_t default_unicast_locator_list;
rtps::LocatorList default_unicast_locator_list;

/**
* Default list of Multicast Locators to be used for any Endpoint defined inside this RTPSParticipant in the
* case that it was defined with NO UnicastLocators. This is usually left empty.
*/
fastrtps::rtps::LocatorList_t default_multicast_locator_list;
rtps::LocatorList default_multicast_locator_list;
};

//! Qos Policy to configure the transport layer
Expand Down Expand Up @@ -2711,13 +2714,13 @@ class RTPSEndpointQos
}

//!Unicast locator list
fastrtps::rtps::LocatorList_t unicast_locator_list;
rtps::LocatorList unicast_locator_list;

//!Multicast locator list
fastrtps::rtps::LocatorList_t multicast_locator_list;
rtps::LocatorList multicast_locator_list;

//!Remote locator list
fastrtps::rtps::LocatorList_t remote_locator_list;
rtps::LocatorList remote_locator_list;

//!User Defined ID, used for StaticEndpointDiscovery. <br> By default, -1.
int16_t user_defined_id;
Expand Down
21 changes: 16 additions & 5 deletions include/fastdds/dds/publisher/DataWriter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,25 @@
#include <fastdds/dds/core/status/PublicationMatchedStatus.hpp>
#include <fastdds/dds/core/status/StatusMask.hpp>
#include <fastdds/dds/publisher/qos/DataWriterQos.hpp>

#include <fastdds/rtps/common/LocatorList.hpp>
#include <fastdds/rtps/common/Time_t.h>

#include <fastrtps/fastrtps_dll.h>

#include <fastrtps/qos/DeadlineMissedStatus.h>
#include <fastrtps/types/TypesBase.h>

using eprosima::fastrtps::types::ReturnCode_t;

namespace eprosima {
namespace fastrtps {

class TopicAttributes;

namespace rtps {

class WriteParams;
class WriterAttributes;
struct GUID_t;

} // namespace rtps

} // namespace fastrtps

namespace fastdds {
Expand Down Expand Up @@ -514,6 +514,17 @@ class DataWriter : public DomainEntity
RTPS_DllAPI ReturnCode_t discard_loan(
void*& sample);

/**
* @brief Get the list of locators from which this DataWriter may send data.
*
* @param [out] locators LocatorList where the list of locators will be stored.
*
* @return NOT_ENABLED if the reader has not been enabled.
* @return OK if a list of locators is returned.
*/
RTPS_DllAPI ReturnCode_t get_sending_locators(
rtps::LocatorList& locators) const;

protected:

DataWriterImpl* impl_;
Expand Down
19 changes: 15 additions & 4 deletions include/fastdds/dds/subscriber/DataReader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
#include <fastdds/dds/core/status/SubscriptionMatchedStatus.hpp>
#include <fastdds/dds/subscriber/SampleInfo.hpp>
#include <fastdds/dds/topic/TypeSupport.hpp>

#include <fastrtps/fastrtps_dll.h>

#include <fastdds/rtps/common/LocatorList.hpp>
#include <fastdds/rtps/common/Time_t.h>

#include <fastrtps/types/TypesBase.h>
Expand All @@ -51,11 +55,7 @@ class DataReader;

namespace eprosima {
namespace fastrtps {

class TopicAttributes;

namespace rtps {
class ReaderAttributes;
struct GUID_t;
} // namespace rtps
} // namespace fastrtps
Expand Down Expand Up @@ -995,6 +995,17 @@ class DataReader : public DomainEntity
const void* data,
const SampleInfo* info) const;

/**
* Get the list of locators on which this DataReader is listening.
*
* @param [out] locators LocatorList where the list of locators will be stored.
*
* @return NOT_ENABLED if the reader has not been enabled.
* @return OK if a list of locators is returned.
*/
RTPS_DllAPI ReturnCode_t get_listening_locators(
rtps::LocatorList& locators) const;

protected:

DataReaderImpl* impl_;
Expand Down
4 changes: 2 additions & 2 deletions include/fastdds/rtps/attributes/ServerAttributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ class RemoteServerAttributes
}

//!Metatraffic Unicast Locator List
fastrtps::rtps::LocatorList_t metatrafficUnicastLocatorList;
LocatorList metatrafficUnicastLocatorList;
//!Metatraffic Multicast Locator List.
fastrtps::rtps::LocatorList_t metatrafficMulticastLocatorList;
LocatorList metatrafficMulticastLocatorList;

//!Guid prefix
fastrtps::rtps::GuidPrefix_t guidPrefix;
Expand Down
Loading