Integrating RTI Connext DDS Micro 3.0.3 with RTI Connext Tools 6.0.1
Some requirements for building a complex IIoT system are outside the scope of a stand-alone middleware. In order to support these system-level requirements, RTI created a suite of tools that accelerate development for the most complex use cases, including those using Connext DDS Micro due to resource constraints or safety requirements.
This solution describes how to integrate a selection of RTI Connext Tools and Infrastructure Services with Connext DDS Micro:
Admin Console, to debug and visualize a system
Routing Service, to scale and integrate disparate systems
Recording Service, to capture test data
- Replay Service, to leverage test data for system analysis
Configuring Connext DDS Micro
Connext DDS Micro provides two methods to discover endpoint information for remote DataReaders and DataWriters: Dynamic Endpoint Discovery and Static Endpoint Discovery.
With Dynamic Endpoint Discovery, endpoint information is exchanged between DomainParticipants using the RTPS protocol.
With Static Endpoint Discovery, endpoint information must be programmatically asserted by the application in order to discover remote DataReaders and DataWriters.
Connext DDS Micro provides buildable example applications in the example/ directory of its host bundle. This solution uses the example application HelloWorld_dpde, which uses Dynamic Endpoint Discovery. (Integrating RTI Connext Tools with an application using Static Endpoint Discovery is described in this earlier article, which uses an older version of Connext DDS Micro.) All mention of HelloWorld_dpde throughout this article refers to this example application distributed with Connext DDS Micro.
To follow this example, you’ll need to modify a few resource limits in HelloWorldApplication.c (or HelloWorldApplication.cxx, depending on your chosen language):
Update
remote_participant_allocation
to 10Update
remote_reader_allocation
to 32Update
remote_writer_allocation
to 32
The resource limit configuration in HelloWorldApplication.c(xx) should now match the following code snippet:
dp_qos.resource_limits.max_destination_ports = 32; dp_qos.resource_limits.max_receive_ports = 32; dp_qos.resource_limits.local_topic_allocation = 1; dp_qos.resource_limits.local_type_allocation = 1;; dp_qos.resource_limits.local_reader_allocation = 1; dp_qos.resource_limits.local_writer_allocation = 1; dp_qos.resource_limits.remote_participant_allocation = 10; dp_qos.resource_limits.remote_reader_allocation = 32; dp_qos.resource_limits.remote_writer_allocation = 32;
These changes increase the number of remote endpoints that can be discovered by the DomainParticipant. This takes into account the DataReaders and DataWriters created by RTI Connext Tools, such as Admin Console as well as Routing, Recording, and Replay Services, since these are all DDS applications. Without these modifications, the DomainParticipant may exceed its resource limits when discovering application readers and writers, preventing communication.
Next, compile the publisher and subscriber applications by following the instructions in the README.
For more information about configuring resource limits, visit the Configuring Resource Limits page in the Connext DDS Micro API Reference.
Admin Console
Connext DDS Micro only advertises the data type name, not the data type definition associated with a topic found during discovery. So for Admin Console to know the data type definition associated with a topic, it needs an XML file that defines that data type.
The HelloWorld_dpde example available within Connext DDS Micro only provides an IDL file representing the data type, so the corresponding XML file must be generated using rtiddsgen.
Open a command window, change to the HelloWorld_dpde directory and run this command: ./<path_to_micro_installation>/rtiddsgen/scripts/rtiddsgen -convertToXml HelloWorld.idl
HelloWorld.xml should now appear in your example directory. You will use this file when you subscribe to a topic in a later step.
Run the publisher in domain 1: ./objs/<target_arch>/HelloWorld_publisher -domain 1
Run the subscriber in domain 1: ./objs/<target_arch>/HelloWorld_subscriber -domain 1
The publisher and subscriber should be communicating with each other.
From RTI Launcher’s Tools tab, start Admin Console.
Connext DDS Professional uses a special discovery mechanism that allows Admin Console to discover participants within all domains automatically. For a Connext DDS Micro application, Admin Console requires manual configuration to join the relevant domains.
To configure Admin Console to join domain 1:
Navigate to Preferences by clicking the gear icon in the top left of Admin Console.
Select Manually Join and Leave Domains.
Specify 1 and click Join Domains.
Apply the changes.
To subscribe to the topic Example HelloWorld in Admin Console:
Double-click Example HelloWorld under Domain 1 in the DDS Logical View.
Click Subscribe in the Topic Data view.
Click Load Data Types from XML file.
Browse to the file you generated earlier, HelloWorld.xml.
Click OK.
Admin Console will now receive samples for the Example HelloWorld topic.
Routing Service
To integrate with a Connext DDS Micro application, Routing Service requires a configuration file that explicitly defines and registers the data type. The configuration file for Routing Service is attached to this solution as USER_ROUTING_SERVICE.xml.
Download the USER_ROUTING_SERVICE.xml configuration file, which is attached to this article.
Open a command window and change to the HelloWorld_dpde example directory.
Run the publisher in domain 1: ./objs/<target_arch>/HelloWorld_publisher -domain 1
Run the subscriber in domain 2: ./objs/<target_arch>/HelloWorld_subscriber -domain 2
There should be no communication since the publisher and subscriber are running in different domains. Next, we’ll see how to route data from domain 1 to domain 2.
From RTI Launcher’s Services tab, start Routing Service. In the resulting dialog:
Set the Custom configuration file to the downloaded USER_ROUTING_SERVICE.xml file.
Select Bridge_Domain_1_to_Domain_2 - from CUSTOM for the configuration.
Click Run.
Now you will see communication between the publisher and subscriber, since all the samples of topic Example HelloWorld are routed from domain 1 to domain 2, integrating two previously disparate domains.
Recording Service
Like Routing Service, to integrate with a Connext DDS Micro application, Recording Service requires a configuration file that explicitly defines and registers the data type. The configuration file for Recording Service is attached to this solution as USER_RECORDING_SERVICE.xml.
Download the USER_RECORDING_SERVICE.xml configuration file, which is attached to this article.
From RTI Launcher’s Services tab, start Recording Service. In the resulting dialog:
Set the Custom configuration file to the downloaded USER_RECORDING_SERVICE.xml file.
Select RecordingServiceJson - from CUSTOM for the configuration.
Click Run.
Open a command window and change to the HelloWorld_dpde directory.
Run the publisher on domain 1: ./objs/<target_arch>/HelloWorld_publisher -domain 1
The recording will be saved in /json_recording/rti_recorder_default_json.dat (under the the Working Directory specified in the RTI Recording Service dialog).
For information on how to view the recording using SQLite, visit these tutorials.
Replay Service
Like Recording Service, to integrate with a Connext DDS Micro application, Replay Service requires a configuration file that explicitly defines and registers the data type. The configuration file for Replay Service is attached to this solution as USER_REPLAY_SERVICE.xml.
Download the USER_REPLAY_SERVICE.xml configuration file, which is attached to this article.
From RTI Launcher’s Services tab, start Replay Service. In the resulting dialog:
Set the Custom configuration file to the downloaded USER_REPLAY_SERVICE.xml file.
Select ReplayServiceJson - from CUSTOM as the configuration.
Click Run.
Open a command window and change to the HelloWorld_dpde directory.
Run the subscriber on domain 1: ./objs/<target_arch>/HelloWorld_subscriber -domain 1
This will replay the recording that you created in the previous step, which was saved in the Working Directory, in json_recording/rti_recorder_default_json.dat.
Summary
Now you’ve seen the basic steps for integrating Admin Console, Routing Service, Recording Service, and Replay Service with Connext DDS Micro. However, this is just the starting point for unlocking the potential of RTI Connext Tools. Dive deeper by visiting the documentation for each tool, available here.