Function dds_take_next

Function Documentation

dds_return_t dds_take_next(dds_entity_t reader, void **buf, dds_sample_info_t *si)

Read, copy and remove the status set for the entity.

This operation copies the next, non-previously accessed data value and corresponding sample info and removes from the data reader. As an entity, only reader is accepted.

Parameters
  • reader[in] The reader entity.

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

  • si[out] The pointer to dds_sample_info_t returned for a data value.

Return values
  • DDS_RETCODE_OK – The operation was successful.

  • DDS_RETCODE_BAD_PARAMETER – The entity parameter is not a valid parameter.

  • 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 indicating success or failure.