20#ifndef FASTDDS_RTPS_TRANSPORT__CHAININGTRANSPORT_HPP
21#define FASTDDS_RTPS_TRANSPORT__CHAININGTRANSPORT_HPP
26#include "TransportInterface.hpp"
27#include "ChainingTransportDescriptor.hpp"
33class ChainingReceiverResource;
44 ChainingReceiverResource* p);
49 std::unique_ptr<ChainingReceiverResource, ChainingReceiverResourceDeleter>;
81 FASTDDS_EXPORTED_API
bool init(
83 const uint32_t& max_msg_size_no_frag = 0)
override
127 uint32_t max_message_size)
override;
225 uint32_t metatraffic_multicast_port)
const override
227 return low_level_transport_->getDefaultMetatrafficMulticastLocators(locators, metatraffic_multicast_port);
236 uint32_t metatraffic_unicast_port)
const override
238 return low_level_transport_->getDefaultMetatrafficUnicastLocators(locators, metatraffic_unicast_port);
247 uint32_t unicast_port)
const override
258 uint32_t metatraffic_multicast_port)
const override
260 return low_level_transport_->fillMetatrafficMulticastLocator(locator, metatraffic_multicast_port);
269 uint32_t metatraffic_unicast_port)
const override
293 uint32_t well_known_port)
const override
334 FASTDDS_EXPORTED_API
virtual bool send(
336 const std::vector<NetworkBuffer>& buffers,
337 uint32_t total_bytes,
340 const std::chrono::steady_clock::time_point& timeout) = 0;
360 uint32_t receive_buffer_size,
375 bool allowed_remote_localhost,
376 bool allowed_local_localhost)
const override
378 return low_level_transport_->transform_remote_locator(remote_locator, result_locator, allowed_remote_localhost,
379 allowed_local_localhost);
408 std::map<fastdds::rtps::Locator_t, ChainingReceiverResourceReferenceType> receiver_resources_;
This is the base class for chaining adapter transports.
Definition ChainingTransport.hpp:59
FASTDDS_EXPORTED_API bool fillUnicastLocator(fastdds::rtps::Locator_t &locator, uint32_t well_known_port) const override
Call the low-level transport fillUnicastLocator().
Definition ChainingTransport.hpp:291
FASTDDS_EXPORTED_API bool init(const fastdds::rtps::PropertyPolicy *properties=nullptr, const uint32_t &max_msg_size_no_frag=0) override
Initialize the low-level transport.
Definition ChainingTransport.hpp:81
FASTDDS_EXPORTED_API bool OpenInputChannel(const fastdds::rtps::Locator_t &loc, TransportReceiverInterface *receiver_interface, uint32_t max_message_size) override
Call the low-level transport OpenInputChannel().
FASTDDS_EXPORTED_API uint32_t max_recv_buffer_size() const override
Call the low-level transport max_recv_buffer_size().
Definition ChainingTransport.hpp:311
FASTDDS_EXPORTED_API bool fillMetatrafficMulticastLocator(fastdds::rtps::Locator_t &locator, uint32_t metatraffic_multicast_port) const override
Call the low-level transport fillMetatrafficMulticastLocator().
Definition ChainingTransport.hpp:256
virtual FASTDDS_EXPORTED_API void receive(TransportReceiverInterface *next_receiver, const fastdds::rtps::octet *receive_buffer, uint32_t receive_buffer_size, const fastdds::rtps::Locator_t &local_locator, const fastdds::rtps::Locator_t &remote_locator)=0
Blocking Receive from the specified channel.
FASTDDS_EXPORTED_API bool fillMetatrafficUnicastLocator(fastdds::rtps::Locator_t &locator, uint32_t metatraffic_unicast_port) const override
Call the low-level transport fillMetatrafficUnicastLocator().
Definition ChainingTransport.hpp:267
FASTDDS_EXPORTED_API fastdds::rtps::LocatorList_t NormalizeLocator(const fastdds::rtps::Locator_t &locator) override
Call the low-level transport NormalizeLocator().
Definition ChainingTransport.hpp:154
FASTDDS_EXPORTED_API bool getDefaultMetatrafficMulticastLocators(fastdds::rtps::LocatorList_t &locators, uint32_t metatraffic_multicast_port) const override
Call the low-level transport getDefaultMetatrafficMulticastLocators().
Definition ChainingTransport.hpp:223
FASTDDS_EXPORTED_API bool transform_remote_locator(const fastdds::rtps::Locator_t &remote_locator, fastdds::rtps::Locator_t &result_locator, bool allowed_remote_localhost, bool allowed_local_localhost) const override
Call the low-level transport transform_remote_locator().
Definition ChainingTransport.hpp:372
FASTDDS_EXPORTED_API bool OpenOutputChannel(SendResourceList &sender_resource_list, const fastdds::rtps::Locator_t &loc) override
Call the low-level transport OpenOutputChannel().
virtual FASTDDS_EXPORTED_API ~ChainingTransport()=default
Destructor.
FASTDDS_EXPORTED_API void update_network_interfaces() override
Update network interfaces.
Definition ChainingTransport.hpp:364
FASTDDS_EXPORTED_API void AddDefaultOutputLocator(fastdds::rtps::LocatorList_t &defaultList) override
Call the low-level transport AddDefaultOutputLocator().
Definition ChainingTransport.hpp:213
FASTDDS_EXPORTED_API bool CloseInputChannel(const fastdds::rtps::Locator_t &loc) override
Call the low-level transport CloseInputChannel().
Definition ChainingTransport.hpp:144
FASTDDS_EXPORTED_API bool IsLocatorSupported(const fastdds::rtps::Locator_t &loc) const override
Call the low-level transport IsLocatorSupported().
Definition ChainingTransport.hpp:103
FASTDDS_EXPORTED_API bool is_locator_allowed(const fastdds::rtps::Locator_t &locator) const override
Call the low-level transport is_locator_allowed().
Definition ChainingTransport.hpp:386
FASTDDS_EXPORTED_API bool configureInitialPeerLocator(fastdds::rtps::Locator_t &locator, const fastdds::rtps::PortParameters &port_params, uint32_t domainId, fastdds::rtps::LocatorList_t &list) const override
Call the low-level transport configureInitialPeerLocator().
Definition ChainingTransport.hpp:278
FASTDDS_EXPORTED_API bool is_locator_reachable(const fastdds::rtps::Locator_t &locator) override
Call the low-level transport is_locator_reachable().
Definition ChainingTransport.hpp:396
FASTDDS_EXPORTED_API void select_locators(fastdds::rtps::LocatorSelector &selector) const override
Call the low-level transport select_locators().
Definition ChainingTransport.hpp:203
std::unique_ptr< TransportInterface > low_level_transport_
Definition ChainingTransport.hpp:404
virtual FASTDDS_EXPORTED_API bool send(fastdds::rtps::SenderResource *low_sender_resource, const std::vector< NetworkBuffer > &buffers, uint32_t total_bytes, fastdds::rtps::LocatorsIterator *destination_locators_begin, fastdds::rtps::LocatorsIterator *destination_locators_end, const std::chrono::steady_clock::time_point &timeout)=0
Blocking Send through the specified channel.
FASTDDS_EXPORTED_API bool DoInputLocatorsMatch(const fastdds::rtps::Locator_t &locator_1, const fastdds::rtps::Locator_t &locator_2) const override
Call the low-level transport DoInputLocatorsMatch().
Definition ChainingTransport.hpp:192
FASTDDS_EXPORTED_API bool is_localhost_allowed() const override
Call the low-level transport is_localhost_allowed().
Definition ChainingTransport.hpp:174
FASTDDS_EXPORTED_API bool getDefaultMetatrafficUnicastLocators(fastdds::rtps::LocatorList_t &locators, uint32_t metatraffic_unicast_port) const override
Call the low-level transport getDefaultMetatrafficUnicastLocators().
Definition ChainingTransport.hpp:234
FASTDDS_EXPORTED_API bool IsInputChannelOpen(const fastdds::rtps::Locator_t &loc) const override
Call the low-level transport IsInputChannelOpen().
Definition ChainingTransport.hpp:93
FASTDDS_EXPORTED_API NetmaskFilterInfo netmask_filter_info() const override
Call the low-level transport netmask_filter_info().
Definition ChainingTransport.hpp:183
FASTDDS_EXPORTED_API bool is_local_locator(const fastdds::rtps::Locator_t &locator) const override
Call the low-level transport is_local_locator().
Definition ChainingTransport.hpp:164
FASTDDS_EXPORTED_API ChainingTransport(const ChainingTransportDescriptor &t)
Constructor.
Definition ChainingTransport.hpp:64
FASTDDS_EXPORTED_API bool getDefaultUnicastLocators(fastdds::rtps::LocatorList_t &locators, uint32_t unicast_port) const override
Call the low-level transport getDefaultUnicastLocators().
Definition ChainingTransport.hpp:245
FASTDDS_EXPORTED_API fastdds::rtps::Locator_t RemoteToMainLocal(const fastdds::rtps::Locator_t &loc) const override
Call the low-level transport RemoteToMainLocal().
Definition ChainingTransport.hpp:113
FASTDDS_EXPORTED_API bool transform_remote_locator(const fastdds::rtps::Locator_t &remote_locator, fastdds::rtps::Locator_t &result_locator) const override
Call the low-level transport transform_remote_locator().
Definition ChainingTransport.hpp:300
Class Locator_t, uniquely identifies a communication channel for a particular transport.
Definition Locator.hpp:71
Class LocatorList, a Locator vector that doesn't allow duplicates.
Definition LocatorList.hpp:97
A class used for the efficient selection of locators when sending data to multiple entities.
Definition LocatorSelector.hpp:55
Class PortParameters, to define the port parameters and gains related with the RTPS protocol.
Definition PortParameters.hpp:35
Definition PropertyPolicy.hpp:30
RAII object that encapsulates the Send operation over one chanel in an unknown transport.
Definition SenderResource.hpp:49
Interface against which to implement a transport layer, decoupled from Fast DDS internals.
Definition TransportInterface.hpp:64
int32_t transport_kind_
Definition TransportInterface.hpp:339
int32_t kind() const
Return the transport kind.
Definition TransportInterface.hpp:290
Interface against which to implement a data receiver, decoupled from transport internals.
Definition TransportReceiverInterface.hpp:34
std::vector< std::unique_ptr< fastdds::rtps::SenderResource > > SendResourceList
Definition TransportInterface.hpp:52
unsigned char octet
Definition Types.hpp:83
std::unique_ptr< ChainingReceiverResource, ChainingReceiverResourceDeleter > ChainingReceiverResourceReferenceType
Type of the unique_ptr of a ChainingReceiverResource .
Definition ChainingTransport.hpp:48
std::pair< NetmaskFilterKind, std::vector< AllowedNetworkInterface > > NetmaskFilterInfo
Definition TransportInterface.hpp:53
Deleter for a ChainingReceiverResource.
Definition ChainingTransport.hpp:42
void operator()(ChainingReceiverResource *p)
Base class for the descriptors of chaining transports.
Definition ChainingTransportDescriptor.hpp:43
Provides a Locator's iterator interface that can be used by different Locator's containers.
Definition LocatorsIterator.hpp:33