RTI Connext Traditional C++ API Version 7.3.0
DDS_ReliabilityQosPolicy Struct Reference

Indicates the level of reliability offered/requested by RTI Connext. More...

Public Attributes

DDS_ReliabilityQosPolicyKind kind
 Kind of reliability. More...
 
struct DDS_Duration_t max_blocking_time
 The maximum time a DataWriter can block on a write() call. More...
 
DDS_ReliabilityQosPolicyAcknowledgmentModeKind acknowledgment_kind
 <<extension>> Kind of reliable acknowledgment More...
 
DDS_InstanceStateConsistencyKind instance_state_consistency_kind
 <<extension>> Whether instance state consistency is enabled More...
 

Detailed Description

Indicates the level of reliability offered/requested by RTI Connext.

Entity:
DDSTopic, DDSDataReader, DDSDataWriter
Status:
DDS_OFFERED_INCOMPATIBLE_QOS_STATUS, DDS_REQUESTED_INCOMPATIBLE_QOS_STATUS
Properties:
RxO = YES
Changeable = UNTIL ENABLE (the instance_state_consistency_kind is Changeable = NO)

Usage

This policy indicates the level of reliability requested by a DDSDataReader or offered by a DDSDataWriter.

The reliability of a connection between a DataWriter and DataReader is entirely user configurable. It can be done on a per DataWriter/DataReader connection. A connection may be configured to be "best effort" which means that RTI Connext will not use any resources to monitor or guarantee that the data sent by a DataWriter is received by a DataReader.

For some use cases, such as the periodic update of sensor values to a GUI displaying the value to a person, DDS_BEST_EFFORT_RELIABILITY_QOS delivery is often good enough. It is certainly the fastest, most efficient, and least resource-intensive (CPU and network bandwidth) method of getting the newest/latest value for a topic from DataWriters to DataReaders. But there is no guarantee that the data sent will be received. It may be lost due to a variety of factors, including data loss by the physical transport such as wireless RF or even Ethernet.

However, there are data streams (topics) in which you want an absolute guarantee that all data sent by a DataWriter is received reliably by DataReaders. This means that RTI Connext must check whether or not data was received, and repair any data that was rejected by resending a copy of the data as many times as it takes for the DataReader to receive the data. RTI Connext uses a reliability protocol configured and tuned by these QoS policies: DDS_HistoryQosPolicy, DDS_DataWriterProtocolQosPolicy, DDS_DataReaderProtocolQosPolicy, and DDS_ResourceLimitsQosPolicy.

The Reliability QoS policy is simply a switch to turn on the reliability protocol for a DataWriter/DataReader connection. The level of reliability provided by RTI Connext is determined by the configuration of the aforementioned QoS policies.

You can configure RTI Connext to deliver all data in the order they were sent (also known as absolute or strict reliability). Or, as a tradeoff for less memory, CPU, and network usage, you can choose a reduced level of reliability where only the last N values are guaranteed to be delivered reliably to DataReaders (where N is user-configurable). In the reduced level of reliability, there are no guarantees that the data sent before the last N are received. Only the last N data packets are monitored and repaired if necessary.

These levels are ordered, DDS_BEST_EFFORT_RELIABILITY_QOS < DDS_RELIABLE_RELIABILITY_QOS. A DDSDataWriter offering one level is implicitly offering all levels below.

Note: To send large data reliably, you will also need to set DDS_ASYNCHRONOUS_PUBLISH_MODE_QOS. Large in this context means that the data cannot be sent as a single packet by the transport (for example, data larger than 63K when using UDP/IP).

The setting of this policy has a dependency on the setting of the RESOURCE_LIMITS policy. In case the reliability kind is set to DDS_RELIABLE_RELIABILITY_QOS the write operation on the DDSDataWriter may block if the modification would cause data to be lost or else cause one of the limits in specified in the RESOURCE_LIMITS to be exceeded. Under these circumstances, the RELIABILITY max_blocking_time configures the maximum duration the write operation may block.

If the DDS_ReliabilityQosPolicy::kind is set to DDS_RELIABLE_RELIABILITY_QOS, data samples originating from a single DDSDataWriter cannot be made available to the DDSDataReader if there are previous data samples that have not been received yet due to a communication error. In other words, RTI Connext will repair the error and resend data samples as needed in order to reconstruct a correct snapshot of the DDSDataWriter history before it is accessible by the DDSDataReader.

If the DDS_ReliabilityQosPolicy::kind is set to DDS_BEST_EFFORT_RELIABILITY_QOS, the service will not re-transmit missing data samples. However, for data samples originating from any one DataWriter the service will ensure they are stored in the DDSDataReader history in the same order they originated in the DDSDataWriter. In other words, the DDSDataReader may miss some data samples, but it will never see the value of a data object change from a newer value to an older value.

See also
DDS_HistoryQosPolicy
DDS_ResourceLimitsQosPolicy

Compatibility

The value offered is considered compatible with the value requested if and only if:

Member Data Documentation

◆ kind

DDS_ReliabilityQosPolicyKind DDS_ReliabilityQosPolicy::kind

◆ max_blocking_time

struct DDS_Duration_t DDS_ReliabilityQosPolicy::max_blocking_time

The maximum time a DataWriter can block on a write() call.

See Writing Data, in the Core Libraries User's Manual, for more information about when the write() call can block and what happens when it times out.

Has no meaning for DataReaders.

[default] 100 milliseconds

[range] [0,1 year] or DDS_DURATION_INFINITE

See also
DDS_ResourceLimitsQosPolicy

◆ acknowledgment_kind

DDS_ReliabilityQosPolicyAcknowledgmentModeKind DDS_ReliabilityQosPolicy::acknowledgment_kind

<<extension>> Kind of reliable acknowledgment

This setting applies only to the case where DDS_ReliabilityQosPolicy::kind = DDS_RELIABLE_RELIABILITY_QOS.

Sets the kind acknowledgments supported by a DDSDataWriter and sent by DDSDataReader.

[default] DDS_PROTOCOL_ACKNOWLEDGMENT_MODE

◆ instance_state_consistency_kind

DDS_InstanceStateConsistencyKind DDS_ReliabilityQosPolicy::instance_state_consistency_kind

<<extension>> Whether instance state consistency is enabled

A DataReader that determines that the DataWriter is no longer alive will transition instances to NOT_ALIVE_NO_WRITERS if there are no other DataWriters updating that instance. If the DataReader rediscovers the DataWriter, the DataReader does not automatically transition instances back to the state they were in prior to the disconnection until it gets updates (i.e., samples) for them.

If InstanceStateConsistencyKind is set to RECOVER_INSTANCE_STATE_CONSISTENCY, then when the DataReader rediscovers a DataWriter, the DataReader will query the DataWriter for the state of its instances, and restore the instances to their correct state.

[default] DDS_NO_RECOVER_INSTANCE_STATE_CONSISTENCY for DDSDataReader, DDS_RECOVER_INSTANCE_STATE_CONSISTENCY for DDSDataWriter