RTI Connext Traditional C++ API  Version 7.0.0

Contains the DDSSubscriber, DDSDataReader, DDSReadCondition, DDSQueryCondition, and DDSTopicQuery classes, as well as the DDSSubscriberListener and DDSDataReaderListener interfaces, and more generally, all that is needed on the subscription side. More...

Modules

 Subscribers
 DDSSubscriber entity and associated elements
 
 DataReaders
 DDSDataReader entity and associated elements
 
 Data Samples
 DDS_SampleInfo, DDS_SampleStateKind, DDS_ViewStateKind, DDS_InstanceStateKind and associated elements
 
 SampleProcessor
 <<experimental>> <<extension>> Utility to concurrently read and process the data samples received by DDSDataReader.
 

Detailed Description

Contains the DDSSubscriber, DDSDataReader, DDSReadCondition, DDSQueryCondition, and DDSTopicQuery classes, as well as the DDSSubscriberListener and DDSDataReaderListener interfaces, and more generally, all that is needed on the subscription side.

DDSSubscriptionPackage.png
DCPS Subscription package

Access to data samples

Data is made available to the application by the following operations on DDSDataReader objects: FooDataReader::read, FooDataReader::read_w_condition, FooDataReader::take, FooDataReader::take_w_condition, and the other variants of read() and take().

The general semantics of the read() operation is that the application only gets access to the corresponding data (i.e. a precise instance value); the data remains the responsibility of RTI Connext and can be read again.

The semantics of the take() operations is that the application takes full responsibility for the data; that data will no longer be available locally to RTI Connext. Consequently, it is possible to access the same information multiple times only if all previous accesses were read() operations, not take().

Each of these operations returns a collection of Data values and associated DDS_SampleInfo objects. Each data value represents an atom of data information (i.e., a value for one instance). This collection may contain samples related to the same or different instances (identified by the key). Multiple samples can refer to the same instance if the settings of the HISTORY QoS allow for it.

These operations reset the read communication statuses; see Changes in read communication status.

To return the memory back to the middleware, every read() or take() that retrieves a sequence of samples must be followed with a call to FooDataReader::return_loan.

See also
Interpretation of the SampleInfo

Data access patterns

The application accesses data by means of the operations read or take on the DDSDataReader. These operations return an ordered collection of DataSamples consisting of a DDS_SampleInfo part and a Data part.

The way RTI Connext builds the collection depends on QoS policies set on the DDSDataReader and DDSSubscriber, as well as the source_timestamp of the samples, and the parameters passed to the read() / take() operations, namely:

The read() and take() operations are non-blocking and just deliver what is currently available that matches the specified states.

The read_w_condition() and take_w_condition() operations take a DDSReadCondition object as a parameter instead of sample, view or instance states. The behaviour is that the samples returned will only be those for which the condition is DDS_BOOLEAN_TRUE. These operations, in conjunction with DDSReadCondition objects and a DDSWaitSet, allow performing waiting reads.

Once the data samples are available to the data readers, they can be read or taken by the application. The basic rule is that the application may do this in any order it wishes. This approach is very flexible and allows the application ultimate control.

To access data coherently, or in order, the PRESENTATION QoS must be set properly.