I've got a plug in architecture that uses DDS and several QoS files, plug-ins can be started and stopped at any time. So when I load QoS files into the DomainParticipantFactory, I also put them into a Vector<String>. This way I can test to see if they're already loaded before adding them preventing errors when loading a QoS file multiple times.
Is there a more elegant solution to doing this?
Hello hagemeyp,
You can call get_qos() on the DomainParticipantFactory to get access to the list of files, if you explicitly set them:
DomainParticipantFactoryQos:
factoryQos.profile.url_profile is a sequence of strings that contains the list of files if you explicitly loaded them.
It sounds like you are setting everything explicitly, but if you loaded the files through an environment variable (or if it was a USER_QOS_PROFILES.xml that was loaded implictly by running the application in the directory containing that file), they will not be included in that QoS.
Thank you!
Rose