18.1.4.5. ReadCondition

class ReadCondition : public eprosima::fastdds::dds::Condition

A Condition 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). The condition will only be triggered 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.

Public Functions

virtual bool get_trigger_value() const noexcept override

Retrieves the trigger_value of the Condition.

Returns

true if trigger_value is set to ‘true’, ‘false’ otherwise

DataReader *get_datareader() const noexcept

Retrieves the DataReader associated with the ReadCondition.

Note that there is exactly one DataReader associated with each ReadCondition.

Returns

pointer to the DataReader associated with this ReadCondition.

SampleStateMask get_sample_state_mask() const noexcept

Retrieves the set of sample_states taken into account to determine the trigger_value of this condition.

Returns

the sample_states specified when the ReadCondition was created.

ViewStateMask get_view_state_mask() const noexcept

Retrieves the set of view_states taken into account to determine the trigger_value of this condition.

Returns

the view_states specified when the ReadCondition was created.

InstanceStateMask get_instance_state_mask() const noexcept

Retrieves the set of instance_states taken into account to determine the trigger_value of this condition.

Returns

the instance_states specified when the ReadCondition was created.