CoreDX DDS Modern C++ API
|
The Selector class is used by the DataReader to compose read operations. More...
Public Member Functions | |
Selector (DataReader &dr) | |
Construct a Selector. | |
Selector & | instance (const dds::core::InstanceHandle &h) |
Select a specific instance. | |
Selector & | next_instance (const dds::core::InstanceHandle &h) |
Select an instance following the specified instance. | |
Selector & | state (const dds::sub::status::DataState &s) |
Select samples matching the specified DataState. | |
Selector & | content (const dds::sub::Query &query) |
Select samples matching the specified Query. | |
Selector & | max_samples (uint32_t n) |
Select no more than the specified maximum number of samples. | |
dds::sub::LoanedSamples< T > | read () |
Read samples based on the configuration of this Selector. | |
dds::sub::LoanedSamples< T > | take () |
Take samples based on the configuration of this Selector. | |
template<typename SamplesFWIterator > | |
uint32_t | read (SamplesFWIterator sfit, uint32_t max_samples) |
Read samples based on the configuration of this Selector, limited by the specified max_samples, and insert them into the provided container. | |
template<typename SamplesFWIterator > | |
uint32_t | take (SamplesFWIterator sfit, uint32_t max_samples) |
Take samples based on the configuration of this Selector, limited by the specified max_samples, and insert them into the provided container. | |
template<typename SamplesBIIterator > | |
uint32_t | read (SamplesBIIterator sbit) |
Read samples based on the configuration of this Selector, and insert them into the provided container. | |
template<typename SamplesBIIterator > | |
uint32_t | take (SamplesBIIterator sbit) |
Take samples based on the configuration of this Selector, and insert them into the provided container. | |
The Selector class is used by the DataReader to compose read operations.
For example, to perform a read of at most 10 unread samples: