@@ -75,6 +75,12 @@ class ReadConditionImpl;
7575
7676} // namespace detail
7777
78+ namespace builtin {
79+
80+ struct PublicationBuiltinTopicData ;
81+
82+ } // namespace builtin
83+
7884/* *
7985 * Class DataReader, contains the actual implementation of the behaviour of the Subscriber.
8086 * @ingroup FASTDDS_MODULE
@@ -237,6 +243,31 @@ class DataReaderImpl
237243 ReturnCode_t get_subscription_matched_status (
238244 SubscriptionMatchedStatus& status);
239245
246+ /* *
247+ * @brief Retrieves in a publication associated with the DataWriter
248+ *
249+ * @param[out] publication_data publication data struct
250+ * @param publication_handle InstanceHandle_t of the publication
251+ * @return RETCODE_BAD_PARAMETER if the DataReader is not matched with
252+ * the given publication handle, RETCODE_OK otherwise.
253+ *
254+ */
255+ ReturnCode_t get_matched_publication_data (
256+ builtin::PublicationBuiltinTopicData& publication_data,
257+ const fastrtps::rtps::InstanceHandle_t& publication_handle) const ;
258+
259+ /* *
260+ * @brief Fills the given vector with the InstanceHandle_t of matched DataReaders
261+ *
262+ * @param[out] publication_handles Vector where the InstanceHandle_t are returned
263+ * @return RETCODE_OK if the operation succeeds.
264+ *
265+ * @note Returning an empty list is not an error, it returns RETCODE_OK.
266+ *
267+ */
268+ ReturnCode_t get_matched_publications (
269+ std::vector<InstanceHandle_t>& publication_handles) const ;
270+
240271 ReturnCode_t get_requested_deadline_missed_status (
241272 fastrtps::RequestedDeadlineMissedStatus& status);
242273
0 commit comments