This QosPolicy determines the way that XML documents containing QoS profiles are loaded.
All QoS values for Entities can be configured with QoS profiles defined in XML documents. XML documents can be passed to Connext DDS in string form, or more likely, through files found on a file system. This QoS configures how a DomainParticipantFactory loads the QoS profiles defined in XML. QoS profiles may be stored in this QoS as XML documents as a string. The location of XML files defining QoS profiles may be configured via this QoS. There are also default locations where the DomainParticipantFactory will look for files to load QoS profiles. You may disable any or all of these default locations using the Profile QoS. For more information about QoS profiles and libraries, please see 19. Configuring QoS with XML.
This QosPolicy includes the members in Table 9.7 DDS_ProfileQosPolicy. For the defaults and valid ranges, please refer to the API Reference HTML documentation.
Type |
Field Name |
Description |
DDS_StringSeq |
string_profile |
Sequence of strings (empty by default) containing an XML document to load. The concatenation of the strings in this sequence must be a valid XML document according to the XML QoS profile schema. |
url_profile |
A sequence of XML files (empty by default) containing a set of XML documents to load. See 19.5 How to Load XML-Specified QoS Settings. |
|
DDS_Boolean |
ignore_user_profile |
When TRUE, the QoS profiles contained in the file USER_QOS_PROFILES.xml in the current working directory will be ignored. |
ignore_environment_ |
When TRUE, the value of the environment variable NDDS_QOS_PROFILES will be ignored. |
|
ignore_resource_ |
When TRUE, the QoS profiles in the file $NDDSHOME/resource/xml/NDDS_QOS_PROFILES.xml will be ignored. NDDS_QOS_PROFILES.xml does not exist by default. However, NDDS_QOS_PROFILES.example.xml is shipped with the host bundle of the product; you can copy it to NDDS_QOS_PROFILES.xml and modify it for your own use. |
In the Modern C++ API, there is not a PROFILE QosPolicy, because the class that manages QoS profiles is dds::core::QosProvider—not the DomainParticipantFactory. A QosProvider can receive a QosProviderParams instance, which encapsulates the fields described before.
Traditional C++:
DDSDomainParticipantFactory *factory =
DDSDomainParticipantFactory::get_instance(); DDS_DomainParticipantFactoryQos factoryQos; DDS_ReturnCode_t retcode = factory->get_qos(factoryQos); if (retcode != DDS_RETCODE_OK) { // error } const char *url_profiles[2] = { "file://usr/local/default_dds.xml", "file://usr/local/alternative_default_dds.xml" }; factoryQos.profile.url_profile.from_array(url_profiles, 2); factoryQos.profile.ignore_resource_profile = DDS_BOOLEAN_TRUE; factory->set_qos(factoryQos);
Modern C++:
rti::core::QosProviderParams params = dds::core::QosProvider::Default()->default_provider_params(); std::vector<std::string> url_profiles = { "file://usr/local/default_dds.xml", "file://usr/local/alternative_default_dds.xml" }; params.url_profile(url_profiles); params.ignore_resource_profile(true); dds::core::QosProvider::Default()->default_provider_params(params);
This QosPolicy can be changed at any time.
Since it is only for the DomainParticipantFactory, there are no compatibility restrictions for how it is set on the publishing and subscribing sides.
Once the QoS profiles are loaded, the DomainParticipantFactory will keep one copy of each QoS in the QoS profiles in memory.
You can free the memory associated with the XML QoS profiles by calling the DomainParticipantFactory’s unload_profiles() operation.
© 2020 RTI