C++11 Setting domain id from XML QOS file

2 posts / 0 new
Last post
Offline
Last seen: 6 years 4 months ago
Joined: 09/17/2015
Posts: 53
C++11 Setting domain id from XML QOS file

Hello all,

I am loading an XML QOS using the QosProvider. How can I set the domain id in the XML QOS file?

At the moment DOMAIN_ID is just some hard coded number:

dds::domain::DomainParticipant(DOMAIN_ID, qos_provider.participant_qos()); 

Best regards,

Andreas

dds::domain::DomainParticipant(DOMAIN_ID, qos_provider.participant_qos());

Gerardo Pardo's picture
Offline
Last seen: 1 day 14 hours ago
Joined: 06/02/2010
Posts: 601

Hi Andreas,

You  can set the domain_id in teh XML file but you have to use the XML Application Creation Syntax which allows you to defined named DomainParticipant entities and not just their Qos.  This is becuase the domain_id is not considered part of the Qos. See the XML Application Creation Getting Started for details.

The syntax of the XML application creation files is an superset of the syntax for the QoS profiles XML. The XSD that validates this files can be found in your Connext DDS installation directory under resource/schema/rti_dds_profiles.xsd or you can access it on-line here:   https://community.rti.com/schema/5.2.0/rti_dds_profiles.xsd.

Once you have the XML yu can use it to construct a DomainParticipantConfigParams object which can be used to create a DomainParcipant using the operation QosProvider::create_participant_from_config()

Gerardo