From ac2911bdbfe24b179f99dbb2543feaeecfd8f2ea Mon Sep 17 00:00:00 2001 From: Miguel Company Date: Tue, 11 Jun 2024 15:32:12 +0200 Subject: [PATCH] RTPS reader APIs refactor (#791) * Refs #21120. Adapt to changes in RTPSReader. Signed-off-by: Miguel Company * Refs #21120. Use `expects_inline_qos` in XML. Signed-off-by: Miguel Company * Refs #21120. Add method name to spelling wordlist. Signed-off-by: Miguel Company * Refs #21120. Snake case for `ReaderTimes`. Signed-off-by: Miguel Company --------- Signed-off-by: Miguel Company --- code/CodeTester.cpp | 2 +- code/DDSCodeTester.cpp | 12 ++++++------ code/StaticTester.xml | 2 +- code/XMLTester.xml | 18 +++++++++--------- code/XMLTesterExample.xml | 10 +++++----- docs/03-exports/aliases-api.include | 4 ++-- .../api_reference/spelling_wordlist.txt | 7 ++++--- .../core/policy/eprosimaExtensions.rst | 8 ++++---- docs/fastdds/discovery/static.rst | 2 +- docs/fastdds/xml_configuration/datareader.rst | 16 ++++++++-------- 10 files changed, 41 insertions(+), 40 deletions(-) diff --git a/code/CodeTester.cpp b/code/CodeTester.cpp index 91adf58bd..4909cbba3 100644 --- a/code/CodeTester.cpp +++ b/code/CodeTester.cpp @@ -98,7 +98,7 @@ class MyReaderListener : public ReaderListener // The incoming message is enclosed within the `change` in the function parameters printf("%s\n", change->serializedPayload.data); // Once done, remove the change - reader->getHistory()->remove_change((CacheChange_t*)change); + reader->get_history()->remove_change((CacheChange_t*)change); } }; diff --git a/code/DDSCodeTester.cpp b/code/DDSCodeTester.cpp index ce75eb0f8..550376d9b 100644 --- a/code/DDSCodeTester.cpp +++ b/code/DDSCodeTester.cpp @@ -4312,12 +4312,12 @@ void dds_qos_examples() { //DDS_CHANGE_RTPS_RELIABLE_READER_QOS RTPSReliableReaderQos reliable_reader_qos; - //The RTPSReliableReaderQos is default constructed with initialAcknackDelay = 70 ms - //Change the initialAcknackDelay to 70 nanoseconds - reliable_reader_qos.times.initialAcknackDelay = {0, 70}; - //The RTPSReliableWriterQos is default constructed with heartbeatResponseDelay = 5 ms - //Change the heartbeatResponseDelay to 5 nanoseconds - reliable_reader_qos.times.heartbeatResponseDelay = {0, 5}; + //The RTPSReliableReaderQos is default constructed with initial_acknack_delay = 70 ms + //Change the initial_acknack_delay to 70 nanoseconds + reliable_reader_qos.times.initial_acknack_delay = {0, 70}; + //The RTPSReliableWriterQos is default constructed with heartbeat_response_delay = 5 ms + //Change the heartbeat_response_delay to 5 nanoseconds + reliable_reader_qos.times.heartbeat_response_delay = {0, 5}; //You can also change the DisablePositiveACKsQosPolicy. For further details see DisablePositiveACKsQosPolicy section. reliable_reader_qos.disable_positive_ACKs.enabled = true; //!-- diff --git a/code/StaticTester.xml b/code/StaticTester.xml index e18eafd70..456af0caf 100644 --- a/code/StaticTester.xml +++ b/code/StaticTester.xml @@ -6,7 +6,7 @@ 3 4 - true + true HelloWorldTopic HelloWorld WITH_KEY diff --git a/code/XMLTester.xml b/code/XMLTester.xml index 0cf8094be..f024e72a2 100644 --- a/code/XMLTester.xml +++ b/code/XMLTester.xml @@ -1791,13 +1791,13 @@ - + 70 - + - + 5 - + @@ -1828,7 +1828,7 @@ true - true + true DYNAMIC @@ -3799,12 +3799,12 @@ XML_RTPS_RELIABLE_READER_QOS<--> - + 70 - - + + 5 - + diff --git a/code/XMLTesterExample.xml b/code/XMLTesterExample.xml index 805cb84f4..19ae6840d 100644 --- a/code/XMLTesterExample.xml +++ b/code/XMLTesterExample.xml @@ -772,14 +772,14 @@ - + 1 856000 - - + + 1 856000 - + @@ -842,7 +842,7 @@ true - true + true DYNAMIC diff --git a/docs/03-exports/aliases-api.include b/docs/03-exports/aliases-api.include index de7b5b1c7..3257d8490 100644 --- a/docs/03-exports/aliases-api.include +++ b/docs/03-exports/aliases-api.include @@ -529,8 +529,8 @@ .. |SendBuffersAllocationAttributes::dynamic-api| replace:: :cpp:member:`dynamic` .. |ReaderTimes-api| replace:: :cpp:class:`ReaderTimes` -.. |ReaderTimes::initialAcknackDelay-api| replace:: :cpp:member:`initialAcknackDelay` -.. |ReaderTimes::heartbeatResponseDelay-api| replace:: :cpp:member:`heartbeatResponseDelay` +.. |ReaderTimes::initial_acknack_delay-api| replace:: :cpp:member:`initial_acknack_delay` +.. |ReaderTimes::heartbeat_response_delay-api| replace:: :cpp:member:`heartbeat_response_delay` .. |RTPSReliableWriterQos-api| replace:: :cpp:class:`RTPSReliableWriterQos` .. |RTPSReliableWriterQos::times-api| replace:: :cpp:member:`times` diff --git a/docs/fastdds/api_reference/spelling_wordlist.txt b/docs/fastdds/api_reference/spelling_wordlist.txt index 7c94e704f..c536acb05 100644 --- a/docs/fastdds/api_reference/spelling_wordlist.txt +++ b/docs/fastdds/api_reference/spelling_wordlist.txt @@ -73,6 +73,7 @@ config const ContentFilteredTopic Contructs +createRTPSReader datareader DataReader DataReaderListener @@ -103,7 +104,7 @@ Endianness entityId Enum eprosima -expectsInlineQos +expects_inline_qos ExtendedAnnotationParameterValuePubSubType ExtendedTypeDefnPubSubType fastdds @@ -120,12 +121,12 @@ GuidPrefix hashid Hashid heartbeatPeriod -heartbeatResponseDelay +heartbeat_response_delay HistoryQosPolicy InconsistentTopicStatus Implementers infos -initialAcknackDelay +initial_acknack_delay initialHeartbeatDelay inlined instanceHandle diff --git a/docs/fastdds/dds_layer/core/policy/eprosimaExtensions.rst b/docs/fastdds/dds_layer/core/policy/eprosimaExtensions.rst index 02269044a..d45d069d5 100644 --- a/docs/fastdds/dds_layer/core/policy/eprosimaExtensions.rst +++ b/docs/fastdds/dds_layer/core/policy/eprosimaExtensions.rst @@ -760,14 +760,14 @@ List of structure members: +-----------------------------------------------------------------------------------+------------------+---------------+ | Member Name | Type | Default Value | +===================================================================================+==================+===============+ -| |ReaderTimes::initialAcknackDelay-api| | |Duration_t-api| | 70 ms | +| |ReaderTimes::initial_acknack_delay-api| | |Duration_t-api| | 70 ms | +-----------------------------------------------------------------------------------+------------------+---------------+ -| |ReaderTimes::heartbeatResponseDelay-api| | |Duration_t-api| | 5 ms | +| |ReaderTimes::heartbeat_response_delay-api| | |Duration_t-api| | 5 ms | +-----------------------------------------------------------------------------------+------------------+---------------+ -* |ReaderTimes::initialAcknackDelay-api|: +* |ReaderTimes::initial_acknack_delay-api|: Defines the duration of the initial acknack delay. -* |ReaderTimes::heartbeatResponseDelay-api|: +* |ReaderTimes::heartbeat_response_delay-api|: Establishes the duration of the delay applied when a heartbeat message is received. Example diff --git a/docs/fastdds/discovery/static.rst b/docs/fastdds/discovery/static.rst index e893ec78b..a64b609e8 100644 --- a/docs/fastdds/discovery/static.rst +++ b/docs/fastdds/discovery/static.rst @@ -98,7 +98,7 @@ A full example of such file can be found in :ref:`static_xml_example`. - EntityId of the DataReader/DataWriter. - ``uint16_t`` - 0 - * - ```` + * - ```` - It indicates if QOS is expected inline |br| (DataReader **only**). - ``bool`` diff --git a/docs/fastdds/xml_configuration/datareader.rst b/docs/fastdds/xml_configuration/datareader.rst index 6ac59c267..91f7892ea 100644 --- a/docs/fastdds/xml_configuration/datareader.rst +++ b/docs/fastdds/xml_configuration/datareader.rst @@ -82,7 +82,7 @@ The DataReader configuration is performed through the XML elements listed in the announced by this DataReader. - ``bool`` - false - * - ```` + * - ```` - It indicates if QoS is expected inline. - ``bool`` - ``false`` @@ -136,10 +136,10 @@ ReaderTimes These parameters are included within :ref:`rtpsreliablereaderqos` in the :ref:`readertimes` structure. -+------------------------------+-------------------------------------------------------+---------------------+---------+ -| Name | Description | Values | Default | -+==============================+=======================================================+=====================+=========+ -| ```` | Initial ACKNACK delay. | :ref:`DurationType` | 70 ms | -+------------------------------+-------------------------------------------------------+---------------------+---------+ -| ```` | Response time delay when receiving a Heartbeat. | :ref:`DurationType` | 5 ms | -+------------------------------+-------------------------------------------------------+---------------------+---------+ ++--------------------------------+-----------------------------------------------------+---------------------+---------+ +| Name | Description | Values | Default | ++================================+=====================================================+=====================+=========+ +| ```` | Initial ACKNACK delay. | :ref:`DurationType` | 70 ms | ++--------------------------------+-----------------------------------------------------+---------------------+---------+ +| ```` | Response time delay when receiving a Heartbeat. | :ref:`DurationType` | 5 ms | ++--------------------------------+-----------------------------------------------------+---------------------+---------+