Skip to content

Commit

Permalink
Add DATAREADER_QOS_USE_TOPIC_QOS and DATAWRITER_QOS_USE_TOPIC_QOS doc (
Browse files Browse the repository at this point in the history
…#752)

Signed-off-by: elianalf <[email protected]>
  • Loading branch information
elianalf authored May 7, 2024
1 parent 9c2519c commit 2d19ef6
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 0 deletions.
24 changes: 24 additions & 0 deletions code/DDSCodeTester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2571,6 +2571,18 @@ void dds_dataWriter_examples()
// Error
return;
}

// Create a DataWriter with default QoS and a custom TopicQos.
// The value DATAWRITER_QOS_USE_TOPIC_QOS is used to denote the default QoS
// and to override the TopicQos.
Topic* topic;
DataWriter* data_writer_with_default_qos_and_custom_topic_qos =
publisher->create_datawriter(topic, DATAWRITER_QOS_USE_TOPIC_QOS);
if (nullptr == data_writer_with_default_qos_and_custom_topic_qos)
{
// Error
return;
}
//!--
}

Expand Down Expand Up @@ -3364,6 +3376,18 @@ void dds_dataReader_examples()
// Error
return;
}

// Create a DataReader with default QoS and a custom TopicQos.
// The value DATAREADER_QOS_USE_TOPIC_QOS is used to denote the default QoS
// and to override the TopicQos.
Topic* topic;
DataReader* data_reader_with_default_qos_and_custom_topic_qos =
subscriber->create_datareader(topic, DATAREADER_QOS_USE_TOPIC_QOS);
if (nullptr == data_reader_with_default_qos_and_custom_topic_qos)
{
// Error
return;
}
//!--
}

Expand Down
2 changes: 2 additions & 0 deletions docs/03-exports/aliases-api.include
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,8 @@
.. |TOPIC_QOS_DEFAULT-api| replace:: :cpp:member:`TOPIC_QOS_DEFAULT <eprosima::fastdds::dds::TOPIC_QOS_DEFAULT>`
.. |DATAWRITER_QOS_DEFAULT-api| replace:: :cpp:member:`DATAWRITER_QOS_DEFAULT <eprosima::fastdds::dds::DATAWRITER_QOS_DEFAULT>`
.. |DATAREADER_QOS_DEFAULT-api| replace:: :cpp:member:`DATAREADER_QOS_DEFAULT <eprosima::fastdds::dds::DATAREADER_QOS_DEFAULT>`
.. |DATAWRITER_QOS_USE_TOPIC_QOS-api| replace:: :cpp:member:`DATAWRITER_QOS_USE_TOPIC_QOS <eprosima::fastdds::dds::DATAWRITER_QOS_USE_TOPIC_QOS>`
.. |DATAREADER_QOS_USE_TOPIC_QOS-api| replace:: :cpp:member:`DATAREADER_QOS_USE_TOPIC_QOS <eprosima::fastdds::dds::DATAREADER_QOS_USE_TOPIC_QOS>`

.. |DomainId-api| replace:: :cpp:type:`DomainId <eprosima::fastdds::dds::DomainId_t>`
.. |c_InstanceHandle_Unknown-api| replace:: :cpp:member:`c_InstanceHandle_Unknown <eprosima::fastrtps::rtps::c_InstanceHandle_Unknown>`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ DataWriterQos

.. doxygenvariable:: eprosima::fastdds::dds::DATAWRITER_QOS_DEFAULT
:project: FastDDS

.. doxygenvariable:: eprosima::fastdds::dds::DATAWRITER_QOS_USE_TOPIC_QOS
:project: FastDDS
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ DataReaderQos

.. doxygenvariable:: eprosima::fastdds::dds::DATAREADER_QOS_DEFAULT
:project: FastDDS

.. doxygenvariable:: eprosima::fastdds::dds::DATAREADER_QOS_USE_TOPIC_QOS
:project: FastDDS
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ Mandatory arguments are:
* The :ref:`dds_layer_publisher_dataWriterQos` describing the behavior of the DataWriter.
If the provided value is :class:`DATAWRITER_QOS_DEFAULT`,
the value of the :ref:`dds_layer_defaultDataWriterQos` is used.
If the provided value is :class:`DATAWRITER_QOS_USE_TOPIC_QOS`,
the values of the default QoS and the provided TopicQoS are used, whereby any policy
that is set on the TopicQoS overrides the corresponding policy on the default QoS.

Optional arguments are:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ Mandatory arguments are:
* The :ref:`dds_layer_subscriber_dataReaderQos` describing the behavior of the DataReader.
If the provided value is :class:`DATAREADER_QOS_DEFAULT`,
the value of the :ref:`dds_layer_defaultDataReaderQos` is used.
If the provided value is :class:`DATAREADER_QOS_USE_TOPIC_QOS`,
the values of the default QoS and the provided TopicQoS are used, whereby any policy
that is set on the TopicQoS overrides the corresponding policy on the default QoS.

Optional arguments are:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ DataWriterQos
.. autoclass:: fastdds.DataWriterQos

.. autoclass:: fastdds.DATAWRITER_QOS_DEFAULT

.. autoclass:: fastdds.DATAWRITER_QOS_USE_TOPIC_QOS
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ DataReaderQos
.. autoclass:: fastdds.DataReaderQos

.. autoclass:: fastdds.DATAREADER_QOS_DEFAULT

.. autoclass:: fastdds.DATAREADER_QOS_USE_TOPIC_QOS
1 change: 1 addition & 0 deletions docs/spelling_wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ datarate
datareaders
datasharing
Datasharing
DDSEntityStatus
de
deallocate
deallocated
Expand Down

0 comments on commit 2d19ef6

Please sign in to comment.