Hello @All,
I have a general question regarding the creation of listeners.
Lets assume I assign data reader listener (AnyReaderListener()) to e.g. a participant like follows:
dds.DomainParticipant(domain_id, participant_qos, AnyListener())
Does that automatically mean that every data Reader within this participant will be assigned with the AnyReaderListener()?
Best Regards,
Marc
I don't believe that you can assign a DataReaderListener to a DomainParticipant.
DomainParticipants use DomainParticipantListeners, which derive from PublisherListener/SubscriberListener/TopicListener (multiple inheritance) and PublisherListener derives from DataWriterListener and SubscriberListener derives from DataReaderListener.
So, in short, you would need to create your own class derived from
rti.connextdds.
NoOpDomainParticipantListener
Hello Howard,
Thanks for the reply!
Colud you explain me what is the difference between NoOpDataReaderListener and NoOpAnyDataReaderListener?
Regards,
Marc
Don't use the NoOpAnyDataReaderListener. The AnyDataReader is really an internal implementation detail and is being redesigned in the next version of the API to be released in 2023. The NoOpDataReaderListener should be the way to go.