From 4d3138fbdc2eb38e81fc5e51ed30da2fe207e207 Mon Sep 17 00:00:00 2001 From: danipiza Date: Wed, 18 Nov 2026 13:03:49 +0100 Subject: [PATCH 1/7] [FEATURE] Accept endpoint-qos-mode in XML participants configuration schema Signed-off-by: danipiza --- .../ddsrouter_config_schema.json | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/resources/configurations/ddsrouter_config_schema.json b/resources/configurations/ddsrouter_config_schema.json index 9b15cb6f5..3a6d89c96 100644 --- a/resources/configurations/ddsrouter_config_schema.json +++ b/resources/configurations/ddsrouter_config_schema.json @@ -481,6 +481,13 @@ }, "profile":{ "type":"string" + }, + "endpoint-qos-mode":{ + "type":"string", + "enum":[ + "xml-overridable", + "xml-standalone" + ] } }, "required":[ @@ -559,6 +566,11 @@ "profile":{ "not":{ + } + }, + "endpoint-qos-mode":{ + "not":{ + } } } @@ -623,6 +635,11 @@ "profile":{ "not":{ + } + }, + "endpoint-qos-mode":{ + "not":{ + } } } @@ -714,6 +731,11 @@ "profile":{ "not":{ + } + }, + "endpoint-qos-mode":{ + "not":{ + } } } @@ -790,6 +812,11 @@ "profile":{ "not":{ + } + }, + "endpoint-qos-mode":{ + "not":{ + } } } From 6fd42a19bba71c7649f4517f500c92dfc43f4479 Mon Sep 17 00:00:00 2001 From: danipiza Date: Wed, 18 Nov 2026 13:03:49 +0100 Subject: [PATCH 2/7] [DOCS] Document endpoint-qos-mode of XML participants Signed-off-by: danipiza --- docs/rst/notes/forthcoming_version.rst | 7 ++++ docs/rst/user_manual/configuration.rst | 16 +++++++++ docs/rst/user_manual/participants/xml.rst | 44 ++++++++++++++++++----- 3 files changed, 58 insertions(+), 9 deletions(-) diff --git a/docs/rst/notes/forthcoming_version.rst b/docs/rst/notes/forthcoming_version.rst index eac3087ed..3db38b983 100644 --- a/docs/rst/notes/forthcoming_version.rst +++ b/docs/rst/notes/forthcoming_version.rst @@ -6,3 +6,10 @@ Forthcoming Version ################### +Next release will include the following **features**: + +* Add the ``endpoint-qos-mode`` tag to the XML Participant to choose how a matching XML endpoint profile is applied + (see :ref:`Endpoint QoS mode `). + By default (``xml-overridable``), the profile is used as base and its durability, reliability, ownership and history + are taken from the YAML configuration or from the discovered remote endpoints; ``xml-standalone`` applies the profile + as is. diff --git a/docs/rst/user_manual/configuration.rst b/docs/rst/user_manual/configuration.rst index 6b44f8c50..292bd6126 100644 --- a/docs/rst/user_manual/configuration.rst +++ b/docs/rst/user_manual/configuration.rst @@ -746,6 +746,7 @@ The tags of a Participant are arranged as follows, and the sections below follow tls: ... # TLS configuration (see WAN Configuration) profile: ... # XML profile of an XML Participant + endpoint-qos-mode: ... # How the XML endpoint profiles are applied in an XML Participant qos: ... # Topic QoS of the Participant @@ -1062,6 +1063,19 @@ It will use such profile for configuring the Participant. profile: participant_custom_configuration +.. _user_manual_configuration_endpoint_qos_mode: + +Endpoint QoS mode +----------------- + +Tag ``endpoint-qos-mode`` sets how an :ref:`XML Participant ` applies the XML endpoint +profiles: ``xml-overridable`` (default) or ``xml-standalone``. +See :ref:`user_manual_participants_xml_endpoint_qos_mode`. + +.. code-block:: yaml + + endpoint-qos-mode: xml-standalone + .. _user_manual_configuration_participant_topic_qos: @@ -1357,6 +1371,8 @@ A complete example of all the configurations described on this page can be found profile: custom_participant_configuration # Configure participant with this profile + endpoint-qos-mode: xml-overridable # XML endpoint profiles overridden by the Topic QoS (default) + # Custom generic forwarding route. routes: diff --git a/docs/rst/user_manual/participants/xml.rst b/docs/rst/user_manual/participants/xml.rst index e28e8431a..b0cee60ec 100644 --- a/docs/rst/user_manual/participants/xml.rst +++ b/docs/rst/user_manual/participants/xml.rst @@ -83,6 +83,7 @@ Endpoint profiles When the XML Participant creates a :term:`DataWriter` or :term:`DataReader` for a topic, it looks for a loaded XML ``data_writer`` or ``data_reader`` profile to configure that endpoint. By default, the |ddsrouter| looks for a profile **whose name matches the topic name**. If a matching profile is found, the endpoint is configured using that profile's QoS, giving the user control over fields such as history, memory policy, transport, etc. +By default, ``durability``, ``reliability``, ``ownership`` and ``history`` are still taken from the YAML configuration and from discovery; see :ref:`user_manual_participants_xml_endpoint_qos_mode` to use the profile as is. If no matching profile exists, the endpoint falls back to default QoS with values derived from the YAML configuration and from discovery. .. note:: @@ -130,20 +131,43 @@ Like any other Topic QoS, ``endpoint-profile-name`` can be set in the :ref:`Manu Since XML profiles are loaded for the whole |ddsrouter| process, this is the way to apply different profiles to the same topic in different XML Participants. If no profile with that name is loaded, the |ddsrouter| does not look for a profile named after the topic; the endpoint falls back to default QoS instead. -Overriding profile QoS from the YAML configuration -"""""""""""""""""""""""""""""""""""""""""""""""""" +.. _user_manual_participants_xml_endpoint_qos_mode: -When a matching XML profile is applied, the following :ref:`Topic QoS ` override the corresponding values from the profile, but only if they are explicitly set in the YAML configuration (in the Manual Topics, the Participant Topic QoS or the Specs Topic QoS): -``durability``, ``reliability``, ``ownership`` and ``history-depth``. -Every other field keeps the value from the XML profile. +Endpoint QoS mode +""""""""""""""""" -QoS values that the |ddsrouter| learns from remote endpoints during discovery never override the XML profile. -Fields that are set neither in the XML profile nor in the YAML configuration therefore take the |fastdds| default values (e.g. ``KEEP_LAST`` history with depth ``1``), instead of being adapted to the discovered endpoints. +The ``endpoint-qos-mode`` tag of the XML Participant sets how a matching XML endpoint profile is applied: + +.. list-table:: + :header-rows: 1 + + * - Value + - Behavior + + * - ``xml-overridable`` (default) + - The XML profile is used as base. + ``durability``, ``reliability``, ``ownership`` and ``history`` are taken from the :ref:`Topic QoS `, with priority: + YAML configuration (Manual Topics, Participant Topic QoS or Specs Topic QoS) > QoS discovered from the remote endpoints > |ddsrouter| defaults. + Every other policy keeps the value of the XML profile. + + * - ``xml-standalone`` + - The XML profile is used as is. + Neither the YAML configuration nor the discovered QoS override it. + +When no profile is found, the endpoint takes ``durability``, ``reliability``, ``ownership`` and ``history`` from the Topic QoS in both modes. +The ``endpoint-qos-mode`` tag is only accepted by XML Participants. + +.. code-block:: yaml + + - name: xml_participant + kind: xml + profile: custom_participant_configuration + endpoint-qos-mode: xml-standalone # Use the XML endpoint profiles as is .. warning:: - Setting ``history-depth`` in the Specs Topic QoS overrides the history of every matching XML profile, even when it is set to its default value of ``5000``. - Likewise, if the remote DataWriters use ``EXCLUSIVE_OWNERSHIP_QOS``, set ``ownership`` either in the XML profile or in the YAML configuration, otherwise the DataReaders of the XML Participant will not match them. + With ``xml-standalone``, the endpoints of the XML Participant do not adapt to the QoS of the remote endpoints. + Make sure the XML profiles are compatible with them; e.g. if the remote DataWriters use ``EXCLUSIVE_OWNERSHIP_QOS``, set it in the ``data_writer`` and ``data_reader`` profiles, otherwise the endpoints of the XML Participant will not match them. Repeater @@ -166,3 +190,5 @@ Use |fastdds| or |ddsrouter| support to load XML configuration files as explaine kind: xml profile: custom_participant_configuration # Configure participant with this profile + + endpoint-qos-mode: xml-overridable # XML endpoint profiles overridden by the Topic QoS (default) From 42ac6dcafc1e98b1eecdc191abc1c35a707654b1 Mon Sep 17 00:00:00 2001 From: danipiza Date: Wed, 18 Nov 2026 13:03:49 +0100 Subject: [PATCH 3/7] [TEST] Add endpoint-qos-mode configuration tests Signed-off-by: danipiza --- .../unittest/configuration/CMakeLists.txt | 1 + .../YamlReaderConfigurationTest.cpp | 92 +++++++++++++++++++ .../YamlValidatorDdsRouterTest.cpp | 2 + .../endpoint_qos_mode_invalid_value.yaml | 11 +++ ...endpoint_qos_mode_non_xml_participant.yaml | 11 +++ .../docu_example.yaml | 2 + 6 files changed, 119 insertions(+) create mode 100644 ddsrouter_yaml/test/unittest/ddsrouter_yaml_validator/invalid_config_files_router/endpoint_qos_mode_invalid_value.yaml create mode 100644 ddsrouter_yaml/test/unittest/ddsrouter_yaml_validator/invalid_config_files_router/endpoint_qos_mode_non_xml_participant.yaml diff --git a/ddsrouter_yaml/test/unittest/configuration/CMakeLists.txt b/ddsrouter_yaml/test/unittest/configuration/CMakeLists.txt index 57971c427..605cba920 100644 --- a/ddsrouter_yaml/test/unittest/configuration/CMakeLists.txt +++ b/ddsrouter_yaml/test/unittest/configuration/CMakeLists.txt @@ -40,6 +40,7 @@ set(TEST_LIST max_tx_rate max_rx_rate downsampling + xml_participant_endpoint_qos_mode ) set(TEST_EXTRA_LIBRARIES diff --git a/ddsrouter_yaml/test/unittest/configuration/YamlReaderConfigurationTest.cpp b/ddsrouter_yaml/test/unittest/configuration/YamlReaderConfigurationTest.cpp index 7de5213cc..313989515 100644 --- a/ddsrouter_yaml/test/unittest/configuration/YamlReaderConfigurationTest.cpp +++ b/ddsrouter_yaml/test/unittest/configuration/YamlReaderConfigurationTest.cpp @@ -17,6 +17,7 @@ #include #include +#include #include #include @@ -704,3 +705,94 @@ int main( ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); } + +/** + * Test load of the endpoint QoS mode of an XML participant in the configuration + * + * CASES: + * - Not set -> XML_OVERRIDABLE (default) + * - xml-overridable -> XML_OVERRIDABLE + * - xml-standalone -> XML_STANDALONE + * - Unknown value -> ConfigurationException + * - Set in a participant that is not XML -> ConfigurationException + */ +TEST(YamlReaderConfigurationTest, xml_participant_endpoint_qos_mode) +{ + auto load_xml_participant = [](const std::string& endpoint_qos_mode) + { + std::string yml_configuration = + "version: v5.0\n" + "participants:\n" + " - name: P1\n" + " kind: echo\n" + " - name: P2\n" + " kind: xml\n" + " profile: participant_profile\n"; + + if (!endpoint_qos_mode.empty()) + { + yml_configuration += " endpoint-qos-mode: " + endpoint_qos_mode + "\n"; + } + + ddsrouter::core::DdsRouterConfiguration configuration = + ddsrouter::yaml::YamlReaderConfiguration::load_ddsrouter_configuration( + YAML::Load(yml_configuration)); + + for (const auto& participant : configuration.participants_configurations) + { + if (participant.first == ddsrouter::core::types::ParticipantKind::xml) + { + auto xml_configuration = + std::dynamic_pointer_cast( + participant.second); + EXPECT_NE(nullptr, xml_configuration); + return xml_configuration; + } + } + + ADD_FAILURE() << "XML participant not found in the configuration"; + return std::shared_ptr(); + }; + + // Not set + { + auto xml_configuration = load_xml_participant(""); + ASSERT_NE(nullptr, xml_configuration); + EXPECT_EQ(ddspipe::participants::EndpointQoSMode::XML_OVERRIDABLE, xml_configuration->endpoint_qos_mode); + } + + // xml-overridable + { + auto xml_configuration = load_xml_participant(ddspipe::yaml::ENDPOINT_QOS_MODE_XML_OVERRIDABLE_TAG); + ASSERT_NE(nullptr, xml_configuration); + EXPECT_EQ(ddspipe::participants::EndpointQoSMode::XML_OVERRIDABLE, xml_configuration->endpoint_qos_mode); + } + + // xml-standalone + { + auto xml_configuration = load_xml_participant(ddspipe::yaml::ENDPOINT_QOS_MODE_XML_STANDALONE_TAG); + ASSERT_NE(nullptr, xml_configuration); + EXPECT_EQ(ddspipe::participants::EndpointQoSMode::XML_STANDALONE, xml_configuration->endpoint_qos_mode); + } + + // Unknown value + EXPECT_THROW(load_xml_participant("xml-only"), utils::ConfigurationException); + + // Set in a participant that is not XML + { + const char* yml_configuration = + R"( + version: v5.0 + participants: + - name: P1 + kind: echo + - name: P2 + kind: local + endpoint-qos-mode: xml-standalone + )"; + + EXPECT_THROW( + ddsrouter::yaml::YamlReaderConfiguration::load_ddsrouter_configuration(YAML::Load(yml_configuration)), + utils::ConfigurationException); + } +} diff --git a/ddsrouter_yaml/test/unittest/ddsrouter_yaml_validator/YamlValidatorDdsRouterTest.cpp b/ddsrouter_yaml/test/unittest/ddsrouter_yaml_validator/YamlValidatorDdsRouterTest.cpp index 89831a11d..740d784e2 100644 --- a/ddsrouter_yaml/test/unittest/ddsrouter_yaml_validator/YamlValidatorDdsRouterTest.cpp +++ b/ddsrouter_yaml/test/unittest/ddsrouter_yaml_validator/YamlValidatorDdsRouterTest.cpp @@ -61,6 +61,8 @@ std::vector invalid_files = { "./invalid_config_files_router/ds_guid_id_out_of_range.yaml", "./invalid_config_files_router/ds_participant_no_listening_nor_connection_addresses.yaml", "./invalid_config_files_router/ds_with_transport.yaml", + "./invalid_config_files_router/endpoint_qos_mode_invalid_value.yaml", + "./invalid_config_files_router/endpoint_qos_mode_non_xml_participant.yaml", "./invalid_config_files_router/easy_mode_with_whitelist.yaml", "./invalid_config_files_router/filter_topic_no_name.yaml", "./invalid_config_files_router/initial_peers_no_addresses.yaml", diff --git a/ddsrouter_yaml/test/unittest/ddsrouter_yaml_validator/invalid_config_files_router/endpoint_qos_mode_invalid_value.yaml b/ddsrouter_yaml/test/unittest/ddsrouter_yaml_validator/invalid_config_files_router/endpoint_qos_mode_invalid_value.yaml new file mode 100644 index 000000000..868e3d65f --- /dev/null +++ b/ddsrouter_yaml/test/unittest/ddsrouter_yaml_validator/invalid_config_files_router/endpoint_qos_mode_invalid_value.yaml @@ -0,0 +1,11 @@ +version: v5.0 + +participants: + + - name: EchoParticipant + kind: echo + + - name: xml_participant + kind: xml + profile: custom_participant_configuration + endpoint-qos-mode: xml-only diff --git a/ddsrouter_yaml/test/unittest/ddsrouter_yaml_validator/invalid_config_files_router/endpoint_qos_mode_non_xml_participant.yaml b/ddsrouter_yaml/test/unittest/ddsrouter_yaml_validator/invalid_config_files_router/endpoint_qos_mode_non_xml_participant.yaml new file mode 100644 index 000000000..481e078c0 --- /dev/null +++ b/ddsrouter_yaml/test/unittest/ddsrouter_yaml_validator/invalid_config_files_router/endpoint_qos_mode_non_xml_participant.yaml @@ -0,0 +1,11 @@ +version: v5.0 + +participants: + + - name: EchoParticipant + kind: echo + + - name: simple_participant + kind: local + domain: 0 + endpoint-qos-mode: xml-standalone diff --git a/ddsrouter_yaml/test/unittest/ddsrouter_yaml_validator/valid_config_files_router/docu_example.yaml b/ddsrouter_yaml/test/unittest/ddsrouter_yaml_validator/valid_config_files_router/docu_example.yaml index 98976323c..c944895cc 100644 --- a/ddsrouter_yaml/test/unittest/ddsrouter_yaml_validator/valid_config_files_router/docu_example.yaml +++ b/ddsrouter_yaml/test/unittest/ddsrouter_yaml_validator/valid_config_files_router/docu_example.yaml @@ -190,6 +190,8 @@ participants: profile: custom_participant_configuration # Configure participant with this profile + endpoint-qos-mode: xml-overridable # XML endpoint profiles overridden by the Topic QoS (default) + # Custom generic forwarding route. routes: From 5f5eda5d7f2eb007f60d313305b869fbaaea9e0e Mon Sep 17 00:00:00 2001 From: danipiza Date: Fri, 20 Nov 2026 14:11:11 +0100 Subject: [PATCH 4/7] [TEST] Cover every endpoint QoS mode in the configuration tests Signed-off-by: danipiza --- .../YamlReaderConfigurationTest.cpp | 133 ++++++++++-------- .../YamlValidatorDdsRouterTest.cpp | 1 + .../endpoint_qos_mode.yaml | 25 ++++ 3 files changed, 102 insertions(+), 57 deletions(-) create mode 100644 ddsrouter_yaml/test/unittest/ddsrouter_yaml_validator/valid_config_files_router/endpoint_qos_mode.yaml diff --git a/ddsrouter_yaml/test/unittest/configuration/YamlReaderConfigurationTest.cpp b/ddsrouter_yaml/test/unittest/configuration/YamlReaderConfigurationTest.cpp index 313989515..b6c27d22a 100644 --- a/ddsrouter_yaml/test/unittest/configuration/YamlReaderConfigurationTest.cpp +++ b/ddsrouter_yaml/test/unittest/configuration/YamlReaderConfigurationTest.cpp @@ -13,6 +13,7 @@ // limitations under the License. #include +#include #include #include @@ -707,77 +708,95 @@ int main( } /** - * Test load of the endpoint QoS mode of an XML participant in the configuration + * Test load of the endpoint QoS mode of the participants in the configuration. * * CASES: - * - Not set -> XML_OVERRIDABLE (default) - * - xml-overridable -> XML_OVERRIDABLE - * - xml-standalone -> XML_STANDALONE - * - Unknown value -> ConfigurationException - * - Set in a participant that is not XML -> ConfigurationException + * - local participant (no XML endpoint profiles) -> not an XML participant configuration (XML_DISABLED) + * - XML participant without endpoint-qos-mode -> XML_OVERRIDABLE (default) + * - XML participant with xml-overridable -> XML_OVERRIDABLE + * - XML participant with xml-standalone -> XML_STANDALONE + * - XML participant with an unknown value -> ConfigurationException + * - endpoint-qos-mode in a participant that is not XML -> ConfigurationException */ TEST(YamlReaderConfigurationTest, xml_participant_endpoint_qos_mode) { - auto load_xml_participant = [](const std::string& endpoint_qos_mode) - { - std::string yml_configuration = - "version: v5.0\n" - "participants:\n" - " - name: P1\n" - " kind: echo\n" - " - name: P2\n" - " kind: xml\n" - " profile: participant_profile\n"; - - if (!endpoint_qos_mode.empty()) - { - yml_configuration += " endpoint-qos-mode: " + endpoint_qos_mode + "\n"; - } + // One participant for each endpoint QoS mode + { + const char* yml_configuration = + R"( + version: v5.0 + participants: + - name: local_participant + kind: local + domain: 0 + - name: xml_default_participant + kind: xml + profile: participant_profile + - name: xml_overridable_participant + kind: xml + profile: participant_profile + endpoint-qos-mode: xml-overridable + - name: xml_standalone_participant + kind: xml + profile: participant_profile + endpoint-qos-mode: xml-standalone + )"; + + ddsrouter::core::DdsRouterConfiguration configuration = + ddsrouter::yaml::YamlReaderConfiguration::load_ddsrouter_configuration(YAML::Load(yml_configuration)); - ddsrouter::core::DdsRouterConfiguration configuration = - ddsrouter::yaml::YamlReaderConfiguration::load_ddsrouter_configuration( - YAML::Load(yml_configuration)); + std::map> participants; + for (const auto& participant : configuration.participants_configurations) + { + participants[participant.second->id] = participant.second; + } + ASSERT_EQ(4u, participants.size()); - for (const auto& participant : configuration.participants_configurations) + auto endpoint_qos_mode = [&participants](const std::string& name) { - if (participant.first == ddsrouter::core::types::ParticipantKind::xml) - { - auto xml_configuration = - std::dynamic_pointer_cast( - participant.second); - EXPECT_NE(nullptr, xml_configuration); - return xml_configuration; - } - } - - ADD_FAILURE() << "XML participant not found in the configuration"; - return std::shared_ptr(); - }; - - // Not set - { - auto xml_configuration = load_xml_participant(""); - ASSERT_NE(nullptr, xml_configuration); - EXPECT_EQ(ddspipe::participants::EndpointQoSMode::XML_OVERRIDABLE, xml_configuration->endpoint_qos_mode); + auto xml_configuration = + std::dynamic_pointer_cast( + participants.at(name)); + EXPECT_NE(nullptr, xml_configuration) << name << " is not an XML participant"; + return xml_configuration ? xml_configuration->endpoint_qos_mode + : ddspipe::participants::EndpointQoSMode::XML_DISABLED; + }; + + // XML_DISABLED: the local participant is not an XML participant, so it never looks up XML endpoint profiles + EXPECT_EQ(nullptr, + std::dynamic_pointer_cast( + participants.at("local_participant"))); + + // XML_OVERRIDABLE + EXPECT_EQ(ddspipe::participants::EndpointQoSMode::XML_OVERRIDABLE, + endpoint_qos_mode("xml_default_participant")); + EXPECT_EQ(ddspipe::participants::EndpointQoSMode::XML_OVERRIDABLE, + endpoint_qos_mode("xml_overridable_participant")); + + // XML_STANDALONE + EXPECT_EQ(ddspipe::participants::EndpointQoSMode::XML_STANDALONE, + endpoint_qos_mode("xml_standalone_participant")); } - // xml-overridable + // Unknown value { - auto xml_configuration = load_xml_participant(ddspipe::yaml::ENDPOINT_QOS_MODE_XML_OVERRIDABLE_TAG); - ASSERT_NE(nullptr, xml_configuration); - EXPECT_EQ(ddspipe::participants::EndpointQoSMode::XML_OVERRIDABLE, xml_configuration->endpoint_qos_mode); - } + const char* yml_configuration = + R"( + version: v5.0 + participants: + - name: P1 + kind: echo + - name: P2 + kind: xml + profile: participant_profile + endpoint-qos-mode: xml-only + )"; - // xml-standalone - { - auto xml_configuration = load_xml_participant(ddspipe::yaml::ENDPOINT_QOS_MODE_XML_STANDALONE_TAG); - ASSERT_NE(nullptr, xml_configuration); - EXPECT_EQ(ddspipe::participants::EndpointQoSMode::XML_STANDALONE, xml_configuration->endpoint_qos_mode); + EXPECT_THROW( + ddsrouter::yaml::YamlReaderConfiguration::load_ddsrouter_configuration(YAML::Load(yml_configuration)), + utils::ConfigurationException); } - // Unknown value - EXPECT_THROW(load_xml_participant("xml-only"), utils::ConfigurationException); - // Set in a participant that is not XML { const char* yml_configuration = diff --git a/ddsrouter_yaml/test/unittest/ddsrouter_yaml_validator/YamlValidatorDdsRouterTest.cpp b/ddsrouter_yaml/test/unittest/ddsrouter_yaml_validator/YamlValidatorDdsRouterTest.cpp index 740d784e2..9469bdbf0 100644 --- a/ddsrouter_yaml/test/unittest/ddsrouter_yaml_validator/YamlValidatorDdsRouterTest.cpp +++ b/ddsrouter_yaml/test/unittest/ddsrouter_yaml_validator/YamlValidatorDdsRouterTest.cpp @@ -32,6 +32,7 @@ std::string schema_path = "./ddsrouter_config_schema.json"; // Vectors with the valid and invalid YAML files std::vector valid_files = { "./valid_config_files_router/docu_example.yaml", + "./valid_config_files_router/endpoint_qos_mode.yaml", "./valid_config_files_router/schema_rules.yaml", // Config files copied automatically from DDS-Router/docs/resources/getting_started "./valid_config_files_router/client-ddsrouter.yaml", diff --git a/ddsrouter_yaml/test/unittest/ddsrouter_yaml_validator/valid_config_files_router/endpoint_qos_mode.yaml b/ddsrouter_yaml/test/unittest/ddsrouter_yaml_validator/valid_config_files_router/endpoint_qos_mode.yaml new file mode 100644 index 000000000..7ca30494a --- /dev/null +++ b/ddsrouter_yaml/test/unittest/ddsrouter_yaml_validator/valid_config_files_router/endpoint_qos_mode.yaml @@ -0,0 +1,25 @@ +version: v5.0 + +participants: + + # Not an XML participant: XML endpoint profiles are never looked up (XML_DISABLED) + - name: local_participant + kind: local + domain: 0 + + # XML participant without endpoint-qos-mode: xml-overridable by default (XML_OVERRIDABLE) + - name: xml_default_participant + kind: xml + profile: participant_profile + + # XML profile as base, overridden by the Topic QoS (XML_OVERRIDABLE) + - name: xml_overridable_participant + kind: xml + profile: participant_profile + endpoint-qos-mode: xml-overridable + + # XML profile used as is (XML_STANDALONE) + - name: xml_standalone_participant + kind: xml + profile: participant_profile + endpoint-qos-mode: xml-standalone From b96dc045c19e6f4ed54924d567f3402dce3110bd Mon Sep 17 00:00:00 2001 From: danipiza Date: Fri, 20 Nov 2026 14:11:11 +0100 Subject: [PATCH 5/7] [DOCS] Document endpoint QoS of non XML participants Signed-off-by: danipiza --- docs/rst/user_manual/participants/xml.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/rst/user_manual/participants/xml.rst b/docs/rst/user_manual/participants/xml.rst index b0cee60ec..8c8e7d8f2 100644 --- a/docs/rst/user_manual/participants/xml.rst +++ b/docs/rst/user_manual/participants/xml.rst @@ -156,6 +156,7 @@ The ``endpoint-qos-mode`` tag of the XML Participant sets how a matching XML end When no profile is found, the endpoint takes ``durability``, ``reliability``, ``ownership`` and ``history`` from the Topic QoS in both modes. The ``endpoint-qos-mode`` tag is only accepted by XML Participants. +The endpoints of any other Participant kind never look up XML endpoint profiles, so they always take their QoS from the Topic QoS. .. code-block:: yaml From 02d4817006073db869d836dec90d38c2d8103406 Mon Sep 17 00:00:00 2001 From: danipiza Date: Fri, 27 Nov 2026 12:44:51 +0100 Subject: [PATCH 6/7] [FEATURE] Add "disabled" endpoint-qos-mode Signed-off-by: danipiza --- docs/rst/notes/forthcoming_version.rst | 2 +- docs/rst/user_manual/configuration.rst | 2 +- docs/rst/user_manual/participants/xml.rst | 6 +++++- resources/configurations/ddsrouter_config_schema.json | 3 ++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/rst/notes/forthcoming_version.rst b/docs/rst/notes/forthcoming_version.rst index 3db38b983..533cd8590 100644 --- a/docs/rst/notes/forthcoming_version.rst +++ b/docs/rst/notes/forthcoming_version.rst @@ -12,4 +12,4 @@ Next release will include the following **features**: (see :ref:`Endpoint QoS mode `). By default (``xml-overridable``), the profile is used as base and its durability, reliability, ownership and history are taken from the YAML configuration or from the discovered remote endpoints; ``xml-standalone`` applies the profile - as is. + as is; ``disabled`` does not look up any XML endpoint profile. diff --git a/docs/rst/user_manual/configuration.rst b/docs/rst/user_manual/configuration.rst index 292bd6126..fb65f0463 100644 --- a/docs/rst/user_manual/configuration.rst +++ b/docs/rst/user_manual/configuration.rst @@ -1069,7 +1069,7 @@ Endpoint QoS mode ----------------- Tag ``endpoint-qos-mode`` sets how an :ref:`XML Participant ` applies the XML endpoint -profiles: ``xml-overridable`` (default) or ``xml-standalone``. +profiles: ``xml-overridable`` (default), ``xml-standalone`` or ``disabled``. See :ref:`user_manual_participants_xml_endpoint_qos_mode`. .. code-block:: yaml diff --git a/docs/rst/user_manual/participants/xml.rst b/docs/rst/user_manual/participants/xml.rst index 8c8e7d8f2..40a0c64b4 100644 --- a/docs/rst/user_manual/participants/xml.rst +++ b/docs/rst/user_manual/participants/xml.rst @@ -154,7 +154,11 @@ The ``endpoint-qos-mode`` tag of the XML Participant sets how a matching XML end - The XML profile is used as is. Neither the YAML configuration nor the discovered QoS override it. -When no profile is found, the endpoint takes ``durability``, ``reliability``, ``ownership`` and ``history`` from the Topic QoS in both modes. + * - ``disabled`` + - No XML endpoint profile is looked up, as if none were loaded: the endpoints take their QoS from the :ref:`Topic QoS `. + Useful to stop applying the XML endpoint profiles without removing them from the XML configuration. + +When no profile is found, the endpoint takes ``durability``, ``reliability``, ``ownership`` and ``history`` from the Topic QoS with ``xml-overridable`` and ``xml-standalone``. The ``endpoint-qos-mode`` tag is only accepted by XML Participants. The endpoints of any other Participant kind never look up XML endpoint profiles, so they always take their QoS from the Topic QoS. diff --git a/resources/configurations/ddsrouter_config_schema.json b/resources/configurations/ddsrouter_config_schema.json index 3a6d89c96..f5e0587b5 100644 --- a/resources/configurations/ddsrouter_config_schema.json +++ b/resources/configurations/ddsrouter_config_schema.json @@ -486,7 +486,8 @@ "type":"string", "enum":[ "xml-overridable", - "xml-standalone" + "xml-standalone", + "disabled" ] } }, From da77ea588c85caa98af4ea707220b5db5640bd3d Mon Sep 17 00:00:00 2001 From: danipiza Date: Fri, 27 Nov 2026 12:44:51 +0100 Subject: [PATCH 7/7] [TEST] Cover "disabled" endpoint-qos-mode Signed-off-by: danipiza --- .../configuration/YamlReaderConfigurationTest.cpp | 11 ++++++++++- .../valid_config_files_router/endpoint_qos_mode.yaml | 6 ++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ddsrouter_yaml/test/unittest/configuration/YamlReaderConfigurationTest.cpp b/ddsrouter_yaml/test/unittest/configuration/YamlReaderConfigurationTest.cpp index b6c27d22a..15b4e3d2e 100644 --- a/ddsrouter_yaml/test/unittest/configuration/YamlReaderConfigurationTest.cpp +++ b/ddsrouter_yaml/test/unittest/configuration/YamlReaderConfigurationTest.cpp @@ -715,6 +715,7 @@ int main( * - XML participant without endpoint-qos-mode -> XML_OVERRIDABLE (default) * - XML participant with xml-overridable -> XML_OVERRIDABLE * - XML participant with xml-standalone -> XML_STANDALONE + * - XML participant with disabled -> XML_DISABLED * - XML participant with an unknown value -> ConfigurationException * - endpoint-qos-mode in a participant that is not XML -> ConfigurationException */ @@ -740,6 +741,10 @@ TEST(YamlReaderConfigurationTest, xml_participant_endpoint_qos_mode) kind: xml profile: participant_profile endpoint-qos-mode: xml-standalone + - name: xml_disabled_participant + kind: xml + profile: participant_profile + endpoint-qos-mode: disabled )"; ddsrouter::core::DdsRouterConfiguration configuration = @@ -750,7 +755,7 @@ TEST(YamlReaderConfigurationTest, xml_participant_endpoint_qos_mode) { participants[participant.second->id] = participant.second; } - ASSERT_EQ(4u, participants.size()); + ASSERT_EQ(5u, participants.size()); auto endpoint_qos_mode = [&participants](const std::string& name) { @@ -776,6 +781,10 @@ TEST(YamlReaderConfigurationTest, xml_participant_endpoint_qos_mode) // XML_STANDALONE EXPECT_EQ(ddspipe::participants::EndpointQoSMode::XML_STANDALONE, endpoint_qos_mode("xml_standalone_participant")); + + // XML_DISABLED: XML participant that does not look up XML endpoint profiles + EXPECT_EQ(ddspipe::participants::EndpointQoSMode::XML_DISABLED, + endpoint_qos_mode("xml_disabled_participant")); } // Unknown value diff --git a/ddsrouter_yaml/test/unittest/ddsrouter_yaml_validator/valid_config_files_router/endpoint_qos_mode.yaml b/ddsrouter_yaml/test/unittest/ddsrouter_yaml_validator/valid_config_files_router/endpoint_qos_mode.yaml index 7ca30494a..d8d36a7fc 100644 --- a/ddsrouter_yaml/test/unittest/ddsrouter_yaml_validator/valid_config_files_router/endpoint_qos_mode.yaml +++ b/ddsrouter_yaml/test/unittest/ddsrouter_yaml_validator/valid_config_files_router/endpoint_qos_mode.yaml @@ -23,3 +23,9 @@ participants: kind: xml profile: participant_profile endpoint-qos-mode: xml-standalone + + # XML endpoint profiles not looked up (XML_DISABLED) + - name: xml_disabled_participant + kind: xml + profile: participant_profile + endpoint-qos-mode: disabled