Demo 2 demonstrates recording and playback of Digital Operating Room data from Demo 1 - Digital Operating Room.
RTI Recording Service is used to record realtime DDS data on the following Topics:
- t/MotorControl
- t/Vitals
RTI Replay Service is used to play back the recorded data to the Arm and Patient Monitor GUI applications, simulating live data.
This demo reuses applications from Demo 1 - Digital Operating Room. Demo 1 has been tested to work in Debian-based environments with a GUI, including those in WSL2 with GUI support.
RTI Recording Service and RTI Replay Service can be run on any officially supported platform, provided the machine is directly discoverable by the machine Demo 1 applications are launched from.
This demo uses RTI Recording Service to record data from Demo 1 applications. It then uses RTI Replay Service to replay the recorded data back to the same Demo 1 applications. Please find a diagram of how Recording / Replay Service connect to the RTI Connext Databus below:
RTI Recording Service is used in this demo to record the t/MotorControl
and t/Vitals
Topics from Demo 1.
RTI Recording Service is used in this demo to replay recorded data from the t/MotorControl
and t/Vitals
Topics from Demo 1.
Installation and build steps from Demo 1 satisfy prerequisites for this demo.
Generate the security artifacts for RTI Recording Service and RTI Replay Service using OpenSSL. This includes identity certificates, private keys, and the signing of DDS Security XML permissions & governance files located in ./security.
cd demo2/security
./setup_security.sh
In its own terminal, launch the Demo 1 applications (use -s
option for security):
cd demo1
./launch_all.sh [-s]
Configure the Connnext environment with NonSecureAppsQos.xml:
cd demo2
source <connext installation directory>/resource/scripts/rtisetenv_x64Linux4gcc7.3.0.bash
export NDDS_QOS_PROFILES="../../system_arch/qos/Qos.xml;../../system_arch/qos/NonSecureAppsQos.xml"
Alternatively, if using security, configure with SecureAppsQos.xml:
cd demo2
source <connext installation directory>/resource/scripts/rtisetenv_x64Linux4gcc7.3.0.bash
export NDDS_QOS_PROFILES="../../system_arch/qos/Qos.xml;../../system_arch/qos/SecureAppsQos.xml"
Run RTI Recording Service:
$NDDSHOME/bin/rtirecordingservice -cfgFile RecordingServiceConfiguration.xml -cfgName RecServCfg
Let RTI Recording Service run for some time (e.g. 10-20 seconds) before initiating shutdown with Ctrl-C
.
Observe: Once finished, a new folder should be created - demo2_recording - containing the recording files.
Inspect RecordingServiceConfiguration.xml to understand how RTI Recording Service is configured to record DDS Topics.
Kill all running Demo 1 application processes:
../demo1/kill_all.sh
Relaunch the Demo 1 Arm and Patient Monitor GUI applications only (use -s
option for security):
cd demo2
./launch_arm_and_patient_monitor.sh [-s]
Observe: You should see the GUI applications are not receiving data.
In the terminal RTI Recording Service was launched and shutdown from Step 2, launch RTI Replay Service (to reuse the previously configured environment):
$NDDSHOME/bin/rtireplayservice -cfgFile ReplayServiceConfiguration.xml -cfgName RepServCfg
Observe: You should see the Arm and Patient Monitor applications are receiving data previously recorded.
The Replay Service configuration has <enable_looping>
set to true
, so the replay will start over when it reaches the end of the recording.
Kill all running Demo 1 applications:
../demo1/kill_all.sh
Inspect ReplayServiceConfiguration.xml to understand how RTI Replay Service is configured to replay recorded DDS Topics.
Here are a few hands-on exercises to demonstrate use cases of Connext features in this demo.
This demo is configured to record and replay just t/MotorControl
and t/Vitals
Topics only on Domain 0. Both RTI Recording Service and RTI Replay Service can be configured to record and replay explicit Topics, or discovered Topics/Data Types that match a pattern.
Let's try replaying just t/Vitals
, while still recording both Topics.
-
Kill all active demo applications and RTI Recording/Replay Services.
-
Comment out the
<topic>
tag and contained content within it, fort/MotorControl
in RecordingServiceConfiguration.xml.Note, you should undo this configuration change after completing this demonstration.
-
Relaunch the Demo 1 applications and RTI Recording Service for 10-20 seconds.
-
Kill RTI Recording Service and the Demo 1 applications.
-
Relaunch the Demo 1 Arm and Patient Monitor applications and RTI Replay Service.
-
While monitoring the Arm and Patient Monitor application GUIs, start RTI Replay Service.
Observe: You should see the Patient Monitor receiving data, but Arm should appear as if there is no motor movement. This is because while RTI Replay Service is configured to replay data on both
t/MotorControl
andt/Vitals
Topics, only data fort/Vitals
was recorded. -
Undo the QoS change to revert to the recommended configuration.
RTI Admin Console is a troubleshooting tool that includes handy integrations for RTI Recording Service and RTI Replay Service. This demo configures both RTI Recording Service and RTI Replay Service to allow for "administration" capabilities on Domain 99.
Let's try using RTI Admin Console to administer RTI Recording Service.
-
Launch RTI Admin Console.
- From RTI Launcher:
- Open RTI Launcher.
- Navigate to the Tools tab.
- Click the Admin Console button.
- From a terminal:
- Launch the
rtiadminconsole[.bat]
script found in the $NDDSHOME/bin folder. Where $NDDSHOME is the folder where Connext is installed.
- Launch the
- From RTI Launcher:
-
In RTI Admin Console, join Domains 0 (Demo 1 Operational Data) and 99 (Demo 2 RTI Recording Service Administration).
- In RTI Admin Console toolbar, go to "View" > "Preferences".
- In the preferences popup, ensure you have the "Administration" tab selected in the sidebar.
- In the popup's main panel, select the "Manually join and leave domains" radio button.
- In next field, "Please specify the domains to be joined", enter
0,99
. - Click "Apply and Close" in the Preferences popup.
-
Launch the Demo 1 applications and RTI Recording Service.
-
In RTI Admin Console, go to the "Physical View" and select the RTI Recording Service process.
- In RTI Admin Console toolbar, go to "View" and check if an option "Show Physical Tree View" exists - if so, click it. If instead, you see "Hide Physical Tree View", find the Physical Tree view panel already open.
- Expand the "System" tree two levels ("System", <hostname>).
- Select
RecServCfg
.
-
In RTI Admin Console main panel, view RTI Recording Service statuses and available commands.
-
Remotely shut down RTI Recording Service.
- From RTI Admin Console, while viewing the RTI Recording Service process, click the "Shutdown" button to stop and kill the RTI Recording Service process.
- Confirm in the popup that you would like to shut down the service.
Observe: You should see the RTI Recording Service process has been stopped gracefully in the terminal which you launched it.
Head back to the main README and pick up with the Hands-On: Architecture section to learn more about the system architecture.