CoreDX DDS Modern C++ API
|
ReadCondition objects are conditions specifically dedicated to read operations and attached to one DataReader. More...
Public Member Functions | |
ReadCondition (const dds::sub::AnyDataReader &dr, const dds::sub::status::DataState &status) | |
Create a dds::sub::cond::ReadCondition associated with a DataReader. More... | |
template<typename FUN > | |
ReadCondition (const dds::sub::AnyDataReader &dr, const dds::sub::status::DataState &status, FUN &functor) | |
Create a dds::sub::cond::ReadCondition associated with a DataReader. More... | |
template<typename FUN > | |
ReadCondition (const dds::sub::AnyDataReader &dr, const dds::sub::status::DataState &status, const FUN &functor) | |
Create a dds::sub::cond::ReadCondition associated with a DataReader. More... | |
const dds::sub::status::DataState | state_filter () const |
This operation returns the set of data-states that are taken into account to determine the trigger_value of the ReadCondition. More... | |
const dds::sub::AnyDataReader & | data_reader () const |
This operation returns the DataReader associated with the ReadCondition. More... | |
Public Member Functions inherited from dds::core::cond::Condition | |
template<typename Functor > | |
void | handler (Functor &func) |
Registers a functor as custom handler with this Condition. More... | |
template<typename Functor > | |
void | handler (const Functor &func) |
Registers a functor as custom handler with this Condition. More... | |
void | reset_handler () |
Resets the handler for this Condition. More... | |
void | dispatch () |
Dispatches the functors that have been registered with the condition, if the condition is in the 'triggered' state. More... | |
bool | trigger_value () const |
This operation retrieves the trigger_value of the Condition. | |
Public Member Functions inherited from dds::core::Reference< DELEGATE > | |
Reference (dds::core::null_type &) | |
Creates a "null" reference. | |
Reference (const Reference &ref) | |
Creates a reference from another. More... | |
template<typename D > | |
Reference (const Reference< D > &ref) | |
Enables safe assignment from other reference types. More... | |
Reference (DELEGATE_T *p) | |
The following two constructors create a dds Reference from a vendor specific delegate. More... | |
~Reference () | |
Destroys a reference. | |
template<typename R > | |
bool | operator== (const R &ref) const |
Compares two reference objects and returns true if they are equal. More... | |
template<typename R > | |
bool | operator!= (const R &ref) const |
Compares two reference objects and returns true if they are not-equal. More... | |
Reference & | operator= (const null_type) |
Special assignment operators that takes care of assigning null to this reference. More... | |
bool | is_nil () const |
Returns true if this reference object is nil, meaning pointing to null. | |
bool | operator== (const null_type) const |
Special operator== used to check if this reference object equals the null reference. More... | |
bool | operator!= (const null_type nil) const |
Special operator!= used to check if this reference object does not equals the null reference. More... | |
const DELEGATE_REF_T & | delegate () const |
Returns a reference to the underlying delegate. More... | |
DELEGATE_REF_T & | delegate () |
Returns a reference to the underlying delegate. More... | |
DELEGATE * | operator-> () |
The operator->() is provided to be able to directly invoke methods on the delegate. More... | |
const DELEGATE * | operator-> () const |
The operator->() is provided to be able to directly invoke methods on the delegate. More... | |
ReadCondition objects are conditions specifically dedicated to read operations and attached to one DataReader.
ReadCondition objects allow an application to specify the data samples it is interested in (by specifying the desired sample states, view states, and instance states). See the parameter definitions for DataReader's read/take operations.) This allows the middleware 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 ReadCondition may be attached to the same DataReader.
dds::sub::cond::ReadCondition::ReadCondition | ( | const dds::sub::AnyDataReader & | dr, |
const dds::sub::status::DataState & | status | ||
) |
Create a dds::sub::cond::ReadCondition associated with a DataReader.
The ReadCondition can then be added to a dds::core::cond::WaitSet so that the application can wait for specific status changes that affect the Entity.
State Masks.
The result of the ReadCondition depends on the selection of samples determined by three masks:
dr | The DataReader to associate with the ReadCondition. |
status | A mask, which selects only those samples with the desired sample/view/instance states. |
dds::core::Exception |
dds::sub::cond::ReadCondition::ReadCondition | ( | const dds::sub::AnyDataReader & | dr, |
const dds::sub::status::DataState & | status, | ||
FUN & | functor | ||
) |
Create a dds::sub::cond::ReadCondition associated with a DataReader.
The ReadCondition can then be added to a dds::core::cond::WaitSet so that the application can wait for specific status changes that affect the Entity.
The supplied functor will be called when this ReadCondition is triggered and either the inherited dds::core::cond::Condition::dispatch() is called or the dds::core::cond::WaitSet::dispatch() on the WaitSet to which this ReadCondition is attached to.
dr | The DataReader to associate with the ReadCondition. |
status | A mask, which selects only those samples with the desired sample/view/instance states. |
functor | The functor to be called when the ReadCondition triggers. |
dds::core::Exception |
dds::sub::cond::ReadCondition::ReadCondition | ( | const dds::sub::AnyDataReader & | dr, |
const dds::sub::status::DataState & | status, | ||
const FUN & | functor | ||
) |
Create a dds::sub::cond::ReadCondition associated with a DataReader.
The ReadCondition can then be added to a dds::core::cond::WaitSet so that the application can wait for specific status changes that affect the Entity.
The supplied functor will be called when this ReadCondition is triggered and either the inherited dds::core::cond::Condition::dispatch() is called or the dds::core::cond::WaitSet::dispatch() on the WaitSet to which this ReadCondition is attached to.
dr | The DataReader to associate with the ReadCondition. |
status | A mask, which selects only those samples with the desired sample/view/instance states. |
functor | The const functor to be called when the ReadCondition triggers. |
dds::core::Exception |
const dds::sub::AnyDataReader& dds::sub::cond::ReadCondition::data_reader | ( | ) | const |
This operation returns the DataReader associated with the ReadCondition.
Note that there is exactly one DataReader associated with each ReadCondition.
dds::core::Exception |
const dds::sub::status::DataState dds::sub::cond::ReadCondition::state_filter | ( | ) | const |
This operation returns the set of data-states that are taken into account to determine the trigger_value of the ReadCondition.
These are data-states specified when the ReadCondition was created.
dds::core::Exception |