| Fast DDS Version 3.3.0 Fast DDS

Loading...
Searching...
No Matches
PortBasedTransportDescriptor Class Reference
eProsima Fast DDS API Reference » RTPS » Common Module. » Transport Module.

Base class for all port based transport descriptors. More...

`#include <PortBasedTransportDescriptor.hpp>`

Inheritance diagram for PortBasedTransportDescriptor:
[legend]

## Public Types

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

## Public Member Functions

FASTDDS_EXPORTED_API | PortBasedTransportDescriptor (uint32_t maximumMessageSize, uint32_t maximumInitialPeersRange)
| Constructor.
FASTDDS_EXPORTED_API | PortBasedTransportDescriptor (const PortBasedTransportDescriptor &t)=default
| Copy constructor.
FASTDDS_EXPORTED_API PortBasedTransportDescriptor & | operator= (const PortBasedTransportDescriptor &t)=default
| Copy assignment.
virtual FASTDDS_EXPORTED_API | ~PortBasedTransportDescriptor ()=default
| Destructor.
bool FASTDDS_EXPORTED_API | operator== (const PortBasedTransportDescriptor &t) const
| Comparison operator.
virtual FASTDDS_EXPORTED_API const ThreadSettings & | get_thread_config_for_port (uint32_t port) const
| Get the ThreadSettings for a specific port.
virtual FASTDDS_EXPORTED_API bool | set_thread_config_for_port (const uint32_t &port, const ThreadSettings &thread_settings)
FASTDDS_EXPORTED_API const ThreadSettings & | default_reception_threads () const
| Returns the ThreadSettings for the default reception threads.
virtual FASTDDS_EXPORTED_API void | default_reception_threads (const ThreadSettings &default_reception_threads)
| Set the ThreadSettings for the default reception threads.
FASTDDS_EXPORTED_API const ReceptionThreadsConfigMap & | reception_threads () const
| Returns the ThreadSettings for the user-configured reception threads.
virtual FASTDDS_EXPORTED_API bool | reception_threads (const ReceptionThreadsConfigMap &reception_threads)
| Set the ThreadSettings for the user-configured reception threads.
Public Member Functions inherited from TransportDescriptorInterface
FASTDDS_EXPORTED_API | TransportDescriptorInterface (uint32_t maximumMessageSize, uint32_t maximumInitialPeersRange)
| Constructor.
FASTDDS_EXPORTED_API | TransportDescriptorInterface (const TransportDescriptorInterface &t)
| Copy constructor.
FASTDDS_EXPORTED_API TransportDescriptorInterface & | operator= (const TransportDescriptorInterface &t)
| Copy assignment.
virtual FASTDDS_EXPORTED_API | ~TransportDescriptorInterface ()=default
| Destructor.
virtual FASTDDS_EXPORTED_API TransportInterface * | create_transport () const =0
| Factory method pattern.
virtual FASTDDS_EXPORTED_API uint32_t | min_send_buffer_size () const =0
| Returns the minimum size required for a send operation.
virtual FASTDDS_EXPORTED_API uint32_t | max_message_size () const
| Returns the maximum size expected for received messages.
virtual FASTDDS_EXPORTED_API uint32_t | max_initial_peers_range () const
| Returns the maximum number of opened channels for each initial remote peer (maximum number of guessed initial peers to try to connect).
FASTDDS_EXPORTED_API bool | operator== (const TransportDescriptorInterface &t) const
| Comparison operator.
FASTDDS_EXPORTED_API void | lock ()
| Lock internal mutex (for Fast-DDS internal use).
FASTDDS_EXPORTED_API void | unlock ()
| Unlock internal mutex (for Fast-DDS internal use).

## 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.

## Additional Inherited Members

Public Attributes inherited from TransportDescriptorInterface
uint32_t | maxMessageSize
| Maximum size of a single message in the transport.
uint32_t | maxInitialPeersRange
| Number of channels opened with each initial remote peer.

## Detailed Description

Base class for all port based transport descriptors.

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

## Member Typedef Documentation

## ◆ ReceptionThreadsConfigMap

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

## Constructor & Destructor Documentation

## ◆ PortBasedTransportDescriptor() [1/2]

FASTDDS_EXPORTED_API PortBasedTransportDescriptor | ( | uint32_t | maximumMessageSize,
|  | uint32_t | maximumInitialPeersRange )

Constructor.

## ◆ PortBasedTransportDescriptor() [2/2]

FASTDDS_EXPORTED_API PortBasedTransportDescriptor | ( | const PortBasedTransportDescriptor & | t | ) |

default

Copy constructor.

## ◆ ~PortBasedTransportDescriptor()

virtual FASTDDS_EXPORTED_API ~PortBasedTransportDescriptor | ( |  | ) |

virtual default

Destructor.

## Member Function Documentation

## ◆ default_reception_threads() [1/2]

FASTDDS_EXPORTED_API const ThreadSettings & default_reception_threads | ( |  | ) | const

Returns the ThreadSettings for the default reception threads.

## ◆ default_reception_threads() [2/2]

virtual FASTDDS_EXPORTED_API void default_reception_threads | ( | const ThreadSettings & | default_reception_threads | ) |

virtual

Set the ThreadSettings for the default reception threads.

## ◆ get_thread_config_for_port()

virtual FASTDDS_EXPORTED_API const ThreadSettings & get_thread_config_for_port | ( | uint32_t | port | ) | const

virtual

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.

## ◆ operator=()

FASTDDS_EXPORTED_API PortBasedTransportDescriptor & operator= | ( | const PortBasedTransportDescriptor & | t | ) |

default

Copy assignment.

## ◆ operator==()

bool FASTDDS_EXPORTED_API operator== | ( | const PortBasedTransportDescriptor & | t | ) | const

Comparison operator.

## ◆ reception_threads() [1/2]

FASTDDS_EXPORTED_API const ReceptionThreadsConfigMap & reception_threads | ( |  | ) | const

Returns the ThreadSettings for the user-configured reception threads.

## ◆ reception_threads() [2/2]

virtual FASTDDS_EXPORTED_API bool reception_threads | ( | const ReceptionThreadsConfigMap & | reception_threads | ) |

virtual

Set the ThreadSettings for the user-configured reception threads.

## ◆ set_thread_config_for_port()

virtual FASTDDS_EXPORTED_API bool set_thread_config_for_port | ( | const uint32_t & | port,
|  | const ThreadSettings & | thread_settings )

virtual

## Member Data Documentation

## ◆ default_reception_threads_

ThreadSettings default_reception_threads_

protected

Thread settings for the default reception threads.

## ◆ reception_threads_

ReceptionThreadsConfigMap reception_threads_

protected

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

The documentation for this class was generated from the following file:

- include/fastdds/rtps/transport/PortBasedTransportDescriptor.hpp