11.2. DomainParticipant profiles¶
The DomainParticipant profiles allow the definition of the configuration of DomainParticipants
through
XML files.
These profiles are defined within the <participant>
XML tags.
11.2.1. DomainParticipant XML attributes¶
The <participant>
element has two attributes defined: profile_name
and is_default_profile
.
Name |
Description |
Use |
---|---|---|
|
Sets the name under which the |
Mandatory |
|
Sets the |
Optional |
11.2.2. DomainParticipant configuration¶
The <participant>
element has two child elements: <domain_id>
and <rtps>
.
All the DomainParticipant configuration options belong to the <rtps>
element, except for the DDS DomainId
which is defined by the <domain_id>
element.
Below a list with the configuration XML elements is presented:
Name |
Description |
Values |
Default |
---|---|---|---|
|
DomainId to be used by the DomainParticipant. |
|
0 |
|
Fast DDS DomainParticipant configurations. |
11.2.2.1. RTPS element type¶
The following is a list with all the possible child XML elements of the <rtps>
element.
These elements allow the user to define the DomainParticipant configuration.
Name |
Description |
Values |
Default |
---|---|---|---|
|
The DomainParticipant’s name. |
|
|
|
List of default reception unicast locators |
|
|
|
List of default reception multicast |
|
|
|
Size in bytes of the send socket buffer. |
|
0 |
|
Size in bytes of the reception socket |
|
0 |
|
|
||
|
Allows defining the port and gains related |
||
|
DomainParticipant’s identifier. Typically |
|
0 |
|
Limits middleware’s bandwidth usage. |
||
|
Transport descriptors to be used by the |
|
|
|
Boolean field to indicate the system |
|
true |
|
Additional configuration properties. |
||
|
Configuration regarding allocation behavior.
|
Example
<?xml version="1.0" encoding="UTF-8" ?>
<profiles xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles">
<participant profile_name="domainparticipant_profile_name">
<domainId>80</domainId>
<rtps>
<name>DomainParticipant Name</name>
<defaultUnicastLocatorList>
<!-- LOCATOR_LIST -->
<locator>
<udpv4>
<port>7400</port>
<address>192.168.1.41</address>
</udpv4>
</locator>
</defaultUnicastLocatorList>
<defaultMulticastLocatorList>
<!-- LOCATOR_LIST -->
<locator>
<udpv4>
<port>7400</port>
<address>192.168.2.41</address>
</udpv4>
</locator>
</defaultMulticastLocatorList>
<sendSocketBufferSize>8192</sendSocketBufferSize>
<listenSocketBufferSize>8192</listenSocketBufferSize>
<builtin>
<!-- BUILTIN -->
</builtin>
<port>
<portBase>7400</portBase>
<domainIDGain>200</domainIDGain>
<participantIDGain>10</participantIDGain>
<offsetd0>0</offsetd0>
<offsetd1>1</offsetd1>
<offsetd2>2</offsetd2>
<offsetd3>3</offsetd3>
</port>
<participantID>99</participantID>
<throughputController>
<bytesPerPeriod>8192</bytesPerPeriod>
<periodMillisecs>1000</periodMillisecs>
</throughputController>
<userTransports>
<transport_id>TransportId1</transport_id>
<transport_id>TransportId2</transport_id>
</userTransports>
<useBuiltinTransports>false</useBuiltinTransports>
<propertiesPolicy>
<!-- PROPERTIES_POLICY -->
<properties>
<property>
<name>Property1Name</name>
<value>Property1Value</value>
<propagate>false</propagate>
</property>
</properties>
</propertiesPolicy>
<allocation>
<!-- ALLOCATION -->
</allocation>
<userData>
Note
LOCATOR_LIST
means a LocatorListType is expected.PROPERTIES_POLICY
means that the label is a PropertiesPolicyType block.For
BUILTIN
details, please refer to Builtin parameters.For
ALLOCATION
details, please refer to ParticipantAllocationType.
11.2.2.1.1. Port Configuration¶
According to the RTPS standard (Section 9.6.1.1), the
RTPSParticipants
’ discovery traffic unicast listening ports are calculated using the following equation:
\(7400 + 250 * DomainId + 10 + 2 * ParticipantId\).
Therefore the following parameters can be specified:
Name |
Description |
Values |
Default |
---|---|---|---|
|
Base |
|
7400 |
|
Gain in DomainId. |
|
250 |
|
Gain in |
|
2 |
|
Multicast metadata offset. |
|
0 |
|
Unicast metadata offset. |
|
10 |
|
Multicast user data offset. |
|
1 |
|
Unicast user data offset. |
|
11 |
Warning
Changing these default parameters may break compatibility with other RTPS compliant implementations, as well as with other Fast DDS applications with default port settings.
11.2.2.1.2. ParticipantAllocationType¶
The ParticipantAllocationType
defines the <allocation>
element, which allows setting of the parameters
related with the allocation behavior on the DomainParticipant.
Please refer to ParticipantResourceLimitsQos for a detailed documentation on DomainParticipants allocation
configuration.
Name |
Description |
Values |
Default |
---|---|---|---|
|
Defines the limits for the remote locators’ collections. |
|
|
|
Child element of |
|
4 |
|
Child element of |
|
1 |
|
DomainParticipant Allocation Configuration to specify the |
||
|
DomainParticipant Allocation Configuration to specify the |
||
|
DomainParticipant Allocation Configuration related to the |
||
|
Maximum size of the partitions submessage. |
|
|
|
Maximum size of the user data submessage. |
|
|
|
Maximum size of the properties submessage. |
|
Example
<allocation>
<remote_locators>
<max_unicast_locators>4</max_unicast_locators>
<max_multicast_locators>1</max_multicast_locators>
</remote_locators>
<total_participants>
<initial>0</initial>
<maximum>0</maximum>
<increment>1</increment>
</total_participants>
<total_readers>
<initial>0</initial>
<maximum>0</maximum>
<increment>1</increment>
</total_readers>
<total_writers>
<initial>0</initial>
<maximum>0</maximum>
<increment>1</increment>
</total_writers>
<max_partitions>256</max_partitions>
<max_user_data>256</max_user_data>
<max_properties>512</max_properties>
<!-- content_filter cannot be configured using XML (yet) -->
</allocation>
11.2.2.1.3. Builtin parameters¶
By calling the wire_protocol()
member function of the DomainParticipantQos
,
it is possible to
access the builtin
public data member of the WireProtocolConfigQos
class.
This section specifies the available XML members for the configuration of this
builtin
parameters.
Name |
Description |
Values |
Default |
---|---|---|---|
|
This is the main element within |
||
|
Restricts multicast metatraffic |
|
|
|
Indicates whether to use the |
|
|
|
Metatraffic Unicast Locator List. |
A set of |
|
|
Metatraffic Multicast Locator List. |
A set of |
|
|
The list of IP-port address |
A set of |
|
|
Memory policy for DataReaders. |
||
|
Memory policy for DataWriters. |
||
|
Maximum DataReader’s History |
|
512 |
|
Maximum DataWriter’s History |
|
512 |
|
Number of different ports |
|
100 |
Example
<builtin>
<discovery_config>
<discoveryProtocol>NONE</discoveryProtocol>
<ignoreParticipantFlags>FILTER_DIFFERENT_HOST</ignoreParticipantFlags>
<EDP>SIMPLE</EDP>
<leaseDuration>
<!-- DURATION -->
<sec>20</sec>
<nanosec>0</nanosec>
</leaseDuration>
<leaseAnnouncement>
<!-- DURATION -->
<sec>3</sec>
<nanosec>0</nanosec>
</leaseAnnouncement>
<initialAnnouncements>
<!-- INITIAL_ANNOUNCEMENTS -->
</initialAnnouncements>
<simpleEDP>
<PUBWRITER_SUBREADER>true</PUBWRITER_SUBREADER>
<PUBREADER_SUBWRITER>true</PUBREADER_SUBWRITER>
</simpleEDP>
<static_edp_xml_config>file://filename.xml</static_edp_xml_config>
</discovery_config>
<avoid_builtin_multicast>true</avoid_builtin_multicast>
<use_WriterLivelinessProtocol>false</use_WriterLivelinessProtocol>
<metatrafficUnicastLocatorList>
<!-- LOCATOR_LIST -->
<locator>
<udpv4/>
</locator>
</metatrafficUnicastLocatorList>
<metatrafficMulticastLocatorList>
<!-- LOCATOR_LIST -->
<locator>
<udpv4/>
</locator>
</metatrafficMulticastLocatorList>
<initialPeersList>
<!-- LOCATOR_LIST -->
<locator>
<udpv4/>
</locator>
</initialPeersList>
<readerHistoryMemoryPolicy>PREALLOCATED_WITH_REALLOC</readerHistoryMemoryPolicy>
<readerPayloadSize>512</readerPayloadSize>
<writerHistoryMemoryPolicy>PREALLOCATED_WITH_REALLOC</writerHistoryMemoryPolicy>
<writerPayloadSize>512</writerPayloadSize>
<mutation_tries>55</mutation_tries>
</builtin>
discovery_config¶
Through the <discovery_config>
element, Fast DDS allows the configuration of the discovery mechanism via an XML
file.
Please refer to the Discovery section for more detail on the various types of discovery mechanisms and
configurable settings.
Name |
Description |
Values |
Default |
---|---|---|---|
|
Indicates which discovery protocol |
||
|
Restricts metatraffic using several |
||
|
If set to |
||
|
|||
|
Attributes of the Simple Discovery |
||
|
Indicates how long the DomainParticipant |
20s |
|
|
The period for the DomainParticipant to |
3s |
|
|
Allows the user to configure the number |
||
|
The XML filename with the static EDP |
|
ignoreParticipantFlags¶
Possible values |
Description |
---|---|
All Discovery traffic is processed. |
|
Discovery traffic from another host is discarded. |
|
Discovery traffic from another process on the same host is |
|
Discovery traffic from DomainParticipant’s own process is |
|
Discovery traffic from DomainParticipant’s own host is |
simpleEDP¶
Name |
Description |
Values |
Default |
---|---|---|---|
|
Indicates if the participant must use |
|
|
|
Indicates if the participant must use |
|
|
Initial Announcements¶
Name |
Description |
Values |
Default |
---|---|---|---|
|
Number of initial discovery messages to send at the period
specified by |
|
5 |
|
The period for the DomainParticipant to send its discovery messages. |
100 ms |