Quality of Service

Quality of Service is the collection of restrictions and expectations (called QoSPolicies) that appy to the different components of CycloneDDS. Some QoSPolicies only affect a single type of DDS entity, whereas others affect multiple DDS entities.


QoSPolicies on a DDS entity can not be modified after creating the entity as they affect matching/discovery of entities.

The QoS used is linked to the type of DDS entity the QoS is used for. For example, a SubscriberQoS is not accepted when creating a DataReader.

  • The entity-specific QoSes are found in the qos sub-namespace of the same namespace the entity is defined in.

  • The different QoSPolicies are located in the dds::core::policy namespace.

C code sample TBD

Setting of QoSPolicies can be done by:

Either left-shifting the QoSPolicy “into” the QoS:

C code sample TBD

Or passing it as the parameter of the policy function:

C code sample TBD

Getting of QoSPolicies can be done by:

Either through the right-shifting the QoSPolicy “out of” the QoS:

C code sample TBD

Or through the policy function, which is templated to indicate which QoSPolicy is being accessed:

C code sample TBD

For a detailed explanation of the different QoSPolicies and their effects on the behaviour of CycloneDDS, refer to the OMG DDS specification v1.4 section 2.2.3.

Default and Inherited QoSes

QoSes have a number of default settings that are falled-back to when none are provided on creation. These defaults are either defined in the DDS standard, or propagated from “superior” entities. The default inherited QoS for entities is set through the following functions:

C code sample TBD

For example, in the following case:

C code sample TBD