Skip to main content

FastDDS QoS Mapping

Detailed QoS policy mapping between HDDS and FastDDS (eProsima Fast DDS).

Reliability

HDDS

// Best Effort
let qos = DataWriterQos::default()
.reliability(Reliability::BestEffort);

// Reliable
let qos = DataWriterQos::default()
.reliability(Reliability::Reliable {
max_blocking_time: Duration::from_millis(100),
});

FastDDS (C++ API)

// Best Effort
DataWriterQos wqos;
wqos.reliability().kind = BEST_EFFORT_RELIABILITY_QOS;

// Reliable
DataWriterQos wqos;
wqos.reliability().kind = RELIABLE_RELIABILITY_QOS;
wqos.reliability().max_blocking_time = {0, 100000000}; // 100ms

FastDDS (XML)

<reliability>
<kind>RELIABLE_RELIABILITY_QOS</kind>
<max_blocking_time>
<sec>0</sec>
<nanosec>100000000</nanosec>
</max_blocking_time>
</reliability>

Durability

HDDS

DataWriterQos::default()
.durability(Durability::TransientLocal)

FastDDS (C++ API)

DataWriterQos wqos;
wqos.durability().kind = TRANSIENT_LOCAL_DURABILITY_QOS;

FastDDS (XML)

<durability>
<kind>TRANSIENT_LOCAL_DURABILITY_QOS</kind>
</durability>

Mapping Table

HDDSFastDDS C++FastDDS XML
VolatileVOLATILE_DURABILITY_QOSVOLATILE_DURABILITY_QOS
TransientLocalTRANSIENT_LOCAL_DURABILITY_QOSTRANSIENT_LOCAL_DURABILITY_QOS
TransientTRANSIENT_DURABILITY_QOSTRANSIENT_DURABILITY_QOS
PersistentPERSISTENT_DURABILITY_QOSPERSISTENT_DURABILITY_QOS

History

HDDS

// Keep Last
DataWriterQos::default()
.history(History::KeepLast { depth: 10 })

// Keep All
DataWriterQos::default()
.history(History::KeepAll)

FastDDS (C++ API)

// Keep Last
DataWriterQos wqos;
wqos.history().kind = KEEP_LAST_HISTORY_QOS;
wqos.history().depth = 10;

// Keep All
DataWriterQos wqos;
wqos.history().kind = KEEP_ALL_HISTORY_QOS;

FastDDS (XML)

<history>
<kind>KEEP_LAST_HISTORY_QOS</kind>
<depth>10</depth>
</history>

Deadline

HDDS

DataWriterQos::default()
.deadline(Duration::from_millis(100))

FastDDS (C++ API)

DataWriterQos wqos;
wqos.deadline().period = {0, 100000000}; // 100ms

FastDDS (XML)

<deadline>
<period>
<sec>0</sec>
<nanosec>100000000</nanosec>
</period>
</deadline>

Liveliness

HDDS

DataWriterQos::default()
.liveliness(Liveliness::ManualByTopic {
lease_duration: Duration::from_secs(1),
})

FastDDS (C++ API)

DataWriterQos wqos;
wqos.liveliness().kind = MANUAL_BY_TOPIC_LIVELINESS_QOS;
wqos.liveliness().lease_duration = {1, 0}; // 1 second

FastDDS (XML)

<liveliness>
<kind>MANUAL_BY_TOPIC_LIVELINESS_QOS</kind>
<lease_duration>
<sec>1</sec>
<nanosec>0</nanosec>
</lease_duration>
</liveliness>

Mapping Table

HDDSFastDDS C++FastDDS XML
AutomaticAUTOMATIC_LIVELINESS_QOSAUTOMATIC_LIVELINESS_QOS
ManualByParticipantMANUAL_BY_PARTICIPANT_LIVELINESS_QOSMANUAL_BY_PARTICIPANT_LIVELINESS_QOS
ManualByTopicMANUAL_BY_TOPIC_LIVELINESS_QOSMANUAL_BY_TOPIC_LIVELINESS_QOS

Ownership

HDDS

DataWriterQos::default()
.ownership(Ownership::Exclusive)
.ownership_strength(100)

FastDDS (C++ API)

DataWriterQos wqos;
wqos.ownership().kind = EXCLUSIVE_OWNERSHIP_QOS;
wqos.ownership_strength().value = 100;

FastDDS (XML)

<ownership>
<kind>EXCLUSIVE_OWNERSHIP_QOS</kind>
</ownership>
<ownershipStrength>
<value>100</value>
</ownershipStrength>

Resource Limits

HDDS

DataReaderQos::default()
.resource_limits(ResourceLimits {
max_samples: 1000,
max_instances: 100,
max_samples_per_instance: 10,
})

FastDDS (C++ API)

DataReaderQos rqos;
rqos.resource_limits().max_samples = 1000;
rqos.resource_limits().max_instances = 100;
rqos.resource_limits().max_samples_per_instance = 10;

FastDDS (XML)

<resource_limits>
<max_samples>1000</max_samples>
<max_instances>100</max_instances>
<max_samples_per_instance>10</max_samples_per_instance>
</resource_limits>

Partition

HDDS

PublisherQos::default()
.partition(Partition::new(vec!["sensors", "telemetry"]))

FastDDS (C++ API)

PublisherQos pqos;
pqos.partition().push_back("sensors");
pqos.partition().push_back("telemetry");

FastDDS (XML)

<partition>
<names>
<name>sensors</name>
<name>telemetry</name>
</names>
</partition>

Time-Based Filter

HDDS

DataReaderQos::default()
.time_based_filter(Duration::from_millis(100))

FastDDS (C++ API)

DataReaderQos rqos;
rqos.time_based_filter().minimum_separation = {0, 100000000};

FastDDS (XML)

<timeBasedFilter>
<minimum_separation>
<sec>0</sec>
<nanosec>100000000</nanosec>
</minimum_separation>
</timeBasedFilter>

Data Sharing (FastDDS Extension)

FastDDS supports data sharing for zero-copy communication. HDDS has its own shared memory transport.

FastDDS (C++ API)

DataWriterQos wqos;
wqos.data_sharing().automatic(); // or .on(), .off()

FastDDS (XML)

<data_sharing>
<kind>AUTOMATIC</kind>
</data_sharing>

HDDS Equivalent

let config = DomainParticipantConfig::default()
.transport(TransportConfig::default()
.enable_shared_memory(true)
.prefer_shared_memory(true));

Note: FastDDS data sharing and HDDS shared memory are not directly compatible. Use UDP transport for cross-vendor communication.

Complete QoS Example

HDDS Writer QoS

let writer_qos = DataWriterQos::default()
.reliability(Reliability::Reliable {
max_blocking_time: Duration::from_millis(100),
})
.durability(Durability::TransientLocal)
.history(History::KeepLast { depth: 10 })
.deadline(Duration::from_millis(200))
.liveliness(Liveliness::Automatic {
lease_duration: Duration::from_secs(5),
});

FastDDS Writer QoS (C++)

DataWriterQos wqos;

// Reliability
wqos.reliability().kind = RELIABLE_RELIABILITY_QOS;
wqos.reliability().max_blocking_time = {0, 100000000};

// Durability
wqos.durability().kind = TRANSIENT_LOCAL_DURABILITY_QOS;

// History
wqos.history().kind = KEEP_LAST_HISTORY_QOS;
wqos.history().depth = 10;

// Deadline
wqos.deadline().period = {0, 200000000};

// Liveliness
wqos.liveliness().kind = AUTOMATIC_LIVELINESS_QOS;
wqos.liveliness().lease_duration = {5, 0};

DataWriter* writer = publisher->create_datawriter(topic, wqos);

FastDDS Writer QoS (XML Profile)

<?xml version="1.0" encoding="UTF-8"?>
<profiles xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles">
<data_writer profile_name="SensorWriter">
<qos>
<reliability>
<kind>RELIABLE_RELIABILITY_QOS</kind>
<max_blocking_time>
<sec>0</sec>
<nanosec>100000000</nanosec>
</max_blocking_time>
</reliability>
<durability>
<kind>TRANSIENT_LOCAL_DURABILITY_QOS</kind>
</durability>
<history>
<kind>KEEP_LAST_HISTORY_QOS</kind>
<depth>10</depth>
</history>
<deadline>
<period>
<sec>0</sec>
<nanosec>200000000</nanosec>
</period>
</deadline>
<liveliness>
<kind>AUTOMATIC_LIVELINESS_QOS</kind>
<lease_duration>
<sec>5</sec>
<nanosec>0</nanosec>
</lease_duration>
</liveliness>
</qos>
</data_writer>
</profiles>

Duration Format

FastDDS uses a two-part structure for durations:

HDDSFastDDS
Duration::from_secs(5){5, 0} (sec, nanosec)
Duration::from_millis(100){0, 100000000}
Duration::from_micros(500){0, 500000}
Duration::MAX{0x7FFFFFFF, 0xFFFFFFFF} (INFINITE)

Compatibility Notes

  1. XTypes: FastDDS supports XTypes; use @appendable for type evolution compatibility
  2. Transport: Disable FastDDS data sharing for cross-vendor interop
  3. Discovery: Both use standard SPDP/SEDP; ports must align

Next Steps