10.6. Topic profiles

The topic profiles allow for configuring Topic from an XML file. These profiles are defined within the <topic> XML tags.

10.6.1. Topic XML attributes

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

Name

Description

Use

profile_name

Sets the name under which the <topic> profile is registered in the DDS Domain,
so that it can be loaded later by the DataWriter or the DataReader

Mandatory

is_default_profile

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

Optional

10.6.2. Topic configuration

This XML element allows the configuration of the TopicQos.

Name

Description

Values

<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

Example

<topic profile_name="topic_example">
    <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>
        <extra_samples>10</extra_samples>
    </resourceLimitsQos>
</topic>