RTI Connext Modern C++ API
Version 7.0.0
|
<<extension>> <<reference-type>> Allows a dds::sub::DataReader to query the sample cache of its matching dds::pub::DataWriters. More...
#include <rti/sub/TopicQuery.hpp>
Public Member Functions | |
TopicQuery (dds::sub::AnyDataReader reader, const TopicQuerySelection &selection) | |
Creates a TopicQuery for a given DataReader. More... | |
void | close () |
Deletes and cancels this TopicQuery. More... | |
const rti::core::Guid | guid () const |
Gets the TopicQuery GUID. More... | |
bool | closed () const |
Indicates whether this TopicQuery has been closed with close(). More... | |
dds::sub::AnyDataReader | datareader () const |
Gets the DataReader associated to this TopicQuery. More... | |
Static Public Member Functions | |
static TopicQuery | UseReaderContentFilter (dds::sub::AnyDataReader reader) |
Creates a TopicQuery with the same filter as this reader's ContentFilteredTopic. More... | |
static TopicQuery | SelectAll (dds::sub::AnyDataReader reader) |
Creates a TopicQuery that requests all the samples in the DataWriters' cache. More... | |
Related Functions | |
(Note that these are not member functions.) | |
TopicQuery | find_topic_query (dds::sub::AnyDataReader datareader, const rti::core::Guid &guid) |
Looks up a TopicQuery by its GUID. More... | |
<<extension>> <<reference-type>> Allows a dds::sub::DataReader to query the sample cache of its matching dds::pub::DataWriters.
You can create a TopicQuery for a DataReader with the constructor that receives a TopicQuerySelection or with the following static member functions:
As a <<reference-type>>, a TopicQuery will be deleted when all references to it go out of scope or after calling close(). The middleware will notify the deletion of a TopicQuery to the DataWriters. See close() for more details.
|
inline |
Creates a TopicQuery for a given DataReader.
The resulting TopicQuery will propagate to the matching DataWriters right after creating if the reader is enabled. Otherwise it will propagate after enabling the reader.
Any late-joining DataWriter matching with the DataReader will also receive the query.
reader | The DataReader that will query and receive the requested samples |
selection | Selects which samples the matching DataWriters will provide. |
There are two special kinds of TopicQueries, created with the static member functions UseReaderContentFilter() and SelectAll().
|
inline |
Deletes and cancels this TopicQuery.
This is a explicit deletion, which otherwise would occur when all references to this TopicQuery go out of scope.
After deleting a TopicQuery new DataWriters won't discover it and existing DataWriters currently publishing cached samples may stop before delivering all of them.
|
inline |
Gets the TopicQuery GUID.
|
inline |
Indicates whether this TopicQuery has been closed with close().
|
inline |
Gets the DataReader associated to this TopicQuery.
References rti::sub::find_topic_query().
|
static |
Creates a TopicQuery with the same filter as this reader's ContentFilteredTopic.
If the reader doesn't use a dds::topic::ContentFilteredTopic, this TopicQuery behaves as TopicQuery::SelectAll().
|
static |
Creates a TopicQuery that requests all the samples in the DataWriters' cache.
|
related |
Looks up a TopicQuery by its GUID.
datareader | The DataReader used to create the TopicQuery |
guid | The TopicQuery's GUID |