10.5. DataReader profiles

The DataReader profiles allow declaring DataReaders from an XML file. These profiles are defined within the <data_reader> XML tags.

10.5.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

10.5.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.

ReaderTimes

<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

<external_unicast_locators>

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

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 DataReader.

bool

false

<expects_inline_qos>

It indicates if QoS is expected inline.

bool

false

<historyMemoryPolicy>

Memory allocation kind for DataReaders’s history.

HistoryMemoryPolicy

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 xmlns="http://www.eprosima.com">
    <profiles>
        <data_reader profile_name="data_reader_profile_name">
            <topic>
                <historyQos>
                    <kind>KEEP_LAST</kind>
                </historyQos>
            </topic>

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

            <times> <!-- readerTimesType -->
                <initial_acknack_delay>
                    <nanosec>70</nanosec>
                </initial_acknack_delay>

                <heartbeat_response_delay>
                    <nanosec>5</nanosec>
                </heartbeat_response_delay>
            </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>

            <expects_inline_qos>true</expects_inline_qos>

            <historyMemoryPolicy>DYNAMIC</historyMemoryPolicy>

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

            <userDefinedID>55</userDefinedID>

            <entityID>66</entityID>

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

Note

10.5.2.1. ReaderTimes

These parameters are included within RTPSReliableReaderQos in the ReaderTimes structure.

Name

Description

Values

Default

<initial_acknack_delay>

Initial ACKNACK delay.

DurationType

70 ms

<heartbeat_response_delay>

Response time delay when receiving a Heartbeat.

DurationType

5 ms