diff --git a/code/DDSCodeTester.cpp b/code/DDSCodeTester.cpp index 13eef2ecc..2e0cc99ee 100644 --- a/code/DDSCodeTester.cpp +++ b/code/DDSCodeTester.cpp @@ -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; + } //!-- } @@ -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; + } //!-- } diff --git a/docs/03-exports/aliases-api.include b/docs/03-exports/aliases-api.include index 6999c6d18..6443ae772 100644 --- a/docs/03-exports/aliases-api.include +++ b/docs/03-exports/aliases-api.include @@ -815,6 +815,8 @@ .. |TOPIC_QOS_DEFAULT-api| replace:: :cpp:member:`TOPIC_QOS_DEFAULT ` .. |DATAWRITER_QOS_DEFAULT-api| replace:: :cpp:member:`DATAWRITER_QOS_DEFAULT ` .. |DATAREADER_QOS_DEFAULT-api| replace:: :cpp:member:`DATAREADER_QOS_DEFAULT ` +.. |DATAWRITER_QOS_USE_TOPIC_QOS-api| replace:: :cpp:member:`DATAWRITER_QOS_USE_TOPIC_QOS ` +.. |DATAREADER_QOS_USE_TOPIC_QOS-api| replace:: :cpp:member:`DATAREADER_QOS_USE_TOPIC_QOS ` .. |DomainId-api| replace:: :cpp:type:`DomainId ` .. |c_InstanceHandle_Unknown-api| replace:: :cpp:member:`c_InstanceHandle_Unknown ` diff --git a/docs/fastdds/api_reference/dds_pim/publisher/datawriterqos.rst b/docs/fastdds/api_reference/dds_pim/publisher/datawriterqos.rst index d9cd5bdeb..4faad4809 100644 --- a/docs/fastdds/api_reference/dds_pim/publisher/datawriterqos.rst +++ b/docs/fastdds/api_reference/dds_pim/publisher/datawriterqos.rst @@ -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 diff --git a/docs/fastdds/api_reference/dds_pim/subscriber/datareaderqos.rst b/docs/fastdds/api_reference/dds_pim/subscriber/datareaderqos.rst index 18b404e2b..e936f4d92 100644 --- a/docs/fastdds/api_reference/dds_pim/subscriber/datareaderqos.rst +++ b/docs/fastdds/api_reference/dds_pim/subscriber/datareaderqos.rst @@ -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 diff --git a/docs/fastdds/dds_layer/publisher/dataWriter/createDataWriter.rst b/docs/fastdds/dds_layer/publisher/dataWriter/createDataWriter.rst index 626c2f836..b64445848 100644 --- a/docs/fastdds/dds_layer/publisher/dataWriter/createDataWriter.rst +++ b/docs/fastdds/dds_layer/publisher/dataWriter/createDataWriter.rst @@ -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: diff --git a/docs/fastdds/dds_layer/subscriber/dataReader/createDataReader.rst b/docs/fastdds/dds_layer/subscriber/dataReader/createDataReader.rst index fdc2d2ae0..3c7550671 100644 --- a/docs/fastdds/dds_layer/subscriber/dataReader/createDataReader.rst +++ b/docs/fastdds/dds_layer/subscriber/dataReader/createDataReader.rst @@ -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: diff --git a/docs/fastdds/python_api_reference/dds_pim/publisher/datawriterqos.rst b/docs/fastdds/python_api_reference/dds_pim/publisher/datawriterqos.rst index 44ad05b63..afbc3195f 100644 --- a/docs/fastdds/python_api_reference/dds_pim/publisher/datawriterqos.rst +++ b/docs/fastdds/python_api_reference/dds_pim/publisher/datawriterqos.rst @@ -8,3 +8,5 @@ DataWriterQos .. autoclass:: fastdds.DataWriterQos .. autoclass:: fastdds.DATAWRITER_QOS_DEFAULT + +.. autoclass:: fastdds.DATAWRITER_QOS_USE_TOPIC_QOS diff --git a/docs/fastdds/python_api_reference/dds_pim/subscriber/datareaderqos.rst b/docs/fastdds/python_api_reference/dds_pim/subscriber/datareaderqos.rst index 8f5842cf6..5d50a7abc 100644 --- a/docs/fastdds/python_api_reference/dds_pim/subscriber/datareaderqos.rst +++ b/docs/fastdds/python_api_reference/dds_pim/subscriber/datareaderqos.rst @@ -8,3 +8,5 @@ DataReaderQos .. autoclass:: fastdds.DataReaderQos .. autoclass:: fastdds.DATAREADER_QOS_DEFAULT + +.. autoclass:: fastdds.DATAREADER_QOS_USE_TOPIC_QOS diff --git a/docs/spelling_wordlist.txt b/docs/spelling_wordlist.txt index a55b5a24d..142df4750 100644 --- a/docs/spelling_wordlist.txt +++ b/docs/spelling_wordlist.txt @@ -76,6 +76,7 @@ datarate datareaders datasharing Datasharing +DDSEntityStatus de deallocate deallocated