From d429045255c29d32a7ccb83d00045cdf7fa35466 Mon Sep 17 00:00:00 2001
From: Erik Boasson
Date: Wed, 2 Oct 2019 11:09:27 +0200
Subject: [PATCH] Add option documentation and add XSD
The ``docs/makernc.pl`` perl script can extract the options from the
source code for the configuration processing and turn these into a
GitHub MarkDown document and a RELAX NG Compact form (RNC) description
of the options. Standard conversion tools can be used to turn the RNC
file into an XSD.
Although they are generated by a mechanical transformation, it is not
(yet) part of the build process, in no small part because there no
proper generation and publishing system has yet been set up for the
documentation.
Now that there is an XSD and a Markdown file for discovering the
options, there is no need to retain the configuration editing tool. Any
decent editor will do a better job.
Signed-off-by: Erik Boasson
---
CMakeLists.txt | 1 -
README.md | 16 +-
cdds.md | 1926 ++++++++++++++++
docs/makernc.pl | 650 ++++++
docs/manual/options.md | 1842 +++++++++++++++
etc/cyclonedds.rnc | 1507 ++++++++++++
etc/cyclonedds.xsd | 2018 +++++++++++++++++
src/core/ddsi/src/q_config.c | 27 +-
src/tools/CMakeLists.txt | 3 -
src/tools/config/CMakeLists.txt | 29 -
src/tools/config/excx.pl | 471 ----
src/tools/config/metaconfig.xml | 1254 ----------
src/tools/config/metaconfig.xsd | 289 ---
.../common/controller/AssignmentResult.java | 51 -
.../cyclonedds/common/util/Config.java | 404 ----
.../common/util/ConfigValidator.java | 55 -
.../cyclonedds/common/util/Initializer.java | 89 -
.../cyclonedds/common/util/Report.java | 124 -
.../common/view/CommonFileChooser.java | 88 -
.../cyclonedds/common/view/DialogWindow.java | 324 ---
.../cyclonedds/common/view/MainWindow.java | 106 -
.../common/view/NameValuePanel.java | 149 --
.../cyclonedds/common/view/StatusPanel.java | 392 ----
.../cyclonedds/config/CycloneConfig.java | 75 -
.../cyclonedds/config/data/DataAttribute.java | 70 -
.../config/data/DataConfiguration.java | 1017 ---------
.../data/DataConfigurationListener.java | 21 -
.../cyclonedds/config/data/DataElement.java | 197 --
.../cyclonedds/config/data/DataException.java | 20 -
.../cyclonedds/config/data/DataNode.java | 73 -
.../cyclonedds/config/data/DataValue.java | 296 ---
.../cyclonedds/config/meta/MetaAttribute.java | 95 -
.../config/meta/MetaConfiguration.java | 1085 ---------
.../cyclonedds/config/meta/MetaElement.java | 137 --
.../cyclonedds/config/meta/MetaException.java | 31 -
.../config/meta/MetaExceptionType.java | 16 -
.../cyclonedds/config/meta/MetaNode.java | 34 -
.../cyclonedds/config/meta/MetaValue.java | 65 -
.../config/meta/MetaValueBoolean.java | 30 -
.../config/meta/MetaValueDouble.java | 58 -
.../cyclonedds/config/meta/MetaValueEnum.java | 96 -
.../config/meta/MetaValueFloat.java | 58 -
.../cyclonedds/config/meta/MetaValueInt.java | 59 -
.../cyclonedds/config/meta/MetaValueLong.java | 58 -
.../config/meta/MetaValueNatural.java | 92 -
.../cyclonedds/config/meta/MetaValueSize.java | 58 -
.../config/meta/MetaValueString.java | 50 -
.../config/swing/ConfigTransferHandler.java | 83 -
.../cyclonedds/config/swing/ConfigUtil.java | 96 -
.../cyclonedds/config/swing/ConfigWindow.java | 630 -----
.../config/swing/ConfigWindowController.java | 581 -----
.../config/swing/DataElementTable.java | 84 -
.../swing/DataElementTableCellRenderer.java | 50 -
.../config/swing/DataElementTableModel.java | 196 --
.../swing/DataElementTableModelEditor.java | 224 --
.../config/swing/DataElementTree.java | 223 --
.../config/swing/DataNodeMenuItem.java | 50 -
.../config/swing/DataNodePopup.java | 399 ----
.../config/swing/DataNodePopupSupport.java | 29 -
.../cyclonedds/config/swing/HelpWindow.java | 156 --
.../config/swing/MetaElementTree.java | 139 --
.../config/swing/MetaNodeDocPane.java | 206 --
.../cyclonedds/config/swing/ServicePanel.java | 273 ---
63 files changed, 7969 insertions(+), 11056 deletions(-)
create mode 100644 cdds.md
create mode 100644 docs/makernc.pl
create mode 100644 docs/manual/options.md
create mode 100644 etc/cyclonedds.rnc
create mode 100644 etc/cyclonedds.xsd
delete mode 100644 src/tools/config/CMakeLists.txt
delete mode 100644 src/tools/config/excx.pl
delete mode 100644 src/tools/config/metaconfig.xml
delete mode 100644 src/tools/config/metaconfig.xsd
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/common/controller/AssignmentResult.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/common/util/Config.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/common/util/ConfigValidator.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/common/util/Initializer.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/common/util/Report.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/common/view/CommonFileChooser.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/common/view/DialogWindow.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/common/view/MainWindow.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/common/view/NameValuePanel.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/common/view/StatusPanel.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/CycloneConfig.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/data/DataAttribute.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/data/DataConfiguration.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/data/DataConfigurationListener.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/data/DataElement.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/data/DataException.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/data/DataNode.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/data/DataValue.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/meta/MetaAttribute.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/meta/MetaConfiguration.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/meta/MetaElement.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/meta/MetaException.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/meta/MetaExceptionType.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/meta/MetaNode.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValue.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValueBoolean.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValueDouble.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValueEnum.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValueFloat.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValueInt.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValueLong.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValueNatural.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValueSize.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValueString.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/swing/ConfigTransferHandler.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/swing/ConfigUtil.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/swing/ConfigWindow.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/swing/ConfigWindowController.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/swing/DataElementTable.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/swing/DataElementTableCellRenderer.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/swing/DataElementTableModel.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/swing/DataElementTableModelEditor.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/swing/DataElementTree.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/swing/DataNodeMenuItem.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/swing/DataNodePopup.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/swing/DataNodePopupSupport.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/swing/HelpWindow.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/swing/MetaElementTree.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/swing/MetaNodeDocPane.java
delete mode 100644 src/tools/config/org/eclipse/cyclonedds/config/swing/ServicePanel.java
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4293a6b..2ca2613 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,7 +26,6 @@ endif()
# core library is required, there's no need to build them, and that in turn eliminates the Maven and
# JDK dependency.
option(BUILD_IDLC "Build IDL preprocessor" ON)
-option(BUILD_CONFTOOL "Build configuration file edit tool" ON)
# By default don't treat warnings as errors, else anyone building it with a different compiler that
# just happens to generate a warning, as well as anyone adding or modifying something and making a
diff --git a/README.md b/README.md
index b8ae413..c4352a4 100644
--- a/README.md
+++ b/README.md
@@ -28,10 +28,10 @@ installed, and the rest should already be there. On Windows, installing chocola
install git cmake openjdk maven`` should get you a long way. On macOS, ``brew install maven cmake``
and downloading and installing the JDK is easiest.
-The Java-based components are the preprocessor and a configurator tool. The run-time libraries are
-pure C code, so there is no need to have Java available on "target" machines. If desired, it is
-possible to do a build without Java or Maven installed by defining ``BUILD_IDLC=NO`` and
-``BUILD_CONFTOOL=NO``, but that effectively only gets you the core library. For the
+The Java-based components are the preprocessor and a configurator tool. The run-time
+libraries are pure C code, so there is no need to have Java available on "target"
+machines. If desired, it is possible to do a build without Java or Maven installed by
+defining ``BUILD_IDLC=NO``, but that effectively only gets you the core library. For the
current [ROS2 RMW layer](https://github.com/ros2/rmw_cyclonedds), that is sufficient.
To obtain Eclipse Cyclone DDS, do
@@ -185,6 +185,8 @@ be tweaked by creating an XML file with the desired settings and defining the ``
point to it. E.g. (on Linux):
$ cat cyclonedds.xml
+
+
@@ -231,9 +233,9 @@ This example shows a few things:
has buffered too much unacknowledged data. There is some auto-tuning, the (current) default value
is a bit small to get really high throughput.
-The configurator tool ``cycloneddsconf`` can help in discovering the settings, as can the config
-dump. Background information on configuring Cyclone DDS can be
-found [here](docs/manual/config.rst).
+Background information on configuring Cyclone DDS can be found
+[here](docs/manual/config.rst) and a list of settings is
+[available](docs/manual/options.md).
# Trademarks
diff --git a/cdds.md b/cdds.md
new file mode 100644
index 0000000..739d910
--- /dev/null
+++ b/cdds.md
@@ -0,0 +1,1926 @@
+
+
+# //CycloneDDS
+Children: [Domain](#cycloneddsdomain)
+
+
+CycloneDDS configuration
+
+
+## //CycloneDDS/Domain
+Attributes: [Id](#cycloneddsdomainid)
+
+Children: [Channels](#cycloneddsdomainchannels), [Compatibility](#cycloneddsdomaincompatibility), [Discovery](#cycloneddsdomaindiscovery), [General](#cycloneddsdomaingeneral), [Internal](#cycloneddsdomaininternal), [Partitioning](#cycloneddsdomainpartitioning), [SSL](#cycloneddsdomainssl), [Security](#cycloneddsdomainsecurity), [Sizing](#cycloneddsdomainsizing), [TCP](#cycloneddsdomaintcp), [ThreadPool](#cycloneddsdomainthreadpool), [Threads](#cycloneddsdomainthreads), [Tracing](#cycloneddsdomaintracing)
+
+
+The General element specifying Domain related settings.
+
+
+## //CycloneDDS/Domain[@Id]
+Text
+
+Domain id this configuration applies to, or "any" if it applies to all
+domain ids.
+
+The default value is: "any".
+
+
+### //CycloneDDS/Domain/Channels
+Children: [Channel](#cycloneddsdomainchannelschannel)
+
+
+This element is used to group a set of channels. The channels are
+independent data paths through Cyclone DDS and by using separate threads
+and setting their priorities appropriately, chanenls can be used to map
+transport priorities to operating system scheduler priorities, ensuring
+system-wide end-to-end priority preservation.
+
+
+#### //CycloneDDS/Domain/Channels/Channel
+Attributes: [Name](#cycloneddsdomainchannelschannelname), [TransportPriority](#cycloneddsdomainchannelschanneltransportpriority)
+
+Children: [AuxiliaryBandwidthLimit](#cycloneddsdomainchannelschannelauxiliarybandwidthlimit), [DataBandwidthLimit](#cycloneddsdomainchannelschanneldatabandwidthlimit), [DiffServField](#cycloneddsdomainchannelschanneldiffservfield)
+
+
+This element defines a channel.
+
+
+#### //CycloneDDS/Domain/Channels/Channel[@Name]
+Text
+
+This attribute specifies name of this channel. The name should uniquely
+identify the channel.
+
+
+#### //CycloneDDS/Domain/Channels/Channel[@TransportPriority]
+Integer
+
+This attribute sets the transport priority threshold for the channel.
+Each DCPS data writer has a "transport_priority" QoS and this QoS is used
+to select a channel for use by this writer. The selected channel is the
+one with the largest threshold not greater than the writer's transport
+priority, and if no such channel exists, the channel with the lowest
+threshold.
+
+The default value is: "0".
+
+
+##### //CycloneDDS/Domain/Channels/Channel/AuxiliaryBandwidthLimit
+Number-with-unit
+
+This element specifies the maximum transmit rate of auxiliary traffic on
+this channel (e.g. retransmits, heartbeats, etc). Bandwidth limiting uses
+a leaky bucket scheme. The default value "inf" means Cyclone DDS imposes
+no limitation, the underlying operating system and hardware will likely
+limit the maimum transmit rate.
+
+The unit must be specified explicitly. Recognised units: Xb/s, Xbps for
+bits/s or XB/s, XBps for bytes/s; where X is an optional prefix: k for
+10^3, Ki for 210, M for 106, Mi for 220,
+G for 109, Gi for 230.
+
+The default value is: "inf".
+
+
+##### //CycloneDDS/Domain/Channels/Channel/DataBandwidthLimit
+Number-with-unit
+
+This element specifies the maximum transmit rate of new samples and
+directly related data, for this channel. Bandwidth limiting uses a leaky
+bucket scheme. The default value "inf" means Cyclone DDS imposes no
+limitation, the underlying operating system and hardware will likely
+limit the maimum transmit rate.
+
+The unit must be specified explicitly. Recognised units: Xb/s, Xbps for
+bits/s or XB/s, XBps for bytes/s; where X is an optional prefix: k for
+10^3, Ki for 210, M for 106, Mi for 220,
+G for 109, Gi for 230.
+
+The default value is: "inf".
+
+
+##### //CycloneDDS/Domain/Channels/Channel/DiffServField
+Integer
+
+This element describes the DiffServ setting the channel will apply to the
+networking messages. This parameter determines the value of the diffserv
+field of the IP version 4 packets sent on this channel which allows QoS
+setting to be applied to the network traffic send on this channel.
+
+Windows platform support for setting the diffserv field is dependent on
+the OS version.
+
+For Windows versions XP SP2 and 2003 to use the diffserv field the
+following parameter should be added to the register:
+
+HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TcpIp\Parameters\DisableUserTOSSetting
+
+The type of this parameter is a DWORD and its value should be set to 0 to
+allow setting of the diffserv field.
+
+For Windows version 7 or higher a new API (qWAVE) has been introduced.
+For these platforms the specified diffserv value is mapped to one of the
+support traffic types.
+
+The mapping is as follows: 1-8 background traffic; 9-40 excellent
+traffic; 41-55 audio/video traffic; 56 voice traffic; 57-63 control
+traffic.
+
+When an application is run without Administrative priveleges then only
+the diffserv value of 0, 8, 40 or 56 is allowed.
+
+The default value is: "0".
+
+
+### //CycloneDDS/Domain/Compatibility
+Children: [AssumeRtiHasPmdEndpoints](#cycloneddsdomaincompatibilityassumertihaspmdendpoints), [ExplicitlyPublishQosSetToDefault](#cycloneddsdomaincompatibilityexplicitlypublishqossettodefault), [ManySocketsMode](#cycloneddsdomaincompatibilitymanysocketsmode), [StandardsConformance](#cycloneddsdomaincompatibilitystandardsconformance)
+
+
+The Compatibility elements allows specifying various settings related to
+compatability with standards and with other DDSI implementations.
+
+
+#### //CycloneDDS/Domain/Compatibility/AssumeRtiHasPmdEndpoints
+Boolean
+
+This option assumes ParticipantMessageData endpoints required by the
+liveliness protocol are present in RTI participants even when not
+properly advertised by the participant discovery protocol.
+
+The default value is: "false".
+
+
+#### //CycloneDDS/Domain/Compatibility/ExplicitlyPublishQosSetToDefault
+Boolean
+
+This element specifies whether QoS settings set to default values are
+explicitly published in the discovery protocol. Implementations are to
+use the default value for QoS settings not published, which allows a
+significant reduction of the amount of data that needs to be exchanged
+for the discovery protocol, but this requires all implementations to
+adhere to the default values specified by the specifications.
+
+When interoperability is required with an implementation that does not
+follow the specifications in this regard, setting this option to true
+will help.
+
+The default value is: "false".
+
+
+#### //CycloneDDS/Domain/Compatibility/ManySocketsMode
+One of: false, true, single, none, many
+
+This option specifies whether a network socket will be created for each
+domain participant on a host. The specification seems to assume that each
+participant has a unique address, and setting this option will ensure
+this to be the case. This is not the defeault.
+
+Disabling it slightly improves performance and reduces network traffic
+somewhat. It also causes the set of port numbers needed by Cyclone DDS to
+become predictable, which may be useful for firewall and NAT
+configuration.
+
+The default value is: "single".
+
+
+#### //CycloneDDS/Domain/Compatibility/StandardsConformance
+One of: lax, strict, pedantic
+
+This element sets the level of standards conformance of this instance of
+the Cyclone DDS Service. Stricter conformance typically means less
+interoperability with other implementations. Currently three modes are
+defined:
+
+* pedantic: very strictly conform to the specification, ultimately for
+ compliancy testing, but currently of little value because it adheres even to
+ what will most likely turn out to be editing errors in the DDSI standard.
+ Arguably, as long as no errata have been published it is the current text
+ that is in effect, and that is what pedantic currently does.
+
+* strict: a slightly less strict view of the standard than does pedantic: it
+ follows the established behaviour where the standard is obviously in error.
+
+* lax: attempt to provide the smoothest possible interoperability, anticipating
+ future revisions of elements in the standard in areas that other
+ implementations do not adhere to, even though there is no good reason not to.
+
+The default setting is "lax".
+
+The default value is: "lax".
+
+
+### //CycloneDDS/Domain/Discovery
+Children: [DSGracePeriod](#cycloneddsdomaindiscoverydsgraceperiod), [DefaultMulticastAddress](#cycloneddsdomaindiscoverydefaultmulticastaddress), [EnableTopicDiscovery](#cycloneddsdomaindiscoveryenabletopicdiscovery), [MaxAutoParticipantIndex](#cycloneddsdomaindiscoverymaxautoparticipantindex), [ParticipantIndex](#cycloneddsdomaindiscoveryparticipantindex), [Peers](#cycloneddsdomaindiscoverypeers), [Ports](#cycloneddsdomaindiscoveryports), [SPDPInterval](#cycloneddsdomaindiscoveryspdpinterval), [SPDPMulticastAddress](#cycloneddsdomaindiscoveryspdpmulticastaddress)
+
+
+The Discovery element allows specifying various parameters related to the
+discovery of peers.
+
+
+#### //CycloneDDS/Domain/Discovery/DSGracePeriod
+Number-with-unit
+
+This setting controls for how long endpoints discovered via a Cloud
+discovery service will survive after the discovery service disappeared,
+allowing reconnect without loss of data when the discovery service
+restarts (or another instance takes over).
+
+Valid values are finite durations with an explicit unit or the keyword
+'inf' for infinity. Recognised units: ns, us, ms, s, min, hr, day.
+
+The default value is: "30 s".
+
+
+#### //CycloneDDS/Domain/Discovery/DefaultMulticastAddress
+Text
+
+This element specifies the default multicast address for all traffic
+other than participant discovery packets. It defaults to
+Discovery/SPDPMulticastAddress.
+
+The default value is: "auto".
+
+
+#### //CycloneDDS/Domain/Discovery/EnableTopicDiscovery
+Boolean
+
+Do not use.
+
+The default value is: "true".
+
+
+#### //CycloneDDS/Domain/Discovery/MaxAutoParticipantIndex
+Integer
+
+This element specifies the maximum DDSI participant index selected by
+this instance of the Cyclone DDS service if the
+Discovery/ParticipantIndex is "auto".
+
+The default value is: "9".
+
+
+#### //CycloneDDS/Domain/Discovery/ParticipantIndex
+Text
+
+This element specifies the DDSI participant index used by this instance
+of the Cyclone DDS service for discovery purposes. Only one such
+participant id is used, independent of the number of actual
+DomainParticipants on the node. It is either:
+
+* auto: which will attempt to automatically determine an available participant
+ index (see also Discovery/MaxAutoParticipantIndex), or
+
+* a non-negative integer less than 120, or
+
+* none:, which causes it to use arbitrary port numbers for unicast sockets
+ which entirely removes the constraints on the participant index but makes
+ unicast discovery impossible.
+
+The default is auto. The participant index is part of the port number
+calculation and if predictable port numbers are needed and fixing the
+participant index has no adverse effects, it is recommended that the
+second be option be used.
+
+The default value is: "none".
+
+
+#### //CycloneDDS/Domain/Discovery/Peers
+Children: [Group](#cycloneddsdomaindiscoverypeersgroup), [Peer](#cycloneddsdomaindiscoverypeerspeer)
+
+
+This element statically configures addresses for discovery.
+
+Valid values are finite durations with an explicit unit or the keyword
+'inf' for infinity. Recognised units: ns, us, ms, s, min, hr, day.
+
+
+##### //CycloneDDS/Domain/Discovery/Peers/Group
+Children: [Peer](#cycloneddsdomaindiscoverypeersgrouppeer)
+
+
+This element statically configures a fault tolerant group of addresses
+for discovery. Each member of the group is tried in sequence until one
+succeeds.
+
+
+###### //CycloneDDS/Domain/Discovery/Peers/Group/Peer
+Attributes: [Address](#cycloneddsdomaindiscoverypeersgrouppeeraddress)
+
+
+This element statically configures an addresses for discovery.
+
+
+###### //CycloneDDS/Domain/Discovery/Peers/Group/Peer[@Address]
+Text
+
+This element specifies an IP address to which discovery packets must be
+sent, in addition to the default multicast address (see also
+General/AllowMulticast). Both a hostnames and a numerical IP address is
+accepted; the hostname or IP address may be suffixed with :PORT to
+explicitly set the port to which it must be sent. Multiple Peers may be
+specified.
+
+
+##### //CycloneDDS/Domain/Discovery/Peers/Peer
+Attributes: [Address](#cycloneddsdomaindiscoverypeerspeeraddress)
+
+
+This element statically configures an addresses for discovery.
+
+
+##### //CycloneDDS/Domain/Discovery/Peers/Peer[@Address]
+Text
+
+This element specifies an IP address to which discovery packets must be
+sent, in addition to the default multicast address (see also
+General/AllowMulticast). Both a hostnames and a numerical IP address is
+accepted; the hostname or IP address may be suffixed with :PORT to
+explicitly set the port to which it must be sent. Multiple Peers may be
+specified.
+
+
+#### //CycloneDDS/Domain/Discovery/Ports
+Children: [Base](#cycloneddsdomaindiscoveryportsbase), [DomainGain](#cycloneddsdomaindiscoveryportsdomaingain), [MulticastDataOffset](#cycloneddsdomaindiscoveryportsmulticastdataoffset), [MulticastMetaOffset](#cycloneddsdomaindiscoveryportsmulticastmetaoffset), [ParticipantGain](#cycloneddsdomaindiscoveryportsparticipantgain), [UnicastDataOffset](#cycloneddsdomaindiscoveryportsunicastdataoffset), [UnicastMetaOffset](#cycloneddsdomaindiscoveryportsunicastmetaoffset)
+
+
+The Ports element allows specifying various parameters related to the
+port numbers used for discovery. These all have default values specified
+by the DDSI 2.1 specification and rarely need to be changed.
+
+
+##### //CycloneDDS/Domain/Discovery/Ports/Base
+Integer
+
+This element specifies the base port number (refer to the DDSI 2.1
+specification, section 9.6.1, constant PB).
+
+The default value is: "7400".
+
+
+##### //CycloneDDS/Domain/Discovery/Ports/DomainGain
+Integer
+
+This element specifies the domain gain, relating domain ids to sets of
+port numbers (refer to the DDSI 2.1 specification, section 9.6.1,
+constant DG).
+
+The default value is: "250".
+
+
+##### //CycloneDDS/Domain/Discovery/Ports/MulticastDataOffset
+Integer
+
+This element specifies the port number for multicast meta traffic (refer
+to the DDSI 2.1 specification, section 9.6.1, constant d2).
+
+The default value is: "1".
+
+
+##### //CycloneDDS/Domain/Discovery/Ports/MulticastMetaOffset
+Integer
+
+This element specifies the port number for multicast meta traffic (refer
+to the DDSI 2.1 specification, section 9.6.1, constant d0).
+
+The default value is: "0".
+
+
+##### //CycloneDDS/Domain/Discovery/Ports/ParticipantGain
+Integer
+
+This element specifies the participant gain, relating p0, articipant
+index to sets of port numbers (refer to the DDSI 2.1 specification,
+section 9.6.1, constant PG).
+
+The default value is: "2".
+
+
+##### //CycloneDDS/Domain/Discovery/Ports/UnicastDataOffset
+Integer
+
+This element specifies the port number for unicast meta traffic (refer to
+the DDSI 2.1 specification, section 9.6.1, constant d3).
+
+The default value is: "11".
+
+
+##### //CycloneDDS/Domain/Discovery/Ports/UnicastMetaOffset
+Integer
+
+This element specifies the port number for unicast meta traffic (refer to
+the DDSI 2.1 specification, section 9.6.1, constant d1).
+
+The default value is: "10".
+
+
+#### //CycloneDDS/Domain/Discovery/SPDPInterval
+Number-with-unit
+
+This element specifies the interval between spontaneous transmissions of
+participant discovery packets.
+
+The unit must be specified explicitly. Recognised units: ns, us, ms, s,
+min, hr, day.
+
+The default value is: "30 s".
+
+
+#### //CycloneDDS/Domain/Discovery/SPDPMulticastAddress
+Text
+
+This element specifies the multicast address that is used as the
+destination for the participant discovery packets. In IPv4 mode the
+default is the (standardised) 239.255.0.1, in IPv6 mode it becomes
+ff02::ffff:239.255.0.1, which is a non-standardised link-local multicast
+address.
+
+The default value is: "239.255.0.1".
+
+
+### //CycloneDDS/Domain/General
+Children: [AllowMulticast](#cycloneddsdomaingeneralallowmulticast), [DontRoute](#cycloneddsdomaingeneraldontroute), [EnableMulticastLoopback](#cycloneddsdomaingeneralenablemulticastloopback), [ExternalNetworkAddress](#cycloneddsdomaingeneralexternalnetworkaddress), [ExternalNetworkMask](#cycloneddsdomaingeneralexternalnetworkmask), [FragmentSize](#cycloneddsdomaingeneralfragmentsize), [MaxMessageSize](#cycloneddsdomaingeneralmaxmessagesize), [MulticastRecvNetworkInterfaceAddresses](#cycloneddsdomaingeneralmulticastrecvnetworkinterfaceaddresses), [MulticastTimeToLive](#cycloneddsdomaingeneralmulticasttimetolive), [NetworkInterfaceAddress](#cycloneddsdomaingeneralnetworkinterfaceaddress), [PreferMulticast](#cycloneddsdomaingeneralprefermulticast), [Transport](#cycloneddsdomaingeneraltransport), [UseIPv6](#cycloneddsdomaingeneraluseipv6)
+
+
+The General element specifies overall Cyclone DDS service settings.
+
+
+#### //CycloneDDS/Domain/General/AllowMulticast
+One of:
+* Keyword: default
+* Comma-separated list of: false, spdp, asm, ssm, true
+
+This element controls whether Cyclone DDS uses multicasts for data
+traffic.
+
+It is a comma-separated list of some of the following keywords: "spdp",
+"asm", "ssm", or either of "false" or "true", or "default".
+
+* spdp: enables the use of ASM (any-source multicast) for participant
+ discovery, joining the multicast group on the discovery socket, transmitting
+ SPDP messages to this group, but never advertising nor using any multicast
+ address in any discovery message, thus forcing unicast communications for all
+ endpoint discovery and user data.
+
+* asm: enables the use of ASM for all traffic, including receiving SPDP but not
+ transmitting SPDP messages via multicast
+
+* ssm: enables the use of SSM (source-specific multicast) for all non-SPDP
+ traffic (if supported)
+
+When set to "false" all multicasting is disabled. The default, "true"
+enables full use of multicasts. Listening for multicasts can be
+controlled by General/MulticastRecvNetworkInterfaceAddresses.
+
+"default" maps on spdp if the network is a WiFi network, on true if it is
+a wired network
+
+The default value is: "default".
+
+
+#### //CycloneDDS/Domain/General/DontRoute
+Boolean
+
+This element allows setting the SO_DONTROUTE option for outgoing packets,
+to bypass the local routing tables. This is generally useful only when
+the routing tables cannot be trusted, which is highly unusual.
+
+The default value is: "false".
+
+
+#### //CycloneDDS/Domain/General/EnableMulticastLoopback
+Boolean
+
+This element specifies whether Cyclone DDS allows IP multicast packets to
+be visible to all DDSI participants in the same node, including itself.
+It must be "true" for intra-node multicast communications, but if a node
+runs only a single Cyclone DDS service and does not host any other
+DDSI-capable programs, it should be set to "false" for improved
+performance.
+
+The default value is: "true".
+
+
+#### //CycloneDDS/Domain/General/ExternalNetworkAddress
+Text
+
+This element allows explicitly overruling the network address Cyclone DDS
+advertises in the discovery protocol, which by default is the address of
+the preferred network interface (General/NetworkInterfaceAddress), to
+allow Cyclone DDS to communicate across a Network Address Translation
+(NAT) device.
+
+The default value is: "auto".
+
+
+#### //CycloneDDS/Domain/General/ExternalNetworkMask
+Text
+
+This element specifies the network mask of the external network address.
+This element is relevant only when an external network address
+(General/ExternalNetworkAddress) is explicitly configured. In this case
+locators received via the discovery protocol that are within the same
+external subnet (as defined by this mask) will be translated to an
+internal address by replacing the network portion of the external address
+with the corresponding portion of the preferred network interface
+address. This option is IPv4-only.
+
+The default value is: "0.0.0.0".
+
+
+#### //CycloneDDS/Domain/General/FragmentSize
+Number-with-unit
+
+This element specifies the size of DDSI sample fragments generated by
+Cyclone DDS. Samples larger than FragmentSize are fragmented into
+fragments of FragmentSize bytes each, except the last one, which may be
+smaller. The DDSI spec mandates a minimum fragment size of 1025 bytes,
+but Cyclone DDS will do whatever size is requested, accepting fragments
+of which the size is at least the minimum of 1025 and FragmentSize.
+
+The unit must be specified explicitly. Recognised units: B (bytes), kB &
+KiB (2^10 bytes), MB & MiB (220 bytes), GB & GiB
+(230 bytes).
+
+The default value is: "1280 B".
+
+
+#### //CycloneDDS/Domain/General/MaxMessageSize
+Number-with-unit
+
+This element specifies the maximum size of the UDP payload that Cyclone
+DDS will generate. Cyclone DDS will try to maintain this limit within the
+bounds of the DDSI specification, which means that in some cases
+(especially for very low values of MaxMessageSize) larger payloads may
+sporadically be observed (currently up to 1192 B).
+
+On some networks it may be necessary to set this item to keep the
+packetsize below the MTU to prevent IP fragmentation. In those cases, it
+is generally advisable to also consider reducing Internal/FragmentSize.
+
+The unit must be specified explicitly. Recognised units: B (bytes), kB &
+KiB (2^10 bytes), MB & MiB (220 bytes), GB & GiB
+(230 bytes).
+
+The default value is: "4096 B".
+
+
+#### //CycloneDDS/Domain/General/MulticastRecvNetworkInterfaceAddresses
+Text
+
+This element specifies on which network interfaces Cyclone DDS listens to
+multicasts. The following options are available:
+
+* all: listen for multicasts on all multicast-capable interfaces; or
+
+* any: listen for multicasts on the operating system default interface; or
+
+* preferred: listen for multicasts on the preferred interface
+ (General/NetworkInterfaceAddress); or
+
+* none: does not listen for multicasts on any interface; or
+
+* a comma-separated list of network addresses: configures Cyclone DDS to listen
+ for multicasts on all of the listed addresses.
+
+If Cyclone DDS is in IPv6 mode and the address of the preferred network
+interface is a link-local address, "all" is treated as a synonym for
+"preferred" and a comma-separated list is treated as "preferred" if it
+contains the preferred interface and as "none" if not.
+
+The default value is: "preferred".
+
+
+#### //CycloneDDS/Domain/General/MulticastTimeToLive
+Integer
+
+This element specifies the time-to-live setting for outgoing multicast
+packets.
+
+The default value is: "32".
+
+
+#### //CycloneDDS/Domain/General/NetworkInterfaceAddress
+Text
+
+This element specifies the preferred network interface for use by Cyclone
+DDS. The preferred network interface determines the IP address that
+Cyclone DDS advertises in the discovery protocol (but see also
+General/ExternalNetworkAddress), and is also the only interface over
+which multicasts are transmitted. The interface can be identified by its
+IP address, network interface name or network portion of the address. If
+the value "auto" is entered here, Cyclone DDS will select what it
+considers the most suitable interface.
+
+The default value is: "auto".
+
+
+#### //CycloneDDS/Domain/General/PreferMulticast
+Boolean
+
+When false (default) Cyclone DDS uses unicast for data whenever there a
+single unicast suffices. Setting this to true makes it prefer
+multicasting data, falling back to unicast only when no multicast address
+is available.
+
+The default value is: "false".
+
+
+#### //CycloneDDS/Domain/General/Transport
+One of: default, udp, udp6, tcp, tcp6, raweth
+
+This element allows selecting the transport to be used (udp, udp6, tcp,
+tcp6, raweth)
+
+The default value is: "default".
+
+
+#### //CycloneDDS/Domain/General/UseIPv6
+One of: false, true, default
+
+Deprecated (use Transport instead)
+
+The default value is: "default".
+
+
+### //CycloneDDS/Domain/Internal
+Children: [AccelerateRexmitBlockSize](#cycloneddsdomaininternalacceleraterexmitblocksize), [AssumeMulticastCapable](#cycloneddsdomaininternalassumemulticastcapable), [AutoReschedNackDelay](#cycloneddsdomaininternalautoreschednackdelay), [AuxiliaryBandwidthLimit](#cycloneddsdomaininternalauxiliarybandwidthlimit), [BuiltinEndpointSet](#cycloneddsdomaininternalbuiltinendpointset), [ControlTopic](#cycloneddsdomaininternalcontroltopic), [DDSI2DirectMaxThreads](#cycloneddsdomaininternalddsi2directmaxthreads), [DefragReliableMaxSamples](#cycloneddsdomaininternaldefragreliablemaxsamples), [DefragUnreliableMaxSamples](#cycloneddsdomaininternaldefragunreliablemaxsamples), [DeliveryQueueMaxSamples](#cycloneddsdomaininternaldeliveryqueuemaxsamples), [EnableExpensiveChecks](#cycloneddsdomaininternalenableexpensivechecks), [GenerateKeyhash](#cycloneddsdomaininternalgeneratekeyhash), [HeartbeatInterval](#cycloneddsdomaininternalheartbeatinterval), [LateAckMode](#cycloneddsdomaininternallateackmode), [LeaseDuration](#cycloneddsdomaininternalleaseduration), [LivelinessMonitoring](#cycloneddsdomaininternallivelinessmonitoring), [MaxParticipants](#cycloneddsdomaininternalmaxparticipants), [MaxQueuedRexmitBytes](#cycloneddsdomaininternalmaxqueuedrexmitbytes), [MaxQueuedRexmitMessages](#cycloneddsdomaininternalmaxqueuedrexmitmessages), [MaxSampleSize](#cycloneddsdomaininternalmaxsamplesize), [MeasureHbToAckLatency](#cycloneddsdomaininternalmeasurehbtoacklatency), [MinimumSocketReceiveBufferSize](#cycloneddsdomaininternalminimumsocketreceivebuffersize), [MinimumSocketSendBufferSize](#cycloneddsdomaininternalminimumsocketsendbuffersize), [MonitorPort](#cycloneddsdomaininternalmonitorport), [MultipleReceiveThreads](#cycloneddsdomaininternalmultiplereceivethreads), [NackDelay](#cycloneddsdomaininternalnackdelay), [PreEmptiveAckDelay](#cycloneddsdomaininternalpreemptiveackdelay), [PrimaryReorderMaxSamples](#cycloneddsdomaininternalprimaryreordermaxsamples), [PrioritizeRetransmit](#cycloneddsdomaininternalprioritizeretransmit), [RediscoveryBlacklistDuration](#cycloneddsdomaininternalrediscoveryblacklistduration), [RetransmitMerging](#cycloneddsdomaininternalretransmitmerging), [RetransmitMergingPeriod](#cycloneddsdomaininternalretransmitmergingperiod), [RetryOnRejectBestEffort](#cycloneddsdomaininternalretryonrejectbesteffort), [SPDPResponseMaxDelay](#cycloneddsdomaininternalspdpresponsemaxdelay), [ScheduleTimeRounding](#cycloneddsdomaininternalscheduletimerounding), [SecondaryReorderMaxSamples](#cycloneddsdomaininternalsecondaryreordermaxsamples), [SendAsync](#cycloneddsdomaininternalsendasync), [SquashParticipants](#cycloneddsdomaininternalsquashparticipants), [SynchronousDeliveryLatencyBound](#cycloneddsdomaininternalsynchronousdeliverylatencybound), [SynchronousDeliveryPriorityThreshold](#cycloneddsdomaininternalsynchronousdeliveryprioritythreshold), [Test](#cycloneddsdomaininternaltest), [UnicastResponseToSPDPMessages](#cycloneddsdomaininternalunicastresponsetospdpmessages), [UseMulticastIfMreqn](#cycloneddsdomaininternalusemulticastifmreqn), [Watermarks](#cycloneddsdomaininternalwatermarks), [WriteBatch](#cycloneddsdomaininternalwritebatch), [WriterLingerDuration](#cycloneddsdomaininternalwriterlingerduration)
+
+
+The Internal elements deal with a variety of settings that evolving and
+that are not necessarily fully supported. For the vast majority of the
+Internal settings, the functionality per-se is supported, but the right
+to change the way the options control the functionality is reserved. This
+includes renaming or moving options.
+
+
+#### //CycloneDDS/Domain/Internal/AccelerateRexmitBlockSize
+Integer
+
+Proxy readers that are assumed to sill be retrieving historical data get
+this many samples retransmitted when they NACK something, even if some of
+these samples have sequence numbers outside the set covered by the NACK.
+
+The default value is: "0".
+
+
+#### //CycloneDDS/Domain/Internal/AssumeMulticastCapable
+Text
+
+This element controls which network interfaces are assumed to be capable
+of multicasting even when the interface flags returned by the operating
+system state it is not (this provides a workaround for some platforms).
+It is a comma-separated lists of patterns (with ? and * wildcards)
+against which the interface names are matched.
+
+The default value is: "".
+
+
+#### //CycloneDDS/Domain/Internal/AutoReschedNackDelay
+Number-with-unit
+
+This setting controls the interval with which a reader will continue
+NACK'ing missing samples in the absence of a response from the writer, as
+a protection mechanism against writers incorrectly stopping the sending
+of HEARTBEAT messages.
+
+Valid values are finite durations with an explicit unit or the keyword
+'inf' for infinity. Recognised units: ns, us, ms, s, min, hr, day.
+
+The default value is: "1 s".
+
+
+#### //CycloneDDS/Domain/Internal/AuxiliaryBandwidthLimit
+Number-with-unit
+
+This element specifies the maximum transmit rate of auxiliary traffic not
+bound to a specific channel, such as discovery traffic, as well as
+auxiliary traffic related to a certain channel if that channel has
+elected to share this global AuxiliaryBandwidthLimit. Bandwidth limiting
+uses a leaky bucket scheme. The default value "inf" means Cyclone DDS
+imposes no limitation, the underlying operating system and hardware will
+likely limit the maimum transmit rate.
+
+The unit must be specified explicitly. Recognised units: Xb/s, Xbps for
+bits/s or XB/s, XBps for bytes/s; where X is an optional prefix: k for
+10^3, Ki for 210, M for 106, Mi for 220,
+G for 109, Gi for 230.
+
+The default value is: "inf".
+
+
+#### //CycloneDDS/Domain/Internal/BuiltinEndpointSet
+One of: full, writers, minimal
+
+This element controls which participants will have which built-in
+endpoints for the discovery and liveliness protocols. Valid values are:
+
+* full: all participants have all endpoints;
+
+* writers: all participants have the writers, but just one has the readers;
+
+* minimal: only one participant has built-in endpoints.
+
+The default is writers, as this is thought to be compliant and reasonably
+efficient. Minimal may or may not be compliant but is most efficient, and
+full is inefficient but certain to be compliant. See also
+Internal/ConservativeBuiltinReaderStartup.
+
+The default value is: "writers".
+
+
+#### //CycloneDDS/Domain/Internal/ControlTopic
+
+The ControlTopic element allows configured whether Cyclone DDS provides a
+special control interface via a predefined topic or not.
+
+
+#### //CycloneDDS/Domain/Internal/DDSI2DirectMaxThreads
+Integer
+
+This element sets the maximum number of extra threads for an
+experimental, undocumented and unsupported direct mode.
+
+The default value is: "1".
+
+
+#### //CycloneDDS/Domain/Internal/DefragReliableMaxSamples
+Integer
+
+This element sets the maximum number of samples that can be defragmented
+simultaneously for a reliable writer. This has to be large enough to
+handle retransmissions of historical data in addition to new samples.
+
+The default value is: "16".
+
+
+#### //CycloneDDS/Domain/Internal/DefragUnreliableMaxSamples
+Integer
+
+This element sets the maximum number of samples that can be defragmented
+simultaneously for a best-effort writers.
+
+The default value is: "4".
+
+
+#### //CycloneDDS/Domain/Internal/DeliveryQueueMaxSamples
+Integer
+
+This element controls the Maximum size of a delivery queue, expressed in
+samples. Once a delivery queue is full, incoming samples destined for
+that queue are dropped until space becomes available again.
+
+The default value is: "256".
+
+
+#### //CycloneDDS/Domain/Internal/EnableExpensiveChecks
+One of:
+* Comma-separated list of: whc, rhc, all
+* Or empty
+
+This element enables expensive checks in builds with assertions enabled
+and is ignored otherwise. Recognised categories are:
+
+* whc: writer history cache checking
+
+* rhc: reader history cache checking
+
+
+
+In addition, there is the keyword all that enables all checks.
+
+The default value is: "".
+
+
+#### //CycloneDDS/Domain/Internal/GenerateKeyhash
+Boolean
+
+When true, include keyhashes in outgoing data for topics with keys.
+
+The default value is: "false".
+
+
+#### //CycloneDDS/Domain/Internal/HeartbeatInterval
+Number-with-unit
+
+This elemnents allows configuring the base interval for sending writer
+heartbeats and the bounds within it can vary.
+
+Valid values are finite durations with an explicit unit or the keyword
+'inf' for infinity. Recognised units: ns, us, ms, s, min, hr, day.
+
+The default value is: "100 ms".
+
+
+#### //CycloneDDS/Domain/Internal/LateAckMode
+Boolean
+
+Ack a sample only when it has been delivered, instead of when committed
+to delivering it.
+
+The default value is: "false".
+
+
+#### //CycloneDDS/Domain/Internal/LeaseDuration
+Number-with-unit
+
+This setting controls the default participant lease duration.
+
+The unit must be specified explicitly. Recognised units: ns, us, ms, s,
+min, hr, day.
+
+The default value is: "10 s".
+
+
+#### //CycloneDDS/Domain/Internal/LivelinessMonitoring
+Boolean
+
+This element controls whether or not implementation should internally
+monitor its own liveliness. If liveliness monitoring is enabled, stack
+traces can be dumped automatically when some thread appears to have
+stopped making progress.
+
+The default value is: "false".
+
+
+#### //CycloneDDS/Domain/Internal/MaxParticipants
+Integer
+
+This elements configures the maximum number of DCPS domain participants
+this Cyclone DDS instance is willing to service. 0 is unlimited.
+
+The default value is: "0".
+
+
+#### //CycloneDDS/Domain/Internal/MaxQueuedRexmitBytes
+Number-with-unit
+
+This setting limits the maximum number of bytes queued for
+retransmission. The default value of 0 is unlimited unless an
+AuxiliaryBandwidthLimit has been set, in which case it becomes NackDelay
+* AuxiliaryBandwidthLimit. It must be large enough to contain the largest
+sample that may need to be retransmitted.
+
+The unit must be specified explicitly. Recognised units: B (bytes), kB &
+KiB (2^10 bytes), MB & MiB (220 bytes), GB & GiB
+(230 bytes).
+
+The default value is: "50 kB".
+
+
+#### //CycloneDDS/Domain/Internal/MaxQueuedRexmitMessages
+Integer
+
+This settings limits the maximum number of samples queued for
+retransmission.
+
+The default value is: "200".
+
+
+#### //CycloneDDS/Domain/Internal/MaxSampleSize
+Number-with-unit
+
+This setting controls the maximum (CDR) serialised size of samples that
+Cyclone DDS will forward in either direction. Samples larger than this
+are discarded with a warning.
+
+The unit must be specified explicitly. Recognised units: B (bytes), kB &
+KiB (2^10 bytes), MB & MiB (220 bytes), GB & GiB
+(230 bytes).
+
+The default value is: "2147483647 B".
+
+
+#### //CycloneDDS/Domain/Internal/MeasureHbToAckLatency
+Boolean
+
+This element enables heartbeat-to-ack latency among Cyclone DDS services
+by prepending timestamps to Heartbeat and AckNack messages and
+calculating round trip times. This is non-standard behaviour. The
+measured latencies are quite noisy and are currently not used anywhere.
+
+The default value is: "false".
+
+
+#### //CycloneDDS/Domain/Internal/MinimumSocketReceiveBufferSize
+Number-with-unit
+
+This setting controls the minimum size of socket receive buffers. The
+operating system provides some size receive buffer upon creation of the
+socket, this option can be used to increase the size of the buffer beyond
+that initially provided by the operating system. If the buffer size
+cannot be increased to the specified size, an error is reported.
+
+The default setting is the word "default", which means Cyclone DDS will
+attempt to increase the buffer size to 1MB, but will silently accept a
+smaller buffer should that attempt fail.
+
+The unit must be specified explicitly. Recognised units: B (bytes), kB &
+KiB (2^10 bytes), MB & MiB (220 bytes), GB & GiB
+(230 bytes).
+
+The default value is: "default".
+
+
+#### //CycloneDDS/Domain/Internal/MinimumSocketSendBufferSize
+Number-with-unit
+
+This setting controls the minimum size of socket send buffers. This
+setting can only increase the size of the send buffer, if the operating
+system by default creates a larger buffer, it is left unchanged.
+
+The unit must be specified explicitly. Recognised units: B (bytes), kB &
+KiB (2^10 bytes), MB & MiB (220 bytes), GB & GiB
+(230 bytes).
+
+The default value is: "64 KiB".
+
+
+#### //CycloneDDS/Domain/Internal/MonitorPort
+Integer
+
+This element allows configuring a service that dumps a text description
+of part the internal state to TCP clients. By default (-1), this is
+disabled; specifying 0 means a kernel-allocated port is used; a positive
+number is used as the TCP port number.
+
+The default value is: "-1".
+
+
+#### //CycloneDDS/Domain/Internal/MultipleReceiveThreads
+Boolean
+
+This element controls whether all traffic is handled by a single receive
+thread or whether multiple receive threads may be used to improve
+latency. Currently multiple receive threads are only used for
+connectionless transport (e.g., UDP) and ManySocketsMode not set to
+single (the default).
+
+The default value is: "true".
+
+
+#### //CycloneDDS/Domain/Internal/NackDelay
+Number-with-unit
+
+This setting controls the delay between receipt of a HEARTBEAT indicating
+missing samples and a NACK (ignored when the HEARTBEAT requires an
+answer). However, no NACK is sent if a NACK had been scheduled already
+for a response earlier than the delay requests: then that NACK will
+incorporate the latest information.
+
+The unit must be specified explicitly. Recognised units: ns, us, ms, s,
+min, hr, day.
+
+The default value is: "10 ms".
+
+
+#### //CycloneDDS/Domain/Internal/PreEmptiveAckDelay
+Number-with-unit
+
+This setting controls the delay between the discovering a remote writer
+and sending a pre-emptive AckNack to discover the range of data
+available.
+
+The unit must be specified explicitly. Recognised units: ns, us, ms, s,
+min, hr, day.
+
+The default value is: "10 ms".
+
+
+#### //CycloneDDS/Domain/Internal/PrimaryReorderMaxSamples
+Integer
+
+This element sets the maximum size in samples of a primary re-order
+administration. Each proxy writer has one primary re-order administration
+to buffer the packet flow in case some packets arrive out of order. Old
+samples are forwarded to secondary re-order administrations associated
+with readers in need of historical data.
+
+The default value is: "128".
+
+
+#### //CycloneDDS/Domain/Internal/PrioritizeRetransmit
+Boolean
+
+This element controls whether retransmits are prioritized over new data,
+speeding up recovery.
+
+The default value is: "true".
+
+
+#### //CycloneDDS/Domain/Internal/RediscoveryBlacklistDuration
+Number-with-unit
+
+This element controls for how long a remote participant that was
+previously deleted will remain on a blacklist to prevent rediscovery,
+giving the software on a node time to perform any cleanup actions it
+needs to do. To some extent this delay is required internally by Cyclone
+DDS, but in the default configuration with the 'enforce' attribute set to
+false, Cyclone DDS will reallow rediscovery as soon as it has cleared its
+internal administration. Setting it to too small a value may result in
+the entry being pruned from the blacklist before Cyclone DDS is ready, it
+is therefore recommended to set it to at least several seconds.
+
+Valid values are finite durations with an explicit unit or the keyword
+'inf' for infinity. Recognised units: ns, us, ms, s, min, hr, day.
+
+The default value is: "10s".
+
+
+#### //CycloneDDS/Domain/Internal/RetransmitMerging
+One of: never, adaptive, always
+
+This elements controls the addressing and timing of retransmits. Possible
+values are:
+
+* never: retransmit only to the NACK-ing reader;
+
+* adaptive: attempt to combine retransmits needed for reliability, but send
+ historical (transient-local) data to the requesting reader only;
+
+* always: do not distinguish between different causes, always try to merge.
+
+The default is never. See also Internal/RetransmitMergingPeriod.
+
+The default value is: "never".
+
+
+#### //CycloneDDS/Domain/Internal/RetransmitMergingPeriod
+Number-with-unit
+
+This setting determines the size of the time window in which a NACK of
+some sample is ignored because a retransmit of that sample has been
+multicasted too recently. This setting has no effect on unicasted
+retransmits.
+
+See also Internal/RetransmitMerging.
+
+The unit must be specified explicitly. Recognised units: ns, us, ms, s,
+min, hr, day.
+
+The default value is: "5 ms".
+
+
+#### //CycloneDDS/Domain/Internal/RetryOnRejectBestEffort
+Boolean
+
+Whether or not to locally retry pushing a received best-effort sample
+into the reader caches when resource limits are reached.
+
+The default value is: "false".
+
+
+#### //CycloneDDS/Domain/Internal/SPDPResponseMaxDelay
+Number-with-unit
+
+Maximum pseudo-random delay in milliseconds between discovering a remote
+participant and responding to it.
+
+The unit must be specified explicitly. Recognised units: ns, us, ms, s,
+min, hr, day.
+
+The default value is: "0 ms".
+
+
+#### //CycloneDDS/Domain/Internal/ScheduleTimeRounding
+Number-with-unit
+
+This setting allows the timing of scheduled events to be rounded up so
+that more events can be handled in a single cycle of the event queue. The
+default is 0 and causes no rounding at all, i.e. are scheduled exactly,
+whereas a value of 10ms would mean that events are rounded up to the
+nearest 10 milliseconds.
+
+The unit must be specified explicitly. Recognised units: ns, us, ms, s,
+min, hr, day.
+
+The default value is: "0 ms".
+
+
+#### //CycloneDDS/Domain/Internal/SecondaryReorderMaxSamples
+Integer
+
+This element sets the maximum size in samples of a secondary re-order
+administration. The secondary re-order administration is per reader in
+need of historical data.
+
+The default value is: "128".
+
+
+#### //CycloneDDS/Domain/Internal/SendAsync
+Boolean
+
+This element controls whether the actual sending of packets occurs on the
+same thread that prepares them, or is done asynchronously by another
+thread.
+
+The default value is: "false".
+
+
+#### //CycloneDDS/Domain/Internal/SquashParticipants
+Boolean
+
+This element controls whether Cyclone DDS advertises all the domain
+participants it serves in DDSI (when set to false), or rather only one
+domain participant (the one corresponding to the Cyclone DDS process;
+when set to true). In the latter case Cyclone DDS becomes the virtual
+owner of all readers and writers of all domain participants, dramatically
+reducing discovery traffic (a similar effect can be obtained by setting
+Internal/BuiltinEndpointSet to "minimal" but with less loss of
+information).
+
+The default value is: "false".
+
+
+#### //CycloneDDS/Domain/Internal/SynchronousDeliveryLatencyBound
+Number-with-unit
+
+This element controls whether samples sent by a writer with QoS settings
+transport_priority >= SynchronousDeliveryPriorityThreshold and a
+latency_budget at most this element's value will be delivered
+synchronously from the "recv" thread, all others will be delivered
+asynchronously through delivery queues. This reduces latency at the
+expense of aggregate bandwidth.
+
+Valid values are finite durations with an explicit unit or the keyword
+'inf' for infinity. Recognised units: ns, us, ms, s, min, hr, day.
+
+The default value is: "inf".
+
+
+#### //CycloneDDS/Domain/Internal/SynchronousDeliveryPriorityThreshold
+Integer
+
+This element controls whether samples sent by a writer with QoS settings
+latency_budget <= SynchronousDeliveryLatencyBound and transport_priority
+greater than or equal to this element's value will be delivered
+synchronously from the "recv" thread, all others will be delivered
+asynchronously through delivery queues. This reduces latency at the
+expense of aggregate bandwidth.
+
+The default value is: "0".
+
+
+#### //CycloneDDS/Domain/Internal/Test
+Children: [XmitLossiness](#cycloneddsdomaininternaltestxmitlossiness)
+
+
+Testing options.
+
+
+##### //CycloneDDS/Domain/Internal/Test/XmitLossiness
+Integer
+
+This element controls the fraction of outgoing packets to drop, specified
+as samples per thousand.
+
+The default value is: "0".
+
+
+#### //CycloneDDS/Domain/Internal/UnicastResponseToSPDPMessages
+Boolean
+
+This element controls whether the response to a newly discovered
+participant is sent as a unicasted SPDP packet, instead of rescheduling
+the periodic multicasted one. There is no known benefit to setting this
+to false.
+
+The default value is: "true".
+
+
+#### //CycloneDDS/Domain/Internal/UseMulticastIfMreqn
+Integer
+
+Do not use.
+
+The default value is: "0".
+
+
+#### //CycloneDDS/Domain/Internal/Watermarks
+Children: [WhcAdaptive](#cycloneddsdomaininternalwatermarkswhcadaptive), [WhcHigh](#cycloneddsdomaininternalwatermarkswhchigh), [WhcHighInit](#cycloneddsdomaininternalwatermarkswhchighinit), [WhcLow](#cycloneddsdomaininternalwatermarkswhclow)
+
+
+Watermarks for flow-control.
+
+
+##### //CycloneDDS/Domain/Internal/Watermarks/WhcAdaptive
+Boolean
+
+This element controls whether Cyclone DDS will adapt the high-water mark
+to current traffic conditions, based on retransmit requests and transmit
+pressure.
+
+The default value is: "true".
+
+
+##### //CycloneDDS/Domain/Internal/Watermarks/WhcHigh
+Number-with-unit
+
+This element sets the maximum allowed high-water mark for the Cyclone DDS
+WHCs, expressed in bytes. A writer is suspended when the WHC reaches this
+size.
+
+The unit must be specified explicitly. Recognised units: B (bytes), kB &
+KiB (2^10 bytes), MB & MiB (220 bytes), GB & GiB
+(230 bytes).
+
+The default value is: "100 kB".
+
+
+##### //CycloneDDS/Domain/Internal/Watermarks/WhcHighInit
+Number-with-unit
+
+This element sets the initial level of the high-water mark for the
+Cyclone DDS WHCs, expressed in bytes.
+
+The unit must be specified explicitly. Recognised units: B (bytes), kB &
+KiB (2^10 bytes), MB & MiB (220 bytes), GB & GiB
+(230 bytes).
+
+The default value is: "30 kB".
+
+
+##### //CycloneDDS/Domain/Internal/Watermarks/WhcLow
+Number-with-unit
+
+This element sets the low-water mark for the Cyclone DDS WHCs, expressed
+in bytes. A suspended writer resumes transmitting when its Cyclone DDS
+WHC shrinks to this size.
+
+The unit must be specified explicitly. Recognised units: B (bytes), kB &
+KiB (2^10 bytes), MB & MiB (220 bytes), GB & GiB
+(230 bytes).
+
+The default value is: "1 kB".
+
+
+#### //CycloneDDS/Domain/Internal/WriteBatch
+Boolean
+
+This element enables the batching of write operations. By default each
+write operation writes through the write cache and out onto the
+transport. Enabling write batching causes multiple small write operations
+to be aggregated within the write cache into a single larger write. This
+gives greater throughput at the expense of latency. Currently there is no
+mechanism for the write cache to automatically flush itself, so that if
+write batching is enabled, the application may havee to use the
+dds_write_flush function to ensure thta all samples are written.
+
+The default value is: "false".
+
+
+#### //CycloneDDS/Domain/Internal/WriterLingerDuration
+Number-with-unit
+
+This setting controls the maximum duration for which actual deletion of a
+reliable writer with unacknowledged data in its history will be postponed
+to provide proper reliable transmission.
+
+The unit must be specified explicitly. Recognised units: ns, us, ms, s,
+min, hr, day.
+
+The default value is: "1 s".
+
+
+### //CycloneDDS/Domain/Partitioning
+Children: [IgnoredPartitions](#cycloneddsdomainpartitioningignoredpartitions), [NetworkPartitions](#cycloneddsdomainpartitioningnetworkpartitions), [PartitionMappings](#cycloneddsdomainpartitioningpartitionmappings)
+
+
+The Partitioning element specifies Cyclone DDS network partitions and how
+DCPS partition/topic combinations are mapped onto the network partitions.
+
+
+#### //CycloneDDS/Domain/Partitioning/IgnoredPartitions
+Children: [IgnoredPartition](#cycloneddsdomainpartitioningignoredpartitionsignoredpartition)
+
+
+The IgnoredPartitions element specifies DCPS partition/topic combinations
+that are not distributed over the network.
+
+
+##### //CycloneDDS/Domain/Partitioning/IgnoredPartitions/IgnoredPartition
+Attributes: [DCPSPartitionTopic](#cycloneddsdomainpartitioningignoredpartitionsignoredpartitiondcpspartitiontopic)
+
+
+This element can be used to prevent certain combinations of DCPS
+partition and topic from being transmitted over the network. Cyclone DDS
+will complete ignore readers and writers for which all DCPS partitions as
+well as their topic is ignored, not even creating DDSI readers and
+writers to mirror the DCPS ones.
+
+
+##### //CycloneDDS/Domain/Partitioning/IgnoredPartitions/IgnoredPartition[@DCPSPartitionTopic]
+Text
+
+This attribute specifies a partition and a topic expression, separated by
+a single '.', that are used to determine if a given partition and topic
+will be ignored or not. The expressions may use the usual wildcards '*'
+and '?'. Cyclone DDS will consider an wildcard DCPS partition to match an
+expression iff there exists a string that satisfies both expressions.
+
+
+#### //CycloneDDS/Domain/Partitioning/NetworkPartitions
+Children: [NetworkPartition](#cycloneddsdomainpartitioningnetworkpartitionsnetworkpartition)
+
+
+The NetworkPartitions element specifies the Cyclone DDS network
+partitions.
+
+
+##### //CycloneDDS/Domain/Partitioning/NetworkPartitions/NetworkPartition
+Attributes: [Address](#cycloneddsdomainpartitioningnetworkpartitionsnetworkpartitionaddress), [Connected](#cycloneddsdomainpartitioningnetworkpartitionsnetworkpartitionconnected), [Name](#cycloneddsdomainpartitioningnetworkpartitionsnetworkpartitionname), [SecurityProfile](#cycloneddsdomainpartitioningnetworkpartitionsnetworkpartitionsecurityprofile)
+
+
+This element defines a Cyclone DDS network partition.
+
+
+##### //CycloneDDS/Domain/Partitioning/NetworkPartitions/NetworkPartition[@Address]
+Text
+
+This attribute specifies the multicast addresses associated with the
+network partition as a comma-separated list. Readers matching this
+network partition (cf. Partitioning/PartitionMappings) will listen for
+multicasts on all of these addresses and advertise them in the discovery
+protocol. The writers will select the most suitable address from the
+addresses advertised by the readers.
+
+
+##### //CycloneDDS/Domain/Partitioning/NetworkPartitions/NetworkPartition[@Connected]
+Boolean
+
+This attribute is a placeholder.
+
+The default value is: "true".
+
+
+##### //CycloneDDS/Domain/Partitioning/NetworkPartitions/NetworkPartition[@Name]
+Text
+
+This attribute specifies the name of this Cyclone DDS network partition.
+Two network partitions cannot have the same name.
+
+
+##### //CycloneDDS/Domain/Partitioning/NetworkPartitions/NetworkPartition[@SecurityProfile]
+Text
+
+This attribute selects the Cyclone DDS security profile for encrypting
+the traffic mapped to this Cyclone DDS network partition. The default
+"null" means the network partition is unsecured; any other name refers to
+a security profile defined using the Security/SecurityProfile elements.
+
+The default value is: "null".
+
+
+#### //CycloneDDS/Domain/Partitioning/PartitionMappings
+Children: [PartitionMapping](#cycloneddsdomainpartitioningpartitionmappingspartitionmapping)
+
+
+The PartitionMappings element specifies the mapping from DCPS
+partition/topic combinations to Cyclone DDS network partitions.
+
+
+##### //CycloneDDS/Domain/Partitioning/PartitionMappings/PartitionMapping
+Attributes: [DCPSPartitionTopic](#cycloneddsdomainpartitioningpartitionmappingspartitionmappingdcpspartitiontopic), [NetworkPartition](#cycloneddsdomainpartitioningpartitionmappingspartitionmappingnetworkpartition)
+
+
+This element defines a mapping from a DCPS partition/topic combination to
+a Cyclone DDS network partition. This allows partitioning data flows by
+using special multicast addresses for part of the data and possibly also
+encrypting the data flow.
+
+
+##### //CycloneDDS/Domain/Partitioning/PartitionMappings/PartitionMapping[@DCPSPartitionTopic]
+Text
+
+This attribute specifies a partition and a topic expression, separated by
+a single '.', that are used to determine if a given partition and topic
+maps to the Cyclone DDS network partition named by the NetworkPartition
+attribute in this PartitionMapping element. The expressions may use the
+usual wildcards '*' and '?'. Cyclone DDS will consider a wildcard DCPS
+partition to match an expression if there exists a string that satisfies
+both expressions.
+
+
+##### //CycloneDDS/Domain/Partitioning/PartitionMappings/PartitionMapping[@NetworkPartition]
+Text
+
+This attribute specifies which Cyclone DDS network partition is to be
+used for DCPS partition/topic combinations matching the
+DCPSPartitionTopic attribute within this PartitionMapping element.
+
+
+### //CycloneDDS/Domain/SSL
+Children: [CertificateVerification](#cycloneddsdomainsslcertificateverification), [Ciphers](#cycloneddsdomainsslciphers), [Enable](#cycloneddsdomainsslenable), [EntropyFile](#cycloneddsdomainsslentropyfile), [KeyPassphrase](#cycloneddsdomainsslkeypassphrase), [KeystoreFile](#cycloneddsdomainsslkeystorefile), [MinimumTLSVersion](#cycloneddsdomainsslminimumtlsversion), [SelfSignedCertificates](#cycloneddsdomainsslselfsignedcertificates), [VerifyClient](#cycloneddsdomainsslverifyclient)
+
+
+The SSL element allows specifying various parameters related to using
+SSL/TLS for DDSI over TCP.
+
+
+#### //CycloneDDS/Domain/SSL/CertificateVerification
+Boolean
+
+If disabled this allows SSL connections to occur even if an X509
+certificate fails verification.
+
+The default value is: "true".
+
+
+#### //CycloneDDS/Domain/SSL/Ciphers
+Text
+
+The set of ciphers used by SSL/TLS
+
+The default value is: "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH".
+
+
+#### //CycloneDDS/Domain/SSL/Enable
+Boolean
+
+This enables SSL/TLS for TCP.
+
+The default value is: "false".
+
+
+#### //CycloneDDS/Domain/SSL/EntropyFile
+Text
+
+The SSL/TLS random entropy file name.
+
+The default value is: "".
+
+
+#### //CycloneDDS/Domain/SSL/KeyPassphrase
+Text
+
+The SSL/TLS key pass phrase for encrypted keys.
+
+The default value is: "secret".
+
+
+#### //CycloneDDS/Domain/SSL/KeystoreFile
+Text
+
+The SSL/TLS key and certificate store file name. The keystore must be in
+PEM format.
+
+The default value is: "keystore".
+
+
+#### //CycloneDDS/Domain/SSL/MinimumTLSVersion
+Text
+
+The minimum TLS version that may be negotiated, valid values are 1.2 and
+1.3.
+
+The default value is: "1.3".
+
+
+#### //CycloneDDS/Domain/SSL/SelfSignedCertificates
+Boolean
+
+This enables the use of self signed X509 certificates.
+
+The default value is: "false".
+
+
+#### //CycloneDDS/Domain/SSL/VerifyClient
+Boolean
+
+This enables an SSL server checking the X509 certificate of a connecting
+client.
+
+The default value is: "true".
+
+
+### //CycloneDDS/Domain/Security
+Children: [SecurityProfile](#cycloneddsdomainsecuritysecurityprofile)
+
+
+The Security element specifies Cyclone DDS security profiles that can be
+used to encrypt traffic mapped to Cyclone DDS network partitions.
+
+
+#### //CycloneDDS/Domain/Security/SecurityProfile
+Attributes: [Cipher](#cycloneddsdomainsecuritysecurityprofilecipher), [CipherKey](#cycloneddsdomainsecuritysecurityprofilecipherkey), [Name](#cycloneddsdomainsecuritysecurityprofilename)
+
+
+This element defines a Cyclone DDS security profile.
+
+
+#### //CycloneDDS/Domain/Security/SecurityProfile[@Cipher]
+One of: null, blowfish, aes128, aes192, aes256
+
+This attribute specifies the cipher to be used for encrypting traffic
+over network partitions secured by this security profile. The possible
+ciphers are:
+
+* aes128: AES with a 128-bit key;
+
+* aes192: AES with a 192-bit key;
+
+* aes256: AES with a 256-bit key;
+
+* blowfish: the Blowfish cipher with a 128 bit key;
+
+* null: no encryption;
+
+SHA1 is used on conjunction with all ciphers except "null" to ensure data
+integrity.
+
+The default value is: "null".
+
+
+#### //CycloneDDS/Domain/Security/SecurityProfile[@CipherKey]
+Text
+
+The CipherKey attribute is used to define the secret key required by the
+cipher selected using the Cipher attribute. The value can be a URI
+referencing an external file containing the secret key, or the secret key
+can be defined in-place as a string value.
+
+The key must be specified as a hexadecimal string with each character
+representing 4 bits of the key. E.g., 1ABC represents the 16-bit key 0001
+1010 1011 1100. The key should not follow a well-known pattern and must
+exactly match the key length of the selected cipher.
+
+A malformed key will cause the security profile to be marked as invalid,
+and disable all network partitions secured by the (invalid) security
+profile to prevent information leaks.
+
+As all DDS applications require read access to the XML configuration
+file, for security reasons it is recommended to store the secret key in
+an external file in the file system, referenced by its URI. The file
+should be protected against read and write access from other users on the
+host.
+
+The default value is: "".
+
+
+#### //CycloneDDS/Domain/Security/SecurityProfile[@Name]
+Text
+
+This attribute specifies the name of this Cyclone DDS security profile.
+Two security profiles cannot have the same name.
+
+
+### //CycloneDDS/Domain/Sizing
+Children: [ReceiveBufferChunkSize](#cycloneddsdomainsizingreceivebufferchunksize), [ReceiveBufferSize](#cycloneddsdomainsizingreceivebuffersize)
+
+
+The Sizing element specifies a variety of configuration settings dealing
+with expected system sizes, buffer sizes, &c.
+
+
+#### //CycloneDDS/Domain/Sizing/ReceiveBufferChunkSize
+Number-with-unit
+
+This element specifies the size of one allocation unit in the receive
+buffer. Must be greater than the maximum packet size by a modest amount
+(too large packets are dropped). Each allocation is shrunk immediately
+after processing a message, or freed straightaway.
+
+The unit must be specified explicitly. Recognised units: B (bytes), kB &
+KiB (2^10 bytes), MB & MiB (220 bytes), GB & GiB
+(230 bytes).
+
+The default value is: "128 KiB".
+
+
+#### //CycloneDDS/Domain/Sizing/ReceiveBufferSize
+Number-with-unit
+
+This element sets the size of a single receive buffer. Many receive
+buffers may be needed. The minimum workable size a little bit larger than
+Sizing/ReceiveBufferChunkSize, and the value used is taken as the
+configured value and the actual minimum workable size.
+
+The unit must be specified explicitly. Recognised units: B (bytes), kB &
+KiB (2^10 bytes), MB & MiB (220 bytes), GB & GiB
+(230 bytes).
+
+The default value is: "1 MiB".
+
+
+### //CycloneDDS/Domain/TCP
+Children: [AlwaysUsePeeraddrForUnicast](#cycloneddsdomaintcpalwaysusepeeraddrforunicast), [Enable](#cycloneddsdomaintcpenable), [NoDelay](#cycloneddsdomaintcpnodelay), [Port](#cycloneddsdomaintcpport), [ReadTimeout](#cycloneddsdomaintcpreadtimeout), [WriteTimeout](#cycloneddsdomaintcpwritetimeout)
+
+
+The TCP element allows specifying various parameters related to running
+DDSI over TCP.
+
+
+#### //CycloneDDS/Domain/TCP/AlwaysUsePeeraddrForUnicast
+Boolean
+
+Setting this to true means the unicast addresses in SPDP packets will be
+ignored and the peer address from the TCP connection will be used
+instead. This may help work around incorrectly advertised addresses when
+using TCP.
+
+The default value is: "false".
+
+
+#### //CycloneDDS/Domain/TCP/Enable
+One of: false, true, default
+
+This element enables the optional TCP transport - deprecated, use
+General/Transport instead.
+
+The default value is: "default".
+
+
+#### //CycloneDDS/Domain/TCP/NoDelay
+Boolean
+
+This element enables the TCP_NODELAY socket option, preventing multiple
+DDSI messages being sent in the same TCP request. Setting this option
+typically optimises latency over throughput.
+
+The default value is: "true".
+
+
+#### //CycloneDDS/Domain/TCP/Port
+Integer
+
+This element specifies the TCP port number on which Cyclone DDS accepts
+connections. If the port is set it is used in entity locators, published
+with DDSI discovery. Dynamically allocated if zero. Disabled if -1 or not
+configured. If disabled other DDSI services will not be able to establish
+connections with the service, the service can only communicate by
+establishing connections to other services.
+
+The default value is: "-1".
+
+
+#### //CycloneDDS/Domain/TCP/ReadTimeout
+Number-with-unit
+
+This element specifies the timeout for blocking TCP read operations. If
+this timeout expires then the connection is closed.
+
+The unit must be specified explicitly. Recognised units: ns, us, ms, s,
+min, hr, day.
+
+The default value is: "2 s".
+
+
+#### //CycloneDDS/Domain/TCP/WriteTimeout
+Number-with-unit
+
+This element specifies the timeout for blocking TCP write operations. If
+this timeout expires then the connection is closed.
+
+The unit must be specified explicitly. Recognised units: ns, us, ms, s,
+min, hr, day.
+
+The default value is: "2 s".
+
+
+### //CycloneDDS/Domain/ThreadPool
+Children: [Enable](#cycloneddsdomainthreadpoolenable), [ThreadMax](#cycloneddsdomainthreadpoolthreadmax), [Threads](#cycloneddsdomainthreadpoolthreads)
+
+
+The ThreadPool element allows specifying various parameters related to
+using a thread pool to send DDSI messages to multiple unicast addresses
+(TCP or UDP).
+
+
+#### //CycloneDDS/Domain/ThreadPool/Enable
+Boolean
+
+This element enables the optional thread pool.
+
+The default value is: "false".
+
+
+#### //CycloneDDS/Domain/ThreadPool/ThreadMax
+Integer
+
+This elements configures the maximum number of threads in the thread
+pool.
+
+The default value is: "8".
+
+
+#### //CycloneDDS/Domain/ThreadPool/Threads
+Integer
+
+This elements configures the initial number of threads in the thread
+pool.
+
+The default value is: "4".
+
+
+### //CycloneDDS/Domain/Threads
+Children: [Thread](#cycloneddsdomainthreadsthread)
+
+
+This element is used to set thread properties.
+
+
+#### //CycloneDDS/Domain/Threads/Thread
+Attributes: [Name](#cycloneddsdomainthreadsthreadname)
+
+Children: [Scheduling](#cycloneddsdomainthreadsthreadscheduling), [StackSize](#cycloneddsdomainthreadsthreadstacksize)
+
+
+This element is used to set thread properties.
+
+
+#### //CycloneDDS/Domain/Threads/Thread[@Name]
+Text
+
+The Name of the thread for which properties are being set. The following
+threads exist:
+
+* gc: garbage collector thread involved in deleting entities;
+
+* recv: receive thread, taking data from the network and running the protocol
+ state machine;
+
+* dq.builtins: delivery thread for DDSI-builtin data, primarily for discovery;
+
+* lease: DDSI liveliness monitoring;
+
+* tev: general timed-event handling, retransmits and discovery;
+
+* xmit.CHAN: transmit thread for channel CHAN;
+
+* dq.CHAN: delivery thread for channel CHAN;
+
+* tev.CHAN: timed-even thread for channel CHAN.
+
+
+##### //CycloneDDS/Domain/Threads/Thread/Scheduling
+Children: [Class](#cycloneddsdomainthreadsthreadschedulingclass), [Priority](#cycloneddsdomainthreadsthreadschedulingpriority)
+
+
+This element configures the scheduling properties of the thread.
+
+
+###### //CycloneDDS/Domain/Threads/Thread/Scheduling/Class
+One of: realtime, timeshare, default
+
+This element specifies the thread scheduling class (realtime, timeshare
+or default). The user may need special privileges from the underlying
+operating system to be able to assign some of the privileged scheduling
+classes.
+
+The default value is: "default".
+
+
+###### //CycloneDDS/Domain/Threads/Thread/Scheduling/Priority
+Text
+
+This element specifies the thread priority (decimal integer or default).
+Only priorities that are supported by the underlying operating system can
+be assigned to this element. The user may need special privileges from
+the underlying operating system to be able to assign some of the
+privileged priorities.
+
+The default value is: "default".
+
+
+##### //CycloneDDS/Domain/Threads/Thread/StackSize
+Number-with-unit
+
+This element configures the stack size for this thread. The default value
+default leaves the stack size at the operating system default.
+
+The unit must be specified explicitly. Recognised units: B (bytes), kB &
+KiB (2^10 bytes), MB & MiB (220 bytes), GB & GiB
+(230 bytes).
+
+The default value is: "default".
+
+
+### //CycloneDDS/Domain/Tracing
+Children: [AppendToFile](#cycloneddsdomaintracingappendtofile), [Category](#cycloneddsdomaintracingcategory), [OutputFile](#cycloneddsdomaintracingoutputfile), [PacketCaptureFile](#cycloneddsdomaintracingpacketcapturefile), [Verbosity](#cycloneddsdomaintracingverbosity)
+
+
+The Tracing element controls the amount and type of information that is
+written into the tracing log by the DDSI service. This is useful to track
+the DDSI service during application development.
+
+
+#### //CycloneDDS/Domain/Tracing/AppendToFile
+Boolean
+
+This option specifies whether the output is to be appended to an existing
+log file. The default is to create a new log file each time, which is
+generally the best option if a detailed log is generated.
+
+The default value is: "false".
+
+
+#### //CycloneDDS/Domain/Tracing/Category
+One of:
+* Comma-separated list of: fatal, error, warning, info, config, discovery, data, radmin, timing, traffic, topic, tcp, plist, whc, throttle, rhc, content, trace
+* Or empty
+
+This element enables individual logging categories. These are enabled in
+addition to those enabled by Tracing/Verbosity. Recognised categories
+are:
+
+* fatal: all fatal errors, errors causing immediate termination
+
+* error: failures probably impacting correctness but not necessarily causing
+ immediate termination
+
+* warning: abnormal situations that will likely not impact correctness
+
+* config: full dump of the configuration
+
+* info: general informational notices
+
+* discovery: all discovery activity
+
+* data: include data content of samples in traces
+
+* radmin: receive buffer administration
+
+* timing: periodic reporting of CPU loads per thread
+
+* traffic: periodic reporting of total outgoing data
+
+* whc: tracing of writer history cache changes
+
+* tcp: tracing of TCP-specific activity
+
+* topic: tracing of topic definitions
+
+* >i>plist: tracing of discovery parameter list interpretation
+
+
+
+In addition, there is the keyword trace that enables all but radmin,
+topic, plist and whc.
+
+The categorisation of tracing output is incomplete and hence most of the
+verbosity levels and categories are not of much use in the current
+release. This is an ongoing process and here we describe the target
+situation rather than the current situation. Currently, the most useful
+is trace.
+
+The default value is: "".
+
+
+#### //CycloneDDS/Domain/Tracing/OutputFile
+Text
+
+This option specifies where the logging is printed to. Note that stdout
+and stderr are treated as special values, representing "standard out" and
+"standard error" respectively. No file is created unless logging
+categories are enabled using the Tracing/Verbosity or
+Tracing/EnabledCategory settings.
+
+The default value is: "cyclonedds.log".
+
+
+#### //CycloneDDS/Domain/Tracing/PacketCaptureFile
+Text
+
+This option specifies the file to which received and sent packets will be
+logged in the "pcap" format suitable for analysis using common networking
+tools, such as WireShark. IP and UDP headers are ficitious, in particular
+the destination address of received packets. The TTL may be used to
+distinguish between sent and received packets: it is 255 for sent packets
+and 128 for received ones. Currently IPv4 only.
+
+The default value is: "".
+
+
+#### //CycloneDDS/Domain/Tracing/Verbosity
+One of: finest, finer, fine, config, info, warning, severe, none
+
+This element enables standard groups of categories, based on a desired
+verbosity level. This is in addition to the categories enabled by the
+Tracing/Category setting. Recognised verbosity levels and the categories
+they map to are:
+
+* none: no Cyclone DDS log
+
+* severe: error and fatal
+
+* warning: severe + warning
+
+* info: warning + info
+
+* config: info + config
+
+* fine: config + discovery
+
+* finer: fine + traffic and timing
+
+* finest: finer + trace
+
+While none prevents any message from being written to a Cyclone DDS log
+file.
+
+The categorisation of tracing output is incomplete and hence most of the
+verbosity levels and categories are not of much use in the current
+release. This is an ongoing process and here we describe the target
+situation rather than the current situation. Currently, the most useful
+verbosity levels are config, fine and finest.
+
+The default value is: "none".
diff --git a/docs/makernc.pl b/docs/makernc.pl
new file mode 100644
index 0000000..d423ed8
--- /dev/null
+++ b/docs/makernc.pl
@@ -0,0 +1,650 @@
+: # -*- perl -*-
+eval 'exec perl -w -S $0 "$@"'
+if 0;
+
+use strict;
+use Data::Dumper;
+
+if (@ARGV != 2) {
+ print STDERR "usage: $0 input output_basename\n";
+ exit 2;
+}
+
+my $input = $ARGV[0];
+my $output = $ARGV[1];
+
+# This "perl" script extracts the configuration elements and their types and descriptions
+# from the source and generates a RELAX NG Compact Form (RNC) and a MarkDown version of
+# it. The scare quotes are necessary because it really is just a translation to perl
+# syntax of an old gawk script, originally used for generating input to a half-baked
+# Java-based configuration editor.
+#
+# There are tools out there to convert RNC to, e.g., XSD. RNC has the advantage of being
+# understood by Emacs' nXML mode, but more importantly, of being fairly straightforward to
+# generate.
+#
+# In an ideal world it would be a bit less fragile in its parsing of the input, and
+# besides one should generate the C code for the configuration tables from a sensible
+# source format, rather than try to extract it from the C source.
+#
+# Other issues:
+# - knowledge of conversion functions in here
+# - hard definitions of enums in here
+# - some other hard-coded knowledge of the top level nodes
+$|=1;
+my $debug = 0;
+
+my %typehint2xmltype =
+ ("____" => "____",
+ "nop" => "____",
+ "networkAddress" => "String",
+ "partitionAddress" => "String",
+ "networkAddresses" => "String",
+ "ipv4" => "String",
+ "boolean" => "Boolean",
+ "boolean_default" => "Enum",
+ "string" => "String",
+ "tracingOutputFileName" => "String",
+ "verbosity" => "Enum",
+ "tracemask" => "Comma",
+ "peer" => "String",
+ "float" => "Float",
+ "int" => "Int",
+ "int32" => "Int",
+ "uint" => "Int",
+ "uint32" => "Int",
+ "natint" => "Int",
+ "natint_255" => "Int",
+ "domainId" => "String",
+ "participantIndex" => "String",
+ "port" => "Int",
+ "dyn_port" => "Int",
+ "duration_inf" => "String",
+ "duration_ms_1hr" => "String",
+ "duration_ms_1s" => "String",
+ "duration_100ms_1hr" => "String",
+ "duration_us_1s" => "String",
+ "memsize" => "String",
+ "bandwidth" => "String",
+ "standards_conformance" => "Enum",
+ "locators" => "Enum",
+ "service_name" => "String",
+ "sched_class" => "Enum",
+ "cipher" => "Enum",
+ "besmode" => "Enum",
+ "retransmit_merging" => "Enum",
+ "sched_prio_class" => "Enum",
+ "sched_class" => "Enum",
+ "maybe_int32" => "String",
+ "maybe_memsize" => "String",
+ "maybe_duration_inf" => "String",
+ "allow_multicast" => "Comma",
+ "transport_selector" => "Enum",
+ "many_sockets_mode" => "Enum",
+ "xcheck" => "Comma",
+ "min_tls_version" => "String");
+
+my %typehint2unit =
+ ("duration_inf" => "duration_inf",
+ "duration_ms_1hr" => "duration",
+ "duration_100ms_1hr" => "duration",
+ "duration_ms_1s" => "duration",
+ "duration_us_1s" => "duration",
+ "bandwidth" => "bandwidth",
+ "memsize" => "memsize",
+ "maybe_memsize" => "memsize",
+ "maybe_duration_inf" => "duration_inf");
+
+my %enum_values =
+ ("locators" => "local;none",
+ "standards_conformance" => "lax;strict;pedantic",
+ "verbosity" => "finest;finer;fine;config;info;warning;severe;none",
+ "besmode" => "full;writers;minimal",
+ "retransmit_merging" => "never;adaptive;always",
+ "sched_prio_class" => "relative;absolute",
+ "sched_class" => "realtime;timeshare;default",
+ "cipher" => "null;blowfish;aes128;aes192;aes256",
+ "boolean_default" => "false;true;default",
+ "many_sockets_mode" => "false;true;single;none;many",
+ "transport_selector" => "default;udp;udp6;tcp;tcp6;raweth");
+
+# should extrace these from the source ...
+my %comma_values =
+ ("tracemask" => "|fatal;error;warning;info;config;discovery;data;radmin;timing;traffic;topic;tcp;plist;whc;throttle;rhc;content;trace",
+ "allow_multicast" => "default|false;spdp;asm;ssm;true",
+ "xcheck" => "|whc;rhc;all");
+
+my %range =
+ ("port" => "1;65535",
+ "dyn_port" => "-1;65535",
+ "general_cfgelems/startupmodeduration" => "0;60000",
+ "natint_255" => "0;255",
+ "duration_ms_1hr" => "0;1hr",
+ "duration_100ms_1hr" => "100ms;1hr",
+ "duration_ms_1s" => "0;1s",
+ "duration_us_1s" => "0;1s");
+
+my %unit_blurb =
+ ("bandwidth" => "\nThe unit must be specified explicitly. Recognised units: Xb/s, Xbps for bits/s or XB/s, XBps for bytes/s; where X is an optional prefix: k for 103, Ki for 210, M for 106, Mi for 220, G for 109, Gi for 230.
",
+ "memsize" => "\nThe unit must be specified explicitly. Recognised units: B (bytes), kB & KiB (210 bytes), MB & MiB (220 bytes), GB & GiB (230 bytes).
",
+ "duration" => "\nThe unit must be specified explicitly. Recognised units: ns, us, ms, s, min, hr, day.
",
+ "duration_inf" => "\nValid values are finite durations with an explicit unit or the keyword 'inf' for infinity. Recognised units: ns, us, ms, s, min, hr, day.
");
+
+my %unit_patterns =
+ ("memsize" => '0|(\d+(\.\d*)?([Ee][\-+]?\d+)?|\.\d+([Ee][\-+]?\d+)?) *([kMG]i?)?B',
+ "bandwidth" => '0|(\d+(\.\d*)?([Ee][\-+]?\d+)?|\.\d+([Ee][\-+]?\d+)?) *([kMG]i?)?[Bb][p/]s',
+ "duration" => '0|(\d+(\.\d*)?([Ee][\-+]?\d+)?|\.\d+([Ee][\-+]?\d+)?) *([num]?s|min|hr|day)',
+ "duration_inf" => 'inf|0|(\d+(\.\d*)?([Ee][\-+]?\d+)?|\.\d+([Ee][\-+]?\d+)?) *([num]?s|min|hr|day)');
+
+while (my ($k, $v) = each %typehint2xmltype) {
+ die "script error: values of enum type $k unknown\n" if $v eq "Enum" && $enum_values{$k} eq "";
+}
+
+my %tab2elems;
+my %elem;
+my %typehint_seen;
+
+my @root = read_config ($input);
+
+{
+ open my $fh, ">", "${output}.rnc" or die "can't open ${output}.rnc";
+ print $fh "namespace a = \"http://relaxng.org/ns/compatibility/annotations/1.0\"\n";
+ print $fh "grammar {\n";
+ print $fh " start =\n";
+ my $isfirst = 1;
+ conv_table($fh, \&conv_to_rnc, \@root, "/", " ", "", \$isfirst);
+ for (sort keys %unit_patterns) {
+ printf $fh " %s = xsd:token { pattern = \"%s\" }\n", $_, $unit_patterns{$_};
+ }
+ print $fh "}\n";
+ close $fh;
+}
+
+{
+ open my $fh, ">", "${output}.md" or die "can't open ${output}.md";
+ my $sep_blurb = "";
+ conv_table($fh, \&conv_to_md, \@root, "/", " ", "", \$sep_blurb);
+ close $fh;
+}
+
+exit 0;
+
+sub clean_description {
+ my ($desc) = @_;
+ $desc =~ s/^\s*BLURB\s*\(\s*//s;
+ $desc =~ s/^\s*"//s;
+ $desc =~ s/\s*"(\s*\))? *(\}\s*,\s*$)?$//s;
+ $desc =~ s/\\"/"/g;
+ $desc =~ s/\\n\s*\\/\n/g;
+ $desc =~ s/\\\\/\\/g;
+ $desc =~ s/\n\n/\n/g;
+ # should fix the source ...
+ $desc =~ s/DDSI2E?/Cyclone DDS/g;
+ return $desc;
+}
+
+sub html_to_md {
+ my ($desc) = @_;
+ $desc =~ s/^\<\/p\>//gs;
+ $desc =~ s/\<\/p\>//gs;
+ $desc =~ s//^/s;
+ $desc =~ s/<\/sup>//s;
+ $desc =~ s/\/\n\n/gs;
+ $desc =~ s/\<\/?(i|ul)\>//gs;
+ $desc =~ s/\
(.*?)\<\/li\>\n*/* $1\n/gs;
+ $desc =~ s/"/"/gs;
+ $desc =~ s/\n+/\n/gs;
+ $desc =~ s/^\n*//s;
+ return $desc;
+}
+
+sub kind_to_kstr {
+ my ($kind, $typehint, $table, $name) = @_;
+ if ($kind eq "GROUP" || $kind eq "MGROUP") {
+ return "element";
+ } elsif ($kind eq "ATTR") {
+ return "$typehint2xmltype{$typehint}";
+ } elsif ($kind eq "LEAF") {
+ return "$typehint2xmltype{$typehint}";
+ } else {
+ die "error: $kind unrecognized kind ($table/$name)\n";
+ }
+}
+
+sub store_entry {
+ my ($name, $table, $kind, $subtables, $multiplicity, $defaultvalue, $typehint, $description) = @_;
+ $name =~ s/\|.*//; # aliases are not visible in osplconf
+ my $ltable = lc $table;
+ my $lname = lc $name;
+ push @{$tab2elems{$ltable}}, $name;
+ die "error: no mapping defined for type $typehint\n" if $typehint2xmltype{$typehint} eq "";
+ my $ub = exists $typehint2unit{$typehint} && exists $unit_blurb{$typehint2unit{$typehint}} ? $unit_blurb{$typehint2unit{$typehint}} : "";
+ if ($kind eq "GROUP" || $kind eq "MGROUP") {
+ # GROUP and MGROUP have no data, so also no default value
+ $defaultvalue = undef;
+ } elsif ($defaultvalue eq "" || $defaultvalue eq "NULL") {
+ $defaultvalue = undef;
+ } else {
+ $defaultvalue =~ s/^"(.*)"$/$1/;
+ }
+
+ my ($min_occ, $max_occ);
+ if ($multiplicity =~ /MAX/) {
+ $min_occ = $max_occ = 0;
+ } elsif ($multiplicity == 0 || $multiplicity == 1) {
+ # multiplicity = 0 => special case, treat as-if 1
+ # multiplicity = 1 => required if no default
+ if ($kind eq "GROUP" || $kind eq "MGROUP") {
+ $min_occ = 0;
+ } elsif (not defined $defaultvalue) {
+ $min_occ = 1;
+ } else {
+ $min_occ = 0;
+ }
+ $max_occ = 1;
+ } else {
+ $min_occ = 0; $max_occ = $multiplicity;
+ }
+
+ my $kstr = kind_to_kstr($kind, $typehint, $table, $name);
+
+ my $desc = clean_description($description).$ub;
+ $desc .= "The default value is: "$defaultvalue".
" if defined $defaultvalue;
+ $elem{"$ltable/$lname"} = { kind => $kind, kstr => $kstr,
+ subtables => $subtables, multiplicity => $multiplicity,
+ min_occ => $min_occ, max_occ => $max_occ, root => 0,
+ defaultvalue => $defaultvalue, typehint => $typehint,
+ description => $desc };
+ # typehint_seen is for verifying no bogus type hints are defined in this script
+ $typehint_seen{$typehint} = 1;
+ #printf "%s - $s\n", "$ltable/$lname", $elem{"$ltable/lname"};
+ #$typehint = "";
+}
+
+sub fmtblurb {
+ my ($blurb) = @_;
+ my $isbullet = ($blurb =~ s/^\* //);
+ my $maxlen = $isbullet ? 78 : 74;
+ my @words = split ' ', $blurb;
+ my @lines = ();
+ while (@words > 0) {
+ my $x = shift @words;
+ while (@words > 0 && (length $x) + 1 + (length $words[0]) < $maxlen) {
+ $x .= " " . shift @words;
+ }
+ push @lines, "$x";
+ }
+ my $sep = "\n" . ($isbullet ? " " : "");
+ return ($isbullet ? "* " : "") . join $sep, @lines;
+}
+
+sub print_description_rnc {
+ my ($fh, $desc, $indent) = @_;
+ my $x = $desc;
+ my @xs = split /\n+/, $x;
+ $_ = fmtblurb ($_) for @xs;
+ $x = join "\n\n", @xs;
+ return 0 if $x =~ /^\s$/s;
+ print $fh "[ a:documentation [ xml:lang=\"en\" \"\"\"\n$x\"\"\" ] ]\n";
+ return 1;
+}
+
+sub print_description_md {
+ my ($fh, $desc, $indent) = @_;
+ my $x = html_to_md ($desc);
+ my @xs = split /\n+/, $x;
+ $_ = fmtblurb ($_) for @xs;
+ $x = join "\n\n", @xs;
+ return 0 if $x =~ /^\s$/s;
+ print $fh "$x\n";
+ return 1;
+}
+
+sub conv_to_rnc {
+ my ($fh, $fs, $name, $fqname, $indent, $prefix, $isfirstref) = @_;
+
+ printf $fh "${indent}%s", ($$isfirstref ? "" : "& ");
+ print_description_rnc ($fh, $fs->{description}, $indent);
+ printf $fh "${indent}%s %s {\n", ($fs->{kind} eq "ATTR" ? "attribute" : "element"), $name;
+
+ if ($fs->{kind} eq "GROUP" || $fs->{kind} eq "MGROUP") {
+ my $sub_isfirst = 1;
+ conv_table($fh, \&conv_to_rnc, $fs->{subtables}, $fqname, "${indent} ", $prefix, \$sub_isfirst);
+ printf $fh "${indent} empty\n" if $sub_isfirst;
+ } elsif ($fs->{kstr} eq "Boolean") {
+ printf $fh "${indent} xsd:boolean\n";
+ } elsif ($fs->{kstr} eq "Comma") {
+ die unless exists $comma_values{$fs->{typehint}};
+ my $pat = "";
+ my @xs = split /\|/, $comma_values{$fs->{typehint}};
+ my $allowempty = 0;
+ for (@xs) {
+ if ($_ eq "") { $allowempty = 1; next; }
+ (my $vs = $_) =~ s/;/|/g;
+ $pat .= "|" unless $pat eq "";
+ if ($vs =~ /\|/) {
+ $pat .= "(($vs)(,($vs))*)";
+ } else {
+ $pat .= $vs;
+ }
+ }
+ $pat .= "|" if $allowempty;
+ printf $fh "${indent} xsd:token { pattern = \"%s\" }\n", $pat;
+ } elsif ($fs->{kstr} eq "Enum") {
+ die unless exists $enum_values{$fs->{typehint}};
+ my @vs = split /;/, $enum_values{$fs->{typehint}};
+ printf $fh "${indent} %s\n", (join '|', map { "\"$_\"" } @vs);
+ } elsif ($fs->{kstr} eq "Int") {
+ printf $fh "${indent} xsd:integer\n";
+ #if (exists $range{$lctn} || exists $range{$fs->{typehint}}) {
+ # # integer with range
+ # my $rr = exists $range{$lctn} ? $range{$lctn} : $range{$fs->{typehint}};
+ # my @vs = split /;/, $range{$lctn};
+ #}
+ } elsif ($typehint2unit{$fs->{typehint}}) {
+ # number with unit
+ printf $fh "${indent} $typehint2unit{$fs->{typehint}}\n";
+ } elsif ($typehint2xmltype{$fs->{typehint}} =~ /String$/) {
+ printf $fh "${indent} text\n";
+ } else {
+ die;
+ }
+
+ my $suffix;
+ if ($fs->{min_occ} == 0) {
+ $suffix = ($fs->{max_occ} == 1) ? "?" : "*";
+ } else {
+ $suffix = ($fs->{max_occ} == 1) ? "" : "+";
+ }
+ printf $fh "${indent}}%s\n", $suffix;
+ $$isfirstref = 0;
+}
+
+sub list_children_md {
+ my ($fh, $fs, $name, $fqname, $indent, $prefix, $children) = @_;
+ if ($fs->{kind} eq "ATTR") {
+ push @{$children->{attributes}}, $name;
+ } else {
+ push @{$children->{elements}}, $name;
+ }
+}
+
+sub conv_to_md {
+ my ($fh, $fs, $name, $fqname, $indent, $prefix, $separator_blurb_ref) = @_;
+
+ print $fh $$separator_blurb_ref;
+ $$separator_blurb_ref = "\n\n";
+
+ # Print fully-qualified element/attribute name as a heading, with the heading level
+ # determined by the nesting level. The nesting level can be computed from the number of
+ # slashes :)
+ (my $slashes = $fqname) =~ s/[^\/]//g;
+ die unless length $slashes >= 2;
+ my $level = (length $slashes) - 1;
+ printf $fh "%s $fqname\n", ("#"x$level);
+
+ # Describe type (boolean, integer, &c.); for a group list its attributes and children as
+ # links to their descriptions
+ if ($fs->{kind} eq "GROUP" || $fs->{kind} eq "MGROUP") {
+ my %children = ("attributes" => [], "elements" => []);
+ conv_table($fh, \&list_children_md, $fs->{subtables}, "", "${indent} ", $prefix, \%children);
+ if (@{$children{attributes}} > 0) {
+ my @xs = sort @{$children{attributes}};
+ my @ys = map { my $lt = lc "$fqname\[\@$_]"; $lt =~ s/[^a-z0-9]//g; "[$_](#$lt)" } @xs;
+ printf $fh "Attributes: %s\n\n", (join ', ', @ys);
+ }
+ if (@{$children{elements}} > 0) {
+ my @xs = sort @{$children{elements}};
+ my @ys = map { my $lt = lc "$fqname\[\@$_]"; $lt =~ s/[^a-z0-9]//g; "[$_](#$lt)" } @xs;
+ printf $fh "Children: %s\n\n", (join ', ', @ys);
+ }
+ } elsif ($fs->{kstr} eq "Boolean") {
+ printf $fh "Boolean\n";
+ } elsif ($fs->{kstr} eq "Comma") {
+ die unless exists $comma_values{$fs->{typehint}};
+ my $pat = "";
+ my @xs = split /\|/, $comma_values{$fs->{typehint}};
+ if (@xs > 1) {
+ printf $fh "One of:\n";
+ }
+ my $allowempty = 0;
+ for (@xs) {
+ if ($_ eq "") { $allowempty = 1; next; }
+ my @vs = split /;/, $_;
+ if (@vs > 1) {
+ printf $fh "* Comma-separated list of: %s\n", (join ', ', @vs);
+ } else {
+ printf $fh "* Keyword: %s\n", $vs[0];
+ }
+ }
+ printf $fh "* Or empty\n" if $allowempty;
+ } elsif ($fs->{kstr} eq "Enum") {
+ die unless exists $enum_values{$fs->{typehint}};
+ my @vs = split /;/, $enum_values{$fs->{typehint}};
+ printf $fh "One of: %s\n", (join ', ', @vs);
+ } elsif ($fs->{kstr} eq "Int") {
+ printf $fh "Integer\n";
+ #if (exists $range{$lctn} || exists $range{$fs->{typehint}}) {
+ # # integer with range
+ # my $rr = exists $range{$lctn} ? $range{$lctn} : $range{$fs->{typehint}};
+ # my @vs = split /;/, $range{$lctn};
+ #}
+ } elsif ($typehint2unit{$fs->{typehint}}) {
+ # number with unit
+ printf $fh "Number-with-unit\n";
+ } elsif ($typehint2xmltype{$fs->{typehint}} =~ /String$/) {
+ printf $fh "Text\n";
+ } else {
+ die;
+ }
+
+ # Descriptive text
+ printf $fh "\n";
+ print_description_md ($fh, $fs->{description}, $indent);
+
+ # Generate attributes & children
+ if ($fs->{kind} eq "GROUP" || $fs->{kind} eq "MGROUP") {
+ conv_table($fh, \&conv_to_md, $fs->{subtables}, $fqname, "${indent} ", $prefix, $separator_blurb_ref);
+ }
+}
+
+sub conv_table {
+ my ($fh, $convsub, $tablesref, $fqname, $indent, $prefix, $closure) = @_;
+ my (@ts, @ns);
+ for (@$tablesref) {
+ next unless exists $tab2elems{$_};
+ for (my $i = 0; $i < @{$tab2elems{$_}}; $i++) {
+ push @ts, $_;
+ }
+ push @ns, sort @{$tab2elems{$_}};
+ }
+ my $elems = 0;
+ for (my $i = 0; $i < @ns; $i++) {
+ my $fs = $elem{lc "$ts[$i]/$ns[$i]"};
+ my $fqname1;
+ if ($fs->{kind} eq "ATTR") {
+ die unless $elems == 0;
+ $fqname1 = "${fqname}[\@$ns[$i]]";
+ } else {
+ $fqname1 = "$fqname/$ns[$i]";
+ $elems++;
+ }
+ &$convsub ($fh, $fs, $ns[$i], $fqname1, $indent, ($ts[$i] eq "unsupp_cfgelems") ? "Internal" : $prefix, $closure);
+ }
+}
+
+sub read_config {
+ my ($input) = @_;
+ my ($name, $table, $kind, @subtables, $multiplicity, $defaultvalue, $typehint, $description);
+ my ($gobbling_description, $in_table, $rest, $deprecated);
+ open FH, "<", $input or die "can't open $input\n";
+ while () {
+ chomp;
+
+ if ($gobbling_description) {
+ $description .= $_;
+ #print " .. $_\n";
+ }
+
+ if ($gobbling_description && /(^|")(\s*\)) *\} *, *$/) {
+ $gobbling_description = 0;
+ my @st = @subtables;
+ store_entry ($name, $table, $kind, \@st, $multiplicity, $defaultvalue, $typehint, $description) unless $deprecated;
+ next;
+ }
+
+ if ($gobbling_description) {
+ next;
+ }
+
+ if (/^[ \t]*(#[ \t]*(if|ifdef|ifndef|else|endif).*)?$/) { # skip empty lines, preproc
+ next;
+ }
+
+ if (/^ *END_MARKER *$/) {
+ if (!$in_table) {
+ warn "END_MARKER seen while not in a table";
+ }
+ $in_table = 0;
+ print "END_MARKER $table\n" if $debug;
+ next;
+ }
+
+ if (/^static +const +struct +cfgelem +([A-Za-z_0-9]+)\s*\[/) {
+ $in_table = 1;
+ $table = $1;
+ print "TABLE $table\n" if $debug;
+ next;
+ }
+
+ if ($in_table && /^ *WILDCARD *, *$|^ *\{ *(MOVED) *\(/) {
+ next;
+ }
+
+ # Recognise all "normal" entries: attributes, groups, leaves and
+ # leaves with attributes. This doesn't recognise the ones used for the
+ # root groups: those are dealt with by the next pattern
+ if ($in_table && /^ *\{ *((?:DEPRECATED_)?(?:ATTR|GROUP|GROUP_W_ATTRS|MGROUP|LEAF|LEAF_W_ATTRS)) *\(/) {
+ $rest = $_;
+ # extract kind
+ $rest =~ s/^ *\{ *((?:DEPRECATED_)?(?:ATTR|GROUP|GROUP_W_ATTRS|MGROUP|LEAF|LEAF_W_ATTRS)) *\( *(.*)/$2/;
+ $kind = $1;
+ $deprecated = ($kind =~ s/^DEPRECATED_//);
+ # extract name + reference to subtables
+ $rest =~ s/\"([A-Za-z_0-9|]+)\" *(.*)/$2/;
+ $name = $1;
+ my ($subelems, $subattrs) = ("", "");
+ if ($kind eq "GROUP" || $kind eq "GROUP_W_ATTRS" || $kind eq "MGROUP") {
+ $rest =~ s/, *([A-Za-z_0-9]+) *(.*)/$2/;
+ $subelems = $1;
+ }
+ if ($kind eq "LEAF_W_ATTRS" || $kind eq "GROUP_W_ATTRS" || $kind eq "MGROUP") {
+ $rest =~ s/, *([A-Za-z_0-9]+) *(.*)/$2/;
+ $subattrs = $1;
+ }
+ @subtables = ();
+ push @subtables, $subattrs if $subattrs ne "";
+ push @subtables, $subelems if $subelems ne "";
+ $rest =~ s/ *\) *, *//;
+ print " kind $kind name $name subtables @subtables -- $rest\n" if $debug;
+
+ # don't care about the distinction between GROUP/LEAF and
+ # GROUP/LEAF_W_ATTRS in the remainer of the code: we simply
+ # rely on subtables.
+ $kind =~ s/_W_ATTRS//;
+ }
+
+ # Root groups: use a special trick, which allows them to do groups
+ # with attributes. Which the DDSI2 proper doesn't use, but which the
+ # service configuration stuff does rely on.
+ if ($in_table && /^ *\{ *"([A-Za-z_0-9|]+)" *, */) {
+ $rest = $_;
+ # root elements are all groups, formatted as: , ,
+ # , NODATA, description. They're therefore pretty easy to
+ # parse.
+ $kind = "GROUP";
+ $rest =~ s/^ *\{ *\"([A-Za-z_0-9|]+)\" *, *(.*)/$2/;
+ $name = $1;
+ # then follow the sub-elements and the attributes
+ $rest =~ s/([A-Za-z_0-9]+) *, *(.*)/$2/;
+ my $subelems = $1;
+ $rest =~ s/([A-Za-z_0-9]+) *, *(.*)/$2/;
+ my $subattrs = $1;
+ # then we require NODATA (could do this in the pattern also)
+ die "error: NODATA expected" unless $rest =~ /^NODATA *,/;
+ # multiplicity is hard coded: we want to allow multiple ddsi2 services
+ $multiplicity = 0;
+ @subtables = ();
+ push @subtables, $subattrs if $subattrs ne "";
+ push @subtables, $subelems if $subelems ne "";
+ $rest =~ s/([A-Za-z_0-9]+) *, *(.*)/$2/;
+ }
+
+ # Extract stuff specific to ATTRs, LEAFs and MGROUPs
+ if ($in_table && ($kind eq "ATTR" || $kind eq "LEAF" || $kind eq "MGROUP")) {
+ # extract multiplicity
+ $rest =~ s/([0-9]+|U?INT(?:16|32|64)?_MAX) *, *(.*)/$2/;
+ $multiplicity = $1;
+ # extract default value
+ $rest =~ s/(\"(?:[^\"]*)\"|NULL|0) *, *(.*)/$2/;
+ $defaultvalue = $1;
+ if ($defaultvalue eq "0") {
+ $defaultvalue = "NULL";
+ }
+ # skip reference to internal name (either ABSOFF(field),
+ # RELOFF(field,field) or , (the latter being used by
+ # "verbosity")
+ $rest =~ s/(ABSOFF *\( *[A-Za-z_0-9.]+ *\)|RELOFF *\( *[A-Za-z_0-9.]+ *, *[A-Za-z_0-9]+ *\)|[0-9]+ *, *[0-9]+) *, *//;
+ # skip init function
+ $rest =~ s/([A-Za-z_0-9]+|0) *, *//;
+ # type hint from conversion function
+ $rest =~ s/(uf_(?:[A-Za-z_0-9]+)|NULL|0) *, *(.*)/$2/;
+ $typehint = $1;
+ $typehint =~ s/^uf_//;
+ # accept typehint = NULL for a LEAF_WITH_ATTRS: there is no defined
+ # "syntax" for groups that have only attributes, pretending it is a
+ # group because that causes us to emit an "element" and not a
+ # "leaf".
+ if ($typehint eq "0" || $typehint eq "NULL") {
+ $kind = "GROUP";
+ $typehint = "____";
+ }
+ # skip free, print functions
+ $rest =~ s/([A-Za-z_0-9]+|0) *, *([A-Za-z_0-9]+|0) *, *//;
+ #print " .. multiplicity $multiplicity default $defaultvalue typehint $typehint\n";
+ }
+
+ # Extract description (or NULL, if not to be included in the configurator XML)
+ if ($in_table) {
+ #print " .. $rest\n";
+ # description or NULL
+ if ($rest =~ /NULL *\} *, *$/) {
+ # no description - discard this one/simply continue with next one
+ } elsif ($rest =~ /(?:BLURB\s*\(\s*)?(".*")(?:\s*\))? *\} *, *$/) {
+ # description ending on same line
+ $description = $1;
+ my @st = @subtables;
+ store_entry ($name, $table, $kind, \@st, $multiplicity, $defaultvalue, $typehint, $description) unless $deprecated;
+ } else {
+ # strip the quotes &c. once the full text has been gathered
+ $description = $rest;
+ $gobbling_description = 1;
+ }
+ #print " .. gobbling $gobbling_description";
+ next;
+ }
+ }
+ close FH;
+
+ #print "$tab2elems{cyclonedds_root_cfgelems}\n";
+ my @rootnames = @{$tab2elems{cyclonedds_root_cfgelems}};
+ die "error: cyclonedds_root_cfgelems has no or multiple entries\n" if @rootnames != 1;
+ die "error: root_cfgelems doesn't exist\n" unless exists $tab2elems{root_cfgelems};
+ my $root = $elem{lc "cyclonedds_root_cfgelems/$rootnames[0]"};
+ die "error: root_cfgelems doesn't exist\n" unless defined $root;
+ $root->{min_occ} = $root->{max_occ} = $root->{isroot} = 1;
+ while (my ($k, $v) = each %typehint_seen) {
+ warn "script warning: type mapping defined for $k but not used" if $v == 0;
+ }
+ return ("cyclonedds_root_cfgelems");
+}
diff --git a/docs/manual/options.md b/docs/manual/options.md
new file mode 100644
index 0000000..3ed9e5a
--- /dev/null
+++ b/docs/manual/options.md
@@ -0,0 +1,1842 @@
+# //CycloneDDS
+Children: [Domain](#cycloneddsdomain)
+
+
+CycloneDDS configuration
+
+
+## //CycloneDDS/Domain
+Attributes: [Id](#cycloneddsdomainid)
+
+Children: [Channels](#cycloneddsdomainchannels), [Compatibility](#cycloneddsdomaincompatibility), [Discovery](#cycloneddsdomaindiscovery), [General](#cycloneddsdomaingeneral), [Internal](#cycloneddsdomaininternal), [Partitioning](#cycloneddsdomainpartitioning), [SSL](#cycloneddsdomainssl), [Sizing](#cycloneddsdomainsizing), [TCP](#cycloneddsdomaintcp), [ThreadPool](#cycloneddsdomainthreadpool), [Threads](#cycloneddsdomainthreads), [Tracing](#cycloneddsdomaintracing)
+
+
+The General element specifying Domain related settings.
+
+
+## //CycloneDDS/Domain[@Id]
+Text
+
+Domain id this configuration applies to, or "any" if it applies to all
+domain ids.
+
+The default value is: "any".
+
+
+### //CycloneDDS/Domain/Channels
+Children: [Channel](#cycloneddsdomainchannelschannel)
+
+
+This element is used to group a set of channels. The channels are
+independent data paths through Cyclone DDS and by using separate threads
+and setting their priorities appropriately, chanenls can be used to map
+transport priorities to operating system scheduler priorities, ensuring
+system-wide end-to-end priority preservation.
+
+
+#### //CycloneDDS/Domain/Channels/Channel
+Attributes: [Name](#cycloneddsdomainchannelschannelname), [TransportPriority](#cycloneddsdomainchannelschanneltransportpriority)
+
+Children: [AuxiliaryBandwidthLimit](#cycloneddsdomainchannelschannelauxiliarybandwidthlimit), [DataBandwidthLimit](#cycloneddsdomainchannelschanneldatabandwidthlimit), [DiffServField](#cycloneddsdomainchannelschanneldiffservfield)
+
+
+This element defines a channel.
+
+
+#### //CycloneDDS/Domain/Channels/Channel[@Name]
+Text
+
+This attribute specifies name of this channel. The name should uniquely
+identify the channel.
+
+
+#### //CycloneDDS/Domain/Channels/Channel[@TransportPriority]
+Integer
+
+This attribute sets the transport priority threshold for the channel.
+Each DCPS data writer has a "transport_priority" QoS and this QoS is used
+to select a channel for use by this writer. The selected channel is the
+one with the largest threshold not greater than the writer's transport
+priority, and if no such channel exists, the channel with the lowest
+threshold.
+
+The default value is: "0".
+
+
+##### //CycloneDDS/Domain/Channels/Channel/AuxiliaryBandwidthLimit
+Number-with-unit
+
+This element specifies the maximum transmit rate of auxiliary traffic on
+this channel (e.g. retransmits, heartbeats, etc). Bandwidth limiting uses
+a leaky bucket scheme. The default value "inf" means Cyclone DDS imposes
+no limitation, the underlying operating system and hardware will likely
+limit the maimum transmit rate.
+
+The unit must be specified explicitly. Recognised units: Xb/s, Xbps for
+bits/s or XB/s, XBps for bytes/s; where X is an optional prefix: k for
+10^3, Ki for 210, M for 106, Mi for 220,
+G for 109, Gi for 230.
+
+The default value is: "inf".
+
+
+##### //CycloneDDS/Domain/Channels/Channel/DataBandwidthLimit
+Number-with-unit
+
+This element specifies the maximum transmit rate of new samples and
+directly related data, for this channel. Bandwidth limiting uses a leaky
+bucket scheme. The default value "inf" means Cyclone DDS imposes no
+limitation, the underlying operating system and hardware will likely
+limit the maimum transmit rate.
+
+The unit must be specified explicitly. Recognised units: Xb/s, Xbps for
+bits/s or XB/s, XBps for bytes/s; where X is an optional prefix: k for
+10^3, Ki for 210, M for 106, Mi for 220,
+G for 109, Gi for 230.
+
+The default value is: "inf".
+
+
+##### //CycloneDDS/Domain/Channels/Channel/DiffServField
+Integer
+
+This element describes the DiffServ setting the channel will apply to the
+networking messages. This parameter determines the value of the diffserv
+field of the IP version 4 packets sent on this channel which allows QoS
+setting to be applied to the network traffic send on this channel.
+
+Windows platform support for setting the diffserv field is dependent on
+the OS version.
+
+For Windows versions XP SP2 and 2003 to use the diffserv field the
+following parameter should be added to the register:
+
+HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TcpIp\Parameters\DisableUserTOSSetting
+
+The type of this parameter is a DWORD and its value should be set to 0 to
+allow setting of the diffserv field.
+
+For Windows version 7 or higher a new API (qWAVE) has been introduced.
+For these platforms the specified diffserv value is mapped to one of the
+support traffic types.
+
+The mapping is as follows: 1-8 background traffic; 9-40 excellent
+traffic; 41-55 audio/video traffic; 56 voice traffic; 57-63 control
+traffic.
+
+When an application is run without Administrative priveleges then only
+the diffserv value of 0, 8, 40 or 56 is allowed.
+
+The default value is: "0".
+
+
+### //CycloneDDS/Domain/Compatibility
+Children: [AssumeRtiHasPmdEndpoints](#cycloneddsdomaincompatibilityassumertihaspmdendpoints), [ExplicitlyPublishQosSetToDefault](#cycloneddsdomaincompatibilityexplicitlypublishqossettodefault), [ManySocketsMode](#cycloneddsdomaincompatibilitymanysocketsmode), [StandardsConformance](#cycloneddsdomaincompatibilitystandardsconformance)
+
+
+The Compatibility elements allows specifying various settings related to
+compatability with standards and with other DDSI implementations.
+
+
+#### //CycloneDDS/Domain/Compatibility/AssumeRtiHasPmdEndpoints
+Boolean
+
+This option assumes ParticipantMessageData endpoints required by the
+liveliness protocol are present in RTI participants even when not
+properly advertised by the participant discovery protocol.
+
+The default value is: "false".
+
+
+#### //CycloneDDS/Domain/Compatibility/ExplicitlyPublishQosSetToDefault
+Boolean
+
+This element specifies whether QoS settings set to default values are
+explicitly published in the discovery protocol. Implementations are to
+use the default value for QoS settings not published, which allows a
+significant reduction of the amount of data that needs to be exchanged
+for the discovery protocol, but this requires all implementations to
+adhere to the default values specified by the specifications.
+
+When interoperability is required with an implementation that does not
+follow the specifications in this regard, setting this option to true
+will help.
+
+The default value is: "false".
+
+
+#### //CycloneDDS/Domain/Compatibility/ManySocketsMode
+One of: false, true, single, none, many
+
+This option specifies whether a network socket will be created for each
+domain participant on a host. The specification seems to assume that each
+participant has a unique address, and setting this option will ensure
+this to be the case. This is not the defeault.
+
+Disabling it slightly improves performance and reduces network traffic
+somewhat. It also causes the set of port numbers needed by Cyclone DDS to
+become predictable, which may be useful for firewall and NAT
+configuration.
+
+The default value is: "single".
+
+
+#### //CycloneDDS/Domain/Compatibility/StandardsConformance
+One of: lax, strict, pedantic
+
+This element sets the level of standards conformance of this instance of
+the Cyclone DDS Service. Stricter conformance typically means less
+interoperability with other implementations. Currently three modes are
+defined:
+
+* pedantic: very strictly conform to the specification, ultimately for
+ compliancy testing, but currently of little value because it adheres even to
+ what will most likely turn out to be editing errors in the DDSI standard.
+ Arguably, as long as no errata have been published it is the current text
+ that is in effect, and that is what pedantic currently does.
+
+* strict: a slightly less strict view of the standard than does pedantic: it
+ follows the established behaviour where the standard is obviously in error.
+
+* lax: attempt to provide the smoothest possible interoperability, anticipating
+ future revisions of elements in the standard in areas that other
+ implementations do not adhere to, even though there is no good reason not to.
+
+The default setting is "lax".
+
+The default value is: "lax".
+
+
+### //CycloneDDS/Domain/Discovery
+Children: [DSGracePeriod](#cycloneddsdomaindiscoverydsgraceperiod), [DefaultMulticastAddress](#cycloneddsdomaindiscoverydefaultmulticastaddress), [EnableTopicDiscovery](#cycloneddsdomaindiscoveryenabletopicdiscovery), [MaxAutoParticipantIndex](#cycloneddsdomaindiscoverymaxautoparticipantindex), [ParticipantIndex](#cycloneddsdomaindiscoveryparticipantindex), [Peers](#cycloneddsdomaindiscoverypeers), [Ports](#cycloneddsdomaindiscoveryports), [SPDPInterval](#cycloneddsdomaindiscoveryspdpinterval), [SPDPMulticastAddress](#cycloneddsdomaindiscoveryspdpmulticastaddress)
+
+
+The Discovery element allows specifying various parameters related to the
+discovery of peers.
+
+
+#### //CycloneDDS/Domain/Discovery/DSGracePeriod
+Number-with-unit
+
+This setting controls for how long endpoints discovered via a Cloud
+discovery service will survive after the discovery service disappeared,
+allowing reconnect without loss of data when the discovery service
+restarts (or another instance takes over).
+
+Valid values are finite durations with an explicit unit or the keyword
+'inf' for infinity. Recognised units: ns, us, ms, s, min, hr, day.
+
+The default value is: "30 s".
+
+
+#### //CycloneDDS/Domain/Discovery/DefaultMulticastAddress
+Text
+
+This element specifies the default multicast address for all traffic
+other than participant discovery packets. It defaults to
+Discovery/SPDPMulticastAddress.
+
+The default value is: "auto".
+
+
+#### //CycloneDDS/Domain/Discovery/EnableTopicDiscovery
+Boolean
+
+Do not use.
+
+The default value is: "true".
+
+
+#### //CycloneDDS/Domain/Discovery/MaxAutoParticipantIndex
+Integer
+
+This element specifies the maximum DDSI participant index selected by
+this instance of the Cyclone DDS service if the
+Discovery/ParticipantIndex is "auto".
+
+The default value is: "9".
+
+
+#### //CycloneDDS/Domain/Discovery/ParticipantIndex
+Text
+
+This element specifies the DDSI participant index used by this instance
+of the Cyclone DDS service for discovery purposes. Only one such
+participant id is used, independent of the number of actual
+DomainParticipants on the node. It is either:
+
+* auto: which will attempt to automatically determine an available participant
+ index (see also Discovery/MaxAutoParticipantIndex), or
+
+* a non-negative integer less than 120, or
+
+* none:, which causes it to use arbitrary port numbers for unicast sockets
+ which entirely removes the constraints on the participant index but makes
+ unicast discovery impossible.
+
+The default is auto. The participant index is part of the port number
+calculation and if predictable port numbers are needed and fixing the
+participant index has no adverse effects, it is recommended that the
+second be option be used.
+
+The default value is: "none".
+
+
+#### //CycloneDDS/Domain/Discovery/Peers
+Children: [Group](#cycloneddsdomaindiscoverypeersgroup), [Peer](#cycloneddsdomaindiscoverypeerspeer)
+
+
+This element statically configures addresses for discovery.
+
+Valid values are finite durations with an explicit unit or the keyword
+'inf' for infinity. Recognised units: ns, us, ms, s, min, hr, day.
+
+
+##### //CycloneDDS/Domain/Discovery/Peers/Group
+Children: [Peer](#cycloneddsdomaindiscoverypeersgrouppeer)
+
+
+This element statically configures a fault tolerant group of addresses
+for discovery. Each member of the group is tried in sequence until one
+succeeds.
+
+
+###### //CycloneDDS/Domain/Discovery/Peers/Group/Peer
+Attributes: [Address](#cycloneddsdomaindiscoverypeersgrouppeeraddress)
+
+
+This element statically configures an addresses for discovery.
+
+
+###### //CycloneDDS/Domain/Discovery/Peers/Group/Peer[@Address]
+Text
+
+This element specifies an IP address to which discovery packets must be
+sent, in addition to the default multicast address (see also
+General/AllowMulticast). Both a hostnames and a numerical IP address is
+accepted; the hostname or IP address may be suffixed with :PORT to
+explicitly set the port to which it must be sent. Multiple Peers may be
+specified.
+
+
+##### //CycloneDDS/Domain/Discovery/Peers/Peer
+Attributes: [Address](#cycloneddsdomaindiscoverypeerspeeraddress)
+
+
+This element statically configures an addresses for discovery.
+
+
+##### //CycloneDDS/Domain/Discovery/Peers/Peer[@Address]
+Text
+
+This element specifies an IP address to which discovery packets must be
+sent, in addition to the default multicast address (see also
+General/AllowMulticast). Both a hostnames and a numerical IP address is
+accepted; the hostname or IP address may be suffixed with :PORT to
+explicitly set the port to which it must be sent. Multiple Peers may be
+specified.
+
+
+#### //CycloneDDS/Domain/Discovery/Ports
+Children: [Base](#cycloneddsdomaindiscoveryportsbase), [DomainGain](#cycloneddsdomaindiscoveryportsdomaingain), [MulticastDataOffset](#cycloneddsdomaindiscoveryportsmulticastdataoffset), [MulticastMetaOffset](#cycloneddsdomaindiscoveryportsmulticastmetaoffset), [ParticipantGain](#cycloneddsdomaindiscoveryportsparticipantgain), [UnicastDataOffset](#cycloneddsdomaindiscoveryportsunicastdataoffset), [UnicastMetaOffset](#cycloneddsdomaindiscoveryportsunicastmetaoffset)
+
+
+The Ports element allows specifying various parameters related to the
+port numbers used for discovery. These all have default values specified
+by the DDSI 2.1 specification and rarely need to be changed.
+
+
+##### //CycloneDDS/Domain/Discovery/Ports/Base
+Integer
+
+This element specifies the base port number (refer to the DDSI 2.1
+specification, section 9.6.1, constant PB).
+
+The default value is: "7400".
+
+
+##### //CycloneDDS/Domain/Discovery/Ports/DomainGain
+Integer
+
+This element specifies the domain gain, relating domain ids to sets of
+port numbers (refer to the DDSI 2.1 specification, section 9.6.1,
+constant DG).
+
+The default value is: "250".
+
+
+##### //CycloneDDS/Domain/Discovery/Ports/MulticastDataOffset
+Integer
+
+This element specifies the port number for multicast meta traffic (refer
+to the DDSI 2.1 specification, section 9.6.1, constant d2).
+
+The default value is: "1".
+
+
+##### //CycloneDDS/Domain/Discovery/Ports/MulticastMetaOffset
+Integer
+
+This element specifies the port number for multicast meta traffic (refer
+to the DDSI 2.1 specification, section 9.6.1, constant d0).
+
+The default value is: "0".
+
+
+##### //CycloneDDS/Domain/Discovery/Ports/ParticipantGain
+Integer
+
+This element specifies the participant gain, relating p0, articipant
+index to sets of port numbers (refer to the DDSI 2.1 specification,
+section 9.6.1, constant PG).
+
+The default value is: "2".
+
+
+##### //CycloneDDS/Domain/Discovery/Ports/UnicastDataOffset
+Integer
+
+This element specifies the port number for unicast meta traffic (refer to
+the DDSI 2.1 specification, section 9.6.1, constant d3).
+
+The default value is: "11".
+
+
+##### //CycloneDDS/Domain/Discovery/Ports/UnicastMetaOffset
+Integer
+
+This element specifies the port number for unicast meta traffic (refer to
+the DDSI 2.1 specification, section 9.6.1, constant d1).
+
+The default value is: "10".
+
+
+#### //CycloneDDS/Domain/Discovery/SPDPInterval
+Number-with-unit
+
+This element specifies the interval between spontaneous transmissions of
+participant discovery packets.
+
+The unit must be specified explicitly. Recognised units: ns, us, ms, s,
+min, hr, day.
+
+The default value is: "30 s".
+
+
+#### //CycloneDDS/Domain/Discovery/SPDPMulticastAddress
+Text
+
+This element specifies the multicast address that is used as the
+destination for the participant discovery packets. In IPv4 mode the
+default is the (standardised) 239.255.0.1, in IPv6 mode it becomes
+ff02::ffff:239.255.0.1, which is a non-standardised link-local multicast
+address.
+
+The default value is: "239.255.0.1".
+
+
+### //CycloneDDS/Domain/General
+Children: [AllowMulticast](#cycloneddsdomaingeneralallowmulticast), [DontRoute](#cycloneddsdomaingeneraldontroute), [EnableMulticastLoopback](#cycloneddsdomaingeneralenablemulticastloopback), [ExternalNetworkAddress](#cycloneddsdomaingeneralexternalnetworkaddress), [ExternalNetworkMask](#cycloneddsdomaingeneralexternalnetworkmask), [FragmentSize](#cycloneddsdomaingeneralfragmentsize), [MaxMessageSize](#cycloneddsdomaingeneralmaxmessagesize), [MulticastRecvNetworkInterfaceAddresses](#cycloneddsdomaingeneralmulticastrecvnetworkinterfaceaddresses), [MulticastTimeToLive](#cycloneddsdomaingeneralmulticasttimetolive), [NetworkInterfaceAddress](#cycloneddsdomaingeneralnetworkinterfaceaddress), [PreferMulticast](#cycloneddsdomaingeneralprefermulticast), [Transport](#cycloneddsdomaingeneraltransport), [UseIPv6](#cycloneddsdomaingeneraluseipv6)
+
+
+The General element specifies overall Cyclone DDS service settings.
+
+
+#### //CycloneDDS/Domain/General/AllowMulticast
+One of:
+* Keyword: default
+* Comma-separated list of: false, spdp, asm, ssm, true
+
+This element controls whether Cyclone DDS uses multicasts for data
+traffic.
+
+It is a comma-separated list of some of the following keywords: "spdp",
+"asm", "ssm", or either of "false" or "true", or "default".
+
+* spdp: enables the use of ASM (any-source multicast) for participant
+ discovery, joining the multicast group on the discovery socket, transmitting
+ SPDP messages to this group, but never advertising nor using any multicast
+ address in any discovery message, thus forcing unicast communications for all
+ endpoint discovery and user data.
+
+* asm: enables the use of ASM for all traffic, including receiving SPDP but not
+ transmitting SPDP messages via multicast
+
+* ssm: enables the use of SSM (source-specific multicast) for all non-SPDP
+ traffic (if supported)
+
+When set to "false" all multicasting is disabled. The default, "true"
+enables full use of multicasts. Listening for multicasts can be
+controlled by General/MulticastRecvNetworkInterfaceAddresses.
+
+"default" maps on spdp if the network is a WiFi network, on true if it is
+a wired network
+
+The default value is: "default".
+
+
+#### //CycloneDDS/Domain/General/DontRoute
+Boolean
+
+This element allows setting the SO_DONTROUTE option for outgoing packets,
+to bypass the local routing tables. This is generally useful only when
+the routing tables cannot be trusted, which is highly unusual.
+
+The default value is: "false".
+
+
+#### //CycloneDDS/Domain/General/EnableMulticastLoopback
+Boolean
+
+This element specifies whether Cyclone DDS allows IP multicast packets to
+be visible to all DDSI participants in the same node, including itself.
+It must be "true" for intra-node multicast communications, but if a node
+runs only a single Cyclone DDS service and does not host any other
+DDSI-capable programs, it should be set to "false" for improved
+performance.
+
+The default value is: "true".
+
+
+#### //CycloneDDS/Domain/General/ExternalNetworkAddress
+Text
+
+This element allows explicitly overruling the network address Cyclone DDS
+advertises in the discovery protocol, which by default is the address of
+the preferred network interface (General/NetworkInterfaceAddress), to
+allow Cyclone DDS to communicate across a Network Address Translation
+(NAT) device.
+
+The default value is: "auto".
+
+
+#### //CycloneDDS/Domain/General/ExternalNetworkMask
+Text
+
+This element specifies the network mask of the external network address.
+This element is relevant only when an external network address
+(General/ExternalNetworkAddress) is explicitly configured. In this case
+locators received via the discovery protocol that are within the same
+external subnet (as defined by this mask) will be translated to an
+internal address by replacing the network portion of the external address
+with the corresponding portion of the preferred network interface
+address. This option is IPv4-only.
+
+The default value is: "0.0.0.0".
+
+
+#### //CycloneDDS/Domain/General/FragmentSize
+Number-with-unit
+
+This element specifies the size of DDSI sample fragments generated by
+Cyclone DDS. Samples larger than FragmentSize are fragmented into
+fragments of FragmentSize bytes each, except the last one, which may be
+smaller. The DDSI spec mandates a minimum fragment size of 1025 bytes,
+but Cyclone DDS will do whatever size is requested, accepting fragments
+of which the size is at least the minimum of 1025 and FragmentSize.
+
+The unit must be specified explicitly. Recognised units: B (bytes), kB &
+KiB (2^10 bytes), MB & MiB (220 bytes), GB & GiB
+(230 bytes).
+
+The default value is: "1280 B".
+
+
+#### //CycloneDDS/Domain/General/MaxMessageSize
+Number-with-unit
+
+This element specifies the maximum size of the UDP payload that Cyclone
+DDS will generate. Cyclone DDS will try to maintain this limit within the
+bounds of the DDSI specification, which means that in some cases
+(especially for very low values of MaxMessageSize) larger payloads may
+sporadically be observed (currently up to 1192 B).
+
+On some networks it may be necessary to set this item to keep the
+packetsize below the MTU to prevent IP fragmentation. In those cases, it
+is generally advisable to also consider reducing Internal/FragmentSize.
+
+The unit must be specified explicitly. Recognised units: B (bytes), kB &
+KiB (2^10 bytes), MB & MiB (220 bytes), GB & GiB
+(230 bytes).
+
+The default value is: "4096 B".
+
+
+#### //CycloneDDS/Domain/General/MulticastRecvNetworkInterfaceAddresses
+Text
+
+This element specifies on which network interfaces Cyclone DDS listens to
+multicasts. The following options are available:
+
+* all: listen for multicasts on all multicast-capable interfaces; or
+
+* any: listen for multicasts on the operating system default interface; or
+
+* preferred: listen for multicasts on the preferred interface
+ (General/NetworkInterfaceAddress); or
+
+* none: does not listen for multicasts on any interface; or
+
+* a comma-separated list of network addresses: configures Cyclone DDS to listen
+ for multicasts on all of the listed addresses.
+
+If Cyclone DDS is in IPv6 mode and the address of the preferred network
+interface is a link-local address, "all" is treated as a synonym for
+"preferred" and a comma-separated list is treated as "preferred" if it
+contains the preferred interface and as "none" if not.
+
+The default value is: "preferred".
+
+
+#### //CycloneDDS/Domain/General/MulticastTimeToLive
+Integer
+
+This element specifies the time-to-live setting for outgoing multicast
+packets.
+
+The default value is: "32".
+
+
+#### //CycloneDDS/Domain/General/NetworkInterfaceAddress
+Text
+
+This element specifies the preferred network interface for use by Cyclone
+DDS. The preferred network interface determines the IP address that
+Cyclone DDS advertises in the discovery protocol (but see also
+General/ExternalNetworkAddress), and is also the only interface over
+which multicasts are transmitted. The interface can be identified by its
+IP address, network interface name or network portion of the address. If
+the value "auto" is entered here, Cyclone DDS will select what it
+considers the most suitable interface.
+
+The default value is: "auto".
+
+
+#### //CycloneDDS/Domain/General/PreferMulticast
+Boolean
+
+When false (default) Cyclone DDS uses unicast for data whenever there a
+single unicast suffices. Setting this to true makes it prefer
+multicasting data, falling back to unicast only when no multicast address
+is available.
+
+The default value is: "false".
+
+
+#### //CycloneDDS/Domain/General/Transport
+One of: default, udp, udp6, tcp, tcp6, raweth
+
+This element allows selecting the transport to be used (udp, udp6, tcp,
+tcp6, raweth)
+
+The default value is: "default".
+
+
+#### //CycloneDDS/Domain/General/UseIPv6
+One of: false, true, default
+
+Deprecated (use Transport instead)
+
+The default value is: "default".
+
+
+### //CycloneDDS/Domain/Internal
+Children: [AccelerateRexmitBlockSize](#cycloneddsdomaininternalacceleraterexmitblocksize), [AssumeMulticastCapable](#cycloneddsdomaininternalassumemulticastcapable), [AutoReschedNackDelay](#cycloneddsdomaininternalautoreschednackdelay), [AuxiliaryBandwidthLimit](#cycloneddsdomaininternalauxiliarybandwidthlimit), [BuiltinEndpointSet](#cycloneddsdomaininternalbuiltinendpointset), [ControlTopic](#cycloneddsdomaininternalcontroltopic), [DDSI2DirectMaxThreads](#cycloneddsdomaininternalddsi2directmaxthreads), [DefragReliableMaxSamples](#cycloneddsdomaininternaldefragreliablemaxsamples), [DefragUnreliableMaxSamples](#cycloneddsdomaininternaldefragunreliablemaxsamples), [DeliveryQueueMaxSamples](#cycloneddsdomaininternaldeliveryqueuemaxsamples), [EnableExpensiveChecks](#cycloneddsdomaininternalenableexpensivechecks), [GenerateKeyhash](#cycloneddsdomaininternalgeneratekeyhash), [HeartbeatInterval](#cycloneddsdomaininternalheartbeatinterval), [LateAckMode](#cycloneddsdomaininternallateackmode), [LeaseDuration](#cycloneddsdomaininternalleaseduration), [LivelinessMonitoring](#cycloneddsdomaininternallivelinessmonitoring), [MaxParticipants](#cycloneddsdomaininternalmaxparticipants), [MaxQueuedRexmitBytes](#cycloneddsdomaininternalmaxqueuedrexmitbytes), [MaxQueuedRexmitMessages](#cycloneddsdomaininternalmaxqueuedrexmitmessages), [MaxSampleSize](#cycloneddsdomaininternalmaxsamplesize), [MeasureHbToAckLatency](#cycloneddsdomaininternalmeasurehbtoacklatency), [MinimumSocketReceiveBufferSize](#cycloneddsdomaininternalminimumsocketreceivebuffersize), [MinimumSocketSendBufferSize](#cycloneddsdomaininternalminimumsocketsendbuffersize), [MonitorPort](#cycloneddsdomaininternalmonitorport), [MultipleReceiveThreads](#cycloneddsdomaininternalmultiplereceivethreads), [NackDelay](#cycloneddsdomaininternalnackdelay), [PreEmptiveAckDelay](#cycloneddsdomaininternalpreemptiveackdelay), [PrimaryReorderMaxSamples](#cycloneddsdomaininternalprimaryreordermaxsamples), [PrioritizeRetransmit](#cycloneddsdomaininternalprioritizeretransmit), [RediscoveryBlacklistDuration](#cycloneddsdomaininternalrediscoveryblacklistduration), [RetransmitMerging](#cycloneddsdomaininternalretransmitmerging), [RetransmitMergingPeriod](#cycloneddsdomaininternalretransmitmergingperiod), [RetryOnRejectBestEffort](#cycloneddsdomaininternalretryonrejectbesteffort), [SPDPResponseMaxDelay](#cycloneddsdomaininternalspdpresponsemaxdelay), [ScheduleTimeRounding](#cycloneddsdomaininternalscheduletimerounding), [SecondaryReorderMaxSamples](#cycloneddsdomaininternalsecondaryreordermaxsamples), [SendAsync](#cycloneddsdomaininternalsendasync), [SquashParticipants](#cycloneddsdomaininternalsquashparticipants), [SynchronousDeliveryLatencyBound](#cycloneddsdomaininternalsynchronousdeliverylatencybound), [SynchronousDeliveryPriorityThreshold](#cycloneddsdomaininternalsynchronousdeliveryprioritythreshold), [Test](#cycloneddsdomaininternaltest), [UnicastResponseToSPDPMessages](#cycloneddsdomaininternalunicastresponsetospdpmessages), [UseMulticastIfMreqn](#cycloneddsdomaininternalusemulticastifmreqn), [Watermarks](#cycloneddsdomaininternalwatermarks), [WriteBatch](#cycloneddsdomaininternalwritebatch), [WriterLingerDuration](#cycloneddsdomaininternalwriterlingerduration)
+
+
+The Internal elements deal with a variety of settings that evolving and
+that are not necessarily fully supported. For the vast majority of the
+Internal settings, the functionality per-se is supported, but the right
+to change the way the options control the functionality is reserved. This
+includes renaming or moving options.
+
+
+#### //CycloneDDS/Domain/Internal/AccelerateRexmitBlockSize
+Integer
+
+Proxy readers that are assumed to sill be retrieving historical data get
+this many samples retransmitted when they NACK something, even if some of
+these samples have sequence numbers outside the set covered by the NACK.
+
+The default value is: "0".
+
+
+#### //CycloneDDS/Domain/Internal/AssumeMulticastCapable
+Text
+
+This element controls which network interfaces are assumed to be capable
+of multicasting even when the interface flags returned by the operating
+system state it is not (this provides a workaround for some platforms).
+It is a comma-separated lists of patterns (with ? and * wildcards)
+against which the interface names are matched.
+
+The default value is: "".
+
+
+#### //CycloneDDS/Domain/Internal/AutoReschedNackDelay
+Number-with-unit
+
+This setting controls the interval with which a reader will continue
+NACK'ing missing samples in the absence of a response from the writer, as
+a protection mechanism against writers incorrectly stopping the sending
+of HEARTBEAT messages.
+
+Valid values are finite durations with an explicit unit or the keyword
+'inf' for infinity. Recognised units: ns, us, ms, s, min, hr, day.
+
+The default value is: "1 s".
+
+
+#### //CycloneDDS/Domain/Internal/AuxiliaryBandwidthLimit
+Number-with-unit
+
+This element specifies the maximum transmit rate of auxiliary traffic not
+bound to a specific channel, such as discovery traffic, as well as
+auxiliary traffic related to a certain channel if that channel has
+elected to share this global AuxiliaryBandwidthLimit. Bandwidth limiting
+uses a leaky bucket scheme. The default value "inf" means Cyclone DDS
+imposes no limitation, the underlying operating system and hardware will
+likely limit the maimum transmit rate.
+
+The unit must be specified explicitly. Recognised units: Xb/s, Xbps for
+bits/s or XB/s, XBps for bytes/s; where X is an optional prefix: k for
+10^3, Ki for 210, M for 106, Mi for 220,
+G for 109, Gi for 230.
+
+The default value is: "inf".
+
+
+#### //CycloneDDS/Domain/Internal/BuiltinEndpointSet
+One of: full, writers, minimal
+
+This element controls which participants will have which built-in
+endpoints for the discovery and liveliness protocols. Valid values are:
+
+* full: all participants have all endpoints;
+
+* writers: all participants have the writers, but just one has the readers;
+
+* minimal: only one participant has built-in endpoints.
+
+The default is writers, as this is thought to be compliant and reasonably
+efficient. Minimal may or may not be compliant but is most efficient, and
+full is inefficient but certain to be compliant. See also
+Internal/ConservativeBuiltinReaderStartup.
+
+The default value is: "writers".
+
+
+#### //CycloneDDS/Domain/Internal/ControlTopic
+
+The ControlTopic element allows configured whether Cyclone DDS provides a
+special control interface via a predefined topic or not.
+
+
+#### //CycloneDDS/Domain/Internal/DDSI2DirectMaxThreads
+Integer
+
+This element sets the maximum number of extra threads for an
+experimental, undocumented and unsupported direct mode.
+
+The default value is: "1".
+
+
+#### //CycloneDDS/Domain/Internal/DefragReliableMaxSamples
+Integer
+
+This element sets the maximum number of samples that can be defragmented
+simultaneously for a reliable writer. This has to be large enough to
+handle retransmissions of historical data in addition to new samples.
+
+The default value is: "16".
+
+
+#### //CycloneDDS/Domain/Internal/DefragUnreliableMaxSamples
+Integer
+
+This element sets the maximum number of samples that can be defragmented
+simultaneously for a best-effort writers.
+
+The default value is: "4".
+
+
+#### //CycloneDDS/Domain/Internal/DeliveryQueueMaxSamples
+Integer
+
+This element controls the Maximum size of a delivery queue, expressed in
+samples. Once a delivery queue is full, incoming samples destined for
+that queue are dropped until space becomes available again.
+
+The default value is: "256".
+
+
+#### //CycloneDDS/Domain/Internal/EnableExpensiveChecks
+One of:
+* Comma-separated list of: whc, rhc, all
+* Or empty
+
+This element enables expensive checks in builds with assertions enabled
+and is ignored otherwise. Recognised categories are:
+
+* whc: writer history cache checking
+
+* rhc: reader history cache checking
+
+
+
+In addition, there is the keyword all that enables all checks.
+
+The default value is: "".
+
+
+#### //CycloneDDS/Domain/Internal/GenerateKeyhash
+Boolean
+
+When true, include keyhashes in outgoing data for topics with keys.
+
+The default value is: "false".
+
+
+#### //CycloneDDS/Domain/Internal/HeartbeatInterval
+Number-with-unit
+
+This elemnents allows configuring the base interval for sending writer
+heartbeats and the bounds within it can vary.
+
+Valid values are finite durations with an explicit unit or the keyword
+'inf' for infinity. Recognised units: ns, us, ms, s, min, hr, day.
+
+The default value is: "100 ms".
+
+
+#### //CycloneDDS/Domain/Internal/LateAckMode
+Boolean
+
+Ack a sample only when it has been delivered, instead of when committed
+to delivering it.
+
+The default value is: "false".
+
+
+#### //CycloneDDS/Domain/Internal/LeaseDuration
+Number-with-unit
+
+This setting controls the default participant lease duration.
+
+The unit must be specified explicitly. Recognised units: ns, us, ms, s,
+min, hr, day.
+
+The default value is: "10 s".
+
+
+#### //CycloneDDS/Domain/Internal/LivelinessMonitoring
+Boolean
+
+This element controls whether or not implementation should internally
+monitor its own liveliness. If liveliness monitoring is enabled, stack
+traces can be dumped automatically when some thread appears to have
+stopped making progress.
+
+The default value is: "false".
+
+
+#### //CycloneDDS/Domain/Internal/MaxParticipants
+Integer
+
+This elements configures the maximum number of DCPS domain participants
+this Cyclone DDS instance is willing to service. 0 is unlimited.
+
+The default value is: "0".
+
+
+#### //CycloneDDS/Domain/Internal/MaxQueuedRexmitBytes
+Number-with-unit
+
+This setting limits the maximum number of bytes queued for
+retransmission. The default value of 0 is unlimited unless an
+AuxiliaryBandwidthLimit has been set, in which case it becomes NackDelay
+* AuxiliaryBandwidthLimit. It must be large enough to contain the largest
+sample that may need to be retransmitted.
+
+The unit must be specified explicitly. Recognised units: B (bytes), kB &
+KiB (2^10 bytes), MB & MiB (220 bytes), GB & GiB
+(230 bytes).
+
+The default value is: "50 kB".
+
+
+#### //CycloneDDS/Domain/Internal/MaxQueuedRexmitMessages
+Integer
+
+This settings limits the maximum number of samples queued for
+retransmission.
+
+The default value is: "200".
+
+
+#### //CycloneDDS/Domain/Internal/MaxSampleSize
+Number-with-unit
+
+This setting controls the maximum (CDR) serialised size of samples that
+Cyclone DDS will forward in either direction. Samples larger than this
+are discarded with a warning.
+
+The unit must be specified explicitly. Recognised units: B (bytes), kB &
+KiB (2^10 bytes), MB & MiB (220 bytes), GB & GiB
+(230 bytes).
+
+The default value is: "2147483647 B".
+
+
+#### //CycloneDDS/Domain/Internal/MeasureHbToAckLatency
+Boolean
+
+This element enables heartbeat-to-ack latency among Cyclone DDS services
+by prepending timestamps to Heartbeat and AckNack messages and
+calculating round trip times. This is non-standard behaviour. The
+measured latencies are quite noisy and are currently not used anywhere.
+
+The default value is: "false".
+
+
+#### //CycloneDDS/Domain/Internal/MinimumSocketReceiveBufferSize
+Number-with-unit
+
+This setting controls the minimum size of socket receive buffers. The
+operating system provides some size receive buffer upon creation of the
+socket, this option can be used to increase the size of the buffer beyond
+that initially provided by the operating system. If the buffer size
+cannot be increased to the specified size, an error is reported.
+
+The default setting is the word "default", which means Cyclone DDS will
+attempt to increase the buffer size to 1MB, but will silently accept a
+smaller buffer should that attempt fail.
+
+The unit must be specified explicitly. Recognised units: B (bytes), kB &
+KiB (2^10 bytes), MB & MiB (220 bytes), GB & GiB
+(230 bytes).
+
+The default value is: "default".
+
+
+#### //CycloneDDS/Domain/Internal/MinimumSocketSendBufferSize
+Number-with-unit
+
+This setting controls the minimum size of socket send buffers. This
+setting can only increase the size of the send buffer, if the operating
+system by default creates a larger buffer, it is left unchanged.
+
+The unit must be specified explicitly. Recognised units: B (bytes), kB &
+KiB (2^10 bytes), MB & MiB (220 bytes), GB & GiB
+(230 bytes).
+
+The default value is: "64 KiB".
+
+
+#### //CycloneDDS/Domain/Internal/MonitorPort
+Integer
+
+This element allows configuring a service that dumps a text description
+of part the internal state to TCP clients. By default (-1), this is
+disabled; specifying 0 means a kernel-allocated port is used; a positive
+number is used as the TCP port number.
+
+The default value is: "-1".
+
+
+#### //CycloneDDS/Domain/Internal/MultipleReceiveThreads
+Boolean
+
+This element controls whether all traffic is handled by a single receive
+thread or whether multiple receive threads may be used to improve
+latency. Currently multiple receive threads are only used for
+connectionless transport (e.g., UDP) and ManySocketsMode not set to
+single (the default).
+
+The default value is: "true".
+
+
+#### //CycloneDDS/Domain/Internal/NackDelay
+Number-with-unit
+
+This setting controls the delay between receipt of a HEARTBEAT indicating
+missing samples and a NACK (ignored when the HEARTBEAT requires an
+answer). However, no NACK is sent if a NACK had been scheduled already
+for a response earlier than the delay requests: then that NACK will
+incorporate the latest information.
+
+The unit must be specified explicitly. Recognised units: ns, us, ms, s,
+min, hr, day.
+
+The default value is: "10 ms".
+
+
+#### //CycloneDDS/Domain/Internal/PreEmptiveAckDelay
+Number-with-unit
+
+This setting controls the delay between the discovering a remote writer
+and sending a pre-emptive AckNack to discover the range of data
+available.
+
+The unit must be specified explicitly. Recognised units: ns, us, ms, s,
+min, hr, day.
+
+The default value is: "10 ms".
+
+
+#### //CycloneDDS/Domain/Internal/PrimaryReorderMaxSamples
+Integer
+
+This element sets the maximum size in samples of a primary re-order
+administration. Each proxy writer has one primary re-order administration
+to buffer the packet flow in case some packets arrive out of order. Old
+samples are forwarded to secondary re-order administrations associated
+with readers in need of historical data.
+
+The default value is: "128".
+
+
+#### //CycloneDDS/Domain/Internal/PrioritizeRetransmit
+Boolean
+
+This element controls whether retransmits are prioritized over new data,
+speeding up recovery.
+
+The default value is: "true".
+
+
+#### //CycloneDDS/Domain/Internal/RediscoveryBlacklistDuration
+Number-with-unit
+
+This element controls for how long a remote participant that was
+previously deleted will remain on a blacklist to prevent rediscovery,
+giving the software on a node time to perform any cleanup actions it
+needs to do. To some extent this delay is required internally by Cyclone
+DDS, but in the default configuration with the 'enforce' attribute set to
+false, Cyclone DDS will reallow rediscovery as soon as it has cleared its
+internal administration. Setting it to too small a value may result in
+the entry being pruned from the blacklist before Cyclone DDS is ready, it
+is therefore recommended to set it to at least several seconds.
+
+Valid values are finite durations with an explicit unit or the keyword
+'inf' for infinity. Recognised units: ns, us, ms, s, min, hr, day.
+
+The default value is: "10s".
+
+
+#### //CycloneDDS/Domain/Internal/RetransmitMerging
+One of: never, adaptive, always
+
+This elements controls the addressing and timing of retransmits. Possible
+values are:
+
+* never: retransmit only to the NACK-ing reader;
+
+* adaptive: attempt to combine retransmits needed for reliability, but send
+ historical (transient-local) data to the requesting reader only;
+
+* always: do not distinguish between different causes, always try to merge.
+
+The default is never. See also Internal/RetransmitMergingPeriod.
+
+The default value is: "never".
+
+
+#### //CycloneDDS/Domain/Internal/RetransmitMergingPeriod
+Number-with-unit
+
+This setting determines the size of the time window in which a NACK of
+some sample is ignored because a retransmit of that sample has been
+multicasted too recently. This setting has no effect on unicasted
+retransmits.
+
+See also Internal/RetransmitMerging.
+
+The unit must be specified explicitly. Recognised units: ns, us, ms, s,
+min, hr, day.
+
+The default value is: "5 ms".
+
+
+#### //CycloneDDS/Domain/Internal/RetryOnRejectBestEffort
+Boolean
+
+Whether or not to locally retry pushing a received best-effort sample
+into the reader caches when resource limits are reached.
+
+The default value is: "false".
+
+
+#### //CycloneDDS/Domain/Internal/SPDPResponseMaxDelay
+Number-with-unit
+
+Maximum pseudo-random delay in milliseconds between discovering a remote
+participant and responding to it.
+
+The unit must be specified explicitly. Recognised units: ns, us, ms, s,
+min, hr, day.
+
+The default value is: "0 ms".
+
+
+#### //CycloneDDS/Domain/Internal/ScheduleTimeRounding
+Number-with-unit
+
+This setting allows the timing of scheduled events to be rounded up so
+that more events can be handled in a single cycle of the event queue. The
+default is 0 and causes no rounding at all, i.e. are scheduled exactly,
+whereas a value of 10ms would mean that events are rounded up to the
+nearest 10 milliseconds.
+
+The unit must be specified explicitly. Recognised units: ns, us, ms, s,
+min, hr, day.
+
+The default value is: "0 ms".
+
+
+#### //CycloneDDS/Domain/Internal/SecondaryReorderMaxSamples
+Integer
+
+This element sets the maximum size in samples of a secondary re-order
+administration. The secondary re-order administration is per reader in
+need of historical data.
+
+The default value is: "128".
+
+
+#### //CycloneDDS/Domain/Internal/SendAsync
+Boolean
+
+This element controls whether the actual sending of packets occurs on the
+same thread that prepares them, or is done asynchronously by another
+thread.
+
+The default value is: "false".
+
+
+#### //CycloneDDS/Domain/Internal/SquashParticipants
+Boolean
+
+This element controls whether Cyclone DDS advertises all the domain
+participants it serves in DDSI (when set to false), or rather only one
+domain participant (the one corresponding to the Cyclone DDS process;
+when set to true). In the latter case Cyclone DDS becomes the virtual
+owner of all readers and writers of all domain participants, dramatically
+reducing discovery traffic (a similar effect can be obtained by setting
+Internal/BuiltinEndpointSet to "minimal" but with less loss of
+information).
+
+The default value is: "false".
+
+
+#### //CycloneDDS/Domain/Internal/SynchronousDeliveryLatencyBound
+Number-with-unit
+
+This element controls whether samples sent by a writer with QoS settings
+transport_priority >= SynchronousDeliveryPriorityThreshold and a
+latency_budget at most this element's value will be delivered
+synchronously from the "recv" thread, all others will be delivered
+asynchronously through delivery queues. This reduces latency at the
+expense of aggregate bandwidth.
+
+Valid values are finite durations with an explicit unit or the keyword
+'inf' for infinity. Recognised units: ns, us, ms, s, min, hr, day.
+
+The default value is: "inf".
+
+
+#### //CycloneDDS/Domain/Internal/SynchronousDeliveryPriorityThreshold
+Integer
+
+This element controls whether samples sent by a writer with QoS settings
+latency_budget <= SynchronousDeliveryLatencyBound and transport_priority
+greater than or equal to this element's value will be delivered
+synchronously from the "recv" thread, all others will be delivered
+asynchronously through delivery queues. This reduces latency at the
+expense of aggregate bandwidth.
+
+The default value is: "0".
+
+
+#### //CycloneDDS/Domain/Internal/Test
+Children: [XmitLossiness](#cycloneddsdomaininternaltestxmitlossiness)
+
+
+Testing options.
+
+
+##### //CycloneDDS/Domain/Internal/Test/XmitLossiness
+Integer
+
+This element controls the fraction of outgoing packets to drop, specified
+as samples per thousand.
+
+The default value is: "0".
+
+
+#### //CycloneDDS/Domain/Internal/UnicastResponseToSPDPMessages
+Boolean
+
+This element controls whether the response to a newly discovered
+participant is sent as a unicasted SPDP packet, instead of rescheduling
+the periodic multicasted one. There is no known benefit to setting this
+to false.
+
+The default value is: "true".
+
+
+#### //CycloneDDS/Domain/Internal/UseMulticastIfMreqn
+Integer
+
+Do not use.
+
+The default value is: "0".
+
+
+#### //CycloneDDS/Domain/Internal/Watermarks
+Children: [WhcAdaptive](#cycloneddsdomaininternalwatermarkswhcadaptive), [WhcHigh](#cycloneddsdomaininternalwatermarkswhchigh), [WhcHighInit](#cycloneddsdomaininternalwatermarkswhchighinit), [WhcLow](#cycloneddsdomaininternalwatermarkswhclow)
+
+
+Watermarks for flow-control.
+
+
+##### //CycloneDDS/Domain/Internal/Watermarks/WhcAdaptive
+Boolean
+
+This element controls whether Cyclone DDS will adapt the high-water mark
+to current traffic conditions, based on retransmit requests and transmit
+pressure.
+
+The default value is: "true".
+
+
+##### //CycloneDDS/Domain/Internal/Watermarks/WhcHigh
+Number-with-unit
+
+This element sets the maximum allowed high-water mark for the Cyclone DDS
+WHCs, expressed in bytes. A writer is suspended when the WHC reaches this
+size.
+
+The unit must be specified explicitly. Recognised units: B (bytes), kB &
+KiB (2^10 bytes), MB & MiB (220 bytes), GB & GiB
+(230 bytes).
+
+The default value is: "100 kB".
+
+
+##### //CycloneDDS/Domain/Internal/Watermarks/WhcHighInit
+Number-with-unit
+
+This element sets the initial level of the high-water mark for the
+Cyclone DDS WHCs, expressed in bytes.
+
+The unit must be specified explicitly. Recognised units: B (bytes), kB &
+KiB (2^10 bytes), MB & MiB (220 bytes), GB & GiB
+(230 bytes).
+
+The default value is: "30 kB".
+
+
+##### //CycloneDDS/Domain/Internal/Watermarks/WhcLow
+Number-with-unit
+
+This element sets the low-water mark for the Cyclone DDS WHCs, expressed
+in bytes. A suspended writer resumes transmitting when its Cyclone DDS
+WHC shrinks to this size.
+
+The unit must be specified explicitly. Recognised units: B (bytes), kB &
+KiB (2^10 bytes), MB & MiB (220 bytes), GB & GiB
+(230 bytes).
+
+The default value is: "1 kB".
+
+
+#### //CycloneDDS/Domain/Internal/WriteBatch
+Boolean
+
+This element enables the batching of write operations. By default each
+write operation writes through the write cache and out onto the
+transport. Enabling write batching causes multiple small write operations
+to be aggregated within the write cache into a single larger write. This
+gives greater throughput at the expense of latency. Currently there is no
+mechanism for the write cache to automatically flush itself, so that if
+write batching is enabled, the application may havee to use the
+dds_write_flush function to ensure thta all samples are written.
+
+The default value is: "false".
+
+
+#### //CycloneDDS/Domain/Internal/WriterLingerDuration
+Number-with-unit
+
+This setting controls the maximum duration for which actual deletion of a
+reliable writer with unacknowledged data in its history will be postponed
+to provide proper reliable transmission.
+
+The unit must be specified explicitly. Recognised units: ns, us, ms, s,
+min, hr, day.
+
+The default value is: "1 s".
+
+
+### //CycloneDDS/Domain/Partitioning
+Children: [IgnoredPartitions](#cycloneddsdomainpartitioningignoredpartitions), [NetworkPartitions](#cycloneddsdomainpartitioningnetworkpartitions), [PartitionMappings](#cycloneddsdomainpartitioningpartitionmappings)
+
+
+The Partitioning element specifies Cyclone DDS network partitions and how
+DCPS partition/topic combinations are mapped onto the network partitions.
+
+
+#### //CycloneDDS/Domain/Partitioning/IgnoredPartitions
+Children: [IgnoredPartition](#cycloneddsdomainpartitioningignoredpartitionsignoredpartition)
+
+
+The IgnoredPartitions element specifies DCPS partition/topic combinations
+that are not distributed over the network.
+
+
+##### //CycloneDDS/Domain/Partitioning/IgnoredPartitions/IgnoredPartition
+Attributes: [DCPSPartitionTopic](#cycloneddsdomainpartitioningignoredpartitionsignoredpartitiondcpspartitiontopic)
+
+
+This element can be used to prevent certain combinations of DCPS
+partition and topic from being transmitted over the network. Cyclone DDS
+will complete ignore readers and writers for which all DCPS partitions as
+well as their topic is ignored, not even creating DDSI readers and
+writers to mirror the DCPS ones.
+
+
+##### //CycloneDDS/Domain/Partitioning/IgnoredPartitions/IgnoredPartition[@DCPSPartitionTopic]
+Text
+
+This attribute specifies a partition and a topic expression, separated by
+a single '.', that are used to determine if a given partition and topic
+will be ignored or not. The expressions may use the usual wildcards '*'
+and '?'. Cyclone DDS will consider an wildcard DCPS partition to match an
+expression iff there exists a string that satisfies both expressions.
+
+
+#### //CycloneDDS/Domain/Partitioning/NetworkPartitions
+Children: [NetworkPartition](#cycloneddsdomainpartitioningnetworkpartitionsnetworkpartition)
+
+
+The NetworkPartitions element specifies the Cyclone DDS network
+partitions.
+
+
+##### //CycloneDDS/Domain/Partitioning/NetworkPartitions/NetworkPartition
+Attributes: [Address](#cycloneddsdomainpartitioningnetworkpartitionsnetworkpartitionaddress), [Connected](#cycloneddsdomainpartitioningnetworkpartitionsnetworkpartitionconnected), [Name](#cycloneddsdomainpartitioningnetworkpartitionsnetworkpartitionname)
+
+
+This element defines a Cyclone DDS network partition.
+
+
+##### //CycloneDDS/Domain/Partitioning/NetworkPartitions/NetworkPartition[@Address]
+Text
+
+This attribute specifies the multicast addresses associated with the
+network partition as a comma-separated list. Readers matching this
+network partition (cf. Partitioning/PartitionMappings) will listen for
+multicasts on all of these addresses and advertise them in the discovery
+protocol. The writers will select the most suitable address from the
+addresses advertised by the readers.
+
+
+##### //CycloneDDS/Domain/Partitioning/NetworkPartitions/NetworkPartition[@Connected]
+Boolean
+
+This attribute is a placeholder.
+
+The default value is: "true".
+
+
+##### //CycloneDDS/Domain/Partitioning/NetworkPartitions/NetworkPartition[@Name]
+Text
+
+This attribute specifies the name of this Cyclone DDS network partition.
+Two network partitions cannot have the same name.
+
+
+#### //CycloneDDS/Domain/Partitioning/PartitionMappings
+Children: [PartitionMapping](#cycloneddsdomainpartitioningpartitionmappingspartitionmapping)
+
+
+The PartitionMappings element specifies the mapping from DCPS
+partition/topic combinations to Cyclone DDS network partitions.
+
+
+##### //CycloneDDS/Domain/Partitioning/PartitionMappings/PartitionMapping
+Attributes: [DCPSPartitionTopic](#cycloneddsdomainpartitioningpartitionmappingspartitionmappingdcpspartitiontopic), [NetworkPartition](#cycloneddsdomainpartitioningpartitionmappingspartitionmappingnetworkpartition)
+
+
+This element defines a mapping from a DCPS partition/topic combination to
+a Cyclone DDS network partition. This allows partitioning data flows by
+using special multicast addresses for part of the data and possibly also
+encrypting the data flow.
+
+
+##### //CycloneDDS/Domain/Partitioning/PartitionMappings/PartitionMapping[@DCPSPartitionTopic]
+Text
+
+This attribute specifies a partition and a topic expression, separated by
+a single '.', that are used to determine if a given partition and topic
+maps to the Cyclone DDS network partition named by the NetworkPartition
+attribute in this PartitionMapping element. The expressions may use the
+usual wildcards '*' and '?'. Cyclone DDS will consider a wildcard DCPS
+partition to match an expression if there exists a string that satisfies
+both expressions.
+
+
+##### //CycloneDDS/Domain/Partitioning/PartitionMappings/PartitionMapping[@NetworkPartition]
+Text
+
+This attribute specifies which Cyclone DDS network partition is to be
+used for DCPS partition/topic combinations matching the
+DCPSPartitionTopic attribute within this PartitionMapping element.
+
+
+### //CycloneDDS/Domain/SSL
+Children: [CertificateVerification](#cycloneddsdomainsslcertificateverification), [Ciphers](#cycloneddsdomainsslciphers), [Enable](#cycloneddsdomainsslenable), [EntropyFile](#cycloneddsdomainsslentropyfile), [KeyPassphrase](#cycloneddsdomainsslkeypassphrase), [KeystoreFile](#cycloneddsdomainsslkeystorefile), [MinimumTLSVersion](#cycloneddsdomainsslminimumtlsversion), [SelfSignedCertificates](#cycloneddsdomainsslselfsignedcertificates), [VerifyClient](#cycloneddsdomainsslverifyclient)
+
+
+The SSL element allows specifying various parameters related to using
+SSL/TLS for DDSI over TCP.
+
+
+#### //CycloneDDS/Domain/SSL/CertificateVerification
+Boolean
+
+If disabled this allows SSL connections to occur even if an X509
+certificate fails verification.
+
+The default value is: "true".
+
+
+#### //CycloneDDS/Domain/SSL/Ciphers
+Text
+
+The set of ciphers used by SSL/TLS
+
+The default value is: "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH".
+
+
+#### //CycloneDDS/Domain/SSL/Enable
+Boolean
+
+This enables SSL/TLS for TCP.
+
+The default value is: "false".
+
+
+#### //CycloneDDS/Domain/SSL/EntropyFile
+Text
+
+The SSL/TLS random entropy file name.
+
+The default value is: "".
+
+
+#### //CycloneDDS/Domain/SSL/KeyPassphrase
+Text
+
+The SSL/TLS key pass phrase for encrypted keys.
+
+The default value is: "secret".
+
+
+#### //CycloneDDS/Domain/SSL/KeystoreFile
+Text
+
+The SSL/TLS key and certificate store file name. The keystore must be in
+PEM format.
+
+The default value is: "keystore".
+
+
+#### //CycloneDDS/Domain/SSL/MinimumTLSVersion
+Text
+
+The minimum TLS version that may be negotiated, valid values are 1.2 and
+1.3.
+
+The default value is: "1.3".
+
+
+#### //CycloneDDS/Domain/SSL/SelfSignedCertificates
+Boolean
+
+This enables the use of self signed X509 certificates.
+
+The default value is: "false".
+
+
+#### //CycloneDDS/Domain/SSL/VerifyClient
+Boolean
+
+This enables an SSL server checking the X509 certificate of a connecting
+client.
+
+The default value is: "true".
+
+
+### //CycloneDDS/Domain/Sizing
+Children: [ReceiveBufferChunkSize](#cycloneddsdomainsizingreceivebufferchunksize), [ReceiveBufferSize](#cycloneddsdomainsizingreceivebuffersize)
+
+
+The Sizing element specifies a variety of configuration settings dealing
+with expected system sizes, buffer sizes, &c.
+
+
+#### //CycloneDDS/Domain/Sizing/ReceiveBufferChunkSize
+Number-with-unit
+
+This element specifies the size of one allocation unit in the receive
+buffer. Must be greater than the maximum packet size by a modest amount
+(too large packets are dropped). Each allocation is shrunk immediately
+after processing a message, or freed straightaway.
+
+The unit must be specified explicitly. Recognised units: B (bytes), kB &
+KiB (2^10 bytes), MB & MiB (220 bytes), GB & GiB
+(230 bytes).
+
+The default value is: "128 KiB".
+
+
+#### //CycloneDDS/Domain/Sizing/ReceiveBufferSize
+Number-with-unit
+
+This element sets the size of a single receive buffer. Many receive
+buffers may be needed. The minimum workable size a little bit larger than
+Sizing/ReceiveBufferChunkSize, and the value used is taken as the
+configured value and the actual minimum workable size.
+
+The unit must be specified explicitly. Recognised units: B (bytes), kB &
+KiB (2^10 bytes), MB & MiB (220 bytes), GB & GiB
+(230 bytes).
+
+The default value is: "1 MiB".
+
+
+### //CycloneDDS/Domain/TCP
+Children: [AlwaysUsePeeraddrForUnicast](#cycloneddsdomaintcpalwaysusepeeraddrforunicast), [Enable](#cycloneddsdomaintcpenable), [NoDelay](#cycloneddsdomaintcpnodelay), [Port](#cycloneddsdomaintcpport), [ReadTimeout](#cycloneddsdomaintcpreadtimeout), [WriteTimeout](#cycloneddsdomaintcpwritetimeout)
+
+
+The TCP element allows specifying various parameters related to running
+DDSI over TCP.
+
+
+#### //CycloneDDS/Domain/TCP/AlwaysUsePeeraddrForUnicast
+Boolean
+
+Setting this to true means the unicast addresses in SPDP packets will be
+ignored and the peer address from the TCP connection will be used
+instead. This may help work around incorrectly advertised addresses when
+using TCP.
+
+The default value is: "false".
+
+
+#### //CycloneDDS/Domain/TCP/Enable
+One of: false, true, default
+
+This element enables the optional TCP transport - deprecated, use
+General/Transport instead.
+
+The default value is: "default".
+
+
+#### //CycloneDDS/Domain/TCP/NoDelay
+Boolean
+
+This element enables the TCP_NODELAY socket option, preventing multiple
+DDSI messages being sent in the same TCP request. Setting this option
+typically optimises latency over throughput.
+
+The default value is: "true".
+
+
+#### //CycloneDDS/Domain/TCP/Port
+Integer
+
+This element specifies the TCP port number on which Cyclone DDS accepts
+connections. If the port is set it is used in entity locators, published
+with DDSI discovery. Dynamically allocated if zero. Disabled if -1 or not
+configured. If disabled other DDSI services will not be able to establish
+connections with the service, the service can only communicate by
+establishing connections to other services.
+
+The default value is: "-1".
+
+
+#### //CycloneDDS/Domain/TCP/ReadTimeout
+Number-with-unit
+
+This element specifies the timeout for blocking TCP read operations. If
+this timeout expires then the connection is closed.
+
+The unit must be specified explicitly. Recognised units: ns, us, ms, s,
+min, hr, day.
+
+The default value is: "2 s".
+
+
+#### //CycloneDDS/Domain/TCP/WriteTimeout
+Number-with-unit
+
+This element specifies the timeout for blocking TCP write operations. If
+this timeout expires then the connection is closed.
+
+The unit must be specified explicitly. Recognised units: ns, us, ms, s,
+min, hr, day.
+
+The default value is: "2 s".
+
+
+### //CycloneDDS/Domain/ThreadPool
+Children: [Enable](#cycloneddsdomainthreadpoolenable), [ThreadMax](#cycloneddsdomainthreadpoolthreadmax), [Threads](#cycloneddsdomainthreadpoolthreads)
+
+
+The ThreadPool element allows specifying various parameters related to
+using a thread pool to send DDSI messages to multiple unicast addresses
+(TCP or UDP).
+
+
+#### //CycloneDDS/Domain/ThreadPool/Enable
+Boolean
+
+This element enables the optional thread pool.
+
+The default value is: "false".
+
+
+#### //CycloneDDS/Domain/ThreadPool/ThreadMax
+Integer
+
+This elements configures the maximum number of threads in the thread
+pool.
+
+The default value is: "8".
+
+
+#### //CycloneDDS/Domain/ThreadPool/Threads
+Integer
+
+This elements configures the initial number of threads in the thread
+pool.
+
+The default value is: "4".
+
+
+### //CycloneDDS/Domain/Threads
+Children: [Thread](#cycloneddsdomainthreadsthread)
+
+
+This element is used to set thread properties.
+
+
+#### //CycloneDDS/Domain/Threads/Thread
+Attributes: [Name](#cycloneddsdomainthreadsthreadname)
+
+Children: [Scheduling](#cycloneddsdomainthreadsthreadscheduling), [StackSize](#cycloneddsdomainthreadsthreadstacksize)
+
+
+This element is used to set thread properties.
+
+
+#### //CycloneDDS/Domain/Threads/Thread[@Name]
+Text
+
+The Name of the thread for which properties are being set. The following
+threads exist:
+
+* gc: garbage collector thread involved in deleting entities;
+
+* recv: receive thread, taking data from the network and running the protocol
+ state machine;
+
+* dq.builtins: delivery thread for DDSI-builtin data, primarily for discovery;
+
+* lease: DDSI liveliness monitoring;
+
+* tev: general timed-event handling, retransmits and discovery;
+
+* xmit.CHAN: transmit thread for channel CHAN;
+
+* dq.CHAN: delivery thread for channel CHAN;
+
+* tev.CHAN: timed-even thread for channel CHAN.
+
+
+##### //CycloneDDS/Domain/Threads/Thread/Scheduling
+Children: [Class](#cycloneddsdomainthreadsthreadschedulingclass), [Priority](#cycloneddsdomainthreadsthreadschedulingpriority)
+
+
+This element configures the scheduling properties of the thread.
+
+
+###### //CycloneDDS/Domain/Threads/Thread/Scheduling/Class
+One of: realtime, timeshare, default
+
+This element specifies the thread scheduling class (realtime, timeshare
+or default). The user may need special privileges from the underlying
+operating system to be able to assign some of the privileged scheduling
+classes.
+
+The default value is: "default".
+
+
+###### //CycloneDDS/Domain/Threads/Thread/Scheduling/Priority
+Text
+
+This element specifies the thread priority (decimal integer or default).
+Only priorities that are supported by the underlying operating system can
+be assigned to this element. The user may need special privileges from
+the underlying operating system to be able to assign some of the
+privileged priorities.
+
+The default value is: "default".
+
+
+##### //CycloneDDS/Domain/Threads/Thread/StackSize
+Number-with-unit
+
+This element configures the stack size for this thread. The default value
+default leaves the stack size at the operating system default.
+
+The unit must be specified explicitly. Recognised units: B (bytes), kB &
+KiB (2^10 bytes), MB & MiB (220 bytes), GB & GiB
+(230 bytes).
+
+The default value is: "default".
+
+
+### //CycloneDDS/Domain/Tracing
+Children: [AppendToFile](#cycloneddsdomaintracingappendtofile), [Category](#cycloneddsdomaintracingcategory), [OutputFile](#cycloneddsdomaintracingoutputfile), [PacketCaptureFile](#cycloneddsdomaintracingpacketcapturefile), [Verbosity](#cycloneddsdomaintracingverbosity)
+
+
+The Tracing element controls the amount and type of information that is
+written into the tracing log by the DDSI service. This is useful to track
+the DDSI service during application development.
+
+
+#### //CycloneDDS/Domain/Tracing/AppendToFile
+Boolean
+
+This option specifies whether the output is to be appended to an existing
+log file. The default is to create a new log file each time, which is
+generally the best option if a detailed log is generated.
+
+The default value is: "false".
+
+
+#### //CycloneDDS/Domain/Tracing/Category
+One of:
+* Comma-separated list of: fatal, error, warning, info, config, discovery, data, radmin, timing, traffic, topic, tcp, plist, whc, throttle, rhc, content, trace
+* Or empty
+
+This element enables individual logging categories. These are enabled in
+addition to those enabled by Tracing/Verbosity. Recognised categories
+are:
+
+* fatal: all fatal errors, errors causing immediate termination
+
+* error: failures probably impacting correctness but not necessarily causing
+ immediate termination
+
+* warning: abnormal situations that will likely not impact correctness
+
+* config: full dump of the configuration
+
+* info: general informational notices
+
+* discovery: all discovery activity
+
+* data: include data content of samples in traces
+
+* radmin: receive buffer administration
+
+* timing: periodic reporting of CPU loads per thread
+
+* traffic: periodic reporting of total outgoing data
+
+* whc: tracing of writer history cache changes
+
+* tcp: tracing of TCP-specific activity
+
+* topic: tracing of topic definitions
+
+* >i>plist: tracing of discovery parameter list interpretation
+
+
+
+In addition, there is the keyword trace that enables all but radmin,
+topic, plist and whc.
+
+The categorisation of tracing output is incomplete and hence most of the
+verbosity levels and categories are not of much use in the current
+release. This is an ongoing process and here we describe the target
+situation rather than the current situation. Currently, the most useful
+is trace.
+
+The default value is: "".
+
+
+#### //CycloneDDS/Domain/Tracing/OutputFile
+Text
+
+This option specifies where the logging is printed to. Note that stdout
+and stderr are treated as special values, representing "standard out" and
+"standard error" respectively. No file is created unless logging
+categories are enabled using the Tracing/Verbosity or
+Tracing/EnabledCategory settings.
+
+The default value is: "cyclonedds.log".
+
+
+#### //CycloneDDS/Domain/Tracing/PacketCaptureFile
+Text
+
+This option specifies the file to which received and sent packets will be
+logged in the "pcap" format suitable for analysis using common networking
+tools, such as WireShark. IP and UDP headers are ficitious, in particular
+the destination address of received packets. The TTL may be used to
+distinguish between sent and received packets: it is 255 for sent packets
+and 128 for received ones. Currently IPv4 only.
+
+The default value is: "".
+
+
+#### //CycloneDDS/Domain/Tracing/Verbosity
+One of: finest, finer, fine, config, info, warning, severe, none
+
+This element enables standard groups of categories, based on a desired
+verbosity level. This is in addition to the categories enabled by the
+Tracing/Category setting. Recognised verbosity levels and the categories
+they map to are:
+
+* none: no Cyclone DDS log
+
+* severe: error and fatal
+
+* warning: severe + warning
+
+* info: warning + info
+
+* config: info + config
+
+* fine: config + discovery
+
+* finer: fine + traffic and timing
+
+* finest: finer + trace
+
+While none prevents any message from being written to a Cyclone DDS log
+file.
+
+The categorisation of tracing output is incomplete and hence most of the
+verbosity levels and categories are not of much use in the current
+release. This is an ongoing process and here we describe the target
+situation rather than the current situation. Currently, the most useful
+verbosity levels are config, fine and finest.
+
+The default value is: "none".
diff --git a/etc/cyclonedds.rnc b/etc/cyclonedds.rnc
new file mode 100644
index 0000000..41e0b7f
--- /dev/null
+++ b/etc/cyclonedds.rnc
@@ -0,0 +1,1507 @@
+namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
+grammar {
+ start =
+ [ a:documentation [ xml:lang="en" """
+CycloneDDS configuration""" ] ]
+ element CycloneDDS {
+ [ a:documentation [ xml:lang="en" """
+The General element specifying Domain related settings.
""" ] ]
+ element Domain {
+ [ a:documentation [ xml:lang="en" """
+Domain id this configuration applies to, or "any" if it applies to all
+domain ids.
The default value is: "any".
""" ] ]
+ attribute Id {
+ text
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element is used to group a set of channels. The channels are
+independent data paths through Cyclone DDS and by using separate threads
+and setting their priorities appropriately, chanenls can be used to map
+transport priorities to operating system scheduler priorities, ensuring
+system-wide end-to-end priority preservation.
""" ] ]
+ element Channels {
+ [ a:documentation [ xml:lang="en" """
+This element defines a channel.
""" ] ]
+ element Channel {
+ [ a:documentation [ xml:lang="en" """
+This attribute specifies name of this channel. The name should
+uniquely identify the channel.
""" ] ]
+ attribute Name {
+ text
+ }
+ & [ a:documentation [ xml:lang="en" """
+This attribute sets the transport priority threshold for the channel.
+Each DCPS data writer has a "transport_priority" QoS and this QoS is used
+to select a channel for use by this writer. The selected channel is the
+one with the largest threshold not greater than the writer's transport
+priority, and if no such channel exists, the channel with the lowest
+threshold.
The default value is: "0".
""" ] ]
+ attribute TransportPriority {
+ xsd:integer
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element specifies the maximum transmit rate of auxiliary traffic
+on this channel (e.g. retransmits, heartbeats, etc). Bandwidth limiting
+uses a leaky bucket scheme. The default value "inf" means Cyclone DDS
+imposes no limitation, the underlying operating system and hardware will
+likely limit the maimum transmit rate.
+
+The unit must be specified explicitly. Recognised units: Xb/s,
+Xbps for bits/s or XB/s, XBps for bytes/s; where
+X is an optional prefix: k for 103, Ki for
+210, M for 106, Mi for 220, G for
+109, Gi for 230.
The default value is:
+"inf".
""" ] ]
+ element AuxiliaryBandwidthLimit {
+ bandwidth
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element specifies the maximum transmit rate of new samples and
+directly related data, for this channel. Bandwidth limiting uses a leaky
+bucket scheme. The default value "inf" means Cyclone DDS imposes no
+limitation, the underlying operating system and hardware will likely
+limit the maimum transmit rate.
+
+The unit must be specified explicitly. Recognised units: Xb/s,
+Xbps for bits/s or XB/s, XBps for bytes/s; where
+X is an optional prefix: k for 103, Ki for
+210, M for 106, Mi for 220, G for
+109, Gi for 230.
The default value is:
+"inf".
""" ] ]
+ element DataBandwidthLimit {
+ bandwidth
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element describes the DiffServ setting the channel will apply to
+the networking messages. This parameter determines the value of the
+diffserv field of the IP version 4 packets sent on this channel which
+allows QoS setting to be applied to the network traffic send on this
+channel.
+
+Windows platform support for setting the diffserv field is dependent on
+the OS version.
+
+For Windows versions XP SP2 and 2003 to use the diffserv field the
+following parameter should be added to the register:
+
+HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TcpIp\Parameters\DisableUserTOSSetting
+
+The type of this parameter is a DWORD and its value should be set to 0 to
+allow setting of the diffserv field.
+
+For Windows version 7 or higher a new API (qWAVE) has been introduced.
+For these platforms the specified diffserv value is mapped to one of the
+support traffic types.
+
+The mapping is as follows: 1-8 background traffic; 9-40 excellent
+traffic; 41-55 audio/video traffic; 56 voice traffic; 57-63 control
+traffic.
+
+When an application is run without Administrative priveleges then only
+the diffserv value of 0, 8, 40 or 56 is allowed.
The default value
+is: "0".
""" ] ]
+ element DiffServField {
+ xsd:integer
+ }?
+ }*
+ }?
+ & [ a:documentation [ xml:lang="en" """
+The Compatibility elements allows specifying various settings related
+to compatability with standards and with other DDSI implementations.
""" ] ]
+ element Compatibility {
+ [ a:documentation [ xml:lang="en" """
+This option assumes ParticipantMessageData endpoints required by the
+liveliness protocol are present in RTI participants even when not
+properly advertised by the participant discovery protocol.
The
+default value is: "false".
""" ] ]
+ element AssumeRtiHasPmdEndpoints {
+ xsd:boolean
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element specifies whether QoS settings set to default values are
+explicitly published in the discovery protocol. Implementations are to
+use the default value for QoS settings not published, which allows a
+significant reduction of the amount of data that needs to be exchanged
+for the discovery protocol, but this requires all implementations to
+adhere to the default values specified by the specifications.
+
+When interoperability is required with an implementation that does not
+follow the specifications in this regard, setting this option to true
+will help.
The default value is: "false".
""" ] ]
+ element ExplicitlyPublishQosSetToDefault {
+ xsd:boolean
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This option specifies whether a network socket will be created for
+each domain participant on a host. The specification seems to assume that
+each participant has a unique address, and setting this option will
+ensure this to be the case. This is not the defeault.
+
+Disabling it slightly improves performance and reduces network traffic
+somewhat. It also causes the set of port numbers needed by Cyclone DDS to
+become predictable, which may be useful for firewall and NAT
+configuration.
The default value is: "single".
""" ] ]
+ element ManySocketsMode {
+ "false"|"true"|"single"|"none"|"many"
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element sets the level of standards conformance of this instance
+of the Cyclone DDS Service. Stricter conformance typically means less
+interoperability with other implementations. Currently three modes are
+defined:
+
+- pedantic: very strictly conform to the specification,
+ultimately for compliancy testing, but currently of little value because
+it adheres even to what will most likely turn out to be editing errors in
+the DDSI standard. Arguably, as long as no errata have been published it
+is the current text that is in effect, and that is what pedantic
+currently does.
+
+- strict: a slightly less strict view of the standard than does
+pedantic: it follows the established behaviour where the standard is
+obviously in error.
+
+- lax: attempt to provide the smoothest possible
+interoperability, anticipating future revisions of elements in the
+standard in areas that other implementations do not adhere to, even
+though there is no good reason not to.
+
+The default setting is "lax".
The default value is:
+"lax".
""" ] ]
+ element StandardsConformance {
+ "lax"|"strict"|"pedantic"
+ }?
+ }?
+ & [ a:documentation [ xml:lang="en" """
+The Discovery element allows specifying various parameters related to
+the discovery of peers.
""" ] ]
+ element Discovery {
+ [ a:documentation [ xml:lang="en" """
+This setting controls for how long endpoints discovered via a Cloud
+discovery service will survive after the discovery service disappeared,
+allowing reconnect without loss of data when the discovery service
+restarts (or another instance takes over).
+
+Valid values are finite durations with an explicit unit or the keyword
+'inf' for infinity. Recognised units: ns, us, ms, s, min, hr,
+day.
The default value is: "30 s".
""" ] ]
+ element DSGracePeriod {
+ duration_inf
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element specifies the default multicast address for all traffic
+other than participant discovery packets. It defaults to
+Discovery/SPDPMulticastAddress.
The default value is:
+"auto".
""" ] ]
+ element DefaultMulticastAddress {
+ text
+ }?
+ & [ a:documentation [ xml:lang="en" """
+Do not use.
The default value is: "true".
""" ] ]
+ element EnableTopicDiscovery {
+ xsd:boolean
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element specifies the maximum DDSI participant index selected by
+this instance of the Cyclone DDS service if the
+Discovery/ParticipantIndex is "auto".
The default value is:
+"9".
""" ] ]
+ element MaxAutoParticipantIndex {
+ xsd:integer
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element specifies the DDSI participant index used by this
+instance of the Cyclone DDS service for discovery purposes. Only one such
+participant id is used, independent of the number of actual
+DomainParticipants on the node. It is either:
+
+- auto: which will attempt to automatically determine an
+available participant index (see also Discovery/MaxAutoParticipantIndex),
+or
+
+- a non-negative integer less than 120, or
+
+- none:, which causes it to use arbitrary port numbers for
+unicast sockets which entirely removes the constraints on the participant
+index but makes unicast discovery impossible.
+
+The default is auto. The participant index is part of the port
+number calculation and if predictable port numbers are needed and fixing
+the participant index has no adverse effects, it is recommended that the
+second be option be used.
The default value is:
+"none".
""" ] ]
+ element ParticipantIndex {
+ text
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element statically configures addresses for discovery.
+
+Valid values are finite durations with an explicit unit or the keyword
+'inf' for infinity. Recognised units: ns, us, ms, s, min, hr, day.
""" ] ]
+ element Peers {
+ [ a:documentation [ xml:lang="en" """
+This element statically configures a fault tolerant group of addresses
+for discovery. Each member of the group is tried in sequence until one
+succeeds.
""" ] ]
+ element Group {
+ [ a:documentation [ xml:lang="en" """
+This element statically configures an addresses for discovery.
""" ] ]
+ element Peer {
+ [ a:documentation [ xml:lang="en" """
+This element specifies an IP address to which discovery packets must
+be sent, in addition to the default multicast address (see also
+General/AllowMulticast). Both a hostnames and a numerical IP address is
+accepted; the hostname or IP address may be suffixed with :PORT to
+explicitly set the port to which it must be sent. Multiple Peers may be
+specified.
""" ] ]
+ attribute Address {
+ text
+ }
+ }*
+ }*
+ & [ a:documentation [ xml:lang="en" """
+This element statically configures an addresses for discovery.
""" ] ]
+ element Peer {
+ [ a:documentation [ xml:lang="en" """
+This element specifies an IP address to which discovery packets must
+be sent, in addition to the default multicast address (see also
+General/AllowMulticast). Both a hostnames and a numerical IP address is
+accepted; the hostname or IP address may be suffixed with :PORT to
+explicitly set the port to which it must be sent. Multiple Peers may be
+specified.
""" ] ]
+ attribute Address {
+ text
+ }
+ }*
+ }?
+ & [ a:documentation [ xml:lang="en" """
+The Ports element allows specifying various parameters related to the
+port numbers used for discovery. These all have default values specified
+by the DDSI 2.1 specification and rarely need to be changed.
""" ] ]
+ element Ports {
+ [ a:documentation [ xml:lang="en" """
+This element specifies the base port number (refer to the DDSI 2.1
+specification, section 9.6.1, constant PB).
The default value is:
+"7400".
""" ] ]
+ element Base {
+ xsd:integer
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element specifies the domain gain, relating domain ids to sets of
+port numbers (refer to the DDSI 2.1 specification, section 9.6.1,
+constant DG).
The default value is: "250".
""" ] ]
+ element DomainGain {
+ xsd:integer
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element specifies the port number for multicast meta traffic
+(refer to the DDSI 2.1 specification, section 9.6.1, constant
+d2).
The default value is: "1".
""" ] ]
+ element MulticastDataOffset {
+ xsd:integer
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element specifies the port number for multicast meta traffic
+(refer to the DDSI 2.1 specification, section 9.6.1, constant
+d0).
The default value is: "0".
""" ] ]
+ element MulticastMetaOffset {
+ xsd:integer
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element specifies the participant gain, relating p0, articipant
+index to sets of port numbers (refer to the DDSI 2.1 specification,
+section 9.6.1, constant PG).
The default value is:
+"2".
""" ] ]
+ element ParticipantGain {
+ xsd:integer
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element specifies the port number for unicast meta traffic (refer
+to the DDSI 2.1 specification, section 9.6.1, constant d3).
The
+default value is: "11".
""" ] ]
+ element UnicastDataOffset {
+ xsd:integer
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element specifies the port number for unicast meta traffic (refer
+to the DDSI 2.1 specification, section 9.6.1, constant d1).
The
+default value is: "10".
""" ] ]
+ element UnicastMetaOffset {
+ xsd:integer
+ }?
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element specifies the interval between spontaneous transmissions
+of participant discovery packets.
+
+The unit must be specified explicitly. Recognised units: ns, us, ms,
+s, min, hr, day.
The default value is: "30 s".
""" ] ]
+ element SPDPInterval {
+ duration
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element specifies the multicast address that is used as the
+destination for the participant discovery packets. In IPv4 mode the
+default is the (standardised) 239.255.0.1, in IPv6 mode it becomes
+ff02::ffff:239.255.0.1, which is a non-standardised link-local multicast
+address.
The default value is: "239.255.0.1".
""" ] ]
+ element SPDPMulticastAddress {
+ text
+ }?
+ }?
+ & [ a:documentation [ xml:lang="en" """
+The General element specifies overall Cyclone DDS service
+settings.
""" ] ]
+ element General {
+ [ a:documentation [ xml:lang="en" """
+This element controls whether Cyclone DDS uses multicasts for data
+traffic.
+
+It is a comma-separated list of some of the following keywords:
+"spdp", "asm", "ssm", or either of "false" or "true", or "default".
+
+
+
+- spdp: enables the use of ASM (any-source multicast) for
+participant discovery, joining the multicast group on the discovery
+socket, transmitting SPDP messages to this group, but never advertising
+nor using any multicast address in any discovery message, thus forcing
+unicast communications for all endpoint discovery and user data.
+
+- asm: enables the use of ASM for all traffic, including
+receiving SPDP but not transmitting SPDP messages via multicast
+
+- ssm: enables the use of SSM (source-specific multicast) for
+all non-SPDP traffic (if supported)
+
+
+
+When set to "false" all multicasting is disabled. The default, "true"
+enables full use of multicasts. Listening for multicasts can be
+controlled by General/MulticastRecvNetworkInterfaceAddresses.
+
+"default" maps on spdp if the network is a WiFi network, on true if it
+is a wired network
The default value is: "default".
""" ] ]
+ element AllowMulticast {
+ xsd:token { pattern = "default|((false|spdp|asm|ssm|true)(,(false|spdp|asm|ssm|true))*)" }
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element allows setting the SO_DONTROUTE option for outgoing
+packets, to bypass the local routing tables. This is generally useful
+only when the routing tables cannot be trusted, which is highly
+unusual.
The default value is: "false".
""" ] ]
+ element DontRoute {
+ xsd:boolean
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element specifies whether Cyclone DDS allows IP multicast packets
+to be visible to all DDSI participants in the same node, including
+itself. It must be "true" for intra-node multicast communications, but if
+a node runs only a single Cyclone DDS service and does not host any other
+DDSI-capable programs, it should be set to "false" for improved
+performance.
The default value is: "true".
""" ] ]
+ element EnableMulticastLoopback {
+ xsd:boolean
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element allows explicitly overruling the network address Cyclone
+DDS advertises in the discovery protocol, which by default is the address
+of the preferred network interface (General/NetworkInterfaceAddress), to
+allow Cyclone DDS to communicate across a Network Address Translation
+(NAT) device.
The default value is: "auto".
""" ] ]
+ element ExternalNetworkAddress {
+ text
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element specifies the network mask of the external network
+address. This element is relevant only when an external network address
+(General/ExternalNetworkAddress) is explicitly configured. In this case
+locators received via the discovery protocol that are within the same
+external subnet (as defined by this mask) will be translated to an
+internal address by replacing the network portion of the external address
+with the corresponding portion of the preferred network interface
+address. This option is IPv4-only.
The default value is:
+"0.0.0.0".
""" ] ]
+ element ExternalNetworkMask {
+ text
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element specifies the size of DDSI sample fragments generated by
+Cyclone DDS. Samples larger than FragmentSize are fragmented into
+fragments of FragmentSize bytes each, except the last one, which may be
+smaller. The DDSI spec mandates a minimum fragment size of 1025 bytes,
+but Cyclone DDS will do whatever size is requested, accepting fragments
+of which the size is at least the minimum of 1025 and FragmentSize.
+
+The unit must be specified explicitly. Recognised units: B (bytes), kB
+& KiB (210 bytes), MB & MiB (220 bytes), GB & GiB
+(230 bytes).
The default value is: "1280
+B".
""" ] ]
+ element FragmentSize {
+ memsize
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element specifies the maximum size of the UDP payload that
+Cyclone DDS will generate. Cyclone DDS will try to maintain this limit
+within the bounds of the DDSI specification, which means that in some
+cases (especially for very low values of MaxMessageSize) larger payloads
+may sporadically be observed (currently up to 1192 B).
+
+On some networks it may be necessary to set this item to keep the
+packetsize below the MTU to prevent IP fragmentation. In those cases, it
+is generally advisable to also consider reducing
+Internal/FragmentSize.
+
+The unit must be specified explicitly. Recognised units: B (bytes), kB
+& KiB (210 bytes), MB & MiB (220 bytes), GB & GiB
+(230 bytes).
The default value is: "4096
+B".
""" ] ]
+ element MaxMessageSize {
+ memsize
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element specifies on which network interfaces Cyclone DDS listens
+to multicasts. The following options are available:
+
+
+
+- all: listen for multicasts on all multicast-capable
+interfaces; or
+
+- any: listen for multicasts on the operating system default
+interface; or
+
+- preferred: listen for multicasts on the preferred interface
+(General/NetworkInterfaceAddress); or
+
+- none: does not listen for multicasts on any interface; or
+
+- a comma-separated list of network addresses: configures Cyclone DDS
+to listen for multicasts on all of the listed addresses.
+
+
+
+If Cyclone DDS is in IPv6 mode and the address of the preferred
+network interface is a link-local address, "all" is treated as a synonym
+for "preferred" and a comma-separated list is treated as "preferred" if
+it contains the preferred interface and as "none" if not.
The
+default value is: "preferred".
""" ] ]
+ element MulticastRecvNetworkInterfaceAddresses {
+ text
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element specifies the time-to-live setting for outgoing multicast
+packets.
The default value is: "32".
""" ] ]
+ element MulticastTimeToLive {
+ xsd:integer
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element specifies the preferred network interface for use by
+Cyclone DDS. The preferred network interface determines the IP address
+that Cyclone DDS advertises in the discovery protocol (but see also
+General/ExternalNetworkAddress), and is also the only interface over
+which multicasts are transmitted. The interface can be identified by its
+IP address, network interface name or network portion of the address. If
+the value "auto" is entered here, Cyclone DDS will select what it
+considers the most suitable interface.
The default value is:
+"auto".
""" ] ]
+ element NetworkInterfaceAddress {
+ text
+ }?
+ & [ a:documentation [ xml:lang="en" """
+When false (default) Cyclone DDS uses unicast for data whenever there
+a single unicast suffices. Setting this to true makes it prefer
+multicasting data, falling back to unicast only when no multicast address
+is available.
The default value is: "false".
""" ] ]
+ element PreferMulticast {
+ xsd:boolean
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element allows selecting the transport to be used (udp, udp6,
+tcp, tcp6, raweth)
The default value is: "default".
""" ] ]
+ element Transport {
+ "default"|"udp"|"udp6"|"tcp"|"tcp6"|"raweth"
+ }?
+ & [ a:documentation [ xml:lang="en" """
+Deprecated (use Transport instead)
The default value is:
+"default".
""" ] ]
+ element UseIPv6 {
+ "false"|"true"|"default"
+ }?
+ }?
+ & [ a:documentation [ xml:lang="en" """
+The Internal elements deal with a variety of settings that evolving
+and that are not necessarily fully supported. For the vast majority of
+the Internal settings, the functionality per-se is supported, but the
+right to change the way the options control the functionality is
+reserved. This includes renaming or moving options.
""" ] ]
+ element Internal {
+ [ a:documentation [ xml:lang="en" """
+Proxy readers that are assumed to sill be retrieving historical data
+get this many samples retransmitted when they NACK something, even if
+some of these samples have sequence numbers outside the set covered by
+the NACK.
The default value is: "0".
""" ] ]
+ element AccelerateRexmitBlockSize {
+ xsd:integer
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element controls which network interfaces are assumed to be
+capable of multicasting even when the interface flags returned by the
+operating system state it is not (this provides a workaround for some
+platforms). It is a comma-separated lists of patterns (with ? and *
+wildcards) against which the interface names are matched.
The
+default value is: "".
""" ] ]
+ element AssumeMulticastCapable {
+ text
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This setting controls the interval with which a reader will continue
+NACK'ing missing samples in the absence of a response from the writer, as
+a protection mechanism against writers incorrectly stopping the sending
+of HEARTBEAT messages.
+
+Valid values are finite durations with an explicit unit or the keyword
+'inf' for infinity. Recognised units: ns, us, ms, s, min, hr,
+day.
The default value is: "1 s".
""" ] ]
+ element AutoReschedNackDelay {
+ duration_inf
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element specifies the maximum transmit rate of auxiliary traffic
+not bound to a specific channel, such as discovery traffic, as well as
+auxiliary traffic related to a certain channel if that channel has
+elected to share this global AuxiliaryBandwidthLimit. Bandwidth limiting
+uses a leaky bucket scheme. The default value "inf" means Cyclone DDS
+imposes no limitation, the underlying operating system and hardware will
+likely limit the maimum transmit rate.
+
+The unit must be specified explicitly. Recognised units: Xb/s,
+Xbps for bits/s or XB/s, XBps for bytes/s; where
+X is an optional prefix: k for 103, Ki for
+210, M for 106, Mi for 220, G for
+109, Gi for 230.
The default value is:
+"inf".
""" ] ]
+ element AuxiliaryBandwidthLimit {
+ bandwidth
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element controls which participants will have which built-in
+endpoints for the discovery and liveliness protocols. Valid values
+are:
+
+- full: all participants have all endpoints;
+
+- writers: all participants have the writers, but just one has
+the readers;
+
+- minimal: only one participant has built-in
+endpoints.
+
+The default is writers, as this is thought to be compliant and
+reasonably efficient. Minimal may or may not be compliant but is
+most efficient, and full is inefficient but certain to be
+compliant. See also Internal/ConservativeBuiltinReaderStartup.
The
+default value is: "writers".
""" ] ]
+ element BuiltinEndpointSet {
+ "full"|"writers"|"minimal"
+ }?
+ & [ a:documentation [ xml:lang="en" """
+The ControlTopic element allows configured whether Cyclone DDS
+provides a special control interface via a predefined topic or not.
""" ] ]
+ element ControlTopic {
+ empty
+ }?
+ & [ a:documentation [ xml:lang="en" """
+
This element sets the maximum number of extra threads for an
+experimental, undocumented and unsupported direct mode.
The default
+value is: "1".
""" ] ]
+ element DDSI2DirectMaxThreads {
+ xsd:integer
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element sets the maximum number of samples that can be
+defragmented simultaneously for a reliable writer. This has to be large
+enough to handle retransmissions of historical data in addition to new
+samples.
The default value is: "16".
""" ] ]
+ element DefragReliableMaxSamples {
+ xsd:integer
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element sets the maximum number of samples that can be
+defragmented simultaneously for a best-effort writers.
The default
+value is: "4".
""" ] ]
+ element DefragUnreliableMaxSamples {
+ xsd:integer
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element controls the Maximum size of a delivery queue, expressed
+in samples. Once a delivery queue is full, incoming samples destined for
+that queue are dropped until space becomes available again.
The
+default value is: "256".
""" ] ]
+ element DeliveryQueueMaxSamples {
+ xsd:integer
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element enables expensive checks in builds with assertions
+enabled and is ignored otherwise. Recognised categories are:
+
+- whc: writer history cache checking
+
+- rhc: reader history cache checking
+
+In addition, there is the keyword all that enables all
+checks.
The default value is: "".
""" ] ]
+ element EnableExpensiveChecks {
+ xsd:token { pattern = "((whc|rhc|all)(,(whc|rhc|all))*)|" }
+ }?
+ & [ a:documentation [ xml:lang="en" """
+When true, include keyhashes in outgoing data for topics with
+keys.
The default value is: "false".
""" ] ]
+ element GenerateKeyhash {
+ xsd:boolean
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This elemnents allows configuring the base interval for sending writer
+heartbeats and the bounds within it can vary.
+
+Valid values are finite durations with an explicit unit or the keyword
+'inf' for infinity. Recognised units: ns, us, ms, s, min, hr,
+day.
The default value is: "100 ms".
""" ] ]
+ element HeartbeatInterval {
+ duration_inf
+ }?
+ & [ a:documentation [ xml:lang="en" """
+Ack a sample only when it has been delivered, instead of when
+committed to delivering it.
The default value is:
+"false".
""" ] ]
+ element LateAckMode {
+ xsd:boolean
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This setting controls the default participant lease duration.
+
+
The unit must be specified explicitly. Recognised units: ns, us, ms,
+s, min, hr, day.
The default value is: "10 s".
""" ] ]
+ element LeaseDuration {
+ duration
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element controls whether or not implementation should internally
+monitor its own liveliness. If liveliness monitoring is enabled, stack
+traces can be dumped automatically when some thread appears to have
+stopped making progress.
The default value is:
+"false".
""" ] ]
+ element LivelinessMonitoring {
+ xsd:boolean
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This elements configures the maximum number of DCPS domain
+participants this Cyclone DDS instance is willing to service. 0 is
+unlimited.
The default value is: "0".
""" ] ]
+ element MaxParticipants {
+ xsd:integer
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This setting limits the maximum number of bytes queued for
+retransmission. The default value of 0 is unlimited unless an
+AuxiliaryBandwidthLimit has been set, in which case it becomes NackDelay
+* AuxiliaryBandwidthLimit. It must be large enough to contain the largest
+sample that may need to be retransmitted.
+
+The unit must be specified explicitly. Recognised units: B (bytes), kB
+& KiB (210 bytes), MB & MiB (220 bytes), GB & GiB
+(230 bytes).
The default value is: "50
+kB".
""" ] ]
+ element MaxQueuedRexmitBytes {
+ memsize
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This settings limits the maximum number of samples queued for
+retransmission.
The default value is: "200".
""" ] ]
+ element MaxQueuedRexmitMessages {
+ xsd:integer
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This setting controls the maximum (CDR) serialised size of samples
+that Cyclone DDS will forward in either direction. Samples larger than
+this are discarded with a warning.
+
+The unit must be specified explicitly. Recognised units: B (bytes), kB
+& KiB (210 bytes), MB & MiB (220 bytes), GB & GiB
+(230 bytes).
The default value is: "2147483647
+B".
""" ] ]
+ element MaxSampleSize {
+ memsize
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element enables heartbeat-to-ack latency among Cyclone DDS
+services by prepending timestamps to Heartbeat and AckNack messages and
+calculating round trip times. This is non-standard behaviour. The
+measured latencies are quite noisy and are currently not used
+anywhere.
The default value is: "false".
""" ] ]
+ element MeasureHbToAckLatency {
+ xsd:boolean
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This setting controls the minimum size of socket receive buffers. The
+operating system provides some size receive buffer upon creation of the
+socket, this option can be used to increase the size of the buffer beyond
+that initially provided by the operating system. If the buffer size
+cannot be increased to the specified size, an error is reported.
+
+The default setting is the word "default", which means Cyclone DDS
+will attempt to increase the buffer size to 1MB, but will silently accept
+a smaller buffer should that attempt fail.
+
+The unit must be specified explicitly. Recognised units: B (bytes), kB
+& KiB (210 bytes), MB & MiB (220 bytes), GB & GiB
+(230 bytes).
The default value is:
+"default".
""" ] ]
+ element MinimumSocketReceiveBufferSize {
+ memsize
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This setting controls the minimum size of socket send buffers. This
+setting can only increase the size of the send buffer, if the operating
+system by default creates a larger buffer, it is left unchanged.
+
+The unit must be specified explicitly. Recognised units: B (bytes), kB
+& KiB (210 bytes), MB & MiB (220 bytes), GB & GiB
+(230 bytes).
The default value is: "64
+KiB".
""" ] ]
+ element MinimumSocketSendBufferSize {
+ memsize
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element allows configuring a service that dumps a text
+description of part the internal state to TCP clients. By default (-1),
+this is disabled; specifying 0 means a kernel-allocated port is used; a
+positive number is used as the TCP port number.
The default value
+is: "-1".
""" ] ]
+ element MonitorPort {
+ xsd:integer
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element controls whether all traffic is handled by a single
+receive thread or whether multiple receive threads may be used to improve
+latency. Currently multiple receive threads are only used for
+connectionless transport (e.g., UDP) and ManySocketsMode not set to
+single (the default).
The default value is: "true".
""" ] ]
+ element MultipleReceiveThreads {
+ xsd:boolean
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This setting controls the delay between receipt of a HEARTBEAT
+indicating missing samples and a NACK (ignored when the HEARTBEAT
+requires an answer). However, no NACK is sent if a NACK had been
+scheduled already for a response earlier than the delay requests: then
+that NACK will incorporate the latest information.
+
+The unit must be specified explicitly. Recognised units: ns, us, ms,
+s, min, hr, day.
The default value is: "10 ms".
""" ] ]
+ element NackDelay {
+ duration
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This setting controls the delay between the discovering a remote
+writer and sending a pre-emptive AckNack to discover the range of data
+available.
+
+The unit must be specified explicitly. Recognised units: ns, us, ms,
+s, min, hr, day.
The default value is: "10 ms".
""" ] ]
+ element PreEmptiveAckDelay {
+ duration
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element sets the maximum size in samples of a primary re-order
+administration. Each proxy writer has one primary re-order administration
+to buffer the packet flow in case some packets arrive out of order. Old
+samples are forwarded to secondary re-order administrations associated
+with readers in need of historical data.
The default value is:
+"128".
""" ] ]
+ element PrimaryReorderMaxSamples {
+ xsd:integer
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element controls whether retransmits are prioritized over new
+data, speeding up recovery.
The default value is:
+"true".
""" ] ]
+ element PrioritizeRetransmit {
+ xsd:boolean
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element controls for how long a remote participant that was
+previously deleted will remain on a blacklist to prevent rediscovery,
+giving the software on a node time to perform any cleanup actions it
+needs to do. To some extent this delay is required internally by Cyclone
+DDS, but in the default configuration with the 'enforce' attribute set to
+false, Cyclone DDS will reallow rediscovery as soon as it has cleared its
+internal administration. Setting it to too small a value may result in
+the entry being pruned from the blacklist before Cyclone DDS is ready, it
+is therefore recommended to set it to at least several seconds.
+
+Valid values are finite durations with an explicit unit or the keyword
+'inf' for infinity. Recognised units: ns, us, ms, s, min, hr,
+day.
The default value is: "10s".
""" ] ]
+ element RediscoveryBlacklistDuration {
+ duration_inf
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This elements controls the addressing and timing of retransmits.
+Possible values are:
+
+- never: retransmit only to the NACK-ing reader;
+
+- adaptive: attempt to combine retransmits needed for
+reliability, but send historical (transient-local) data to the requesting
+reader only;
+
+- always: do not distinguish between different causes, always
+try to merge.
+
+The default is never. See also
+Internal/RetransmitMergingPeriod.
The default value is:
+"never".
""" ] ]
+ element RetransmitMerging {
+ "never"|"adaptive"|"always"
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This setting determines the size of the time window in which a NACK of
+some sample is ignored because a retransmit of that sample has been
+multicasted too recently. This setting has no effect on unicasted
+retransmits.
+
+See also Internal/RetransmitMerging.
+
+The unit must be specified explicitly. Recognised units: ns, us, ms,
+s, min, hr, day.
The default value is: "5 ms".
""" ] ]
+ element RetransmitMergingPeriod {
+ duration
+ }?
+ & [ a:documentation [ xml:lang="en" """
+Whether or not to locally retry pushing a received best-effort sample
+into the reader caches when resource limits are reached.
The
+default value is: "false".
""" ] ]
+ element RetryOnRejectBestEffort {
+ xsd:boolean
+ }?
+ & [ a:documentation [ xml:lang="en" """
+Maximum pseudo-random delay in milliseconds between discovering a
+remote participant and responding to it.
+
+The unit must be specified explicitly. Recognised units: ns, us, ms,
+s, min, hr, day.
The default value is: "0 ms".
""" ] ]
+ element SPDPResponseMaxDelay {
+ duration
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This setting allows the timing of scheduled events to be rounded up so
+that more events can be handled in a single cycle of the event queue. The
+default is 0 and causes no rounding at all, i.e. are scheduled exactly,
+whereas a value of 10ms would mean that events are rounded up to the
+nearest 10 milliseconds.
+
+The unit must be specified explicitly. Recognised units: ns, us, ms,
+s, min, hr, day.
The default value is: "0 ms".
""" ] ]
+ element ScheduleTimeRounding {
+ duration
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element sets the maximum size in samples of a secondary re-order
+administration. The secondary re-order administration is per reader in
+need of historical data.
The default value is: "128".
""" ] ]
+ element SecondaryReorderMaxSamples {
+ xsd:integer
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element controls whether the actual sending of packets occurs on
+the same thread that prepares them, or is done asynchronously by another
+thread.
The default value is: "false".
""" ] ]
+ element SendAsync {
+ xsd:boolean
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element controls whether Cyclone DDS advertises all the domain
+participants it serves in DDSI (when set to false), or rather only
+one domain participant (the one corresponding to the Cyclone DDS process;
+when set to true). In the latter case Cyclone DDS becomes the
+virtual owner of all readers and writers of all domain participants,
+dramatically reducing discovery traffic (a similar effect can be obtained
+by setting Internal/BuiltinEndpointSet to "minimal" but with less loss of
+information).
The default value is: "false".
""" ] ]
+ element SquashParticipants {
+ xsd:boolean
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element controls whether samples sent by a writer with QoS
+settings transport_priority >= SynchronousDeliveryPriorityThreshold and a
+latency_budget at most this element's value will be delivered
+synchronously from the "recv" thread, all others will be delivered
+asynchronously through delivery queues. This reduces latency at the
+expense of aggregate bandwidth.
+
+Valid values are finite durations with an explicit unit or the keyword
+'inf' for infinity. Recognised units: ns, us, ms, s, min, hr,
+day.
The default value is: "inf".
""" ] ]
+ element SynchronousDeliveryLatencyBound {
+ duration_inf
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element controls whether samples sent by a writer with QoS
+settings latency_budget <= SynchronousDeliveryLatencyBound and
+transport_priority greater than or equal to this element's value will be
+delivered synchronously from the "recv" thread, all others will be
+delivered asynchronously through delivery queues. This reduces latency at
+the expense of aggregate bandwidth.
The default value is:
+"0".
""" ] ]
+ element SynchronousDeliveryPriorityThreshold {
+ xsd:integer
+ }?
+ & [ a:documentation [ xml:lang="en" """
+Testing options.
""" ] ]
+ element Test {
+ [ a:documentation [ xml:lang="en" """
+This element controls the fraction of outgoing packets to drop,
+specified as samples per thousand.
The default value is:
+"0".
""" ] ]
+ element XmitLossiness {
+ xsd:integer
+ }?
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element controls whether the response to a newly discovered
+participant is sent as a unicasted SPDP packet, instead of rescheduling
+the periodic multicasted one. There is no known benefit to setting this
+to false.
The default value is: "true".
""" ] ]
+ element UnicastResponseToSPDPMessages {
+ xsd:boolean
+ }?
+ & [ a:documentation [ xml:lang="en" """
+Do not use.
The default value is: "0".
""" ] ]
+ element UseMulticastIfMreqn {
+ xsd:integer
+ }?
+ & [ a:documentation [ xml:lang="en" """
+Watermarks for flow-control.
""" ] ]
+ element Watermarks {
+ [ a:documentation [ xml:lang="en" """
+This element controls whether Cyclone DDS will adapt the high-water
+mark to current traffic conditions, based on retransmit requests and
+transmit pressure.
The default value is: "true".
""" ] ]
+ element WhcAdaptive {
+ xsd:boolean
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element sets the maximum allowed high-water mark for the Cyclone
+DDS WHCs, expressed in bytes. A writer is suspended when the WHC reaches
+this size.
+
+The unit must be specified explicitly. Recognised units: B (bytes), kB
+& KiB (210 bytes), MB & MiB (220 bytes), GB & GiB
+(230 bytes).
The default value is: "100
+kB".
""" ] ]
+ element WhcHigh {
+ memsize
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element sets the initial level of the high-water mark for the
+Cyclone DDS WHCs, expressed in bytes.
+
+The unit must be specified explicitly. Recognised units: B (bytes), kB
+& KiB (210 bytes), MB & MiB (220 bytes), GB & GiB
+(230 bytes).
The default value is: "30
+kB".
""" ] ]
+ element WhcHighInit {
+ memsize
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element sets the low-water mark for the Cyclone DDS WHCs,
+expressed in bytes. A suspended writer resumes transmitting when its
+Cyclone DDS WHC shrinks to this size.
+
+The unit must be specified explicitly. Recognised units: B (bytes), kB
+& KiB (210 bytes), MB & MiB (220 bytes), GB & GiB
+(230 bytes).
The default value is: "1 kB".
""" ] ]
+ element WhcLow {
+ memsize
+ }?
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element enables the batching of write operations. By default each
+write operation writes through the write cache and out onto the
+transport. Enabling write batching causes multiple small write operations
+to be aggregated within the write cache into a single larger write. This
+gives greater throughput at the expense of latency. Currently there is no
+mechanism for the write cache to automatically flush itself, so that if
+write batching is enabled, the application may havee to use the
+dds_write_flush function to ensure thta all samples are
+written.
The default value is: "false".
""" ] ]
+ element WriteBatch {
+ xsd:boolean
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This setting controls the maximum duration for which actual deletion
+of a reliable writer with unacknowledged data in its history will be
+postponed to provide proper reliable transmission.
+
+
The unit must be specified explicitly. Recognised units: ns, us, ms,
+s, min, hr, day.
The default value is: "1 s".
""" ] ]
+ element WriterLingerDuration {
+ duration
+ }?
+ }?
+ & [ a:documentation [ xml:lang="en" """
+The Partitioning element specifies Cyclone DDS network partitions and
+how DCPS partition/topic combinations are mapped onto the network
+partitions.
""" ] ]
+ element Partitioning {
+ [ a:documentation [ xml:lang="en" """
+The IgnoredPartitions element specifies DCPS partition/topic
+combinations that are not distributed over the network.
""" ] ]
+ element IgnoredPartitions {
+ [ a:documentation [ xml:lang="en" """
+This element can be used to prevent certain combinations of DCPS
+partition and topic from being transmitted over the network. Cyclone DDS
+will complete ignore readers and writers for which all DCPS partitions as
+well as their topic is ignored, not even creating DDSI readers and
+writers to mirror the DCPS ones.
""" ] ]
+ element IgnoredPartition {
+ [ a:documentation [ xml:lang="en" """
+This attribute specifies a partition and a topic expression, separated
+by a single '.', that are used to determine if a given partition and
+topic will be ignored or not. The expressions may use the usual wildcards
+'*' and '?'. Cyclone DDS will consider an wildcard DCPS partition to
+match an expression iff there exists a string that satisfies both
+expressions.
""" ] ]
+ attribute DCPSPartitionTopic {
+ text
+ }
+ }*
+ }*
+ & [ a:documentation [ xml:lang="en" """
+The NetworkPartitions element specifies the Cyclone DDS network
+partitions.
""" ] ]
+ element NetworkPartitions {
+ [ a:documentation [ xml:lang="en" """
+This element defines a Cyclone DDS network partition.
""" ] ]
+ element NetworkPartition {
+ [ a:documentation [ xml:lang="en" """
+This attribute specifies the multicast addresses associated with the
+network partition as a comma-separated list. Readers matching this
+network partition (cf. Partitioning/PartitionMappings) will listen for
+multicasts on all of these addresses and advertise them in the discovery
+protocol. The writers will select the most suitable address from the
+addresses advertised by the readers.
""" ] ]
+ attribute Address {
+ text
+ }
+ & [ a:documentation [ xml:lang="en" """
+This attribute is a placeholder.
The default value is:
+"true".
""" ] ]
+ attribute Connected {
+ xsd:boolean
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This attribute specifies the name of this Cyclone DDS network
+partition. Two network partitions cannot have the same name.
""" ] ]
+ attribute Name {
+ text
+ }
+ }*
+ }*
+ & [ a:documentation [ xml:lang="en" """
+The PartitionMappings element specifies the mapping from DCPS
+partition/topic combinations to Cyclone DDS network partitions.
""" ] ]
+ element PartitionMappings {
+ [ a:documentation [ xml:lang="en" """
+This element defines a mapping from a DCPS partition/topic combination
+to a Cyclone DDS network partition. This allows partitioning data flows
+by using special multicast addresses for part of the data and possibly
+also encrypting the data flow.
""" ] ]
+ element PartitionMapping {
+ [ a:documentation [ xml:lang="en" """
+This attribute specifies a partition and a topic expression, separated
+by a single '.', that are used to determine if a given partition and
+topic maps to the Cyclone DDS network partition named by the
+NetworkPartition attribute in this PartitionMapping element. The
+expressions may use the usual wildcards '*' and '?'. Cyclone DDS will
+consider a wildcard DCPS partition to match an expression if there exists
+a string that satisfies both expressions.
""" ] ]
+ attribute DCPSPartitionTopic {
+ text
+ }
+ & [ a:documentation [ xml:lang="en" """
+This attribute specifies which Cyclone DDS network partition is to be
+used for DCPS partition/topic combinations matching the
+DCPSPartitionTopic attribute within this PartitionMapping element.
""" ] ]
+ attribute NetworkPartition {
+ text
+ }
+ }*
+ }*
+ }?
+ & [ a:documentation [ xml:lang="en" """
+The SSL element allows specifying various parameters related to using
+SSL/TLS for DDSI over TCP.
""" ] ]
+ element SSL {
+ [ a:documentation [ xml:lang="en" """
+If disabled this allows SSL connections to occur even if an X509
+certificate fails verification.
The default value is:
+"true".
""" ] ]
+ element CertificateVerification {
+ xsd:boolean
+ }?
+ & [ a:documentation [ xml:lang="en" """
+The set of ciphers used by SSL/TLS
The default value is:
+"ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH".
""" ] ]
+ element Ciphers {
+ text
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This enables SSL/TLS for TCP.
The default value is:
+"false".
""" ] ]
+ element Enable {
+ xsd:boolean
+ }?
+ & [ a:documentation [ xml:lang="en" """
+The SSL/TLS random entropy file name.
The default value is:
+"".
""" ] ]
+ element EntropyFile {
+ text
+ }?
+ & [ a:documentation [ xml:lang="en" """
+The SSL/TLS key pass phrase for encrypted keys.
The default
+value is: "secret".
""" ] ]
+ element KeyPassphrase {
+ text
+ }?
+ & [ a:documentation [ xml:lang="en" """
+The SSL/TLS key and certificate store file name. The keystore must be
+in PEM format.
The default value is: "keystore".
""" ] ]
+ element KeystoreFile {
+ text
+ }?
+ & [ a:documentation [ xml:lang="en" """
+The minimum TLS version that may be negotiated, valid values are 1.2
+and 1.3.
The default value is: "1.3".
""" ] ]
+ element MinimumTLSVersion {
+ text
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This enables the use of self signed X509 certificates.
The
+default value is: "false".
""" ] ]
+ element SelfSignedCertificates {
+ xsd:boolean
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This enables an SSL server checking the X509 certificate of a
+connecting client.
The default value is: "true".
""" ] ]
+ element VerifyClient {
+ xsd:boolean
+ }?
+ }?
+ & [ a:documentation [ xml:lang="en" """
+The Sizing element specifies a variety of configuration settings
+dealing with expected system sizes, buffer sizes, &c.
""" ] ]
+ element Sizing {
+ [ a:documentation [ xml:lang="en" """
+This element specifies the size of one allocation unit in the receive
+buffer. Must be greater than the maximum packet size by a modest amount
+(too large packets are dropped). Each allocation is shrunk immediately
+after processing a message, or freed straightaway.
+
+The unit must be specified explicitly. Recognised units: B (bytes), kB
+& KiB (210 bytes), MB & MiB (220 bytes), GB & GiB
+(230 bytes).
The default value is: "128
+KiB".
""" ] ]
+ element ReceiveBufferChunkSize {
+ memsize
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element sets the size of a single receive buffer. Many receive
+buffers may be needed. The minimum workable size a little bit larger than
+Sizing/ReceiveBufferChunkSize, and the value used is taken as the
+configured value and the actual minimum workable size.
+
+The unit must be specified explicitly. Recognised units: B (bytes), kB
+& KiB (210 bytes), MB & MiB (220 bytes), GB & GiB
+(230 bytes).
The default value is: "1
+MiB".
""" ] ]
+ element ReceiveBufferSize {
+ memsize
+ }?
+ }?
+ & [ a:documentation [ xml:lang="en" """
+The TCP element allows specifying various parameters related to
+running DDSI over TCP.
""" ] ]
+ element TCP {
+ [ a:documentation [ xml:lang="en" """
+Setting this to true means the unicast addresses in SPDP packets will
+be ignored and the peer address from the TCP connection will be used
+instead. This may help work around incorrectly advertised addresses when
+using TCP.
The default value is: "false".
""" ] ]
+ element AlwaysUsePeeraddrForUnicast {
+ xsd:boolean
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element enables the optional TCP transport - deprecated, use
+General/Transport instead.
The default value is:
+"default".
""" ] ]
+ element Enable {
+ "false"|"true"|"default"
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element enables the TCP_NODELAY socket option, preventing
+multiple DDSI messages being sent in the same TCP request. Setting this
+option typically optimises latency over throughput.
The default
+value is: "true".
""" ] ]
+ element NoDelay {
+ xsd:boolean
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element specifies the TCP port number on which Cyclone DDS
+accepts connections. If the port is set it is used in entity locators,
+published with DDSI discovery. Dynamically allocated if zero. Disabled if
+-1 or not configured. If disabled other DDSI services will not be able to
+establish connections with the service, the service can only communicate
+by establishing connections to other services.
The default value
+is: "-1".
""" ] ]
+ element Port {
+ xsd:integer
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element specifies the timeout for blocking TCP read operations.
+If this timeout expires then the connection is closed.
+
+The unit must be specified explicitly. Recognised units: ns, us, ms,
+s, min, hr, day.
The default value is: "2 s".
""" ] ]
+ element ReadTimeout {
+ duration
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element specifies the timeout for blocking TCP write operations.
+If this timeout expires then the connection is closed.
+
+The unit must be specified explicitly. Recognised units: ns, us, ms,
+s, min, hr, day.
The default value is: "2 s".
""" ] ]
+ element WriteTimeout {
+ duration
+ }?
+ }?
+ & [ a:documentation [ xml:lang="en" """
+The ThreadPool element allows specifying various parameters related to
+using a thread pool to send DDSI messages to multiple unicast addresses
+(TCP or UDP).
""" ] ]
+ element ThreadPool {
+ [ a:documentation [ xml:lang="en" """
+This element enables the optional thread pool.
The default value
+is: "false".
""" ] ]
+ element Enable {
+ xsd:boolean
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This elements configures the maximum number of threads in the thread
+pool.
The default value is: "8".
""" ] ]
+ element ThreadMax {
+ xsd:integer
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This elements configures the initial number of threads in the thread
+pool.
The default value is: "4".
""" ] ]
+ element Threads {
+ xsd:integer
+ }?
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element is used to set thread properties.
""" ] ]
+ element Threads {
+ [ a:documentation [ xml:lang="en" """
+This element is used to set thread properties.
""" ] ]
+ element Thread {
+ [ a:documentation [ xml:lang="en" """
+The Name of the thread for which properties are being set. The
+following threads exist:
+
+- gc: garbage collector thread involved in deleting
+entities;
+
+- recv: receive thread, taking data from the network and running
+the protocol state machine;
+
+- dq.builtins: delivery thread for DDSI-builtin data, primarily
+for discovery;
+
+- lease: DDSI liveliness monitoring;
+
+- tev: general timed-event handling, retransmits and
+discovery;
+
+- xmit.CHAN: transmit thread for channel CHAN;
+
+- dq.CHAN: delivery thread for channel CHAN;
+
+- tev.CHAN: timed-even thread for channel CHAN.
""" ] ]
+ attribute Name {
+ text
+ }
+ & [ a:documentation [ xml:lang="en" """
+This element configures the scheduling properties of the thread.
""" ] ]
+ element Scheduling {
+ [ a:documentation [ xml:lang="en" """
+This element specifies the thread scheduling class (realtime,
+timeshare or default). The user may need special privileges
+from the underlying operating system to be able to assign some of the
+privileged scheduling classes.
The default value is:
+"default".
""" ] ]
+ element Class {
+ "realtime"|"timeshare"|"default"
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element specifies the thread priority (decimal integer or
+default). Only priorities that are supported by the underlying
+operating system can be assigned to this element. The user may need
+special privileges from the underlying operating system to be able to
+assign some of the privileged priorities.
The default value is:
+"default".
""" ] ]
+ element Priority {
+ text
+ }?
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element configures the stack size for this thread. The default
+value default leaves the stack size at the operating system
+default.
+
+The unit must be specified explicitly. Recognised units: B (bytes), kB
+& KiB (210 bytes), MB & MiB (220 bytes), GB & GiB
+(230 bytes).
The default value is:
+"default".
""" ] ]
+ element StackSize {
+ memsize
+ }?
+ }*
+ }?
+ & [ a:documentation [ xml:lang="en" """
+The Tracing element controls the amount and type of information that
+is written into the tracing log by the DDSI service. This is useful to
+track the DDSI service during application development.
""" ] ]
+ element Tracing {
+ [ a:documentation [ xml:lang="en" """
+This option specifies whether the output is to be appended to an
+existing log file. The default is to create a new log file each time,
+which is generally the best option if a detailed log is
+generated.
The default value is: "false".
""" ] ]
+ element AppendToFile {
+ xsd:boolean
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element enables individual logging categories. These are enabled
+in addition to those enabled by Tracing/Verbosity. Recognised categories
+are:
+
+- fatal: all fatal errors, errors causing immediate
+termination
+
+- error: failures probably impacting correctness but not
+necessarily causing immediate termination
+
+- warning: abnormal situations that will likely not impact
+correctness
+
+- config: full dump of the configuration
+
+- info: general informational notices
+
+- discovery: all discovery activity
+
+- data: include data content of samples in traces
+
+- radmin: receive buffer administration
+
+- timing: periodic reporting of CPU loads per thread
+
+- traffic: periodic reporting of total outgoing data
+
+- whc: tracing of writer history cache changes
+
+- tcp: tracing of TCP-specific activity
+
+- topic: tracing of topic definitions
+
+- >i>plist: tracing of discovery parameter list interpretation
+
+
+In addition, there is the keyword trace that enables all but
+radmin, topic, plist and whc
.
+
+The categorisation of tracing output is incomplete and hence most of
+the verbosity levels and categories are not of much use in the current
+release. This is an ongoing process and here we describe the target
+situation rather than the current situation. Currently, the most useful
+is trace.
The default value is: "".
""" ] ]
+ element Category {
+ xsd:token { pattern = "((fatal|error|warning|info|config|discovery|data|radmin|timing|traffic|topic|tcp|plist|whc|throttle|rhc|content|trace)(,(fatal|error|warning|info|config|discovery|data|radmin|timing|traffic|topic|tcp|plist|whc|throttle|rhc|content|trace))*)|" }
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This option specifies where the logging is printed to. Note that
+stdout and stderr are treated as special values,
+representing "standard out" and "standard error" respectively. No file is
+created unless logging categories are enabled using the Tracing/Verbosity
+or Tracing/EnabledCategory settings.
The default value is:
+"cyclonedds.log".
""" ] ]
+ element OutputFile {
+ text
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This option specifies the file to which received and sent packets will
+be logged in the "pcap" format suitable for analysis using common
+networking tools, such as WireShark. IP and UDP headers are ficitious, in
+particular the destination address of received packets. The TTL may be
+used to distinguish between sent and received packets: it is 255 for sent
+packets and 128 for received ones. Currently IPv4 only.
The default
+value is: "".
""" ] ]
+ element PacketCaptureFile {
+ text
+ }?
+ & [ a:documentation [ xml:lang="en" """
+This element enables standard groups of categories, based on a desired
+verbosity level. This is in addition to the categories enabled by the
+Tracing/Category setting. Recognised verbosity levels and the categories
+they map to are:
+
+- none: no Cyclone DDS log
+
+- severe: error and fatal
+
+- warning: severe + warning
+
+- info: warning + info
+
+- config: info + config
+
+- fine: config + discovery
+
+- finer: fine + traffic and timing
+
+- finest: finer + trace
+
+While none prevents any message from being written to a Cyclone
+DDS log file.
+
+The categorisation of tracing output is incomplete and hence most of
+the verbosity levels and categories are not of much use in the current
+release. This is an ongoing process and here we describe the target
+situation rather than the current situation. Currently, the most useful
+verbosity levels are config, fine and
+finest.
The default value is: "none".
""" ] ]
+ element Verbosity {
+ "finest"|"finer"|"fine"|"config"|"info"|"warning"|"severe"|"none"
+ }?
+ }?
+ }?
+ }
+ bandwidth = xsd:token { pattern = "0|(\d+(\.\d*)?([Ee][\-+]?\d+)?|\.\d+([Ee][\-+]?\d+)?) *([kMG]i?)?[Bb][p/]s" }
+ duration = xsd:token { pattern = "0|(\d+(\.\d*)?([Ee][\-+]?\d+)?|\.\d+([Ee][\-+]?\d+)?) *([num]?s|min|hr|day)" }
+ duration_inf = xsd:token { pattern = "inf|0|(\d+(\.\d*)?([Ee][\-+]?\d+)?|\.\d+([Ee][\-+]?\d+)?) *([num]?s|min|hr|day)" }
+ memsize = xsd:token { pattern = "0|(\d+(\.\d*)?([Ee][\-+]?\d+)?|\.\d+([Ee][\-+]?\d+)?) *([kMG]i?)?B" }
+}
diff --git a/etc/cyclonedds.xsd b/etc/cyclonedds.xsd
new file mode 100644
index 0000000..591cb94
--- /dev/null
+++ b/etc/cyclonedds.xsd
@@ -0,0 +1,2018 @@
+
+
+
+
+
+CycloneDDS configuration
+
+
+
+
+
+
+
+
+
+
+<p>The General element specifying Domain related settings.</p>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<p>This element is used to set thread properties.</p>
+
+
+
+
+
+
+
+
+
+
+
+
+<p>Domain id this configuration applies to, or "any" if it applies to all
+domain ids.</p><p>The default value is: "any".</p>
+
+
+
+
+
+
+
+<p>This element is used to group a set of channels. The channels are
+independent data paths through Cyclone DDS and by using separate threads
+and setting their priorities appropriately, chanenls can be used to map
+transport priorities to operating system scheduler priorities, ensuring
+system-wide end-to-end priority preservation.</p>
+
+
+
+
+
+
+
+
+
+
+<p>This element defines a channel.</p>
+
+
+
+
+
+
+<p>This element specifies the maximum transmit rate of auxiliary traffic
+on this channel (e.g. retransmits, heartbeats, etc). Bandwidth limiting
+uses a leaky bucket scheme. The default value "inf" means Cyclone DDS
+imposes no limitation, the underlying operating system and hardware will
+likely limit the maimum transmit rate.</p>
+
+<p>The unit must be specified explicitly. Recognised units: <i>X</i>b/s,
+<i>X</i>bps for bits/s or <i>X</i>B/s, <i>X</i>Bps for bytes/s; where
+<i>X</i> is an optional prefix: k for 10<sup>3</sup>, Ki for
+2<sup>10</sup>, M for 10<sup>6</sup>, Mi for 2<sup>20</sup>, G for
+10<sup>9</sup>, Gi for 2<sup>30</sup>.</p><p>The default value is:
+"inf".</p>
+
+
+
+
+
+
+
+
+<p>This attribute specifies name of this channel. The name should
+uniquely identify the channel.</p>
+
+
+
+
+
+<p>This attribute sets the transport priority threshold for the channel.
+Each DCPS data writer has a "transport_priority" QoS and this QoS is used
+to select a channel for use by this writer. The selected channel is the
+one with the largest threshold not greater than the writer's transport
+priority, and if no such channel exists, the channel with the lowest
+threshold.</p><p>The default value is: "0".</p>
+
+
+
+
+
+
+
+<p>This element specifies the maximum transmit rate of new samples and
+directly related data, for this channel. Bandwidth limiting uses a leaky
+bucket scheme. The default value "inf" means Cyclone DDS imposes no
+limitation, the underlying operating system and hardware will likely
+limit the maimum transmit rate.</p>
+
+<p>The unit must be specified explicitly. Recognised units: <i>X</i>b/s,
+<i>X</i>bps for bits/s or <i>X</i>B/s, <i>X</i>Bps for bytes/s; where
+<i>X</i> is an optional prefix: k for 10<sup>3</sup>, Ki for
+2<sup>10</sup>, M for 10<sup>6</sup>, Mi for 2<sup>20</sup>, G for
+10<sup>9</sup>, Gi for 2<sup>30</sup>.</p><p>The default value is:
+"inf".</p>
+
+
+
+
+
+<p>This element describes the DiffServ setting the channel will apply to
+the networking messages. This parameter determines the value of the
+diffserv field of the IP version 4 packets sent on this channel which
+allows QoS setting to be applied to the network traffic send on this
+channel.<br/>
+
+Windows platform support for setting the diffserv field is dependent on
+the OS version.<br/>
+
+For Windows versions XP SP2 and 2003 to use the diffserv field the
+following parameter should be added to the register:<br/><br>
+
+HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TcpIp\Parameters\DisableUserTOSSetting<br/><br/>
+
+The type of this parameter is a DWORD and its value should be set to 0 to
+allow setting of the diffserv field.<br/><br/>
+
+For Windows version 7 or higher a new API (qWAVE) has been introduced.
+For these platforms the specified diffserv value is mapped to one of the
+support traffic types.
+
+The mapping is as follows: 1-8 background traffic; 9-40 excellent
+traffic; 41-55 audio/video traffic; 56 voice traffic; 57-63 control
+traffic.
+
+When an application is run without Administrative priveleges then only
+the diffserv value of 0, 8, 40 or 56 is allowed.</p><p>The default value
+is: "0".</p>
+
+
+
+
+
+<p>The Compatibility elements allows specifying various settings related
+to compatability with standards and with other DDSI implementations.</p>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<p>This option assumes ParticipantMessageData endpoints required by the
+liveliness protocol are present in RTI participants even when not
+properly advertised by the participant discovery protocol.</p><p>The
+default value is: "false".</p>
+
+
+
+
+
+<p>This element specifies whether QoS settings set to default values are
+explicitly published in the discovery protocol. Implementations are to
+use the default value for QoS settings not published, which allows a
+significant reduction of the amount of data that needs to be exchanged
+for the discovery protocol, but this requires all implementations to
+adhere to the default values specified by the specifications.</p>
+
+<p>When interoperability is required with an implementation that does not
+follow the specifications in this regard, setting this option to true
+will help.</p><p>The default value is: "false".</p>
+
+
+
+
+
+<p>This option specifies whether a network socket will be created for
+each domain participant on a host. The specification seems to assume that
+each participant has a unique address, and setting this option will
+ensure this to be the case. This is not the defeault.</p>
+
+<p>Disabling it slightly improves performance and reduces network traffic
+somewhat. It also causes the set of port numbers needed by Cyclone DDS to
+become predictable, which may be useful for firewall and NAT
+configuration.</p><p>The default value is: "single".</p>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<p>This element sets the level of standards conformance of this instance
+of the Cyclone DDS Service. Stricter conformance typically means less
+interoperability with other implementations. Currently three modes are
+defined:</p>
+
+<ul><li><i>pedantic</i>: very strictly conform to the specification,
+ultimately for compliancy testing, but currently of little value because
+it adheres even to what will most likely turn out to be editing errors in
+the DDSI standard. Arguably, as long as no errata have been published it
+is the current text that is in effect, and that is what pedantic
+currently does.</li>
+
+<li><i>strict</i>: a slightly less strict view of the standard than does
+pedantic: it follows the established behaviour where the standard is
+obviously in error.</li>
+
+<li><i>lax</i>: attempt to provide the smoothest possible
+interoperability, anticipating future revisions of elements in the
+standard in areas that other implementations do not adhere to, even
+though there is no good reason not to.</li></ul>
+
+<p>The default setting is "lax".</p><p>The default value is:
+"lax".</p>
+
+
+
+
+
+
+
+
+
+
+
+
+<p>The Discovery element allows specifying various parameters related to
+the discovery of peers.</p>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<p>This setting controls for how long endpoints discovered via a Cloud
+discovery service will survive after the discovery service disappeared,
+allowing reconnect without loss of data when the discovery service
+restarts (or another instance takes over).</p>
+
+<p>Valid values are finite durations with an explicit unit or the keyword
+'inf' for infinity. Recognised units: ns, us, ms, s, min, hr,
+day.</p><p>The default value is: "30 s".</p>
+
+
+
+
+
+<p>This element specifies the default multicast address for all traffic
+other than participant discovery packets. It defaults to
+Discovery/SPDPMulticastAddress.</p><p>The default value is:
+"auto".</p>
+
+
+
+
+
+<p>Do not use.</p><p>The default value is: "true".</p>
+
+
+
+
+
+<p>This element specifies the maximum DDSI participant index selected by
+this instance of the Cyclone DDS service if the
+Discovery/ParticipantIndex is "auto".</p><p>The default value is:
+"9".</p>
+
+
+
+
+
+<p>This element specifies the DDSI participant index used by this
+instance of the Cyclone DDS service for discovery purposes. Only one such
+participant id is used, independent of the number of actual
+DomainParticipants on the node. It is either:</p>
+
+<ul><li><i>auto</i>: which will attempt to automatically determine an
+available participant index (see also Discovery/MaxAutoParticipantIndex),
+or</li>
+
+<li>a non-negative integer less than 120, or</li>
+
+<li><i>none</i>:, which causes it to use arbitrary port numbers for
+unicast sockets which entirely removes the constraints on the participant
+index but makes unicast discovery impossible.</li></ul>
+
+<p>The default is <i>auto</i>. The participant index is part of the port
+number calculation and if predictable port numbers are needed and fixing
+the participant index has no adverse effects, it is recommended that the
+second be option be used.</p><p>The default value is:
+"none".</p>
+
+
+
+
+
+<p>This element statically configures addresses for discovery.</p>
+
+<p>Valid values are finite durations with an explicit unit or the keyword
+'inf' for infinity. Recognised units: ns, us, ms, s, min, hr, day.</p>
+
+
+
+
+
+
+
+
+
+
+
+<p>This element statically configures a fault tolerant group of addresses
+for discovery. Each member of the group is tried in sequence until one
+succeeds.</p>
+
+
+
+
+
+
+
+
+
+
+<p>This element statically configures an addresses for discovery.</p>
+
+
+
+
+
+<p>This element specifies an IP address to which discovery packets must
+be sent, in addition to the default multicast address (see also
+General/AllowMulticast). Both a hostnames and a numerical IP address is
+accepted; the hostname or IP address may be suffixed with :PORT to
+explicitly set the port to which it must be sent. Multiple Peers may be
+specified.</p>
+
+
+
+
+
+
+
+<p>The Ports element allows specifying various parameters related to the
+port numbers used for discovery. These all have default values specified
+by the DDSI 2.1 specification and rarely need to be changed.</p>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<p>This element specifies the base port number (refer to the DDSI 2.1
+specification, section 9.6.1, constant PB).</p><p>The default value is:
+"7400".</p>
+
+
+
+
+
+<p>This element specifies the domain gain, relating domain ids to sets of
+port numbers (refer to the DDSI 2.1 specification, section 9.6.1,
+constant DG).</p><p>The default value is: "250".</p>
+
+
+
+
+
+<p>This element specifies the port number for multicast meta traffic
+(refer to the DDSI 2.1 specification, section 9.6.1, constant
+d2).</p><p>The default value is: "1".</p>
+
+
+
+
+
+<p>This element specifies the port number for multicast meta traffic
+(refer to the DDSI 2.1 specification, section 9.6.1, constant
+d0).</p><p>The default value is: "0".</p>
+
+
+
+
+
+<p>This element specifies the participant gain, relating p0, articipant
+index to sets of port numbers (refer to the DDSI 2.1 specification,
+section 9.6.1, constant PG).</p><p>The default value is:
+"2".</p>
+
+
+
+
+
+<p>This element specifies the port number for unicast meta traffic (refer
+to the DDSI 2.1 specification, section 9.6.1, constant d3).</p><p>The
+default value is: "11".</p>
+
+
+
+
+
+<p>This element specifies the port number for unicast meta traffic (refer
+to the DDSI 2.1 specification, section 9.6.1, constant d1).</p><p>The
+default value is: "10".</p>
+
+
+
+
+
+<p>This element specifies the interval between spontaneous transmissions
+of participant discovery packets.</p>
+
+<p>The unit must be specified explicitly. Recognised units: ns, us, ms,
+s, min, hr, day.</p><p>The default value is: "30 s".</p>
+
+
+
+
+
+<p>This element specifies the multicast address that is used as the
+destination for the participant discovery packets. In IPv4 mode the
+default is the (standardised) 239.255.0.1, in IPv6 mode it becomes
+ff02::ffff:239.255.0.1, which is a non-standardised link-local multicast
+address.</p><p>The default value is: "239.255.0.1".</p>
+
+
+
+
+
+<p>The General element specifies overall Cyclone DDS service
+settings.</p>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<p>This element controls whether Cyclone DDS uses multicasts for data
+traffic.</p>
+
+<p>It is a comma-separated list of some of the following keywords:
+"spdp", "asm", "ssm", or either of "false" or "true", or "default".</p>
+
+<ul>
+
+<li><i>spdp</i>: enables the use of ASM (any-source multicast) for
+participant discovery, joining the multicast group on the discovery
+socket, transmitting SPDP messages to this group, but never advertising
+nor using any multicast address in any discovery message, thus forcing
+unicast communications for all endpoint discovery and user data.</li>
+
+<li><i>asm</i>: enables the use of ASM for all traffic, including
+receiving SPDP but not transmitting SPDP messages via multicast</li>
+
+<li><i>ssm</i>: enables the use of SSM (source-specific multicast) for
+all non-SPDP traffic (if supported)</li>
+
+</ul>
+
+<p>When set to "false" all multicasting is disabled. The default, "true"
+enables full use of multicasts. Listening for multicasts can be
+controlled by General/MulticastRecvNetworkInterfaceAddresses.</p>
+
+<p>"default" maps on spdp if the network is a WiFi network, on true if it
+is a wired network</p><p>The default value is: "default".</p>
+
+
+
+
+
+
+
+
+
+
+<p>This element allows setting the SO_DONTROUTE option for outgoing
+packets, to bypass the local routing tables. This is generally useful
+only when the routing tables cannot be trusted, which is highly
+unusual.</p><p>The default value is: "false".</p>
+
+
+
+
+
+<p>This element specifies whether Cyclone DDS allows IP multicast packets
+to be visible to all DDSI participants in the same node, including
+itself. It must be "true" for intra-node multicast communications, but if
+a node runs only a single Cyclone DDS service and does not host any other
+DDSI-capable programs, it should be set to "false" for improved
+performance.</p><p>The default value is: "true".</p>
+
+
+
+
+
+<p>This element allows explicitly overruling the network address Cyclone
+DDS advertises in the discovery protocol, which by default is the address
+of the preferred network interface (General/NetworkInterfaceAddress), to
+allow Cyclone DDS to communicate across a Network Address Translation
+(NAT) device.</p><p>The default value is: "auto".</p>
+
+
+
+
+
+<p>This element specifies the network mask of the external network
+address. This element is relevant only when an external network address
+(General/ExternalNetworkAddress) is explicitly configured. In this case
+locators received via the discovery protocol that are within the same
+external subnet (as defined by this mask) will be translated to an
+internal address by replacing the network portion of the external address
+with the corresponding portion of the preferred network interface
+address. This option is IPv4-only.</p><p>The default value is:
+"0.0.0.0".</p>
+
+
+
+
+
+<p>This element specifies the size of DDSI sample fragments generated by
+Cyclone DDS. Samples larger than FragmentSize are fragmented into
+fragments of FragmentSize bytes each, except the last one, which may be
+smaller. The DDSI spec mandates a minimum fragment size of 1025 bytes,
+but Cyclone DDS will do whatever size is requested, accepting fragments
+of which the size is at least the minimum of 1025 and FragmentSize.</p>
+
+<p>The unit must be specified explicitly. Recognised units: B (bytes), kB
+& KiB (2<sup>10</sup> bytes), MB & MiB (2<sup>20</sup> bytes), GB & GiB
+(2<sup>30</sup> bytes).</p><p>The default value is: "1280
+B".</p>
+
+
+
+
+
+<p>This element specifies the maximum size of the UDP payload that
+Cyclone DDS will generate. Cyclone DDS will try to maintain this limit
+within the bounds of the DDSI specification, which means that in some
+cases (especially for very low values of MaxMessageSize) larger payloads
+may sporadically be observed (currently up to 1192 B).</p>
+
+<p>On some networks it may be necessary to set this item to keep the
+packetsize below the MTU to prevent IP fragmentation. In those cases, it
+is generally advisable to also consider reducing
+Internal/FragmentSize.</p>
+
+<p>The unit must be specified explicitly. Recognised units: B (bytes), kB
+& KiB (2<sup>10</sup> bytes), MB & MiB (2<sup>20</sup> bytes), GB & GiB
+(2<sup>30</sup> bytes).</p><p>The default value is: "4096
+B".</p>
+
+
+
+
+
+<p>This element specifies on which network interfaces Cyclone DDS listens
+to multicasts. The following options are available:</p>
+
+<ul>
+
+<li><i>all</i>: listen for multicasts on all multicast-capable
+interfaces; or</li>
+
+<li><i>any</i>: listen for multicasts on the operating system default
+interface; or</li>
+
+<li><i>preferred</i>: listen for multicasts on the preferred interface
+(General/NetworkInterfaceAddress); or</li>
+
+<li><i>none</i>: does not listen for multicasts on any interface; or</li>
+
+<li>a comma-separated list of network addresses: configures Cyclone DDS
+to listen for multicasts on all of the listed addresses.</li>
+
+</ul>
+
+<p>If Cyclone DDS is in IPv6 mode and the address of the preferred
+network interface is a link-local address, "all" is treated as a synonym
+for "preferred" and a comma-separated list is treated as "preferred" if
+it contains the preferred interface and as "none" if not.</p><p>The
+default value is: "preferred".</p>
+
+
+
+
+
+<p>This element specifies the time-to-live setting for outgoing multicast
+packets.</p><p>The default value is: "32".</p>
+
+
+
+
+
+<p>This element specifies the preferred network interface for use by
+Cyclone DDS. The preferred network interface determines the IP address
+that Cyclone DDS advertises in the discovery protocol (but see also
+General/ExternalNetworkAddress), and is also the only interface over
+which multicasts are transmitted. The interface can be identified by its
+IP address, network interface name or network portion of the address. If
+the value "auto" is entered here, Cyclone DDS will select what it
+considers the most suitable interface.</p><p>The default value is:
+"auto".</p>
+
+
+
+
+
+<p>When false (default) Cyclone DDS uses unicast for data whenever there
+a single unicast suffices. Setting this to true makes it prefer
+multicasting data, falling back to unicast only when no multicast address
+is available.</p><p>The default value is: "false".</p>
+
+
+
+
+
+<p>This element allows selecting the transport to be used (udp, udp6,
+tcp, tcp6, raweth)</p><p>The default value is: "default".</p>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<p>Deprecated (use Transport instead)</p><p>The default value is:
+"default".</p>
+
+
+
+
+
+
+
+
+
+
+
+
+<p>The Internal elements deal with a variety of settings that evolving
+and that are not necessarily fully supported. For the vast majority of
+the Internal settings, the functionality per-se is supported, but the
+right to change the way the options control the functionality is
+reserved. This includes renaming or moving options.</p>
+
+
+
+
+
+
+
+
+
+<p>This element specifies the maximum transmit rate of auxiliary traffic
+not bound to a specific channel, such as discovery traffic, as well as
+auxiliary traffic related to a certain channel if that channel has
+elected to share this global AuxiliaryBandwidthLimit. Bandwidth limiting
+uses a leaky bucket scheme. The default value "inf" means Cyclone DDS
+imposes no limitation, the underlying operating system and hardware will
+likely limit the maimum transmit rate.</p>
+
+<p>The unit must be specified explicitly. Recognised units: <i>X</i>b/s,
+<i>X</i>bps for bits/s or <i>X</i>B/s, <i>X</i>Bps for bytes/s; where
+<i>X</i> is an optional prefix: k for 10<sup>3</sup>, Ki for
+2<sup>10</sup>, M for 10<sup>6</sup>, Mi for 2<sup>20</sup>, G for
+10<sup>9</sup>, Gi for 2<sup>30</sup>.</p><p>The default value is:
+"inf".</p>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<p>Proxy readers that are assumed to sill be retrieving historical data
+get this many samples retransmitted when they NACK something, even if
+some of these samples have sequence numbers outside the set covered by
+the NACK.</p><p>The default value is: "0".</p>
+
+
+
+
+
+<p>This element controls which network interfaces are assumed to be
+capable of multicasting even when the interface flags returned by the
+operating system state it is not (this provides a workaround for some
+platforms). It is a comma-separated lists of patterns (with ? and *
+wildcards) against which the interface names are matched.</p><p>The
+default value is: "".</p>
+
+
+
+
+
+<p>This setting controls the interval with which a reader will continue
+NACK'ing missing samples in the absence of a response from the writer, as
+a protection mechanism against writers incorrectly stopping the sending
+of HEARTBEAT messages.</p>
+
+<p>Valid values are finite durations with an explicit unit or the keyword
+'inf' for infinity. Recognised units: ns, us, ms, s, min, hr,
+day.</p><p>The default value is: "1 s".</p>
+
+
+
+
+
+<p>This element controls which participants will have which built-in
+endpoints for the discovery and liveliness protocols. Valid values
+are:</p>
+
+<ul><li><i>full</i>: all participants have all endpoints;</li>
+
+<li><i>writers</i>: all participants have the writers, but just one has
+the readers;</li>
+
+<li><i>minimal</i>: only one participant has built-in
+endpoints.</li></ul>
+
+<p>The default is <i>writers</i>, as this is thought to be compliant and
+reasonably efficient. <i>Minimal</i> may or may not be compliant but is
+most efficient, and <i>full</i> is inefficient but certain to be
+compliant. See also Internal/ConservativeBuiltinReaderStartup.</p><p>The
+default value is: "writers".</p>
+
+
+
+
+
+
+
+
+
+
+
+
+<p>The ControlTopic element allows configured whether Cyclone DDS
+provides a special control interface via a predefined topic or not.<p>
+
+
+
+
+
+
+<p>This element sets the maximum number of extra threads for an
+experimental, undocumented and unsupported direct mode.</p><p>The default
+value is: "1".</p>
+
+
+
+
+
+<p>This element sets the maximum number of samples that can be
+defragmented simultaneously for a reliable writer. This has to be large
+enough to handle retransmissions of historical data in addition to new
+samples.</p><p>The default value is: "16".</p>
+
+
+
+
+
+<p>This element sets the maximum number of samples that can be
+defragmented simultaneously for a best-effort writers.</p><p>The default
+value is: "4".</p>
+
+
+
+
+
+<p>This element controls the Maximum size of a delivery queue, expressed
+in samples. Once a delivery queue is full, incoming samples destined for
+that queue are dropped until space becomes available again.</p><p>The
+default value is: "256".</p>
+
+
+
+
+
+<p>This element enables expensive checks in builds with assertions
+enabled and is ignored otherwise. Recognised categories are:</p>
+
+<ul><li><i>whc</i>: writer history cache checking</li>
+
+<li><i>rhc</i>: reader history cache checking</li>
+
+<p>In addition, there is the keyword <i>all</i> that enables all
+checks.</p><p>The default value is: "".</p>
+
+
+
+
+
+
+
+
+
+
+<p>When true, include keyhashes in outgoing data for topics with
+keys.</p><p>The default value is: "false".</p>
+
+
+
+
+
+<p>This elemnents allows configuring the base interval for sending writer
+heartbeats and the bounds within it can vary.</p>
+
+<p>Valid values are finite durations with an explicit unit or the keyword
+'inf' for infinity. Recognised units: ns, us, ms, s, min, hr,
+day.</p><p>The default value is: "100 ms".</p>
+
+
+
+
+
+<p>Ack a sample only when it has been delivered, instead of when
+committed to delivering it.</p><p>The default value is:
+"false".</p>
+
+
+
+
+
+<p>This setting controls the default participant lease duration. <p>
+
+<p>The unit must be specified explicitly. Recognised units: ns, us, ms,
+s, min, hr, day.</p><p>The default value is: "10 s".</p>
+
+
+
+
+
+<p>This element controls whether or not implementation should internally
+monitor its own liveliness. If liveliness monitoring is enabled, stack
+traces can be dumped automatically when some thread appears to have
+stopped making progress.</p><p>The default value is:
+"false".</p>
+
+
+
+
+
+<p>This elements configures the maximum number of DCPS domain
+participants this Cyclone DDS instance is willing to service. 0 is
+unlimited.</p><p>The default value is: "0".</p>
+
+
+
+
+
+<p>This setting limits the maximum number of bytes queued for
+retransmission. The default value of 0 is unlimited unless an
+AuxiliaryBandwidthLimit has been set, in which case it becomes NackDelay
+* AuxiliaryBandwidthLimit. It must be large enough to contain the largest
+sample that may need to be retransmitted.</p>
+
+<p>The unit must be specified explicitly. Recognised units: B (bytes), kB
+& KiB (2<sup>10</sup> bytes), MB & MiB (2<sup>20</sup> bytes), GB & GiB
+(2<sup>30</sup> bytes).</p><p>The default value is: "50
+kB".</p>
+
+
+
+
+
+<p>This settings limits the maximum number of samples queued for
+retransmission.</p><p>The default value is: "200".</p>
+
+
+
+
+
+<p>This setting controls the maximum (CDR) serialised size of samples
+that Cyclone DDS will forward in either direction. Samples larger than
+this are discarded with a warning.</p>
+
+<p>The unit must be specified explicitly. Recognised units: B (bytes), kB
+& KiB (2<sup>10</sup> bytes), MB & MiB (2<sup>20</sup> bytes), GB & GiB
+(2<sup>30</sup> bytes).</p><p>The default value is: "2147483647
+B".</p>
+
+
+
+
+
+<p>This element enables heartbeat-to-ack latency among Cyclone DDS
+services by prepending timestamps to Heartbeat and AckNack messages and
+calculating round trip times. This is non-standard behaviour. The
+measured latencies are quite noisy and are currently not used
+anywhere.</p><p>The default value is: "false".</p>
+
+
+
+
+
+<p>This setting controls the minimum size of socket receive buffers. The
+operating system provides some size receive buffer upon creation of the
+socket, this option can be used to increase the size of the buffer beyond
+that initially provided by the operating system. If the buffer size
+cannot be increased to the specified size, an error is reported.</p>
+
+<p>The default setting is the word "default", which means Cyclone DDS
+will attempt to increase the buffer size to 1MB, but will silently accept
+a smaller buffer should that attempt fail.</p>
+
+<p>The unit must be specified explicitly. Recognised units: B (bytes), kB
+& KiB (2<sup>10</sup> bytes), MB & MiB (2<sup>20</sup> bytes), GB & GiB
+(2<sup>30</sup> bytes).</p><p>The default value is:
+"default".</p>
+
+
+
+
+
+<p>This setting controls the minimum size of socket send buffers. This
+setting can only increase the size of the send buffer, if the operating
+system by default creates a larger buffer, it is left unchanged.</p>
+
+<p>The unit must be specified explicitly. Recognised units: B (bytes), kB
+& KiB (2<sup>10</sup> bytes), MB & MiB (2<sup>20</sup> bytes), GB & GiB
+(2<sup>30</sup> bytes).</p><p>The default value is: "64
+KiB".</p>
+
+
+
+
+
+<p>This element allows configuring a service that dumps a text
+description of part the internal state to TCP clients. By default (-1),
+this is disabled; specifying 0 means a kernel-allocated port is used; a
+positive number is used as the TCP port number.</p><p>The default value
+is: "-1".</p>
+
+
+
+
+
+<p>This element controls whether all traffic is handled by a single
+receive thread or whether multiple receive threads may be used to improve
+latency. Currently multiple receive threads are only used for
+connectionless transport (e.g., UDP) and ManySocketsMode not set to
+single (the default).</p><p>The default value is: "true".</p>
+
+
+
+
+
+<p>This setting controls the delay between receipt of a HEARTBEAT
+indicating missing samples and a NACK (ignored when the HEARTBEAT
+requires an answer). However, no NACK is sent if a NACK had been
+scheduled already for a response earlier than the delay requests: then
+that NACK will incorporate the latest information.</p>
+
+<p>The unit must be specified explicitly. Recognised units: ns, us, ms,
+s, min, hr, day.</p><p>The default value is: "10 ms".</p>
+
+
+
+
+
+<p>This setting controls the delay between the discovering a remote
+writer and sending a pre-emptive AckNack to discover the range of data
+available.</p>
+
+<p>The unit must be specified explicitly. Recognised units: ns, us, ms,
+s, min, hr, day.</p><p>The default value is: "10 ms".</p>
+
+
+
+
+
+<p>This element sets the maximum size in samples of a primary re-order
+administration. Each proxy writer has one primary re-order administration
+to buffer the packet flow in case some packets arrive out of order. Old
+samples are forwarded to secondary re-order administrations associated
+with readers in need of historical data.</p><p>The default value is:
+"128".</p>
+
+
+
+
+
+<p>This element controls whether retransmits are prioritized over new
+data, speeding up recovery.</p><p>The default value is:
+"true".</p>
+
+
+
+
+
+<p>This element controls for how long a remote participant that was
+previously deleted will remain on a blacklist to prevent rediscovery,
+giving the software on a node time to perform any cleanup actions it
+needs to do. To some extent this delay is required internally by Cyclone
+DDS, but in the default configuration with the 'enforce' attribute set to
+false, Cyclone DDS will reallow rediscovery as soon as it has cleared its
+internal administration. Setting it to too small a value may result in
+the entry being pruned from the blacklist before Cyclone DDS is ready, it
+is therefore recommended to set it to at least several seconds.</p>
+
+<p>Valid values are finite durations with an explicit unit or the keyword
+'inf' for infinity. Recognised units: ns, us, ms, s, min, hr,
+day.</p><p>The default value is: "10s".</p>
+
+
+
+
+
+<p>This elements controls the addressing and timing of retransmits.
+Possible values are:</p>
+
+<ul><li><i>never</i>: retransmit only to the NACK-ing reader;</li>
+
+<li><i>adaptive</i>: attempt to combine retransmits needed for
+reliability, but send historical (transient-local) data to the requesting
+reader only;</li>
+
+<li><i>always</i>: do not distinguish between different causes, always
+try to merge.</li></ul>
+
+<p>The default is <i>never</i>. See also
+Internal/RetransmitMergingPeriod.</p><p>The default value is:
+"never".</p>
+
+
+
+
+
+
+
+
+
+
+
+
+<p>This setting determines the size of the time window in which a NACK of
+some sample is ignored because a retransmit of that sample has been
+multicasted too recently. This setting has no effect on unicasted
+retransmits.</p>
+
+<p>See also Internal/RetransmitMerging.</p>
+
+<p>The unit must be specified explicitly. Recognised units: ns, us, ms,
+s, min, hr, day.</p><p>The default value is: "5 ms".</p>
+
+
+
+
+
+<p>Whether or not to locally retry pushing a received best-effort sample
+into the reader caches when resource limits are reached.</p><p>The
+default value is: "false".</p>
+
+
+
+
+
+<p>Maximum pseudo-random delay in milliseconds between discovering a
+remote participant and responding to it.</p>
+
+<p>The unit must be specified explicitly. Recognised units: ns, us, ms,
+s, min, hr, day.</p><p>The default value is: "0 ms".</p>
+
+
+
+
+
+<p>This setting allows the timing of scheduled events to be rounded up so
+that more events can be handled in a single cycle of the event queue. The
+default is 0 and causes no rounding at all, i.e. are scheduled exactly,
+whereas a value of 10ms would mean that events are rounded up to the
+nearest 10 milliseconds.</p>
+
+<p>The unit must be specified explicitly. Recognised units: ns, us, ms,
+s, min, hr, day.</p><p>The default value is: "0 ms".</p>
+
+
+
+
+
+<p>This element sets the maximum size in samples of a secondary re-order
+administration. The secondary re-order administration is per reader in
+need of historical data.</p><p>The default value is: "128".</p>
+
+
+
+
+
+<p>This element controls whether the actual sending of packets occurs on
+the same thread that prepares them, or is done asynchronously by another
+thread.</p><p>The default value is: "false".</p>
+
+
+
+
+
+<p>This element controls whether Cyclone DDS advertises all the domain
+participants it serves in DDSI (when set to <i>false</i>), or rather only
+one domain participant (the one corresponding to the Cyclone DDS process;
+when set to <i>true</i>). In the latter case Cyclone DDS becomes the
+virtual owner of all readers and writers of all domain participants,
+dramatically reducing discovery traffic (a similar effect can be obtained
+by setting Internal/BuiltinEndpointSet to "minimal" but with less loss of
+information).</p><p>The default value is: "false".</p>
+
+
+
+
+
+<p>This element controls whether samples sent by a writer with QoS
+settings transport_priority >= SynchronousDeliveryPriorityThreshold and a
+latency_budget at most this element's value will be delivered
+synchronously from the "recv" thread, all others will be delivered
+asynchronously through delivery queues. This reduces latency at the
+expense of aggregate bandwidth.</p>
+
+<p>Valid values are finite durations with an explicit unit or the keyword
+'inf' for infinity. Recognised units: ns, us, ms, s, min, hr,
+day.</p><p>The default value is: "inf".</p>
+
+
+
+
+
+<p>This element controls whether samples sent by a writer with QoS
+settings latency_budget <= SynchronousDeliveryLatencyBound and
+transport_priority greater than or equal to this element's value will be
+delivered synchronously from the "recv" thread, all others will be
+delivered asynchronously through delivery queues. This reduces latency at
+the expense of aggregate bandwidth.</p><p>The default value is:
+"0".</p>
+
+
+
+
+
+<p>Testing options.</p>
+
+
+
+
+
+
+
+
+
+
+<p>This element controls the fraction of outgoing packets to drop,
+specified as samples per thousand.</p><p>The default value is:
+"0".</p>
+
+
+
+
+
+<p>This element controls whether the response to a newly discovered
+participant is sent as a unicasted SPDP packet, instead of rescheduling
+the periodic multicasted one. There is no known benefit to setting this
+to <i>false</i>.</p><p>The default value is: "true".</p>
+
+
+
+
+
+<p>Do not use.</p><p>The default value is: "0".</p>
+
+
+
+
+
+<p>Watermarks for flow-control.</p>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<p>This element controls whether Cyclone DDS will adapt the high-water
+mark to current traffic conditions, based on retransmit requests and
+transmit pressure.</p><p>The default value is: "true".</p>
+
+
+
+
+
+<p>This element sets the maximum allowed high-water mark for the Cyclone
+DDS WHCs, expressed in bytes. A writer is suspended when the WHC reaches
+this size.</p>
+
+<p>The unit must be specified explicitly. Recognised units: B (bytes), kB
+& KiB (2<sup>10</sup> bytes), MB & MiB (2<sup>20</sup> bytes), GB & GiB
+(2<sup>30</sup> bytes).</p><p>The default value is: "100
+kB".</p>
+
+
+
+
+
+<p>This element sets the initial level of the high-water mark for the
+Cyclone DDS WHCs, expressed in bytes.</p>
+
+<p>The unit must be specified explicitly. Recognised units: B (bytes), kB
+& KiB (2<sup>10</sup> bytes), MB & MiB (2<sup>20</sup> bytes), GB & GiB
+(2<sup>30</sup> bytes).</p><p>The default value is: "30
+kB".</p>
+
+
+
+
+
+<p>This element sets the low-water mark for the Cyclone DDS WHCs,
+expressed in bytes. A suspended writer resumes transmitting when its
+Cyclone DDS WHC shrinks to this size.</p>
+
+<p>The unit must be specified explicitly. Recognised units: B (bytes), kB
+& KiB (2<sup>10</sup> bytes), MB & MiB (2<sup>20</sup> bytes), GB & GiB
+(2<sup>30</sup> bytes).</p><p>The default value is: "1 kB".</p>
+
+
+
+
+
+<p>This element enables the batching of write operations. By default each
+write operation writes through the write cache and out onto the
+transport. Enabling write batching causes multiple small write operations
+to be aggregated within the write cache into a single larger write. This
+gives greater throughput at the expense of latency. Currently there is no
+mechanism for the write cache to automatically flush itself, so that if
+write batching is enabled, the application may havee to use the
+dds_write_flush function to ensure thta all samples are
+written.</p><p>The default value is: "false".</p>
+
+
+
+
+
+<p>This setting controls the maximum duration for which actual deletion
+of a reliable writer with unacknowledged data in its history will be
+postponed to provide proper reliable transmission.<p>
+
+<p>The unit must be specified explicitly. Recognised units: ns, us, ms,
+s, min, hr, day.</p><p>The default value is: "1 s".</p>
+
+
+
+
+
+<p>The Partitioning element specifies Cyclone DDS network partitions and
+how DCPS partition/topic combinations are mapped onto the network
+partitions.</p>
+
+
+
+
+
+
+
+
+
+
+
+
+<p>The IgnoredPartitions element specifies DCPS partition/topic
+combinations that are not distributed over the network.</p>
+
+
+
+
+
+
+
+
+
+
+<p>This element can be used to prevent certain combinations of DCPS
+partition and topic from being transmitted over the network. Cyclone DDS
+will complete ignore readers and writers for which all DCPS partitions as
+well as their topic is ignored, not even creating DDSI readers and
+writers to mirror the DCPS ones.</p>
+
+
+
+
+
+<p>This attribute specifies a partition and a topic expression, separated
+by a single '.', that are used to determine if a given partition and
+topic will be ignored or not. The expressions may use the usual wildcards
+'*' and '?'. Cyclone DDS will consider an wildcard DCPS partition to
+match an expression iff there exists a string that satisfies both
+expressions.</p>
+
+
+
+
+
+
+
+<p>The NetworkPartitions element specifies the Cyclone DDS network
+partitions.</p>
+
+
+
+
+
+
+
+
+
+
+<p>This element defines a Cyclone DDS network partition.</p>
+
+
+
+
+
+<p>This attribute specifies the multicast addresses associated with the
+network partition as a comma-separated list. Readers matching this
+network partition (cf. Partitioning/PartitionMappings) will listen for
+multicasts on all of these addresses and advertise them in the discovery
+protocol. The writers will select the most suitable address from the
+addresses advertised by the readers.</p>
+
+
+
+
+
+<p>This attribute is a placeholder.</p><p>The default value is:
+"true".</p>
+
+
+
+
+
+<p>This attribute specifies the name of this Cyclone DDS network
+partition. Two network partitions cannot have the same name.</p>
+
+
+
+
+
+
+
+<p>The PartitionMappings element specifies the mapping from DCPS
+partition/topic combinations to Cyclone DDS network partitions.</p>
+
+
+
+
+
+
+
+
+
+
+<p>This element defines a mapping from a DCPS partition/topic combination
+to a Cyclone DDS network partition. This allows partitioning data flows
+by using special multicast addresses for part of the data and possibly
+also encrypting the data flow.</p>
+
+
+
+
+
+<p>This attribute specifies a partition and a topic expression, separated
+by a single '.', that are used to determine if a given partition and
+topic maps to the Cyclone DDS network partition named by the
+NetworkPartition attribute in this PartitionMapping element. The
+expressions may use the usual wildcards '*' and '?'. Cyclone DDS will
+consider a wildcard DCPS partition to match an expression if there exists
+a string that satisfies both expressions.</p>
+
+
+
+
+
+<p>This attribute specifies which Cyclone DDS network partition is to be
+used for DCPS partition/topic combinations matching the
+DCPSPartitionTopic attribute within this PartitionMapping element.</p>
+
+
+
+
+
+
+
+<p>The SSL element allows specifying various parameters related to using
+SSL/TLS for DDSI over TCP.</p>
+
+
+
+
+
+
+
+
+<p>This enables SSL/TLS for TCP.</p><p>The default value is:
+"false".</p>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<p>If disabled this allows SSL connections to occur even if an X509
+certificate fails verification.</p><p>The default value is:
+"true".</p>
+
+
+
+
+
+<p>The set of ciphers used by SSL/TLS</p><p>The default value is:
+"ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH".</p>
+
+
+
+
+
+<p>The SSL/TLS random entropy file name.</p><p>The default value is:
+"".</p>
+
+
+
+
+
+<p>The SSL/TLS key pass phrase for encrypted keys.</p><p>The default
+value is: "secret".</p>
+
+
+
+
+
+<p>The SSL/TLS key and certificate store file name. The keystore must be
+in PEM format.</p><p>The default value is: "keystore".</p>
+
+
+
+
+
+<p>The minimum TLS version that may be negotiated, valid values are 1.2
+and 1.3.</p><p>The default value is: "1.3".</p>
+
+
+
+
+
+<p>This enables the use of self signed X509 certificates.</p><p>The
+default value is: "false".</p>
+
+
+
+
+
+<p>This enables an SSL server checking the X509 certificate of a
+connecting client.</p><p>The default value is: "true".</p>
+
+
+
+
+
+<p>The Sizing element specifies a variety of configuration settings
+dealing with expected system sizes, buffer sizes, &c.</p>
+
+
+
+
+
+
+
+
+
+
+
+<p>This element specifies the size of one allocation unit in the receive
+buffer. Must be greater than the maximum packet size by a modest amount
+(too large packets are dropped). Each allocation is shrunk immediately
+after processing a message, or freed straightaway.</p>
+
+<p>The unit must be specified explicitly. Recognised units: B (bytes), kB
+& KiB (2<sup>10</sup> bytes), MB & MiB (2<sup>20</sup> bytes), GB & GiB
+(2<sup>30</sup> bytes).</p><p>The default value is: "128
+KiB".</p>
+
+
+
+
+
+<p>This element sets the size of a single receive buffer. Many receive
+buffers may be needed. The minimum workable size a little bit larger than
+Sizing/ReceiveBufferChunkSize, and the value used is taken as the
+configured value and the actual minimum workable size.</p>
+
+<p>The unit must be specified explicitly. Recognised units: B (bytes), kB
+& KiB (2<sup>10</sup> bytes), MB & MiB (2<sup>20</sup> bytes), GB & GiB
+(2<sup>30</sup> bytes).</p><p>The default value is: "1
+MiB".</p>
+
+
+
+
+
+<p>The TCP element allows specifying various parameters related to
+running DDSI over TCP.</p>
+
+
+
+
+
+
+
+<p>This element enables the optional TCP transport - deprecated, use
+General/Transport instead.</p><p>The default value is:
+"default".</p>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<p>Setting this to true means the unicast addresses in SPDP packets will
+be ignored and the peer address from the TCP connection will be used
+instead. This may help work around incorrectly advertised addresses when
+using TCP.</p><p>The default value is: "false".</p>
+
+
+
+
+
+<p>This element enables the TCP_NODELAY socket option, preventing
+multiple DDSI messages being sent in the same TCP request. Setting this
+option typically optimises latency over throughput.</p><p>The default
+value is: "true".</p>
+
+
+
+
+
+<p>This element specifies the TCP port number on which Cyclone DDS
+accepts connections. If the port is set it is used in entity locators,
+published with DDSI discovery. Dynamically allocated if zero. Disabled if
+-1 or not configured. If disabled other DDSI services will not be able to
+establish connections with the service, the service can only communicate
+by establishing connections to other services.</p><p>The default value
+is: "-1".</p>
+
+
+
+
+
+<p>This element specifies the timeout for blocking TCP read operations.
+If this timeout expires then the connection is closed.</p>
+
+<p>The unit must be specified explicitly. Recognised units: ns, us, ms,
+s, min, hr, day.</p><p>The default value is: "2 s".</p>
+
+
+
+
+
+<p>This element specifies the timeout for blocking TCP write operations.
+If this timeout expires then the connection is closed.</p>
+
+<p>The unit must be specified explicitly. Recognised units: ns, us, ms,
+s, min, hr, day.</p><p>The default value is: "2 s".</p>
+
+
+
+
+
+<p>The ThreadPool element allows specifying various parameters related to
+using a thread pool to send DDSI messages to multiple unicast addresses
+(TCP or UDP).</p>
+
+
+
+
+
+
+<p>This element enables the optional thread pool.</p><p>The default value
+is: "false".</p>
+
+
+
+
+
+
+<p>This elements configures the initial number of threads in the thread
+pool.</p><p>The default value is: "4".</p>
+
+
+
+
+
+
+
+
+<p>This elements configures the maximum number of threads in the thread
+pool.</p><p>The default value is: "8".</p>
+
+
+
+
+
+<p>This element is used to set thread properties.</p>
+
+
+
+
+
+
+
+
+
+<p>The Name of the thread for which properties are being set. The
+following threads exist:</p>
+
+<ul><li><i>gc</i>: garbage collector thread involved in deleting
+entities;</li>
+
+<li><i>recv</i>: receive thread, taking data from the network and running
+the protocol state machine;</li>
+
+<li><i>dq.builtins</i>: delivery thread for DDSI-builtin data, primarily
+for discovery;</li>
+
+<li><i>lease</i>: DDSI liveliness monitoring;</li>
+
+<li><i>tev</i>: general timed-event handling, retransmits and
+discovery;</li>
+
+<li><i>xmit.CHAN</i>: transmit thread for channel CHAN;</li>
+
+<li><i>dq.CHAN</i>: delivery thread for channel CHAN;</li>
+
+<li><i>tev.CHAN</i>: timed-even thread for channel CHAN.</li></ul>
+
+
+
+
+
+
+
+<p>This element configures the scheduling properties of the thread.</p>
+
+
+
+
+
+
+
+
+
+
+
+<p>This element specifies the thread scheduling class (<i>realtime</i>,
+<i>timeshare</i> or <i>default</i>). The user may need special privileges
+from the underlying operating system to be able to assign some of the
+privileged scheduling classes.</p><p>The default value is:
+"default".</p>
+
+
+
+
+
+
+
+
+
+
+
+
+<p>This element specifies the thread priority (decimal integer or
+<i>default</i>). Only priorities that are supported by the underlying
+operating system can be assigned to this element. The user may need
+special privileges from the underlying operating system to be able to
+assign some of the privileged priorities.</p><p>The default value is:
+"default".</p>
+
+
+
+
+
+<p>This element configures the stack size for this thread. The default
+value <i>default</i> leaves the stack size at the operating system
+default.</p>
+
+<p>The unit must be specified explicitly. Recognised units: B (bytes), kB
+& KiB (2<sup>10</sup> bytes), MB & MiB (2<sup>20</sup> bytes), GB & GiB
+(2<sup>30</sup> bytes).</p><p>The default value is:
+"default".</p>
+
+
+
+
+
+<p>The Tracing element controls the amount and type of information that
+is written into the tracing log by the DDSI service. This is useful to
+track the DDSI service during application development.</p>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<p>This option specifies whether the output is to be appended to an
+existing log file. The default is to create a new log file each time,
+which is generally the best option if a detailed log is
+generated.</p><p>The default value is: "false".</p>
+
+
+
+
+
+<p>This element enables individual logging categories. These are enabled
+in addition to those enabled by Tracing/Verbosity. Recognised categories
+are:</p>
+
+<ul><li><i>fatal</i>: all fatal errors, errors causing immediate
+termination</li>
+
+<li><i>error</i>: failures probably impacting correctness but not
+necessarily causing immediate termination</li>
+
+<li><i>warning</i>: abnormal situations that will likely not impact
+correctness</li>
+
+<li><i>config</i>: full dump of the configuration</li>
+
+<li><i>info</i>: general informational notices</li>
+
+<li><i>discovery</i>: all discovery activity</li>
+
+<li><i>data</i>: include data content of samples in traces</li>
+
+<li><i>radmin</i>: receive buffer administration</li>
+
+<li><i>timing</i>: periodic reporting of CPU loads per thread</li>
+
+<li><i>traffic</i>: periodic reporting of total outgoing data</li>
+
+<li><i>whc</i>: tracing of writer history cache changes</li>
+
+<li><i>tcp</i>: tracing of TCP-specific activity</li>
+
+<li><i>topic</i>: tracing of topic definitions</li>
+
+<li>>i>plist</i>: tracing of discovery parameter list interpretation</li>
+</ul>
+
+<p>In addition, there is the keyword <i>trace</i> that enables all but
+<i>radmin</i>, <i>topic</i>, <i>plist</i> and <i>whc</i></p>.
+
+<p>The categorisation of tracing output is incomplete and hence most of
+the verbosity levels and categories are not of much use in the current
+release. This is an ongoing process and here we describe the target
+situation rather than the current situation. Currently, the most useful
+is <i>trace</i>.</p><p>The default value is: "".</p>
+
+
+
+
+
+
+
+
+
+
+<p>This option specifies where the logging is printed to. Note that
+<i>stdout</i> and <i>stderr</i> are treated as special values,
+representing "standard out" and "standard error" respectively. No file is
+created unless logging categories are enabled using the Tracing/Verbosity
+or Tracing/EnabledCategory settings.</p><p>The default value is:
+"cyclonedds.log".</p>
+
+
+
+
+
+<p>This option specifies the file to which received and sent packets will
+be logged in the "pcap" format suitable for analysis using common
+networking tools, such as WireShark. IP and UDP headers are ficitious, in
+particular the destination address of received packets. The TTL may be
+used to distinguish between sent and received packets: it is 255 for sent
+packets and 128 for received ones. Currently IPv4 only.</p><p>The default
+value is: "".</p>
+
+
+
+
+
+<p>This element enables standard groups of categories, based on a desired
+verbosity level. This is in addition to the categories enabled by the
+Tracing/Category setting. Recognised verbosity levels and the categories
+they map to are:</p>
+
+<ul><li><i>none</i>: no Cyclone DDS log</li>
+
+<li><i>severe</i>: error and fatal</li>
+
+<li><i>warning</i>: <i>severe</i> + warning</li>
+
+<li><i>info</i>: <i>warning</i> + info</li>
+
+<li><i>config</i>: <i>info</i> + config</li>
+
+<li><i>fine</i>: <i>config</i> + discovery</li>
+
+<li><i>finer</i>: <i>fine</i> + traffic and timing</li>
+
+<li><i>finest</i>: <i>finer</i> + trace</li></ul>
+
+<p>While <i>none</i> prevents any message from being written to a Cyclone
+DDS log file.</p>
+
+<p>The categorisation of tracing output is incomplete and hence most of
+the verbosity levels and categories are not of much use in the current
+release. This is an ongoing process and here we describe the target
+situation rather than the current situation. Currently, the most useful
+verbosity levels are <i>config</i>, <i>fine</i> and
+<i>finest</i>.</p><p>The default value is: "none".</p>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/core/ddsi/src/q_config.c b/src/core/ddsi/src/q_config.c
index 6ee4d81..a1eb89f 100644
--- a/src/core/ddsi/src/q_config.c
+++ b/src/core/ddsi/src/q_config.c
@@ -52,10 +52,6 @@ typedef enum update_result (*update_fun_t) (struct cfgst *cfgst, void *parent, s
typedef void (*free_fun_t) (struct cfgst *cfgst, void *parent, struct cfgelem const * const cfgelem);
typedef void (*print_fun_t) (struct cfgst *cfgst, void *parent, struct cfgelem const * const cfgelem, uint32_t sources);
-#ifdef DDSI_INCLUDE_SECURITY
-struct q_security_plugins q_security_plugin = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL };
-#endif
-
struct unit {
const char *name;
int64_t multiplier;
@@ -142,7 +138,7 @@ static const ddsrt_avl_treedef_t cfgst_found_treedef =
#define DU(fname) static enum update_result uf_##fname (struct cfgst *cfgst, void *parent, struct cfgelem const * const cfgelem, int first, const char *value)
#define PF(fname) static void pf_##fname (struct cfgst *cfgst, void *parent, struct cfgelem const * const cfgelem, uint32_t sources)
#define DUPF(fname) DU(fname) ; PF(fname)
-PF(nop);
+DUPF(nop);
DUPF(networkAddress);
DUPF(networkAddresses);
DU(ipv4);
@@ -724,7 +720,7 @@ static const struct cfgelem discovery_cfgelems[] = {
};
static const struct cfgelem tracing_cfgelems[] = {
- { LEAF("EnableCategory"), 1, "", 0, 0, 0, uf_tracemask, 0, pf_tracemask,
+ { LEAF("Category|EnableCategory"), 1, "", 0, 0, 0, uf_tracemask, 0, pf_tracemask,
BLURB("This element enables individual logging categories. These are enabled in addition to those enabled by Tracing/Verbosity. Recognised categories are:
\n\
- fatal: all fatal errors, errors causing immediate termination
\n\
- error: failures probably impacting correctness but not necessarily causing immediate termination
\n\
@@ -743,7 +739,7 @@ static const struct cfgelem tracing_cfgelems[] = {
In addition, there is the keyword trace that enables all but radmin, topic, plist and whc
.\n\
The categorisation of tracing output is incomplete and hence most of the verbosity levels and categories are not of much use in the current release. This is an ongoing process and here we describe the target situation rather than the current situation. Currently, the most useful is trace.
") },
{ LEAF("Verbosity"), 1, "none", 0, 0, 0, uf_verbosity, 0, pf_nop,
- BLURB("This element enables standard groups of categories, based on a desired verbosity level. This is in addition to the categories enabled by the Tracing/EnableCategory setting. Recognised verbosity levels and the categories they map to are:
\n\
+ BLURB("This element enables standard groups of categories, based on a desired verbosity level. This is in addition to the categories enabled by the Tracing/Category setting. Recognised verbosity levels and the categories they map to are:
\n\
- none: no DDSI2E log
\n\
- severe: error and fatal
\n\
- warning: severe + warning
\n\
@@ -764,7 +760,7 @@ static const struct cfgelem tracing_cfgelems[] = {
};
static const struct cfgelem domain_cfgattrs[] = {
- { LEAF("Id"), 0, "any", ABSOFF(domainId), 0, uf_domainId, 0, pf_domainId,
+ { ATTR("Id"), 0, "any", ABSOFF(domainId), 0, uf_domainId, 0, pf_domainId,
BLURB("Domain id this configuration applies to, or \"any\" if it applies to all domain ids.
") },
END_MARKER
};
@@ -829,8 +825,14 @@ static const struct cfgelem root_cfgelems[] = {
END_MARKER
};
+static const struct cfgelem root_cfgattrs[] = {
+ { ATTR("xmlns:xsi"), 0, "", 0, 0, 0, uf_nop, 0, pf_nop, NULL },
+ { ATTR("xsi:noNamespaceSchemaLocation"), 0, "", 0, 0, 0, uf_nop, 0, pf_nop, NULL },
+ END_MARKER
+};
+
static const struct cfgelem cyclonedds_root_cfgelems[] = {
- { "CycloneDDS", root_cfgelems, NULL, NODATA, BLURB("CycloneDDS configuration") },
+ { "CycloneDDS", root_cfgelems, root_cfgattrs, NODATA, BLURB("CycloneDDS configuration") },
END_MARKER
};
@@ -1259,6 +1261,11 @@ static void ff_free (struct cfgst *cfgst, void *parent, struct cfgelem const * c
ddsrt_free (*elem);
}
+static enum update_result uf_nop (UNUSED_ARG (struct cfgst *cfgst), UNUSED_ARG (void *parent), UNUSED_ARG (struct cfgelem const * const cfgelem), UNUSED_ARG (int first), UNUSED_ARG (const char *value))
+{
+ return URES_SUCCESS;
+}
+
static void pf_nop (UNUSED_ARG (struct cfgst *cfgst), UNUSED_ARG (void *parent), UNUSED_ARG (struct cfgelem const * const cfgelem), UNUSED_ARG (uint32_t sources))
{
}
@@ -1501,7 +1508,7 @@ static enum update_result uf_verbosity (struct cfgst *cfgst, UNUSED_ARG (void *p
static void pf_tracemask (struct cfgst *cfgst, UNUSED_ARG (void *parent), UNUSED_ARG (struct cfgelem const * const cfgelem), uint32_t sources)
{
- /* EnableCategory is also (and often) set by Verbosity, so make an effort to locate the sources for verbosity and merge them in */
+ /* Category is also (and often) set by Verbosity, so make an effort to locate the sources for verbosity and merge them in */
struct cfgst_node *n;
struct cfgst_nodekey key;
bool isattr;
diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt
index 27801bf..3ba29bf 100644
--- a/src/tools/CMakeLists.txt
+++ b/src/tools/CMakeLists.txt
@@ -11,9 +11,6 @@
#
set(CMAKE_INSTALL_TOOLSDIR "${CMAKE_INSTALL_DATADIR}/${CMAKE_PROJECT_NAME}/tools")
add_subdirectory(pubsub)
-if(BUILD_CONFTOOL)
- add_subdirectory(config)
-endif()
add_subdirectory(ddsls)
if(BUILD_IDLC)
add_subdirectory(ddsperf)
diff --git a/src/tools/config/CMakeLists.txt b/src/tools/config/CMakeLists.txt
deleted file mode 100644
index 139a46b..0000000
--- a/src/tools/config/CMakeLists.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v. 2.0 which is available at
-# http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
-# v. 1.0 which is available at
-# http://www.eclipse.org/org/documents/edl-v10.php.
-#
-# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
-#
-find_package(Java 1.8 REQUIRED)
-include(UseJava)
-set(CONFJAR_TARGET "${CMAKE_PROJECT_NAME_SMALL}conf")
-
-#set(CMAKE_JAVA_COMPILE_FLAGS "-source" "1.8" "-target" "1.8" -Xlint:deprecation)
-
-file(GLOB_RECURSE JAVA_SOURCES LIST_DIRECTORIES true *.java)
-
-set(RESOURCES metaconfig.xml metaconfig.xsd )
-add_jar(${CONFJAR_TARGET} ${JAVA_SOURCES} ${RESOURCES} ENTRY_POINT org.eclipse.cyclonedds.config.CycloneConfig)
-
-#add_test(NAME TestHelloWorld COMMAND ${Java_JAVA_EXECUTABLE} -cp ${_jarFile} HelloWorld)
-
-install(
- FILES "${CMAKE_CURRENT_BINARY_DIR}/${CONFJAR_TARGET}.jar"
- DESTINATION "${CMAKE_INSTALL_TOOLSDIR}"
- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
- COMPONENT dev)
diff --git a/src/tools/config/excx.pl b/src/tools/config/excx.pl
deleted file mode 100644
index a528b7b..0000000
--- a/src/tools/config/excx.pl
+++ /dev/null
@@ -1,471 +0,0 @@
-: # -*- perl -*-
-eval 'exec perl -w -S $0 "$@"'
-if 0;
-
-use strict;
-
-# NOTES:
-# - very fragile - and very sensitive to input formatting
-# - default value may not contain a semicolon
-#
-# UGLINESSES:
-# - knowledge of conversion functions in here
-# - hard definitions of enums in here
-# - negated_boolean is A BIT WEIRD and special-cased
-# - some other hard-coded knowledge of the top level nodes
-# - some hard-coded overrides for defaults
-$|=1;
-
-my %typehint2xmltype = ("____" => "____",
- "networkAddress" => "String",
- "partitionAddress" => "String",
- "networkAddresses" => "String",
- "ipv4" => "String",
- "boolean" => "Boolean",
- "negated_boolean" => "Boolean",
- "boolean_default" => "Enum",
- "string" => "String",
- "tracingOutputFileName" => "String",
- "verbosity" => "Enum",
- "tracemask" => "String",
- "peer" => "String",
- "float" => "Float",
- "int" => "Int",
- "int32" => "Int",
- "uint" => "Int",
- "uint32" => "Int",
- "natint" => "Int",
- "natint_255" => "Int",
- "domainId" => "String",
- "participantIndex" => "String",
- "port" => "Int",
- "dyn_port" => "Int",
- "duration_inf" => "String",
- "duration_ms_1hr" => "String",
- "duration_ms_1s" => "String",
- "duration_100ms_1hr" => "String",
- "duration_us_1s" => "String",
- "memsize" => "String",
- "bandwidth" => "String",
- "standards_conformance" => "Enum",
- "locators" => "Enum",
- "service_name" => "String",
- "sched_class" => "Enum",
- "cipher" => "Enum",
- "besmode" => "Enum",
- "retransmit_merging" => "Enum",
- "sched_prio_class" => "Enum",
- "sched_class" => "Enum",
- "maybe_int32" => "String",
- "maybe_memsize" => "String",
- "maybe_duration_inf" => "String",
- "allow_multicast" => "String",
- "transport_selector" => "String",
- "many_sockets_mode" => "Enum",
- "xcheck" => "String",
- "min_tls_version" => "String");
-
-my %typehint2unit = ("duration_inf" => "duration_inf",
- "duration_ms_1hr" => "duration",
- "duration_100ms_1hr" => "duration",
- "duration_ms_1s" => "duration",
- "duration_us_1s" => "duration",
- "bandwidth" => "bandwidth",
- "memsize" => "memsize",
- "maybe_memsize" => "memsize",
- "maybe_duration_inf" => "duration_inf");
-
-my %enum_values = ("locators" => "local;none",
- "standards_conformance" => "lax;strict;pedantic",
- "verbosity" => "finest;finer;fine;config;info;warning;severe;none",
- "besmode" => "full;writers;minimal",
- "retransmit_merging" => "never;adaptive;always",
- "sched_prio_class" => "relative;absolute",
- "sched_class" => "realtime;timeshare;default",
- "cipher" => "null;blowfish;aes128;aes192;aes256",
- "boolean_default" => "false;true;default",
- "many_sockets_mode" => "false;true;single;none;many");
-
-my %range = ("port" => "1;65535",
- "dyn_port" => "-1;65535",
- "general_cfgelems/startupmodeduration" => "0;60000",
- "natint_255" => "0;255",
- "duration_ms_1hr" => "0;1hr",
- "duration_100ms_1hr" => "100ms;1hr",
- "duration_ms_1s" => "0;1s",
- "duration_us_1s" => "0;1s");
-
-my %unit_blurb = ("bandwidth" => "\nThe unit must be specified explicitly. Recognised units: Xb/s, Xbps for bits/s or XB/s, XBps for bytes/s; where X is an optional prefix: k for 103, Ki for 210, M for 106, Mi for 220, G for 109, Gi for 230.
",
- "memsize" => "\nThe unit must be specified explicitly. Recognised units: B (bytes), kB & KiB (210 bytes), MB & MiB (220 bytes), GB & GiB (230 bytes).
",
- "duration" => "\nThe unit must be specified explicitly. Recognised units: ns, us, ms, s, min, hr, day.
",
- "duration_inf" => "\nValid values are finite durations with an explicit unit or the keyword 'inf' for infinity. Recognised units: ns, us, ms, s, min, hr, day.
");
-
-while (my ($k, $v) = each %typehint2xmltype) {
- die "script error: values of enum type $k unknown\n" if $v eq "Enum" && $enum_values{$k} eq "";
-}
-
-# Configurator can't handle UINT32_MAX ... instead of fixing it, just use a different
-# default for the rare ones that have a problem (that works as long as there is no
-# practical difference between the two)
-my %default_overrides = ("multiple_recv_threads_attrs/maxretries" => 2000000000);
-
-my ($name, $table, $kind, $subtable, $multiplicity, $defaultvalue, $typehint, $description);
-
-my %tab2elems;
-my %elem;
-my %desc;
-my %typehint_seen;
-my $gobbling_description;
-my $skip_lite;
-my $in_table;
-my $rest;
-my $deprecated;
-
-############################
-
-sub clean_description {
- my ($desc) = @_;
- $desc =~ s/^\s*BLURB\s*\(\s*//s;
- $desc =~ s/^\s*"//s;
- $desc =~ s/\s*"(\s*\))? *(\}\s*,\s*$)?$//s;
- $desc =~ s/\\"/"/g;
- $desc =~ s/\\n\s*\\/\n/g;
- $desc =~ s/\\\\/\\/g;
- $desc =~ s/\n\n/\n/g;
- # should fix the source ...
- $desc =~ s/DDSI2E?/Cyclone DDS/g;
- return $desc;
-}
-
-sub store_entry {
- $name =~ s/\|.*//; # aliases are not visible in osplconf
- my $ltable = lc $table;
- my $lname = lc $name;
- if (not exists $tab2elems{$ltable}) {
- $tab2elems{$ltable} = $name;
- } else {
- $tab2elems{$ltable} .= ";$name";
- }
- $elem{"$ltable/$lname"} = "$kind;$subtable;$multiplicity;$defaultvalue;$typehint";
- my $ub = exists $typehint2unit{$typehint} && exists $unit_blurb{$typehint2unit{$typehint}} ? $unit_blurb{$typehint2unit{$typehint}} : "";
- $desc{"$ltable/$lname"} = clean_description($description).$ub;
- die "error: no mapping defined for type $typehint\n" if $typehint2xmltype{$typehint} eq "";
- $typehint_seen{$typehint} = 1;
- #printf "%s - $s\n", "$ltable/$lname", $elem{"$ltable/lname"};
- #$typehint = "";
-}
-
-sub print_description {
- my ($desc, $indent) = @_;
- print "$indent \n";
-}
-
-sub kind_to_kstr {
- my ($kind, $typehint, $table, $name, $isroot) = @_;
- if ($isroot) {
- die unless $kind eq "GROUP";
- return "rootElement";
- } elsif ($kind eq "GROUP" || $kind eq "MGROUP") {
- return "element";
- } elsif ($kind eq "ATTR") {
- return "attribute$typehint2xmltype{$typehint}";
- } elsif ($kind eq "LEAF") {
- return "leaf$typehint2xmltype{$typehint}";
- } else {
- die "error: $kind unrecognized kind ($table/$name)\n";
- }
-}
-
-sub transform_default {
- my (@fs) = @_;
- (my $tmp = $fs[3]) =~ s/^"(.*)"$/$1/;
- if ($fs[4] ne "negated_boolean") {
- return $tmp;
- } else {
- my %map = ("true" => "false", "false" => "true");
- return $map{lc $tmp};
- }
-}
-
-sub conv_to_xml {
- my ($table, $name, $indent, $prefix, $isroot, $force_min_occ_1) = @_;
- #, fs,vs,vsn,kstr,ts,tsi,tsn,i,min_occ,max_occ,rr,req) { # fs,vs,kstr,... are locals
- my $lctn = lc "$table/$name";
- my @fs = split /;/, $elem{$lctn};
- #print "$table/$name - \n"; for (my $i = 0; $i < @fs; $i++) { print " - $i $fs[$i]\n" }
- my $kstr = kind_to_kstr($fs[0], $fs[4], $table, $name, $isroot);
- my ($min_occ, $max_occ);
- if ($fs[2] =~ /MAX/) {
- $min_occ = $max_occ = 0;
- } elsif ($fs[2] == 0 || $fs[2] == 1) {
- # multiplicity = 0 => special case, treat as-if 1
- # multiplicity = 1 => required if no default
- # force_min_occ_1 so we can mark "Domain" as required and have it
- # show up in the config editor when creating a new file
- if ($force_min_occ_1) {
- $min_occ = 1;
- } elsif ($fs[0] eq "GROUP" || $fs[0] eq "MGROUP") {
- $min_occ = 0;
- } elsif ($fs[3] eq "" || $fs[3] eq "NULL") {
- $min_occ = 1;
- } else {
- $min_occ = 0;
- }
- $max_occ = 1;
- } else {
- $min_occ = 0; $max_occ = $fs[2];
- }
- if ($fs[0] eq "ATTR") {
- my $req = ($min_occ == 0) ? "false" : "true";
- print "$indent<$kstr name=\"$name\" required=\"$req\">\n";
- } else {
- print "$indent<$kstr name=\"$name\" minOccurrences=\"$min_occ\" maxOccurrences=\"$max_occ\">\n";
- }
- print_description ("$prefix$desc{$lctn}", $indent);
- # enum, int ranges
- if (exists $enum_values{$fs[4]}) {
- my @vs = split /;/, $enum_values{$fs[4]};
- print "$indent $_\n" for @vs;
- }
- my $rr = exists $range{$lctn} ? $range{$lctn} : "";
- if ($rr eq "" && exists $range{$fs[4]}) { $rr = $range{$fs[4]}; }
- if ($rr ne "") {
- my @vs = split /;/, $rr;
- print "$indent $vs[0]\n";
- print "$indent $vs[1]\n";
- }
- # remarkably, osplconf can't deal with strings for which no maximum
- # length is specified, even though it accepts unlimited length
- # strings ...
- if ($typehint2xmltype{$fs[4]} eq "String") {
- print "$indent 0\n";
- }
- # default not applicable to GROUPs
- if ($fs[0] ne "GROUP" && $fs[0] ne "MGROUP") {
- my $defover = exists $default_overrides{$lctn} ? $default_overrides{$lctn} : "";
- if ($defover ne "") {
- print "$indent $defover\n";
- } elsif ($fs[3] eq "" || $fs[3] eq "NULL") {
- print "$indent \n";
- } else {
- print "$indent ".transform_default(@fs)."\n";
- }
- }
- # recurse into subtables if any (except when it is the root: rootElement needs
- # special treatment
- if (!$isroot && $fs[1] ne "") {
- my @ts = sort (split /,/, $fs[1]);
- conv_table_to_xml($_, "$indent ", $prefix, 0, 0) for @ts;
- }
- print "$indent$kstr>\n";
-}
-
-sub conv_table_to_xml {
- my ($table, $indent, $prefix, $isroot, $force_min_occ_1) = @_;
- return unless exists $tab2elems{$table};
- my @ns = sort (split /;/, $tab2elems{$table});
- conv_to_xml($table, $_, $indent, ($table eq "unsupp_cfgelems") ? "Internal" : $prefix, $isroot, $force_min_occ_1) for @ns;
-}
-
-while (<>) {
- if ($gobbling_description) {
- $description .= $_;
- #print " .. $_\n";
- }
-
- if ($gobbling_description && /(^|")(\s*\)) *\} *, *$/) {
- $gobbling_description = 0;
- store_entry() unless $deprecated;
- next;
- }
-
- if ($gobbling_description) {
- next;
- }
-
- if (/^[ \t]*(#[ \t]*(if|ifdef|ifndef|else|endif).*)?$/) { # skip empty lines, preproc
- next;
- }
-
- if (/^ *END_MARKER *$/) {
- if (!$in_table) {
- warn "END_MARKER seen while not in a table";
- }
- $in_table = 0;
- #print "END_MARKER $table\n";
- next;
- }
-
- if (/^static +const +struct +cfgelem +([A-Za-z_0-9]+)\s*\[/) {
- $in_table = 1;
- $table = $1;
- #print "TABLE $table\n";
- next;
- }
-
- if ($in_table && /^ *WILDCARD *, *$|^ *\{ *(MOVED) *\(/) {
- next;
- }
-
- # Recognise all "normal" entries: attributes, groups, leaves and
- # leaves with attributes. This doesn't recognise the ones used for the
- # root groups: those are dealt with by the next pattern
- if ($in_table && /^ *\{ *((?:DEPRECATED_)?(?:ATTR|GROUP|GROUP_W_ATTRS|MGROUP|LEAF|LEAF_W_ATTRS)) *\(/) {
- $rest = $_;
- # extract kind
- $rest =~ s/^ *\{ *((?:DEPRECATED_)?(?:ATTR|GROUP|GROUP_W_ATTRS|MGROUP|LEAF|LEAF_W_ATTRS)) *\( *(.*)/$2/;
- $kind = $1;
- $deprecated = ($kind =~ s/^DEPRECATED_//);
- # extract name + reference to subtable
- $rest =~ s/\"([A-Za-z_0-9|]+)\" *(.*)/$2/;
- $name = $1;
- my ($subelems, $subattrs) = ("", "");
- if ($kind eq "GROUP" || $kind eq "GROUP_W_ATTRS" || $kind eq "MGROUP") {
- $rest =~ s/, *([A-Za-z_0-9]+) *(.*)/$2/;
- $subelems = $1;
- }
- if ($kind eq "LEAF_W_ATTRS" || $kind eq "GROUP_W_ATTRS" || $kind eq "MGROUP") {
- $rest =~ s/, *([A-Za-z_0-9]+) *(.*)/$2/;
- $subattrs = $1;
- }
- $subtable = "";
- if ($subelems ne "") { $subtable = $subelems; }
- if ($subattrs ne "") {
- if ($subtable ne "") { $subtable = "$subtable,$subattrs"; }
- else { $subtable = $subattrs; }
- }
- $rest =~ s/ *\) *, *//;
- #print " kind $kind name $name subtable $subtable -- $rest\n";
-
- # don't care about the distinction between GROUP/LEAF and
- # GROUP/LEAF_W_ATTRS in the remainer of the code: we simply
- # rely on subtable.
- $kind =~ s/_W_ATTRS//;
- }
-
- # Root groups: use a special trick, which allows them to do groups
- # with attributes. Which the DDSI2 proper doesn't use, but which the
- # service configuration stuff does rely on.
- if ($in_table && /^ *\{ *"([A-Za-z_0-9|]+)" *, */) {
- $rest = $_;
- # root elements are all groups, formatted as: , ,
- # , NODATA, description. They're therefore pretty easy to
- # parse.
- $kind = "GROUP";
- $rest =~ s/^ *\{ *\"([A-Za-z_0-9|]+)\" *, *(.*)/$2/;
- $name = $1;
- # then follow the sub-elements and the attributes
- $rest =~ s/([A-Za-z_0-9]+) *, *(.*)/$2/;
- my $subelems = $1;
- $rest =~ s/([A-Za-z_0-9]+) *, *(.*)/$2/;
- my $subattrs = $1;
- # then we require NODATA (could do this in the pattern also)
- die "error: NODATA expected" unless $rest =~ /^NODATA *,/;
- # multiplicity is hard coded: we want to allow multiple ddsi2 services
- $multiplicity = 0;
- $subtable = "";
- if ($subelems ne "NULL") { $subtable = $subelems; }
- if ($subattrs ne "NULL") {
- if ($subtable ne "") { $subtable = "$subtable,$subattrs"; }
- else { $subtable = $subattrs; }
- }
- $rest =~ s/([A-Za-z_0-9]+) *, *(.*)/$2/;
- }
-
- # Extract stuff specific to ATTRs, LEAFs and MGROUPs
- if ($in_table && ($kind eq "ATTR" || $kind eq "LEAF" || $kind eq "MGROUP")) {
- # extract multiplicity
- $rest =~ s/([0-9]+|U?INT(?:16|32|64)?_MAX) *, *(.*)/$2/;
- $multiplicity = $1;
- # extract default value
- $rest =~ s/(\"(?:[^\"]*)\"|NULL|0) *, *(.*)/$2/;
- $defaultvalue = $1;
- if ($defaultvalue eq "0") { $defaultvalue = "NULL"; }
- # skip reference to internal name (either ABSOFF(field),
- # RELOFF(field,field) or , (the latter being used by
- # "verbosity")
- $rest =~ s/(ABSOFF *\( *[A-Za-z_0-9.]+ *\)|RELOFF *\( *[A-Za-z_0-9.]+ *, *[A-Za-z_0-9]+ *\)|[0-9]+ *, *[0-9]+) *, *//;
- # skip init function
- $rest =~ s/([A-Za-z_0-9]+|0) *, *//;
- # type hint from conversion function
- $rest =~ s/(uf_(?:[A-Za-z_0-9]+)|NULL|0) *, *(.*)/$2/;
- $typehint = $1;
- $typehint =~ s/^uf_//;
- # accept typehint = NULL for a LEAF_WITH_ATTRS: there is no defined
- # "syntax" for groups that have only attributes, pretending it is a
- # group because that causes us to emit an "element" and not a
- # "leaf".
- if ($typehint eq "0" || $typehint eq "NULL") {
- $kind = "GROUP";
- $typehint = "____";
- }
- # skip free, print functions
- $rest =~ s/([A-Za-z_0-9]+|0) *, *([A-Za-z_0-9]+|0) *, *//;
- #print " .. multiplicity $multiplicity default $defaultvalue typehint $typehint\n";
- }
-
- # Extract description (or NULL, if not to be included in the configurator XML)
- if ($in_table) {
- #print " .. $rest\n";
- # description or NULL
- if ($rest =~ /NULL *\} *, *$/) {
- # no description - discard this one/simply continue with next one
- } elsif ($rest =~ /(?:BLURB\s*\(\s*)?(".*")(?:\s*\))? *\} *, *$/) {
- # description ending on same line
- $description = $1;
- store_entry() unless $deprecated;
- } else {
- # strip the quotes &c. once the full text has been gathered
- $description = $rest;
- $gobbling_description = 1;
- }
- #print " .. gobbling $gobbling_description";
- next;
- }
-}
-
-#print "$tab2elems{cyclonedds_root_cfgelems}\n";
-my @rootnames = split /;/, $tab2elems{cyclonedds_root_cfgelems};
-die "error: cyclonedds_root_cfgelems has no or multiple entries\n" if @rootnames != 1;
-die "error: root_cfgelems doesn't exist\n" unless exists $tab2elems{root_cfgelems};
-
-# Override the type for ControlTopic/Deaf, .../Mute so that an empty
-# string is allowed by the configuration validation in spliced
-# (easier than adding a boolean_or_empty to DDSI2 for a quick hack)
-#if (elem["control_topic_cfgelems/deaf"] == "" || elem["control_topic_cfgelems/mute"] == "") {
-# print FILENAME": error: control_topic_cfgelems/{deaf,mute} missing" > "/dev/stderr";
-# exit 1;
-#}
-#elem["control_topic_cfgelems/deaf"] = "LEAF;;1;\"false\";string";
-#elem["control_topic_cfgelems/mute"] = "LEAF;;1;\"false\";string";
-
-print << 'EOT';
-
-
-
-
-EOT
-conv_table_to_xml("cyclonedds_root_cfgelems", " ", "", 1, 0);
-conv_table_to_xml("root_cfgelems", " ", "", 0, 1);
-print << 'EOT';
-
-EOT
-
-while (my ($k, $v) = each %typehint_seen) {
- warn "script warning: type mapping defined for $k but not used" if $v == 0;
-}
diff --git a/src/tools/config/metaconfig.xml b/src/tools/config/metaconfig.xml
deleted file mode 100644
index 1b421ce..0000000
--- a/src/tools/config/metaconfig.xml
+++ /dev/null
@@ -1,1254 +0,0 @@
-
-
-
-
-
-
- 0
-
-
- The General element specifying Domain related settings.
- ]]>
- 0
-
- Domain id this configuration applies to, or "any" if it applies to all domain ids.
- ]]>
- 0
- any
-
-
- This element is used to group a set of channels. The channels are independent data paths through Cyclone DDS and by using separate threads and setting their priorities appropriately, chanenls can be used to map transport priorities to operating system scheduler priorities, ensuring system-wide end-to-end priority preservation.
- ]]>
- 0
-
- This element defines a channel.
- ]]>
-
- This attribute specifies name of this channel. The name should uniquely identify the channel.
- ]]>
- 0
-
-
-
- This attribute sets the transport priority threshold for the channel. Each DCPS data writer has a "transport_priority" QoS and this QoS is used to select a channel for use by this writer. The selected channel is the one with the largest threshold not greater than the writer's transport priority, and if no such channel exists, the channel with the lowest threshold.
- ]]>
- 0
-
-
- This element specifies the maximum transmit rate of auxiliary traffic on this channel (e.g. retransmits, heartbeats, etc). Bandwidth limiting uses a leaky bucket scheme. The default value "inf" means Cyclone DDS imposes no limitation, the underlying operating system and hardware will likely limit the maimum transmit rate.
-The unit must be specified explicitly. Recognised units: Xb/s, Xbps for bits/s or XB/s, XBps for bytes/s; where X is an optional prefix: k for 103, Ki for 210, M for 106, Mi for 220, G for 109, Gi for 230.
- ]]>
- 0
- inf
-
-
- This element specifies the maximum transmit rate of new samples and directly related data, for this channel. Bandwidth limiting uses a leaky bucket scheme. The default value "inf" means Cyclone DDS imposes no limitation, the underlying operating system and hardware will likely limit the maimum transmit rate.
-The unit must be specified explicitly. Recognised units: Xb/s, Xbps for bits/s or XB/s, XBps for bytes/s; where X is an optional prefix: k for 103, Ki for 210, M for 106, Mi for 220, G for 109, Gi for 230.
- ]]>
- 0
- inf
-
-
- This element describes the DiffServ setting the channel will apply to the networking messages. This parameter determines the value of the diffserv field of the IP version 4 packets sent on this channel which allows QoS setting to be applied to the network traffic send on this channel.
-Windows platform support for setting the diffserv field is dependent on the OS version.
-For Windows versions XP SP2 and 2003 to use the diffserv field the following parameter should be added to the register:
-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TcpIp\Parameters\DisableUserTOSSetting
-The type of this parameter is a DWORD and its value should be set to 0 to allow setting of the diffserv field.
-For Windows version 7 or higher a new API (qWAVE) has been introduced. For these platforms the specified diffserv value is mapped to one of the support traffic types.
-The mapping is as follows: 1-8 background traffic; 9-40 excellent traffic; 41-55 audio/video traffic; 56 voice traffic; 57-63 control traffic.
-When an application is run without Administrative priveleges then only the diffserv value of 0, 8, 40 or 56 is allowed.
- ]]>
- 0
-
-
-
-
- The Compatibility elements allows specifying various settings related to compatability with standards and with other DDSI implementations.
- ]]>
- 0
-
- This option assumes ParticipantMessageData endpoints required by the liveliness protocol are present in RTI participants even when not properly advertised by the participant discovery protocol.
- ]]>
- false
-
-
- This element specifies whether QoS settings set to default values are explicitly published in the discovery protocol. Implementations are to use the default value for QoS settings not published, which allows a significant reduction of the amount of data that needs to be exchanged for the discovery protocol, but this requires all implementations to adhere to the default values specified by the specifications.
-When interoperability is required with an implementation that does not follow the specifications in this regard, setting this option to true will help.
- ]]>
- false
-
-
- This option specifies whether a network socket will be created for each domain participant on a host. The specification seems to assume that each participant has a unique address, and setting this option will ensure this to be the case. This is not the defeault.
-Disabling it slightly improves performance and reduces network traffic somewhat. It also causes the set of port numbers needed by Cyclone DDS to become predictable, which may be useful for firewall and NAT configuration.
- ]]>
- false
- true
- single
- none
- many
- single
-
-
- This element sets the level of standards conformance of this instance of the Cyclone DDS Service. Stricter conformance typically means less interoperability with other implementations. Currently three modes are defined:
-- pedantic: very strictly conform to the specification, ultimately for compliancy testing, but currently of little value because it adheres even to what will most likely turn out to be editing errors in the DDSI standard. Arguably, as long as no errata have been published it is the current text that is in effect, and that is what pedantic currently does.
-- strict: a slightly less strict view of the standard than does pedantic: it follows the established behaviour where the standard is obviously in error.
-- lax: attempt to provide the smoothest possible interoperability, anticipating future revisions of elements in the standard in areas that other implementations do not adhere to, even though there is no good reason not to.
-The default setting is "lax".
- ]]>
- lax
- strict
- pedantic
- lax
-
-
-
- The Discovery element allows specifying various parameters related to the discovery of peers.
- ]]>
- 0
-
- This setting controls for how long endpoints discovered via a Cloud discovery service will survive after the discovery service disappeared, allowing reconnect without loss of data when the discovery service restarts (or another instance takes over).
-Valid values are finite durations with an explicit unit or the keyword 'inf' for infinity. Recognised units: ns, us, ms, s, min, hr, day.
- ]]>
- 0
- 30 s
-
-
- This element specifies the default multicast address for all traffic other than participant discovery packets. It defaults to Discovery/SPDPMulticastAddress.
- ]]>
- 0
- auto
-
-
- Do not use.
- ]]>
- true
-
-
- This element specifies the maximum DDSI participant index selected by this instance of the Cyclone DDS service if the Discovery/ParticipantIndex is "auto".
- ]]>
- 9
-
-
- This element specifies the DDSI participant index used by this instance of the Cyclone DDS service for discovery purposes. Only one such participant id is used, independent of the number of actual DomainParticipants on the node. It is either:
-- auto: which will attempt to automatically determine an available participant index (see also Discovery/MaxAutoParticipantIndex), or
-- a non-negative integer less than 120, or
-- none:, which causes it to use arbitrary port numbers for unicast sockets which entirely removes the constraints on the participant index but makes unicast discovery impossible.
-The default is auto. The participant index is part of the port number calculation and if predictable port numbers are needed and fixing the participant index has no adverse effects, it is recommended that the second be option be used.
- ]]>
- 0
- none
-
-
- This element statically configures addresses for discovery.
-Valid values are finite durations with an explicit unit or the keyword 'inf' for infinity. Recognised units: ns, us, ms, s, min, hr, day.
- ]]>
- 0
-
- This element statically configures a fault tolerant group of addresses for discovery. Each member of the group is tried in sequence until one succeeds.
- ]]>
-
- This element statically configures an addresses for discovery.
- ]]>
-
- This element specifies an IP address to which discovery packets must be sent, in addition to the default multicast address (see also General/AllowMulticast). Both a hostnames and a numerical IP address is accepted; the hostname or IP address may be suffixed with :PORT to explicitly set the port to which it must be sent. Multiple Peers may be specified.
- ]]>
- 0
-
-
-
-
-
- This element statically configures an addresses for discovery.
- ]]>
-
- This element specifies an IP address to which discovery packets must be sent, in addition to the default multicast address (see also General/AllowMulticast). Both a hostnames and a numerical IP address is accepted; the hostname or IP address may be suffixed with :PORT to explicitly set the port to which it must be sent. Multiple Peers may be specified.
- ]]>
- 0
-
-
-
-
-
- The Ports element allows specifying various parameters related to the port numbers used for discovery. These all have default values specified by the DDSI 2.1 specification and rarely need to be changed.
- ]]>
-
- This element specifies the base port number (refer to the DDSI 2.1 specification, section 9.6.1, constant PB).
- ]]>
- 1
- 65535
- 7400
-
-
- This element specifies the domain gain, relating domain ids to sets of port numbers (refer to the DDSI 2.1 specification, section 9.6.1, constant DG).
- ]]>
- 250
-
-
- This element specifies the port number for multicast meta traffic (refer to the DDSI 2.1 specification, section 9.6.1, constant d2).
- ]]>
- 1
-
-
- This element specifies the port number for multicast meta traffic (refer to the DDSI 2.1 specification, section 9.6.1, constant d0).
- ]]>
- 0
-
-
- This element specifies the participant gain, relating p0, articipant index to sets of port numbers (refer to the DDSI 2.1 specification, section 9.6.1, constant PG).
- ]]>
- 2
-
-
- This element specifies the port number for unicast meta traffic (refer to the DDSI 2.1 specification, section 9.6.1, constant d3).
- ]]>
- 11
-
-
- This element specifies the port number for unicast meta traffic (refer to the DDSI 2.1 specification, section 9.6.1, constant d1).
- ]]>
- 10
-
-
-
- This element specifies the interval between spontaneous transmissions of participant discovery packets.
-The unit must be specified explicitly. Recognised units: ns, us, ms, s, min, hr, day.
- ]]>
- 0
- 1hr
- 0
- 30 s
-
-
- This element specifies the multicast address that is used as the destination for the participant discovery packets. In IPv4 mode the default is the (standardised) 239.255.0.1, in IPv6 mode it becomes ff02::ffff:239.255.0.1, which is a non-standardised link-local multicast address.
- ]]>
- 0
- 239.255.0.1
-
-
-
- The General element specifies overall Cyclone DDS service settings.
- ]]>
- 0
-
- This element controls whether Cyclone DDS uses multicasts for data traffic.
-It is a comma-separated list of some of the following keywords: "spdp", "asm", "ssm", or either of "false" or "true", or "default".
-
-- spdp: enables the use of ASM (any-source multicast) for participant discovery, joining the multicast group on the discovery socket, transmitting SPDP messages to this group, but never advertising nor using any multicast address in any discovery message, thus forcing unicast communications for all endpoint discovery and user data.
-- asm: enables the use of ASM for all traffic, including receiving SPDP but not transmitting SPDP messages via multicast
-- ssm: enables the use of SSM (source-specific multicast) for all non-SPDP traffic (if supported)
-
-When set to "false" all multicasting is disabled. The default, "true" enables full use of multicasts. Listening for multicasts can be controlled by General/MulticastRecvNetworkInterfaceAddresses.
-"default" maps on spdp if the network is a WiFi network, on true if it is a wired network
- ]]>
- 0
- default
-
-
- This element allows setting the SO_DONTROUTE option for outgoing packets, to bypass the local routing tables. This is generally useful only when the routing tables cannot be trusted, which is highly unusual.
- ]]>
- false
-
-
- This element specifies whether Cyclone DDS allows IP multicast packets to be visible to all DDSI participants in the same node, including itself. It must be "true" for intra-node multicast communications, but if a node runs only a single Cyclone DDS service and does not host any other DDSI-capable programs, it should be set to "false" for improved performance.
- ]]>
- true
-
-
- This element allows explicitly overruling the network address Cyclone DDS advertises in the discovery protocol, which by default is the address of the preferred network interface (General/NetworkInterfaceAddress), to allow Cyclone DDS to communicate across a Network Address Translation (NAT) device.
- ]]>
- 0
- auto
-
-
- This element specifies the network mask of the external network address. This element is relevant only when an external network address (General/ExternalNetworkAddress) is explicitly configured. In this case locators received via the discovery protocol that are within the same external subnet (as defined by this mask) will be translated to an internal address by replacing the network portion of the external address with the corresponding portion of the preferred network interface address. This option is IPv4-only.
- ]]>
- 0
- 0.0.0.0
-
-
- This element specifies the size of DDSI sample fragments generated by Cyclone DDS. Samples larger than FragmentSize are fragmented into fragments of FragmentSize bytes each, except the last one, which may be smaller. The DDSI spec mandates a minimum fragment size of 1025 bytes, but Cyclone DDS will do whatever size is requested, accepting fragments of which the size is at least the minimum of 1025 and FragmentSize.
-The unit must be specified explicitly. Recognised units: B (bytes), kB & KiB (210 bytes), MB & MiB (220 bytes), GB & GiB (230 bytes).
- ]]>
- 0
- 1280 B
-
-
- This element specifies the maximum size of the UDP payload that Cyclone DDS will generate. Cyclone DDS will try to maintain this limit within the bounds of the DDSI specification, which means that in some cases (especially for very low values of MaxMessageSize) larger payloads may sporadically be observed (currently up to 1192 B).
-On some networks it may be necessary to set this item to keep the packetsize below the MTU to prevent IP fragmentation. In those cases, it is generally advisable to also consider reducing Internal/FragmentSize.
-The unit must be specified explicitly. Recognised units: B (bytes), kB & KiB (210 bytes), MB & MiB (220 bytes), GB & GiB (230 bytes).
- ]]>
- 0
- 4096 B
-
-
- This element specifies on which network interfaces Cyclone DDS listens to multicasts. The following options are available:
-
-- all: listen for multicasts on all multicast-capable interfaces; or
-- any: listen for multicasts on the operating system default interface; or
-- preferred: listen for multicasts on the preferred interface (General/NetworkInterfaceAddress); or
-- none: does not listen for multicasts on any interface; or
-- a comma-separated list of network addresses: configures Cyclone DDS to listen for multicasts on all of the listed addresses.
-
-If Cyclone DDS is in IPv6 mode and the address of the preferred network interface is a link-local address, "all" is treated as a synonym for "preferred" and a comma-separated list is treated as "preferred" if it contains the preferred interface and as "none" if not.
- ]]>
- 0
- preferred
-
-
- This element specifies the time-to-live setting for outgoing multicast packets.
- ]]>
- 0
- 255
- 32
-
-
- This element specifies the preferred network interface for use by Cyclone DDS. The preferred network interface determines the IP address that Cyclone DDS advertises in the discovery protocol (but see also General/ExternalNetworkAddress), and is also the only interface over which multicasts are transmitted. The interface can be identified by its IP address, network interface name or network portion of the address. If the value "auto" is entered here, Cyclone DDS will select what it considers the most suitable interface.
- ]]>
- 0
- auto
-
-
- When false (default) Cyclone DDS uses unicast for data whenever there a single unicast suffices. Setting this to true makes it prefer multicasting data, falling back to unicast only when no multicast address is available.
- ]]>
- false
-
-
- This element allows selecting the transport to be used (udp, udp6, tcp, tcp6, raweth)
- ]]>
- 0
- default
-
-
- Deprecated (use Transport instead)
- ]]>
- false
- true
- default
- default
-
-
-
- The Internal elements deal with a variety of settings that evolving and that are not necessarily fully supported. For the vast majority of the Internal settings, the functionality per-se is supported, but the right to change the way the options control the functionality is reserved. This includes renaming or moving options.
- ]]>
- 0
-
- InternalProxy readers that are assumed to sill be retrieving historical data get this many samples retransmitted when they NACK something, even if some of these samples have sequence numbers outside the set covered by the NACK.
- ]]>
- 0
-
-
- InternalThis element controls which network interfaces are assumed to be capable of multicasting even when the interface flags returned by the operating system state it is not (this provides a workaround for some platforms). It is a comma-separated lists of patterns (with ? and * wildcards) against which the interface names are matched.
- ]]>
- 0
-
-
-
- InternalThis setting controls the interval with which a reader will continue NACK'ing missing samples in the absence of a response from the writer, as a protection mechanism against writers incorrectly stopping the sending of HEARTBEAT messages.
-Valid values are finite durations with an explicit unit or the keyword 'inf' for infinity. Recognised units: ns, us, ms, s, min, hr, day.
- ]]>
- 0
- 1 s
-
-
- InternalThis element specifies the maximum transmit rate of auxiliary traffic not bound to a specific channel, such as discovery traffic, as well as auxiliary traffic related to a certain channel if that channel has elected to share this global AuxiliaryBandwidthLimit. Bandwidth limiting uses a leaky bucket scheme. The default value "inf" means Cyclone DDS imposes no limitation, the underlying operating system and hardware will likely limit the maimum transmit rate.
-The unit must be specified explicitly. Recognised units: Xb/s, Xbps for bits/s or XB/s, XBps for bytes/s; where X is an optional prefix: k for 103, Ki for 210, M for 106, Mi for 220, G for 109, Gi for 230.
- ]]>
- 0
- inf
-
-
- InternalThis element controls which participants will have which built-in endpoints for the discovery and liveliness protocols. Valid values are:
-- full: all participants have all endpoints;
-- writers: all participants have the writers, but just one has the readers;
-- minimal: only one participant has built-in endpoints.
-The default is writers, as this is thought to be compliant and reasonably efficient. Minimal may or may not be compliant but is most efficient, and full is inefficient but certain to be compliant. See also Internal/ConservativeBuiltinReaderStartup.
- ]]>
- full
- writers
- minimal
- writers
-
-
- InternalThe ControlTopic element allows configured whether Cyclone DDS provides a special control interface via a predefined topic or not.
- ]]>
-
-
- InternalThis element sets the maximum number of extra threads for an experimental, undocumented and unsupported direct mode.
- ]]>
- 1
-
-
- InternalThis element sets the maximum number of samples that can be defragmented simultaneously for a reliable writer. This has to be large enough to handle retransmissions of historical data in addition to new samples.
- ]]>
- 16
-
-
- InternalThis element sets the maximum number of samples that can be defragmented simultaneously for a best-effort writers.
- ]]>
- 4
-
-
- InternalThis element controls the Maximum size of a delivery queue, expressed in samples. Once a delivery queue is full, incoming samples destined for that queue are dropped until space becomes available again.
- ]]>
- 256
-
-
- InternalThis element enables expensive checks in builds with assertions enabled and is ignored otherwise. Recognised categories are:
- - whc: writer history cache checking
- - rhc: reader history cache checking
- In addition, there is the keyword all that enables all checks.
- ]]>
- 0
-
-
-
- InternalWhen true, include keyhashes in outgoing data for topics with keys.
- ]]>
- false
-
-
- InternalThis elemnents allows configuring the base interval for sending writer heartbeats and the bounds within it can vary.
-Valid values are finite durations with an explicit unit or the keyword 'inf' for infinity. Recognised units: ns, us, ms, s, min, hr, day.
- ]]>
- 0
- 100 ms
-
- InternalThis attribute sets the maximum interval for periodic heartbeats.
-Valid values are finite durations with an explicit unit or the keyword 'inf' for infinity. Recognised units: ns, us, ms, s, min, hr, day.
- ]]>
- 0
- 8 s
-
-
- InternalThis attribute sets the minimum interval that must have passed since the most recent heartbeat from a writer, before another asynchronous (not directly related to writing) will be sent.
-Valid values are finite durations with an explicit unit or the keyword 'inf' for infinity. Recognised units: ns, us, ms, s, min, hr, day.
- ]]>
- 0
- 5 ms
-
-
- InternalThis attribute sets the minimum interval for periodic heartbeats. Other events may still cause heartbeats to go out.
-Valid values are finite durations with an explicit unit or the keyword 'inf' for infinity. Recognised units: ns, us, ms, s, min, hr, day.
- ]]>
- 0
- 20 ms
-
-
-
- InternalAck a sample only when it has been delivered, instead of when committed to delivering it.
- ]]>
- false
-
-
- InternalThis setting controls the default participant lease duration.
-
The unit must be specified explicitly. Recognised units: ns, us, ms, s, min, hr, day.
- ]]>
- 0
- 1hr
- 0
- 10 s
-
-
- InternalThis element controls whether or not implementation should internally monitor its own liveliness. If liveliness monitoring is enabled, stack traces can be dumped automatically when some thread appears to have stopped making progress.
- ]]>
- false
-
- InternalThis element controls the interval at which to check whether threads have been making progress.
-The unit must be specified explicitly. Recognised units: ns, us, ms, s, min, hr, day.
- ]]>
- 100ms
- 1hr
- 0
- 1s
-
-
- InternalThis element controls whether or not to write stack traces to the Cyclone DDS trace when a thread fails to make progress (on select platforms only).
- ]]>
- true
-
-
-
- InternalThis elements configures the maximum number of DCPS domain participants this Cyclone DDS instance is willing to service. 0 is unlimited.
- ]]>
- 0
-
-
- InternalThis setting limits the maximum number of bytes queued for retransmission. The default value of 0 is unlimited unless an AuxiliaryBandwidthLimit has been set, in which case it becomes NackDelay * AuxiliaryBandwidthLimit. It must be large enough to contain the largest sample that may need to be retransmitted.
-The unit must be specified explicitly. Recognised units: B (bytes), kB & KiB (210 bytes), MB & MiB (220 bytes), GB & GiB (230 bytes).
- ]]>
- 0
- 50 kB
-
-
- InternalThis settings limits the maximum number of samples queued for retransmission.
- ]]>
- 200
-
-
- InternalThis setting controls the maximum (CDR) serialised size of samples that Cyclone DDS will forward in either direction. Samples larger than this are discarded with a warning.
-The unit must be specified explicitly. Recognised units: B (bytes), kB & KiB (210 bytes), MB & MiB (220 bytes), GB & GiB (230 bytes).
- ]]>
- 0
- 2147483647 B
-
-
- InternalThis element enables heartbeat-to-ack latency among Cyclone DDS services by prepending timestamps to Heartbeat and AckNack messages and calculating round trip times. This is non-standard behaviour. The measured latencies are quite noisy and are currently not used anywhere.
- ]]>
- false
-
-
- InternalThis setting controls the minimum size of socket receive buffers. The operating system provides some size receive buffer upon creation of the socket, this option can be used to increase the size of the buffer beyond that initially provided by the operating system. If the buffer size cannot be increased to the specified size, an error is reported.
-The default setting is the word "default", which means Cyclone DDS will attempt to increase the buffer size to 1MB, but will silently accept a smaller buffer should that attempt fail.
-The unit must be specified explicitly. Recognised units: B (bytes), kB & KiB (210 bytes), MB & MiB (220 bytes), GB & GiB (230 bytes).
- ]]>
- 0
- default
-
-
- InternalThis setting controls the minimum size of socket send buffers. This setting can only increase the size of the send buffer, if the operating system by default creates a larger buffer, it is left unchanged.
-The unit must be specified explicitly. Recognised units: B (bytes), kB & KiB (210 bytes), MB & MiB (220 bytes), GB & GiB (230 bytes).
- ]]>
- 0
- 64 KiB
-
-
- InternalThis element allows configuring a service that dumps a text description of part the internal state to TCP clients. By default (-1), this is disabled; specifying 0 means a kernel-allocated port is used; a positive number is used as the TCP port number.
- ]]>
- -1
-
-
- InternalThis element controls whether all traffic is handled by a single receive thread or whether multiple receive threads may be used to improve latency. Currently multiple receive threads are only used for connectionless transport (e.g., UDP) and ManySocketsMode not set to single (the default).
- ]]>
- true
-
- InternalReceive threads dedicated to a single socket can only be triggered for termination by sending a packet. Reception of any packet will do, so termination failure due to packet loss is exceedingly unlikely, but to eliminate all risks, it will retry as many times as specified by this attribute before aborting.
- ]]>
- 2000000000
-
-
-
- InternalThis setting controls the delay between receipt of a HEARTBEAT indicating missing samples and a NACK (ignored when the HEARTBEAT requires an answer). However, no NACK is sent if a NACK had been scheduled already for a response earlier than the delay requests: then that NACK will incorporate the latest information.
-The unit must be specified explicitly. Recognised units: ns, us, ms, s, min, hr, day.
- ]]>
- 0
- 1hr
- 0
- 10 ms
-
-
- InternalThis setting controls the delay between the discovering a remote writer and sending a pre-emptive AckNack to discover the range of data available.
-The unit must be specified explicitly. Recognised units: ns, us, ms, s, min, hr, day.
- ]]>
- 0
- 1hr
- 0
- 10 ms
-
-
- InternalThis element sets the maximum size in samples of a primary re-order administration. Each proxy writer has one primary re-order administration to buffer the packet flow in case some packets arrive out of order. Old samples are forwarded to secondary re-order administrations associated with readers in need of historical data.
- ]]>
- 128
-
-
- InternalThis element controls whether retransmits are prioritized over new data, speeding up recovery.
- ]]>
- true
-
-
- InternalThis element controls for how long a remote participant that was previously deleted will remain on a blacklist to prevent rediscovery, giving the software on a node time to perform any cleanup actions it needs to do. To some extent this delay is required internally by Cyclone DDS, but in the default configuration with the 'enforce' attribute set to false, Cyclone DDS will reallow rediscovery as soon as it has cleared its internal administration. Setting it to too small a value may result in the entry being pruned from the blacklist before Cyclone DDS is ready, it is therefore recommended to set it to at least several seconds.
-Valid values are finite durations with an explicit unit or the keyword 'inf' for infinity. Recognised units: ns, us, ms, s, min, hr, day.
- ]]>
- 0
- 10s
-
- InternalThis attribute controls whether the configured time during which recently deleted participants will not be rediscovered (i.e., "black listed") is enforced and following complete removal of the participant in Cyclone DDS, or whether it can be rediscovered earlier provided all traces of that participant have been removed already.
- ]]>
- false
-
-
-
- InternalThis elements controls the addressing and timing of retransmits. Possible values are:
-- never: retransmit only to the NACK-ing reader;
-- adaptive: attempt to combine retransmits needed for reliability, but send historical (transient-local) data to the requesting reader only;
-- always: do not distinguish between different causes, always try to merge.
-The default is never. See also Internal/RetransmitMergingPeriod.
- ]]>
- never
- adaptive
- always
- never
-
-
- InternalThis setting determines the size of the time window in which a NACK of some sample is ignored because a retransmit of that sample has been multicasted too recently. This setting has no effect on unicasted retransmits.
-See also Internal/RetransmitMerging.
-The unit must be specified explicitly. Recognised units: ns, us, ms, s, min, hr, day.
- ]]>
- 0
- 1s
- 0
- 5 ms
-
-
- InternalWhether or not to locally retry pushing a received best-effort sample into the reader caches when resource limits are reached.
- ]]>
- false
-
-
- InternalMaximum pseudo-random delay in milliseconds between discovering a remote participant and responding to it.
-The unit must be specified explicitly. Recognised units: ns, us, ms, s, min, hr, day.
- ]]>
- 0
- 1s
- 0
- 0 ms
-
-
- InternalThis setting allows the timing of scheduled events to be rounded up so that more events can be handled in a single cycle of the event queue. The default is 0 and causes no rounding at all, i.e. are scheduled exactly, whereas a value of 10ms would mean that events are rounded up to the nearest 10 milliseconds.
-The unit must be specified explicitly. Recognised units: ns, us, ms, s, min, hr, day.
- ]]>
- 0
- 1hr
- 0
- 0 ms
-
-
- InternalThis element sets the maximum size in samples of a secondary re-order administration. The secondary re-order administration is per reader in need of historical data.
- ]]>
- 128
-
-
- InternalThis element controls whether the actual sending of packets occurs on the same thread that prepares them, or is done asynchronously by another thread.
- ]]>
- false
-
-
- InternalThis element controls whether Cyclone DDS advertises all the domain participants it serves in DDSI (when set to false), or rather only one domain participant (the one corresponding to the Cyclone DDS process; when set to true). In the latter case Cyclone DDS becomes the virtual owner of all readers and writers of all domain participants, dramatically reducing discovery traffic (a similar effect can be obtained by setting Internal/BuiltinEndpointSet to "minimal" but with less loss of information).
- ]]>
- false
-
-
- InternalThis element controls whether samples sent by a writer with QoS settings transport_priority >= SynchronousDeliveryPriorityThreshold and a latency_budget at most this element's value will be delivered synchronously from the "recv" thread, all others will be delivered asynchronously through delivery queues. This reduces latency at the expense of aggregate bandwidth.
-Valid values are finite durations with an explicit unit or the keyword 'inf' for infinity. Recognised units: ns, us, ms, s, min, hr, day.
- ]]>
- 0
- inf
-
-
- InternalThis element controls whether samples sent by a writer with QoS settings latency_budget <= SynchronousDeliveryLatencyBound and transport_priority greater than or equal to this element's value will be delivered synchronously from the "recv" thread, all others will be delivered asynchronously through delivery queues. This reduces latency at the expense of aggregate bandwidth.
- ]]>
- 0
-
-
- InternalTesting options.
- ]]>
-
- InternalThis element controls the fraction of outgoing packets to drop, specified as samples per thousand.
- ]]>
- 0
-
-
-
- InternalThis element controls whether the response to a newly discovered participant is sent as a unicasted SPDP packet, instead of rescheduling the periodic multicasted one. There is no known benefit to setting this to false.
- ]]>
- true
-
-
- InternalDo not use.
- ]]>
- 0
-
-
- InternalWatermarks for flow-control.
- ]]>
-
- InternalThis element controls whether Cyclone DDS will adapt the high-water mark to current traffic conditions, based on retransmit requests and transmit pressure.
- ]]>
- true
-
-
- InternalThis element sets the maximum allowed high-water mark for the Cyclone DDS WHCs, expressed in bytes. A writer is suspended when the WHC reaches this size.
-The unit must be specified explicitly. Recognised units: B (bytes), kB & KiB (210 bytes), MB & MiB (220 bytes), GB & GiB (230 bytes).
- ]]>
- 0
- 100 kB
-
-
- InternalThis element sets the initial level of the high-water mark for the Cyclone DDS WHCs, expressed in bytes.
-The unit must be specified explicitly. Recognised units: B (bytes), kB & KiB (210 bytes), MB & MiB (220 bytes), GB & GiB (230 bytes).
- ]]>
- 0
- 30 kB
-
-
- InternalThis element sets the low-water mark for the Cyclone DDS WHCs, expressed in bytes. A suspended writer resumes transmitting when its Cyclone DDS WHC shrinks to this size.
-The unit must be specified explicitly. Recognised units: B (bytes), kB & KiB (210 bytes), MB & MiB (220 bytes), GB & GiB (230 bytes).
- ]]>
- 0
- 1 kB
-
-
-
- InternalThis element enables the batching of write operations. By default each write operation writes through the write cache and out onto the transport. Enabling write batching causes multiple small write operations to be aggregated within the write cache into a single larger write. This gives greater throughput at the expense of latency. Currently there is no mechanism for the write cache to automatically flush itself, so that if write batching is enabled, the application may havee to use the dds_write_flush function to ensure thta all samples are written.
- ]]>
- false
-
-
- InternalThis setting controls the maximum duration for which actual deletion of a reliable writer with unacknowledged data in its history will be postponed to provide proper reliable transmission.
-
The unit must be specified explicitly. Recognised units: ns, us, ms, s, min, hr, day.
- ]]>
- 0
- 1hr
- 0
- 1 s
-
-
-
- The Partitioning element specifies Cyclone DDS network partitions and how DCPS partition/topic combinations are mapped onto the network partitions.
- ]]>
- 0
-
- The IgnoredPartitions element specifies DCPS partition/topic combinations that are not distributed over the network.
- ]]>
-
- This element can be used to prevent certain combinations of DCPS partition and topic from being transmitted over the network. Cyclone DDS will complete ignore readers and writers for which all DCPS partitions as well as their topic is ignored, not even creating DDSI readers and writers to mirror the DCPS ones.
- ]]>
-
- This attribute specifies a partition and a topic expression, separated by a single '.', that are used to determine if a given partition and topic will be ignored or not. The expressions may use the usual wildcards '*' and '?'. Cyclone DDS will consider an wildcard DCPS partition to match an expression iff there exists a string that satisfies both expressions.
- ]]>
- 0
-
-
-
-
-
- The NetworkPartitions element specifies the Cyclone DDS network partitions.
- ]]>
-
- This element defines a Cyclone DDS network partition.
- ]]>
-
- This attribute specifies the multicast addresses associated with the network partition as a comma-separated list. Readers matching this network partition (cf. Partitioning/PartitionMappings) will listen for multicasts on all of these addresses and advertise them in the discovery protocol. The writers will select the most suitable address from the addresses advertised by the readers.
- ]]>
- 0
-
-
-
- This attribute is a placeholder.
- ]]>
- true
-
-
- This attribute specifies the name of this Cyclone DDS network partition. Two network partitions cannot have the same name.
- ]]>
- 0
-
-
-
- This attribute selects the Cyclone DDS security profile for encrypting the traffic mapped to this Cyclone DDS network partition. The default "null" means the network partition is unsecured; any other name refers to a security profile defined using the Security/SecurityProfile elements.
- ]]>
- 0
- null
-
-
-
-
- The PartitionMappings element specifies the mapping from DCPS partition/topic combinations to Cyclone DDS network partitions.
- ]]>
-
- This element defines a mapping from a DCPS partition/topic combination to a Cyclone DDS network partition. This allows partitioning data flows by using special multicast addresses for part of the data and possibly also encrypting the data flow.
- ]]>
-
- This attribute specifies a partition and a topic expression, separated by a single '.', that are used to determine if a given partition and topic maps to the Cyclone DDS network partition named by the NetworkPartition attribute in this PartitionMapping element. The expressions may use the usual wildcards '*' and '?'. Cyclone DDS will consider a wildcard DCPS partition to match an expression if there exists a string that satisfies both expressions.
- ]]>
- 0
-
-
-
- This attribute specifies which Cyclone DDS network partition is to be used for DCPS partition/topic combinations matching the DCPSPartitionTopic attribute within this PartitionMapping element.
- ]]>
- 0
-
-
-
-
-
-
- The SSL element allows specifying various parameters related to using SSL/TLS for DDSI over TCP.
- ]]>
- 0
-
- If disabled this allows SSL connections to occur even if an X509 certificate fails verification.
- ]]>
- true
-
-
- The set of ciphers used by SSL/TLS
- ]]>
- 0
- ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH
-
-
- This enables SSL/TLS for TCP.
- ]]>
- false
-
-
- The SSL/TLS random entropy file name.
- ]]>
- 0
-
-
-
- The SSL/TLS key pass phrase for encrypted keys.
- ]]>
- 0
- secret
-
-
- The SSL/TLS key and certificate store file name. The keystore must be in PEM format.
- ]]>
- 0
- keystore
-
-
- The minimum TLS version that may be negotiated, valid values are 1.2 and 1.3.
- ]]>
- 0
- 1.3
-
-
- This enables the use of self signed X509 certificates.
- ]]>
- false
-
-
- This enables an SSL server checking the X509 certificate of a connecting client.
- ]]>
- true
-
-
-
- The Security element specifies Cyclone DDS security profiles that can be used to encrypt traffic mapped to Cyclone DDS network partitions.
- ]]>
- 0
-
- This element defines a Cyclone DDS security profile.
- ]]>
-
- This attribute specifies the cipher to be used for encrypting traffic over network partitions secured by this security profile. The possible ciphers are:
-- aes128: AES with a 128-bit key;
-- aes192: AES with a 192-bit key;
-- aes256: AES with a 256-bit key;
-- blowfish: the Blowfish cipher with a 128 bit key;
-- null: no encryption;
-SHA1 is used on conjunction with all ciphers except "null" to ensure data integrity.
- ]]>
- null
- blowfish
- aes128
- aes192
- aes256
- null
-
-
- The CipherKey attribute is used to define the secret key required by the cipher selected using the Cipher attribute. The value can be a URI referencing an external file containing the secret key, or the secret key can be defined in-place as a string value.
-The key must be specified as a hexadecimal string with each character representing 4 bits of the key. E.g., 1ABC represents the 16-bit key 0001 1010 1011 1100. The key should not follow a well-known pattern and must exactly match the key length of the selected cipher.
-A malformed key will cause the security profile to be marked as invalid, and disable all network partitions secured by the (invalid) security profile to prevent information leaks.
-As all DDS applications require read access to the XML configuration file, for security reasons it is recommended to store the secret key in an external file in the file system, referenced by its URI. The file should be protected against read and write access from other users on the host.
- ]]>
- 0
-
-
-
- This attribute specifies the name of this Cyclone DDS security profile. Two security profiles cannot have the same name.
- ]]>
- 0
-
-
-
-
-
- The Sizing element specifies a variety of configuration settings dealing with expected system sizes, buffer sizes, &c.
- ]]>
- 0
-
- This element specifies the size of one allocation unit in the receive buffer. Must be greater than the maximum packet size by a modest amount (too large packets are dropped). Each allocation is shrunk immediately after processing a message, or freed straightaway.
-The unit must be specified explicitly. Recognised units: B (bytes), kB & KiB (210 bytes), MB & MiB (220 bytes), GB & GiB (230 bytes).
- ]]>
- 0
- 128 KiB
-
-
- This element sets the size of a single receive buffer. Many receive buffers may be needed. The minimum workable size a little bit larger than Sizing/ReceiveBufferChunkSize, and the value used is taken as the configured value and the actual minimum workable size.
-The unit must be specified explicitly. Recognised units: B (bytes), kB & KiB (210 bytes), MB & MiB (220 bytes), GB & GiB (230 bytes).
- ]]>
- 0
- 1 MiB
-
-
-
- The TCP element allows specifying various parameters related to running DDSI over TCP.
- ]]>
- 0
-
- Setting this to true means the unicast addresses in SPDP packets will be ignored and the peer address from the TCP connection will be used instead. This may help work around incorrectly advertised addresses when using TCP.
- ]]>
- false
-
-
- This element enables the optional TCP transport - deprecated, use General/Transport instead.
- ]]>
- false
- true
- default
- default
-
-
- This element enables the TCP_NODELAY socket option, preventing multiple DDSI messages being sent in the same TCP request. Setting this option typically optimises latency over throughput.
- ]]>
- true
-
-
- This element specifies the TCP port number on which Cyclone DDS accepts connections. If the port is set it is used in entity locators, published with DDSI discovery. Dynamically allocated if zero. Disabled if -1 or not configured. If disabled other DDSI services will not be able to establish connections with the service, the service can only communicate by establishing connections to other services.
- ]]>
- -1
- 65535
- -1
-
-
- This element specifies the timeout for blocking TCP read operations. If this timeout expires then the connection is closed.
-The unit must be specified explicitly. Recognised units: ns, us, ms, s, min, hr, day.
- ]]>
- 0
- 1hr
- 0
- 2 s
-
-
- This element specifies the timeout for blocking TCP write operations. If this timeout expires then the connection is closed.
-The unit must be specified explicitly. Recognised units: ns, us, ms, s, min, hr, day.
- ]]>
- 0
- 1hr
- 0
- 2 s
-
-
-
- The ThreadPool element allows specifying various parameters related to using a thread pool to send DDSI messages to multiple unicast addresses (TCP or UDP).
- ]]>
- 0
-
- This element enables the optional thread pool.
- ]]>
- false
-
-
- This elements configures the maximum number of threads in the thread pool.
- ]]>
- 8
-
-
- This elements configures the initial number of threads in the thread pool.
- ]]>
- 4
-
-
-
- This element is used to set thread properties.
- ]]>
- 0
-
- This element is used to set thread properties.
- ]]>
-
- The Name of the thread for which properties are being set. The following threads exist:
-- gc: garbage collector thread involved in deleting entities;
-- recv: receive thread, taking data from the network and running the protocol state machine;
-- dq.builtins: delivery thread for DDSI-builtin data, primarily for discovery;
-- lease: DDSI liveliness monitoring;
-- tev: general timed-event handling, retransmits and discovery;
-- xmit.CHAN: transmit thread for channel CHAN;
-- dq.CHAN: delivery thread for channel CHAN;
-- tev.CHAN: timed-even thread for channel CHAN.
- ]]>
- 0
-
-
-
- This element configures the scheduling properties of the thread.
- ]]>
- 0
-
- This element specifies the thread scheduling class (realtime, timeshare or default). The user may need special privileges from the underlying operating system to be able to assign some of the privileged scheduling classes.
- ]]>
- realtime
- timeshare
- default
- default
-
-
- This element specifies the thread priority (decimal integer or default). Only priorities that are supported by the underlying operating system can be assigned to this element. The user may need special privileges from the underlying operating system to be able to assign some of the privileged priorities.
- ]]>
- 0
- default
-
-
-
- This element configures the stack size for this thread. The default value default leaves the stack size at the operating system default.
-The unit must be specified explicitly. Recognised units: B (bytes), kB & KiB (210 bytes), MB & MiB (220 bytes), GB & GiB (230 bytes).
- ]]>
- 0
- default
-
-
-
-
- The Tracing element controls the amount and type of information that is written into the tracing log by the DDSI service. This is useful to track the DDSI service during application development.
- ]]>
- 0
-
- This option specifies whether the output is to be appended to an existing log file. The default is to create a new log file each time, which is generally the best option if a detailed log is generated.
- ]]>
- false
-
-
- This element enables individual logging categories. These are enabled in addition to those enabled by Tracing/Verbosity. Recognised categories are:
-- fatal: all fatal errors, errors causing immediate termination
-- error: failures probably impacting correctness but not necessarily causing immediate termination
-- warning: abnormal situations that will likely not impact correctness
-- config: full dump of the configuration
-- info: general informational notices
-- discovery: all discovery activity
-- data: include data content of samples in traces
-- radmin: receive buffer administration
-- timing: periodic reporting of CPU loads per thread
-- traffic: periodic reporting of total outgoing data
-- whc: tracing of writer history cache changes
-- tcp: tracing of TCP-specific activity
-- topic: tracing of topic definitions
-- >i>plist: tracing of discovery parameter list interpretation
-In addition, there is the keyword trace that enables all but radmin, topic, plist and whc
.
-The categorisation of tracing output is incomplete and hence most of the verbosity levels and categories are not of much use in the current release. This is an ongoing process and here we describe the target situation rather than the current situation. Currently, the most useful is trace.
- ]]>
- 0
-
-
-
- This option specifies where the logging is printed to. Note that stdout and stderr are treated as special values, representing "standard out" and "standard error" respectively. No file is created unless logging categories are enabled using the Tracing/Verbosity or Tracing/EnabledCategory settings.
- ]]>
- 0
- cyclonedds.log
-
-
- This option specifies the file to which received and sent packets will be logged in the "pcap" format suitable for analysis using common networking tools, such as WireShark. IP and UDP headers are ficitious, in particular the destination address of received packets. The TTL may be used to distinguish between sent and received packets: it is 255 for sent packets and 128 for received ones. Currently IPv4 only.
- ]]>
- 0
-
-
-
- This element enables standard groups of categories, based on a desired verbosity level. This is in addition to the categories enabled by the Tracing/EnableCategory setting. Recognised verbosity levels and the categories they map to are:
-- none: no Cyclone DDS log
-- severe: error and fatal
-- warning: severe + warning
-- info: warning + info
-- config: info + config
-- fine: config + discovery
-- finer: fine + traffic and timing
-- finest: finer + trace
-While none prevents any message from being written to a Cyclone DDS log file.
-The categorisation of tracing output is incomplete and hence most of the verbosity levels and categories are not of much use in the current release. This is an ongoing process and here we describe the target situation rather than the current situation. Currently, the most useful verbosity levels are config, fine and finest.
- ]]>
- finest
- finer
- fine
- config
- info
- warning
- severe
- none
- none
-
-
-
-
diff --git a/src/tools/config/metaconfig.xsd b/src/tools/config/metaconfig.xsd
deleted file mode 100644
index 80e94b6..0000000
--- a/src/tools/config/metaconfig.xsd
+++ /dev/null
@@ -1,289 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/tools/config/org/eclipse/cyclonedds/common/controller/AssignmentResult.java b/src/tools/config/org/eclipse/cyclonedds/common/controller/AssignmentResult.java
deleted file mode 100644
index 3968450..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/common/controller/AssignmentResult.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-package org.eclipse.cyclonedds.common.controller;
-
-/**
- * Represents a result for assignment of a value to a certain field.
- *
- * @date Nov 25, 2004
- */
-public class AssignmentResult{
- private boolean valid;
- private String errorMessage;
-
- /**
- * Constructs a new AssignMentResult.
- *
- * @param _success true if validation succeeded, false otherwise.
- * @param _errorMessage null when validation succeeded, the failure
- * reason otherwise.
- */
- public AssignmentResult(boolean _success, String _errorMessage){
- valid = _success;
- errorMessage = _errorMessage;
- }
-
- /**
- * Provides access to errorMessage.
- *
- * @return Returns the errorMessage.
- */
- public String getErrorMessage() {
- return errorMessage;
- }
- /**
- * Provides access to valid.
- *
- * @return Returns the valid.
- */
- public boolean isValid() {
- return valid;
- }
-}
diff --git a/src/tools/config/org/eclipse/cyclonedds/common/util/Config.java b/src/tools/config/org/eclipse/cyclonedds/common/util/Config.java
deleted file mode 100644
index ab41971..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/common/util/Config.java
+++ /dev/null
@@ -1,404 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-/**
- * Contains all SPLICE DDS C&M Tooling utilities.
- */
-package org.eclipse.cyclonedds.common.util;
-
-import java.awt.Color;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Iterator;
-import java.util.Properties;
-
-import org.eclipse.cyclonedds.common.view.CommonFileChooser;
-
-/**
- * Supplies a generic configuration utility for all kinds of applications.
- * Before using the load or loadDefault function must be called.
- *
- * @date Oct 25, 2004
- */
-public class Config {
-
- /**
- * The current configuration.
- */
- private Properties config = null;
-
- /**
- * The location of the configuration.
- */
- private File configFile = null;
-
- /**
- * The validator.
- */
- private ConfigValidator validator = null;
-
- private CommonFileChooser chooser = null;
-
- private static volatile Config instance = null;
-
- private static Color warningColor = null;
- private static Color errorColor = null;
- private static Color sensitiveColor = null;
- private static Color inactiveColor = null;
- private static Color activeColor = null;
- private static Color inputColor = null;
- private static Color incorrectColor = null;
-
- private Config(){}
-
- public static Config getInstance(){
- if(instance == null){
- instance = new Config();
- }
- return instance;
- }
-
- /**
- * Assigns the supplied validator to the configuration. It will use this
- * validator when calling: - load --> call validateValue on each found key.
- * - loadDefault --> call validateValue on each found key. - getProperty ->
- * call getDefaultValue when a supplied kay has no value. - setProperty -->
- * call isValueValid on the supplied key/value combination.
- *
- * @param _validator
- * The validator to assign.
- */
- public void setValidator(ConfigValidator _validator){
- validator = _validator;
- }
-
- /**
- * Provides access to the current configuration validator.
- *
- * @return The current validator or null if none has been assigned.
- */
- public ConfigValidator getValidator(){
- return validator;
- }
-
- /**
- * Provides access to the current configuration properties.
- *
- * @return The current config properties or null if none has been assigned.
- */
- public Properties getConfig() {
- return config;
- }
-
- /**
- * Loads the configuration from the supplied URI.
- *
- * @param uri
- * The URI to load the configuration from.
- * @return true if the configuration was successfully loaded, false
- * otherwise.
- */
- public boolean load(String uri) {
- String value;
- boolean result = false;
- FileInputStream fis = null;
-
- try {
- uri = uri.replaceAll(" ", "%20");
- URI location = new URI(uri);
- configFile = new File(location);
- config = new Properties();
- fis = new FileInputStream(configFile);
- config.load(fis);
- Properties newConfig = new Properties();
- if(validator != null){
-
- for (Object key : config.keySet()) {
- value = config.getProperty((String) key);
- value = validator.getValidatedValue((String) key, value);
- if (value != null) {
- newConfig.setProperty((String) key, value);
- }
- }
- }
- config.putAll(newConfig);
- result = true;
- } catch (FileNotFoundException e1) {
- Report.getInstance().writeErrorLog("Configuration file could not be found.");
- } catch (IOException e1) {
- Report.getInstance().writeErrorLog("Configuration file could not be read.");
- } catch (URISyntaxException e) {
- Report.getInstance().writeErrorLog("Supplied URI not valid.");
- } finally {
- if (fis != null) {
- try {
- fis.close();
- } catch (IOException ie) {
- Report.getInstance().writeErrorLog("Configuration file could not be read.");
- }
- }
- }
- return result;
- }
-
- /**
- * Provides access to the value of the supplied property.
- *
- * @param key
- * The name of the property.
- * @return The value of the property or null if it was not available.
- */
- public String getProperty(String key){
- String result = null;
-
- if(config != null){
- if(config.containsKey(key)){
- result = config.getProperty(key);
- } else if(validator != null){
- result = validator.getDefaultValue(key);
-
- if(result != null){
- config.setProperty(key, result);
- }
- }
- }
- return result;
- }
-
- /**
- * Assigns the supplied value to the supplied property.
- *
- * @param key
- * The name of the property.
- * @param value
- * The value of the property.
- * @return true if it could be assigned, false otherwise.
- */
- public boolean setProperty(String key, String value){
- boolean result = false;
-
- if(config != null){
- if(validator != null){
- result = validator.isValueValid(key, value);
-
- if(result){
- config.setProperty(key, value);
- this.store();
- }
- } else {
- config.setProperty(key, value);
- this.store();
- }
- result = true;
- }
- return result;
- }
-
- public boolean isPropertyValid(String key, String value){
- boolean result = false;
-
- if((config != null) && (validator != null)){
- result = validator.isValueValid(key, value);
- }
- return result;
- }
-
- /**
- * Removes the supplied property from the configuration.
- *
- * @param key
- * The name of the property to remove.
- * @return true if succeeded, false otherwise.
- */
- public boolean removeProperty(String key){
- boolean result = false;
-
- if(config != null){
- Object value = config.remove(key);
-
- if(value != null){
- result = true;
- }
- }
- return result;
- }
-
- /**
- * Prints the configuration to screen.
- */
- public void list(){
- if(config != null){
- config.list(System.out);
- }
- }
-
- /**
- * Stores the configuration to disk.
- *
- * @return true if succeeded, false otherwise.
- */
- public boolean store(){
- boolean result = false;
- FileOutputStream fos = null;
-
- if(config != null){
- try {
- fos = new FileOutputStream(configFile);
- config.store(fos, null);
- result = true;
- } catch (IOException e) {
- Report.getInstance().writeErrorLog("Configuration could not be saved.");
- } finally {
- if (fos != null) {
- try {
- fos.close();
- } catch (IOException ie) {
- Report.getInstance().writeErrorLog("Configuration could not be saved.");
- }
- }
- }
- }
- return result;
- }
-
- /**
- * Stores the configuration to the supplied uri.
- *
- * @return true if succeeded, false otherwise.
- */
- public boolean store(String uri){
- boolean result = false;
- FileOutputStream fos = null;
-
- if(config != null){
- try {
- Report.getInstance().writeInfoLog("Storing configuration to URI: " +
- configFile.toURI().getScheme() +
- configFile.toURI().getPath() + ".");
- uri = uri.replaceAll(" ", "%20");
- URI outURI = new URI(uri);
- File outFile = new File(outURI);
- boolean fileCreated = true;
-
- if(!(outFile.exists())){
- fileCreated = outFile.createNewFile();
- }
- if (fileCreated) {
- fos = new FileOutputStream(outFile);
- config.store(fos, null);
- } else {
- Report.getInstance().writeErrorLog("Configuration could not be saved. file could not be created");
- result = false;
- }
- } catch (IOException e) {
- Report.getInstance().writeErrorLog("Configuration could not be saved.");
- } catch (URISyntaxException e) {
- Report.getInstance().writeErrorLog("Configuration could not be saved.");
- } finally {
- if (fos != null) {
- try {
- fos.close();
- } catch (IOException ie) {
- Report.getInstance().writeErrorLog("Configuration could not be saved.");
- }
- }
- }
- }
- return result;
- }
-
- public CommonFileChooser getFileChooser(){
- if(this.chooser == null){
- this.chooser = new CommonFileChooser(".");
- }
- return this.chooser;
- }
-
- public static Color getErrorColor(){
- if(errorColor == null){
- int r = Integer.parseInt("a0", 16);
- int g = Integer.parseInt("20", 16);
- int b = Integer.parseInt("20", 16);
-
- r = Integer.parseInt("ff", 16);
- g = Integer.parseInt("40", 16);
- b = Integer.parseInt("40", 16);
-
- errorColor = new Color(r, g, b);
- }
- return errorColor;
- }
-
- public static Color getWarningColor(){
- if(warningColor == null){
- int r = Integer.parseInt("c0", 16);
- int g = Integer.parseInt("80", 16);
- int b = Integer.parseInt("00", 16);
- warningColor = new Color(r, g, b);
- }
- return warningColor;
- }
-
- public static Color getSensitiveColor(){
- if(sensitiveColor == null){
- int r = Integer.parseInt("70", 16);
- int g = Integer.parseInt("e0", 16);
- int b = Integer.parseInt("70", 16);
- sensitiveColor = new Color(r, g, b);
- }
- return sensitiveColor;
- }
-
- public static Color getInactiveColor(){
- if(inactiveColor == null){
- int r = Integer.parseInt("70", 16);
- int g = Integer.parseInt("70", 16);
- int b = Integer.parseInt("7a", 16);
- inactiveColor = new Color(r, g, b);
- }
- return inactiveColor;
- }
-
- public static Color getActiveColor(){
- if(activeColor == null){
- int r = Integer.parseInt("50", 16);
- int g = Integer.parseInt("90", 16);
- int b = Integer.parseInt("50", 16);
- activeColor = new Color(r, g, b);
- }
- return activeColor;
- }
-
- public static Color getInputColor(){
- if(inputColor == null){
- int r = Integer.parseInt("f0", 16);
- int g = Integer.parseInt("90", 16);
- int b = Integer.parseInt("00", 16);
- inputColor = new Color(r, g, b);
- }
- return inputColor;
- }
-
- public static Color getIncorrectColor(){
- if(incorrectColor == null){
- int r = Integer.parseInt("ff", 16);
- int g = Integer.parseInt("40", 16);
- int b = Integer.parseInt("40", 16);
- incorrectColor = new Color(r, g, b);
- }
- return incorrectColor;
- }
-}
diff --git a/src/tools/config/org/eclipse/cyclonedds/common/util/ConfigValidator.java b/src/tools/config/org/eclipse/cyclonedds/common/util/ConfigValidator.java
deleted file mode 100644
index 138dc80..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/common/util/ConfigValidator.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-package org.eclipse.cyclonedds.common.util;
-
-/**
- * Interface that provides routines for validating configuration.
- * Implementations of this interface can guarantee that the configuration for
- * an application will be correct.
- *
- * @date Jan 12, 2005
- */
-public interface ConfigValidator {
- /**
- * Returns the correct value for the supplied key. This function
- * checks if the supplied value is valid. If so, return that value. If not
- * return a valid one. The Config component calls this routine for each
- * key it finds when loading a configuration file.
- *
- * @param key The key in the configuration.
- * @param value The value as it has been found in the confuration file.
- * @return A correct value for that key. If null is returned, the Config
- * component will remove the key from the configuration.
- */
- public String getValidatedValue(String key, String value);
-
- /**
- * Returns the default value for the supplied key. This function is called
- * by the Config component when an application asks for a property that has
- * not been defined.
- *
- * @param key The key where to resolve the default value of.
- * @return The default value for the supplied key.
- */
- public String getDefaultValue(String key);
-
- /**
- * Checks whether the supplied key/value combination is valid. The Config
- * component calls this function when an application sets a property in the
- * configuration.
- *
- * @param key The key of the property.
- * @param value The value of the property.
- * @return If the combination is valid; true and false otherwise.
- */
- public boolean isValueValid(String key, String value);
-}
diff --git a/src/tools/config/org/eclipse/cyclonedds/common/util/Initializer.java b/src/tools/config/org/eclipse/cyclonedds/common/util/Initializer.java
deleted file mode 100644
index 8123553..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/common/util/Initializer.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-package org.eclipse.cyclonedds.common.util;
-
-import java.awt.Component;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.util.StringTokenizer;
-import java.util.logging.LogManager;
-
-import javax.swing.JOptionPane;
-
-/**
- * Base class for tooling initializers. Its responsibilities are to initialize
- * logging facilities according to commandline parameters.
- *
- * @date Sep 1, 2004
- */
-public class Initializer {
-
- /**
- * Initializes the application, using the configuration that is supplied as
- * argument. If the supplied file does not exist or no argument was
- * supplied, the default is used. The default is:
- * /.splice_tooling.properties.
- *
- * @param args
- * The list of arguments supplied by the user. Only the first
- * argument is used, the rest will be ignored. The first argument
- * must supply the location of a java properties file.
- */
- public void initializeConfig(String[] args, ConfigValidator validator){
- boolean result = false;
-
- Config.getInstance().setValidator(validator);
-
- if(args.length > 0){
- Report.getInstance().writeInfoLog("Reading configuration from " + args[0] + ".");
- result = Config.getInstance().load(args[0]);
- }
-
- if(!result){
- Report.getInstance().writeInfoLog("Default configuration could not be read.");
- } else {
- String loggingFileName = Config.getInstance().getProperty("logging");
-
- if(loggingFileName != null){
- FileInputStream is = null;
- try {
- is = new FileInputStream(loggingFileName);
- LogManager.getLogManager().readConfiguration(is);
- }
- catch (FileNotFoundException e) {
- Report.getInstance().writeInfoLog("Specified logging config file not found. Logging is disabled.");
- LogManager.getLogManager().reset();
- }
- catch (SecurityException e) {
- Report.getInstance().writeInfoLog("Specified logging config file not valid. Logging is disabled.");
- LogManager.getLogManager().reset();
- }
- catch (IOException e) {
- Report.getInstance().writeInfoLog("Specified logging config file not valid. Logging is disabled.");
- LogManager.getLogManager().reset();
- } finally {
- if (is != null) {
- try {
- is.close();
- } catch (IOException ie) {
- Report.getInstance().writeInfoLog("Specified logging config file not valid. Logging is disabled.");
- LogManager.getLogManager().reset();
- }
- }
- }
- } else {
- LogManager.getLogManager().reset();
- }
- }
- }
-}
diff --git a/src/tools/config/org/eclipse/cyclonedds/common/util/Report.java b/src/tools/config/org/eclipse/cyclonedds/common/util/Report.java
deleted file mode 100644
index d394829..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/common/util/Report.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-package org.eclipse.cyclonedds.common.util;
-
-import java.io.IOException;
-import java.util.logging.FileHandler;
-import java.util.logging.Handler;
-import java.util.logging.Level;
-import java.util.logging.LogManager;
-import java.util.logging.Logger;
-import java.util.logging.SimpleFormatter;
-
-public class Report {
-
- private static Report reportObject = new Report();
- static Logger errorLog;
- static Logger infoLog;
-
- private String errorLogFile = null;
- private int errorSize = 0;
- private int errorCount = 0;
- private boolean errorAppend = false;
-
- private String infoLogFile = null;
- private int infoSize = 0;
- private int infoCount = 0;
- private boolean infoAppend = false;
-
- private Handler errorHandler;
- private Handler infoHandler;
-
- private boolean consoleOutput = false;
-
- /**
- * A private Constructor prevents any other class from instantiating.
- *
- * @return
- */
- private Report() {
- errorLog = Logger.getAnonymousLogger();
- infoLog = Logger.getAnonymousLogger();
- }
-
- public static Report getInstance() {
- return reportObject;
- }
-
- public void initializeInfo(String infoLogFile, int size, int nrOfLogFiles, boolean append) {
- this.infoLogFile = infoLogFile;
- this.infoSize = size;
- this.infoCount = nrOfLogFiles;
- this.infoAppend = append;
- }
-
- public void initializeError(String errorLogFile, int size, int nrOfLogFiles, boolean append) {
- this.errorLogFile = errorLogFile;
- this.errorSize = size;
- this.errorCount = nrOfLogFiles;
- this.errorAppend = append;
- }
-
- public void initializeConsole() {
- consoleOutput = true;
- }
-
- public void writeInfoLog(String message) {
- if (!consoleOutput) {
- if (infoHandler == null && infoLogFile != null) {
- try {
- infoHandler = new FileHandler(infoLogFile, infoSize, infoCount, infoAppend);
- infoHandler.setFormatter(new SimpleFormatter());
- infoLog.addHandler(infoHandler);
- LogManager logManager = LogManager.getLogManager();
- logManager.reset();
- } catch (IOException e) {
- System.err.println("Could not redirect error and/or info output.");
- }
-
- }
- infoLog.info(message);
- } else {
- System.out.println(message);
- }
-
- }
-
- public void writeErrorLog(String message) {
- if (!consoleOutput) {
- if (errorHandler == null && errorLogFile != null) {
- try {
- errorHandler = new FileHandler(errorLogFile, errorSize, errorCount, errorAppend);
- errorHandler.setFormatter(new SimpleFormatter());
- errorLog.addHandler(errorHandler);
- LogManager logManager = LogManager.getLogManager();
- logManager.reset();
- } catch (IOException e) {
- System.err.println("Could not redirect error and/or info output.");
- }
- }
- errorLog.log(Level.SEVERE, message);
- } else {
- System.err.println(message);
- }
- }
-
- public void CloseHandlers() {
- if (errorHandler != null) {
- errorHandler.close();
- }
- if (infoHandler != null) {
- infoHandler.close();
- }
- }
-
-}
diff --git a/src/tools/config/org/eclipse/cyclonedds/common/view/CommonFileChooser.java b/src/tools/config/org/eclipse/cyclonedds/common/view/CommonFileChooser.java
deleted file mode 100644
index ec33664..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/common/view/CommonFileChooser.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-package org.eclipse.cyclonedds.common.view;
-
-import java.awt.BorderLayout;
-import java.awt.Component;
-import java.awt.Container;
-import java.awt.event.WindowAdapter;
-import java.awt.event.WindowEvent;
-
-import javax.swing.JDialog;
-import javax.swing.JFileChooser;
-import javax.swing.JFrame;
-
-/**
- *
- *
- * @date Apr 14, 2005
- */
-public class CommonFileChooser extends JFileChooser {
- private static final long serialVersionUID = -1440579455652851165L;
- private int returnCode;
- private JDialog dialog = null;
-
- public CommonFileChooser(String path){
- super(path);
- }
-
- private JDialog getDialog(){
- if(this.dialog == null){
- JFrame f = null;
- this.dialog = new JDialog(f, "", true);
- Container contentPane = this.dialog.getContentPane();
- contentPane.setLayout(new BorderLayout());
- contentPane.add(this, BorderLayout.CENTER);
-
- this.dialog.addWindowListener(new WindowAdapter() {
- @Override
- public void windowClosing(WindowEvent e) {
- returnCode = CANCEL_OPTION;
- dialog.setVisible(false);
- }
- });
- this.dialog.pack();
- }
- return this.dialog;
- }
-
- @Override
- protected void fireActionPerformed(String command) {
- super.fireActionPerformed(command);
-
- JDialog myDialog = this.getDialog();
-
- if(APPROVE_SELECTION.equals(command)){
- returnCode = APPROVE_OPTION;
- myDialog.setVisible(false);
- } else if(CANCEL_SELECTION.equals(command)){
- returnCode = CANCEL_OPTION;
- myDialog.setVisible(false);
- }
- }
-
- @Override
- public int showDialog(Component parent, String title){
- JDialog myDialog = this.getDialog();
-
- if(parent != null){
- myDialog.setLocationRelativeTo(parent);
- }
- if(title != null){
- myDialog.setTitle(title);
- }
- myDialog.setVisible(true);
- myDialog.toFront();
-
- return returnCode;
- }
-}
diff --git a/src/tools/config/org/eclipse/cyclonedds/common/view/DialogWindow.java b/src/tools/config/org/eclipse/cyclonedds/common/view/DialogWindow.java
deleted file mode 100644
index b2d3167..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/common/view/DialogWindow.java
+++ /dev/null
@@ -1,324 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-/**
- * Contains all SPLICE DDS C&M Tooling common view components.
- */
-package org.eclipse.cyclonedds.common.view;
-
-import javax.swing.JComponent;
-import javax.swing.JFrame;
-import javax.swing.JTextField;
-import javax.swing.JPanel;
-import javax.swing.JButton;
-
-import java.awt.FlowLayout;
-import java.awt.event.*;
-import java.util.*;
-
-/**
- * This class represents a generic dialog window and is meant to provide a fast and
- * simple way of constructing dialog windows.
- *
- * The window contains a status bar and
- * 'OK' and 'Cancel' buttons. By providing NameValuePanel objects, the user can
- * fill the dialog window with as many fields as he wishes.
- */
-public class DialogWindow extends JFrame {
- private static final long serialVersionUID = -4875672779193998620L;
-
- /**
- * The constructor of this object. It initializes the window.
- *
- * @param _controller The controller where to sent actions to. 'cancel'
- * for the Cancel button and _action for the OK button
- * @param _fields Array of name/value pairs that must be showed in the dialog window.
- * @param _action The action that the controller expects when the user clicks th OK button.
- * @param _title The title of the dialog window that will be shown in the top.
- */
- public DialogWindow(ActionListener _controller, NameValuePanel[] _fields, String _action, String _title) {
- super();
- controller = _controller;
- action = _action;
- fields = _fields;
- title = _title;
- fieldNameMapping = new HashMap(_fields.length);
- initialize();
- }
-
- DialogWindow(ActionListener _controller, String _action, String _title){
- super();
- controller = _controller;
- action = _action;
- title = _title;
- fields = null;
- fieldNameMapping = new HashMap();
- initialize();
- }
-
- /**
- * This method initializes the dialog window.
- */
- void initialize() {
- this.setSize(1200, 1600);
- this.setContentPane(getJContentPane());
- this.setResizable(false);
- this.setTitle(title);
- this.addWindowListener(new WindowAdapter() {
- @Override
- public void windowClosing(WindowEvent e) {
- controller.actionPerformed(
- new ActionEvent(cancelButton, 0, "cancel"));
- }
- });
- this.pack();
- }
-
- /**
- * This method initializes the root content pane
- *
- * @return The created or already existing content pane.
- */
- JPanel getJContentPane() {
- if (jContentPane == null) {
- jContentPane = new JPanel();
- java.awt.GridLayout layGridLayout15 = new java.awt.GridLayout();
-
- if(fields != null){
- layGridLayout15.setRows(fields.length);
- }
-
- layGridLayout15.setColumns(1);
- layGridLayout15.setHgap(0);
- layGridLayout15.setVgap(5);
- JPanel inputPanel = new JPanel();
- inputPanel.setLayout(layGridLayout15);
- jContentPane.setLayout(new java.awt.BorderLayout());
-
- if(fields != null){
- for(int i=0; i.
- */
- public HashMap getValues() {
- HashMap values = new HashMap();
-
- for(int i=0; i f = fieldNameMapping.values();
- Iterator fIter = f.iterator();
-
- while(fIter.hasNext()){
- nvp = fIter.next();
- test = nvp.getValue();
- if(test == null || test.equals("")){
- if(!(nvp.isEmptyInputAllowed())){
- return false;
- }
- }
- }
- return true;
- }
-
- public NameValuePanel getField(String name){
- return fieldNameMapping.get(name);
- }
-
- public NameValuePanel[] getFields(){
- return fields;
- }
-
- /**
- * The root pane of the dialog window.
- */
- javax.swing.JPanel jContentPane = null;
-
- /**
- * The status panel.
- */
- StatusPanel statusPanel = null;
-
- /**
- * The panel where the 'OK' and 'Cancel' buttons are placed on.
- */
- JPanel buttonPanel = null;
-
- /**
- * The 'Cancel' button.
- */
- JButton cancelButton = null;
-
- /**
- * The 'OK' button.
- */
- JButton okButton = null;
-
- /**
- * The controller (mvC), where the action command will be sent to when the
- * user clicks the OK button.
- */
- ActionListener controller = null;
-
- /**
- * The title of the dialog window.
- */
- String title = null;
-
- /**
- * The action string that must be sent to the controller
- * when the 'OK' button is clicked.
- */
- String action = null;
-
- /**
- * The name/value pairs that are shown in the window.
- */
- NameValuePanel[] fields = null;
-
- /**
- * Fields in the window
- */
- HashMap fieldNameMapping = null;
-}
diff --git a/src/tools/config/org/eclipse/cyclonedds/common/view/MainWindow.java b/src/tools/config/org/eclipse/cyclonedds/common/view/MainWindow.java
deleted file mode 100644
index 73ae665..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/common/view/MainWindow.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-package org.eclipse.cyclonedds.common.view;
-
-import javax.swing.JFrame;
-import javax.swing.ToolTipManager;
-
-/**
- * Abstract class that is typically extended from by main windows of an
- * application. It offers a StatusPanel, which is capable of displaying
- * the current status and implements the ModelListener interface to be able
- * to be attached to ModelRegister components and receive updates from it. This
- * class has been defined abstract because only descendants of this class may
- * exist.
- *
- * @date Sep 1, 2004
- */
-public abstract class MainWindow extends JFrame {
- private static final long serialVersionUID = 5540350112074790669L;
- protected StatusPanel statusPanel = null;
-
- /**
- * This is the default constructor
- */
- public MainWindow() {
- super();
- ToolTipManager tm = ToolTipManager.sharedInstance();
- tm.setInitialDelay(100);
- this.setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
- this.setSize(800, 600);
- }
-
- /**
- * This method initializes statusPanel.
- *
- * @return The status panel of the window.
- */
- protected StatusPanel getStatusPanel() {
- if (statusPanel == null) {
- statusPanel = new StatusPanel(300, "Ready", true, true);
- }
- return statusPanel;
- }
-
- /**
- * Sends a message to the statusPanel and sets the progress.
- *
- * @param message The message to show in the statusbar.
- * @param persistent true if the message must be shown until a new call to
- * this function, or false when it should automatically be
- * removed after certain amount of time.
- * @param busy Sets the progress monitor of the statusbar.
- */
- public void setStatus(String message, boolean persistent, boolean busy){
- statusPanel.setStatus(message, persistent, busy);
- }
-
- /**
- * Sends a message to the statusPanel.
- *
- * @param message The message to show in the statusbar.
- * @param persistent true if the message must be shown until a new call to
- * this function, or false when it should automatically be
- * removed after certain amount of time.
- */
- public void setStatus(String message, boolean persistent){
- statusPanel.setStatus(message, persistent);
- }
-
- /**
- * Provides access to the current status.
- *
- * @return The currently shown status.
- */
- public String getStatus(){
- return statusPanel.getStatus();
- }
-
- /**
- * Disables the view component.
- *
- * This is done when a dialog is shown and the user must
- * provide input before proceeding.
- */
- public void disableView(){
- this.setEnabled(false);
- this.setFocusable(false);
- }
-
- /**
- * Enables the view component.
- */
- public void enableView(){
- this.setFocusable(true);
- this.setEnabled(true);
- }
-}
diff --git a/src/tools/config/org/eclipse/cyclonedds/common/view/NameValuePanel.java b/src/tools/config/org/eclipse/cyclonedds/common/view/NameValuePanel.java
deleted file mode 100644
index d0db9aa..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/common/view/NameValuePanel.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-package org.eclipse.cyclonedds.common.view;
-
-import javax.swing.*;
-
-import java.awt.Dimension;
-import java.awt.FlowLayout;
-
-/**
- * This class is meant to provide a standard generic input panel that
- * contains a label and a input field.
- *
- * Input fields that are currently supported are:
- * - textfields
- * - comboboxes.
- */
-public abstract class NameValuePanel extends JPanel {
- private static final long serialVersionUID = 8693880375019883969L;
-
- /**
- * Creates an input panel with a label and a textfield.
- * @param _fieldName The name of the field that is also used as label.
- * @param _emptyInputAllowed Boolean that specifies if empty input is allowed when
- * submitted.
- */
- public NameValuePanel(
- String fieldName,
- Object defaultValue,
- boolean emptyInputAllowed,
- Dimension labelDim,
- Dimension fieldDim)
- {
- super();
- if(labelDim != null){
- this.labelDim = labelDim;
-
- if(this.labelDim.height != 20){
- this.labelDim.height = 20;
- }
- } else {
- this.labelDim = new Dimension(100, 20);
- }
- if(fieldDim != null){
- this.fieldDim = fieldDim;
-
- if(this.fieldDim.height != 20){
- this.fieldDim.height = 20;
- }
- } else {
- this.fieldDim = new Dimension(230, 20);
- }
- this.fieldName = fieldName;
- this.emptyInputAllowed = emptyInputAllowed;
- this.defaultValue = defaultValue;
- this.initLayout();
- this.initLabel();
- }
-
- /**
- * Initializes the layout (FlowLayout is used).
- */
- protected void initLayout(){
- FlowLayout layFlowLayout = new FlowLayout(FlowLayout.LEFT);
- layFlowLayout.setVgap(0);
- this.setLayout(layFlowLayout);
- }
-
- /**
- * Initializes the label.
- *
- * The fieldName is also used as label text.
- */
- protected void initLabel(){
- JLabel label = new JLabel();
- label.setText(fieldName);
- label.setPreferredSize(labelDim);
- this.add(label);
- }
-
- /**
- * Provides access to the name of the field.
- *
- * @return The name of the field.
- */
- @Override
- public String getName(){
- return fieldName;
- }
-
- /**
- * Provides access to the emptyInputIsAllowed boolean.
- *
- * @return true if the field may be empty when submitted, false otherwise.
- */
- public boolean isEmptyInputAllowed(){
- return emptyInputAllowed;
- }
-
- /**
- * Provides access to the editor component for the field value.
- *
- * @return The editor component for the field value.
- */
- public JComponent getField(){
- return field;
- }
-
- public abstract Object getValue();
-
- @Override
- public abstract void setEnabled(boolean enabled);
-
- /**
- * The name of the field.
- */
- protected String fieldName = null;
-
- /**
- * The input field.
- */
- protected JComponent field = null;
-
- /**
- * The label Dimension.
- */
- protected Dimension labelDim = null;
-
- /**
- * The field Dimension.
- */
- protected Dimension fieldDim = null;
-
- /**
- * Boolean that specifies if empy input is allowed for this field.
- */
- protected boolean emptyInputAllowed;
-
- protected Object defaultValue = null;
-}
diff --git a/src/tools/config/org/eclipse/cyclonedds/common/view/StatusPanel.java b/src/tools/config/org/eclipse/cyclonedds/common/view/StatusPanel.java
deleted file mode 100644
index 0f0f10d..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/common/view/StatusPanel.java
+++ /dev/null
@@ -1,392 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-package org.eclipse.cyclonedds.common.view;
-
-import java.awt.Color;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JProgressBar;
-import javax.swing.SwingUtilities;
-import javax.swing.Timer;
-
-import org.eclipse.cyclonedds.common.util.Config;
-
-/**
- * This class provides a standard statusbar that can be placed in a window at
- * any place.
- */
-public class StatusPanel extends JPanel {
-
- private static final long serialVersionUID = -6861447244439379176L;
-
- /**
- * Creates a new StatusPanel that can be used to provide information about
- * the status of the application of a certain action. The StatusPanel
- * optionally provides a connection light and a progressbar.
- *
- * @param width
- * The width of the panel.
- * @param _defaultText
- * The default text of the panel.
- * @param showConnectionLight
- * Whether or not to display a connection light.
- * @param showProgressBar
- * Whether or not to display a progressbar.
- */
- public StatusPanel(int width, String _defaultText,
- boolean showConnectionLight, boolean showProgressBar) {
- super();
- this.setLayout(new java.awt.BorderLayout());
- defaultText = _defaultText;
-
- if (defaultText == null) {
- defaultText = "";
- }
- defaultBg = this.getBackground();
- status = new JLabel();
- status.setText(defaultText);
- status.setToolTipText(defaultText);
- java.awt.GridLayout layGridLayout2 = new java.awt.GridLayout();
- layGridLayout2.setRows(1);
- layGridLayout2.setColumns(1);
-
- if (showConnectionLight && showProgressBar) {
- progressBar = new JProgressBar(0, 10);
- progressBar.setBorderPainted(false);
- progressBar.setPreferredSize(new java.awt.Dimension(
- width / 10 + 10, 10));
-
- JPanel temp = new JPanel();
- temp.setLayout(new java.awt.BorderLayout());
- temp.setBorder(javax.swing.BorderFactory
- .createBevelBorder(javax.swing.border.BevelBorder.LOWERED));
-
- statusPanel = new JPanel();
- statusPanel.setLayout(layGridLayout2);
- statusPanel.setPreferredSize(new java.awt.Dimension(width - 20
- - (width / 10) - 10, 20));
- statusPanel.setMinimumSize(new java.awt.Dimension(50, 20));
- statusPanel.add(status);
-
- temp.add(statusPanel, java.awt.BorderLayout.CENTER);
- temp.add(progressBar, java.awt.BorderLayout.EAST);
-
- connectionPanel = new JPanel();
- connectionPanel.setPreferredSize(new java.awt.Dimension(20, 10));
- connectionPanel
- .setBorder(javax.swing.BorderFactory.createCompoundBorder(
- javax.swing.BorderFactory
- .createCompoundBorder(
- javax.swing.BorderFactory
- .createLineBorder(
- connectionPanel
- .getBackground(),
- 2),
- javax.swing.BorderFactory
- .createEtchedBorder(javax.swing.border.EtchedBorder.RAISED)),
- javax.swing.BorderFactory
- .createBevelBorder(javax.swing.border.BevelBorder.LOWERED)));
- connectionPanel.setBackground(disconnectedColor);
- connectionPanel.setToolTipText("Not connected.");
-
- this.add(temp, java.awt.BorderLayout.CENTER);
- this.add(connectionPanel, java.awt.BorderLayout.EAST);
- this.setPreferredSize(new java.awt.Dimension(width, 20));
- } else if (showProgressBar) {
- progressBar = new JProgressBar(0, 10);
- progressBar.setBorderPainted(false);
- progressBar.setPreferredSize(new java.awt.Dimension(
- width / 10 + 10, 10));
-
- statusPanel = new JPanel();
- statusPanel.setLayout(layGridLayout2);
- statusPanel.setPreferredSize(new java.awt.Dimension(width
- - (width / 10) - 10, 20));
- statusPanel.setMinimumSize(new java.awt.Dimension(50, 20));
- statusPanel.add(status);
-
- this.setBorder(javax.swing.BorderFactory
- .createBevelBorder(javax.swing.border.BevelBorder.LOWERED));
- this.setPreferredSize(new java.awt.Dimension(width, 20));
- this.add(statusPanel, java.awt.BorderLayout.CENTER);
- this.add(progressBar, java.awt.BorderLayout.EAST);
- } else if (showConnectionLight) {
- statusPanel = new JPanel();
- statusPanel.setLayout(layGridLayout2);
- statusPanel.setBorder(javax.swing.BorderFactory
- .createBevelBorder(javax.swing.border.BevelBorder.LOWERED));
- statusPanel
- .setPreferredSize(new java.awt.Dimension(width - 20, 20));
- statusPanel.setMinimumSize(new java.awt.Dimension(50, 20));
- statusPanel.add(status);
-
- connectionPanel = new JPanel();
- connectionPanel.setPreferredSize(new java.awt.Dimension(20, 10));
- connectionPanel
- .setBorder(javax.swing.BorderFactory.createCompoundBorder(
- javax.swing.BorderFactory
- .createCompoundBorder(
- javax.swing.BorderFactory
- .createLineBorder(
- connectionPanel
- .getBackground(),
- 2),
- javax.swing.BorderFactory
- .createEtchedBorder(javax.swing.border.EtchedBorder.RAISED)),
- javax.swing.BorderFactory
- .createBevelBorder(javax.swing.border.BevelBorder.LOWERED)));
- connectionPanel.setBackground(disconnectedColor);
- connectionPanel.setToolTipText("Not connected.");
-
- this.add(statusPanel, java.awt.BorderLayout.CENTER);
- this.add(connectionPanel, java.awt.BorderLayout.EAST);
- this.setPreferredSize(new java.awt.Dimension(width, 20));
- } else {
- this.setLayout(layGridLayout2);
- this.setBorder(javax.swing.BorderFactory
- .createBevelBorder(javax.swing.border.BevelBorder.LOWERED));
- this.setPreferredSize(new java.awt.Dimension(width, 20));
- this.setMinimumSize(new java.awt.Dimension(100, 20));
- this.add(status);
- }
- }
-
- /**
- * Sets the connection light to green when connected and to red if not.
- *
- * @param connected
- * Whether or not the application has a connection.
- * @param toolTip
- * The tooltip that must be displayed when the user moves the
- * mouse over the connection light.
- */
- public synchronized void setConnected(boolean connected, String toolTip) {
- if (connectionPanel != null) {
- final boolean con = connected;
- final String tt = toolTip;
-
- Runnable runner = new Runnable() {
- @Override
- public void run() {
- if (con) {
- connectionPanel.setBackground(connectedColor);
- } else {
- connectionPanel.setBackground(disconnectedColor);
- }
- connectionPanel.setToolTipText(tt);
- }
- };
- SwingUtilities.invokeLater(runner);
- }
- }
-
- /**
- * Sets the status message to the supplied message and sets the progressbar
- * to indeterminate mode or resets it. This is done by calling the
- * setStatus(String, boolean) method as well as the setBusy method.
- *
- * @param message
- * The message to set.
- * @param persistent
- * Whether or not the message should never be removed or not.
- * @param busy
- * Whether or not the progressbar must be set in indeterminate
- * mode or not.
- */
- public synchronized void setStatus(String msg, boolean persistent,
- boolean busy) {
- if (msg == null) {
- msg = "";
- }
- final String message = msg;
- final boolean b = busy;
- final boolean p = persistent;
-
- /*
- * Runnable runner = new Runnable() { public void run(){
- */
- String myMsg = message;
-
- if ("".equals(message)) {
- myMsg = defaultText;
- }
- if (message.startsWith("Error:")) {
- if (statusPanel != null) {
- statusPanel.setBackground(errorColor);
-
- if (progressBar != null) {
- progressBar.setBackground(errorColor);
- }
- } else {
- setBackground(errorColor);
- }
- myMsg = message.substring(6);
- } else if (message.startsWith("Warning:")) {
- if (statusPanel != null) {
- statusPanel.setBackground(warningColor);
-
- if (progressBar != null) {
- progressBar.setBackground(warningColor);
- }
- } else {
- setBackground(warningColor);
- }
- myMsg = message.substring(8);
- } else { // Standard message
- if (statusPanel != null) {
- statusPanel.setBackground(defaultBg);
-
- if (progressBar != null) {
- progressBar.setBackground(defaultBg);
- }
- } else {
- setBackground(defaultBg);
- }
- }
- status.setText(" " + myMsg);
- status.setToolTipText(myMsg);
- setBusy(b);
-
- synchronized (this) {
- if (!p) {
- Timer persistentTimer = new Timer(persistentTime,
- new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- long currentTime = System.currentTimeMillis();
- synchronized (org.eclipse.cyclonedds.common.view.StatusPanel.this) {
- if (((currentTime - lastMessageTime) < persistentTime)
- || (!lastPersistent)) {
- /*
- * New message has arrived, ignore
- * reset.
- */
- } else {
- setStatus(defaultText, false, false);
- }
- }
- }
- });
- persistentTimer.setRepeats(false);
- lastMessageTime = System.currentTimeMillis();
- persistentTimer.start();
- lastPersistent = true;
- } else {
- lastPersistent = false;
- }
- }
- /*
- * }
- *
- * }; runner.run(); SwingUtilities.invokeLater(runner);
- */
- }
-
- /**
- * Changes the status message. If the message starts with "Error:" the
- * background color will become red and the "Error:" part of the string will
- * not be shown. If the message starts with "Warning:" the background color
- * will become yellow and the "Warning:" part of the string will not be
- * displayed.
- *
- * @param message
- * The new status message.
- * @param persistent
- * If true, the message will not be changed into the standard
- * text after a few seconds, but stay there until this function
- * is called again.
- */
- public synchronized void setStatus(String message, boolean persistent) {
- this.setStatus(message, persistent, false);
- }
-
- /**
- * Sets the progressbar status. When true, the progressbar will go into
- * inderminate mode and display 'busy...', when false the progressbar will
- * leave indeterminate mode and display 'ready'
- *
- * @param busy
- * When true, the progressbar will go into inderminate mode
- */
- private synchronized void setBusy(boolean busy) {
- if (progressBar != null) {
- if (busy) {
- progressBar.setBorderPainted(true);
- progressBar.setStringPainted(true);
- progressBar.setString("busy..");
- } else {
- progressBar.setBorderPainted(false);
- progressBar.setStringPainted(false);
- progressBar.setString(null);
- }
- progressBar.setIndeterminate(busy);
- }
- }
-
- /**
- * Provides access to the current status.
- *
- * @return The currently displayed status.
- */
- public synchronized String getStatus() {
- return status.getText();
- }
-
- private static final int persistentTime = 4000;
-
- private long lastMessageTime;
-
- private boolean lastPersistent = false;
-
- /**
- * The current status message.
- */
- private JLabel status = null;
-
- /**
- * The default message.
- */
- private String defaultText = null;
-
- /**
- * The default background color
- */
- private Color defaultBg = null;
-
- /**
- * Panel that holds the connection light. Green if connected, red if not
- * connected.
- */
- private JPanel connectionPanel = null;
-
- /**
- * Progressbar that can be used to provide the user with progress
- * information.
- */
- private JProgressBar progressBar = null;
-
- /**
- * Panel that holds the status label.
- */
- private JPanel statusPanel = null;
-
- private final Color connectedColor = Config.getActiveColor();
-
- private final Color errorColor = Config.getErrorColor();
-
- private final Color warningColor = Config.getWarningColor();
-
- private final Color disconnectedColor = Config.getErrorColor();
-}
diff --git a/src/tools/config/org/eclipse/cyclonedds/config/CycloneConfig.java b/src/tools/config/org/eclipse/cyclonedds/config/CycloneConfig.java
deleted file mode 100644
index 091a93c..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/config/CycloneConfig.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-package org.eclipse.cyclonedds.config;
-
-import org.eclipse.cyclonedds.common.util.Initializer;
-import org.eclipse.cyclonedds.common.util.Report;
-import org.eclipse.cyclonedds.config.swing.ConfigWindow;
-
-public class CycloneConfig extends Initializer {
-
- /**
- * Starts configuration. This function is the main class.
- *
- * - It passes on the commandline arguments. Arguments that are supported
- * are:
- * -#
- *
- * @param args These are passed on to the initialize function
- */
- public static void main(String[] args) {
- boolean redirect = true;
- boolean uriSet = false;
- String[] args2;
- String uri = null;
-
- CycloneConfig t = new CycloneConfig();
-
- for (int i = 0; i < args.length; i++) {
- if ("-noredirect".equals(args[i])) {
- redirect = false;
- } else if (args[i].toLowerCase().startsWith("-uri=")) {
- uri = args[i].substring(5); /* '-uri=' is 5 characters */
- uriSet = true;
- } else {
- args2 = new String[1];
- args2[0] = args[i];
- }
- }
-
- if (redirect) {
- /*
- * initialize logging with a max size of 10M with a max history of
- * 10 runs and do not append
- */
- Report.getInstance().initializeInfo("cycloneddsconf-info.log", 10000000, 10, false);
- Report.getInstance().initializeError("cycloneddsconf-error.log", 10000000, 10, false);
- } else {
- Report.getInstance().initializeConsole();
- System.out.println("No redirect.");
- }
-
- Runtime.getRuntime().addShutdownHook(new Thread() {
- @Override
- public void run() {
- Report.getInstance().CloseHandlers();
- }
- });
- ConfigWindow cw = null;
- if (uriSet) {
- cw = new ConfigWindow(uri);
- } else {
- cw = new ConfigWindow();
- }
- cw.setVisible(true);
- }
-}
diff --git a/src/tools/config/org/eclipse/cyclonedds/config/data/DataAttribute.java b/src/tools/config/org/eclipse/cyclonedds/config/data/DataAttribute.java
deleted file mode 100644
index 624ecfb..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/config/data/DataAttribute.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-package org.eclipse.cyclonedds.config.data;
-
-import org.w3c.dom.Attr;
-
-import org.eclipse.cyclonedds.config.meta.MetaAttribute;
-
-public class DataAttribute extends DataNode {
- private DataValue value;
-
- public DataAttribute(MetaAttribute metadata, Attr node, Object value) throws DataException {
- super(metadata, node);
-
- if(!node.getNodeName().equals(metadata.getName())){
- throw new DataException("Metadata and data do not match.");
- }
- this.value = new DataValue(metadata.getValue(), node, value);
- this.value.setParent(this);
- this.value.setOwner(this.getOwner());
- }
-
- public DataAttribute(MetaAttribute metadata, Attr node) throws DataException {
- super(metadata, node);
-
- if(!node.getNodeName().equals(metadata.getName())){
- throw new DataException("Metadata and data do not match.");
- }
- Object defaultValue = metadata.getValue().getDefaultValue();
- this.value = new DataValue(metadata.getValue(), node, defaultValue);
- this.value.setParent(this);
- this.value.setOwner(this.getOwner());
- }
-
- @Override
- public void setOwner(DataConfiguration owner) {
- super.setOwner(owner);
- this.value.setOwner(owner);
- }
-
- public DataValue getDataValue(){
- return this.value;
- }
-
- public void testSetValue(Object value) throws DataException{
- this.value.testSetValue(value);
- }
-
- public void setValue(Object value) throws DataException{
- DataValue tmpValue = this.value;
- this.value.setValue(value);
- tmpValue.setParent(null);
- tmpValue.setOwner(null);
- this.value.setParent(this);
- this.value.setOwner(this.owner);
- }
-
- public Object getValue(){
- return this.value.getValue();
- }
-}
diff --git a/src/tools/config/org/eclipse/cyclonedds/config/data/DataConfiguration.java b/src/tools/config/org/eclipse/cyclonedds/config/data/DataConfiguration.java
deleted file mode 100644
index 729f799..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/config/data/DataConfiguration.java
+++ /dev/null
@@ -1,1017 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-package org.eclipse.cyclonedds.config.data;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.io.StringWriter;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-
-import org.eclipse.cyclonedds.common.util.Report;
-import org.eclipse.cyclonedds.config.meta.MetaAttribute;
-import org.eclipse.cyclonedds.config.meta.MetaConfiguration;
-import org.eclipse.cyclonedds.config.meta.MetaElement;
-import org.eclipse.cyclonedds.config.meta.MetaNode;
-import org.eclipse.cyclonedds.config.meta.MetaValue;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Text;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-public class DataConfiguration {
- private DataElement rootElement;
- private ArrayList services;
- private ArrayList serviceNames;
- private final ArrayList commercialServices = new ArrayList();
- private Document document;
- private MetaConfiguration metadata;
- private Set listeners;
- private File file;
- private boolean fileUpToDate;
-
- public DataConfiguration(File file, boolean repair) throws DataException {
- try {
- if (MetaConfiguration.getInstance() != null) {
- this.metadata = MetaConfiguration.getInstance();
- this.rootElement = null;
- this.services = new ArrayList();
- this.serviceNames = new ArrayList();
-
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- DocumentBuilder builder = factory.newDocumentBuilder();
-
- builder.setErrorHandler(new ErrorHandler() {
- @Override
- public void warning(SAXParseException exception) throws SAXException {
-
- }
-
- @Override
- public void error(SAXParseException exception) throws SAXException {
- Report.getInstance().writeErrorLog("Parse error at line: " + exception.getLineNumber() + " column: "
- + exception.getColumnNumber() + ".");
-
- }
-
- @Override
- public void fatalError(SAXParseException exception) throws SAXException {
- Report.getInstance().writeErrorLog("Parse error at line: " + exception.getLineNumber() + " column: "
- + exception.getColumnNumber() + ".");
- }
- });
- this.document = builder.parse(file);
- this.listeners = Collections.synchronizedSet(new HashSet());
- if (repair) {
- this.fileUpToDate = false;
- } else {
- this.fileUpToDate = true;
- }
- this.initExisting(repair);
- this.file = file;
- }
- } catch (SAXException se) {
- throw new DataException(se.getMessage());
- } catch (IOException ie) {
- throw new DataException(ie.getMessage());
- } catch (ParserConfigurationException pe) {
- throw new DataException(pe.getMessage());
- }
- }
-
- public DataConfiguration() throws DataException {
- try {
- if (MetaConfiguration.getInstance() != null) {
- this.metadata = MetaConfiguration.getInstance();
- this.rootElement = null;
- this.services = new ArrayList();
- this.serviceNames = new ArrayList();
- this.listeners = Collections.synchronizedSet(new HashSet());
- this.fileUpToDate = false;
- this.file = null;
- this.initDocument();
- this.init();
- } else {
- throw new DataException("Failed to get metaconfiguration instance");
- }
- } catch (NullPointerException npe){
- throw new DataException(npe.getMessage());
- }
- }
-
- public Document getDocument() {
- return this.document;
- }
-
- public MetaConfiguration getMetadata() {
- return this.metadata;
- }
-
- public DataElement getRootElement() {
- return this.rootElement;
- }
-
-
- public DataElement[] getServices() {
- return this.services.toArray(new DataElement[this.services.size()]);
- }
-
- public ArrayList getServicesObject() {
- return this.services;
- }
-
- public ArrayList getServiceNames() {
- return this.serviceNames;
- }
-
- public String getCommandforService(String name) {
- return metadata.getCommandForService(name);
- }
-
- public String getServiceForCommand(String name) {
- return metadata.getServiceForCommand(name);
- }
-
- public void addDataConfigurationListener(DataConfigurationListener listener){
- synchronized(this.listeners){
- if(this.listeners.contains(listener)){
- assert false;
- }
-
- this.listeners.add(listener);
- }
- }
-
- public void removeDataConfigurationListener(DataConfigurationListener listener){
- synchronized(listeners){
- listeners.remove(listener);
- }
- }
-
- public void addNode(DataElement parent, DataNode child) throws DataException {
- if((parent.getOwner().equals(this))){
- parent.addChild(child);
-
- if(parent.equals(this.rootElement)){
- if(child instanceof DataElement){
- this.services.add((DataElement)child);
- }
- }
- this.fileUpToDate = false;
- this.notifyNodeAdded(parent, child);
- } else {
- throw new DataException("Parent node not in configuration.");
- }
- }
-
- public void addNode(DataElement parent, MetaNode child) throws DataException {
- if((parent.getOwner().equals(this))){
- DataNode added = this.createDataForMeta(parent, child);
-
- if(parent.equals(this.rootElement)){
- if(added instanceof DataElement){
- this.services.add((DataElement)added);
- }
- }
- this.fileUpToDate = false;
- this.notifyNodeAdded(parent, added);
- } else {
- throw new DataException("Parent node not in configuration.");
- }
- }
-
- public DataNode addNodeWithDependency(DataElement parent, MetaNode child) throws DataException {
- DataNode result = null;
- if ((parent.getOwner().equals(this))) {
- DataNode added = this.createDataForMeta(parent, child);
-
- if (parent.equals(this.rootElement)) {
- if (added instanceof DataElement) {
- this.services.add((DataElement) added);
- }
- }
- this.fileUpToDate = false;
- this.notifyNodeAdded(parent, added);
- result = added;
- } else {
- throw new DataException("Parent node not in configuration.");
- }
- return result;
- }
-
- public boolean isServiceElement(DataNode dn) throws DataException {
- boolean result = false;
- if (dn == null) {
- throw new DataException("Invalid node.");
- }
- if (dn instanceof DataElement) {
- result = this.services.contains(dn);
- }
- return result;
- }
-
- public boolean containsServiceName(String name) throws DataException {
- boolean result = false;
- for (DataElement de : services) {
- DataNode[] dn = de.getChildren();
- for (int i = 0; i < dn.length; i++) {
- if (dn[i] instanceof DataAttribute) {
- if (((DataAttribute) dn[i]).getValue().equals(name)) {
- result = true;
- }
- }
- }
- }
- return result;
- }
-
- public void createDomainServiceForSerivce(DataNode dataNode, MetaNode metaNode, String serviceName)
- throws DataException {
- MetaElement metaDomainService = findMetaElement((MetaElement) rootElement.getMetadata(), "Service");
- MetaAttribute maDomainName = findMetaAttribute(metaDomainService, "name");
- MetaElement maDomainCommand = findMetaElement(metaDomainService, "Command");
- MetaAttribute maServiceName = findMetaAttribute((MetaElement) metaNode, "name");
-
- /*
- * find the parent dataElement of the new to be created domain service
- * DataElement
- */
- DataElement dataDomain = findDataElement(rootElement, "Domain");
- /* get the newly created domain element */
- dataDomain = (DataElement) addNodeWithDependency(dataDomain, metaDomainService);
-
- /*
- * find name and command DataValue objects for the domain element
- */
- if (maDomainName != null && maDomainCommand != null) {
- DataValue domainNameValue = findDataValueforMetaValue(dataDomain, maDomainName.getValue());
- DataValue domainCommandValue = findDataValueforMetaValue(dataDomain, ((MetaValue) maDomainCommand
- .getChildren()[0]));
- /* set name and command for Domain element */
- domainNameValue.setValue(serviceName);
- domainCommandValue.setValue(getCommandforService(((MetaElement) metaNode).getName()));
-
- /* find name DataValue object for service element */
- DataValue serviceNameValue = findDataValueforMetaValue((DataElement) dataNode, maServiceName.getValue());
-
- /* set name for service Element */
- serviceNameValue.setValue(serviceName);
-
- getServiceNames().add(serviceNameValue);
- getServiceNames().add(domainNameValue);
-
- /* set dependencies */
- domainNameValue.addDataValueDependency(serviceNameValue);
- serviceNameValue.addDataValueDependency(domainNameValue);
- dataNode.addDependency(dataDomain);
- dataDomain.addDependency(dataNode);
- } else {
- throw new DataException("Failed to set the domain tag for service: " + serviceName);
- }
- }
-
- public void removeNode(DataNode child) throws DataException {
- if(child == null){
- throw new DataException("Invalid node.");
- }
- DataElement parent = (DataElement)child.getParent();
-
- if(parent == null){
- if((child.getOwner().equals(this))){
- parent = this.rootElement;
- parent.removeChild(child);
-
- if(child instanceof DataElement){
- this.services.remove(child);
- }
- this.fileUpToDate = false;
- if (commercialServices.contains(child.getNode())) {
- commercialServices.remove(child.getNode());
- }
- this.notifyNodeRemoved(parent, child);
- } else {
- throw new DataException("Node not in configuration.");
- }
- } else if(parent.getOwner().equals(this)){
- parent.removeChild(child);
-
- if(parent.equals(this.rootElement)){
- if(child instanceof DataElement){
- this.services.remove(child);
- }
- }
- this.fileUpToDate = false;
- if (commercialServices.contains(child.getNode())) {
- commercialServices.remove(child.getNode());
- }
- this.notifyNodeRemoved(parent, child);
- } else {
- throw new DataException("Parent and/or child node not in configuration.");
- }
- }
-
- public void setFile(File file) throws DataException{
- if(file == null){
- throw new DataException("Invalid file pointer provided");
- }
- this.file = file;
- }
-
- public File getFile(){
- return this.file;
- }
-
- public boolean isUpToDate(){
- return this.fileUpToDate;
- }
-
- public void store(boolean replaceOld) throws DataException{
- OutputStreamWriter writer = null;
- if(this.file == null){
- throw new DataException("No file specified.");
- }
- if((this.file.exists()) && (replaceOld == false)){
- throw new DataException("File already exists.");
- }
- if(!this.file.exists()){
- try {
- this.file.createNewFile();
- } catch (IOException e) {
- throw new DataException("Cannot create file: " + file.getAbsolutePath());
- }
- } else if(!file.canWrite()){
- throw new DataException("Cannot write to: " + file.getAbsolutePath());
- }
- try {
-
- for (Node n : commercialServices) {
- n.getParentNode().removeChild(n);
- }
- writer = new OutputStreamWriter(new FileOutputStream(this.file, false), "UTF-8");
- writer.write(this.toString());
- writer.close();
-
- } catch (IOException e) {
- throw new DataException(e.getMessage());
- } finally {
- if (writer != null) {
- try {
- writer.close();
- } catch (IOException e) {
- throw new DataException(e.getMessage());
- }
- }
- }
- this.fileUpToDate = true;
- }
-
- public void setValue(DataValue dataValue, Object value) throws DataException {
- Object oldValue;
-
- if(dataValue.getOwner().equals(this)){
- oldValue = dataValue.getValue();
- dataValue.setValue(value);
- this.fileUpToDate = false;
- this.notifyValueChanged(dataValue, oldValue, value);
- } else {
- throw new DataException("Parent and/or child node not in configuration.");
- }
- }
-
- @Override
- public String toString(){
- String result = "";
-
- try{
- TransformerFactory tFactory = TransformerFactory.newInstance();
- tFactory.setAttribute("indent-number", Integer.valueOf(4));
- Transformer transformer = tFactory.newTransformer();
- transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
- transformer.setOutputProperty(OutputKeys.METHOD, "xml");
- transformer.setOutputProperty(OutputKeys.INDENT, "yes");
-
- this.beautify(this.document.getDocumentElement());
-
- DOMSource source = new DOMSource(this.document);
-
- StringWriter writer = new StringWriter();
- StreamResult sr = new StreamResult(writer);
- transformer.transform(source, sr);
- writer.flush();
- result = writer.toString();
- } catch (TransformerConfigurationException tce) {
- Report.getInstance().writeErrorLog(tce.getMessage());
- } catch (TransformerException te) {
- Report.getInstance().writeErrorLog(te.getMessage());
- }
- return result;
- }
-
- public DataNode createDataForMeta(DataElement parent, MetaNode metaNode) throws DataException {
- DataNode node;
- Document dom;
- Node domNode;
- Text text;
- DataNode result = null;
-
- dom = this.getDocument();
-
- if(metaNode instanceof MetaElement){
- domNode = dom.createElement(((MetaElement)metaNode).getName());
- node = new DataElement((MetaElement)metaNode, (Element)domNode);
- result = parent.addChild(node);
-
- for(MetaNode mn: ((MetaElement)metaNode).getChildren()){
- if(mn instanceof MetaAttribute){
- if(((MetaAttribute)mn).isRequired()){
- this.createDataForMeta((DataElement) node, mn);
- }
- } else if(mn instanceof MetaElement){
- for(int i=0; i<((MetaElement)mn).getMinOccurrences(); i++){
- this.createDataForMeta((DataElement)node, mn);
- }
- } else if(mn instanceof MetaValue){
- text = dom.createTextNode(((MetaValue)mn).getDefaultValue().toString());
- DataValue dv = new DataValue((MetaValue)mn, text);
- ((DataElement)node).addChild(dv);
- } else {
- assert false;
- }
- }
- } else if(metaNode instanceof MetaAttribute){
- domNode = dom.createAttribute(((MetaAttribute)metaNode).getName());
- node = new DataAttribute((MetaAttribute)metaNode, (Attr)domNode);
- result = parent.addChild(node);
- } else if(metaNode instanceof MetaValue){
- domNode = dom.createTextNode(((MetaValue)metaNode).getDefaultValue().toString());
- node = new DataValue((MetaValue)metaNode, (Text)domNode);
- result = parent.addChild(node);
- } else {
- throw new DataException("Unknown meta type: " + metaNode.getClass());
- }
- return result;
- }
-
- private void initDocument() throws DataException {
- try {
- this.document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
- } catch (ParserConfigurationException e) {
- throw new DataException(e.getMessage());
- } catch (NullPointerException npe){
- throw new DataException(npe.getMessage());
- }
- }
-
- private void initExisting(boolean repair) throws DataException{
- Element domElement = null;
- MetaElement metaElement = null;
-
- if (this.metadata != null && this.document != null) {
- metaElement = this.metadata.getRootElement();
- domElement = this.document.getDocumentElement();
- }
-
- if ((domElement != null) && (metaElement != null) && (metaElement.getName().equals(domElement.getNodeName()))) {
- this.rootElement = new DataElement(metaElement, domElement);
- this.rootElement.setOwner(this);
- this.initExistingDataElement(metaElement, this.rootElement, domElement, repair);
-
- for(DataNode dn: this.rootElement.getChildren()){
- if(dn instanceof DataElement){
- this.services.add((DataElement)dn);
- }
- }
- } else if(repair && (domElement == null)){
- this.initDocument();
- this.init();
- } else if (repair && metaElement != null) {
- this.document.renameNode(domElement, null, metaElement.getName());
- this.initExisting(repair);
- } else {
- if (domElement != null && metaElement != null) {
- throw new DataException("RootElement should be: '" + metaElement.getName() + "', but is '"
- +
- domElement.getNodeName() + "'.");
- } else if (metaElement != null) {
- throw new DataException("RootElement should be: '" +
- metaElement.getName() + "', but is 'null'.");
- } else {
- throw new DataException("RootElement is 'null'.");
- }
- }
- }
-
- private void initExistingDataElement(MetaElement metadata, DataElement parent, Element element, boolean repair) throws DataException {
- int occurrences;
- NodeList children;
- NamedNodeMap attributes;
- Node child;
- Element childElement;
- Text childText;
- Text oldText;
- Attr childAttribute;
- MetaElement childMetaElement;
- MetaValue childMetaValue;
- MetaAttribute childMetaAttribute;
- DataElement childDataElement;
- DataValue childDataValue;
- DataAttribute childDataAttribute;
-
- children = element.getChildNodes();
- int count = children.getLength();
- for(int i=0; i getCommercialServices() {
- return commercialServices;
- }
-}
diff --git a/src/tools/config/org/eclipse/cyclonedds/config/data/DataConfigurationListener.java b/src/tools/config/org/eclipse/cyclonedds/config/data/DataConfigurationListener.java
deleted file mode 100644
index f94a97a..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/config/data/DataConfigurationListener.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-package org.eclipse.cyclonedds.config.data;
-
-public interface DataConfigurationListener {
- public void valueChanged(DataValue data, Object oldValue, Object newValue);
-
- public void nodeAdded(DataElement parent, DataNode nodeAdded);
-
- public void nodeRemoved(DataElement parent, DataNode nodeRemoved);
-
-}
diff --git a/src/tools/config/org/eclipse/cyclonedds/config/data/DataElement.java b/src/tools/config/org/eclipse/cyclonedds/config/data/DataElement.java
deleted file mode 100644
index dae6ae6..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/config/data/DataElement.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-package org.eclipse.cyclonedds.config.data;
-
-import java.util.ArrayList;
-
-import org.eclipse.cyclonedds.config.meta.MetaAttribute;
-import org.eclipse.cyclonedds.config.meta.MetaElement;
-import org.eclipse.cyclonedds.config.meta.MetaNode;
-import org.eclipse.cyclonedds.config.meta.MetaValue;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Text;
-
-
-public class DataElement extends DataNode {
- private ArrayList children = null;
-
- public DataElement(MetaElement metadata, Element node) throws DataException {
- super(metadata, node);
-
- if(!node.getNodeName().equals(metadata.getName())){
- throw new DataException("Metadata and data do not match.");
- }
- this.children = new ArrayList();
- }
-
- protected DataNode addChild(DataNode node, int addToDOM, String value) throws DataException {
- /*
- * addToDOM values: 0 = do not add (false) 1 = append (true) 2 = replace
- * (this is done when the user choose to repair the value)
- */
- int count;
- MetaNode nodeMeta;
-
- if(node == null){
- throw new DataException("Cannot add null child.");
- } else if(this.children.contains(node)){
- throw new DataException("Element already contains this child.");
- } else if(!this.isNodeChildCandidate(node)){
- throw new DataException("Node cannot be added to this element.");
- }
-
- nodeMeta = node.getMetadata();
- count = 0;
-
- for(DataNode child: this.children){
- if(child instanceof DataValue){
- if(node instanceof DataValue){
- throw new DataException("Element " +
- ((MetaElement)this.metadata).getName() +
- " already contains this child: " +
- ((DataValue)node).getValue() + " with value: " +
- ((DataValue)child).getValue());
- }
- } else if(child instanceof DataElement){
- if(node instanceof DataElement){
- if(child.getMetadata().equals(nodeMeta)){
- count++;
- }
- }
- } else if(child instanceof DataAttribute){
- if(node instanceof DataAttribute){
- if(child.getMetadata().equals(nodeMeta)){
- throw new DataException("Element already contains attribute: "
- + ((MetaAttribute)nodeMeta).getName());
- }
- }
- }
- }
-
- if(nodeMeta instanceof MetaElement){
- if(count == ((MetaElement)nodeMeta).getMaxOccurrences()){
- throw new DataException("Maximum number of occurrences for " +
- ((MetaElement)nodeMeta).getName()+ " reached.");
- } else if (addToDOM == 1) {
- ((Element) this.node).appendChild(node.getNode());
- Text textNode = this.owner.getDocument().createTextNode("\n");
- this.node.appendChild(textNode);
- } else if (addToDOM == 2) {
- replaceChild(node.getNode(), value);
- Text textNode = this.owner.getDocument().createTextNode("\n");
- this.node.appendChild(textNode);
- }
- } else if(nodeMeta instanceof MetaAttribute){
- if (addToDOM == 1) {
- ((Element)this.node).setAttributeNode((Attr)node.getNode());
- }
- } else if(nodeMeta instanceof MetaValue){
- if (addToDOM == 1) {
- ((Element)this.node).appendChild(node.getNode());
- assert this.owner != null;
- assert this.owner.getDocument() != null;
- } else if (addToDOM == 2) {
- replaceChild(node.getNode(), value);
- Text textNode = this.owner.getDocument().createTextNode("\n");
- this.node.appendChild(textNode);
- }
- }
- this.children.add(node);
- node.setParent(this);
- node.setOwner(this.owner);
-
- return node;
- }
-
- public void replaceChild(Node node, String value) {
- NodeList nodeList = ((Element) this.node).getChildNodes();
- boolean finished = false;
- for (int i = 0, len = nodeList.getLength(); i < len && !finished; i++) {
- Node n = nodeList.item(i);
- if (n.getNodeValue().equals(value)) {
- ((Element) this.node).replaceChild(node, n);
- finished = true;
- }
- }
- }
-
- @Override
- public void setOwner(DataConfiguration owner) {
- super.setOwner(owner);
-
- for(DataNode child: this.children){
- child.setOwner(owner);
- }
- }
-
- public DataNode addChild(DataNode node) throws DataException{
- return addChild(node, 1, null);
- }
-
- public void removeChild(DataNode node) throws DataException{
- int count;
- MetaNode nodeMeta;
-
- if(node == null){
- throw new DataException("Cannot remove null child.");
- } else if(!(this.children.contains(node))){
- throw new DataException("Element does not contain this child.");
- }
- nodeMeta = node.getMetadata();
- count = 0;
-
- for(DataNode child: this.children){
- if(child.getMetadata().equals(nodeMeta)){
- count++;
- }
- }
- if(nodeMeta instanceof MetaElement){
- if(count == ((MetaElement)nodeMeta).getMinOccurrences()){
- throw new DataException("Minimum number of occurrences for " +
- ((MetaElement)nodeMeta).getName()+ " reached.");
- } else
- ((Element) this.node).removeChild(node.getNode());
- } else if(nodeMeta instanceof MetaAttribute){
- if(((MetaAttribute)nodeMeta).isRequired()){
- throw new DataException("Cannot remove required attribute " +
- ((MetaAttribute)nodeMeta).getName()+ ".");
- } else {
- ((Element) this.node)
- .removeAttributeNode((Attr) node.getNode());
- }
- } else {
- ((Element)this.node).removeChild(node.getNode());
- }
- this.children.remove(node);
-
- return;
- }
-
- public DataNode[] getChildren(){
- return this.children.toArray(new DataNode[this.children.size()]);
- }
-
- private boolean isNodeChildCandidate(DataNode node){
- MetaNode nodeMeta = node.getMetadata();
- MetaNode[] metaNodes = ((MetaElement)this.metadata).getChildren();
-
- for(MetaNode mn: metaNodes){
- if(mn.equals(nodeMeta)){
- return true;
- }
- }
- return false;
- }
-}
diff --git a/src/tools/config/org/eclipse/cyclonedds/config/data/DataException.java b/src/tools/config/org/eclipse/cyclonedds/config/data/DataException.java
deleted file mode 100644
index 2e69201..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/config/data/DataException.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-package org.eclipse.cyclonedds.config.data;
-
-public class DataException extends Exception {
- private static final long serialVersionUID = 7787444897071114498L;
-
- public DataException(String message){
- super(message);
- }
-}
diff --git a/src/tools/config/org/eclipse/cyclonedds/config/data/DataNode.java b/src/tools/config/org/eclipse/cyclonedds/config/data/DataNode.java
deleted file mode 100644
index 6188c6d..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/config/data/DataNode.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-package org.eclipse.cyclonedds.config.data;
-
-import java.util.HashSet;
-
-import org.eclipse.cyclonedds.config.meta.MetaNode;
-import org.w3c.dom.Node;
-
-public abstract class DataNode {
- protected MetaNode metadata;
- protected Node node;
- protected DataNode parent;
- protected DataConfiguration owner;
- private HashSet dependencies = null;
-
- public DataNode(MetaNode metadata, Node node) throws DataException {
- if(metadata == null){
- throw new DataException("Invalid metadata.");
- } else if(node == null){
- throw new DataException("Invalid data.");
- }
- this.metadata = metadata;
- this.node = node;
- this.parent = null;
- this.owner = null;
- }
-
- public void addDependency(DataNode dv) {
- if (dependencies == null) {
- dependencies = new HashSet();
- }
- dependencies.add(dv);
- }
-
- public HashSet getDependencies() {
- return dependencies;
- }
-
- public MetaNode getMetadata() {
- return this.metadata;
- }
-
- public Node getNode() {
- return this.node;
- }
-
- public DataConfiguration getOwner() {
- return this.owner;
- }
-
- public void setOwner(DataConfiguration owner) {
- this.owner = owner;
- }
-
- protected void setParent(DataNode node){
- this.parent = node;
- }
-
- public DataNode getParent(){
- return this.parent;
- }
-
-}
diff --git a/src/tools/config/org/eclipse/cyclonedds/config/data/DataValue.java b/src/tools/config/org/eclipse/cyclonedds/config/data/DataValue.java
deleted file mode 100644
index 4e8b184..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/config/data/DataValue.java
+++ /dev/null
@@ -1,296 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-package org.eclipse.cyclonedds.config.data;
-
-import java.util.HashSet;
-
-import org.eclipse.cyclonedds.config.meta.MetaConfiguration;
-import org.eclipse.cyclonedds.config.meta.MetaValue;
-import org.eclipse.cyclonedds.config.meta.MetaValueBoolean;
-import org.eclipse.cyclonedds.config.meta.MetaValueDouble;
-import org.eclipse.cyclonedds.config.meta.MetaValueEnum;
-import org.eclipse.cyclonedds.config.meta.MetaValueFloat;
-import org.eclipse.cyclonedds.config.meta.MetaValueInt;
-import org.eclipse.cyclonedds.config.meta.MetaValueLong;
-import org.eclipse.cyclonedds.config.meta.MetaValueNatural;
-import org.eclipse.cyclonedds.config.meta.MetaValueSize;
-import org.eclipse.cyclonedds.config.meta.MetaValueString;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Text;
-
-public class DataValue extends DataNode {
- private Object value;
- private HashSet DVdependencies = null;
-
- public DataValue(MetaValue metadata, Attr parent, Object value) throws DataException {
- super(metadata, parent);
- this.setValue(value);
- }
-
- public DataValue(MetaValue metadata, Text text) throws DataException {
- super(metadata, text);
- this.setValue(this.node.getNodeValue());
- }
-
- public Object getValue(){
- return this.value;
- }
-
- public void addDataValueDependency(DataValue dv) {
- if (DVdependencies == null) {
- DVdependencies = new HashSet();
- }
- DVdependencies.add(dv);
- }
-
- public HashSet getDataValueDependencies() {
- return DVdependencies;
- }
-
- public void testSetValue(Object value) throws DataException {
- try{
- if (!isEnvironmentVar(value)) {
- if(this.metadata instanceof MetaValueBoolean){
- if(value instanceof String){
- this.value = Boolean.parseBoolean((String)value);
- } else if(!(value instanceof Boolean)){
- throw new NumberFormatException();
- }
- } else if(this.metadata instanceof MetaValueDouble){
- Double tempValue;
- MetaValueNatural mv = (MetaValueNatural)this.metadata;
-
- if(value instanceof String){
- tempValue = Double.parseDouble((String)value);
- } else if(!(value instanceof Double)){
- throw new NumberFormatException();
- } else {
- tempValue = (Double)value;
- }
- Object min = mv.getMinValue();
- Object max = mv.getMaxValue();
-
- if(tempValue.compareTo((Double)min) < 0){
- throw new DataException("<" + this.node.getParentNode().getNodeName() + "> Value: " + tempValue
- + "<" + min);
- } else if(tempValue.compareTo((Double)max) > 0){
- throw new DataException("<" + this.node.getParentNode().getNodeName() + "> Value: " + tempValue
- + ">" + max);
- }
- } else if(this.metadata instanceof MetaValueEnum){
- if(value instanceof String){
- String tmp;
- String[] values = ((MetaValueEnum)this.metadata).getPosValues();
- boolean valid = false;
-
- for(int i=0; i Value: " + tempValue
- + " < " + min);
- } else if(tempValue.compareTo((Float)max) > 0){
- throw new DataException("<" + this.node.getParentNode().getNodeName() + "> Value: " + tempValue
- + " > " + max);
- }
- } else if(this.metadata instanceof MetaValueInt){
- Integer tempValue;
- MetaValueNatural mv = (MetaValueNatural)this.metadata;
-
- if(value instanceof String){
- tempValue = Integer.parseInt((String)value);
- } else if(!(value instanceof Integer)){
- throw new NumberFormatException();
- } else {
- tempValue = (Integer)value;
- }
- Object min = mv.getMinValue();
- Object max = mv.getMaxValue();
-
- if(tempValue.compareTo((Integer)min) < 0){
- throw new DataException("<" + this.node.getParentNode().getNodeName() + "> Value: " + tempValue
- + "<" + min);
- } else if(tempValue.compareTo((Integer)max) > 0){
- throw new DataException("<" + this.node.getParentNode().getNodeName() + "> Value: " + tempValue
- + ">" + max);
- }
- } else if(this.metadata instanceof MetaValueLong){
- Long tempValue;
- MetaValueNatural mv = (MetaValueNatural)this.metadata;
-
- if(value instanceof String){
- tempValue = Long.parseLong((String)value);
- } else if(!(value instanceof Long)){
- throw new NumberFormatException();
- } else {
- tempValue = (Long)value;
- }
- Object min = mv.getMinValue();
- Object max = mv.getMaxValue();
-
- if(tempValue.compareTo((Long)min) < 0){
- throw new DataException("<" + this.node.getParentNode().getNodeName() + "> Value: " + tempValue
- + "<" + min);
- } else if(tempValue.compareTo((Long)max) > 0){
- throw new DataException("<" + this.node.getParentNode().getNodeName() + "> Value: " + tempValue
- + ">" + max);
- }
- } else if(this.metadata instanceof MetaValueSize){
- Long tempValue;
- MetaValueNatural mv = (MetaValueNatural)this.metadata;
-
- if(value instanceof String){
- tempValue = MetaConfiguration.createLongValuefromSizeValue((String)value);
- } else if(!(value instanceof Long)){
- throw new NumberFormatException();
- } else {
- tempValue = (Long)value;
- }
- Object min = mv.getMinValue();
- Object max = mv.getMaxValue();
-
- if(tempValue.compareTo((Long)min) < 0){
- throw new DataException("<" + this.node.getParentNode().getNodeName() + "> Value: " + tempValue
- + "<" + min);
- } else if(tempValue.compareTo((Long)max) > 0){
- throw new DataException("<" + this.node.getParentNode().getNodeName() + "> Value: " + tempValue
- + ">" + max);
- }
- } else if(this.metadata instanceof MetaValueString){
- if(value instanceof String){
- String strValue = (String)value;
-
- if(strValue.startsWith("${") && strValue.endsWith("}")){
- /*Environment variable, this is ok*/
- } else {
- int length = strValue.length();
- int maxLength = ((MetaValueString)this.metadata).getMaxLength();
-
- if((maxLength != 0) && (length > maxLength)){
- throw new DataException("<" + this.node.getParentNode().getNodeName() + "> String length: "
- + length + ">" + maxLength);
- }
- }
- /*
- * check if we got a domain service name element of service
- * tag name element
- */
- if (this.getOwner() != null && this.getOwner().getServiceNames().contains(this)) {
- if (!this.getValue().equals(value)) {
- for (DataValue dv : this.getOwner().getServiceNames()) {
- if (dv.getValue().equals(value)) {
- throw new DataException("Name [" + value + "] is already used by another service");
- }
- }
- }
- }
- } else if(value == null){
- throw new DataException("Null pointer string");
- } else {
- throw new NumberFormatException();
- }
- } else {
- throw new DataException("Found unknown metadata." +
- this.metadata.getClass().toString().substring(
- this.metadata.getClass().toString().lastIndexOf(
- '.') + 10));
- }
- }
- } catch(NumberFormatException nfe){
- if(value == null){
- throw new DataException("Found null pointer for data.");
- }
- throw new DataException("Expected '"
- + this.metadata
- .getClass()
- .toString()
- .substring(
- this.metadata.getClass().toString()
- .lastIndexOf('.') + 10)
- + "', but found '"
- + value.getClass()
- .toString()
- .substring(
- value.getClass().toString()
- .lastIndexOf('.') + 1) + "'.");
-
- }
- }
-
- public boolean isEnvironmentVar(Object value) {
- boolean result = false;
- if (value instanceof String && ((String) value).startsWith("${") && ((String) value).endsWith("}")) {
- result = true;
- }
- return result;
- }
-
- public void setValue(Object value) throws DataException {
- this.testSetValue(value);
-
- this.value = value;
- /*testSetValue succeeded*/
- if(this.node instanceof Attr){
- ((Attr)this.node).setValue(this.value.toString());
- } else if(this.node instanceof Text){
- ((Text)this.node).replaceWholeText(this.value.toString());
- }
-
- if (DVdependencies != null) {
- for (DataValue dv : DVdependencies) {
- Object oldValue = dv.getValue();
- dv.value = value;
- /* testSetValue succeeded */
- if (dv.node instanceof Attr) {
- ((Attr) dv.node).setValue(dv.value.toString());
- } else if (dv.node instanceof Text) {
- ((Text) dv.node).replaceWholeText(dv.value.toString());
- }
- dv.getOwner().notifyValueChanged(dv, oldValue, value);
- }
- }
-
- }
-
- public void resetValue(){
- try {
- this.setValue(((MetaValue)this.metadata).getDefaultValue());
- } catch (DataException e) {
- assert false: "Default value cannot be applied.";
- }
- }
-}
diff --git a/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaAttribute.java b/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaAttribute.java
deleted file mode 100644
index afd4682..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaAttribute.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-package org.eclipse.cyclonedds.config.meta;
-
-public class MetaAttribute extends MetaNode {
- private String name;
- private boolean required;
- private MetaValue value;
-
- public MetaAttribute(String doc, String name, boolean required,
- MetaValue value, String dimension) {
- super(doc, dimension);
- this.name = name;
- this.required = required;
- this.value = value;
- }
-
- public boolean isRequired(){
- return this.required;
- }
-
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public MetaValue getValue() {
- return this.value;
- }
-
- public void setValue(MetaValue value) {
- this.value = value;
- }
-
- @Override
- public boolean equals(Object object){
- MetaAttribute ma;
- boolean result;
-
- if(object instanceof MetaAttribute){
- ma = (MetaAttribute)object;
-
- if(this.name.equals(ma.getName())){
- if(this.required == ma.isRequired()){
- if(this.value.equals(ma.getValue())){
- result = true;
- } else {
- result = false;
- }
- } else {
- result = false;
- }
- } else {
- result = false;
- }
- } else {
- result = false;
- }
- return result;
- }
-
- @Override
- public int hashCode() {
- int var_gen_code;
- int hash = 13;
- var_gen_code = required ? 1 : 0;
- var_gen_code += (null == value ? 0 : value.hashCode());
- var_gen_code += (null == name ? 0 : name.hashCode());
- hash = 31 * hash + var_gen_code;
- return hash;
- }
-
- @Override
- public String toString(){
- String result = "";
- result += "\nAttribute\n";
- result += "-Name: " + this.name + "\n";
- result += "-Required: " + this.required + "\n";
- result += "-Value: " + value.toString();
-
- return result;
- }
-}
diff --git a/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaConfiguration.java b/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaConfiguration.java
deleted file mode 100644
index cd683af..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaConfiguration.java
+++ /dev/null
@@ -1,1085 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-package org.eclipse.cyclonedds.config.meta;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.eclipse.cyclonedds.common.util.Report;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-public class MetaConfiguration {
-
- private final MetaElement rootElement;
- private final ArrayList services;
- private static HashMap serviceMapping = new HashMap();
- private static MetaConfiguration instance = null;
-
-
- private MetaConfiguration(MetaElement rootElement, ArrayList services) {
- this.rootElement = rootElement;
- this.services = services;
- }
-
- public MetaElement getRootElement() {
- return this.rootElement;
- }
-
- public boolean addService(MetaElement element){
- return this.services.add(element);
- }
-
- public MetaElement[] getServices() {
- return this.services.toArray(new MetaElement[this.services.size()]);
- }
-
- public String getCommandForService(String name) {
- return serviceMapping.get(name);
- }
-
- public String getServiceForCommand(String name) {
- String retVal = null;
- for (String service : serviceMapping.keySet()) {
- if (name.equals(serviceMapping.get(service))) {
- return service;
- }
- }
- return retVal;
- }
-
- private static MetaConfiguration load(String fileName){
- MetaConfiguration config = null;
-
- InputStream is = ClassLoader.getSystemResourceAsStream(fileName);
-
- if(is != null){
- config = load(is);
- }
- return config;
- }
-
- public static MetaConfiguration getInstance(){
- if (instance == null) {
- String fileName = "metaconfig.xml";
- instance = MetaConfiguration.load(fileName);
- }
- return instance;
- }
-
- private static MetaConfiguration load(InputStream is){
- MetaConfiguration config = null;
- Document document;
-
- try {
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- DocumentBuilder builder = factory.newDocumentBuilder();
-
- builder.setErrorHandler(new ErrorHandler(){
- @Override
- public void warning(SAXParseException exception) throws SAXException {
-
- }
-
- @Override
- public void error(SAXParseException exception) throws SAXException {
- Report.getInstance().writeErrorLog("Parse error at line: " + exception.getLineNumber() +
- " column: " + exception.getColumnNumber() + ".");
-
- }
-
- @Override
- public void fatalError(SAXParseException exception) throws SAXException {
- Report.getInstance().writeErrorLog("Parse error at line: " + exception.getLineNumber() +
- " column: " + exception.getColumnNumber() + ".");
- }
- });
- document = builder.parse(is);
- config = init(document);
-
- } catch (ParserConfigurationException exc) {
- Report.getInstance().writeErrorLog(exc.getMessage());
- } catch (SAXException exc) {
- Report.getInstance().writeErrorLog(exc.getMessage());
- } catch (IOException exc) {
- Report.getInstance().writeErrorLog(exc.getMessage());
- }
- return config;
- }
-
-
-
- @Override
- public String toString(){
- StringBuffer buf = new StringBuffer();
- buf.append("ROOT_ELEMENT:");
- buf.append(this.rootElement.toString().replaceAll("\n", "\n\t"));
- for(MetaElement me: this.services){
- buf.append("\nSERVICE:\n");
- buf.append(me.toString().replaceAll("\n", "\n\t"));
- }
- return buf.toString();
- }
-
- private static MetaConfiguration init(Document dom){
- Node childElement;
- String childName;
- MetaElement metaElement, rootMetaElement = null;
- MetaConfiguration configuration = null;
- boolean res = true;
-
- try{
- ArrayList metaElements = new ArrayList();
- Element rootElement = dom.getDocumentElement();
-
- NodeList children = rootElement.getChildNodes();
-
- for(int i=0; i metaChildren;
- NodeList children, nodes;
- Node node;
- String nodeName, name;
- int minOccurrences, maxOccurrences;
- String comment = null;
- String dimension = null;
-
- try{
- name = element.getAttribute("name");
-
- //if(!isRootElement){
- minOccurrences = Integer.parseInt(element.getAttribute("minOccurrences"));
- maxOccurrences = Integer.parseInt(element.getAttribute("maxOccurrences"));
-
- if(maxOccurrences == 0){
- maxOccurrences = Integer.MAX_VALUE;
- }
- //} else {
- // minOccurrences = 0;
- // maxOccurrences = Integer.MAX_VALUE;
- //}
- metaChildren = new ArrayList();
- children = element.getChildNodes();
-
- for(int i=0; i metaChildren;
- NodeList children;
- String name, comment, nodeName, dimension;
- int minOccurrences, maxOccurrences;
- Node node;
- NodeList nodes;
-
- try{
- dimension = null;
- comment = parseComment(element);
- name = element.getAttribute("name");
- minOccurrences = Integer.parseInt(element.getAttribute("minOccurrences"));
- maxOccurrences = Integer.parseInt(element.getAttribute("maxOccurrences"));
-
- if(maxOccurrences == 0){
- maxOccurrences = Integer.MAX_VALUE;
- }
-
- if(name != null){
- data = parseValue(element, element.getNodeName().substring(4));
-
- if(data != null){
- metaChildren = new ArrayList();
- metaChildren.add(data);
- children = element.getChildNodes();
-
- for(int i=0; i values = new ArrayList();
- NodeList list;
- Node node;
- String name;
-
- boolean foundDefault = false;
- list = typeElement.getChildNodes();
-
- for(int i=0; i children;
-
- public MetaElement(String doc, String name, int minOccurrences,
- int maxOccurrences, ArrayList children,
- String dimension) {
- super(doc, dimension);
- this.name = name;
- this.minOccurrences = minOccurrences;
- this.maxOccurrences = maxOccurrences;
- this.children = children;
- }
-
- public int getMaxOccurrences() {
- return this.maxOccurrences;
- }
-
- public int getMinOccurrences() {
- return this.minOccurrences;
- }
-
- public String getName() {
- return this.name;
- }
-
- public boolean addChild(MetaNode child){
- return this.children.add(child);
- }
-
- public boolean removeChild(MetaNode child){
- return this.children.remove(child);
- }
-
- public MetaNode[] getChildren(){
- return this.children.toArray(new MetaNode[this.children.size()]);
- }
-
- @Override
- public boolean equals(Object object){
- boolean result;
- MetaElement me;
-
- if(object instanceof MetaElement){
- me = (MetaElement)object;
-
- if(this.name.equals(me.getName())){
- MetaNode[] meChildren = me.getChildren();
- MetaNode[] children = this.getChildren();
-
- if(this.maxOccurrences != me.getMaxOccurrences()){
- result = false;
- } else if(this.minOccurrences != me.getMinOccurrences()){
- result = false;
- } else if(meChildren.length != children.length){
- result = false;
- } else {
- result = true;
-
- for(int i=0; i 0){
- buf.append("-Children: ");
- for(MetaNode child: children){
- buf.append(child.toString().replaceAll("\n", "\n\t"));
- }
- }
- return buf.toString();
- }
-
- public boolean hasElementChildren(){
- for(MetaNode mn: this.getChildren()){
- if(mn instanceof MetaElement){
- return true;
- }
- }
- return false;
- }
-
- public boolean hasValueChildren(){
- for(MetaNode mn: this.getChildren()){
- if(mn instanceof MetaValue){
- return true;
- }
- }
- return false;
- }
-}
diff --git a/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaException.java b/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaException.java
deleted file mode 100644
index 216cd12..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaException.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-package org.eclipse.cyclonedds.config.meta;
-
-public class MetaException extends Exception {
- private static final long serialVersionUID = 4459748108068852410L;
- private MetaExceptionType type;
-
- public MetaException(String message, MetaExceptionType type) {
- super(message);
- this.type = type;
- }
-
- public MetaException(String message) {
- super(message);
- this.type = MetaExceptionType.META_ERROR;
- }
-
- public MetaExceptionType getType() {
- return this.type;
- }
-}
diff --git a/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaExceptionType.java b/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaExceptionType.java
deleted file mode 100644
index 4989aec..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaExceptionType.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-package org.eclipse.cyclonedds.config.meta;
-
-public enum MetaExceptionType {
- META_ERROR, META_UNSUPPORTED, META_CONFIG_PARSE_ERROR
-}
diff --git a/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaNode.java b/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaNode.java
deleted file mode 100644
index 8c5efe3..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaNode.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-package org.eclipse.cyclonedds.config.meta;
-
-public abstract class MetaNode {
- String doc;
- String dimension;
-
- public MetaNode(String doc, String dimension) {
- this.doc = doc;
- this.dimension = dimension;
- }
-
- public String getDoc() {
- return doc;
- }
-
- public void setDoc(String doc) {
- this.doc = doc;
- }
-
- public String getDimension() {
- return this.dimension;
- }
-}
diff --git a/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValue.java b/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValue.java
deleted file mode 100644
index ead300f..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValue.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-package org.eclipse.cyclonedds.config.meta;
-
-public abstract class MetaValue extends MetaNode {
- Object defaultValue;
-
- public MetaValue(String doc, Object defaultValue, String dimension) {
- super(doc, dimension);
- this.defaultValue = defaultValue;
-
- }
-
- public Object getDefaultValue() {
- return this.defaultValue;
- }
-
- public abstract boolean setDefaultValue(Object defaultValue);
-
- @Override
- public String toString(){
- return "Value (" + defaultValue.getClass().toString().substring(defaultValue.getClass().toString().lastIndexOf('.') + 1) + ") DefaultValue: " + defaultValue.toString();
- }
-
- @Override
- public boolean equals(Object object){
- boolean result;
- MetaValue mv;
-
- if(object instanceof MetaValue){
- mv = (MetaValue)object;
- if((this.defaultValue == null) || (mv.getDefaultValue() == null)){
- if(this.defaultValue != mv.getDefaultValue()){
- result = false;
- } else {
- result = true;
- }
- } else if(this.defaultValue.equals(mv.getDefaultValue())){
- result = true;
- } else {
- result = false;
- }
- } else {
- result = false;
- }
- return result;
- }
- @Override
- public int hashCode() {
- int var_gen_code;
- int hash = 13;
- var_gen_code = (null == defaultValue ? 0 : defaultValue.hashCode());
- hash = 31 * hash + var_gen_code;
- return hash;
- }
-}
diff --git a/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValueBoolean.java b/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValueBoolean.java
deleted file mode 100644
index fbf34cd..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValueBoolean.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-package org.eclipse.cyclonedds.config.meta;
-
-public class MetaValueBoolean extends MetaValue {
-
- public MetaValueBoolean(String doc, Boolean defaultValue, String dimension) {
- super(doc, defaultValue, dimension);
- }
-
- @Override
- public boolean setDefaultValue(Object defaultValue) {
- boolean result = false;
-
- if(defaultValue instanceof Boolean){
- this.defaultValue = defaultValue;
- result = true;
- }
- return result;
- }
-}
diff --git a/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValueDouble.java b/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValueDouble.java
deleted file mode 100644
index 1cbb8a4..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValueDouble.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-package org.eclipse.cyclonedds.config.meta;
-
-public class MetaValueDouble extends MetaValueNatural {
- public MetaValueDouble(String doc, Double defaultValue, Double maxValue,
- Double minValue, String dimension) {
- super(doc, defaultValue, maxValue, minValue, dimension);
- }
-
- @Override
- public boolean setMaxValue(Object maxValue) {
- boolean result;
-
- if(maxValue instanceof Double){
- this.maxValue = maxValue;
- result = true;
- } else {
- result = false;
- }
- return result;
- }
-
- @Override
- public boolean setMinValue(Object minValue) {
- boolean result;
-
- if(minValue instanceof Double){
- this.minValue = minValue;
- result = true;
- } else {
- result = false;
- }
- return result;
- }
-
- @Override
- public boolean setDefaultValue(Object defaultValue) {
- boolean result;
-
- if(defaultValue instanceof Double){
- this.defaultValue = defaultValue;
- result = true;
- } else {
- result = false;
- }
- return result;
- }
-}
diff --git a/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValueEnum.java b/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValueEnum.java
deleted file mode 100644
index 4b51c98..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValueEnum.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-package org.eclipse.cyclonedds.config.meta;
-
-import java.util.ArrayList;
-
-public class MetaValueEnum extends MetaValue {
- private ArrayList posValues;
-
- public MetaValueEnum(String doc, String defaultValue,
- ArrayList posValues, String dimension) {
- super(doc, defaultValue, dimension);
- assert(defaultValue != null);
-
- this.posValues = new ArrayList();
-
- if(posValues != null){
- this.posValues.addAll(posValues);
- }
-
- if(!this.posValues.contains(defaultValue)){
- this.posValues.add(defaultValue);
- }
- }
-
- public String[] getPosValues() {
- return this.posValues.toArray(new String[this.posValues.size()]);
- }
-
- public boolean setPosValues(ArrayList posValues) {
- boolean result;
-
- if((posValues != null) && (posValues.size() > 0)){
- this.posValues.clear();
- this.posValues.addAll(posValues);
-
- if(!posValues.contains(defaultValue)){
- this.defaultValue = this.posValues.get(0);
- }
- result = true;
- } else {
- result = false;
- }
- return result;
- }
-
- public boolean addPosValue(String value){
- return this.posValues.add(value);
- }
-
- public boolean removePosValue(String value){
- boolean result;
-
- if(!defaultValue.equals(value)){
- result = this.posValues.remove(value);
- } else {
- result = false;
- }
- return result;
- }
-
- @Override
- public boolean setDefaultValue(Object defaultValue) {
- boolean result = false;
-
- if(defaultValue instanceof String){
- this.defaultValue = defaultValue;
-
- if(!this.posValues.contains(defaultValue)){
- result = this.addPosValue((String)defaultValue);
- }
- } else {
- result = false;
- }
- return result;
- }
-
- @Override
- public int hashCode() {
- int var_gen_code;
- int hash = 13;
- var_gen_code = (null == defaultValue ? 0 : defaultValue.hashCode());
- var_gen_code += (null == posValues ? 0 : posValues.hashCode());
- hash = 31 * hash + var_gen_code;
- return hash;
- }
-}
diff --git a/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValueFloat.java b/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValueFloat.java
deleted file mode 100644
index 591f919..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValueFloat.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-package org.eclipse.cyclonedds.config.meta;
-
-public class MetaValueFloat extends MetaValueNatural {
- public MetaValueFloat(String doc, Float defaultValue, Float maxValue,
- Float minValue, String dimension) {
- super(doc, defaultValue, maxValue, minValue, dimension);
- }
-
- @Override
- public boolean setMaxValue(Object maxValue) {
- boolean result;
-
- if(maxValue instanceof Float){
- this.maxValue = maxValue;
- result = true;
- } else {
- result = false;
- }
- return result;
- }
-
- @Override
- public boolean setMinValue(Object minValue) {
- boolean result;
-
- if(minValue instanceof Float){
- this.minValue = minValue;
- result = true;
- } else {
- result = false;
- }
- return result;
- }
-
- @Override
- public boolean setDefaultValue(Object defaultValue) {
- boolean result;
-
- if(defaultValue instanceof Float){
- this.defaultValue = defaultValue;
- result = true;
- } else {
- result = false;
- }
- return result;
- }
-}
diff --git a/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValueInt.java b/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValueInt.java
deleted file mode 100644
index b7a1c0c..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValueInt.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-package org.eclipse.cyclonedds.config.meta;
-
-public class MetaValueInt extends MetaValueNatural {
-
- public MetaValueInt(String doc, Integer defaultValue, Integer maxValue,
- Integer minValue, String dimension) {
- super(doc, defaultValue, maxValue, minValue, dimension);
- }
-
- @Override
- public boolean setMaxValue(Object maxValue) {
- boolean result;
-
- if(maxValue instanceof Integer){
- this.maxValue = maxValue;
- result = true;
- } else {
- result = false;
- }
- return result;
- }
-
- @Override
- public boolean setMinValue(Object minValue) {
- boolean result;
-
- if(minValue instanceof Integer){
- this.minValue = minValue;
- result = true;
- } else {
- result = false;
- }
- return result;
- }
-
- @Override
- public boolean setDefaultValue(Object defaultValue) {
- boolean result;
-
- if(defaultValue instanceof Integer){
- this.defaultValue = defaultValue;
- result = true;
- } else {
- result = false;
- }
- return result;
- }
-}
diff --git a/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValueLong.java b/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValueLong.java
deleted file mode 100644
index 63cb21b..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValueLong.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-package org.eclipse.cyclonedds.config.meta;
-
-public class MetaValueLong extends MetaValueNatural {
- public MetaValueLong(String doc, Long defaultValue, Long maxValue,
- Long minValue, String dimension) {
- super(doc, defaultValue, maxValue, minValue, dimension);
- }
-
- @Override
- public boolean setMaxValue(Object maxValue) {
- boolean result;
-
- if(maxValue instanceof Long){
- this.maxValue = maxValue;
- result = true;
- } else {
- result = false;
- }
- return result;
- }
-
- @Override
- public boolean setMinValue(Object minValue) {
- boolean result;
-
- if(minValue instanceof Long){
- this.minValue = minValue;
- result = true;
- } else {
- result = false;
- }
- return result;
- }
-
- @Override
- public boolean setDefaultValue(Object defaultValue) {
- boolean result;
-
- if(defaultValue instanceof Long){
- this.defaultValue = defaultValue;
- result = true;
- } else {
- result = false;
- }
- return result;
- }
-}
diff --git a/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValueNatural.java b/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValueNatural.java
deleted file mode 100644
index 65f9d5d..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValueNatural.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-package org.eclipse.cyclonedds.config.meta;
-
-public abstract class MetaValueNatural extends MetaValue {
- Object maxValue;
- Object minValue;
-
- public MetaValueNatural(String doc, Object defaultValue, Object maxValue,
- Object minValue, String dimension) {
- super(doc, defaultValue, dimension);
- this.minValue = minValue;
- this.maxValue = maxValue;
- }
-
- public Object getMaxValue() {
- return this.maxValue;
- }
-
- public Object getMinValue() {
- return this.minValue;
- }
-
- @Override
- public boolean equals(Object object){
- MetaValueNatural mn;
- boolean result = super.equals(object);
-
- if(result){
- if(object instanceof MetaValueNatural){
- mn = (MetaValueNatural)object;
-
- if((mn.getMaxValue() == null) && (this.maxValue != null)){
- result = false;
- } else if((mn.getMaxValue() != null) && (this.maxValue == null)){
- result = false;
- } else if( ((mn.getMaxValue() == null) && (this.maxValue == null)) ||
- ((mn.getMaxValue().equals(this.maxValue))))
- {
- if((mn.getMinValue() == null) && (this.minValue != null)){
- result = false;
- } else if((mn.getMinValue() != null) && (this.minValue == null)){
- result = false;
- } else if( ((mn.getMinValue() == null) && (this.minValue == null)) ||
- ((mn.getMinValue().equals(this.minValue))))
- {
- result = true;
- } else {
- result = false;
- }
- } else {
- result = false;
- }
- } else {
- result = false;
- }
- }
- return result;
- }
-
- @Override
- public int hashCode() {
- int var_gen_code;
- int hash = 13;
- var_gen_code = (null == maxValue ? 0 : maxValue.hashCode());
- var_gen_code += (null == minValue ? 0 : minValue.hashCode());
- hash = 31 * hash + var_gen_code;
- return hash;
- }
-
- public abstract boolean setMaxValue(Object maxValue);
-
- public abstract boolean setMinValue(Object minValue);
-
- @Override
- public String toString(){
- String result = super.toString();
-
- result += ", MaxValue: " + maxValue.toString() + ", MinValue: " + minValue.toString();
-
- return result;
- }
-}
diff --git a/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValueSize.java b/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValueSize.java
deleted file mode 100644
index bcb96bd..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValueSize.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-package org.eclipse.cyclonedds.config.meta;
-
-public class MetaValueSize extends MetaValueNatural {
- public MetaValueSize(String doc, Long defaultValue, Long maxValue,
- Long minValue, String dimension) {
- super(doc, defaultValue, maxValue, minValue, dimension);
- }
-
- @Override
- public boolean setMaxValue(Object maxValue) {
- boolean result;
-
- if(maxValue instanceof Long){
- this.maxValue = maxValue;
- result = true;
- } else {
- result = false;
- }
- return result;
- }
-
- @Override
- public boolean setMinValue(Object minValue) {
- boolean result;
-
- if(minValue instanceof Long){
- this.minValue = minValue;
- result = true;
- } else {
- result = false;
- }
- return result;
- }
-
- @Override
- public boolean setDefaultValue(Object defaultValue) {
- boolean result;
-
- if(defaultValue instanceof Long){
- this.defaultValue = defaultValue;
- result = true;
- } else {
- result = false;
- }
- return result;
- }
-}
diff --git a/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValueString.java b/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValueString.java
deleted file mode 100644
index e6d358a..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/config/meta/MetaValueString.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-package org.eclipse.cyclonedds.config.meta;
-
-public class MetaValueString extends MetaValue {
- private int maxLength;
-
- public MetaValueString(String doc, String defaultValue, int maxLength,
- String dimension) {
- super(doc, defaultValue, dimension);
- this.maxLength = maxLength;
- }
-
- public int getMaxLength() {
- return this.maxLength;
- }
-
- public void setMaxLength(int maxLength) {
- this.maxLength = maxLength;
- }
-
- @Override
- public boolean setDefaultValue(Object defaultValue) {
- boolean result = false;
-
- if(defaultValue instanceof String){
- this.defaultValue = defaultValue;
- result = true;
- }
- return result;
- }
- @Override
- public int hashCode() {
- int var_gen_code;
- int hash = 13;
- var_gen_code = (null == defaultValue ? 0 : defaultValue.hashCode());
- var_gen_code += maxLength;
- hash = 31 * hash + var_gen_code;
- return hash;
- }
-}
diff --git a/src/tools/config/org/eclipse/cyclonedds/config/swing/ConfigTransferHandler.java b/src/tools/config/org/eclipse/cyclonedds/config/swing/ConfigTransferHandler.java
deleted file mode 100644
index 0e83cf9..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/config/swing/ConfigTransferHandler.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-package org.eclipse.cyclonedds.config.swing;
-
-import java.awt.datatransfer.DataFlavor;
-import java.awt.datatransfer.Transferable;
-import java.io.File;
-import java.net.URI;
-import java.util.List;
-
-import javax.swing.JComponent;
-import javax.swing.TransferHandler;
-
-@SuppressWarnings("serial")
-public class ConfigTransferHandler extends TransferHandler {
- private final ConfigWindow view;
-
- public ConfigTransferHandler(ConfigWindow view){
- this.view = view;
- }
- @Override
- public boolean canImport(JComponent comp, DataFlavor[] transferFlavors) {
- for(DataFlavor flavor: transferFlavors){
- if(flavor.equals(DataFlavor.javaFileListFlavor)){
- view.setStatus("Drag here to open " +
- flavor.getHumanPresentableName() + " file.", false);
- return true;
- } else if(flavor.equals(DataFlavor.stringFlavor)){
- view.setStatus("Drag here to open " +
- flavor.getHumanPresentableName() + " file.", false);
- return true;
- }
- }
- view.setStatus("Warning: Unsupported type.", false);
-
- return false;
- }
-
- @Override
- public boolean importData(JComponent comp, Transferable t) {
- if (!canImport(comp, t.getTransferDataFlavors())) {
- view.setStatus("Warning: Unsupported type", false);
- return false;
- }
- try{
- if(t.isDataFlavorSupported(DataFlavor.javaFileListFlavor)){
- @SuppressWarnings("unchecked")
- List files = (List) t.getTransferData(DataFlavor.javaFileListFlavor);
-
- if(files.size() == 1){
- File file = files.get(0);
- view.getController().handleOpen(file);
- } else {
- return false;
- }
- } else if(t.isDataFlavorSupported(DataFlavor.stringFlavor)){
- String str = (String) t.getTransferData(DataFlavor.stringFlavor);
-
- if(str.startsWith("file:/")){
- File f = new File(new URI(str));
- view.getController().handleOpen(f);
- } else {
- view.setStatus("Warning: Unsupported file.", false);
- }
- } else {
- view.setStatus("Warning: Unsupported drag-and-drop type", false);
- }
- } catch (Exception e) {
- view.setStatus("Warning: " + e.getMessage(), false);
- return false;
- }
- return true;
- }
-}
diff --git a/src/tools/config/org/eclipse/cyclonedds/config/swing/ConfigUtil.java b/src/tools/config/org/eclipse/cyclonedds/config/swing/ConfigUtil.java
deleted file mode 100644
index 8e172f3..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/config/swing/ConfigUtil.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-package org.eclipse.cyclonedds.config.swing;
-
-import org.eclipse.cyclonedds.config.data.DataAttribute;
-import org.eclipse.cyclonedds.config.data.DataElement;
-import org.eclipse.cyclonedds.config.data.DataNode;
-import org.eclipse.cyclonedds.config.meta.MetaAttribute;
-import org.eclipse.cyclonedds.config.meta.MetaElement;
-import org.eclipse.cyclonedds.config.meta.MetaNode;
-
-public class ConfigUtil {
- public static String getExtendedDataElementString(DataElement element){
- String firstAttrChild;
- DataNode[] children;
- String name;
- String result = null;
-
- if(element != null){
- children = element.getChildren();
- firstAttrChild = null;
-
- for(int j=0; (j appLogos = null;
-
-
- private DataNodePopup popupSupport = null;
- private ConfigTransferHandler transferHandler = null;
-
- private String windowTitle = "Eclipse Cyclone DDS Configurator";
-
- public static String SERVICE_LABEL = "Component";
- public static String SERVICE_TEXT = "component";
-
- /**
- * This is the default constructor
- */
- public ConfigWindow() {
- super();
- initialize();
- }
-
- public ConfigWindow(String uri) {
- super();
- initialize();
- controller.handleOpenFromUri(uri);
- }
-
- public DataConfiguration getConfig() {
- return config;
- }
-
- public void setDataConfiguration(DataConfiguration config){
- DataElement[] services;
-
- if(this.config != null){
- this.config.removeDataConfigurationListener(this);
- int count = mainTabbedPane.getComponentCount();
-
- for(int i=0; i < count; i++){
- mainTabbedPane.remove(0);
- }
- }
- this.config = config;
-
- if(this.config != null){
- this.config.addDataConfigurationListener(this);
- services = config.getServices();
-
- for(int i=0; i < services.length; i++){
- ServicePanel servicePanel = new ServicePanel(services[i], this.statusPanel);
- servicePanel.setTransferHandler(transferHandler);
- mainTabbedPane.addTab(
- ConfigUtil.getExtendedDataElementString(services[i]),
- servicePanel);
- }
- }
- this.updateMenus();
- }
-
- @Override
- public void nodeAdded(DataElement parent, DataNode nodeAdded) {
- this.updateMenus();
-
- if(parent.equals(this.config.getRootElement())){
- if(nodeAdded instanceof DataElement){
- final DataElement service = (DataElement)nodeAdded;
-
- Runnable worker = new Runnable(){
- @Override
- public void run(){
- ServicePanel servicePanel = new ServicePanel(service, statusPanel);
- servicePanel.setTransferHandler(transferHandler);
- mainTabbedPane.addTab(
- ConfigUtil.getExtendedDataElementString(service),
- servicePanel);
- }
- };
- SwingUtilities.invokeLater(worker);
- }
- }
- }
-
- @Override
- public void nodeRemoved(DataElement parent, DataNode nodeRemoved) {
- this.updateMenus();
-
- if(parent.equals(this.config.getRootElement())){
- if(nodeRemoved instanceof DataElement){
- final DataElement service = (DataElement)nodeRemoved;
-
- Runnable worker = new Runnable(){
- @Override
- public void run(){
- ServicePanel servicePanel;
- boolean found = false;
-
- for(int i=0; (i";
- }
- } else {
- title = this.windowTitle;
- }
- this.setTitle(title);
- }
-
- private DataNodeMenuItem getAddServiceItem(MetaElement service){
- int curOcc = 0;
- DataNodeMenuItem item = new DataNodeMenuItem(
- service.getName(),
- this.config.getRootElement(), service);
-
- for(DataElement s: config.getServices()){
- if(s.getMetadata().equals(service)){
- curOcc++;
- }
- }
- if(curOcc < service.getMaxOccurrences()){
- item.setEnabled(true);
- } else {
- item.setEnabled(false);
- }
- item.setActionCommand("addService");
- item.addActionListener(this.popupSupport);
- return item;
- }
-
- private DataNodeMenuItem getRemoveServiceItem(DataElement service){
- int curOcc = 0;
- MetaElement metaService = (MetaElement)service.getMetadata();
- DataNodeMenuItem item = new DataNodeMenuItem(
- ConfigUtil.getExtendedDataElementString(service),
- service, null);
-
- for(DataElement s: config.getServices()){
- if(s.getMetadata().equals(metaService)){
- curOcc++;
- }
- }
- if(curOcc > metaService.getMinOccurrences()){
- item.setEnabled(true);
- } else {
- item.setEnabled(false);
- }
- item.setActionCommand("removeService");
- item.addActionListener(this.popupSupport);
- return item;
- }
-
- /**
- * This method initializes this
- *
- * @return void
- */
- private void initialize() {
- this.setSize(800, 600);
- this.controller = new ConfigWindowController(this);
- this.popupSupport = new DataNodePopup();
- this.transferHandler = new ConfigTransferHandler(this);
- this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
- this.setJMenuBar(getConfigMenuBar());
- this.setLocationRelativeTo(this.getParent());
- this.setContentPane(getJContentPane());
-
- this.addWindowListener(new WindowAdapter() {
- @Override
- public void windowClosing(WindowEvent e) {
- controller.actionPerformed(
- new ActionEvent(exitItem, 0, "exit"));
- }
- });
- this.updateMenus();
- this.setAppLogo();
- }
-
- /**
- * This method initializes jContentPane
- *
- * @return javax.swing.JPanel
- */
- private JPanel getJContentPane() {
- if (jContentPane == null) {
- jContentPane = new JPanel();
- jContentPane.setLayout(new BorderLayout());
- jContentPane.add(getMainTabbedPane(), BorderLayout.CENTER);
- jContentPane.add(getStatusPanel(), BorderLayout.SOUTH);
- }
- return jContentPane;
- }
-
- /**
- * This method initializes statusPanel.
- *
- * @return The status panel of the window.
- */
- @Override
- protected StatusPanel getStatusPanel() {
- if (statusPanel == null) {
- statusPanel = new StatusPanel(300, "Ready", false, true);
- }
- return statusPanel;
- }
-
- /**
- * This method initializes configMenuBar
- *
- * @return javax.swing.JMenuBar
- */
- private JMenuBar getConfigMenuBar() {
- if (configMenuBar == null) {
- configMenuBar = new JMenuBar();
- configMenuBar.add(getFileMenu());
- configMenuBar.add(getEditMenu());
- configMenuBar.add(getHelpMenu());
- }
- return configMenuBar;
- }
-
- /**
- * This method initializes mainTabbedPane
- *
- * @return javax.swing.JTabbedPane
- */
- private JTabbedPane getMainTabbedPane() {
- if (mainTabbedPane == null) {
- mainTabbedPane = new JTabbedPane();
- mainTabbedPane.setTransferHandler(this.transferHandler);
- }
- return mainTabbedPane;
- }
-
- /**
- * This method initializes fileMenu
- *
- * @return javax.swing.JMenu
- */
- private JMenu getFileMenu() {
- if (fileMenu == null) {
- fileMenu = new JMenu();
- fileMenu.setText("File");
- fileMenu.setMnemonic(KeyEvent.VK_F);
- fileMenu.add(getNewItem());
- fileMenu.add(getOpenItem());
- fileMenu.add(getCloseItem());
- fileMenu.addSeparator();
- fileMenu.add(getSaveItem());
- fileMenu.add(getSaveAsItem());
- fileMenu.addSeparator();
- fileMenu.add(getPrintItem());
- fileMenu.addSeparator();
- fileMenu.add(getExitItem());
- }
- return fileMenu;
- }
-
- private JMenu getEditMenu(){
- if (editMenu == null){
- editMenu = new JMenu();
- editMenu.setText("Edit");
- editMenu.setMnemonic(KeyEvent.VK_E);
- editMenu.add(getAddServiceMenu());
- editMenu.add(getRemoveServiceMenu());
- }
- return editMenu;
- }
-
- private JMenu getHelpMenu(){
- if (helpMenu == null){
- helpMenu = new JMenu();
- helpMenu.setText("Help");
- helpMenu.setMnemonic(KeyEvent.VK_H);
- helpMenu.add(getHelpContentsItem());
- }
- return helpMenu;
- }
-
- private JMenuItem getHelpContentsItem(){
- if (helpContentsItem == null){
- helpContentsItem = new JMenuItem();
- helpContentsItem.setText("Help Contents");
- helpContentsItem.setMnemonic(KeyEvent.VK_C);
- helpContentsItem.setActionCommand("help");
- helpContentsItem.addActionListener(getController());
- helpContentsItem.setAccelerator(KeyStroke.getKeyStroke("control H"));
- }
- return helpContentsItem;
- }
-
- private JMenu getAddServiceMenu(){
- if (addServiceMenu == null){
- addServiceMenu = new JMenu();
- addServiceMenu.setText("Add " + SERVICE_LABEL);
- addServiceMenu.setMnemonic(KeyEvent.VK_A);
- }
- return addServiceMenu;
- }
-
- private JMenu getRemoveServiceMenu(){
- if (removeServiceMenu == null){
- removeServiceMenu = new JMenu();
- removeServiceMenu.setText("Remove " + SERVICE_LABEL);
- removeServiceMenu.setMnemonic(KeyEvent.VK_R);
- }
- return removeServiceMenu;
- }
-
- /**
- * This method initializes newItem
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getNewItem() {
- if (newItem == null) {
- newItem = new JMenuItem();
- newItem.setText("New...");
- newItem.setMnemonic(KeyEvent.VK_N);
- newItem.setAccelerator(KeyStroke.getKeyStroke("control N"));
- newItem.setActionCommand("new");
- newItem.addActionListener(controller);
- }
- return newItem;
- }
-
- /**
- * This method initializes openItem
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getOpenItem() {
- if (openItem == null) {
- openItem = new JMenuItem();
- openItem.setText("Open...");
- openItem.setMnemonic(KeyEvent.VK_O);
- openItem.setAccelerator(KeyStroke.getKeyStroke("control O"));
- openItem.setActionCommand("open");
- openItem.addActionListener(controller);
- }
- return openItem;
- }
-
- /**
- * This method initializes saveItem
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getSaveItem() {
- if (saveItem == null) {
- saveItem = new JMenuItem();
- saveItem.setText("Save");
- saveItem.setMnemonic(KeyEvent.VK_S);
- saveItem.setAccelerator(KeyStroke.getKeyStroke("control S"));
- saveItem.setActionCommand("save");
- saveItem.addActionListener(controller);
- }
- return saveItem;
- }
-
- /**
- * This method initializes closeItem
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getCloseItem() {
- if (closeItem == null) {
- closeItem = new JMenuItem();
- closeItem.setText("Close");
- closeItem.setMnemonic(KeyEvent.VK_C);
- closeItem.setActionCommand("close");
- closeItem.addActionListener(controller);
- }
- return closeItem;
- }
-
- /**
- * This method initializes saveAsItem
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getSaveAsItem() {
- if (saveAsItem == null) {
- saveAsItem = new JMenuItem();
- saveAsItem.setText("Save As...");
- saveAsItem.setMnemonic(KeyEvent.VK_A);
- saveAsItem.setActionCommand("save_as");
- saveAsItem.addActionListener(controller);
- }
- return saveAsItem;
- }
-
- /**
- * This method initializes exitItem
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getExitItem() {
- if (exitItem == null) {
- exitItem = new JMenuItem();
- exitItem.setText("Exit");
- exitItem.setMnemonic(KeyEvent.VK_X);
- exitItem.setAccelerator(KeyStroke.getKeyStroke("alt F4"));
- exitItem.setActionCommand("exit");
- exitItem.addActionListener(controller);
- }
- return exitItem;
- }
-
- /**
- * This method initializes printItem
- *
- * @return javax.swing.JMenuItem
- */
- private JMenuItem getPrintItem() {
- if (printItem == null) {
- printItem = new JMenuItem();
- printItem.setText("Print...");
- printItem.setMnemonic(KeyEvent.VK_P);
- printItem.setAccelerator(KeyStroke.getKeyStroke("control P"));
- printItem.setActionCommand("print");
- printItem.addActionListener(controller);
- }
- return printItem;
- }
-
- /**
- * Set the Logo image to be used in Configurator's window and taskbar button.
- */
- private void setAppLogo() {
- if (appLogos == null) {
- try {
- List imgUrls = new ArrayList(4);
- // Expected location of the icons in tuner jar
- //URL url = getClass().getResource("/resources/LOGO.png");
- //imgUrls.add(url != null ? url : getClass().getResource("/ptlogoc16.png"));
-
- appLogos = new ArrayList(4);
- for (URL imgUrl : imgUrls) {
- if (imgUrl != null) {
- appLogos.add(Toolkit.getDefaultToolkit().getImage(imgUrl));
- }
- }
- this.setIconImages(appLogos);
- } catch (Exception e) {}
- }
- }
-}
diff --git a/src/tools/config/org/eclipse/cyclonedds/config/swing/ConfigWindowController.java b/src/tools/config/org/eclipse/cyclonedds/config/swing/ConfigWindowController.java
deleted file mode 100644
index 2611ff8..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/config/swing/ConfigWindowController.java
+++ /dev/null
@@ -1,581 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-package org.eclipse.cyclonedds.config.swing;
-
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.WindowAdapter;
-import java.awt.event.WindowEvent;
-import java.awt.print.PrinterJob;
-import java.io.File;
-
-import javax.print.attribute.HashPrintRequestAttributeSet;
-import javax.print.attribute.PrintRequestAttributeSet;
-import javax.print.attribute.standard.Copies;
-import javax.print.attribute.standard.MediaSizeName;
-import javax.swing.JFileChooser;
-import javax.swing.JOptionPane;
-import javax.swing.SwingUtilities;
-import javax.swing.filechooser.FileFilter;
-
-import org.eclipse.cyclonedds.common.util.Report;
-import org.eclipse.cyclonedds.config.data.DataConfiguration;
-import org.eclipse.cyclonedds.config.data.DataException;
-import org.eclipse.cyclonedds.config.meta.MetaConfiguration;
-
-public class ConfigWindowController implements ActionListener {
-
-
- private final ConfigWindow view;
- private HelpWindow helpView;
- private boolean closeInProgress;
- private boolean exitInProgress;
- private boolean newInProgress;
- private boolean openInProgress;
- private File curFile;
- private final JFileChooser openFileChooser;
- private final JFileChooser saveFileChooser;
-
- public ConfigWindowController(ConfigWindow view){
- this.view = view;
- this.closeInProgress = false;
- this.exitInProgress = false;
- this.newInProgress = false;
- this.openInProgress = false;
- this.openFileChooser = new JFileChooser();
- this.saveFileChooser = new JFileChooser();
- this.curFile = null;
- this.helpView = null;
-
- // Initialize the MetaConfiguration. This is done so the Configurator can know for
- // which product its meant for, according to the meta config file.
- MetaConfiguration.getInstance();
- view.setWindowTitle();
-
- File f = null;
- String fileSep = System.getProperty("file.separator");
-
- f = new File(System.getProperty("user.dir") + fileSep);
- this.openFileChooser.setCurrentDirectory(f);
- this.openFileChooser.setDialogTitle("Open configuration");
- this.openFileChooser.setMultiSelectionEnabled(false);
- this.openFileChooser.setFileFilter(new ConfigChooseFilter());
- this.openFileChooser.setAcceptAllFileFilterUsed(false);
- this.openFileChooser.setApproveButtonText("Open");
-
- this.saveFileChooser.setCurrentDirectory(f);
- this.saveFileChooser.setDialogTitle("Save configuration");
- this.saveFileChooser.setMultiSelectionEnabled(false);
- this.saveFileChooser.setFileFilter(new ConfigChooseFilter());
- this.saveFileChooser.setAcceptAllFileFilterUsed(false);
- this.saveFileChooser.setApproveButtonText("Save");
- }
-
- @Override
- public void actionPerformed(ActionEvent e) {
- String command = e.getActionCommand();
-
- try{
- if("exit".equals(command)){
- this.exitInProgress = true;
- this.handleConditionalSave();
- } else if("close".equals(command)){
- this.closeInProgress = true;
- this.handleConditionalSave();
- } else if("save".equals(command)){
- this.handleSave(false);
- } else if("save_as".equals(command)){
- this.handleSave(true);
- } else if("new".equals(command)){
- this.newInProgress = true;
- this.handleConditionalSave();
- } else if("open".equals(command)){
- this.openInProgress = true;
- this.handleConditionalSave();
- } else if("print".equals(command)){
- this.handlePrint();
- } else if("help".equals(command)){
- this.handleHelp();
- } else if("cancel".equals(command)){
- this.handleCancel();
- } else {
- this.handleSetStatus("Warning: Command '" + command + "' not implemented.", false, false);
- }
- } catch(Exception ex){
- this.handleSetStatus("Error: " + ex.getMessage(), false, false);
- this.printStackTrace(ex);
- this.handleSetEnabled(true);
- }
- }
-
- private void handleConditionalSave(){
- DataConfiguration config = view.getDataConfiguration();
-
- if(config == null){
- this.handleNextAction();
- } else if(config.isUpToDate()){
- this.handleNextAction();
- } else {
- int answer = JOptionPane.showConfirmDialog(
- this.view,
- "Configuration has changed. Save changes?",
- "Close configuration",
- JOptionPane.YES_NO_CANCEL_OPTION);
-
- if(answer == JOptionPane.YES_OPTION){
- this.handleSave(false);
- } else if(answer == JOptionPane.NO_OPTION){
- this.handleNextAction();
- } else {
- this.handleCancel();
- }
- }
- }
-
- private void handlePrint(){
- final DataConfiguration config = view.getDataConfiguration();
-
- if(config == null){
- this.handleSetStatus("No configuration to print.", false);
- } else {
- this.handleSetStatus("Printing configuration...", true);
- this.handleSetEnabled(false);
-
- Runnable worker = new Runnable(){
- @Override
- public void run(){
- try {
- PrinterJob pjob = PrinterJob.getPrinterJob();
- PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
- aset.add(MediaSizeName.ISO_A4);
- aset.add(new Copies(1));
- boolean doPrint = pjob.printDialog(aset);
-
- if(doPrint){
- /*
- if(currentDialog != null){
- currentDialog.setStatus(null, true);
- }
- DocFlavor flavor = DocFlavor.INPUT_STREAM.POSTSCRIPT;
- Doc doc = new SimpleDoc(config.toString(), flavor, null);
- DocPrintJob docPrintJob = pjob.getPrintService().createPrintJob();
- docPrintJob.print(doc, aset);
- handleSetStatus("Configuration printed.", true);
- */
- view.setStatus("Warning: Printing not supported yet.", false);
- handleSetEnabled(true);
- } else {
- handleCancel();
- }
- } catch (Exception e) {
- view.setStatus("Error:" + e.getMessage(), false);
- handleSetEnabled(true);
- }
- }
- };
- SwingUtilities.invokeLater(worker);
- }
- }
-
- private void handleExit(){
- this.exitInProgress = false;
- view.dispose();
- System.exit(0);
- }
-
- public void handleOpen(File file){
- this.curFile = file;
- this.openInProgress = true;
- this.handleConditionalSave();
- }
-
- private void handleOpen(){
- openInProgress = false;
- File file = null;
-
- if(this.curFile != null){
- file = this.curFile;
- } else {
- int returnVal = this.openFileChooser.showOpenDialog(this.view);
-
- if (returnVal == JFileChooser.APPROVE_OPTION) {
- file = this.openFileChooser.getSelectedFile();
- } else {
- this.handleSetStatus("No file opened", false, false);
- this.handleNextAction();
- }
- }
-
- if(file != null){
- final File f = file;
- this.handleSetEnabled(false);
- view.setStatus("Opening configuration from " + f.getAbsolutePath() + "...", true, true);
- view.repaint();
-
- Runnable worker = new Runnable(){
- @Override
- public void run(){
- view.setDataConfiguration(null);
- DataConfiguration config = null;
-
- try {
- config = new DataConfiguration(f, false);
- } catch (DataException e) {
- Report.getInstance().writeInfoLog("ConfigWindowController handleOpen\n" + e.getMessage());
- }
- if(config != null){
- view.setDataConfiguration(config);
- view.setStatus("Configuration opened.", false);
- } else {
- view.setStatus("Configuration could not be opened.", false);
- }
- handleNextAction();
- }
- };
- SwingUtilities.invokeLater(worker);
- }
- this.curFile = null;
- }
-
- public void handleOpenFromUri(String uri) {
- openInProgress = false;
- File file = null;
-
- if (uri.startsWith("file://")) {
- /* strip off file:// */
- uri = uri.substring(7);
- }
- file = new File(uri);
-
- final File f = file;
- this.handleSetEnabled(false);
- view.setStatus("Opening configuration from " + f.getAbsolutePath()
- + "...", true, true);
- view.repaint();
-
- Runnable worker = new Runnable() {
- @Override
- public void run() {
- view.setDataConfiguration(null);
- DataConfiguration config = null;
-
- try {
- config = new DataConfiguration(f, false);
- } catch (DataException e) {
- Report.getInstance().writeInfoLog(
- "ConfigWindowController handleOpen\n"
- + e.getMessage());
- int answer = JOptionPane.showConfirmDialog(
- view,
- "The configuration is not valid.\nReason: "
- + e.getMessage()
- + "\nTry automatic repairing?",
- "Invalid configuration", JOptionPane.YES_NO_OPTION);
-
- if (answer == JOptionPane.YES_OPTION) {
- try {
- config = new DataConfiguration(f, true);
- view.setStatus(
- "Configuration repaired successfully.",
- false);
- } catch (DataException e1) {
- JOptionPane.showMessageDialog(view,
- "Configuration could not be repaired.\nReason: '"
- + e.getMessage() + "'", "Error",
- JOptionPane.ERROR_MESSAGE);
- handleSetStatus(
- "Configuration could not be repaired.",
- false);
- handleNextAction();
- }
- } else if (answer == JOptionPane.NO_OPTION) {
- handleSetStatus("Configuration not opened.", false);
- handleNextAction();
- }
- }
- if (config != null) {
- view.setDataConfiguration(config);
- view.setStatus("Configuration opened.", false);
- handleNextAction();
- }
- }
- };
- SwingUtilities.invokeLater(worker);
- this.curFile = null;
- }
-
- private void handleSave(boolean alwaysAskFile){
- int returnVal;
- File file;
- int answer;
- String path;
- boolean proceed = false;
-
- final DataConfiguration config = view.getDataConfiguration();
-
- if(config == null){
- this.handleCancel("Warning: No configuration to save.");
- return;
- }
-
- this.handleSetEnabled(false);
-
- if((!alwaysAskFile) && (config.getFile() != null)){
- this.handleSetStatus("Saving configuration to: " + config.getFile().getAbsolutePath() + "...", true);
-
- Runnable worker = new Runnable(){
- @Override
- public void run(){
- try {
- config.store(true);
- view.setStatus("Configuration saved.", false, false);
- handleNextAction();
- } catch (DataException e) {
- handleSetStatus("Error: Cannot save configuration to: " +
- config.getFile().getAbsolutePath(),
- false);
- handleNextAction();
- }
- }
- };
- SwingUtilities.invokeLater(worker);
- } else {
- try{
- do {
- answer = JOptionPane.CANCEL_OPTION;
- saveFileChooser.setSelectedFile(config.getFile());
- returnVal = this.saveFileChooser.showSaveDialog(this.view);
-
- if (returnVal == JFileChooser.APPROVE_OPTION) {
- file = this.saveFileChooser.getSelectedFile();
- path = file.getAbsolutePath();
-
- if(!path.endsWith(ConfigChooseFilter.CONFIG_SUFFIX)){
- path = path + ConfigChooseFilter.CONFIG_SUFFIX;
- file = new File(path);
- }
-
- this.handleSetStatus("Saving configuration to: " + file.getAbsolutePath() + "...", true);
-
- if(file.equals(config.getFile())){
- proceed = true;
- } else if (file.exists()){
- answer = JOptionPane.showConfirmDialog(
- this.view,
- "The file '" + path + "' already exists. Overwrite?",
- "File already exists",
- JOptionPane.YES_NO_CANCEL_OPTION);
-
- if(answer == JOptionPane.YES_OPTION){
- proceed = true;
- config.setFile(file);
- } else if(answer == JOptionPane.NO_OPTION){
- proceed = false;
- } else {
- proceed = false;
- this.handleNextAction();
- }
- } else {
- config.setFile(file);
- proceed = true;
- }
- } else {
- proceed = false;
- this.handleNextAction();
- }
- } while(answer == JOptionPane.NO_OPTION);
-
- if(proceed){
- this.handleSetStatus("Saving configuration to: " + config.getFile().getAbsolutePath() + "...", true);
-
- Runnable worker = new Runnable(){
- @Override
- public void run(){
- try {
- config.store(true);
- view.setStatus("Configuration saved.", false, false);
- handleNextAction();
- } catch (DataException e) {
- view.setStatus("Error:" + e.getMessage(), false);
- handleSetEnabled(true);
- }
- }
- };
- SwingUtilities.invokeLater(worker);
- }
- } catch (DataException e) {
- this.handleSetStatus("Error: " + e.getMessage(), false);
- handleSetEnabled(true);
- } catch(Exception exc){
- this.handleSetStatus("Error: " + exc.getMessage(), false);
- handleSetEnabled(true);
- }
- }
- }
-
- private void handleHelp(){
- if(helpView != null){
- helpView.toFront();
- } else {
- view.setStatus("Opening help for configuration...", true, true);
- this.handleSetEnabled(false);
-
- Runnable worker = new Runnable(){
- @Override
- public void run(){
- MetaConfiguration metaConfig = MetaConfiguration.getInstance();
- if (metaConfig != null) {
- helpView = new HelpWindow(metaConfig);
- helpView.setLocationRelativeTo(view);
- view.setStatus("Help pane openened.", false, false);
- handleSetEnabled(true);
- helpView.addWindowListener(new WindowAdapter(){
- @Override
- public void windowClosed(WindowEvent e) {
- helpView = null;
- }
- });
- helpView.setVisible(true);
- helpView.toFront();
- } else {
- view.setStatus("Failed to open the configuration help", true, false);
- }
- }
- };
- SwingUtilities.invokeLater(worker);
- }
- }
-
- private void handleNew(){
- view.setStatus("Creating new configuration...", true, true);
- this.handleSetEnabled(false);
-
- Runnable worker = new Runnable(){
- @Override
- public void run(){
- view.setDataConfiguration(null);
- newInProgress = false;
- try {
- DataConfiguration config = new DataConfiguration();
- view.setDataConfiguration(config);
- view.setStatus("New configuration created.", false, false);
- } catch (DataException e) {
-
- view.setStatus("Error: Could not create new configuration.", false, false);
- }
- handleSetEnabled(true);
- }
- };
- SwingUtilities.invokeLater(worker);
- }
-
- private void handleClose(){
- view.setStatus("Closing configuration...", true, true);
- this.handleSetEnabled(false);
-
- Runnable worker = new Runnable(){
- @Override
- public void run(){
- view.setDataConfiguration(null);
- closeInProgress = false;
- view.setStatus("Configuration closed.", false);
- handleSetEnabled(true);
- }
- };
- SwingUtilities.invokeLater(worker);
- }
-
- private void handleNextAction(){
- if(closeInProgress){
- handleClose();
- } else if(exitInProgress){
- exitInProgress = false;
- handleExit();
- } else if(newInProgress){
- handleNew();
- } else if(openInProgress){
- handleOpen();
- } else {
- handleSetEnabled(true);
- }
- }
-
- private void handleCancel(){
- view.setStatus("Action cancelled.", false);
- this.handleSetEnabled(true);
- }
-
- private void handleCancel(String message){
- view.setStatus(message, false);
- this.handleSetEnabled(true);
- }
-
- private void handleSetEnabled(boolean enabled){
- if(enabled){
- this.view.enableView();
- } else {
- this.view.disableView();
- }
- this.view.setActionsEnabled(enabled);
- }
-
- private void handleSetStatus(String message, boolean persistent, boolean busy){
- this.view.setStatus(message, persistent, busy);
-
- }
-
- private void handleSetStatus(String message, boolean persistent){
- this.view.setStatus(message, persistent, false);
- }
-
- private void printStackTrace(Exception exception){
- StackTraceElement[] elements = exception.getStackTrace();
- StringBuffer buf = new StringBuffer();
- buf.append("The following exception occurred: \n");
-
- for(int i=0; i nodes;
- private DataConfiguration configuration;
-
- public DataElementTableModel(){
- super();
- this.element = null;
- this.configuration = null;
- this.nodes = new ArrayList();
- this.addColumn("Name");
- this.addColumn("Value");
-
- }
-
- public void setElement(DataElement element){
- if(this.element != null){
- this.clear();
- }
- if(element != null){
- this.element = element;
- this.initElement();
-
- if(!this.element.getOwner().equals(this.configuration)){
- if(this.configuration != null){
- this.configuration.removeDataConfigurationListener(this);
- }
- this.configuration = this.element.getOwner();
- this.configuration.addDataConfigurationListener(this);
- }
- }
- }
-
- @Override
- public void nodeAdded(DataElement parent, DataNode nodeAdded) {
- DataNode parentParent;
-
- if(parent.equals(this.element)){
- this.clear();
- this.initElement();
- } else {
- parentParent = parent.getParent();
-
- if(this.element.equals(parentParent)){
- this.clear();
- this.initElement();
- }
- }
- }
-
- @Override
- public void nodeRemoved(DataElement parent, DataNode nodeRemoved) {
- if(nodeRemoved.equals(this.element)){
- this.setElement(null);
- } else if(this.nodes.contains(nodeRemoved)){
- this.clear();
- this.initElement();
- } else if(this.containsNodeAsParent(nodeRemoved)){
- this.clear();
- this.initElement();
- }
- }
-
- private boolean containsNodeAsParent(DataNode node){
- for(DataNode n: this.nodes){
- if(n.getParent().equals(node)){
- return true;
- }
- }
- return false;
- }
-
- @Override
- public void valueChanged(DataValue data, Object oldValue, Object newValue) {
- final int index = this.nodes.indexOf(data);
- final Object v = newValue;
-
- if(index != -1){
- /*System.out.println("Value changed: data: " + data + ", oldValue: " + oldValue + " newValue: " + newValue + "(row=" + index +", col=1)");*/
-
- SwingUtilities.invokeLater(new Runnable(){
- @Override
- public void run() {
- setValueAt(v, index, 1);
- }
- });
- }
- }
-
- public DataNode getNodeAt(int index){
- DataNode result;
-
- if(this.nodes.size() >= (index-1)){
- result = this.nodes.get(index);
- } else {
- result = null;
- }
- return result;
- }
-
- @Override
- public boolean isCellEditable(int row, int column) {
- boolean result;
-
- if(column == 1) {
- result = true;
- } else {
- result = false;
- }
- return result;
- }
-
- private void initElement(){
- String elName;
- Object[] values = new Object[2];
-
- for(DataNode dn: this.element.getChildren()){
- if(dn instanceof DataAttribute){
- values[0] = "@" + ((MetaAttribute)dn.getMetadata()).getName();
- values[1] = ((DataAttribute)dn).getValue();
- this.nodes.add(((DataAttribute)dn).getDataValue());
- this.addRow(values);
- }
- }
- for(DataNode dn: this.element.getChildren()){
- if(dn instanceof DataValue){
- values[0] = "";
- values[1] = ((DataValue)dn).getValue();
- this.nodes.add(dn);
- this.addRow(values);
- }
- }
- for(DataNode dn: this.element.getChildren()){
- if(dn instanceof DataElement){
- if(!((MetaElement)dn.getMetadata()).hasElementChildren() &&
- ((MetaElement)dn.getMetadata()).hasValueChildren())
- {
- elName = ((MetaElement)dn.getMetadata()).getName();
-
- for(DataNode elNode: ((DataElement)dn).getChildren()){
- if(elNode instanceof DataValue){
- values[0] = elName;
- values[1] = ((DataValue)elNode).getValue();
- this.nodes.add(elNode);
- this.addRow(values);
- } else if(elNode instanceof DataAttribute){
- values[0] = elName + "[@" + ((MetaAttribute)elNode.getMetadata()).getName() + "]";
- values[1] = ((DataAttribute)elNode).getValue();
- this.nodes.add(((DataAttribute)elNode).getDataValue());
- this.addRow(values);
- }
- }
- }
- }
- }
- }
-
- private void clear(){
- int rows = super.getRowCount();
-
- for(int i=0; i combo = new JComboBox(values);
- result = combo;
- combo.setSelectedItem(curValue);
- combo.addActionListener(this);
- } else if(editType instanceof MetaValueEnum){
- JComboBox combo = new JComboBox();
- result = combo;
-
- for(String posValue: ((MetaValueEnum)editType).getPosValues()){
- combo.addItem(posValue);
- }
- combo.setSelectedItem(curValue);
- combo.addActionListener(this);
- } else {
- result = new JTextField(curValue.toString());
- }
- curEditor = result;
- curEditor.setBackground(editColor);
- curEditor.addKeyListener(this);
-
- return result;
- }
-
- @Override
- public void actionPerformed(ActionEvent e) {
- if(e.getSource().equals(curEditor)){
- this.assign();
- }
- }
-
- @Override
- public void keyReleased(KeyEvent e) {
- if(curEditor != null){
- if(e.getSource() instanceof JTextField){
- AssignmentResult test = this.testAssignment();
-
- if(test.isValid()){
- curEditor.setBackground(editColor);
-
- if(status != null){
- status.setStatus("Current input valid.", false, false);
- }
- } else {
- curEditor.setBackground(errorColor);
-
- if(status != null){
- status.setStatus("Error: " + test.getErrorMessage(), false, false);
- }
- }
- } else if(e.getSource() instanceof JComboBox){
- /*Do nothing.*/
- }
- }
- }
-
- @Override
- public void keyTyped(KeyEvent e) {}
-
- @Override
- public void keyPressed(KeyEvent e) {}
-
- public AssignmentResult testAssignment(){
- AssignmentResult result = new AssignmentResult(true, null);
- String value;
-
- if(curEditor != null){
- try {
- if((editType instanceof MetaValueNatural) || (editType instanceof MetaValueString)) {
- JTextField source = (JTextField)curEditor;
- value = source.getText();
- editNode.testSetValue(value);
- } else {
- // No validation required.
- }
- } catch(DataException ne){
- result = new AssignmentResult(false, "Invalid input: " + (ne.getMessage()).toLowerCase());
- }
- }
- return result;
- }
-
- @SuppressWarnings("rawtypes")
- private AssignmentResult assign(){
- Object value = null;
- AssignmentResult test = this.testAssignment();
-
- if(test.isValid()){
- if(status != null){
- status.setStatus("Input valid.", false, false);
- }
-
- if(curEditor instanceof JTextField){
- value = ((JTextField)curEditor).getText();
- } else if(curEditor instanceof JComboBox){
- value = ((JComboBox) curEditor).getSelectedItem();
- }
- try {
- if(!editNode.getValue().equals(value)){
- assert editNode.getOwner() != null: "Owner == null (" + editNode.getMetadata() + ")";
- editNode.getOwner().setValue(editNode, value);
-
- }
- } catch (DataException e) {
- assert false: "this.testAssignment does not work properly";
- }
- curEditor.removeKeyListener(this);
- curEditor = null;
- editNode = null;
- editType = null;
- fireEditingStopped();
- } else if(status != null){
- status.setStatus("Error: Invalid input " + test.getErrorMessage().toLowerCase(), false, false);
- }
- return test;
- }
-}
diff --git a/src/tools/config/org/eclipse/cyclonedds/config/swing/DataElementTree.java b/src/tools/config/org/eclipse/cyclonedds/config/swing/DataElementTree.java
deleted file mode 100644
index 8ed9240..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/config/swing/DataElementTree.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-package org.eclipse.cyclonedds.config.swing;
-
-import java.awt.Component;
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.font.FontRenderContext;
-
-import javax.swing.JLabel;
-import javax.swing.JPopupMenu;
-import javax.swing.JTree;
-import javax.swing.UIManager;
-import javax.swing.tree.DefaultMutableTreeNode;
-import javax.swing.tree.DefaultTreeCellRenderer;
-import javax.swing.tree.DefaultTreeModel;
-import javax.swing.tree.TreeCellRenderer;
-import javax.swing.tree.TreePath;
-import javax.swing.tree.TreeSelectionModel;
-
-import org.eclipse.cyclonedds.common.view.StatusPanel;
-import org.eclipse.cyclonedds.config.data.DataConfigurationListener;
-import org.eclipse.cyclonedds.config.data.DataElement;
-import org.eclipse.cyclonedds.config.data.DataNode;
-import org.eclipse.cyclonedds.config.data.DataValue;
-import org.eclipse.cyclonedds.config.meta.MetaElement;
-
-public class DataElementTree extends JTree
- implements DataConfigurationListener, TreeCellRenderer, DataNodePopupSupport
-{
- private static final long serialVersionUID = 5103341138480897742L;
- private final DataElement rootElement;
- private final DefaultMutableTreeNode rootNode;
- private final DefaultTreeModel model;
- private final DefaultTreeCellRenderer initialRenderer;
- private DataNodePopup popupController;
- private final StatusPanel status;
-
- public DataElementTree(DataElement rootElement, DataNodePopup popup, StatusPanel status){
- super();
- this.initialRenderer = new DefaultTreeCellRenderer();
- this.setCellRenderer(this);
- this.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
- this.setEditable(false);
- this.setRootVisible(true);
- this.setShowsRootHandles(true);
- this.rootElement = rootElement;
- this.status = status;
- this.rootElement.getOwner().addDataConfigurationListener(this);
- this.rootNode = new DefaultMutableTreeNode(this.rootElement);
- this.model = ((DefaultTreeModel)this.treeModel);
- this.model.setRoot(this.rootNode);
- this.initElement(this.rootNode, this.rootElement);
- if(this.rootNode.getChildCount() > 0){
- this.scrollPathToVisible(
- new TreePath(
- ((DefaultMutableTreeNode)this.rootNode.getFirstChild()).getPath()));
- }
- this.setSelectionPath(new TreePath(this.rootNode.getPath()));
-
- if(popup == null){
- this.popupController = new DataNodePopup();
- } else {
- this.popupController = popup;
- }
- this.popupController.registerPopupSupport(this);
- }
-
- private void initElement(DefaultMutableTreeNode parent, DataElement element){
- DefaultMutableTreeNode node;
-
- for(DataNode child: element.getChildren()){
- if(child instanceof DataElement){
- if(((MetaElement)child.getMetadata()).hasElementChildren()){
- node = new DefaultMutableTreeNode(child);
- this.model.insertNodeInto(node, parent, parent.getChildCount());
- this.initElement(node, (DataElement)child);
- } else if(!((MetaElement)child.getMetadata()).hasValueChildren()){
- node = new DefaultMutableTreeNode(child);
- this.model.insertNodeInto(node, parent, parent.getChildCount());
- this.initElement(node, (DataElement)child);
- }
- }
- }
- }
-
- @Override
- public void nodeAdded(DataElement parent, DataNode nodeAdded) {
- DefaultMutableTreeNode parentNode, childNode;
-
- if(nodeAdded instanceof DataElement){
- parentNode = this.lookupNode(this.rootNode, parent);
-
- if(parentNode != null){
- if(((MetaElement)nodeAdded.getMetadata()).hasElementChildren()){
- childNode = new DefaultMutableTreeNode(nodeAdded);
- this.model.insertNodeInto(childNode, parentNode, parentNode.getChildCount());
- this.scrollPathToVisible(new TreePath(childNode.getPath()));
- this.initElement(childNode, (DataElement)nodeAdded);
- } else if(!((MetaElement)nodeAdded.getMetadata()).hasValueChildren()){
- childNode = new DefaultMutableTreeNode(nodeAdded);
- this.model.insertNodeInto(childNode, parentNode, parentNode.getChildCount());
- this.scrollPathToVisible(new TreePath(childNode.getPath()));
- this.initElement(childNode, (DataElement)nodeAdded);
- }
- }
- }
- this.repaint();
- }
-
- @Override
- public void nodeRemoved(DataElement parent, DataNode nodeRemoved) {
- DefaultMutableTreeNode node;
-
- if(nodeRemoved instanceof DataElement){
- node = this.lookupNode(this.rootNode, (DataElement)nodeRemoved);
-
- if(node != null){
- if(node.getParent() != null){
- this.setSelectionPath(new TreePath(((DefaultMutableTreeNode)node.getParent()).getPath()));
- }
- if(node.getParent() != null){
- this.model.removeNodeFromParent(node);
- }
- }
- }
- this.repaint();
- }
-
- @Override
- public void valueChanged(DataValue data, Object oldValue, Object newValue) {
- this.repaint();
- }
-
- private DefaultMutableTreeNode lookupNode(DefaultMutableTreeNode node, DataElement element){
- DefaultMutableTreeNode result = null;
-
- if(node.getUserObject().equals(element)){
- result = node;
- } else {
- for(int i=0; (i popupSupport;
-
- public DataNodePopup() {
- this.popupSupport = Collections.synchronizedSet(new HashSet());
- }
-
- public void unregisterPopupSupport(DataNodePopupSupport support){
- synchronized(this.popupSupport){
- if(this.popupSupport.contains(support)){
- support.removeMouseListener(this);
- this.popupSupport.remove(support);
- }
- }
- }
-
- public void registerPopupSupport(DataNodePopupSupport support){
- synchronized(this.popupSupport){
- if(!this.popupSupport.contains(support)){
- support.addMouseListener(this);
- this.popupSupport.add(support);
- }
- }
- }
-
- private void notifyStatus(String message, boolean persistent, boolean busy){
- synchronized(this.popupSupport){
- for(DataNodePopupSupport dp: this.popupSupport){
- dp.setStatus(message, persistent, busy);
- }
- }
- }
-
- private int countOccurrences(DataElement parent, MetaNode metaChild){
- int occurrences = 0;
-
- for(DataNode child: parent.getChildren()){
- if(metaChild.equals(child.getMetadata())){
- occurrences++;
- }
- }
- return occurrences;
- }
-
- private JPopupMenu getPopup(DataNodePopupSupport source, DataNode dn){
- DataNode parent;
- DataElement parentParent;
- DataNodeMenuItem reset, remove, add;
- MetaNode metaParent, meta;
- JMenu addMenu;
- int min, max, current;
-
- JPopupMenu result = new JPopupMenu("Actions");
-
- if (dn != null) {
- parent = dn.getParent();
- meta = dn.getMetadata();
- } else {
- parent = null;
- meta = null;
- }
-
- if(parent != null){
- metaParent = parent.getMetadata();
- } else {
- metaParent = null;
- }
- addMenu = null;
- reset = null;
- remove = null;
-
- if(dn instanceof DataValue){
- assert metaParent!=null: "Parent element == null";
- reset = new DataNodeMenuItem("Reset to default", dn, null);
- remove = new DataNodeMenuItem("Remove", parent, null);
-
- if(parent instanceof DataElement){
- addMenu = new JMenu("Add");
-
- for(MetaNode child: ((MetaElement)metaParent).getChildren()){
- if(child instanceof MetaAttribute){
- current = this.countOccurrences((DataElement)parent, child);
- add = new DataNodeMenuItem(((MetaAttribute)child).getName(), parent, child);
-
- if(current == 1){
- add.setEnabled(false);
- } else {
- add.setEnabled(true);
- }
- add.setActionCommand("add");
- add.addActionListener(this);
- addMenu.add(add);
- }
- }
-
- parentParent = (DataElement)parent.getParent();
-
- if(parentParent != null){
- current = this.countOccurrences((DataElement)parent.getParent(), parent.getMetadata());
- min = ((MetaElement)metaParent).getMinOccurrences();
- if(min == 0){
- remove.setEnabled(true);
- } else if(current > min){
- remove.setEnabled(true);
- } else {
- remove.setEnabled(false);
- }
- }
- } else if(parent instanceof DataAttribute){
- metaParent = parent.getMetadata();
- if(((MetaAttribute)metaParent).isRequired()){
- remove.setEnabled(false);
- }
- result.add(remove);
- } else {
- assert false: "Unexpected parent type found: " + (parent==null ? parent: parent.getClass());
- }
- } else if(dn instanceof DataElement){
- addMenu = new JMenu("Add");
- remove = new DataNodeMenuItem("Remove", dn, null);
-
- min = ((MetaElement)meta).getMinOccurrences();
- current = this.countOccurrences((DataElement)dn.getParent(), meta);
-
- if(min < current){
- remove.setEnabled(true);
- } else {
- remove.setEnabled(false);
- }
-
- for(MetaNode child: ((MetaElement)meta).getChildren()){
- current = this.countOccurrences((DataElement)dn, child);
-
- if(child instanceof MetaElement){
- add = new DataNodeMenuItem(((MetaElement)child).getName(), dn, child);
- max = ((MetaElement)child).getMaxOccurrences();
-
- if((max == 0) || (current < max)){
- add.setEnabled(true);
- } else {
- add.setEnabled(false);
- }
-
- } else if(child instanceof MetaAttribute){
- add = new DataNodeMenuItem(((MetaAttribute)child).getName(), dn, child);
-
- if(current == 1){
- add.setEnabled(false);
- } else {
- add.setEnabled(true);
- }
- } else {
- add = new DataNodeMenuItem("", dn, child);
-
- if(current == 1){
- add.setEnabled(false);
- } else {
- add.setEnabled(true);
- }
- }
- add.setActionCommand("add");
- add.addActionListener(this);
- addMenu.add(add);
- }
-
- }
- if(addMenu != null){
- if (addMenu.getItemCount() == 0){
- addMenu.setEnabled(false);
- }
- result.add(addMenu);
-
- }
- if(remove != null){
- remove.setActionCommand("remove");
- remove.addActionListener(this);
- result.add(remove);
- }
-
- if(reset != null){
- result.addSeparator();
- reset.setActionCommand("reset");
- reset.addActionListener(this);
- result.add(reset);
- } else {
- //result.addSeparator();
- }
- return result;
- }
- @Override
- public void actionPerformed(ActionEvent e) {
- DataNodeMenuItem item;
- DataNode dataNode;
- MetaNode metaNode;
- DataElement dataDomain = null;
- Object source = e.getSource();
- String command = e.getActionCommand();
-
- try{
- if(source instanceof DataNodeMenuItem){
- item = (DataNodeMenuItem)source;
- if("remove".equals(command)){
- dataNode = item.getData();
- boolean remove = false;
- if (dataNode.getOwner().isServiceElement(dataNode)) {
- int value = JOptionPane.showConfirmDialog(null,
- "Are you sure you want to remove this " + ConfigWindow.SERVICE_TEXT + "?", "Remove " + ConfigWindow.SERVICE_TEXT + " confirmation",
- JOptionPane.YES_NO_OPTION);
- if (value == JOptionPane.NO_OPTION) {
- remove = true;
- }
- }
- if (!remove && dataNode.getDependencies() != null) {
- for (DataNode dn : dataNode.getDependencies()) {
- if(dn instanceof DataElement){
- if (dn.getOwner().isServiceElement(dn)) {
- int value = JOptionPane.showConfirmDialog(null,
- "Are you sure you want to remove this " + ConfigWindow.SERVICE_TEXT + "?",
- "Remove " + ConfigWindow.SERVICE_TEXT + " confirmation", JOptionPane.YES_NO_OPTION);
- if (value == JOptionPane.NO_OPTION) {
- remove = true;
- }
- }
- if (!remove) {
- dn.getOwner().removeNode(dn);
- }
- }
- }
- }
- if (!remove) {
- dataNode.getOwner().removeNode(dataNode);
- }
- } else if ("removeService".equals(command)) {
- boolean remove = false;
- int value = JOptionPane.showConfirmDialog(null,
- "Are you sure you want to remove this " + ConfigWindow.SERVICE_TEXT + "?",
- "Remove " + ConfigWindow.SERVICE_TEXT + " confirmation", JOptionPane.YES_NO_OPTION);
- if (value == JOptionPane.NO_OPTION) {
- remove = true;
- }
- if (!remove) {
- dataNode = item.getData();
- dataDomain = dataNode.getOwner().findServiceDataElement(dataNode.getOwner().getRootElement(),
- "Service", (DataElement) dataNode);
- if (dataDomain != null) {
- dataDomain.getOwner().removeNode(dataDomain);
- } else {
- this.notifyStatus("Error: failed to remove the " + ConfigWindow.SERVICE_TEXT + " ", false, false);
- }
- dataNode.getOwner().removeNode(dataNode);
- }
- } else if ("add".equals(command)) {
- dataNode = item.getData();
- metaNode = item.getChildMeta();
- if (dataNode.getOwner().isServiceElement(dataNode)
- && ((MetaElement) metaNode).getName().equals("Service")) {
- HashMap service = new HashMap();
- for (MetaNode mn : ((MetaElement) dataNode.getOwner().getRootElement().getMetadata())
- .getChildren()) {
- if (!((MetaElement) mn).getName().equals("Domain")) {
- service.put(((MetaElement) mn).getName(), mn);
- }
- }
- String[] serviceNames = service.keySet().toArray(new String[service.keySet().size()]);
- String name = (String) JOptionPane.showInputDialog(null, "Please select a service to add.",
- "Service selection", JOptionPane.QUESTION_MESSAGE, null, serviceNames, serviceNames[0]);
- if (name != null) {
- addService(dataNode.getOwner().getRootElement(), service.get(name));
- }
- } else {
- if (dataNode instanceof DataElement) {
- dataNode.getOwner().addNode((DataElement) dataNode, metaNode);
- } else {
- this.notifyStatus("Error: Unexpected type of parent found: '" + dataNode.getClass() + "'.",
- false, false);
- }
- }
- } else if ("addService".equals(command)) {
- addService(item.getData(), item.getChildMeta());
- } else if("reset".equals(command)){
- dataNode = item.getData();
- dataNode.getOwner().setValue((DataValue)dataNode, ((MetaValue)dataNode.getMetadata()).getDefaultValue());
- } else {
- this.notifyStatus("Warning: Action for command '" + command + "' not implemented.", false, false);
- }
- }
- } catch(DataException de){
- Report.getInstance().writeErrorLog("DataNodePopup actionPerformed" + de.getMessage());
- this.notifyStatus("Error: " + de.getMessage(), false, false);
- StackTraceElement[] elements = de.getStackTrace();
- String error = "";
-
- for(int i=0; i 0){
- this.scrollPathToVisible(
- new TreePath(
- ((DefaultMutableTreeNode)this.rootNode.getFirstChild()).getPath()));
- }
- this.getSelectionModel().addTreeSelectionListener(this);
- this.setSelectionPath(new TreePath(this.rootNode.getPath()));
- }
-
- private void initElement(DefaultMutableTreeNode parent, MetaElement element){
- DefaultMutableTreeNode node;
-
- for(MetaNode child: element.getChildren()){
- if(child instanceof MetaElement){
- node = new DefaultMutableTreeNode(child);
- this.model.insertNodeInto(node, parent, parent.getChildCount());
- this.initElement(node, (MetaElement)child);
- }
- }
- }
-
- @Override
- public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) {
- Component result = null;
- JLabel temp;
- Object nodeValue;
-
- if(value instanceof DefaultMutableTreeNode){
- nodeValue = ((DefaultMutableTreeNode)value).getUserObject();
-
- if(nodeValue instanceof MetaElement){
- temp = new JLabel(ConfigUtil.getMetaElementString((MetaElement)nodeValue));
-
- if(selected){
- temp.setForeground(UIManager.getColor("Tree.selectionForeground"));
- temp.setBackground(UIManager.getColor("Tree.selectionBackground"));
- temp.setOpaque(true);
- } else {
- temp.setForeground(UIManager.getColor("Tree.textForeground"));
- temp.setBackground(UIManager.getColor("Tree.textBackground"));
- }
- //temp.setFont(temp.getFont().deriveFont(Font.PLAIN));
- temp.setFont(temp.getFont().deriveFont(Font.BOLD));
- result = temp;
- }
- }
-
- if(result == null){
- result = initialRenderer.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus);
- }
- return result;
- }
-
- public MetaElement getSelectedMetaElement(){
- MetaElement result = null;
- TreePath path = this.getSelectionPath();
-
- if(path != null){
- result = (MetaElement)
- ((DefaultMutableTreeNode)path.getLastPathComponent()).getUserObject();
- }
- return result;
- }
-
- public MetaElement getMetaNodeAt(int x, int y) {
- MetaElement retVal = null;
- TreePath path = this.getClosestPathForLocation(x, y);
- if (path != null) {
- this.setSelectionPath(path);
- retVal = (MetaElement)((DefaultMutableTreeNode)path.getLastPathComponent()).getUserObject();
- }
- return retVal;
- }
-
- @Override
- public void valueChanged(TreeSelectionEvent e) {
- MetaElement me = this.getSelectedMetaElement();
-
- if((me != null) && (status != null)){
- status.setStatus("Element '" + me.getName() + "' selected.", true);
- }
-
- }
-}
diff --git a/src/tools/config/org/eclipse/cyclonedds/config/swing/MetaNodeDocPane.java b/src/tools/config/org/eclipse/cyclonedds/config/swing/MetaNodeDocPane.java
deleted file mode 100644
index af326e2..0000000
--- a/src/tools/config/org/eclipse/cyclonedds/config/swing/MetaNodeDocPane.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/*
- * Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
- * v. 1.0 which is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
- */
-package org.eclipse.cyclonedds.config.swing;
-
-import java.io.StringWriter;
-
-import javax.swing.JEditorPane;
-
-import org.eclipse.cyclonedds.config.meta.MetaAttribute;
-import org.eclipse.cyclonedds.config.meta.MetaElement;
-import org.eclipse.cyclonedds.config.meta.MetaNode;
-
-@SuppressWarnings("serial")
-public class MetaNodeDocPane extends JEditorPane {
- private boolean showElementName;
- private boolean showChildrenAttributes;
- private static final String fontStyle = "font-family:Sans-serif";
-
- public MetaNodeDocPane(){
- super("text/html", "No selection");
- this.init(true, true);
- }
-
- public MetaNodeDocPane(boolean showElementName, boolean showChildrenAttributes){
- super("text/html", "No selection");
- this.init(showElementName, showChildrenAttributes);
- }
-
- private void init(boolean showElementName, boolean showChildrenAttributes){
- this.setEditable(false);
- this.showElementName = showElementName;
- this.showChildrenAttributes = showChildrenAttributes;
- }
-
- public void setNode(MetaNode node){
- String doc;
- MetaNode[] children;
- MetaAttribute attribute;
-
- int attributeChildrenCount = 0;
-
- StringWriter writer = new StringWriter();
-
- if(node == null){
- writer.write("No element selected.");
- } else {
- doc = this.layoutDoc(node.getDoc());
-
- if(node instanceof MetaElement){
- if(this.showElementName){
- int maxOcc = ((MetaElement)node).getMaxOccurrences();
- int minOcc = ((MetaElement)node).getMinOccurrences();
- String occ;
-
- if(maxOcc == Integer.MAX_VALUE){
- occ = "occurrences: " + minOcc + " - " + "*";
- } else {
- occ = "occurrences: " + minOcc + " - " + maxOcc;
- }
- writer.write("" + ((MetaElement)node).getName());
-
- String dimension = node.getDimension();
-
- if (dimension != null) {
- writer.write(" (" + occ
- + " and dimension: " + dimension
- + ")
");
- } else {
- writer.write(" (" + occ
- + ")");
- }
- }
- writer.write("" + doc + "");
- children = ((MetaElement)node).getChildren();
-
- for(MetaNode mn: children){
- if(mn instanceof MetaAttribute){
- attributeChildrenCount++;
- }
- }
- if(this.showChildrenAttributes){
- if(attributeChildrenCount > 0){
- writer.write("Attributes
");
-
- for(MetaNode mn: children){
- if(mn instanceof MetaAttribute){
- this.writeNode(writer, mn);
- }
- }
- } else {
- writer.write("Attributes
Element has no attributes");
- }
- }
- } else if(node instanceof MetaAttribute){
- attribute = (MetaAttribute)node;
-
- if(this.showElementName){
- writer.write("" + attribute.getName() + "(");
-
- if(attribute.isRequired()){
- writer.write("required");
- } else {
- writer.write("optional");
- }
- String dimension = attribute.getDimension();
-
- if (dimension != null) {
- writer.write(" and dimension: ");
- writer.write(dimension);
- }
- writer.write(")
-");
- }
- writer.write("" + doc + "");
- } else {
- writer.write("" + doc + "");
- }
- }
- this.setText(writer.toString());
- this.setCaretPosition(0);
- }
-
-
- private void writeNode(StringWriter writer, MetaNode node){
- MetaElement element;
- MetaAttribute attribute;
- String doc;
- String dimension = node.getDimension();
-
- if(node instanceof MetaElement){
- element = (MetaElement)node;
- writer.write("" + element.getName());
- writer.write(" (occurrences : " + element.getMinOccurrences()
- + " - " + element.getMaxOccurrences());
-
- if (dimension != null) {
- writer.write(" dimension: " + dimension);
- }
- writer.write(")
");
- } else if(node instanceof MetaAttribute){
- attribute = (MetaAttribute)node;
- writer.write("" + attribute.getName() + " (");
-
- if(attribute.isRequired()){
- writer.write("required");
- } else {
- writer.write("optional");
- }
- if (dimension != null) {
- writer.write(" and dimension: " + dimension);
- }
- writer.write(")
");
- }
- doc = this.layoutDoc(node.getDoc());
- writer.write("" + doc + "");
- }
-
- private String layoutDoc(String doc){
- String temp;
- char c;
- StringWriter writer = new StringWriter();
-
- if(doc == null){
- temp = "No description available.";
- } else {
- temp = doc;
- }
- temp = temp.trim();
-
- if(temp.length() == 0){
- temp = "No description available.";
- } else {
- if(temp.startsWith("")){
- temp = temp.substring(3);
- temp = temp.replaceFirst("
", " ");
- }
-
- for(int i=0; i