pub unsafe extern "C" fn dds_create_readcondition(
reader: dds_entity_t,
mask: u32,
) -> dds_entity_tExpand description
@brief Creates a readcondition associated to the given reader. @ingroup readcondition @component data_query
The readcondition allows specifying which samples are of interest in a data reader’s history, by means of a mask. The mask is or’d with the flags that are dds_sample_state_t, dds_view_state_t and dds_instance_state_t.
Based on the mask value set, the readcondition gets triggered when data is available on the reader.
Waitsets allow waiting for an event on some of any set of entities. This means that the readcondition can be used to wake up a waitset when data is in the reader history with states that matches the given mask.
@note The parent reader and every of its associated conditions (whether they are readconditions or queryconditions) share the same resources. This means that one of these entities reads or takes data, the states of the data will change for other entities automatically. For instance, if one reads a sample, then the sample state will become ‘read’ for all associated reader/conditions. Or if one takes a sample, then it’s not available to any other associated reader/condition.
@param[in] reader Reader to associate the condition to. @param[in] mask Interest (dds_sample_state_t|dds_view_state_t|dds_instance_state_t).
@returns A valid condition handle or an error code.
@retval >0 A valid condition handle @retval DDS_RETCODE_ERROR An internal error has occurred. @retval DDS_RETCODE_ILLEGAL_OPERATION The operation is invoked on an inappropriate object. @retval DDS_RETCODE_ALREADY_DELETED The entity has already been deleted.