11.8. Common

The preceding XML profiles define some XML elements that are common to several profiles. This section aims to explain these common elements.

11.8.1. LocatorListType

It represents a list of Locator_t. LocatorListType is used inside other configuration parameter labels that expect a list of locators, for example, in <defaultUnicastLocatorList>. Therefore, LocatorListType is defined as a set of <locator> elements. The <locator> element has a single child element that defines the transport protocol for which the locator is defined. These are: <udpv4>, <tcpv4>, <udpv6>, and <tcpv6>. The table presented below outlines each possible Locator’s field.

Note

SHM transport locators cannot be configured as they are automatically handled by SHM.

Name

Description

Values

Default

<port>

RTPS port number of the locator.
Physical port in UDP, logical port in TCP.

uint32_t

0

<physical_port>

TCP’s physical port.

uint32_t

0

<address>

IP address of the locator.

string (IPv4/IPv6 format)

“”

<unique_lan_id>

The LAN ID uniquely identifies the LAN the
locator belongs to (TCPv4 only).

string (16 bytes)

<wan_address>

WAN IPv4 address (TCPv4 only).

string (IPv4 format)

0.0.0.0

Example

The following example shows the implementation of one locator of each transport protocol in <defaultUnicastLocatorList>.

<defaultUnicastLocatorList>
    <locator>
        <udpv4>
            <!-- Access as physical, typical UDP usage -->
            <port>7400</port>
            <address>192.168.1.41</address>
        </udpv4>
        <udpv4>
            <!-- Access as physical, typical UDP usage -->
            <port>7600</port>
            <address>localhost</address>
        </udpv4>
    </locator>
    <locator>
        <tcpv4>
            <!-- Both physical and logical (port), useful in TCP transports -->
            <physical_port>5100</physical_port>
            <port>7400</port>
            <unique_lan_id>192.168.1.1.1.1.2.55</unique_lan_id>
            <wan_address>80.80.99.45</wan_address>
            <address>192.168.1.55</address>
        </tcpv4>
    </locator>
    <locator>
        <udpv6>
            <port>8844</port>
            <address>::1</address>
        </udpv6>
        <udpv6>
            <port>8888</port>
            <address>localhost</address>
        </udpv6>
    </locator>
    <locator>
        <tcpv6>
            <!-- Both physical and logical (port), useful in TCP transports -->
            <physical_port>5100</physical_port>
            <port>7400</port>
            <address>fe80::55e3:290:165:5af8</address>
        </tcpv6>
    </locator>
</defaultUnicastLocatorList>

11.8.2. PropertiesPolicyType

PropertiesPolicyType defines the <propertiesPolicy> element. It allows the user to define a set of generic properties inside a <properties> element. It is useful at defining extended or custom configuration parameters.

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.

bool

false

Example

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

11.8.3. DurationType

DurationType expresses a period of time and it is commonly used inside other XML elements, such as in <leaseAnnouncement> or <leaseDuration>. A DurationType is defined by two mandatory elements <sec> plus <nanosec>. An infinite value can be specified by using the values DURATION_INFINITY, DURATION_INFINITE_SEC and DURATION_INFINITE_NSEC.

Name

Description

Values

Default

<sec>

Number of seconds.

int32_t

0

<nanosec>

Number of nanoseconds.

uint32_t

0

Example

<discovery_config>
    <leaseDuration>
        <sec>DURATION_INFINITY</sec>
    </leaseDuration>

    <leaseDuration>
        <sec>500</sec>
        <nanosec>0</nanosec>
    </leaseDuration>

    <leaseAnnouncement>
        <sec>1</sec>
        <nanosec>856000</nanosec>
    </leaseAnnouncement>
</discovery_config>

11.8.4. TopicType

The Topic name and data type are used to determine whether Datawriters and DataReaders can exchange messages. Please refer to Topic section for a a deeper explanation on the Topic class.

Name

Description

Values

Default

<kind>

It defines the Topic’s key kind. See
Definition of data types.

<name>

It defines the Topic’s name. It must
be unique.

string_255

<dataType>

It references the Topic’s data type.

string_255

<historyQos>

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

HistoryQoS

<resourceLimitsQos>

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

ResourceLimitsQos

Warning

The <kind> child element is only used if the Topic is defined using the Fast DDS RTPS-layer API, and will be ignored if the Topic is defined via the Fast DDS DDS-layer API.

Example

<topic>
    <kind>NO_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>

11.8.4.1. HistoryQoS

It controls the behavior of Fast DDS when the value of an instance changes before it is finally communicated to some of its existing DataReaders. Please refer to HistoryQosPolicyKind for further information on HistoryQoS.

Name

Description

Values

Default

<kind>

Fast DDS will only attempt to keep the latest values of the instance
and discard the older ones.

KEEP_LAST

KEEP_LAST

Fast DDS will attempt to maintain and deliver all the values of the instance
to existing DataReaders.

KEEP_ALL

<depth>

It must be consistent with the ResourceLimitsQos <max_samples_per_instance>
element value. It must be verified that:
<depth> <= <max_samples_per_instance>.

uint32_t

1

11.8.4.2. ResourceLimitsQos

It controls the resources that Fast DDS can use in order to meet the requirements imposed by the application and other QoS settings. Please refer to ResourceLimitsQosPolicy for further information on ResourceLimitsQos.

Name

Description

Values

Default

<max_samples>

It must verify that: <max_samples> >= <max_samples_per_instance>.

uint32_t

5000

<max_instances>

It defines the maximum number of instances.

uint32_t

10

<max_samples_per_instance>

It must verify that: HistoryQos <depth> <= <max_samples_per_instance>.

uint32_t

400

<allocated_samples>

It controls the maximum number of samples to be stored.

uint32_t

100

<extra_samples>

The number of extra samples to allocate on the pool.

uint32_t

1

11.8.5. QoS

The Quality of Service (QoS) is used to specify the behavior of the Service, allowing the user to define how each Entity will behave. Please refer to the Policy section for more information on QoS.

Name

Description

Values

<durability>

See DurabilityQosPolicy.

Durability

<liveliness>

See LivelinessQosPolicy.

Liveliness

<reliability>

See ReliabilityQosPolicy.

ReliabilityQosPolicy

<partition>

See PartitionQosPolicy.

Partition

<deadline>

See DeadlineQosPolicy.

Deadline

<lifespan>

See LifespanQosPolicy.

Lifespan

<disablePositiveAcks>

See DisablePositiveACKsQosPolicy.

DisablePositiveAcks

<latencyBudget>

See LatencyBudgetQosPolicy.

LatencyBudget

<disable_heartbeat_piggyback>

See DisableHeartbeatPiggyback.

DisableHeartbeatPiggyback

Example

<qos> <!-- writerQosPoliciesType -->
    <durability>
        <kind>VOLATILE</kind>
    </durability>

    <liveliness>
        <kind>AUTOMATIC</kind>

        <lease_duration>
            <sec>1</sec>
        </lease_duration>

        <announcement_period>
            <sec>1</sec>
        </announcement_period>
    </liveliness>

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

    <partition>
        <names>
            <name>part1</name>
            <name>part2</name>
        </names>
    </partition>

    <deadline>
        <period>
            <sec>1</sec>
        </period>
    </deadline>

    <lifespan>
        <duration>
            <sec>1</sec>
        </duration>
    </lifespan>

    <disablePositiveAcks>
        <enabled>true</enabled>
    </disablePositiveAcks>

    <latencyBudget>
        <duration>
            <sec>1</sec>
        </duration>
    </latencyBudget>

    <disable_heartbeat_piggyback>true</disable_heartbeat_piggyback>
</qos>

11.8.5.1. Durability

Name

Description

Values

Default

<kind>

See DurabilityQosPolicyKind.

VOLATILE

VOLATILE

TRANSIENT_LOCAL

TRANSIENT

PERSISTENT

11.8.5.2. Liveliness

Name

Description

Values

Default

<kind>

See LivelinessQosPolicyKind.

AUTOMATIC

AUTOMATIC

MANUAL_BY_PARTICIPANT

MANUAL_BY_TOPIC

<lease_duration>

See LivelinessQosPolicy.

DurationType

c_TimeInfinite

<announcement_period>

See LivelinessQosPolicy.

c_TimeInfinite

11.8.5.3. ReliabilityQosPolicy

Name

Description

Values

Default

<kind>

See ReliabilityQosPolicyKind.

BEST_EFFORT

DataReaders: BEST_EFFORT
DataWriters: RELIABLE

RELIABLE

<max_blocking_time>

See ReliabilityQosPolicy.

DurationType

100 ms

11.8.5.4. Partition

Name

Description

Values

<names>

It comprises a set of <name> elements containing the name of each partition.
See PartitionQosPolicy.

<name>

11.8.5.5. Deadline

Name

Description

Values

Default

<period>

See DeadlineQosPolicy.

DurationType

c_TimeInfinite

11.8.5.6. Lifespan

Name

Description

Values

Default

<duration>

See LifespanQosPolicy.

DurationType

c_TimeInfinite

11.8.5.7. DisablePositiveAcks

Name

Description

Values

Default

<enabled>

See DisablePositiveACKsQosPolicy.

bool

false

<duration>

See DisablePositiveACKsQosPolicy.

DurationType

c_TimeInfinite

11.8.5.8. LatencyBudget

Name

Description

Values

Default

<duration>

See LatencyBudgetQosPolicy.

DurationType

0

11.8.5.9. DisableHeartbeatPiggyback

Name

Description

Values

Default

See DisableHeartbeatPiggyback.

bool

false

11.8.6. Throughput Configuration

The <throughputController> element allows to limit the output bandwidth. It contains two child elements which are explained in the following table.

Name

Description

Values

Default

<bytesPerPeriod>

Packet size in bytes that the throughput controller will allow to send
in a given period.

uint32_t

4294967295 bytes

<periodMillisecs>

Window of time in which no more than <bytesPerPeriod> bytes
are allowed.

uint32_t

0

Warning

This tag has been deprecated but does not have an equivalent tag yet. It will create a FIFO flow controller with the bandwidth limitation specified on this tag. See FlowControllersQos for more information.

Example

<participant profile_name="participant_thoughput">
    <rtps>
        <throughputController>
            <bytesPerPeriod>8192</bytesPerPeriod>
            <periodMillisecs>1000</periodMillisecs>
        </throughputController>
    </rtps>
</participant>

11.8.7. HistoryMemoryPolicy

Indicates the way the memory is managed in terms of dealing with the CacheChanges of the RTPSEndpointQos.

Name

Description

Values

Default

<historyMemoryPolicy>

Four different options as described
in MemoryManagementPolicy.

PREALLOCATED

PREALLOCATED

PREALLOCATED_WITH_REALLOC

DYNAMIC

DYNAMIC_REUSABLE

Example

<data_writer profile_name="data_writer_historyMemoryPolicy">
    <!-- ...  -->
    <historyMemoryPolicy>DYNAMIC</historyMemoryPolicy>
</data_writer>

<data_reader profile_name="data_reader_historyMemoryPolicy">
    <!-- ...  -->
    <historyMemoryPolicy>DYNAMIC</historyMemoryPolicy>
</data_reader>

11.8.8. Allocation Configuration

The <allocation> element allows to control the allocation behavior of internal collections for which the number of elements depends on the number of entities in the system. For instance, there are collections inside a DataWriter which depend on the number of DataReaders matching with it. Please refer to ParticipantResourceLimitsQos for a detailed documentation on DomainParticipant allocation, and to Tuning allocations for detailed information on how to tune allocation related parameters.

Name

Description

Values

Default

<initial>

Number of elements for which space is initially allocated.

uint32_t

0

<maximum>

Maximum number of elements for which space will be allocated.

uint32_t

0 (Means no limit)

<increment>

Number of new elements that will be allocated when more space is
necessary.

uint32_t

1