RTI Connext Micro C++ API Version 4.3.0
Loading...
Searching...
No Matches

DDSDataReader entity and associated elements More...

Classes

struct  DDS_RequestedDeadlineMissedStatus
 DDS_REQUESTED_DEADLINE_MISSED_STATUS More...
 
struct  DDS_LivelinessChangedStatus
 DDS_LIVELINESS_CHANGED_STATUS More...
 
struct  DDS_RequestedIncompatibleQosStatus
 DDS_REQUESTED_INCOMPATIBLE_QOS_STATUS More...
 
struct  DDS_SampleRejectedStatus
 DDS_SAMPLE_REJECTED_STATUS More...
 
struct  DDS_DataReaderInstanceReplacedStatus
 <<eXtension>> DDS_INSTANCE_REPLACED_STATUS. More...
 
struct  DDS_SubscriptionMatchedStatus
 DDS_SUBSCRIPTION_MATCHED_STATUS More...
 
struct  DDS_SampleLostStatus
 DDS_SAMPLE_LOST_STATUS More...
 
struct  DDS_DataReaderQos
 QoS policies supported by a DDSDataReader entity. More...
 
class  FooDataReader
 Declares the interface required to support a user data type-specific data reader. More...
 
class  DDSDataReaderListener
 <<interface>> DDSListener for reader status. More...
 
class  DDSDataReader
 <<interface>> Allows the application to: (1) declare the data it wishes to receive (i.e. make a subscription) and (2) access the data received by the attached DDSSubscriber. More...
 

Enumerations

enum  DDS_SampleRejectedStatusKind {
  DDS_NOT_REJECTED , DDS_REJECTED_BY_INSTANCES_LIMIT , DDS_REJECTED_BY_SAMPLES_LIMIT , DDS_REJECTED_BY_SAMPLES_PER_INSTANCE_LIMIT ,
  DDS_REJECTED_BY_REMOTE_WRITERS_LIMIT , DDS_REJECTED_BY_SAMPLES_PER_REMOTE_WRITER_LIMIT
}
 Kinds of reasons for rejecting a sample. More...
 
enum  DDS_SampleLostStatusKind {
  DDS_SAMPLE_LOST_NOT_LOST , DDS_SAMPLE_LOST_BY_DATAWRITER , DDS_SAMPLE_LOST_BY_MAX_SAMPLES_LIMIT , DDS_SAMPLE_LOST_BY_HISTORY_DEPTH_LIMIT ,
  DDS_SAMPLE_LOST_BY_META_SAMPLE_LIMIT , DDS_SAMPLE_LOST_BY_NOT_READ_ON_CACHE_DELETION , DDS_SAMPLE_LOST_BY_MANAGEDPOOL_OVERWRITE
}
 <<eXtension>> Kinds of reasons a sample was lost. More...
 

Detailed Description

DDSDataReader entity and associated elements

Enumeration Type Documentation

◆ DDS_SampleRejectedStatusKind

Kinds of reasons for rejecting a sample.

Enumerator
DDS_NOT_REJECTED 

Samples are never rejected.

See also
DDS_ResourceLimitsQosPolicy
DDS_REJECTED_BY_INSTANCES_LIMIT 

A resource limit on the number of instances was reached.

See also
DDS_ResourceLimitsQosPolicy
DDS_REJECTED_BY_SAMPLES_LIMIT 

A resource limit on the number of samples was reached.

See also
DDS_ResourceLimitsQosPolicy
DDS_REJECTED_BY_SAMPLES_PER_INSTANCE_LIMIT 

A resource limit on the number of samples per instance was reached.

See also
DDS_ResourceLimitsQosPolicy
DDS_REJECTED_BY_REMOTE_WRITERS_LIMIT 

A resource limit on the number of remote writers from which a DDSDataReader may read was reached.

See also
DDS_DataReaderResourceLimitsQosPolicy
DDS_REJECTED_BY_SAMPLES_PER_REMOTE_WRITER_LIMIT 

A resource limit on the number of samples from a given remote writer that a DDSDataReader may store was reached.

See also
DDS_DataReaderResourceLimitsQosPolicy

◆ DDS_SampleLostStatusKind

<<eXtension>> Kinds of reasons a sample was lost.

Enumerator
DDS_SAMPLE_LOST_NOT_LOST 

Sample was not lost, normal removal.

See also
DDS_ResourceLimitsQosPolicy
DDS_SAMPLE_LOST_BY_DATAWRITER 

Sample was lost by the DDSDataWriter, it was never received by the DDSDataReader.

See also
DDS_ResourceLimitsQosPolicy
DDS_SAMPLE_LOST_BY_MAX_SAMPLES_LIMIT 

A sample was received by the DDSDataReader but lost because the max_samples resource was exceeded and no samples could be freed to receive it.

See also
DDS_ResourceLimitsQosPolicy
DDS_SAMPLE_LOST_BY_HISTORY_DEPTH_LIMIT 

A sample was received by the DataReader but lost because the max depth was reached for the instance and no samples could be removed from the history. For example, if all the samples in the DataReader cache are loaned by the application, they cannot be removed.

See also
DDS_ResourceLimitsQosPolicy
DDS_SAMPLE_LOST_BY_META_SAMPLE_LIMIT 

An instance transitioned from the ALIVE to NOT_ALIVE state, but the sample indicating the state transition was not read from the DataReader's history cache before the sample was reused.

An instance can be ALIVE (DDS_ALIVE_INSTANCE_STATE) or NOT_ALIVE ( DDS_NOT_ALIVE_NO_WRITERS_INSTANCE_STATE or DDS_NOT_ALIVE_DISPOSED_INSTANCE_STATE).

When a instance transitions from the ALIVE to NOT_ALIVE state, a meta sample is added to the DDSDataReader cache which an application can read like any other sample. A meta sample does not contain data, only information about the instance.

There is only one meta sample per instance in the DDSDataReader cache. Thus, if an instance transitions from ALIVE to NOT_ALIVE multiple times, the meta sample can be reused before an application reads the meta sample from the DDSDataReader's cache.

The reuse of the meta sample may happen when the DDSDataReader cache is read asynchronously to the receive threads, such as when polling or using a DDSWaitSet. For example, if an application is polling the data every 1 second, but an instance receives multiple samples and dispose messages every 10ms, one or more ALIVE-to-NOT_ALIVE transitions may be missed.

This is similar to the behavior of the DDS_SampleInfo disposed_generation_count and no_writers_generation_count generation counters (which are not supported by RTI Connext DDS Micro). These counters indicate the number of times an instance has transitioned from NOT_ALIVE_DISPOSED to ALIVE and from NOT_ALIVE_NO_WRITERS to ALIVE, respectively. However, if an application does not read samples fast enough, these counters may have been incremented more than once by the time an application reads from the DDSDataReader's cache, which indicated that meta samples with state transitions have been missed. These counters are needed because an instance can only be in one state, but the state may have changed multiple times.

An instance can only be in one state, and the last meta sample read from the DDSDataReader's cache is the current state.

Note
The DDS_SAMPLE_LOST_BY_META_SAMPLE_LIMIT reason does not mean data has been lost. It only means that a state transition has been lost. If knowledge about lost state changes are not of interest, then this sample lost reason can be ignored. If knowledge that a state changes are missed are useful, then DDS_SAMPLE_LOST_BY_META_SAMPLE_LIMIT can be monitored.
By default, RTI Connext DDS Micro will propagate NOT_ALIVE_DISPOSED to the application, even if no samples have been received for an instance. This behavior can be changed; refer to DDS_DataReaderProtocolQosPolicy::propagate_dispose_of_unregistered_instances for details.
See also
DDS_ResourceLimitsQosPolicy
DDS_SAMPLE_LOST_BY_NOT_READ_ON_CACHE_DELETION 

The DataReader has samples in the cache that were not seen by the application and were lost when the DataReader was deleted.

See also
DDS_ResourceLimitsQosPolicy
DDS_SAMPLE_LOST_BY_MANAGEDPOOL_OVERWRITE 

The DataReader has samples that may have been overwritten.

See also
DDS_ResourceLimitsQosPolicy