DDS::HistoryQosPolicy Struct Reference
[HISTORY]

Specifies the behavior of RTI Data Distribution Service in the case where the value of a sample changes (one or more times) before it can be successfully communicated to one or more existing subscribers. More...

#include <managed_infrastructure.h>

List of all members.

Static Public Member Functions

static System::String^ get_history_qos_policy_name ()
 Stringified human-readable name for DDS::HistoryQosPolicy.

Public Attributes

HistoryQosPolicyKind kind
 Specifies the kind of history to be kept.
System::Int32 depth
 Specifies the number of samples to be kept, when the kind is DDS::HistoryQosPolicyKind::KEEP_LAST_HISTORY_QOS.
RefilterQosPolicyKind refilter
 <<eXtension>> Specifies how a writer should handle previously written samples to a new reader.


Detailed Description

Specifies the behavior of RTI Data Distribution Service in the case where the value of a sample changes (one or more times) before it can be successfully communicated to one or more existing subscribers.

This QoS policy specifies how much data must to stored by RTI Data Distribution Service for a DDS::DataWriter or DDS::DataReader. It controls whether RTI Data Distribution Service should deliver only the most recent value, attempt to deliver all intermediate values, or do something in between.

On the publishing side, this QoS policy controls the samples that should be maintained by the DDS::DataWriter on behalf of existing DDS::DataReader entities. The behavior with regards to a DDS::DataReader entities discovered after a sample is written is controlled by the DURABILITY policy.

On the subscribing side, this QoS policy controls the samples that should be maintained until the application "takes" them from RTI Data Distribution Service.

Entity:
DDS::Topic, DDS::DataReader, DDS::DataWriter
Properties:
RxO = NO
Changeable = UNTIL ENABLE
See also:
DDS::ReliabilityQosPolicy

DDS::HistoryQosPolicy

Usage

This policy controls the behavior of RTI Data Distribution Service when the value of an instance changes before it is finally communicated to DDS::DataReader entities.

When a DDS::DataWriter sends data, or a DDS::DataReader receives data, the data sent or received is stored in a cache whose contents are controlled by this QoS policy. This QoS policy interacts with DDS::ReliabilityQosPolicy by controlling whether RTI Data Distribution Service guarantees that all of the sent data is received (DDS::HistoryQosPolicyKind::KEEP_ALL_HISTORY_QOS) or if only the last N data values sent are guaranteed to be received (DDS::HistoryQosPolicyKind::KEEP_ALL_HISTORY_QOS)--this is a reduced level of reliability.

The amount of data that is sent to new DataReaders who have configured their DDS::DurabilityQosPolicy to receive previously published data is also controlled by the History QoS policy.

Note that the History QoS policy does not control the physical sizes of the send and receive queues. The memory allocation for the queues is controlled by the DDS::ResourceLimitsQosPolicy.

If kind is DDS::HistoryQosPolicyKind::KEEP_LAST_HISTORY_QOS (the default), then RTI Data Distribution Service will only attempt to keep the latest values of the instance and discard the older ones. In this case, the value of depth regulates the maximum number of values (up to and including the most current one) RTI Data Distribution Service will maintain and deliver. After N values have been sent or received, any new data will overwrite the oldest data in the queue. Thus the queue acts like a circular buffer of length N.

The default (and most common setting) for depth is 1, indicating that only the most recent value should be delivered.

If kind is DDS::HistoryQosPolicyKind::KEEP_ALL_HISTORY_QOS, then RTI Data Distribution Service will attempt to maintain and deliver all the values of the instance to existing subscribers. The resources that RTI Data Distribution Service can use to keep this history are limited by the settings of the RESOURCE_LIMITS. If the limit is reached, then the behavior of RTI Data Distribution Service will depend on the RELIABILITY. If the Reliability kind is DDS::ReliabilityQosPolicyKind::BEST_EFFORT_RELIABILITY_QOS, then the old values will be discarded. If Reliability kind is RELIABLE, then RTI Data Distribution Service will block the DDS::DataWriter until it can deliver the necessary old values to all subscribers.

If refilter is DDS::RefilterQosPolicyKind::NONE_REFILTER_QOS, then samples written before a DataReader is matched to a DataWriter are not refiltered by the DataWriter.

If refilter is DDS::RefilterQosPolicyKind::ALL_REFILTER_QOS, then all samples written before a DataReader is matched to a DataWriter are refiltered by the DataWriter when the DataReader is matched.

If refilter is DDS::RefilterQosPolicyKind::ON_DEMAND_REFILTER_QOS, then a DataWriter will only refilter samples that a DataReader requests.

Consistency

This QoS policy's depth must be consistent with the RESOURCE_LIMITS max_samples_per_instance. For these two QoS to be consistent, they must verify that depth <= max_samples_per_instance.

See also:
DDS::ResourceLimitsQosPolicy

Member Data Documentation

Specifies the kind of history to be kept.

[default] DDS::HistoryQosPolicyKind::KEEP_LAST_HISTORY_QOS

Specifies the number of samples to be kept, when the kind is DDS::HistoryQosPolicyKind::KEEP_LAST_HISTORY_QOS.

If a value other than 1 (the default) is specified, it should be consistent with the settings of the RESOURCE_LIMITS policy. That is:

depth <= DDS::ResourceLimitsQosPolicy::max_samples_per_instance

When the kind is DDS::HistoryQosPolicyKind::KEEP_ALL_HISTORY_QOS, the depth has no effect. Its implied value is infinity (in practice limited by the settings of the RESOURCE_LIMITS policy).

[default] 1

[range] [1,100 million], <= DDS::ResourceLimitsQosPolicy::max_samples_per_instance

<<eXtension>> Specifies how a writer should handle previously written samples to a new reader.

[default] DDS::RefilterQosPolicyKind::NONE_REFILTER_QOS


RTI Data Distribution Service .Net APIs Version 4.5e Copyright © 23 Oct 2011 Real-Time Innovations, Inc