Function dds_read_mask_wl

Function Documentation

dds_return_t dds_read_mask_wl(dds_entity_t reader_or_condition, void **buf, dds_sample_info_t *si, uint32_t maxs, uint32_t mask)

Access and read loaned samples of data reader, readcondition or querycondition based on mask.

When using a readcondition or querycondition, their masks are or’d with the given mask.

After dds_read_mask_wl function is being called and the data has been handled, dds_return_loan function must be called to possibly free memory

Parameters
  • reader_or_condition[in] Reader, readcondition or querycondition entity.

  • buf[out] An array of pointers to samples into which data is read (pointers can be NULL).

  • si[out] Pointer to an array of dds_sample_info_t returned for each data value.

  • maxs[in] Maximum number of samples to read.

  • mask[in] Filter the data based on dds_sample_state_t|dds_view_state_t|dds_instance_state_t.

Return values
  • >=0 – Number of samples read.

  • DDS_RETCODE_ERROR – An internal error has occurred.

  • DDS_RETCODE_BAD_PARAMETER – One of the given arguments is not valid.

  • DDS_RETCODE_ILLEGAL_OPERATION – The operation is invoked on an inappropriate object.

  • DDS_RETCODE_ALREADY_DELETED – The entity has already been deleted.

Returns

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