RTI Connext Modern C++ API
Version 6.0.1
|
Contains the dds::sub::Subscriber, dds::sub::DataReader, dds::sub::cond::ReadCondition, dds::sub::cond::QueryCondition, and rti::sub::TopicQuery classes, as well as the dds::sub::SubscriberListener and dds::sub::DataReaderListener interfaces, and more generally, all that is needed on the subscription side. More...
Modules | |
Subscribers | |
dds::sub::Subscriber entity and associated elements | |
DataReaders | |
dds::sub::DataReader entity and associated elements | |
Data Samples | |
dds::sub::SampleInfo, dds::sub::status::SampleState, dds::sub::status::ViewState, dds::sub::status::InstanceState and associated elements | |
Contains the dds::sub::Subscriber, dds::sub::DataReader, dds::sub::cond::ReadCondition, dds::sub::cond::QueryCondition, and rti::sub::TopicQuery classes, as well as the dds::sub::SubscriberListener and dds::sub::DataReaderListener interfaces, and more generally, all that is needed on the subscription side.
Data is made available to the application by the following operations on dds::sub::DataReader objects: dds::sub::DataReader::read, dds::sub::DataReader::take, dds::sub::DataReader::select. 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().
The select()
operation allows specifying which samples to read or take depending on several parameters.
Each of these operations returns a collection of Data
values and associated dds::sub::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.
Applications access data using the following dds::sub::DataReader operations and their variants: dds::sub::DataReader::read(), dds::sub::DataReader::take(), and dds::sub::DataReader::select().
These operations return a collection, dds::sub::LoanedSamples, consisting of which contain the actual data and dds::sub::SampleInfo objects.
The way RTI Connext builds the collection depends on QoS policies set on the dds::sub::DataReader and dds::sub::Subscriber, the source_timestamp
of the samples, and, when using dds::sub::DataReader::select(), the parameters used to build the dds::sub::Selector.
These operations are non-blocking and just deliver what is currently available.
Once the data samples are available to the DataReader, the application can read or take them.
To access data coherently, or in order, the PRESENTATION QoS must be set properly.