11.3. DataWriter profiles¶
The DataWriter profiles allow for configuring DataWriters from an XML file.
These profiles are defined within the <data_writer>
or <publisher>
XML tags.
Thus, the following XML code snippets are equivalent.
DataWriter profile - Definition method 1 |
DataWriter profile - Definition method 2 |
<data_writer profile_name="my_datawriter_profile">
<topic>
<!-- TOPIC_TYPE -->
</topic>
<qos>
<!-- QOS -->
</qos>
<!-- Other elements -->
</data_writer>
|
<publisher profile_name="my_publisher_profile">
<topic>
<!-- TOPIC_TYPE -->
</topic>
<qos>
<!-- QOS -->
</qos>
<!-- Other elements -->
</publisher>
|
Important
The <data_writer>
and <publisher>
XML tags are equivalent.
Therefore, XML profiles in which the DataWriters are defined with the <publisher>
tag are fully compatible with Fast DDS.
11.3.1. DataWriter XML attributes¶
The <data_writer>
element has two attributes defined: profile_name
and is_default_profile
.
Name |
Description |
Use |
---|---|---|
|
Sets the name under which the |
Mandatory |
|
Sets the |
Optional |
11.3.2. DataWriter configuration¶
The DataWriter configuration is performed through the XML elements listed in the following table.
Name |
Description |
Values |
Default |
---|---|---|---|
|
TopicType configuration of the DataWriter. |
||
|
DataWriter QoS configuration. |
||
|
It configures some time related parameters |
||
|
List of input unicast locators. |
|
|
|
List of input multicast locators. |
|
|
|
Limits the output bandwidth of the |
||
|
Memory allocation kind for DataWriter’s |
||
|
Additional configuration properties. |
||
|
Used for |
|
-1 |
|
Sets the |
|
-1 |
|
Sets the limits of the collection of matched |
Example
<?xml version="1.0" encoding="UTF-8" ?>
<dds>
<profiles xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles" >
<data_writer profile_name="datawriter_profile_name">
<topic>
<!-- TOPIC_TYPE -->
</topic>
<qos>
<!-- QOS -->
</qos>
<times> <!-- writerTimesType -->
<initialHeartbeatDelay>
<sec>0</sec>
<nanosec>12</nanosec>
</initialHeartbeatDelay>
<heartbeatPeriod>
<sec>3</sec>
<nanosec>0</nanosec>
</heartbeatPeriod>
<nackResponseDelay>
<sec>0</sec>
<nanosec>5</nanosec>
</nackResponseDelay>
<nackSupressionDuration>
<sec>0</sec>
<nanosec>0</nanosec>
</nackSupressionDuration>
</times>
<unicastLocatorList>
<!-- LOCATOR_LIST -->
<locator>
<udpv4/>
</locator>
</unicastLocatorList>
<multicastLocatorList>
<!-- LOCATOR_LIST -->
<locator>
<udpv4/>
</locator>
</multicastLocatorList>
<throughputController>
<bytesPerPeriod>8192</bytesPerPeriod>
<periodMillisecs>1000</periodMillisecs>
</throughputController>
<historyMemoryPolicy>DYNAMIC</historyMemoryPolicy>
<propertiesPolicy>
<!-- PROPERTIES_POLICY -->
</propertiesPolicy>
<userDefinedID>55</userDefinedID>
<entityID>66</entityID>
<matchedSubscribersAllocation>
<initial>0</initial>
<maximum>0</maximum>
<increment>1</increment>
</matchedSubscribersAllocation>
</data_writer>
<!-->
Note
LOCATOR_LIST
means a LocatorListType is expected.PROPERTIES_POLICY
means that the label is a PropertiesPolicyType block.For
QOS
details, please refer to QoS.TOPIC_TYPE
is detailed in section TopicType.
11.3.2.1. Times¶
Name |
Description |
Values |
Default |
---|---|---|---|
|
Initial heartbeat delay. |
12 ms |
|
|
Periodic heartbeat period. |
3 s |
|
|
Delay to apply to the response of an ACKNACK message. |
5 ms |
|
|
This time allows the DataWriter to ignore NACK |
0 ms |