Add DOMAIN_ID, DOMAIN_TAG to config, discovery

This commits adds support for the DOMAIN_ID and DOMAIN_TAG parameters in
participant discovery, allowing multiple domains to share a port
number (a feature introduced in DDSI 2.3).  The tag can be configured
via Discovery/Tag.

This commit also introduces a setting Discovery/ExternalDomainId that
makes it possible to override the domain id on the network, both in what
is advertised in the DOMAIN_ID discovery parameter and in the
calculation of port numbers.  This way a single process can create two
independent domains that talk via the network, which is on occassion
useful in writing tests.

Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
Erik Boasson 2019-11-19 21:25:17 +01:00 committed by eboasson
parent 15179910d1
commit 08d9c296f1
13 changed files with 130 additions and 33 deletions

View file

@ -157,12 +157,14 @@ the discovery of peers.&lt;/p&gt;</xs:documentation>
<xs:element minOccurs="0" ref="config:DSGracePeriod"/>
<xs:element minOccurs="0" ref="config:DefaultMulticastAddress"/>
<xs:element minOccurs="0" ref="config:EnableTopicDiscovery"/>
<xs:element minOccurs="0" ref="config:ExternalDomainId"/>
<xs:element minOccurs="0" ref="config:MaxAutoParticipantIndex"/>
<xs:element minOccurs="0" ref="config:ParticipantIndex"/>
<xs:element minOccurs="0" ref="config:Peers"/>
<xs:element minOccurs="0" ref="config:Ports"/>
<xs:element minOccurs="0" ref="config:SPDPInterval"/>
<xs:element minOccurs="0" ref="config:SPDPMulticastAddress"/>
<xs:element minOccurs="0" ref="config:Tag"/>
</xs:all>
</xs:complexType>
</xs:element>
@ -194,6 +196,16 @@ Discovery/SPDPMulticastAddress.&lt;/p&gt;&lt;p&gt;The default value is:
&lt;p&gt;Do not use.&lt;/p&gt;&lt;p&gt;The default value is: &amp;quot;true&amp;quot;.&lt;/p&gt;</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ExternalDomainId" type="xs:string">
<xs:annotation>
<xs:documentation>
&lt;p&gt;An override for the domain id, to be used in discovery and for
determining the port number mapping. This allows creating multiple
domains in a single process while making them appear as a single domain
on the network. The value "default" disables the override.&lt;/p&gt;&lt;p&gt;The
default value is: &amp;quot;default&amp;quot;.&lt;/p&gt;</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="MaxAutoParticipantIndex" type="xs:integer">
<xs:annotation>
<xs:documentation>
@ -371,6 +383,13 @@ ff02::ffff:239.255.0.1, which is a non-standardised link-local multicast
address.&lt;/p&gt;&lt;p&gt;The default value is: &amp;quot;239.255.0.1&amp;quot;.&lt;/p&gt;</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Tag" type="xs:string">
<xs:annotation>
<xs:documentation>
&lt;p&gt;String extension for domain id that remote participants must match to
be discovered.&lt;/p&gt;&lt;p&gt;The default value is: &amp;quot;&amp;quot;.&lt;/p&gt;</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="General">
<xs:annotation>
<xs:documentation>