Skip to main content

dds_read_instance_mask

Function dds_read_instance_mask 

Source
pub unsafe extern "C" fn dds_read_instance_mask(
    reader_or_condition: dds_entity_t,
    buf: *mut *mut c_void,
    si: *mut dds_sample_info_t,
    bufsz: usize,
    maxs: u32,
    handle: dds_instance_handle_t,
    mask: u32,
) -> dds_return_t
Expand description

@brief Read data for a specific instance matching sample/view/instance states from the data reader, read or query condition @ingroup reading @component read_data

See @ref dds_read. The matching criterion referred to there is that:

  • the instance handle must equal the handle parameter; and
  • the sample/view/instance states must match the specification in the mask parameter.

If the sample/view/instance state component in the mask is 0 and reader_or_condition references a data reader (as opposed to a read or query condition), it is treated as equivalent to any sample/view/instance state. If reader_or_condition references a read or query condition, the matching states are the union of mask and the condition’s mask.

@param[in] reader_or_condition Reader, readcondition or querycondition entity. @param[in,out] buf An array of bufsz pointers to samples. @param[out] si Pointer to an array of @ref dds_sample_info_t returned for each data value. @param[in] bufsz The size of buffer provided. @param[in] maxs Maximum number of samples to read. @param[in] handle Instance handle related to the samples to read. @param[in] mask Filter the data based on dds_sample_state_t|dds_view_state_t|dds_instance_state_t.

@returns A dds_return_t with the number of samples read or an error code.

@retval >=0 Number of samples read. @retval DDS_RETCODE_ERROR An internal error has occurred. @retval DDS_RETCODE_BAD_PARAMETER One of the given arguments is not valid. @retval DDS_RETCODE_ILLEGAL_OPERATION The operation is invoked on an inappropriate object. @retval DDS_RETCODE_ALREADY_DELETED The entity has already been deleted. @retval DDS_RETCODE_PRECONDITION_NOT_MET The instance handle has not been registered with this reader.