Function dds_set_qos

Function Documentation

dds_return_t dds_set_qos(dds_entity_t entity, const dds_qos_t *qos)

Set entity QoS policies.

This operation replaces the existing set of Qos Policy settings for an entity. The parameter qos must contain the struct with the QosPolicy settings which is checked for self-consistency.

The set of QosPolicy settings specified by the qos parameter are applied on top of the existing QoS, replacing the values of any policies previously set (provided, the operation returned DDS_RETCODE_OK).

Not all policies are changeable when the entity is enabled.

Note

Currently only Latency Budget and Ownership Strength are changeable QoS that can be set.

Parameters
  • entity[in] Entity from which to get qos.

  • qos[in] Pointer to the qos structure that provides the policies.

Return values
  • DDS_RETCODE_OK – The new QoS policies are set.

  • DDS_RETCODE_ERROR – An internal error has occurred.

  • DDS_RETCODE_BAD_PARAMETER – The qos parameter is NULL.

  • DDS_RETCODE_ILLEGAL_OPERATION – The operation is invoked on an inappropriate object.

  • DDS_RETCODE_ALREADY_DELETED – The entity has already been deleted.

  • DDS_RETCODE_IMMUTABLE_POLICY – The entity is enabled and one or more of the policies of the QoS are immutable.

  • DDS_RETCODE_INCONSISTENT_POLICY – A few policies within the QoS are not consistent with each other.

Returns

A dds_return_t indicating success or failure.