10.4. DataWriter profiles

The DataWriter profiles allow for configuring DataWriters from an XML file. These profiles are defined within the <data_writer> XML tags.

10.4.1. DataWriter XML attributes

The <data_writer> element has two attributes defined: profile_name and is_default_profile.

Name

Description

Use

profile_name

Sets the name under which the <data_writer> profile is registered in the DDS Domain,
so that it can be loaded later by the DomainParticipant, as shown in
Loading and applying profiles.

Mandatory

is_default_profile

Sets the <data_writer> profile as the default profile. Thus, if a default profile
exists, it will be used when no other DataWriter profile is specified at the
DataWriter’s creation.

Optional

10.4.2. DataWriter configuration

The DataWriter configuration is performed through the XML elements listed in the following table.

Name

Description

Values

Default

<topic>

TopicType configuration of the DataWriter.

TopicType

<qos>

DataWriter QoS configuration.

QoS

<times>

It configures some time related parameters
of the DataWriter.

WriterTimes

<unicastLocatorList>

List of input unicast locators.
It expects a LocatorListType.

<locator>

<multicastLocatorList>

List of input multicast locators.
It expects a LocatorListType.

<locator>

<external_unicast_locators>

List of External Locators
to announce for the communication
with this DataWriter.

ExternalLocatorListType

<ignore_non_matching_locators>

Whether to ignore locators received on
announcements from other entities when
they don’t match with any of the locators
announced by this DataWriter.

bool

false

<historyMemoryPolicy>

Memory allocation kind for DataWriter’s
history. See HistoryQosPolicyKind.

HistoryMemoryPolicy

PREALLOCATED

<propertiesPolicy>

Additional configuration properties.

PropertiesPolicyType

<userDefinedID>

Used for EDPStatic.

int16_t

-1

<entityID>

Sets the entity_id of the RTPSEndpointQos
class.

int16_t

-1

<matchedSubscribersAllocation>

Sets the limits of the collection of matched
DataReaders. See
ParticipantResourceLimitsQos.

Allocation Configuration

Example

<?xml version="1.0" encoding="UTF-8" ?>
<dds xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles">
    <profiles>
        <data_writer profile_name="datawriter_profile_name">
            <topic>
                <historyQos>
                    <kind>KEEP_LAST</kind>
                </historyQos>
            </topic>

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

            <times> <!-- writerTimesType -->
                <initialHeartbeatDelay>
                    <nanosec>12</nanosec>
                </initialHeartbeatDelay>

                <heartbeatPeriod>
                    <sec>3</sec>
                </heartbeatPeriod>

                <nackResponseDelay>
                    <nanosec>5</nanosec>
                </nackResponseDelay>

                <nackSupressionDuration>
                    <sec>0</sec>
                </nackSupressionDuration>
            </times>

            <unicastLocatorList>
                <!-- LOCATOR_LIST -->
                <locator>
                    <udpv4>
                        <address>192.168.0.1</address>
                    </udpv4>
                </locator>
            </unicastLocatorList>

            <multicastLocatorList>
                <!-- LOCATOR_LIST -->
                <locator>
                    <udpv4>
                        <address>192.168.0.1</address>
                    </udpv4>
                </locator>
            </multicastLocatorList>

            <external_unicast_locators>
                <!-- EXTERNAL_LOCATOR_LIST -->
                <udpv4 externality="1" cost="0" mask="24">
                    <address>100.100.100.10</address>
                    <port>12345</port>
                </udpv4>
            </external_unicast_locators>

            <ignore_non_matching_locators>true</ignore_non_matching_locators>

            <historyMemoryPolicy>DYNAMIC</historyMemoryPolicy>

            <!-- PROPERTIES_POLICY -->
            <propertiesPolicy>
                <properties>
                    <property>
                        <name>PropertyName</name>
                        <value>PropertyValue</value>
                    </property>
                </properties>
            </propertiesPolicy>

            <userDefinedID>55</userDefinedID>

            <entityID>66</entityID>

            <matchedSubscribersAllocation>
                <initial>0</initial>
                <maximum>0</maximum>
                <increment>1</increment>
            </matchedSubscribersAllocation>

            <!-- reader_filters_allocation cannot be configured using XML (yet) -->
        </data_writer>
    </profiles>
</dds>

Note

10.4.2.1. WriterTimes

These parameters are included within RTPSReliableWriterQos in the WriterTimes structure.

Name

Description

Values

Default

<initialHeartbeatDelay>

Initial heartbeat delay.

DurationType

12 ms

<heartbeatPeriod>

Periodic heartbeat period.

DurationType

3 s

<nackResponseDelay>

Delay to apply to the response of an ACKNACK message.

DurationType

5 ms

<nackSupressionDuration>

This time allows the DataWriter to ignore NACK
messages for a given period of time right after
the data has been sent.

DurationType

0 ms