Problems with loading xml file for QOS

4 posts / 0 new
Last post
Last seen: 4 months 2 weeks ago
Joined: 07/09/2020
Posts: 2
Problems with loading xml file for QOS

I am new to RTI DDS and I am having issues with the xml file defined in the NDDS_QOS_PROFILES environment variable. I have defined this environment variable to point to my xml file. However when I run my application and try to do the following, my participaint doesn't get created.

(using c++11)

In my application, I have read in the environment variable and outputted this in my log to verify there were no issues with that.

I have also invalidated the <dds> tag in my xml file, but haven't seen any error message.

Is there a way to verify that the ignore_environment_profile flag is set to FALSE? or possibly to programatically set it to FALSE to be sure that my file gets read in?

DDS::DomainParticipant* participant = create_participant_with_profile(123, "MyLibrary", "MyDomain", 0, DDS_STATUS_MASK_NONE);


OR is there a way to load the QOS programatically (called say loaded_qos) before I create the DomainParticipant and then call:

DDS::DomainParticipant* participant = create_participant_with_profile(123, loaded_qos, 0, DDS_STATUS_MASK_NONE);



Last seen: 1 month 1 week ago
Joined: 08/20/2012
Posts: 25

As an aside, your code snippets pertain to the DDS Traditional C++ API, and you say you are using C++11. I just wanted to point out that the DDS Modern C++ API is more C++11 friendly.

You can verify that flag by calling the Domain Participant Factory's get_qos() function and drilling down to it in the structure. I also suggest increasing the logging verbosity and looking for clues there.

Gerardo Pardo's picture
Last seen: 3 weeks 6 days ago
Joined: 06/02/2010
Posts: 594


The first form is the correct one using the traditional C++ API. Note however that you have to call that operation on the DomainParticipantFactory as in:

DDS::DomainParticipant* participant = DDSTheParticipantFactory->create_participant_with_profile(123, loaded_qos, 0, DDS_STATUS_MASK_NONE);


You can call the operation DDSTheParticipantFactory->get_qos_profile_libraries(...) to get the list of Qos Profile Libraries that have been loaded.

Likewise for any Qos Profile Library you can call DDSTheParticipantFactory->get_qos_profiles(...) to get the available Qos Profiles within that library.


Can you post the XML file you are using? Does it contain a qos_library with name "MyLibrary" and within it a qos_profile with name "MyDomain"?


Last seen: 4 months 2 weeks ago
Joined: 07/09/2020
Posts: 2

I cannot post the XML file I am using (it is on another system - w/out internet access). I am mostly concerned with the fact that the file doesn't seem to be loading at all. If I invalidate the XML, for example <ddsXYZ> I don't get any kind of error, which I saw in other posts on the forum that I should see.

I think the problem is that my XML file is not being loaded on startup, even though I have defined NDDS_QOS_PROFILES.