Configuring QoS Profiles with XML
Summary:APIs related to XML QoS Profiles
Loading QoS Profiles from XML Resources
A 'QoS profile' is a group of QoS settings, specified in XML format. By using QoS profiles, you can change QoS settings without recompiling the application. The Qos profiles are loaded the first time any of the following operations are called:
DDS.DomainParticipantFactory.create_participant DDS.DomainParticipantFactory.create_participant_with_profile DDS.DomainParticipantFactory.set_default_participant_qos_with_profile DDS.DomainParticipantFactory.get_default_participant_qos DDS.DomainParticipantFactory.set_default_library DDS.DomainParticipantFactory.set_default_profile DDS.DomainParticipantFactory.get_participant_qos_from_profile DDS.DomainParticipantFactory.get_topic_qos_from_profile DDS.DomainParticipantFactory.get_topic_qos_from_profile_w_topic_name DDS.DomainParticipantFactory.get_publisher_qos_from_profile DDS.DomainParticipantFactory.get_subscriber_qos_from_profile DDS.DomainParticipantFactory.get_datawriter_qos_from_profile DDS.DomainParticipantFactory.get_datawriter_qos_from_profile_w_topic_name DDS.DomainParticipantFactory.get_datareader_qos_from_profile DDS.DomainParticipantFactory.get_datareader_qos_from_profile_w_topic_name DDS.DomainParticipantFactory.get_qos_profile_libraries DDS.DomainParticipantFactory.get_qos_profiles DDS.DomainParticipantFactory.load_profiles The QoS profiles are reloaded replacing previously loaded profiles when the following operations are called:
DDS.DomainParticipantFactory.set_qos DDS.DomainParticipantFactory.reload_profiles The DDS.DomainParticipantFactory.unload_profiles operation will free the resources associated with the XML QoS profiles.
There are five ways to configure the XML resources (listed by load order):
The file NDDS_QOS_PROFILES.xml in $NDDSHOME/resource/xml is loaded if it exists and DDS.ProfileQosPolicy.ignore_resource_profile in DDS.ProfileQosPolicy is set to DDS.BOOLEAN_FALSE (first to be loaded). An example file,
ef_url_qos_profiles_xml, is available for reference.
The URL groups separated by semicolons referenced by the enviroment variable NDDS_QOS_PROFILES are loaded if they exist and DDS.ProfileQosPolicy.ignore_environment_profile in DDS.ProfileQosPolicy is set to DDS.BOOLEAN_FALSE.
The file USER_QOS_PROFILES.xml in the working directory will be loaded if it exists and DDS.ProfileQosPolicy.ignore_user_profile in DDS.ProfileQosPolicy is set to DDS.BOOLEAN_FALSE.
The URL groups referenced by DDS.ProfileQosPolicy.url_profile in DDS.ProfileQosPolicy will be loaded if specified.
The sequence of XML strings referenced by DDS.ProfileQosPolicy.string_profile will be loaded if specified (last to be loaded). The above methods can be combined together.
URL
The location of the XML resources (only files and strings are supported) is specified using a URL (Uniform Resource Locator) format. For example: File Specification: file:///usr/local/default_dds.xml
String Specification: str://"<dds><qos_library> . . . lt;/qos_library></dds>"
If the URL schema name is omitted, RTI Connext will assume a file name. For example:
File Specification: /usr/local/default_dds.xml
URL groups
To provide redundancy and fault tolerance, you can specify multiple locations for a single XML document via URL groups. The syntax of a URL group is as follows: [URL1 | URL2 | URL2 | . . .| URLn]
For example:
[file:///usr/local/default_dds.xml | file:///usr/local/alternative_default_dds.xml]
Only one of the elements in the group will be loaded by
dds, starting from the left.
Brackets are not required for groups with a single URL.
NDDS_QOS_PROFILES environment variable
The environment variable NDDS_QOS_PROFILES contains a list of URL groups separated by ';' The URL groups referenced by the environment variable are loaded if they exist and DDS.ProfileQosPolicy.ignore_environment_profile is set to DDS.BOOLEAN_FALSE
Built-In QoS Profiles There are also a number of built-in QoS profiles that can be used without having to load any configurations from outside XML resources. For more information on these built-in profiles see DDSBuiltinQosProfilesModule "Built-in Qos Profiles".
For more information on XML Configuration, refer to the User's Manual.