Skip to content

Commit ac2911b

Browse files
RTPS reader APIs refactor (#791)
* Refs #21120. Adapt to changes in RTPSReader. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #21120. Use `expects_inline_qos` in XML. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #21120. Add method name to spelling wordlist. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #21120. Snake case for `ReaderTimes`. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> --------- Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
1 parent 34067fa commit ac2911b

10 files changed

Lines changed: 41 additions & 40 deletions

File tree

code/CodeTester.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class MyReaderListener : public ReaderListener
9898
// The incoming message is enclosed within the `change` in the function parameters
9999
printf("%s\n", change->serializedPayload.data);
100100
// Once done, remove the change
101-
reader->getHistory()->remove_change((CacheChange_t*)change);
101+
reader->get_history()->remove_change((CacheChange_t*)change);
102102
}
103103

104104
};

code/DDSCodeTester.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4312,12 +4312,12 @@ void dds_qos_examples()
43124312
{
43134313
//DDS_CHANGE_RTPS_RELIABLE_READER_QOS
43144314
RTPSReliableReaderQos reliable_reader_qos;
4315-
//The RTPSReliableReaderQos is default constructed with initialAcknackDelay = 70 ms
4316-
//Change the initialAcknackDelay to 70 nanoseconds
4317-
reliable_reader_qos.times.initialAcknackDelay = {0, 70};
4318-
//The RTPSReliableWriterQos is default constructed with heartbeatResponseDelay = 5 ms
4319-
//Change the heartbeatResponseDelay to 5 nanoseconds
4320-
reliable_reader_qos.times.heartbeatResponseDelay = {0, 5};
4315+
//The RTPSReliableReaderQos is default constructed with initial_acknack_delay = 70 ms
4316+
//Change the initial_acknack_delay to 70 nanoseconds
4317+
reliable_reader_qos.times.initial_acknack_delay = {0, 70};
4318+
//The RTPSReliableWriterQos is default constructed with heartbeat_response_delay = 5 ms
4319+
//Change the heartbeat_response_delay to 5 nanoseconds
4320+
reliable_reader_qos.times.heartbeat_response_delay = {0, 5};
43214321
//You can also change the DisablePositiveACKsQosPolicy. For further details see DisablePositiveACKsQosPolicy section.
43224322
reliable_reader_qos.disable_positive_ACKs.enabled = true;
43234323
//!--

code/StaticTester.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<reader>
77
<userId>3</userId>
88
<entityID>4</entityID>
9-
<expectsInlineQos>true</expectsInlineQos>
9+
<expects_inline_qos>true</expects_inline_qos>
1010
<topicName>HelloWorldTopic</topicName>
1111
<topicDataType>HelloWorld</topicDataType>
1212
<topicKind>WITH_KEY</topicKind>

code/XMLTester.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1791,13 +1791,13 @@
17911791
</qos>
17921792

17931793
<times> <!-- readerTimesType -->
1794-
<initialAcknackDelay>
1794+
<initial_acknack_delay>
17951795
<nanosec>70</nanosec>
1796-
</initialAcknackDelay>
1796+
</initial_acknack_delay>
17971797

1798-
<heartbeatResponseDelay>
1798+
<heartbeat_response_delay>
17991799
<nanosec>5</nanosec>
1800-
</heartbeatResponseDelay>
1800+
</heartbeat_response_delay>
18011801
</times>
18021802

18031803
<unicastLocatorList>
@@ -1828,7 +1828,7 @@
18281828

18291829
<ignore_non_matching_locators>true</ignore_non_matching_locators>
18301830

1831-
<expectsInlineQos>true</expectsInlineQos>
1831+
<expects_inline_qos>true</expects_inline_qos>
18321832

18331833
<historyMemoryPolicy>DYNAMIC</historyMemoryPolicy>
18341834

@@ -3799,12 +3799,12 @@
37993799
<!-->XML_RTPS_RELIABLE_READER_QOS<-->
38003800
<data_reader profile_name="sub_profile_name">
38013801
<times> <!-- readerTimesType -->
3802-
<initialAcknackDelay> <!-- DURATION -->
3802+
<initial_acknack_delay> <!-- DURATION -->
38033803
<nanosec>70</nanosec>
3804-
</initialAcknackDelay>
3805-
<heartbeatResponseDelay> <!-- DURATION -->
3804+
</initial_acknack_delay>
3805+
<heartbeat_response_delay> <!-- DURATION -->
38063806
<nanosec>5</nanosec>
3807-
</heartbeatResponseDelay>
3807+
</heartbeat_response_delay>
38083808
</times>
38093809
<!--You can also change the values of DisablePositiveACKsQosPolicy.-->
38103810
<!--See DisablePositiveACKsQosPolicy section for further details-->

code/XMLTesterExample.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -772,14 +772,14 @@
772772
</qos>
773773

774774
<times>
775-
<initialAcknackDelay>
775+
<initial_acknack_delay>
776776
<sec>1</sec>
777777
<nanosec>856000</nanosec>
778-
</initialAcknackDelay>
779-
<heartbeatResponseDelay>
778+
</initial_acknack_delay>
779+
<heartbeat_response_delay>
780780
<sec>1</sec>
781781
<nanosec>856000</nanosec>
782-
</heartbeatResponseDelay>
782+
</heartbeat_response_delay>
783783
</times>
784784

785785
<unicastLocatorList>
@@ -842,7 +842,7 @@
842842
</external_unicast_locators>
843843

844844
<ignore_non_matching_locators>true</ignore_non_matching_locators>
845-
<expectsInlineQos>true</expectsInlineQos>
845+
<expects_inline_qos>true</expects_inline_qos>
846846
<historyMemoryPolicy>DYNAMIC</historyMemoryPolicy>
847847

848848
<propertiesPolicy>

docs/03-exports/aliases-api.include

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -529,8 +529,8 @@
529529
.. |SendBuffersAllocationAttributes::dynamic-api| replace:: :cpp:member:`dynamic<eprosima::fastrtps::rtps::SendBuffersAllocationAttributes::dynamic>`
530530

531531
.. |ReaderTimes-api| replace:: :cpp:class:`ReaderTimes<eprosima::fastrtps::rtps::ReaderTimes>`
532-
.. |ReaderTimes::initialAcknackDelay-api| replace:: :cpp:member:`initialAcknackDelay<eprosima::fastrtps::rtps::ReaderTimes::initialAcknackDelay>`
533-
.. |ReaderTimes::heartbeatResponseDelay-api| replace:: :cpp:member:`heartbeatResponseDelay<eprosima::fastrtps::rtps::ReaderTimes::heartbeatResponseDelay>`
532+
.. |ReaderTimes::initial_acknack_delay-api| replace:: :cpp:member:`initial_acknack_delay<eprosima::fastrtps::rtps::ReaderTimes::initial_acknack_delay>`
533+
.. |ReaderTimes::heartbeat_response_delay-api| replace:: :cpp:member:`heartbeat_response_delay<eprosima::fastrtps::rtps::ReaderTimes::heartbeat_response_delay>`
534534

535535
.. |RTPSReliableWriterQos-api| replace:: :cpp:class:`RTPSReliableWriterQos<eprosima::fastdds::dds::RTPSReliableWriterQos>`
536536
.. |RTPSReliableWriterQos::times-api| replace:: :cpp:member:`times<eprosima::fastdds::dds::RTPSReliableWriterQos::times>`

docs/fastdds/api_reference/spelling_wordlist.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ config
7373
const
7474
ContentFilteredTopic
7575
Contructs
76+
createRTPSReader
7677
datareader
7778
DataReader
7879
DataReaderListener
@@ -103,7 +104,7 @@ Endianness
103104
entityId
104105
Enum
105106
eprosima
106-
expectsInlineQos
107+
expects_inline_qos
107108
ExtendedAnnotationParameterValuePubSubType
108109
ExtendedTypeDefnPubSubType
109110
fastdds
@@ -120,12 +121,12 @@ GuidPrefix
120121
hashid
121122
Hashid
122123
heartbeatPeriod
123-
heartbeatResponseDelay
124+
heartbeat_response_delay
124125
HistoryQosPolicy
125126
InconsistentTopicStatus
126127
Implementers
127128
infos
128-
initialAcknackDelay
129+
initial_acknack_delay
129130
initialHeartbeatDelay
130131
inlined
131132
instanceHandle

docs/fastdds/dds_layer/core/policy/eprosimaExtensions.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -760,14 +760,14 @@ List of structure members:
760760
+-----------------------------------------------------------------------------------+------------------+---------------+
761761
| Member Name | Type | Default Value |
762762
+===================================================================================+==================+===============+
763-
| |ReaderTimes::initialAcknackDelay-api| | |Duration_t-api| | 70 ms |
763+
| |ReaderTimes::initial_acknack_delay-api| | |Duration_t-api| | 70 ms |
764764
+-----------------------------------------------------------------------------------+------------------+---------------+
765-
| |ReaderTimes::heartbeatResponseDelay-api| | |Duration_t-api| | 5 ms |
765+
| |ReaderTimes::heartbeat_response_delay-api| | |Duration_t-api| | 5 ms |
766766
+-----------------------------------------------------------------------------------+------------------+---------------+
767767

768-
* |ReaderTimes::initialAcknackDelay-api|:
768+
* |ReaderTimes::initial_acknack_delay-api|:
769769
Defines the duration of the initial acknack delay.
770-
* |ReaderTimes::heartbeatResponseDelay-api|:
770+
* |ReaderTimes::heartbeat_response_delay-api|:
771771
Establishes the duration of the delay applied when a heartbeat message is received.
772772

773773
Example

docs/fastdds/discovery/static.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ A full example of such file can be found in :ref:`static_xml_example`.
9898
- EntityId of the DataReader/DataWriter.
9999
- ``uint16_t``
100100
- 0
101-
* - ``<expectsInlineQos>``
101+
* - ``<expects_inline_qos>``
102102
- It indicates if QOS is expected inline |br|
103103
(DataReader **only**).
104104
- ``bool``

docs/fastdds/xml_configuration/datareader.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ The DataReader configuration is performed through the XML elements listed in the
8282
announced by this DataReader.
8383
- ``bool``
8484
- false
85-
* - ``<expectsInlineQos>``
85+
* - ``<expects_inline_qos>``
8686
- It indicates if QoS is expected inline.
8787
- ``bool``
8888
- ``false``
@@ -136,10 +136,10 @@ ReaderTimes
136136

137137
These parameters are included within :ref:`rtpsreliablereaderqos` in the :ref:`readertimes` structure.
138138

139-
+------------------------------+-------------------------------------------------------+---------------------+---------+
140-
| Name | Description | Values | Default |
141-
+==============================+=======================================================+=====================+=========+
142-
| ``<initialAcknackDelay>`` | Initial ACKNACK delay. | :ref:`DurationType` | 70 ms |
143-
+------------------------------+-------------------------------------------------------+---------------------+---------+
144-
| ``<heartbeatResponseDelay>`` | Response time delay when receiving a Heartbeat. | :ref:`DurationType` | 5 ms |
145-
+------------------------------+-------------------------------------------------------+---------------------+---------+
139+
+--------------------------------+-----------------------------------------------------+---------------------+---------+
140+
| Name | Description | Values | Default |
141+
+================================+=====================================================+=====================+=========+
142+
| ``<initial_acknack_delay>`` | Initial ACKNACK delay. | :ref:`DurationType` | 70 ms |
143+
+--------------------------------+-----------------------------------------------------+---------------------+---------+
144+
| ``<heartbeat_response_delay>`` | Response time delay when receiving a Heartbeat. | :ref:`DurationType` | 5 ms |
145+
+--------------------------------+-----------------------------------------------------+---------------------+---------+

0 commit comments

Comments
 (0)