Skip to main content

dds_reader_store_loaned_sample

Function dds_reader_store_loaned_sample 

Source
pub unsafe extern "C" fn dds_reader_store_loaned_sample(
    reader: dds_entity_t,
    data: *mut dds_loaned_sample_t,
) -> dds_return_t
Expand description

@brief insert data from a loaned sample into the reader history cache @ingroup reading

Constructs a serdata of the reader’s type from the loaned sample and stores it in the reader’s history cache. If the serdata references the loan, dds_loaned_sample_ref is used to increment its reference count.

If data is not from a known writer, this is a no-op.

@param[in] reader The reader entity. @param[in] data Pointer to the loaned sample of the entity received

@returns A dds_return_t indicating success or failure.

@retval DDS_RETCODE_OK The operation was successful. @retval DDS_RETCODE_BAD_PARAMETER One or more parameters are invalid. @retval DDS_RETCODE_ILLEGAL_OPERATION The operation is invoked on an inappropriate object. @retval DDS_RETCODE_ALREADY_DELETED The reader entity has already been deleted.