a sample problem

3 posts / 0 new
Last post
Offline
Last seen: 2 days 21 hours ago
Joined: 01/13/2016
Posts: 58
a sample problem

if a app have both datawriter and datareader for same topic, it turns out that the datareader will receive sample sent by the datawriter, how to prevent that? how to make sure that the datareader will receive sample from other apps?

Offline
Last seen: 11 months 2 weeks ago
Joined: 02/11/2016
Posts: 144

Hey,

Generally speaking the data reader will receive samples written from all of the data writers for that topic (as long as there's a match).

You can filter out messages sent by this specific data writer in various ways:

You can do it on a participant level: telling your participant to ignore itself (thus preventing any data writer created by this participant to send data to readers created by this participant).

A guide to do that is in the following link: https://community.rti.com/kb/how-do-i-get-datareader-ignore-datawriter-belongs-same-domainparticipant

A subtler prevention method (albeit a more complicated one) would be to keep the identifier of either the participant, the publisher, or the data writer itself and use it to filter out messages received by the data reader.
Explanation on how to get the guid (gloubally unique id, which will allow you to filter out messages) of local entities is found in the following link: https://community.rti.com/kb/accessing-guid-connext-dds-entities

 

I hope this helps,

Roy.

Offline
Last seen: 2 days 21 hours ago
Joined: 01/13/2016
Posts: 58

thanks for you answer, it did helps.