RTI Connext C API  Version 6.0.0
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
DDS_RtpsReliableWriterProtocol_t Struct Reference

QoS related to the reliable writer protocol defined in RTPS. More...

Data Fields

DDS_Long low_watermark
 When the number of unacknowledged samples in the current send window of a reliable writer meets or falls below this threshold, the DDS_RELIABLE_WRITER_CACHE_CHANGED_STATUS is considered to have changed.
 
DDS_Long high_watermark
 When the number of unacknowledged samples in the current send window of a reliable writer meets or exceeds this threshold, the DDS_RELIABLE_WRITER_CACHE_CHANGED_STATUS is considered to have changed.
 
struct DDS_Duration_t heartbeat_period
 The period at which to send heartbeats.
 
struct DDS_Duration_t fast_heartbeat_period
 An alternative heartbeat period used when a reliable writer needs to flush its unacknowledged samples more quickly.
 
struct DDS_Duration_t late_joiner_heartbeat_period
 An alternative heartbeat period used when a reliable reader joins late and needs to be caught up on cached samples of a reliable writer more quickly than the normal heartbeat rate.
 
struct DDS_Duration_t virtual_heartbeat_period
 The period at which to send virtual heartbeats. Virtual heartbeats inform the reliable reader about the range of samples currently present, for each virtual GUID, in the reliable writer's queue.
 
DDS_Long samples_per_virtual_heartbeat
 The number of samples that a reliable writer has to publish before sending a virtual heartbeat.
 
DDS_Long max_heartbeat_retries
 The maximum number of periodic heartbeat retries before marking a remote reader as inactive.
 
DDS_Boolean inactivate_nonprogressing_readers
 Whether to treat remote readers as inactive when their NACKs do not progress.
 
DDS_Long heartbeats_per_max_samples
 The number of heartbeats per current send window.
 
struct DDS_Duration_t min_nack_response_delay
 The minimum delay to respond to a NACK.
 
struct DDS_Duration_t max_nack_response_delay
 The maximum delay to respond to a nack.
 
struct DDS_Duration_t nack_suppression_duration
 The duration for ignoring consecutive NACKs that may trigger redundant repairs.
 
DDS_Long max_bytes_per_nack_response
 The maximum total message size when resending dropped samples.
 
struct DDS_Duration_t disable_positive_acks_min_sample_keep_duration
 The minimum duration a sample is queued for ACK-disabled readers.
 
struct DDS_Duration_t disable_positive_acks_max_sample_keep_duration
 The maximum duration a sample is queued for ACK-disabled readers.
 
DDS_Boolean disable_positive_acks_enable_adaptive_sample_keep_duration
 Enables dynamic adjustment of sample keep duration in response to congestion.
 
DDS_Long disable_positive_acks_decrease_sample_keep_duration_factor
 Controls rate of contraction of dynamic sample keep duration.
 
DDS_Long disable_positive_acks_increase_sample_keep_duration_factor
 Controls rate of growth of dynamic sample keep duration.
 
DDS_Long min_send_window_size
 Minimum size of send window of unacknowledged samples.
 
DDS_Long max_send_window_size
 Maximum size of send window of unacknowledged samples.
 
struct DDS_Duration_t send_window_update_period
 Period in which send window may be dynamically changed.
 
DDS_Long send_window_increase_factor
 Increases send window size by this percentage when reacting dynamically to network conditions.
 
DDS_Long send_window_decrease_factor
 Decreases send window size by this percentage when reacting dynamically to network conditions.
 
DDS_Boolean enable_multicast_periodic_heartbeat
 Whether periodic heartbeat messages are sent over multicast.
 
DDS_Long multicast_resend_threshold
 The minimum number of requesting readers needed to trigger a multicast resend.
 

Detailed Description

QoS related to the reliable writer protocol defined in RTPS.

It is used to configure a reliable writer according to RTPS protocol.

The reliability protocol settings are applied to batches instead of individual data samples when batching is enabled.

Properties:
RxO = N/A
Changeable = NO
QoS:
DDS_DataWriterProtocolQosPolicy DDS_DiscoveryConfigQosPolicy

Field Documentation

DDS_Long DDS_RtpsReliableWriterProtocol_t::low_watermark

When the number of unacknowledged samples in the current send window of a reliable writer meets or falls below this threshold, the DDS_RELIABLE_WRITER_CACHE_CHANGED_STATUS is considered to have changed.

This value is measured in units of samples, except with batching configurations where it is measured in units of batches.

The value must be greater than or equal to zero and strictly less than high_watermark.

The high and low watermarks are used for switching between the regular and fast heartbeat rates (DDS_RtpsReliableWriterProtocol_t::heartbeat_period and DDS_RtpsReliableWriterProtocol_t::fast_heartbeat_period, respectively). When the number of unacknowledged samples in the queue of a reliable DDS_DataWriter meets or exceeds high_watermark, the DDS_RELIABLE_WRITER_CACHE_CHANGED_STATUS is changed, and the DataWriter will start heartbeating at DDS_RtpsReliableWriterProtocol_t::fast_heartbeat_period. When the number of samples meets or falls below low_watermark, DDS_RELIABLE_WRITER_CACHE_CHANGED_STATUS is changed, and the heartbeat rate will return to the "normal" rate (DDS_RtpsReliableWriterProtocol_t::heartbeat_period).

[default] 0

[range] [0, 100 million], < high_watermark

DDS_Long DDS_RtpsReliableWriterProtocol_t::high_watermark

When the number of unacknowledged samples in the current send window of a reliable writer meets or exceeds this threshold, the DDS_RELIABLE_WRITER_CACHE_CHANGED_STATUS is considered to have changed.

This value is measured in units of samples, except with batching configurations where it is measured in units of batches.

The value must be strictly greater than low_watermark and less than or equal to a maximum that depends on the container QoS policy:

In DDS_DomainParticipantQos::discovery_config:

For DDS_DiscoveryConfigQosPolicy::publication_writer
high_watermark<= DDS_AllocationSettings_t::max_count in DDS_DomainParticipantResourceLimitsQosPolicy::local_writer_allocation

For DDS_DiscoveryConfigQosPolicy::subscription_writer
high_watermark<= DDS_AllocationSettings_t::max_count in DDS_DomainParticipantResourceLimitsQosPolicy::local_reader_allocation

In DDS_DataWriterQos::protocol:

For DDS_DataWriterProtocolQosPolicy::rtps_reliable_writer,

high_watermark<=DDS_ResourceLimitsQosPolicy::max_samples if batching is disabled. Otherwise,
high_watermark<=DDS_DataWriterResourceLimitsQosPolicy::max_batches high_watermark<=DDS_RtpsReliableWriterProtocol_t::max_send_window_size

[default] 1

[range] [1, 100 million] or DDS_LENGTH_UNLIMITED, > low_watermark <= maximum which depends on the container policy

struct DDS_Duration_t DDS_RtpsReliableWriterProtocol_t::heartbeat_period

The period at which to send heartbeats.

A reliable writer will send periodic heartbeats at this rate.

[default] The default value depends on the container policy:

[range] [1 nanosec,1 year], >= DDS_RtpsReliableWriterProtocol_t::fast_heartbeat_period, >= DDS_RtpsReliableWriterProtocol_t::late_joiner_heartbeat_period

struct DDS_Duration_t DDS_RtpsReliableWriterProtocol_t::fast_heartbeat_period

An alternative heartbeat period used when a reliable writer needs to flush its unacknowledged samples more quickly.

This heartbeat period will be used when the number of unacknowledged samples in the cache of a reliable writer meets or exceeds the writer's high watermark and has not subsequently dropped to the low watermark. The normal period will be used at all other times.

This period must not be slower (i.e. must be of the same or shorter duration) than the normal heartbeat period.

[default] The default value depends on the container policy:

[range] [1 nanosec,1 year], <= DDS_RtpsReliableWriterProtocol_t::heartbeat_period

struct DDS_Duration_t DDS_RtpsReliableWriterProtocol_t::late_joiner_heartbeat_period

An alternative heartbeat period used when a reliable reader joins late and needs to be caught up on cached samples of a reliable writer more quickly than the normal heartbeat rate.

This heartbeat period will be used when a reliable reader joins after a reliable writer with non-volatile durability has begun publishing samples. Once the reliable reader has received all cached samples, it will be serviced at the same rate as other reliable readers.

This period must not be slower (i.e., must be of the same or shorter duration) than the normal heartbeat period.

A reliable writer will use whichever heartbeat period is faster, the current heartbeat period being used for other reliable readers or the DDS_RtpsReliableWriterProtocol_t::late_joiner_heartbeat_period, to service the late joining reader. This means that if the DDS_RtpsReliableWriterProtocol_t::fast_heartbeat_period is currently being used and is faster than the late_joiner_heartbeat_period, then the fast_heartbeat_period will continue to be used for the late joiner as well.

[default] The default value depends on the container policy:

[range] [1 nanosec,1 year], <= DDS_RtpsReliableWriterProtocol_t::heartbeat_period

struct DDS_Duration_t DDS_RtpsReliableWriterProtocol_t::virtual_heartbeat_period

The period at which to send virtual heartbeats. Virtual heartbeats inform the reliable reader about the range of samples currently present, for each virtual GUID, in the reliable writer's queue.

A reliable writer will send periodic virtual heartbeats at this rate.

[default] The default value depends on the container policy:

[range] > 1 nanosec, DDS_DURATION_INFINITE, or DDS_DURATION_AUTO

DDS_Long DDS_RtpsReliableWriterProtocol_t::samples_per_virtual_heartbeat

The number of samples that a reliable writer has to publish before sending a virtual heartbeat.

[default] DDS_LENGTH_UNLIMITED

[range] [1,1000000], DDS_LENGTH_UNLIMITED

DDS_Long DDS_RtpsReliableWriterProtocol_t::max_heartbeat_retries

The maximum number of periodic heartbeat retries before marking a remote reader as inactive.

When a remote reader has not acked all the samples the reliable writer has in its queue, and max_heartbeat_retries number of periodic heartbeats has been sent without receiving any ack/nack back, the remote reader will be marked as inactive (not alive) and be ignored until it resumes sending ack/nack.

Note that piggyback heartbeats do NOT count towards this value.

[default] 10

[range] [1, 1 million] or DDS_LENGTH_UNLIMITED

DDS_Boolean DDS_RtpsReliableWriterProtocol_t::inactivate_nonprogressing_readers

Whether to treat remote readers as inactive when their NACKs do not progress.

Nominally, a remote reader is marked inactive when a successive number of periodic heartbeats equal or greater than DDS_RtpsReliableWriterProtocol_t::max_heartbeat_retries have been sent without receiving any ack/nacks back.

By setting this DDS_BOOLEAN_TRUE, it changes the conditions of inactivating a remote reader: a reader will be considered inactive when it either does not send any ack/nacks or keeps sending non-progressing nacks for DDS_RtpsReliableWriterProtocol_t::max_heartbeat_retries number of heartbeat periods, where a non-progressing nack is one whose oldest sample requested has not advanced from the oldest sample requested of the previous nack.

[default] DDS_BOOLEAN_FALSE

DDS_Long DDS_RtpsReliableWriterProtocol_t::heartbeats_per_max_samples

The number of heartbeats per current send window.

A piggyback heartbeat is sent every [(current send window size/heartbeats_per_max_samples)] number of samples written

If set to zero, no piggyback heartbeat will be sent.

If current send window size is DDS_LENGTH_UNLIMITED, 100 million is assumed as the value in the calculation.

[default] The default value depends on the container policy:

[range] [0, 100 million]

heartbeats_per_max_samples<= DDS_ResourceLimitsQosPolicy::max_samples if batching is disabled. Otherwise:
heartbeats_per_max_samples<= DDS_DataWriterResourceLimitsQosPolicy::max_batches

heartbeats_per_max_samples<= DDS_RtpsReliableWriterProtocol_t::max_send_window_size

struct DDS_Duration_t DDS_RtpsReliableWriterProtocol_t::min_nack_response_delay

The minimum delay to respond to a NACK.

When a reliable writer receives a NACK from a remote reader, the writer can choose to delay a while before it sends repair samples or a heartbeat. This sets the value of the minimum delay.

[default] 0 seconds

[range] [0,1 day], <= max_nack_response_delay

struct DDS_Duration_t DDS_RtpsReliableWriterProtocol_t::max_nack_response_delay

The maximum delay to respond to a nack.

This set the value of maximum delay between receiving a NACK and sending repair samples or a heartbeat.

[default] The default value depends on the container policy:

[range] [0,1 day], >= min_nack_response_delay

struct DDS_Duration_t DDS_RtpsReliableWriterProtocol_t::nack_suppression_duration

The duration for ignoring consecutive NACKs that may trigger redundant repairs.

A reliable writer may receive consecutive NACKs within a short duration from a remote reader that will trigger the sending of redundant repair messages.

This specifies the duration during which consecutive NACKs are ignored to prevent redundant repairs from being sent.

[default] 0 seconds

[range] [0,1 day],

DDS_Long DDS_RtpsReliableWriterProtocol_t::max_bytes_per_nack_response

The maximum total message size when resending dropped samples.

As part of the reliable communication protocol, data writers send heartbeat (HB) messages to their data readers. Each HB message contains the sequence number of the most recent sample sent by the data writer.

In response, a data reader sends an acknowledgement (ACK) message, indicating what sequence numbers it did not receive, if any. If the data reader is missing some samples, the data writer will send them again.

max_bytes_per_nack_response determines the maximum size of the message sent by the data writer in response to an ACK. This message may contain multiple samples. The data writer will always send at least one message, even if the size of that message exceeds the max_bytes_per_nack_response value.

If max_bytes_per_nack_response is larger than the maximum message size supported by the underlying transport, RTI Connext will send multiple messages. If the total size of all samples that need to be resent is larger than max_bytes_per_nack_response, the remaining samples will be resent the next time an ACK arrives.

[default] The default value depends on the container policy:

[range] [0, 1 GB]

struct DDS_Duration_t DDS_RtpsReliableWriterProtocol_t::disable_positive_acks_min_sample_keep_duration

The minimum duration a sample is queued for ACK-disabled readers.

When positive ACKs are disabled for a data writer (DDS_DataWriterProtocolQosPolicy::disable_positive_acks = DDS_BOOLEAN_TRUE) or a data reader (DDS_DataReaderProtocolQosPolicy::disable_positive_acks = DDS_BOOLEAN_TRUE), a sample is available from the data writer's queue for at least this duration, after which the sample may be considered to be acknowledged.

[default] 1 millisecond

[range] [0,1 year], <= DDS_RtpsReliableWriterProtocol_t::disable_positive_acks_max_sample_keep_duration

struct DDS_Duration_t DDS_RtpsReliableWriterProtocol_t::disable_positive_acks_max_sample_keep_duration

The maximum duration a sample is queued for ACK-disabled readers.

When positive ACKs are disabled for a data writer (DDS_DataWriterProtocolQosPolicy::disable_positive_acks = DDS_BOOLEAN_TRUE) or a data reader (DDS_DataReaderProtocolQosPolicy::disable_positive_acks = DDS_BOOLEAN_TRUE), a sample is available from the data writer's queue for at most this duration, after which the sample is considered to be acknowledged.

[default] 1 second

[range] [0,1 year], >= DDS_RtpsReliableWriterProtocol_t::disable_positive_acks_min_sample_keep_duration

DDS_Boolean DDS_RtpsReliableWriterProtocol_t::disable_positive_acks_enable_adaptive_sample_keep_duration

Enables dynamic adjustment of sample keep duration in response to congestion.

For dynamic networks where a static minimum sample keep duration may not provide sufficient performance or reliability, setting DDS_RtpsReliableWriterProtocol_t::disable_positive_acks_enable_adaptive_sample_keep_duration = DDS_BOOLEAN_TRUE, enables the sample keep duration to be dynamically adjusted to adapt to network conditions. The keep duration changes according to the detected level of congestion, which is determined to be proportional to the rate of NACKs received. An adaptive algorithm automatically controls the keep duration to optimize throughput and reliability.

To relieve high congestion, the keep duration is increased to effectively decrease the send rate; this lengthening of the keep duration is controlled by DDS_RtpsReliableWriterProtocol_t::disable_positive_acks_increase_sample_keep_duration_factor. Alternatively, when congestion is low, the keep duration is decreased to effectively increase send rate; this shortening of the keep duration is controlled by DDS_RtpsReliableWriterProtocol_t::disable_positive_acks_decrease_sample_keep_duration_factor.

The lower and upper bounds of the dynamic sample keep duration are set by DDS_RtpsReliableWriterProtocol_t::disable_positive_acks_min_sample_keep_duration and DDS_RtpsReliableWriterProtocol_t::disable_positive_acks_max_sample_keep_duration, respectively.

When DDS_RtpsReliableWriterProtocol_t::disable_positive_acks_enable_adaptive_sample_keep_duration = DDS_BOOLEAN_FALSE, the sample keep duration is set to DDS_RtpsReliableWriterProtocol_t::disable_positive_acks_min_sample_keep_duration .

[default] DDS_BOOLEAN_TRUE

DDS_Long DDS_RtpsReliableWriterProtocol_t::disable_positive_acks_decrease_sample_keep_duration_factor

Controls rate of contraction of dynamic sample keep duration.

Used when DDS_RtpsReliableWriterProtocol_t::disable_positive_acks_enable_adaptive_sample_keep_duration = DDS_BOOLEAN_TRUE.

When the adaptive algorithm determines that the keep duration should be decreased, this factor (a percentage) is multiplied with the current keep duration to get the new shorter keep duration. For example, if the current keep duration is 20 milliseconds, using the default factor of 95% would result in a new keep duration of 19 milliseconds.

[default] 95

[range] <= 100

DDS_Long DDS_RtpsReliableWriterProtocol_t::disable_positive_acks_increase_sample_keep_duration_factor

Controls rate of growth of dynamic sample keep duration.

Used when DDS_RtpsReliableWriterProtocol_t::disable_positive_acks_enable_adaptive_sample_keep_duration = DDS_BOOLEAN_TRUE.

When the adaptive algorithm determines that the keep duration should be increased, this factor (a percentage) is multiplied with the current keep duration to get the new longer keep duration. For example, if the current keep duration is 20 milliseconds, using the default factor of 150% would result in a new keep duration of 30 milliseconds.

[default] 150

[range] >= 100

DDS_Long DDS_RtpsReliableWriterProtocol_t::min_send_window_size

Minimum size of send window of unacknowledged samples.

A DDS_DataWriter has a limit on the number of unacknowledged samples in-flight at a time. This send window can be configured to have a minimum size (this field) and a maximum size (max_send_window_size). The send window can dynamically change, between the min and max sizes, to throttle the effective send rate in response to changing network congestion, as measured by negative acknowledgements received.

[default] DDS_LENGTH_UNLIMITED

[range] > 0, <= max_send_window_size, or DDS_LENGTH_UNLIMITED

See Also
DDS_RtpsReliableWriterProtocol_t::max_send_window_size
DDS_RtpsReliableWriterProtocol_t::low_watermark
DDS_RtpsReliableWriterProtocol_t::high_watermark
DDS_ReliableWriterCacheChangedStatus::full_reliable_writer_cache
DDS_Long DDS_RtpsReliableWriterProtocol_t::max_send_window_size

Maximum size of send window of unacknowledged samples.

A DDS_DataWriter has a limit on the number of unacknowledged samples in-flight at a time. This send window can be configured to have a minimum size (min_send_window_size) and a maximum size (this field). The send window can dynamically change, between the min and max sizes, to throttle the effective send rate in response to changing network congestion, as measured by negative acknowledgements received.

When both min_send_window_size and max_send_window_size are DDS_LENGTH_UNLIMITED, then either DDS_ResourceLimitsQosPolicy::max_samples (for non-batching) or DDS_DataWriterResourceLimitsQosPolicy::max_batches (for batching) serves as the effective max_send_window_size. When DDS_ResourceLimitsQosPolicy::max_samples (for non-batching) or DDS_DataWriterResourceLimitsQosPolicy::max_batches (for batching) is less than max_send_window_size, then it serves as the effective max_send_window_size. If it is also less than min_send_window_size, then effectively both min and max send window sizes are equal to max_samples or max_batches.

In addition, the low and high watermarks are scaled down linearly to stay within the current send window size, and the full reliable queue status is set when the send window is full.

[default] DDS_LENGTH_UNLIMITED

[range] > 0, >= min_send_window_size, or DDS_LENGTH_UNLIMITED

See Also
DDS_RtpsReliableWriterProtocol_t::min_send_window_size
DDS_RtpsReliableWriterProtocol_t::low_watermark
DDS_RtpsReliableWriterProtocol_t::high_watermark
DDS_ReliableWriterCacheChangedStatus::full_reliable_writer_cache
struct DDS_Duration_t DDS_RtpsReliableWriterProtocol_t::send_window_update_period

Period in which send window may be dynamically changed.

The DDS_DataWriter's send window will dynamically change, between the min and max send window sizes, to throttle the effective send rate in response to changing network congestion, as measured by negative acknowledgements received.

The change in send window size happens at this update period, whereupon the send window is either increased or decreased in size according to the increase or decrease factors, respectively.

[default] The default value depends on the container policy:

[range] > [0,1 year]

See Also
DDS_RtpsReliableWriterProtocol_t::send_window_increase_factor, DDS_RtpsReliableWriterProtocol_t::send_window_decrease_factor
DDS_Long DDS_RtpsReliableWriterProtocol_t::send_window_increase_factor

Increases send window size by this percentage when reacting dynamically to network conditions.

The DDS_DataWriter's send window will dynamically change, between the min and max send window sizes, to throttle the effective send rate in response to changing network congestion, as measured by negative acknowledgements received.

After an update period during which no negative acknowledgements were received, the send window will be increased by this factor. The factor is treated as a percentage, where a factor of 150 would increase the send window by 150%. The increased send window size will not exceed the max_send_window_size.

[default] 105

[range] > 100

See Also
DDS_RtpsReliableWriterProtocol_t::send_window_update_period, DDS_RtpsReliableWriterProtocol_t::send_window_decrease_factor
DDS_Long DDS_RtpsReliableWriterProtocol_t::send_window_decrease_factor

Decreases send window size by this percentage when reacting dynamically to network conditions.

The DDS_DataWriter's send window will dynamically change, between the min and max send window sizes, to throttle the effective send rate in response to changing network congestion, as measured by negative acknowledgements received.

When increased network congestion causes a negative acknowledgement to be received by a writer, the send window will be decreased by this factor to throttle the effective send rate. The factor is treated as a percentage, where a factor of 80 would decrease the send window to 80% of its previous size. The decreased send window size will not be less than the min_send_window_size.

[default] The default value depends on the container policy:

[range] [0, 100]

See Also
DDS_RtpsReliableWriterProtocol_t::send_window_update_period, DDS_RtpsReliableWriterProtocol_t::send_window_increase_factor
DDS_Boolean DDS_RtpsReliableWriterProtocol_t::enable_multicast_periodic_heartbeat

Whether periodic heartbeat messages are sent over multicast.

When enabled, if a reader has a multicast destination, then the writer will send its periodic HEARTBEAT messages to that destination. Otherwise, if not enabled or the reader does not have a multicast destination, the writer will send its periodic HEARTBEATs over unicast.

[default] DDS_BOOLEAN_FALSE

DDS_Long DDS_RtpsReliableWriterProtocol_t::multicast_resend_threshold

The minimum number of requesting readers needed to trigger a multicast resend.

Given readers with multicast destinations, when a reader NACKs for samples to be resent, the writer can either resend them over unicast or multicast. In order for the writer to resend over multicast, this threshold is the minimum number of readers of the same multicast group that the writer must receive NACKs from within a single response-delay. This allows the writer to coalesce near-simultaneous unicast resends into a multicast resend. Note that a threshold of 1 means that all resends will be sent over multicast, if available.

[default] 2

[range] [>= 1]


RTI Connext C API Version 6.0.0 Copyright © Sun Mar 3 2019 Real-Time Innovations, Inc