19.5 How to Load XML-Specified QoS Settings

There are several ways to load XML QoS profiles into your application. In C, Traditional C++, Java and .NET, it's the singleton DomainParticipantFactory that loads these profiles. Applications using the Modern C++ API can create any number of instances of dds::core::QosProvider with different parameters to load different QoS profiles or, they can use the singleton QosProvider::Default(). The profiles configured in the default QosProvider are used when creating an Entity without an explicit QoS parameter.

Here are the various approaches, listed in load order:

You may use a combination of the above approaches.

The location of the XML documents (only files and strings are supported) is specified using URL (Uniform Resource Locator) format. For example:

If you omit the URL schema name, Connext DDS will assume a file name. For example:

Note: The path you specify can be absolute or relative. If you specify a relative path, it should be a path to a file that is lower down in the file hierarchy, not higher up.

Duplicate QoS profiles are not allowed. Connext DDS will report an error message in these scenarios. To overwrite a QoS profile, use 19.3.3 QoS Profile Inheritance and Composition.

Several QoS profiles are built into the Connext DDS core libraries and can be used as starting points when configuring QoS for your Connext DDS applications. For details, see 19.4 Configuring QoS with XML.

To load redundant locations for a single XML file, see 19.8 URL Groups (Loading Redundant Locations).

© 2020 RTI