10.3. 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.
10.3.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 |
10.3.2. DomainParticipant configuration¶
The <participant> element has two child elements: <domainId> and <rtps>.
All the DomainParticipant configuration options belong to the <rtps> element, except for the DDS DomainId
which is defined by the <domainId> element.
Below a list with the configuration XML elements is presented:
Name |
Description |
Values |
Default |
|---|---|---|---|
|
DomainId to be used by the DomainParticipant. See Profile based creation of a DomainParticipant. |
|
0 |
|
Fast DDS DomainParticipant configurations. See RTPS element type. |
10.3.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
for user data traffic (see
|
|
|
|
List of default reception multicast
locators for user data traffic (see
|
|
|
|
List of External Locators to announce for the default user traffic of this participant. |
||
|
Whether to ignore locators received on announcements from other participants when they don’t match with any of the locators announced by this participant. |
|
false |
|
Size in bytes of the send socket buffer. If the value is zero then Fast DDS will use the system default socket size. |
|
0 |
|
Size in bytes of the reception socket buffer. If the value is zero then Fast DDS will use the system default socket size. |
|
0 |
|
Participant’s netmask filtering configuration. See the Netmask filtering section. |
|
|
|
|
||
|
Allows defining the port and gains related to the RTPS protocol. See the Port section. |
||
|
DomainParticipant’s identifier. Typically it will be automatically generated by the DomainParticipantFactory. |
|
0 |
|
IP address of the remote discovery server to connect to using Discovery Server Easy Mode. |
|
Empty |
|
Transport descriptors to be used by the DomainParticipant. See Transport descriptors. |
|
|
|
Boolean field to indicate the system
whether the DomainParticipant will use the
default |
|
true |
|
Configuration option to determine which transports
will be instantiated if the |
||
|
Additional configuration properties. See PropertyPolicyQos. |
||
|
Configuration regarding allocation behavior. It expects a DomainParticipantAllocationType. |
||
|
Additional information attached to the DomainParticipant and transmitted with the discovery information. See UserDataQosPolicy. |
|
Empty |
|
DomainParticipant’s |
|
Empty |
|
ThreadSettings for the builtin flow controllers sender thread. |
||
|
ThreadSettings participant’s timed events thread. |
||
|
ThreadSettings for the discovery server thread. |
||
|
ThreadSettings for the threads used by the builtin TypeLookup service to discover unknown remote types. See Remote Data Types Discovery. |
||
|
ThreadSettings for the builtin transports reception threads. |
||
|
ThreadSettings for the security log thread. |
||
|
Defined flow controller descriptors to be used by the DomainParticipant. See Flow Controller Descriptors. |
Example
<?xml version="1.0" encoding="UTF-8" ?>
<dds>
<profiles xmlns="http://www.eprosima.com">
<participant profile_name="domainparticipant_profile_name">
<domainId>4</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>
<default_external_unicast_locators>
<!-- EXTERNAL_LOCATOR_LIST -->
<udpv4 externality="1" cost="0" mask="24">
<address>100.100.100.10</address>
<port>23456</port>
</udpv4>
</default_external_unicast_locators>
<ignore_non_matching_locators>true</ignore_non_matching_locators>
<sendSocketBufferSize>8192</sendSocketBufferSize>
<listenSocketBufferSize>8192</listenSocketBufferSize>
<netmask_filter>ON</netmask_filter>
<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>
<userTransports>
<transport_id>TransportId1</transport_id>
<transport_id>TransportId2</transport_id>
</userTransports>
<useBuiltinTransports>false</useBuiltinTransports>
<builtinTransports>DEFAULT</builtinTransports>
<propertiesPolicy>
<!-- PROPERTIES_POLICY -->
<properties>
<property>
<name>Property1Name</name>
<value>Property1Value</value>
<propagate>false</propagate>
</property>
</properties>
</propertiesPolicy>
<allocation>
<!-- ALLOCATION -->
</allocation>
<userData>
<value>3.4.7.0.C</value>
</userData>
<prefix>72.61.73.70.66.61.72.6d.74.65.73.74</prefix>
<builtin_controllers_sender_thread>
<scheduling_policy>-1</scheduling_policy>
<priority>0</priority>
<affinity>0</affinity>
<stack_size>-1</stack_size>
</builtin_controllers_sender_thread>
<timed_events_thread>
<scheduling_policy>-1</scheduling_policy>
<priority>0</priority>
<affinity>0</affinity>
<stack_size>-1</stack_size>
</timed_events_thread>
<discovery_server_thread>
<scheduling_policy>-1</scheduling_policy>
<priority>0</priority>
<affinity>0</affinity>
<stack_size>-1</stack_size>
</discovery_server_thread>
<typelookup_service_thread>
<scheduling_policy>-1</scheduling_policy>
<priority>0</priority>
<affinity>0</affinity>
<stack_size>-1</stack_size>
</typelookup_service_thread>
<builtin_transports_reception_threads>
<scheduling_policy>-1</scheduling_policy>
<priority>0</priority>
<affinity>0</affinity>
<stack_size>-1</stack_size>
</builtin_transports_reception_threads>
<security_log_thread>
<scheduling_policy>-1</scheduling_policy>
<priority>0</priority>
<affinity>0</affinity>
<stack_size>-1</stack_size>
</security_log_thread>
<flow_controller_descriptor_list>
<flow_controller_descriptor>
<name>example_flow_controller</name>
<scheduler>FIFO</scheduler>
<max_bytes_per_period>4096</max_bytes_per_period>
<period_ms>500</period_ms>
<sender_thread>
<scheduling_policy>-1</scheduling_policy>
<priority>0</priority>
<affinity>0</affinity>
<stack_size>-1</stack_size>
</sender_thread>
</flow_controller_descriptor>
</flow_controller_descriptor_list>
</rtps>
</participant>
</profiles>
</dds>
Note
LOCATOR_LISTmeans a LocatorListType is expected.EXTERNAL_LOCATOR_LISTmeans a ExternalLocatorListType is expected.For
BUILTINdetails, please refer to Builtin parameters.PROPERTIES_POLICYmeans that the label is a PropertiesPolicyType block.For
ALLOCATIONdetails, please refer to ParticipantAllocationType.
10.3.2.2. 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 which discovery-related settings can be configured. See Discovery. |
||
|
Restricts multicast metatraffic to PDP only. |
|
|
|
Indicates whether to use the DataWriterLiveliness protocol. |
|
|
|
Metatraffic Unicast Locator List. |
A set of |
|
|
Metatraffic Multicast Locator List. |
A set of |
|
|
The list of IP-port address pairs of all other DomainParticipants with which a DomainParticipant will communicate. See Initial peers |
A set of |
|
|
List of External Locators to announce for the metatraffic of this participant. |
||
|
Memory policy for DataReaders. See HistoryQosPolicyKind. |
|
|
|
Memory policy for DataWriters. See HistoryQosPolicyKind. |
|
|
|
Maximum DataReader’s History payload size. Allows to reserve all the required memory at DataReader initialization. See MemoryManagementPolicy. |
|
512 |
|
Maximum DataWriter’s History payload size. Allows to reserve all the required memory at DataWriter initialization. See MemoryManagementPolicy. |
|
512 |
|
Number of different ports to try if DataReader’s physical port is already in use. |
|
100 |
|
FlowControllersQos name. |
|
Empty |
Example
<builtin>
<discovery_config>
<discoveryProtocol>CLIENT</discoveryProtocol>
<discoveryServersList>
<locator>
<udpv4>
<address>192.168.10.57</address>
<port>56542</port>
</udpv4>
</locator>
<locator>
<udpv4>
<address>192.168.10.58</address>
<port>24565</port>
</udpv4>
</locator>
</discoveryServersList>
<ignoreParticipantFlags>FILTER_DIFFERENT_HOST</ignoreParticipantFlags>
<EDP>SIMPLE</EDP>
<simpleEDP>
<PUBWRITER_SUBREADER>true</PUBWRITER_SUBREADER>
<PUBREADER_SUBWRITER>true</PUBREADER_SUBWRITER>
</simpleEDP>
<leaseDuration>
<!-- DURATION -->
<sec>20</sec>
</leaseDuration>
<leaseAnnouncement>
<!-- DURATION -->
<sec>3</sec>
</leaseAnnouncement>
<initialAnnouncements>
<!-- INITIAL_ANNOUNCEMENTS -->
<count>10</count>
<period>
<nanosec>50</nanosec>
</period>
</initialAnnouncements>
<clientAnnouncementPeriod>
<nanosec>250000000</nanosec>
</clientAnnouncementPeriod>
<static_edp_xml_config>file://filename1.xml</static_edp_xml_config>
<static_edp_xml_config>file://filename2.xml</static_edp_xml_config>
<static_edp_xml_config>file://filename3.xml</static_edp_xml_config>
</discovery_config>
<avoid_builtin_multicast>true</avoid_builtin_multicast>
<use_WriterLivelinessProtocol>false</use_WriterLivelinessProtocol>
<metatrafficUnicastLocatorList>
<!-- LOCATOR_LIST -->
<locator>
<udpv4>
<address>192.168.0.1</address>
</udpv4>
</locator>
</metatrafficUnicastLocatorList>
<metatrafficMulticastLocatorList>
<!-- LOCATOR_LIST -->
<locator>
<udpv4>
<address>192.168.0.1</address>
</udpv4>
</locator>
</metatrafficMulticastLocatorList>
<initialPeersList>
<!-- LOCATOR_LIST -->
<locator>
<udpv4>
<address>192.168.0.1</address>
</udpv4>
</locator>
</initialPeersList>
<metatraffic_external_unicast_locators>
<!-- EXTERNAL_LOCATOR_LIST -->
<udpv4 externality="1" cost="0" mask="24">
<address>100.100.100.10</address>
<port>34567</port>
</udpv4>
</metatraffic_external_unicast_locators>
<readerHistoryMemoryPolicy>PREALLOCATED_WITH_REALLOC</readerHistoryMemoryPolicy>
<writerHistoryMemoryPolicy>PREALLOCATED_WITH_REALLOC</writerHistoryMemoryPolicy>
<readerPayloadSize>512</readerPayloadSize>
<writerPayloadSize>512</writerPayloadSize>
<mutation_tries>55</mutation_tries>
</builtin>
10.3.2.2.1. 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
the DomainParticipant will use.
See Discovery mechanisms. If not set to
|
|
|
|
|||
|
|||
|
|||
|
|||
|
|||
|
Describes locators of servers from which it receives only the discovery information they require to establish communication with matching endpoints. It expects a LocatorListType. |
|
|
|
Restricts metatraffic using several filtering criteria. See Ignore Participant flags. |
|
|
|
If set to |
|
|
|
|||
|
Attributes of the Simple Discovery Protocol. See Simple EDP Attributes. |
||
|
Indicates how long the DomainParticipant should consider remote DomainParticipants alive. See Lease Duration. |
20s |
|
|
The period for the DomainParticipant to send its discovery message to all other discovered DomainParticipants as well as to all Multicast ports. See Announcement Period. |
3s |
|
|
Allows the user to configure the number and period of the DomainParticipant’s initial discovery messages. See Initial Announcements. |
||
|
The period for the DomainParticipant to send its Discovery Message to its servers and check for EDP endpoints matching. Pro adds a property for true send rate limiting (see Fine tuning the server send rate limiter ). |
450 ms |
|
|
The XML filename(s) with the static EDP
configuration. Only necessary if
the |
|
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 discarded. |
|
Discovery traffic from DomainParticipant’s own process is discarded. |
This option also supports the OR (|) operator to filter discovery traffic from other configurations.
For instance, FILTER_DIFFERENT_PROCESS|FILTER_SAME_PROCESS value discards discovery traffic from the
DomainParticipant’s own host.
simpleEDP¶
Name |
Description |
Values |
Default |
|---|---|---|---|
|
Indicates if the participant must use Publication DataWriter and Subscription DataReader. |
|
|
|
Indicates if the participant must use Publication DataReader and Subscription DataWriter. |
|
|
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 |
10.3.2.3. 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.
10.3.2.4. 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 |
|---|---|---|
|
Defines the limits for the remote locators’ collections. See RemoteLocatorsAllocationAttributes. |
|
|
DomainParticipant Allocation Configuration to specify the total number of DomainParticipants in the domain (local and remote). See ResourceLimitedContainerConfig. |
|
|
DomainParticipant Allocation Configuration to specify the total number of DataReader on each DomainParticipant (local and remote). See ResourceLimitedContainerConfig. |
|
|
DomainParticipant Allocation Configuration related to the total number of DataWriters on each DomainParticipant (local and remote). See ResourceLimitedContainerConfig. |
|
|
Maximum size of the partitions submessage. Set to zero for no limit. |
|
|
Maximum size of the user data submessage. Set to zero for no limit. |
|
|
Maximum size of the properties submessage. Set to zero for no limit. |
|
|
Allocation behaviour for the send buffer manager. |
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>
<send_buffers>
<preallocated_number>127</preallocated_number>
<dynamic>true</dynamic>
<network_buffers_config>
<initial>16</initial>
<maximum>0</maximum>
<increment>16</increment>
</network_buffers_config>
</send_buffers>
<!-- content_filter cannot be configured using XML (yet) -->
</allocation>
10.3.2.4.1. Remote Locators Allocations¶
Name |
Description |
Values |
Default |
|---|---|---|---|
|
Maximum number of unicast locators expected on a remote entity. It is recommended to use the maximum number of network interfaces available on the machine on which DomainParticipant is running. See RemoteLocatorsAllocationAttributes. |
|
4 |
|
Maximum number of multicast locators expected on a remote entity. May be set to zero to disable multicast traffic. See RemoteLocatorsAllocationAttributes. |
|
1 |
10.3.2.4.2. Send buffers¶
Name |
Description |
Values |
Default |
|---|---|---|---|
|
Initial number of send buffers to allocate. See SendBuffersAllocationAttributes. |
|
0 |
|
Whether the number of send buffers is allowed to grow. See SendBuffersAllocationAttributes. |
|
false |
|
Network buffer Allocation Configuration to specify the number of network buffers to be allocated for each send buffer. See ResourceLimitedContainerConfig. |
(16, inf, 16) |
Note
The default value 0 of <preallocated_number> will perform an initial guess of the number of buffers
required, based on the number of threads from which a send operation could be started.
So it does not mean there are no buffers, instead it would use the maximum amount of buffers available.
On the contrary, <network_buffers_config> will default to an initial number of 16 buffers, with an infinite
maximum and an increment of 16 buffers per send buffer.
An initial value of 0 will imply more dynamic allocations, especially at the beginning of the execution.
In case of doubt, it should be left to the default values.