RTI Connext Modern C++ API
Version 5.2.0
|
<<reference-type>> Condition specifically dedicated to read operations and attached to one dds::sub::DataReader. More...
#include <dds/sub/cond/ReadCondition.hpp>
Public Member Functions | |
template<typename T > | |
ReadCondition (const dds::sub::DataReader< T > &reader, const dds::sub::status::DataState &status) | |
Creates a ReadCondition. | |
template<typename T , typename Functor > | |
ReadCondition (const dds::sub::DataReader< T > &reader, const dds::sub::status::DataState &status, const Functor &handler) | |
Creates a ReadCondition with a handler. | |
const dds::sub::status::DataState | state_filter () const |
Returns the DataState of this condition. | |
const AnyDataReader & | data_reader () const |
Returns the DataReader associated to this condition. | |
Public Member Functions inherited from dds::core::cond::Condition | |
void | dispatch () |
Dispatches the functors that have been registered with the condition. | |
bool | trigger_value () const |
This operation retrieves the trigger_value of the Condition. | |
<<reference-type>> Condition specifically dedicated to read operations and attached to one dds::sub::DataReader.
dds::sub::cond::ReadCondition objects allow an application to specify the data samples it is interested in (by specifying the desired sample_states
, view_states
as well as instance_states
in dds::sub::DataReader::read and dds::sub::DataReader::take variants.
This allows RTI Connext to enable the condition only when suitable information is available. They are to be used in conjunction with a WaitSet as normal conditions.
More than one dds::sub::cond::ReadCondition may be attached to the same dds::sub::DataReader.
|
inline |
Creates a ReadCondition.
T | The topic-type of the DataReader. |
reader | The reader associated to the condition. One reader can have multiple ReadConditions but one ReadCondition belongs to exactly one DataReader. |
status | The sample, view and instance states of interest. |
|
inline |
Creates a ReadCondition with a handler.
T | The topic-type of the DataReader. |
Functor | Any type whose instances that can be called with a no-argument function call (i.e. f() , if f is an instance of Functor ). Examples are functions, types that override the operator() , and lambdas <<C++11>>. The return type has to be void . |
reader | The reader associated to the condition. One reader can have multiple ReadConditions but one ReadCondition belongs to exactly one DataReader. |
status | The sample, view and instance states of interest. |
handler | The handler that dds::core::cond::WaitSet::dispatch() will call when the condition is triggered. |
The following example creates a ReadCondition with a lambda handler:
|
inline |
Returns the DataState of this condition.
|
inline |
Returns the DataReader associated to this condition.
To obtain the actual typed DataReader, see AnyDataReader::get()