From be2e1bec0f55b7685363609339318a2f1af8ec58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Ferreira=20Gonz=C3=A1lez?= Date: Tue, 2 Sep 2025 08:44:32 +0200 Subject: [PATCH] Add missing fields to transport descriptor documentation (#1111) * Refs #23592: Add missing field to transport descriptor Signed-off-by: cferreiragonz * Refs #23592: Remove unneeded include Signed-off-by: cferreiragonz --------- Signed-off-by: cferreiragonz (cherry picked from commit 76a3e66bc67b47b898a65f699268a6a25c499c0c) --- code/XMLTester.xml | 20 ++ docs/fastdds/xml_configuration/transports.rst | 256 ++++++++++-------- 2 files changed, 161 insertions(+), 115 deletions(-) diff --git a/code/XMLTester.xml b/code/XMLTester.xml index 46e7f57cd..63617ba79 100644 --- a/code/XMLTester.xml +++ b/code/XMLTester.xml @@ -4035,6 +4035,26 @@ 512 1000 rtsp_messages.log + + -1 + 0 + 0 + -1 + + + + -1 + 0 + 0 + -1 + + + + -1 + 0 + 0 + -1 + diff --git a/docs/fastdds/xml_configuration/transports.rst b/docs/fastdds/xml_configuration/transports.rst index 919633f0a..70c46df5c 100644 --- a/docs/fastdds/xml_configuration/transports.rst +++ b/docs/fastdds/xml_configuration/transports.rst @@ -23,120 +23,146 @@ The following table lists all the available XML elements that can be defined wit element for the configuration of the transport layer. A more detailed explanation of each of these elements can be found in :ref:`comm-transports-configuration`. -+-------------------------------+----------------------------------------------------+----------------------+----------+ -| Name | Description | Values | Default | -+===============================+====================================================+======================+==========+ -| ```` | Unique name to identify each transport | ``string`` | | -| | descriptor. | | | -+-------------------------------+----------------------------------------------------+----------------------+----------+ -| ```` | Type of the transport descriptor. | UDPv4 | UDPv4 | -| | +----------------------+ | -| | | UDPv6 | | -| | +----------------------+ | -| | | TCPv4 | | -| | +----------------------+ | -| | | TCPv6 | | -| | +----------------------+ | -| | | SHM | | -+-------------------------------+----------------------------------------------------+----------------------+----------+ -| ```` | Size in bytes of the send socket buffer. | ``uint32_t`` | 0 | -| | If the value is zero then *Fast DDS* will use | | | -| | the system default socket size. | | | -+-------------------------------+----------------------------------------------------+----------------------+----------+ -| ```` | Size in bytes of the reception socket | ``uint32_t`` | 0 | -| | buffer. If the value is zero then *Fast DDS* | | | -| | will use the system default socket size. | | | -+-------------------------------+----------------------------------------------------+----------------------+----------+ -| ```` | The maximum size in bytes of the transport's | ``uint32_t`` | 65500 | -| | message buffer. | | | -+-------------------------------+----------------------------------------------------+----------------------+----------+ -| ```` | Number of channels opened with each initial | ``uint32_t`` | 4 | -| | remote peer. | | | -+-------------------------------+----------------------------------------------------+----------------------+----------+ -| ```` | Transport's :ref:`netmask_filtering` | OFF | AUTO | -| | configuration. +----------------------+ | -| | | AUTO | | -| | +----------------------+ | -| | | ON | | -+-------------------------------+----------------------------------------------------+----------------------+----------+ -| ```` | Allows defining an :ref:`ifaces_config`. | :ref:`ifaces_config` | | -+-------------------------------+----------------------------------------------------+----------------------+----------+ -| ```` | Allows defining an interfaces |whitelist|. | |whitelist| | | -+-------------------------------+----------------------------------------------------+----------------------+----------+ -| ```` | *Time To Live* (**UDP only**). See | ``uint8_t`` | 1 | -| | :ref:`transport_udp_udp`. | | | -+-------------------------------+----------------------------------------------------+----------------------+----------+ -| ```` | Whether to set the non-blocking send mode on | ``bool`` | ``false``| -| | the socket (**NOT available for SHM type**). See | | | -| | :ref:`transport_udp_transportDescriptor` and | | | -| | :ref:`transport_tcp_transportDescriptor`. | | | -+-------------------------------+----------------------------------------------------+----------------------+----------+ -| ```` | Port used for output bound. | ``uint16_t`` | 0 | -| | If this field isn't defined, the output port | | | -| | will be random (**UDP only**). | | | -+-------------------------------+----------------------------------------------------+----------------------+----------+ -| ```` | Public WAN address when using **TCPv4** | IPv4 formatted | | -| | **transports**. This field is optional if the | ``string``: | | -| | transport doesn't need to define a WAN | ``XXX.XXX.XXX.XXX`` | | -| | address (**TCPv4 only**). | | | -+-------------------------------+----------------------------------------------------+----------------------+----------+ -| ```` | Frequency in milliseconds for sending | ``uint32_t`` | 50000 | -| | :ref:`RTCP ` | | | -| | keep-alive requests (**TCP only**). | | | -+-------------------------------+----------------------------------------------------+----------------------+----------+ -| ```` | Time in milliseconds since the last | ``uint32_t`` | 10000 | -| | keep-alive request was sent to consider a | | | -| | connection as broken (**TCP only**). | | | -+-------------------------------+----------------------------------------------------+----------------------+----------+ -| ```` | The maximum number of logical ports to try | ``uint16_t`` | 100 | -| | during :ref:`RTCP` | | | -| | negotiations (**TCP only**). | | | -+-------------------------------+----------------------------------------------------+----------------------+----------+ -| ```` | The maximum number of logical ports per | ``uint16_t`` | 20 | -| | request to try during | | | -| | :ref:`RTCP` negotiations | | | -| | (**TCP only**). | | | -+-------------------------------+----------------------------------------------------+----------------------+----------+ -| ```` | Increment between logical ports to try during | ``uint16_t`` | 2 | -| | :ref:`RTCP` negotiation | | | -| | (**TCP only**). | | | -+-------------------------------+----------------------------------------------------+----------------------+----------+ -| ```` | Local port to work as TCP acceptor for input | ``List `` | | -| | connections. If not set, the transport will | | | -| | work as TCP client only. If set to 0, an | | | -| | available port will be automatically assigned | | | -| | (**TCP only**). | | | -+-------------------------------+----------------------------------------------------+----------------------+----------+ -| ```` | Allows to define TLS related parameters and | :ref:`tcp-tls` | | -| | options (**TCP only**). | | | -+-------------------------------+----------------------------------------------------+----------------------+----------+ -| ```` | Calculates the Cyclic Redundancy Code (CRC) | ``bool`` | ``true`` | -| | for error control (**TCP only**). | | | -+-------------------------------+----------------------------------------------------+----------------------+----------+ -| ```` | Check the CRC for error control (**TCP** | ``bool`` | ``true`` | -| | **only**). | | | -+-------------------------------+----------------------------------------------------+----------------------+----------+ -| ```` | Socket option for disabling the Nagle | ``bool`` | ``false``| -| | algorithm. (**TCP only**). | | | -+-------------------------------+----------------------------------------------------+----------------------+----------+ -| ```` | Time to wait for logical port negotiation (in ms) | ``uint32_t`` | ``0`` | -| | (**TCP only**). | | | -+-------------------------------+----------------------------------------------------+----------------------+----------+ -| ```` | Size (in bytes) of the shared-memory segment. | ``uint32_t`` | 262144 | -| | (Optional, **SHM only**). | | | -+-------------------------------+----------------------------------------------------+----------------------+----------+ -| ```` | Capacity (in number of messages) available to | ``uint32_t`` | 512 | -| | every Listener (Optional, **SHM only**). | | | -+-------------------------------+----------------------------------------------------+----------------------+----------+ -| ````| Maximum time-out (in milliseconds) used when | ``uint32_t`` | 1000 | -| | checking whether a Listener is alive | | | -| | (Optional, **SHM only**). | | | -+-------------------------------+----------------------------------------------------+----------------------+----------+ -| ```` | Complete path (including file) where RTPS | ``string`` | Empty | -| | messages will be stored for debugging | | | -| | purposes. An empty string indicates no trace | | | -| | will be performed (Optional, **SHM only**). | | | -+-------------------------------+----------------------------------------------------+----------------------+----------+ +.. list-table:: + :header-rows: 1 + :align: left + + * - Name + - Description + - Values + - Default + * - ```` + - Unique name to identify each transport descriptor. + - ``string`` + - + * - ```` + - Type of the transport descriptor. + - ``UDPv4``, ``UDPv6``, ``TCPv4``, ``TCPv6``, ``SHM`` + - ``UDPv4`` + * - ```` + - Size in bytes of the send socket buffer. If the value is zero, *Fast DDS* will use the system default socket size. + - ``uint32_t`` + - ``0`` + * - ```` + - Size in bytes of the reception socket buffer. If the value is zero, *Fast DDS* will use the system default socket size. + - ``uint32_t`` + - ``0`` + * - ```` + - The maximum size in bytes of the transport's message buffer. + - ``uint32_t`` + - ``65500`` + * - ```` + - Number of channels opened with each initial remote peer. + - ``uint32_t`` + - ``4`` + * - ```` + - Transport's :ref:`netmask_filtering` configuration. + - ``string`` + - ``AUTO`` + * - ```` + - Allows defining an :ref:`ifaces_config`. + - ``string`` + - + * - ```` + - Allows defining an interfaces |whitelist|. + - ``string`` + - + * - ```` + - Time To Live (UDP only). See :ref:`transport_udp_udp`. + - ``uint8_t`` + - ``1`` + * - ```` + - Whether to set the non-blocking send mode on the socket (NOT available for SHM type). See :ref:`transport_udp_transportDescriptor` and :ref:`transport_tcp_transportDescriptor`. + - ``bool`` + - ``false`` + * - ```` + - Port used for output bound. If this field isn't defined, the output port will be random (UDP only). + - ``uint16_t`` + - ``0`` + * - ```` + - Public WAN address when using TCPv4 transports. This field is optional if the transport doesn't need to define a WAN address (TCPv4 only). + - ``string`` + - + * - ```` + - Frequency in milliseconds for sending :ref:`RTCP ` keep-alive requests (TCP only). + - ``uint32_t`` + - ``50000`` + * - ```` + - Time in milliseconds since the last keep-alive request was sent to consider a connection as broken (TCP only). + - ``uint32_t`` + - ``10000`` + * - ```` + - The maximum number of logical ports to try during :ref:`RTCP ` negotiations (TCP only). + - ``uint16_t`` + - ``100`` + * - ```` + - The maximum number of logical ports per request to try during :ref:`RTCP ` negotiations (TCP only). + - ``uint16_t`` + - ``20`` + * - ```` + - Increment between logical ports to try during :ref:`RTCP ` negotiation (TCP only). + - ``uint16_t`` + - ``2`` + * - ```` + - Local port to work as TCP acceptor for input connections. If not set, the transport will work as TCP client only. If set to 0, an available port will be automatically assigned (TCP only). + - ``List`` + - + * - ```` + - Allows to define TLS related parameters and options (TCP only). + - :ref:`tcp-tls` + - + * - ```` + - Calculates the Cyclic Redundancy Code (CRC) for error control (TCP only). + - ``bool`` + - ``true`` + * - ```` + - Check the CRC for error control (TCP only). + - ``bool`` + - ``true`` + * - ```` + - Socket option for disabling the Nagle algorithm (TCP only). + - ``bool`` + - ``false`` + * - ```` + - Time to wait for logical port negotiation (in ms) (TCP only). + - ``uint32_t`` + - ``0`` + * - ```` + - Settings for the keep-alive thread. + - |ThreadSettings| + - + * - ```` + - Settings for the accept thread. + - |ThreadSettings| + - + * - ```` + - Size (in bytes) of the shared-memory segment (Optional, SHM only). + - ``uint32_t`` + - ``262144`` + * - ```` + - Capacity (in number of messages) available to every Listener (Optional, SHM only). + - ``uint32_t`` + - ``512`` + * - ```` + - Maximum time-out (in milliseconds) used when checking whether a Listener is alive (Optional, SHM only). + - ``uint32_t`` + - ``1000`` + * - ```` + - Complete path (including file) where RTPS messages will be stored for debugging purposes. An empty string indicates no trace will be performed (Optional, SHM only). + - ``string`` + - ``Empty`` + * - ```` + - Default |ThreadSettings| for the reception threads. + - |ThreadSettings| + - + * - ```` + - |ThreadSettings| for the reception threads on specific ports. + - ``std::map`` + - + * - ```` + - |ThreadSettings| for the SHM dump thread. + - |ThreadSettings| + - The following XML code shows an example of transport protocol configuration using all configurable parameters. More examples of transports descriptors can be found in the :ref:`comm-transports-configuration` section. @@ -145,7 +171,7 @@ More examples of transports descriptors can be found in the :ref:`comm-transport :language: xml :start-after: :end-before: <--> - :lines: 2-4, 6-50, 52-53 + :lines: 2-4, 6-70, 72-73 .. _rtcpdefinition: