The following DataWriter operations can be used to get information on the DataReaders that are currently associated with the DataWriter (that is, the DataReaders to which Connext DDS will send the data written by the DataWriter).
get_matched_subscriptions() will return a sequence of handles to matched DataReaders. You can use these handles in the get_matched_subscription_data() method to get information about the DataReader such as the values of its QosPolicies.
get_matched_subscription_locators() retrieves a list of locators for subscriptions currently "associated" with the DataWriter. Matched subscription locators include locators for all those subscriptions in the same DDS domain that have a matching Topic, compatible QoS, and a common partition that the DomainParticipant has not indicated should be "ignored." These are the locators that Connext DDS uses to communicate with matching DataReaders. (See Locator Format.)
Note: In the Modern C++ API these operations are freestanding functions in the dds::pub or rti::pub namespaces.
You can also get the DATA_WRITER_PROTOCOL_STATUS for matching subscriptions with these operations (see DATA_WRITER_PROTOCOL_STATUS):
Notes:
See also: Finding the Matching Subscription’s ParticipantBuiltinTopicData
get_matched_subscription_participant_data() allows you to get the DDS_ParticipantBuiltinTopicData (see ) of a matched subscription using a subscription handle.
This operation retrieves the information on a discovered DomainParticipant associated with the subscription that is currently matching with the DataWriter.The subscription handle passed into this operation must correspond to a subscription currently associated with the DataWriter. Otherwise, the operation will fail with RETCODE_BAD_PARAMETER. The operation may also fail with RETCODE_PRECONDITION_NOT_MET if the subscription corresponds to the same DomainParticipant to which the DataWriter belongs.
Use get_matched_subscriptions() (see Finding Matching Subscriptions) to find the subscriptions that are currently matched with the DataWriter.
These operations are useful for obtaining a handle to various related Entities:
get_publisher() returns the Publisher that created the DataWriter. get_topic() returns the Topic with which the DataWriter is associated.
© 2016 RTI