Routing service API and preloading Qos profiles

6 posts / 0 new
Last post
Offline
Last seen: 1 year 1 month ago
Joined: 04/25/2016
Posts: 8
Routing service API and preloading Qos profiles

Hi,

My question revolves around how routing service interacts with the DomainParticipantFactory - specifically how it loads Qos profiles.  In my setup, I am compiling in Qos xml strings that I have previously stringified into a "DdsManager" class.  This class loads my entire Qos library on construction by setting the DomainParticipantFactory (set_qos).  Inside of my routing service xml files, I reference some of these qos profiles.  Then, I use the routing service C API inside of my C++ application to start a routing service instance.  The reason I am doing this with a C++ wrapper is because I need acccess to my compiled in Qos profiles.  However, when I run the application, the routing service instance fails because it cannot find a qos profile that was in my compiled-in Qos library.  My application flow is below...

1) Construct DdsManager - TheFactory->set_qos(all compiled-in qos profiles)

2) Start routing service instance that references a qos profile defined above

My assumption is that routing service uses the factory and therefore would recognize my qos profiles, however this does not seem to be the case.  Should this logic work and I have another bug? Or does routing service overwrite all of the existing qos profiles in the factory when it creates an instance?

Thanks!

Paul

Gerardo Pardo's picture
Offline
Last seen: 3 weeks 2 days ago
Joined: 06/02/2010
Posts: 588

Hi Paul,

What Qos are you passing to the  DomainParticipantFactory::set_qos()?  That call only sets Qos of the DomainParticipantFactory itself but this can be used to "load" precompiled Qos profiles into the system as described in the Connext DDS User's Manual section on "How to load XML-Specified Qos Settings".

Basically you need to set the PROFILE Qos Policy in the DomainParticipantFactory, specifically the string_profile field.  That field contains the whole XML that you would otherwise have put into a file or a set of files. Being a string it can be complied into your code...

Gerardo

Offline
Last seen: 1 year 1 month ago
Joined: 04/25/2016
Posts: 8

I'm calling set_qos on the factoryQos.

DomainParticipantFactory::set_qos(DDS::DomainParticipantFactoryQos)

Loading my compiled-in qos profiles work correctly in normal DDS applications, just not with a Routing service instance.

Gerardo Pardo's picture
Offline
Last seen: 3 weeks 2 days ago
Joined: 06/02/2010
Posts: 588

Hi,

Sorry, I mis-spoke. Apparently Routing Service works a bit differently from a regular DDS application... Routing Service has its own configuration and it is ignoring the DomainParticipantFactory Qos.

I am checking with the Routing Service developers to see if there is a way to do this...

Gerardo

 

asanchez's picture
Offline
Last seen: 2 months 1 week ago
Joined: 11/16/2011
Posts: 49

Hi Paul,

Routing Service has an independent mechanism to load profiles and service configurations and does not interfere with the settings of the DomainParticipantFactory. There are two alternatives:

  1. Place the configuration and QoS files in any of the supported locations, as specified in the Routing Service User's Manual section 2.2.
  2. If you are instantianting Routing Service from the library, you can generate all the XML file in a string content and place it in the cfg_strings member of the RoutingServiceProperty.

Best,

Antonio

Offline
Last seen: 1 year 1 month ago
Joined: 04/25/2016
Posts: 8

Thanks guys!