Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[20861] Add DATAREADER_QOS_USE_TOPIC_QOS and DATAWRITER_QOS_USE_TOPIC_QOS #752

Merged
merged 1 commit into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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