Skip to main content

dds_get_matched_subscriptions

Function dds_get_matched_subscriptions 

Source
pub unsafe extern "C" fn dds_get_matched_subscriptions(
    writer: dds_entity_t,
    rds: *mut dds_instance_handle_t,
    nrds: usize,
) -> dds_return_t
Expand description

@brief Get instance handles of the data readers matching a writer @ingroup builtintopic @component writer

This operation fills the provided array with the instance handles of the data readers that match the writer. On successful output, the number of entries of “rds” set is the minimum of the return value and the value of “nrds”.

@param[in] writer The writer. @param[in] rds The array to be filled. @param[in] nrds The size of the rds array, at most the first nrds entries will be filled. rds = NULL and nrds = 0 is a valid way of determining the number of matched readers, but inefficient compared to relying on the matched publication status.

@returns A dds_return_t indicating the number of matched readers or failure. The return value may be larger than nrds if there are more matching readers than the array can hold.

@retval >=0 The number of matching readers. @retval DDS_RETCODE_BAD_PARAMETER The entity parameter is not valid or rds = NULL and nrds > 0. @retval DDS_RETCODE_ILLEGAL_OPERATION The operation is invoked on an inappropriate object.