Function dds_get_matched_subscription_data

Function Documentation

dds_builtintopic_endpoint_t *dds_get_matched_subscription_data(dds_entity_t writer, dds_instance_handle_t ih)

Get a description of a reader matched with the provided writer.

This operation looks up the reader instance handle in the set of readers matched with the specified writer, returning a freshly allocated sample of the DCPSSubscription built-in topic if found, and NULL if not. The caller is responsible for freeing the memory allocated, e.g. using dds_builtintopic_free_endpoint.

This operation is similar to performing a read of the given instance handle on a reader of the DCPSSubscription built-in topic, but this operation additionally filters on whether the reader is matched by the provided writer.

Parameters
  • writer[in] The writer.

  • ih[in] The instance handle of a reader.

Return values
  • != – NULL The requested data

  • NULL – The writer is not valid or ih is not an instance handle of a matched reader.

Returns

A newly allocated sample containing the information on the reader, or a NULL pointer for any kind of failure.