11.4. DataReader profiles

The DataReader profiles allow declaring DataReaders from an XML file. These profiles are defined within the <data_reader> or <subscriber> XML tags. Thus, the following XML codes are equivalent.

DataReader profile - Definition method 1

DataReader profile - Definition method 2

<data_reader profile_name="my_datareader_profile">
    <topic>
        <!-- TOPIC_TYPE -->
    </topic>
    <qos>
        <!-- QOS -->
    </qos>
    <!-- Other elements -->
</data_reader>
<subscriber profile_name="my_subscriber_profile">
    <topic>
        <!-- TOPIC_TYPE -->
    </topic>
    <qos>
        <!-- QOS -->
    </qos>
    <!-- Other elements -->
</subscriber>

Important

The <data_reader> and <subscriber> XML tags are equivalent. Therefore, XML profiles in which the DataReaders are defined with the <subscriber> tag are fully compatible with Fast DDS.

11.4.1. DataReader XML attributes

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

Name

Description

Use

profile_name

Sets the name under which the <data_reader> 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_reader> profile as the default profile. Thus, if a default profile
exists, it will be used when no other DataReader profile is specified at the
DataReader’s creation.

Optional

11.4.2. DataReader configuration

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

Name

Description

Values

Default

<topic>

TopicType configuration of the DataReader.

TopicType

<qos>

Subscriber QoS configuration.

QoS

<times>

It allows configuring some time related
parameters of the DataReader.

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.

bool

false

<historyMemoryPolicy>

Memory allocation kind for DataReaders’s
history.

MemoryManagementPolicy

PREALLOCATED

<propertiesPolicy>

Additional configuration properties.

PropertiesPolicyType

<userDefinedID>

Used for StaticEndpointDiscovery.

int16_t

-1

<entityID>

Set the entity_id of the RTPSEndpointQos
class.

int16_t

-1

<matchedPublishersAllocation>

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

Allocation Configuration

Example

<?xml version="1.0" encoding="UTF-8" ?>
<dds>
    <profiles xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles" >
        <data_reader profile_name="sub_profile_name">
            <topic>
                <!-- TOPIC_TYPE -->
            </topic>

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

            <times> <!-- readerTimesType -->
                <initialAcknackDelay>
                    <sec>0</sec>
                    <nanosec>70</nanosec>
                </initialAcknackDelay>

                <heartbeatResponseDelay>
                    <sec>0</sec>
                    <nanosec>5</nanosec>
                </heartbeatResponseDelay>
            </times>

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

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

            <expectsInlineQos>true</expectsInlineQos>

            <historyMemoryPolicy>DYNAMIC</historyMemoryPolicy>

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

            <userDefinedID>55</userDefinedID>

            <entityID>66</entityID>

            <matchedPublishersAllocation>
                <initial>0</initial>
                <maximum>0</maximum>
                <increment>1</increment>
            </matchedPublishersAllocation>
        </data_reader>
    </profiles>
<dds>

Note

11.4.2.1. Times

Name

Description

Values

Default

<initialAcknackDelay>

Initial ACKNACK delay.

DurationType

70 ms

<heartbeatResponseDelay>

Response time delay when receiving a Heartbeat.

DurationType

5 ms