But this is not working - locally published samples are still received. Any clues why - is there a problem with this feature, or have I misunderstood it or used it wrongly?
I have tried placing this call at various points in the startup sequence - before or after creating the publisher and subscriber - but none has worked.
I have also tried extracting the participant key from the publication data when a sample is received, so that I could use that to filter out local messages, but have been unable to get that to work so far. The application crashes when calling get_matched_publication_data. I don't have an example and am presumably doing something wrong there.
We are using OpenDDS 3.12 with the Java bindings.
posted on Wednesday, February 21, 2018 - 03:33 pm
By the way the Java code I tried to get the publication data, within the on_data_available listener method, is:
PublicationBuiltinTopicDataHolder pubHolder = new PublicationBuiltinTopicDataHolder(new PublicationBuiltinTopicData()); int pubHandle = sih.value.publication_handle; dataReader.get_matched_publication_data(pubHolder, pubHandle);
This crashes with a protection violation on the call to get_matched_publication_data. Anyone know what is wrong with this? I couldn't find any documentation on how to use this call.
posted on Friday, April 13, 2018 - 02:29 pm
For info we subsequently found that the ignore_participant call worked as expected when OpenDDS was used with a repository connection. The above issue only occurred when used in RTPS (auto discovery) mode.
Don't know whether this is as expected, or a fault in OpenDDS, or a problem with our configuration, but anyway we found a work-around.