XML profiles

The Configuration section shows how to configure entity attributes using XML profiles, but this section goes deeper on it, explaining each field with its available values and how to compound the complete XML files.

eProsima Fast RTPS permits to load several XML files in the same execution, as they can contain several XML profiles. An XML profile is defined by a unique name (or <transport_id> label in the Transport descriptors case) that is used to reference the XML profile during the creation of a Fast RTPS entity, Transports, or Dynamic Topic Types. During eProsima Fast RTPS initialization, it tries to load an XML file with the name DEFAULT_FASTRTPS_PROFILES.xml in the current execution path.

Making an XML

An XML file can contain several XML profiles. The available profile types are Transport descriptors, XML Dynamic Types, Participant profiles, Publisher profiles, and Subscriber profiles.

<transport_descriptor>
    <transport_id>TransportProfile</transport_id>
    <type>UDPv4</type>
    <!-- ... -->
</transport_descriptor>

        <struct name="struct_profile">
            <!-- ... -->
        </struct>
    </type>
</types>

<participant profile_name="participant_profile">
    <rtps>
    <!-- ... -->
    </rtps>
</participant>

<publisher profile_name="publisher_profile">
    <!-- ... -->
</publisher>

<subscriber profile_name="subscriber_profile">
    <!-- ... -->
</subscriber>
<!--><-->

The Fast-RTPS XML format uses some structs along several profiles types. For readability, the Common section groups these common structs.

Finally, The Example section shows an XML file that uses all the possibilities. This example is useful as a quick reference to look for a particular property and how to use it. This XSD file can be used as a quick reference too.

Loading and applying profiles

Before creating any entity, it’s required to load XML files using Domain::loadXMLProfilesFile function. createParticipant, createPublisher and createSubscriber have a version that expects the profile name as an argument. eProsima Fast RTPS searches the XML profile using this profile name and applies the XML profile to the entity.

eprosima::fastrtps::Domain::loadXMLProfilesFile("my_profiles.xml");

Participant *participant = Domain::createParticipant("participant_xml_profile");
Publisher *publisher = Domain::createPublisher(participant, "publisher_xml_profile");
Subscriber *subscriber = Domain::createSubscriber(participant, "subscriber_xml_profile");

To load dynamic types from its declaration through XML see the Usage section of XML Dynamic Types.

Transport descriptors

This section allows creating transport descriptors to be referenced by the Participant profiles. Once a well-defined transport descriptor is referenced by a Participant profile, every time that profile is instantiated it will use or create the related transport.

The following XML code shows the complete list of configurable parameters:

<transport_descriptors>
    <transport_descriptor>
        <transport_id>TransportId1</transport_id> <!-- string -->
        <type>UDPv4</type> <!-- string -->
        <sendBufferSize>8192</sendBufferSize> <!-- uint32 -->
        <receiveBufferSize>8192</receiveBufferSize> <!-- uint32 -->
        <TTL>250</TTL> <!-- uint8 -->
        <maxMessageSize>16384</maxMessageSize> <!-- uint32 -->
        <maxInitialPeersRange>100</maxInitialPeersRange> <!-- uint32 -->
        <interfaceWhiteList>
            <id>192.168.1.41</id> <!-- string -->
            <id>127.0.0.1</id> <!-- string -->
        </interfaceWhiteList>
        <wan_addr>80.80.55.44</wan_addr> <!-- string -->
        <output_port>5101</output_port> <!-- uint16 -->
        <keep_alive_frequency_ms>5000</keep_alive_frequency_ms> <!-- uint32 -->
        <keep_alive_timeout_ms>25000</keep_alive_timeout_ms> <!-- uint32 -->
        <max_logical_port>9000</max_logical_port> <!-- uint16 -->
        <logical_port_range>100</logical_port_range> <!-- uint16 -->
        <logical_port_increment>2</logical_port_increment> <!-- uint16 -->
        <ListeningPorts>
            <port>5100</port> <!-- uint16 -->
            <port>5200</port> <!-- uint16 -->
        </ListeningPorts>
    </transport_descriptor>
    <transport_descriptor>
        <transport_id>TransportId2</transport_id>
        <type>TCPv4</type> <!-- string -->
        <!-- ... -->
    </transport_descriptor>
</transport_descriptors>

The XML label <transport_descriptors> can hold any number of <transport_descriptor>.

Name Description Values Default
<transport_id> Unique name to identify each transport descriptor. string  
<type> Type of the transport descriptor. UDPv4, UDPv6, TCPv4, TCPv6 UDPv4
<sendBufferSize>
Size in bytes of the socket send buffer.
If the value is zero then FastRTPS will use the default size from
the configuration of the sockets, using a minimum size of 65536 bytes.
uint32 0
<receiveBufferSize>
Size in bytes of the socket receive buffer.
If the value is zero then FastRTPS will use the default size from
the configuration of the sockets, using a minimum size of 65536 bytes.
uint32 0
<TTL> Time To Live, only for UDP transports. uint8 1
<maxMessageSize> The maximum size in bytes of the transport’s message buffer. uint32 65500
<maxInitialPeersRange> The maximum number of guessed initial peers to try to connect. uint32 4
<interfaceWhiteList> Allows defining Whitelist Interfaces. Whitelist Interfaces  
<wan_addr>
Public WAN address when using TCPv4 transports.
This field is optional if the transport doesn’t need to define a WAN address.
string with IPv4 Format
XXX.XXX.XXX.XXX.
 
<output_port>
Port used for output bound.
If this field isn’t defined, the output port will be random.
uint16 0
<keep_alive_frequency_ms> Frequency in milliseconds for sending RTCP keepalive requests (TCP only). uint32 50000
<keep_alive_timeout_ms>
Time in milliseconds since sending the last keepalive request
to consider a connection as broken. (TCP only).
uint32 10000
<max_logical_port>
The maximum number of logical ports to try during RTCP negotiation.
(TCP only)
uint16 100
<logical_port_range>
The maximum number of logical ports per request to try
during RTCP negotiation (TCP only).
uint16 20
<logical_port_increment>
Increment between logical ports to try during RTCP negotiation.
(TCP only).
uint16 2
<ListeningPorts>
Local port to work as TCP acceptor for input connections.
If not set, the transport will work as TCP client only (TCP only).
List <uint16>  

There are more examples of transports descriptors in Transports.

XML Dynamic Types

XML Dynamic Types allows creating eProsima Fast RTPS Dynamic Types directly defining them through XML. It allows any application to change TopicDataTypes without modifying its source code.

XML Structure

The XML Types definition (<types> tag) can be placed similarly to the profiles tag inside the XML file. It can be a stand-alone XML Types file or be a child of the Fast-RTPS XML root tag (<dds>). Inside the types tag, there must be one or more type tags (<type>).

Stand-Alone:

<types>
    <type>
        <!-- Type definition -->
    </type>
    <type>
        <!-- Type definition -->
        <!-- Type definition -->
    </type>
</types>

Rooted:

<dds>
    <types>
        <type>
            <!-- Type definition -->
        </type>
        <type>
            <!-- Type definition -->
            <!-- Type definition -->
        </type>
    </types>
</dds>

Finally, each <type> tag can contain one or more Type definitions. Defining several types inside a <type> tag or defining each type in its <type> tag has the same result.

Type definition

Enum

The <enum> type is defined by its name and a set of literals, each of them with its name and its (optional) value.

Example:

XML C++
<enum name="MyEnum">
    <literal name="A" value="0"/>
    <literal name="B" value="1"/>
    <literal name="C" value="2"/>
</enum>
DynamicTypeBuilder_ptr enum_builder = DynamicTypeBuilderFactory::GetInstance()->CreateEnumBuilder();
enum_builder->SetName("MyEnum");
enum_builder->AddEmptyMember(0, "A");
enum_builder->AddEmptyMember(1, "B");
enum_builder->AddEmptyMember(2, "C");
DynamicType_ptr enum_type = DynamicTypeBuilderFactory::GetInstance()->CreateType(enum_builder.get());

Typedef

The <typedef> type is defined by its name and its value or an inner element for complex types. Typedefs correspond to Alias in Dynamic Types glossary.

Example:

XML C++
<typedef name="MyAlias1" value="MyEnum"/>

<typedef name="MyAlias2">
    <long dimensions="2,2"/>
</typedef>
DynamicTypeBuilder_ptr alias1_builder = DynamicTypeBuilderFactory::GetInstance()->CreateAliasBuilder(enum_builder.get(), "MyAlias1");
DynamicType_ptr alias1_type = DynamicTypeBuilderFactory::GetInstance()->CreateType(alias1_builder.get());

std::vector<uint32_t> sequence_lengths = { 2, 2 };
DynamicTypeBuilder_ptr int_builder = DynamicTypeBuilderFactory::GetInstance()->CreateInt32Builder();
DynamicTypeBuilder_ptr array_builder = DynamicTypeBuilderFactory::GetInstance()->CreateArrayBuilder(int_builder.get(), sequence_lengths);
DynamicTypeBuilder_ptr alias2_builder = DynamicTypeBuilderFactory::GetInstance()->CreateAliasBuilder(array_builder.get(), "MyAlias2");
DynamicType_ptr alias2_type = DynamicTypeBuilderFactory::GetInstance()->CreateType(alias2_builder.get());

Struct

The <struct> type is defined by its name and inner members.

Example:

XML C++
<struct name="MyStruct">
    <long name="first"/>
    <longlong name="second"/>
</struct>
DynamicTypeBuilder_ptr long_builder = DynamicTypeBuilderFactory::GetInstance()->CreateInt32Builder();
DynamicTypeBuilder_ptr long_long_builder = DynamicTypeBuilderFactory::GetInstance()->CreateInt64Builder();
DynamicTypeBuilder_ptr struct_builder = DynamicTypeBuilderFactory::GetInstance()->CreateStructBuilder();

struct_builder->SetName("MyStruct");
struct_builder->AddMember(0, "first", long_builder.get());
struct_builder->AddMember(1, "second", long_long_builder.get());
DynamicType_ptr struct_type = DynamicTypeBuilderFactory::GetInstance()->CreateType(struct_builder.get());

Union

The <union> type is defined by its name, a discriminator and a set of cases. Each case has one or more caseValue and a member.

Example:

XML C++
<union name="MyUnion">
    <discriminator type="octet"/>
    <case>
        <caseValue value="0"/>
        <caseValue value="1"/>
         <long name="first"/>
    </case>
    <case>
        <caseValue value="2"/>
        <MyStruct name="second"/>
    </case>
    <case>
        <caseValue value="default"/>
        <longlong name="third"/>
    </case>
</union>
DynamicTypeBuilder_ptr long_builder = DynamicTypeBuilderFactory::GetInstance()->CreateInt32Builder();
DynamicTypeBuilder_ptr long_long_builder = DynamicTypeBuilderFactory::GetInstance()->CreateInt64Builder();
DynamicTypeBuilder_ptr struct_builder = DynamicTypeBuilderFactory::GetInstance()->CreateStructBuilder();
DynamicTypeBuilder_ptr octet_builder = DynamicTypeBuilderFactory::GetInstance()->CreateByteBuilder();
DynamicTypeBuilder_ptr union_builder = DynamicTypeBuilderFactory::GetInstance()->CreateUnionBuilder(octet_builder.get());

union_builder->SetName("MyUnion");
union_builder->AddMember(0, "first", long_builder.get(), "", { 0, 1 }, false);
union_builder->AddMember(1, "second", struct_builder.get(), "", { 2 }, false);
union_builder->AddMember(2, "third", long_long_builder.get(), "", { }, true);
DynamicType_ptr union_type = DynamicTypeBuilderFactory::GetInstance()->CreateType(union_builder.get());

Member types

Member types are any type that can belong to a <struct> or a <union>, or be aliased by a <typedef>.

When used as <sequence>’s elements, key or value types of a map, as an aliased type, etc., its name attribute is ignored and can be omitted.

Basic types

The tags of the available basic types are:

<boolean> <longlong> <longdouble>
<octet> <unsignedshort> <string>
<char> <unsignedlong> <wstring>
<wchar> <unsignedlonglong> <boundedString>
<short> <float> <boundedWString>
<long> <double>  

All of them are defined as follows:

XML C++
<longlong name="my_long"/>
DynamicTypeBuilder_ptr long_long_builder = DynamicTypeBuilderFactory::GetInstance()->CreateInt64Builder();
long_long_builder->SetName("my_long");
DynamicType_ptr long_long_type = DynamicTypeBuilderFactory::GetInstance()->CreateType(long_long_builder.get());

Except for <boundedString> and <boundedWString> that should include an inner element maxLength whose value indicates the maximum length of the string.

XML C++
<boundedString name="my_large_string">
    <maxLength value="41925"/>
</boundedString>

<boundedWString name="my_large_wstring">
    <maxLength value="20925"/>
</boundedWString>
DynamicTypeBuilder_ptr string_builder = DynamicTypeBuilderFactory::GetInstance()->CreateStringBuilder(41925);
string_builder->SetName("my_large_string");
DynamicType_ptr string_type = DynamicTypeBuilderFactory::GetInstance()->CreateType(string_builder.get());

DynamicTypeBuilder_ptr wstring_builder = DynamicTypeBuilderFactory::GetInstance()->CreateWstringBuilder(20925);
wstring_builder->SetName("my_large_wstring");
DynamicType_ptr wstring_type = DynamicTypeBuilderFactory::GetInstance()->CreateType(wstring_builder.get());

Arrays

Arrays are defined in the same way as any other member type but add the attribute dimensions. The format of this dimensions attribute is the size of each dimension separated by commas.

Example:

XML C++
<long name="long_array" dimensions="2,3,4"/>
std::vector<uint32_t> lengths = { 2, 3, 4 };
DynamicTypeBuilder_ptr long_builder = DynamicTypeBuilderFactory::GetInstance()->CreateInt32Builder();
DynamicTypeBuilder_ptr array_builder = DynamicTypeBuilderFactory::GetInstance()->CreateArrayBuilder(long_builder.get(), lengths);
array_builder->SetName("long_array");
DynamicType_ptr array_type = DynamicTypeBuilderFactory::GetInstance()->CreateType(array_builder.get());

It’s IDL analog would be:

long long_array[2][3][4];

Sequences

Sequences are defined by its name, its content type, and optionally its length. The type of its content can be defined by its type attribute or by a member type.

Example:

XML C++
<sequence name="my_sequence_sequence" length="3">
    <sequence type="long" length="2"/>
</sequence>
uint32_t child_len = 2;
DynamicTypeBuilder_ptr long_builder = DynamicTypeBuilderFactory::GetInstance()->CreateInt32Builder();
DynamicTypeBuilder_ptr seq_builder = DynamicTypeBuilderFactory::GetInstance()->CreateSequenceBuilder(long_builder.get(),
    child_len);
uint32_t length = 3;
DynamicTypeBuilder_ptr seq_seq_builder = DynamicTypeBuilderFactory::GetInstance()->CreateSequenceBuilder(
    seq_builder.get(), length);
seq_seq_builder->SetName("my_sequence_sequence");
DynamicType_ptr seq_type = DynamicTypeBuilderFactory::GetInstance()->CreateType(seq_seq_builder.get());

The example shows a sequence with length 3 of sequences with length 2 with <long> contents. As IDL would be:

sequence<sequence<long,2>,3> my_sequence_sequence;

Note that the inner (or content) sequence has no name, as it would be ignored by the parser.

Maps

Maps are similar to sequences, but they need to define two types instead of one. One type defines its key_type, and the other type defines its value_type. Again, both types can be defined as attributes or as members, but when defined as members, they should be contained in another XML element (<key_type> and <value_type> respectively).

The definition kind of each type can be mixed, this is, one type can be defined as an attribute and the other as a member.

Example:

XML C++
<map name="my_map_map" key_type="long" length="2">
    <value_type>
        <map key_type="long" value_type="long" length="2"/>
    </value_type>
</map>
uint32_t length = 2;
DynamicTypeBuilder_ptr long_builder = DynamicTypeBuilderFactory::GetInstance()->CreateInt32Builder();
DynamicTypeBuilder_ptr map_builder = DynamicTypeBuilderFactory::GetInstance()->CreateMapBuilder(long_builder.get(),
    long_builder.get(), length);

DynamicTypeBuilder_ptr map_map_builder = DynamicTypeBuilderFactory::GetInstance()->CreateMapBuilder(long_builder.get(),
    map_builder.get(), length);
map_map_builder->SetName("my_map_map");
DynamicType_ptr map_type = DynamicTypeBuilderFactory::GetInstance()->CreateType(map_map_builder.get());

Is equivalent to the IDL:

map<long,map<long,long,2>,2> my_map_map;

Complex types

Once defined, complex types can be used as members in the same way a basic or array type would be.

Example:

<struct name="OtherStruct">
    <MyEnum name="my_enum"/>
    <MyStruct name="my_struct" dimensions="5"/>
</struct>

Usage

In the application that will make use of XML Types, it’s mandatory to load the XML file that defines the types before trying to instantiate DynamicPubSubTypes of these types. It’s important to remark that only <struct> types generate usable DynamicPubSubType instances.

// Load the XML File
XMLP_ret ret = XMLProfileManager::loadXMLFile("types.xml");
// Create the "MyStructPubSubType"
DynamicPubSubType *pbType = XMLProfileManager::CreateDynamicPubSubType("MyStruct");
// Create a "MyStruct" instance
DynamicData* data = DynamicDataFactory::GetInstance()->CreateData(pbType->GetDynamicType());

Participant profiles

Participant profiles allow declaring Participant configuration from an XML file. All the configuration options for the participant belongs to the <rtps> label. The attribute profile_name will be the name that the Domain will associate to the profile to load it as shown in Loading and applying profiles.

<participant profile_name="part_profile_name">
    <rtps>
        <name>Participant Name</name> <!-- String -->

        <defaultUnicastLocatorList>
            <!-- LOCATOR_LIST -->
            <locator>
                <kind>UDPv4</kind>
            </locator>
        </defaultUnicastLocatorList>

        <defaultMulticastLocatorList>
            <!-- LOCATOR_LIST -->
            <locator>
                <kind>UDPv4</kind>
            </locator>
        </defaultMulticastLocatorList>

        <sendSocketBufferSize>8192</sendSocketBufferSize> <!-- uint32 -->

        <listenSocketBufferSize>8192</listenSocketBufferSize>  <!-- uint32 -->

        <builtin>
            <!-- BUILTIN -->
        </builtin>

        <port>
            <portBase>7400</portBase> <!-- uint16 -->
            <domainIDGain>200</domainIDGain> <!-- uint16 -->
            <participantIDGain>10</participantIDGain> <!-- uint16 -->
            <offsetd0>0</offsetd0> <!-- uint16 -->
            <offsetd1>1</offsetd1> <!-- uint16 -->
            <offsetd2>2</offsetd2> <!-- uint16 -->
            <offsetd3>3</offsetd3> <!-- uint16 -->
        </port>

        <participantID>99</participantID>   <!-- int32 -->

        <throughputController>
            <bytesPerPeriod>8192</bytesPerPeriod> <!-- uint32 -->
            <periodMillisecs>1000</periodMillisecs> <!-- uint32 -->
        </throughputController>

        <userTransports>
            <transport_id>TransportId1</transport_id> <!-- string -->
            <transport_id>TransportId2</transport_id> <!-- string -->
        </userTransports>

        <useBuiltinTransports>false</useBuiltinTransports> <!-- boolean -->

        <propertiesPolicy>
            <!-- PROPERTIES_POLICY -->
        </propertiesPolicy>
    </rtps>
</participant>

Note

List with the possible configuration parameter:

Name Description Values Default
<name> Participant’s name. It’s not the same field that profile_name. string  
<defaultUnicastLocatorList> List of default input unicast locators. It expects a LocatorListType. LocatorListType  
<defaultMulticastLocatorList> List of default input multicast locators. It expects a LocatorListType. LocatorListType  
<sendSocketBufferSize>
Size in bytes of the output socket buffer.
If the value is zero then FastRTPS will use the default size from
the configuration of the sockets, using a minimum size of 65536 bytes.
uint32 0
<listenSocketBufferSize>
Size in bytes of the input socket buffer.
If the value is zero then FastRTPS will use the default size from
the configuration of the sockets, using a minimum size of 65536 bytes.
uint32 0
<builtin> Built-in parameters. Explained in the Built-in parameters section. Built-in parameters  
<port>
Allows defining the port parameters and gains related to the RTPS protocol.
Explained in the Port section.
Port  
<participantID>
Participant’s identifier.
Typically it will be autogenerated by the Domain.
int32 0
<throughputController>
Allows defining a maximum throughput.
Explained in the Throughput section.
Throughput  
<userTransports> Transport descriptors to be used by the participant. List <string>  
<useBuiltinTransports>
Boolean field to indicate to the system that the participant will use
the default builtin transport independently of its <userTransports>.
bool true
<propertiesPolicy>
Additional configuration properties.
It expects a PropertiesPolicyType.
PropertiesPolicyType  

Port Configuration

Name Description Values Default
<portBase> Base port. uint16 7400
<domainIDGain> Gain in domainId. uint16 250
<participantIDGain> Gain in participantId. uint16 2
<offsetd0> Multicast metadata offset. uint16 0
<offsetd1> Unicast metadata offset. uint16 10
<offsetd2> Multicast user data offset. uint16 1
<offsetd3> Unicast user data offset. uint16 11

Built-in parameters

This section of the Participant's rtps configuration allows defining built-in parameters.

<builtin>
    <use_SIMPLE_RTPS_PDP>false</use_SIMPLE_RTPS_PDP> <!-- boolean -->

    <use_WriterLivelinessProtocol>false</use_WriterLivelinessProtocol>  <!-- boolean -->

    <EDP>SIMPLE</EDP> <!-- string -->

    <domainId>4</domainId> <!-- uint32 -->

    <leaseDuration>
        <!-- DURATION -->
    </leaseDuration>

    <leaseAnnouncement>
        <!-- DURATION -->
    </leaseAnnouncement>

    <simpleEDP>
        <PUBWRITER_SUBREADER>true</PUBWRITER_SUBREADER> <!-- boolean -->
        <PUBREADER_SUBWRITER>true</PUBREADER_SUBWRITER> <!-- boolean -->
    </simpleEDP>

    <metatrafficUnicastLocatorList>
        <!-- LOCATOR_LIST -->
        <locator>
            <kind>UDPv4</kind>
        </locator>
    </metatrafficUnicastLocatorList>

    <metatrafficMulticastLocatorList>
        <!-- LOCATOR_LIST -->
        <locator>
            <kind>UDPv4</kind>
        </locator>
    </metatrafficMulticastLocatorList>

    <initialPeersList>
        <!-- LOCATOR_LIST -->
        <locator>
            <kind>UDPv4</kind>
        </locator>
    </initialPeersList>

    <staticEndpointXMLFilename>filename.xml</staticEndpointXMLFilename> <!-- string -->

    <readerHistoryMemoryPolicy>PREALLOCATED_WITH_REALLOC</readerHistoryMemoryPolicy>

    <writerHistoryMemoryPolicy>PREALLOCATED_WITH_REALLOC</writerHistoryMemoryPolicy>
</builtin>
Name Description Values Default
<use_SIMPLE_RTPS_PDP> Indicates if the Participant must use the Simple RTPS Discovery Protocol. Boolean true
<use_WriterLivelinessProtocol> Indicates to use the WriterLiveliness protocol. Boolean true
<EDP>
- If set to SIMPLE, <simpleEDP> would be used.
- If set to STATIC, StaticEDP based on an XML file would be used
with the contents of <staticEndpointXMLFilename>.
SIMPLE, STATIC SIMPLE
<domainId> DomainId to be used by the RTPSParticipant. UInt32 0
<leaseDuration>
Indicates how much time remote RTPSParticipants should consider this
RTPSParticipant alive.
DurationType 130 s
<leaseAnnouncement>
The period for the RTPSParticipant to send its Discovery Message to all
other discovered RTPSParticipants as well as to all Multicast ports.
DurationType 40 s
<simpleEDP> Attributes of the SimpleEDP protocol simpleEDP  
<metatrafficUnicastLocatorList> Metatraffic Unicast Locator List List of LocatorListType  
<metatrafficMulticastLocatorList> Metatraffic Multicast Locator List. List of LocatorListType  
<initialPeersList> Initial peers. List of LocatorListType  
<staticEndpointXMLFilename>
StaticEDP XML filename.
Only necessary if <EDP> is set to STATIC
string  
<readerHistoryMemoryPolicy> Memory policy for builtin readers. PREALLOCATED, PREALLOCATED_WITH_REALLOC, DYNAMIC PREALLOCATED
<writerHistoryMemoryPolicy> Memory policy for builtin writers. PREALLOCATED, PREALLOCATED_WITH_REALLOC, DYNAMIC PREALLOCATED

simpleEDP

Name Description Values Default
<PUBWRITER_SUBREADER> Indicates if the participant must use Publication Writer and Subcription Reader. Boolean true
<PUBREADER_SUBWRITER> Indicates if the participant must use Publication Reader and Subcription Writer. Boolean true

Publisher profiles

Publisher profiles allow declaring Publisher configuration from an XML file. The attribute profile_name is the name that the Domain associates to the profile to load it as shown in the Loading and applying profiles section.

<publisher profile_name="pub_profile_name">
    <topic>
        <!-- TOPIC_TYPE -->
    </topic>

    <qos>
        <!-- QOS -->
    </qos>

    <times> <!-- readerTimesType -->
        <initialAcknackDelay>
            <!-- DURATION -->
        </initialAcknackDelay>
        <heartbeatResponseDelay>
            <!-- DURATION -->
        </heartbeatResponseDelay>
    </times>

    <unicastLocatorList>
        <!-- LOCATOR_LIST -->
        <locator>
            <kind>UDPv4</kind>
        </locator>
    </unicastLocatorList>

    <multicastLocatorList>
        <!-- LOCATOR_LIST -->
        <locator>
            <kind>UDPv4</kind>
        </locator>
    </multicastLocatorList>

    <throughputController>
        <bytesPerPeriod>8192</bytesPerPeriod> <!-- uint32 -->
        <periodMillisecs>1000</periodMillisecs> <!-- uint32 -->
    </throughputController>

    <historyMemoryPolicy>DYNAMIC</historyMemoryPolicy>

    <propertiesPolicy>
        <!-- PROPERTIES_POLICY -->
    </propertiesPolicy>

    <userDefinedID>55</userDefinedID> <!-- Int16 -->

    <entityID>66</entityID> <!-- Int16 -->
</publisher>

Note

Name Description Values Default
<topic> Topic Type configuration of the pubsliher. Topic Type  
<qos> Publisher QOS configuration. QOS  
<times> It allows configuring some time related parameters of the publisher . Times  
<unicastLocatorList> List of input unicast locators. It expects a LocatorListType. List of LocatorListType  
<multicastLocatorList> List of input multicast locators. It expects a LocatorListType. List of LocatorListType  
<throughputController> Limits the output bandwidth of the publisher. Throughput  
<historyMemoryPolicy> Memory allocation kind for pubsliher’s history. PREALLOCATED, PREALLOCATED_WITH_REALLOC, DYNAMIC PREALLOCATED
<propertiesPolicy> Additional configuration properties. PropertiesPolicyType  
<userDefinedID> Used for StaticEndpointDiscovery. Int16 -1
<entityID> EntityId of the endpoint. Int16 -1

Times

Name Description Values Default
<initialHeartbeatDelay> Initial heartbeat delay. DurationType ~45 ms
<heartbeatPeriod> Periodic HB period. DurationType 3 s
<nackResponseDelay> Delay to apply to the response of a ACKNACK message. DurationType ~45 ms
<nackSupressionDuration>
This time allows the RTPSWriter to ignore nack messages
too soon after the data has been sent.
DurationType 0 ms

Subscriber profiles

Subscriber profiles allow declaring Subscriber configuration from an XML file. The attribute profile_name is the name that the Domain associates to the profile to load it as shown in Loading and applying profiles.

<subscriber profile_name="sub_profile_name">
    <topic>
        <!-- TOPIC_TYPE -->
    </topic>

    <qos>
        <!-- QOS -->
    </qos>

    <times> <!-- readerTimesType -->
        <initialAcknackDelay>
            <!-- DURATION -->
        </initialAcknackDelay>
        <heartbeatResponseDelay>
            <!-- DURATION -->
        </heartbeatResponseDelay>
    </times>

    <unicastLocatorList>
        <!-- LOCATOR_LIST -->
        <locator>
            <kind>UDPv4</kind>
        </locator>
    </unicastLocatorList>

    <multicastLocatorList>
        <!-- LOCATOR_LIST -->
        <locator>
            <kind>UDPv4</kind>
        </locator>
    </multicastLocatorList>

    <expectsInlineQos>true</expectsInlineQos> <!-- boolean -->

    <historyMemoryPolicy>DYNAMIC</historyMemoryPolicy>

    <propertiesPolicy>
        <!-- PROPERTIES_POLICY -->
    </propertiesPolicy>

    <userDefinedID>55</userDefinedID> <!-- Int16 -->

    <entityID>66</entityID> <!-- Int16 -->
</subscriber>

Note

Name Description Values Default
<topic> Topic Type configuration of the subscriber. Topic Type  
<qos> Subscriber QOS configuration. QOS  
<times> It allows configuring some time related parameters of the subscriber. Times  
<unicastLocatorList> List of input unicast locators. It expects a LocatorListType. List of LocatorListType  
<multicastLocatorList> List of input multicast locators. It expects a LocatorListType. List of LocatorListType  
<expectsInlineQos> It indicates if QOS is expected inline. Boolean false
<historyMemoryPolicy> Memory allocation kind for subscriber’s history. PREALLOCATED, PREALLOCATED_WITH_REALLOC, DYNAMIC PREALLOCATED
<propertiesPolicy> Additional configuration properties. PropertiesPolicyType  
<userDefinedID> Used for StaticEndpointDiscovery. Int16 -1
<entityID> EntityId of the endpoint. Int16 -1

Times

Name Description Values Default
<initialAcknackDelay> Initial AckNack delay. DurationType ~45 ms
<heartbeatResponseDelay> Delay to be applied when a hearbeat message is received. DurationType ~4.5 ms

Common

In the above profiles, some types are used in several different places. To avoid too many details, some of that places have a tag like LocatorListType that indicates that field is defined in this section.

LocatorListType

It represents a list of Locator_t. LocatorListType is normally used as an anonymous type, this is, it hasn’t its own label. Instead, it is used inside other configuration parameter labels that expect a list of locators and give it sense, for example, in <defaultUnicastLocatorList>:

<defaultUnicastLocatorList>
    <locator>
        <kind>UDPv4</kind>
        <!-- Access as physical, typical UDP usage -->
        <port>7400</port> <!-- uint32 -->
        <address>192.168.1.41</address>
    </locator>
    <locator>
        <kind>TCPv4</kind>
        <!-- Both physical and logical, useful in TCP transports -->
        <port_>
            <physical_port>5100</physical_port> <!-- uint16 -->
            <logical_port>7400</logical_port> <!-- uint16 -->
        </port_>
        <addresses_>
            <unique_lan_id>192.168.1.1.1.1.2.55</unique_lan_id>
            <wan_address>80.80.99.45</wan_address>
            <ip_address>192.168.1.55</ip_address>
        </addresses_>
    </locator>
    <locator>
        <kind>UDPv6</kind>
        <port>8844</port>
        <ipv6_address>::1</ipv6_address>
    </locator>
</defaultUnicastLocatorList>

In this example, there are three different locators in <defaultUnicastLocatorList>.

Let’s see each Locator’s fields in detail:

Name Description Values Default
<kind> Locator’s kind. UDPv4, UDPv6, TCPv4, TCPv6 UDPv4
<port> Physical port number of the locator. Uint32 0
<port_>
It allows to access low-level TCP port details.
It is detailed in TCP Ports
TCP Ports  
<address> IPv4 address of the locator string with IPv4 Format 0.0.0.0
<addresses_>
It allows managing low-level details in address of TCPv4 locators.
It is detailed in TCP Addresses
TCP Addresses  
<ipv6_address> IPv6 address of the locator string with IPv6 Format ::

TCP Ports

Name Description Values Default
<physical_port> TCP port. UInt16 0
<logical_port> RTPS logical port. UInt16 0

TCP Addresses

Name Description Values Default
<unique_lan_id> The LAN ID uniquely identifies the LAN the locator belongs to. string (16 bytes)  
<wan_address> WAN IPv4 address. string with IPv4 Format 0.0.0.0
<ip_address> WAN IPv4 address. string with IPv4 Format 0.0.0.0

PropertiesPolicyType

PropertiesPolicyType (XML label <propertiesPolicy>) allows defining a set of generic properties. It’s useful at defining extended or custom configuration parameters.

<propertiesPolicy>
    <properties>
        <property>
            <name>Property1Name</name> <!-- string -->
            <value>Property1Value</value> <!-- string -->
            <propagate>false</propagate> <!-- boolean -->
        </property>
        <property>
            <name>Property2Name</name> <!-- string -->
            <value>Property2Value</value> <!-- string -->
            <propagate>true</propagate> <!-- boolean -->
        </property>
    </properties>
</propertiesPolicy>
Name Description Values Default
<name> Name to identify the property. string  
<value> Property’s value. string  
<propagate> Indicates if it is going to be serialized along with the object it belongs to. Boolean false

DurationType

DurationType expresses a period of time and it’s commonly used as an anonymous type, this is, it hasn’t its own label. Instead, it is used inside other configuration parameter labels that give it sense, like <leaseAnnouncement> or <leaseDuration>.

<leaseDuration>INFINITE</leaseDuration> <!-- string -->

<leaseDuration>
    <seconds>500</seconds> <!-- int32 -->
    <fraction>0</fraction> <!-- uint32 -->
</leaseDuration>

<leaseAnnouncement>
    <seconds>1</seconds> <!-- int32 -->
    <fraction>856000</fraction> <!-- uint32 -->
</leaseAnnouncement>

Duration time can be defined through a constant value directly (INFINITE, ZERO, or INVALID), or by <seconds> plus <fraction> labels:

  • INFINITE: Constant value, represents an infinite period of time.
  • ZERO: Constant value, represents 0.0 seconds.
  • INVALID: Constant value, represents an invalid period of time.
Name Description Values Default
<seconds> Number of seconds. Int32 0
<fraction> Fractions of a second. A fraction is 1/(2^32) seconds. UInt32 0

Topic Type

The topic name and data type are used as meta-data to determine whether Publishers and Subscribers can exchange messages. There is a deeper explanation of the “topic” field here: Topic information.

<topic>
    <kind>NO_KEY</kind> <!-- string -->
    <name>TopicName</name> <!-- string -->
    <dataType>TopicDataTypeName</dataType> <!-- string -->
    <historyQos>
        <kind>KEEP_LAST</kind> <!-- string -->
        <depth>20</depth> <!-- uint32 -->
    </historyQos>
    <resourceLimitsQos>
        <max_samples>5</max_samples> <!-- unint32 -->
        <max_instances>2</max_instances> <!-- unint32 -->
        <max_samples_per_instance>1</max_samples_per_instance> <!-- unint32 -->
        <allocated_samples>20</allocated_samples> <!-- unint32 -->
    </resourceLimitsQos>
</topic>
Name Description Values Default
<kind> It defines the Topic’s kind NO_KEY, WITH_KEY NO_KEY
<name> It defines the Topic’s name. Must be unique. string  
<dataType> It references the Topic’s data type. string  
<historyQos>
It controls the behavior of Fast RTPS when the value of an instance changes
before it is finally communicated to some of its existing DataReader entities.
HistoryQos  
<resourceLimitsQos>
It controls the resources that Fast RTPS can use in order to meet the
requirements imposed by the application and other QoS settings.
ResourceLimitsQos  

HistoryQoS

It controls the behavior of Fast RTPS when the value of an instance changes before it is finally communicated to some of its existing DataReader entities.

Name Description Values Default
<kind> See description below. KEEP_LAST, KEEP_ALL KEEP_LAST
<depth> UInt32 1000
If the <kind> is set to KEEP_LAST, then Fast RTPS will only attempt to keep the latest values of the instance and discard the older ones.
If the <kind> is set to KEEP_ALL, then Fast RTPS will attempt to maintain and deliver all the values of the instance to existing subscribers.
The setting of <depth> must be consistent with the ResourceLimitsQos <max_samples_per_instance>. For these two QoS to be consistent, they must verify that depth <= max_samples_per_instance.

ResourceLimitsQos

It controls the resources that Fast RTPS can use in order to meet the requirements imposed by the application and other QoS settings.

Name Description Values Default
<max_samples> It must verify that max_samples >= max_samples_per_instance. UInt32 5000
<max_instances> It defines the maximum number of instances. UInt32 10
<max_samples_per_instance> It must verify that HistoryQos depth <= max_samples_per_instance. UInt32 400
<allocated_samples> It controls the maximum number of samples to be stored. UInt32 100

QOS

The quality of service (QoS) handles the restrictions applied to the application.

<qos> <!-- readerQosPoliciesType -->
    <durability>
        <kind>VOLATILE</kind> <!-- string -->
    </durability>

    <liveliness>
        <!-- LIVELINESS -->
        <kind>AUTOMATIC</kind> <!-- string -->
    </liveliness>

    <reliability>
        <kind>BEST_EFFORT</kind>
    </reliability>

    <partition>
        <names>
            <name>part1</name> <!-- string -->
            <name>part2</name> <!-- string -->
        </names>
    </partition>
</qos>
Name Description Values Default
<durability> It is defined on Setting the data durability kind section. VOLATILE, TRANSIENT_LOCAL, TRANSIENT VOLATILE
<liveliness> Defines the liveliness of the participant. LivelinessType  
<reliability> It is defined on Reliability section. RELIABLE, BEST_EFFORT RELIABLE
<partition>
It allows the introduction of a logical partition concept
inside the ‘physical’ partition induced by a domain.
List <string>  

LivelinessType

This parameter defines who is responsible for issues of liveliness packets.

<liveliness>
    <kind>AUTOMATIC</kind> <!-- string -->
    <leaseDuration>
        <!-- DURATION -->
    </leaseDuration>
    <announcement_period>
        <!-- DURATION -->
    </announcement_period>
</liveliness>
Name Description Values Default
<kind> Specifies how to manage liveliness. AUTOMATIC, MANUAL_BY_TOPIC, MANUAL_BY_TOPIC AUTOMATIC
<leaseDuration>
Amount of time that the remote RTPSParticipants should consider this
RTPSParticipant to be alive since the last message.
DurationType 130 s
<announcement_period>
The period to send its Discovery Message to all other
discovered RTPSParticipants as well as to all Multicast ports.
DurationType 40 s

Throughput Configuration

Throughput Configuration allows to limit the output bandwidth.

Name Description Values Default
<bytesPerPeriod> Packet size in bytes that this controller will allow in a given period. UInt32 4294967295
<periodMillisecs> Window of time in which no more than <bytesPerPeriod> bytes are allowed. UInt32 0

Example

In this section, there is a full XML example with all possible configuration. It can be used as a quick reference, but it may not be valid due to incompatibility or exclusive properties. Don’t take it as a working example.

<profiles>
    <transport_descriptors>
        <transport_descriptor>
            <transport_id>ExampleTransportId1</transport_id>
            <type>TCPv4</type>
            <sendBufferSize>8192</sendBufferSize>
            <receiveBufferSize>8192</receiveBufferSize>
            <TTL>250</TTL>
            <maxMessageSize>16384</maxMessageSize>
            <maxInitialPeersRange>100</maxInitialPeersRange>
            <interfaceWhiteList>
                <id>192.168.1.41</id>
                <id>127.0.0.1</id>
            </interfaceWhiteList>
            <wan_addr>80.80.55.44</wan_addr>
            <output_port>5101</output_port>
            <keep_alive_frequency_ms>5000</keep_alive_frequency_ms>
            <keep_alive_timeout_ms>25000</keep_alive_timeout_ms>
            <max_logical_port>200</max_logical_port>
            <logical_port_range>20</logical_port_range>
            <logical_port_increment>2</logical_port_increment>
            <ListeningPorts>
                <port>5100</port>
                <port>5200</port>
            </ListeningPorts>
        </transport_descriptor>
        <transport_descriptor>
            <transport_id>ExampleTransportId2</transport_id>
            <type>UDPv6</type>
        </transport_descriptor>
    </transport_descriptors>

    <types>
        <type> <!-- Types can be defined in its own type of tag or sharing the same tag -->
            <enum name="MyAloneEnumType">
                <literal name="A" value="0"/>
                <literal name="B" value="1"/>
                <literal name="C" value="2"/>
            </enum>
        </type>
        <type>
            <enum name="MyEnumType">
                <literal name="A" value="0"/>
                <literal name="B" value="1"/>
                <literal name="C" value="2"/>
            </enum>

            <typedef name="MyAlias1" value="MyEnum"/>

            <typedef name="MyAlias2">
                <long dimensions="2,2"/>
            </typedef>

            <struct name="MyStruct">
                <long name="first"/>
                <longlong name="second"/>
            </struct>

            <union name="MyUnion">
                <discriminator type="octet"/>
                <case>
                    <caseValue value="0"/>
                    <caseValue value="1"/>
                    <long name="first"/>
                </case>
                <case>
                    <caseValue value="2"/>
                    <MyStruct name="second"/>
                </case>
                <case>
                    <caseValue value="default"/>
                    <longlong name="third"/>
                </case>
            </union>

            <!-- All possible members struct type -->
            <struct name="MyFullStruct">
                <!-- Primitives & basic -->
                <boolean name="my_bool"/>
                <octet name="my_octet"/>
                <char name="my_char"/>
                <wchar name="my_wchar"/>
                <short name="my_short"/>
                <long name="my_long"/>
                <longlong name="my_longlong"/>
                <unsignedshort name="my_unsignedshort"/>
                <unsignedlong name="my_unsignedlong"/>
                <unsignedlonglong name="my_unsignedlonglong"/>
                <float name="my_float"/>
                <double name="my_double"/>
                <longdouble name="my_longdouble"/>
                <string name="my_string"/>
                <wstring name="my_wstring"/>
                <boundedString name="my_boundedString">
                    <maxLength value="41925"/>
                </boundedString>
                <boundedWString name="my_boundedWString">
                    <maxLength value="41925"/>
                </boundedWString>

                <!-- long long_array[2][3][4]; -->
                <long name="long_array" dimensions="2,3,4"/>

                <!-- sequence<sequence<long,2>,3> my_sequence_sequence; -->
                <sequence name="my_sequence_sequence" length="3">
                    <sequence type="long" length="2"/>
                </sequence>

                <!-- map<long,map<long,long,2>,2> my_map_map; -->
                <map name="my_map_map" key_type="long" length="2">
                    <value_type>
                        <map key_type="long" value_type="long" length="2"/>
                    </value_type>
                </map>

                <!-- Complex types -->
                <struct name="OtherStruct">
                    <MyEnum name="my_enum"/>
                    <MyStruct name="my_struct" dimensions="5"/>
                </struct>
            </struct>
        </type>
    </types>

    <participant profile_name="part_profile_example">
        <rtps>
            <name>Participant Name</name> <!-- String -->

            <defaultUnicastLocatorList>
                <locator>
                    <kind>UDPv4</kind>
                    <!-- Access as physical, like UDP -->
                    <port>7400</port>
                    <address>192.168.1.41</address>
                </locator>
                <locator>
                    <kind>TCPv4</kind>
                    <!-- Both physical and logical, like TCP -->
                    <port_>
                        <physical_port>5100</physical_port>
                        <logical_port>7400</logical_port>
                    </port_>
                    <addresses_>
                        <unique_lan_id>192.168.1.1.1.1.2.55</unique_lan_id>
                        <wan_address>80.80.99.45</wan_address>
                        <ip_address>192.168.1.55</ip_address>
                    </addresses_>
                </locator>
                <locator>
                    <kind>UDPv6</kind>
                    <port>8844</port>
                    <ipv6_address>::1</ipv6_address>
                </locator>
            </defaultUnicastLocatorList>

            <defaultMulticastLocatorList>
                <locator>
                    <kind>UDPv4</kind>
                    <!-- Access as physical, like UDP -->
                    <port>7400</port>
                    <address>192.168.1.41</address>
                </locator>
                <locator>
                    <kind>TCPv4</kind>
                    <!-- Both physical and logical, like TCP -->
                    <port_>
                        <physical_port>5100</physical_port>
                        <logical_port>7400</logical_port>
                    </port_>
                    <addresses_>
                        <unique_lan_id>192.168.1.1.1.1.2.55</unique_lan_id>
                        <wan_address>80.80.99.45</wan_address>
                        <ip_address>192.168.1.55</ip_address>
                    </addresses_>
                </locator>
                <locator>
                    <kind>UDPv6</kind>
                    <port>8844</port>
                    <ipv6_address>::1</ipv6_address>
                </locator>
            </defaultMulticastLocatorList>

            <sendSocketBufferSize>8192</sendSocketBufferSize>

            <listenSocketBufferSize>8192</listenSocketBufferSize>

            <builtin>
                <use_SIMPLE_RTPS_PDP>false</use_SIMPLE_RTPS_PDP>

                <use_WriterLivelinessProtocol>false</use_WriterLivelinessProtocol>

                <EDP>SIMPLE</EDP>

                <domainId>4</domainId>

                <leaseDuration>INFINITE</leaseDuration>

                <leaseAnnouncement>
                    <seconds>1</seconds>
                    <fraction>856000</fraction>
                </leaseAnnouncement>

                <simpleEDP>
                    <PUBWRITER_SUBREADER>true</PUBWRITER_SUBREADER>
                    <PUBREADER_SUBWRITER>true</PUBREADER_SUBWRITER>
                </simpleEDP>

                <metatrafficUnicastLocatorList>
                    <locator>
                        <kind>UDPv4</kind>
                        <!-- Access as physical, like UDP -->
                        <port>7400</port>
                        <address>192.168.1.41</address>
                    </locator>
                    <locator>
                        <kind>TCPv4</kind>
                        <!-- Both physical and logical, like TCP -->
                        <port_>
                            <physical_port>5100</physical_port>
                            <logical_port>7400</logical_port>
                        </port_>
                        <addresses_>
                            <unique_lan_id>192.168.1.1.1.1.2.55</unique_lan_id>
                            <wan_address>80.80.99.45</wan_address>
                            <ip_address>192.168.1.55</ip_address>
                        </addresses_>
                    </locator>
                    <locator>
                        <kind>UDPv6</kind>
                        <port>8844</port>
                        <ipv6_address>::1</ipv6_address>
                    </locator>
                </metatrafficUnicastLocatorList>

                <metatrafficMulticastLocatorList>
                    <locator>
                        <kind>UDPv4</kind>
                        <!-- Access as physical, like UDP -->
                        <port>7400</port>
                        <address>192.168.1.41</address>
                    </locator>
                    <locator>
                        <kind>TCPv4</kind>
                        <!-- Both physical and logical, like TCP -->
                        <port_>
                            <physical_port>5100</physical_port>
                            <logical_port>7400</logical_port>
                        </port_>
                        <addresses_>
                            <unique_lan_id>192.168.1.1.1.1.2.55</unique_lan_id>
                            <wan_address>80.80.99.45</wan_address>
                            <ip_address>192.168.1.55</ip_address>
                        </addresses_>
                    </locator>
                    <locator>
                        <kind>UDPv6</kind>
                        <port>8844</port>
                        <ipv6_address>::1</ipv6_address>
                    </locator>
                </metatrafficMulticastLocatorList>

                <initialPeersList>
                    <locator>
                        <kind>UDPv4</kind>
                        <!-- Access as physical, like UDP -->
                        <port>7400</port>
                        <address>192.168.1.41</address>
                    </locator>
                    <locator>
                        <kind>TCPv4</kind>
                        <!-- Both physical and logical, like TCP -->
                        <port_>
                            <physical_port>5100</physical_port>
                            <logical_port>7400</logical_port>
                        </port_>
                        <addresses_>
                            <unique_lan_id>192.168.1.1.1.1.2.55</unique_lan_id>
                            <wan_address>80.80.99.45</wan_address>
                            <ip_address>192.168.1.55</ip_address>
                        </addresses_>
                    </locator>
                    <locator>
                        <kind>UDPv6</kind>
                        <port>8844</port>
                        <ipv6_address>::1</ipv6_address>
                    </locator>
                </initialPeersList>

                <staticEndpointXMLFilename>filename.xml</staticEndpointXMLFilename>

                <readerHistoryMemoryPolicy>PREALLOCATED_WITH_REALLOC</readerHistoryMemoryPolicy>

                <writerHistoryMemoryPolicy>PREALLOCATED</writerHistoryMemoryPolicy>
            </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>
                    <property>
                        <name>Property1Name</name>
                        <value>Property1Value</value>
                        <propagate>false</propagate>
                    </property>
                    <property>
                        <name>Property2Name</name>
                        <value>Property2Value</value>
                        <propagate>false</propagate>
                    </property>
                </properties>
            </propertiesPolicy>
        </rtps>
    </participant>

    <publisher profile_name="pub_profile_example">
        <topic>
            <kind>WITH_KEY</kind>
            <name>TopicName</name>
            <dataType>TopicDataTypeName</dataType>
            <historyQos>
                <kind>KEEP_LAST</kind>
                <depth>20</depth>
            </historyQos>
            <resourceLimitsQos>
                <max_samples>5</max_samples>
                <max_instances>2</max_instances>
                <max_samples_per_instance>1</max_samples_per_instance>
                <allocated_samples>20</allocated_samples>
            </resourceLimitsQos>
        </topic>

        <qos> <!-- writerQosPoliciesType -->
            <durability>
                <kind>VOLATILE</kind>
            </durability>
            <liveliness>
                <kind>AUTOMATIC</kind>
                <leaseDuration>
                    <seconds>1</seconds>
                    <fraction>856000</fraction>
                </leaseDuration>
                <announcement_period>
                    <seconds>1</seconds>
                    <fraction>856000</fraction>
                </announcement_period>
            </liveliness>
            <reliability>
                <kind>BEST_EFFORT</kind>
                <max_blocking_time>
                    <seconds>1</seconds>
                    <fraction>856000</fraction>
                </max_blocking_time>
            </reliability>
            <partition>
                <names>
                    <name>part1</name>
                    <name>part2</name>
                </names>
            </partition>
            <publishMode>
                <kind>ASYNCHRONOUS</kind>
            </publishMode>
        </qos>

        <times>
            <initialHeartbeatDelay>
                <seconds>1</seconds>
                <fraction>856000</fraction>
            </initialHeartbeatDelay>
            <heartbeatPeriod>
                <seconds>1</seconds>
                <fraction>856000</fraction>
            </heartbeatPeriod>
            <nackResponseDelay>
                <seconds>1</seconds>
                <fraction>856000</fraction>
            </nackResponseDelay>
            <nackSupressionDuration>
                <seconds>1</seconds>
                <fraction>856000</fraction>
            </nackSupressionDuration>
        </times>

        <unicastLocatorList>
            <locator>
                <kind>UDPv4</kind>
                <!-- Access as physical, like UDP -->
                <port>7400</port>
                <address>192.168.1.41</address>
            </locator>
            <locator>
                <kind>TCPv4</kind>
                <!-- Both physical and logical, like TCP -->
                <port_>
                    <physical_port>5100</physical_port>
                    <logical_port>7400</logical_port>
                </port_>
                <addresses_>
                    <unique_lan_id>192.168.1.1.1.1.2.55</unique_lan_id>
                    <wan_address>80.80.99.45</wan_address>
                    <ip_address>192.168.1.55</ip_address>
                </addresses_>
            </locator>
            <locator>
                <kind>UDPv6</kind>
                <port>8844</port>
                <ipv6_address>::1</ipv6_address>
            </locator>
        </unicastLocatorList>

        <multicastLocatorList>
            <locator>
                <kind>UDPv4</kind>
                <!-- Access as physical, like UDP -->
                <port>7400</port>
                <address>192.168.1.41</address>
            </locator>
            <locator>
                <kind>TCPv4</kind>
                <!-- Both physical and logical, like TCP -->
                <port_>
                    <physical_port>5100</physical_port>
                    <logical_port>7400</logical_port>
                </port_>
                <addresses_>
                    <unique_lan_id>192.168.1.1.1.1.2.55</unique_lan_id>
                    <wan_address>80.80.99.45</wan_address>
                    <ip_address>192.168.1.55</ip_address>
                </addresses_>
            </locator>
            <locator>
                <kind>UDPv6</kind>
                <port>8844</port>
                <ipv6_address>::1</ipv6_address>
            </locator>
        </multicastLocatorList>

        <throughputController>
            <bytesPerPeriod>8192</bytesPerPeriod>
            <periodMillisecs>1000</periodMillisecs>
        </throughputController>

        <historyMemoryPolicy>DYNAMIC</historyMemoryPolicy>

        <propertiesPolicy>
            <properties>
                <property>
                    <name>Property1Name</name>
                    <value>Property1Value</value>
                    <propagate>false</propagate>
                </property>
                <property>
                    <name>Property2Name</name>
                    <value>Property2Value</value>
                    <propagate>false</propagate>
                </property>
            </properties>
        </propertiesPolicy>

        <userDefinedID>45</userDefinedID>

        <entityID>76</entityID>
    </publisher>

    <subscriber profile_name="sub_profile_example">
        <topic>
            <kind>WITH_KEY</kind>
            <name>TopicName</name>
            <dataType>TopicDataTypeName</dataType>
            <historyQos>
                <kind>KEEP_LAST</kind>
                <depth>20</depth>
            </historyQos>
            <resourceLimitsQos>
                <max_samples>5</max_samples>
                <max_instances>2</max_instances>
                <max_samples_per_instance>1</max_samples_per_instance>
                <allocated_samples>20</allocated_samples>
            </resourceLimitsQos>
        </topic>

        <qos>
            <durability>
                <kind>PERSISTENT</kind>
            </durability>
            <liveliness>
                <kind>MANUAL_BY_PARTICIPANT</kind>
                <leaseDuration>
                    <seconds>1</seconds>
                    <fraction>856000</fraction>
                </leaseDuration>
                <announcement_period>
                    <seconds>1</seconds>
                    <fraction>856000</fraction>
                </announcement_period>
            </liveliness>
            <reliability>
                <kind>BEST_EFFORT</kind>
                <max_blocking_time>
                    <seconds>1</seconds>
                    <fraction>856000</fraction>
                </max_blocking_time>
            </reliability>
            <partition>
                <names>
                    <name>part1</name>
                    <name>part2</name>
                </names>
            </partition>
        </qos>

        <times>
            <initialAcknackDelay>
                <seconds>1</seconds>
                <fraction>856000</fraction>
            </initialAcknackDelay>
            <heartbeatResponseDelay>
                <seconds>1</seconds>
                <fraction>856000</fraction>
            </heartbeatResponseDelay>
        </times>

        <unicastLocatorList>
            <locator>
                <kind>UDPv4</kind>
                <!-- Access as physical, like UDP -->
                <port>7400</port>
                <address>192.168.1.41</address>
            </locator>
            <locator>
                <kind>TCPv4</kind>
                <!-- Both physical and logical, like TCP -->
                <port_>
                    <physical_port>5100</physical_port>
                    <logical_port>7400</logical_port>
                </port_>
                <addresses_>
                    <unique_lan_id>192.168.1.1.1.1.2.55</unique_lan_id>
                    <wan_address>80.80.99.45</wan_address>
                    <ip_address>192.168.1.55</ip_address>
                </addresses_>
            </locator>
            <locator>
                <kind>UDPv6</kind>
                <port>8844</port>
                <ipv6_address>::1</ipv6_address>
            </locator>
        </unicastLocatorList>

        <multicastLocatorList>
            <locator>
                <kind>UDPv4</kind>
                <!-- Access as physical, like UDP -->
                <port>7400</port>
                <address>192.168.1.41</address>
            </locator>
            <locator>
                <kind>TCPv4</kind>
                <!-- Both physical and logical, like TCP -->
                <port_>
                    <physical_port>5100</physical_port>
                    <logical_port>7400</logical_port>
                </port_>
                <addresses_>
                    <unique_lan_id>192.168.1.1.1.1.2.55</unique_lan_id>
                    <wan_address>80.80.99.45</wan_address>
                    <ip_address>192.168.1.55</ip_address>
                </addresses_>
            </locator>
            <locator>
                <kind>UDPv6</kind>
                <port>8844</port>
                <ipv6_address>::1</ipv6_address>
            </locator>
        </multicastLocatorList>

        <expectsInlineQos>true</expectsInlineQos>

        <historyMemoryPolicy>DYNAMIC</historyMemoryPolicy>

        <propertiesPolicy>
            <properties>
                <property>
                    <name>Property1Name</name>
                    <value>Property1Value</value>
                    <propagate>false</propagate>
                </property>
                <property>
                    <name>Property2Name</name>
                    <value>Property2Value</value>
                    <propagate>false</propagate>
                </property>
            </properties>
        </propertiesPolicy>

        <userDefinedID>55</userDefinedID>

        <entityID>66</entityID>
    </subscriber>
</profiles>