How to use recording console and provide type information to Recorder and Replay

Type object and type code information maximum length can be set in QoS by adding to your QoS file

<participant_qos>
   <resource_limits>
       <type_code_max_serialized_length>0</type_code_max_serialized_length>
       <type_object_max_serialized_length>0</type_object_max_serialized_length>
    </resource_limits> 
 </participant_qos>

In case it is 0, no type code nor type object information will be transmitted by DDS.

In order to record data sent by a publisher with such configuration, it is needed to provide the type information to Recorder. A Recorder example configuration for that case can be found in file USER_RECORDING_SERVICE.xml. XML tag <domain_type_config> provides the type information to Recorder. Do not forget to add tag <domain_filter> that specify the names of the Recorder domain definitions for which the type definitions specified will apply.

Also in order to replay a recorded file without type code nor type object information it is needed to provide type information to Replay. A Replay example configuration for that case can be found in file USER_REPLAY_SERVICE.xml. XML tag <type_config> provides type information to Replay.

And an example file with the type information is HelloWorld.xml. This can be generated from IDL file using Type Converter.

One scenario is to have all files USER_RECORDING_SERVICE.xml, USER_REPLAY_SERVICE.xml and HelloWorld.xml in the same directory, open Recording Console, configure Recorder using file USER_RECORDING_SERVICE.xml and press record button. In that case Recorder will return an error as it can not find file HelloWorld.xml. The same error will occur in case Replay is used in the same way.

Why is this error happening? The path configuration in USER_RECORDING_SERVICE.xml is <element>.</element> what means that Recorder will search for file HelloWorld.xml in its current working directory. Recorder does not set its current working directory, so it will inherit it from Recording Console, which inherited it from RTI Launcher (in case it was started from RTILauncher).

There are several options to fix this problem (they all apply to Recorder and Replay). Note that this fix have been tested using Windows 10, Ubuntu 14.04.3 LTS and RTI Connext DDS 5.2.0:

  1. Add an element with the absolute path to the directory where HelloWorld.xml file is located in the <path> tag in file USER_RECORDING_SERVICE.xml.

  2. Open a command line shell and cd to the directory where the files with your configuration are located. Run the Recording Console from command line (command “rtirecordingconsole”). You need to have $NDDSHOME/bin in your PATH environment variable. In that case Recording Console will inherit its working directory from the command line shell.

  3. Use a shortcut to RTILauncher which sets the working directory. In that case Recording Console will inherit its working directory from RTILauncher.

    1. Windows (Windows 10): Create a shortcut to RTILauncher.exe. Right click in the shortcut and click properties, change the “Start In” property to the directory where your Recorder configuration files are located. Run RTI Launcher using this shortcut so Recording Console inherits the desired working directory. 

    2. Linux (Ubuntu 14.04.3 LTS and RTI Connext NDDS 5.2.0). Open file $NDDSHOME/rtilauncher.desktop and add line

      • Path=<your path>
      • <your path> should be the path where your Recorder configuration files are located.
  4. Do not use Recording Console, instead use rtirecord and rtireplay. Run command “rtirecord -cfgName recorderXmlType” You need to have $NDDSHOME/bin in your PATH environment variable. The name specified in parameter -cfgName is the name in tag <recorder> in file USER_RECORDING_SERVICE.xml.

Note that Recorder will automatically load the file named USER_RECORDING_SERVICE.xml in case Recorder can find it in the working directory. In the same way Replay will automatically load file named USER_REPLAY_SERVICE.xml in case Replay can find its working directory.