How I know that a domain is removed from network?

4 posts / 0 new
Last post
Offline
Last seen: 1 day 7 hours ago
Joined: 09/10/2022
Posts: 55
How I know that a domain is removed from network?

How can I know that a previousely created domain with any domain_id that was alive before (because there was a domain participant with that domain_id) no longer  is alive (because there is no longer any domain participant with that domain_id in the network)? How do I implement the modern c++ code to know that?

Howard's picture
Offline
Last seen: 3 days 19 min ago
Joined: 11/29/2012
Posts: 656

This isn't easy to do in general.  There is no central storage of this information provided inherently with Connext...which means you have to create your own application that monitors and keeps track of domain participants that are created and then destroyed (shutdown/crashed/etc).  You would have to create a DomainParticipant in each of the domains in which you want to monitor and use Discovery listeners to monitor the Participant Discovery channel for creation of new participants as well as when DDS thinks that a participant is dead.

You can get some example code if you seach with google (probably from RTI Community's Github page) or even ask RTI's Chatbot to generate an example for you.

Offline
Last seen: 1 day 7 hours ago
Joined: 09/10/2022
Posts: 55

Thanks mr howard. I found a solution. I use builtin data reader that gets discovery packets. And because I use multicast discovery and all domain participants send that packet every 30 seconds by default, so if I don't received any discovery packet in 40 seconds, all domain participants are died and domain is removed. I do this by just one domain paticipant in one domain id.

Howard's picture
Offline
Last seen: 3 days 19 min ago
Joined: 11/29/2012
Posts: 656

Thanks for letting the community know how you were able to do what you wanted to do!