RTI Connext Java API Version 7.1.0
|
Controls how the middleware will deal with data sent by multiple com.rti.dds.publication.DataWriter entities for the same instance of data (i.e., same com.rti.dds.topic.Topic and key). More...
Public Attributes | |
DestinationOrderQosPolicyKind | kind |
Specifies the desired kind of destination order. More... | |
DestinationOrderQosPolicyScopeKind | scope = DestinationOrderQosPolicyScopeKind.INSTANCE_SCOPE_DESTINATIONORDER_QOS |
Specifies the desired scope of the source destination order. More... | |
final Duration_t | source_timestamp_tolerance |
<<extension>> Allowed tolerance between source timestamps of consecutive samples. More... | |
![]() | |
final QosPolicyId_t | id |
The ID of this QoS policy. More... | |
final String | policy_name |
The name of this QoS policy. More... | |
Controls how the middleware will deal with data sent by multiple com.rti.dds.publication.DataWriter entities for the same instance of data (i.e., same com.rti.dds.topic.Topic and key).
When multiple DataWriters send data for the same topic, the order in which data from different DataWriters are received by the applications of different DataReaders may be different. So different DataReaders may not receive the same "last" value when DataWriters stop sending data.
This QoS policy controls how each subscriber resolves the final value of a data instance that is written by multiple com.rti.dds.publication.DataWriter entities (which may be associated with different com.rti.dds.publication.Publisher entities) running on different nodes.
This QoS can be used to create systems that have the property of "eventual consistency." Thus intermediate states across multiple applications may be inconsistent, but when DataWriters stop sending changes to the same topic, all applications will end up having the same state.
This QoS policy can be set for both DataWriters and DataReaders.
For the DataReader:
The default setting, com.rti.dds.infrastructure.DestinationOrderQosPolicyKind.DestinationOrderQosPolicyKind.BY_RECEPTION_TIMESTAMP_DESTINATIONORDER_QOS, indicates that (assuming the OWNERSHIP_STRENGTH policy allows it) the latest received value for the instance should be the one whose value is kept. That is, data will be delivered by a com.rti.dds.subscription.DataReader in the order in which it was received (which may lead to inconsistent final values).
For com.rti.dds.infrastructure.DestinationOrderQosPolicyKind.DestinationOrderQosPolicyKind.BY_SOURCE_TIMESTAMP_DESTINATIONORDER_QOS, if the scope is set to com.rti.dds.infrastructure.DestinationOrderQosPolicyScopeKind.DestinationOrderQosPolicyScopeKind.INSTANCE_SCOPE_DESTINATIONORDER_QOS (default), within each instance, the sample's source timestamp shall be used to determine the most recent information. This is the only setting that, in the case of concurrent same-strength DataWriters updating the same instance, ensures that all DataReaders end up with the same final value for the instance. If a DataReader receives a sample for an instance with a source timestamp that is older than the last source timestamp received for the instance, the sample is dropped. The SAMPLE_REJECTED status or the SAMPLE_LOST status will not be updated.
If scope is set to com.rti.dds.infrastructure.DestinationOrderQosPolicyScopeKind.DestinationOrderQosPolicyScopeKind.TOPIC_SCOPE_DESTINATIONORDER_QOS, the ordering is enforced per topic across all instances.
In addition, a DataReader will accept a sample only if the source timestamp is no farther in the future from the reception timestamp than source_timestamp_tolerance. Otherwise, the DDS sample is dropped. The SAMPLE_REJECTED status or the SAMPLE_LOST status will not be updated.
For the DataWriter:
For the default setting, com.rti.dds.infrastructure.DestinationOrderQosPolicyKind.DestinationOrderQosPolicyKind.BY_RECEPTION_TIMESTAMP_DESTINATIONORDER_QOS, the DataWriter will not enforce source timestamp ordering when writing samples using the com.rti.ndds.example.FooDataWriter.write_w_params or com.rti.ndds.example.FooDataWriter.write_w_timestamp API. The source timestamp of a new sample can be older than the source timestamp of the previous samples.
When using com.rti.dds.infrastructure.DestinationOrderQosPolicyKind.DestinationOrderQosPolicyKind.BY_SOURCE_TIMESTAMP_DESTINATIONORDER_QOS, If scope is set to com.rti.dds.infrastructure.DestinationOrderQosPolicyScopeKind.DestinationOrderQosPolicyScopeKind.INSTANCE_SCOPE_DESTINATIONORDER_QOS (default), when writing a sample, the sample's timestamp must not be older than the timestamp of the previously written DDS sample for the same instance. If, however, the timestamp is older than the timestamp of the previously written DDS sample—but the difference is less than the source_timestamp_tolerance—the DDS sample will use the previously written DDS sample's timestamp as its timestamp. Otherwise, if the difference is greater than the tolerance, the write will fail with retcode com.rti.dds.infrastructure.RETCODE_BAD_PARAMETER.
If scope is set to com.rti.dds.infrastructure.DestinationOrderQosPolicyScopeKind.DestinationOrderQosPolicyScopeKind.TOPIC_SCOPE_DESTINATIONORDER_QOS, a new sample timestamp must not be older than the timestamp of the previously written DDS sample, across all instances. (The ordering is enforced across all instances.)
The value offered is considered compatible with the value requested if and only if the inequality offered kind >= requested kind evaluates to 'TRUE'. For the purposes of this inequality, the values of com.rti.dds.infrastructure.DestinationOrderQosPolicy.kind are considered ordered such that com.rti.dds.infrastructure.DestinationOrderQosPolicyKind.DestinationOrderQosPolicyKind.BY_RECEPTION_TIMESTAMP_DESTINATIONORDER_QOS < com.rti.dds.infrastructure.DestinationOrderQosPolicyKind.DestinationOrderQosPolicyKind.BY_SOURCE_TIMESTAMP_DESTINATIONORDER_QOS
Specifies the desired kind of destination order.
[default] com.rti.dds.infrastructure.DestinationOrderQosPolicyKind.DestinationOrderQosPolicyKind.BY_RECEPTION_TIMESTAMP_DESTINATIONORDER_QOS,
DestinationOrderQosPolicyScopeKind scope = DestinationOrderQosPolicyScopeKind.INSTANCE_SCOPE_DESTINATIONORDER_QOS |
Specifies the desired scope of the source destination order.
Indicates if tolerance check and the current sample's timestamp is computed based on instance or topic basis.
[default] com.rti.dds.infrastructure.DestinationOrderQosPolicyScopeKind.DestinationOrderQosPolicyScopeKind.INSTANCE_SCOPE_DESTINATIONORDER_QOS
final Duration_t source_timestamp_tolerance |
<<extension>> Allowed tolerance between source timestamps of consecutive samples.
When a com.rti.dds.publication.DataWriter sets com.rti.dds.infrastructure.DestinationOrderQosPolicyKind to com.rti.dds.infrastructure.DestinationOrderQosPolicyKind.DestinationOrderQosPolicyKind.BY_SOURCE_TIMESTAMP_DESTINATIONORDER_QOS, when writing a sample, its timestamp must not be less than the timestamp of the previously written sample. However, if it is less than the timestamp of the previously written sample but the difference is less than this tolerance, the sample will use the previously written sample's timestamp as its timestamp. Otherwise, if the difference is greater than this tolerance, the write will fail.
When a com.rti.dds.subscription.DataReader sets com.rti.dds.infrastructure.DestinationOrderQosPolicyKind to com.rti.dds.infrastructure.DestinationOrderQosPolicyKind.DestinationOrderQosPolicyKind.BY_SOURCE_TIMESTAMP_DESTINATIONORDER_QOS, the com.rti.dds.subscription.DataReader will accept a sample only if the source timestamp is no farther in the future from the reception timestamp than this tolerance. Otherwise, the sample is dropped.
[default] 100 milliseconds for com.rti.dds.publication.DataWriter, 30 seconds for com.rti.dds.subscription.DataReader