RTI Connext Modern C++ API
Version 6.1.0
|
Defining DDS systems in XML. More...
Defining DDS systems in XML.
XML-Based Application Creation is a mechanism to simplify the development and programming of RTI Connext applications. RTI Connext supports the use of XML for the complete system definition. This includes not only the definition of the data types and Quality of Service settings, but also the definition of the Topics, DomainParticipants, and all the Entities they contain (Publishers, Subscribers, DataWriters and DataReaders).
The application code simply indicates the participant configuration name of the DomainParticipant that the application wants to create. The XML-Based Application Creation infrastructure takes care of the rest: creating the DomainParticipant, registering the types and Topics, and populating all the configured Entities. When the application needs to read or write data, register listeners, or perform any other action, it simply looks up the appropriate Entity by name and uses it.
See the RTI_ConnextDDS_CoreLibraries_XML_AppCreation_GettingStarted.pdf for a more exhaustive description XML Application Creation, most notably, how to set up the XML Configuration files.
The example on this page shows a basic use of the APIs that are necessary in order to access the entities that have been created in an XML file.
Relevant functions that enable the use of XML Application Creation are:
The following #includes are needed for the examples on this page
The following is the configuration that we will be using in this example:
You must first make sure that your configuration file is loaded by RTI Connext by using the QosProvider:
Then, if you are using a user-generated type, you must register the type with RTI Connext:
To create and access the system that you have defined in your system, call dds::core::QosProvider::create_participant_from_config:
After you have created the participants which were defined in your configuration, you can use various find functions to access the other entities that you have configured. For example, to lookup the DataWriter and DataReader from the example configuration: