Skip to main content

dds_create_reader_rhc

Function dds_create_reader_rhc 

Source
pub unsafe extern "C" fn dds_create_reader_rhc(
    participant_or_subscriber: dds_entity_t,
    topic: dds_entity_t,
    qos: *const dds_qos_t,
    listener: *const dds_listener_t,
    rhc: *mut dds_rhc,
) -> dds_entity_t
Expand description

@brief Creates a new instance of a DDS reader with a custom history cache. @ingroup reader @component reader

This function follows the same parent-selection rules as @ref dds_create_reader. When a participant is used to create a reader for a normal topic, an implicit subscriber is created as the reader’s parent and is deleted automatically when its last child is deleted, or as part of the recursive deletion of the participant. A reader for a built-in topic uses the participant’s shared built-in subscriber instead; that subscriber is deleted when the participant is deleted.

@param[in] participant_or_subscriber The participant or subscriber on which the reader is being created. @param[in] topic The topic to read, or a built-in topic pseudo handle. @param[in] qos The QoS to set on the new reader (can be NULL). @param[in] listener Any listener functions associated with the new reader (can be NULL). @param[in] rhc Reader history cache to use, reader becomes the owner

@returns A valid reader handle or an error code.

@retval >0 A valid reader handle. @retval DDS_RETCODE_ERROR An internal error occurred. @see dds_create_reader for the full set of possible return codes.