pub unsafe extern "C" fn dds_create_querycondition(
reader: dds_entity_t,
mask: u32,
filter: dds_querycondition_filter_fn,
) -> dds_entity_tExpand description
@brief Creates a queryondition associated to the given reader. @ingroup querycondition @component data_query
The queryondition allows specifying which samples are of interest in a data reader’s history, by means of a mask and a filter. 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 and data that matches the filter, the querycondition 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 querycondition can be used to wake up a waitset when data is in the reader history with states that matches the given mask and filter.
@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). @param[in] filter Callback that the application can use to filter specific samples.
@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.