Configuration guide

Configuration parameters for Cyclone DDS are expressed in XML and grouped together in an XML file. To use a custom XML configuration in an application, you must set the CYCLONEDDS_URI environment variable to the location of the configuration file. For example:

set CYCLONEDDS_URI=file://%USERPROFILE%/CycloneDDS/my-config.xml

The following shows an example XML configuration:

/path/to/dds/configuration.xml
 1<?xml version="1.0" encoding="utf-8"?>
 2<CycloneDDS
 3  xmlns="https://cdds.io/config"
 4  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 5  xsi:schemaLocation="https://cdds.io/config https://raw.githubusercontent.com/eclipse-cyclonedds/cyclonedds/master/etc/cyclonedds.xsd"
 6>
 7  <Domain Id="any">
 8    <General>
 9      <Interfaces>
10        <NetworkInterface autodetermine="true" priority="default"
11        multicast="default" />
12      </Interfaces>
13      <AllowMulticast>default</AllowMulticast>
14      <MaxMessageSize>65500B</MaxMessageSize>
15    </General>
16    <Tracing>
17      <Verbosity>config</Verbosity>
18      <OutputFile>
19        ${HOME}/dds/log/cdds.log.${CYCLONEDDS_PID}
20      </OutputFile>
21    </Tracing>
22  </Domain>
23</CycloneDDS>

For a full listing of the configuration settings (and default value for each parameter) refer to the Configuration File Reference, which is generated directly from the source code.

The configuration does not depend exclusively on the xml file. The content of the xml can be set directly into the envrionment variable CYCLONEDDS_URI. In the following block a example is given for windows and linux. On windows it is important to set the quotation mark directly after the set command, otherwise < and > has to be escaped with ^.

set "CYCLONEDDS_URI=<CycloneDDS><Domain><General><NetworkInterfaceAddress>127.0.0.1</NetworkInterfaceAddress></General></Domain></CycloneDDS>"
set CYCLONEDDS_URI=^<CycloneDDS^>^<Domain^>^<General^>^<NetworkInterfaceAddress^>127.0.0.1^</NetworkInterfaceAddress^>^</General^>^</Domain^>^</CycloneDDS^>

The example configuration above is helpfull if you are developing on a machine with activated firewall. Otherwise it would not be possible to send and receive messages between apps on the local machine. The ip 127.0.0.1 expresses that the communication shall be restricted to your pc only (localhost).

Configuration log files

When editing configuration files, the cdds.log can be very useful for providing information about the build. To determine the information included in the log file, change the Tracing/Verbosity settings.