Class PortBasedTransportDescriptor

Inheritance Relationships

Base Type

Derived Types

Class Documentation

class PortBasedTransportDescriptor : public eprosima::fastdds::rtps::TransportDescriptorInterface

Base class for all port based transport descriptors

This class provides a common thread settings configuration for all port based transport descriptor implementations

Subclassed by eprosima::fastdds::rtps::SharedMemTransportDescriptor, eprosima::fastdds::rtps::SocketTransportDescriptor

Public Types

using ReceptionThreadsConfigMap = std::map<uint32_t, ThreadSettings>

Public Functions

RTPS_DllAPI PortBasedTransportDescriptor(uint32_t maximumMessageSize, uint32_t maximumInitialPeersRange)

Constructor.

RTPS_DllAPI PortBasedTransportDescriptor(const PortBasedTransportDescriptor &t) = default

Copy constructor.

RTPS_DllAPI PortBasedTransportDescriptor & operator= (const PortBasedTransportDescriptor &t)=default

Copy assignment.

virtual RTPS_DllAPI ~PortBasedTransportDescriptor() = default

Destructor.

bool RTPS_DllAPI operator== (const PortBasedTransportDescriptor &t) const

Comparison operator.

virtual RTPS_DllAPI const ThreadSettings & get_thread_config_for_port (uint32_t port) const

Get the ThreadSettings for a specific port.

This function first looks for the port-specific ThreadSettings in the user-configured reception threads map, i.e. the collection of ThreadSettings returned by reception_threads(). If the ThreadSettings are found within said map, then get_thread_config_for_port() returns them; else it returns the default reception thread settings, i.e. the ThreadSettings returned by default_reception_threads().

Warning

This function will return the default reception thread ThreadSettings when called with a non-default, non-user-configured port.

Parameters:

port – The port to which the returned ThreadSetting apply.

Returns:

The ThreadSettings for the given port.

virtual RTPS_DllAPI bool set_thread_config_for_port (const uint32_t &port, const ThreadSettings &thread_settings)
RTPS_DllAPI const ThreadSettings & default_reception_threads () const

Returns the ThreadSettings for the default reception threads.

virtual RTPS_DllAPI void default_reception_threads (const ThreadSettings &default_reception_threads)

Set the ThreadSettings for the default reception threads.

RTPS_DllAPI const ReceptionThreadsConfigMap & reception_threads () const

Returns the ThreadSettings for the user-configured reception threads.

virtual RTPS_DllAPI bool reception_threads (const ReceptionThreadsConfigMap &reception_threads)

Set the ThreadSettings for the user-configured reception threads.

Protected Attributes

ThreadSettings default_reception_threads_

Thread settings for the default reception threads.

ReceptionThreadsConfigMap reception_threads_

Thread settings for the specific reception threads, indexed by port.