Jump to content
OpenSplice DDS Forum

Number / Last Participant

Recommended Posts


We have an system split into two parts, a central processing application and one or more GUIs. 

We'd like to exit the central application when the last GUI is closed. We already have and appropriate message, to instigate the shutdown.

Obviously we could keep a count of the number of connected GUIs, in the central application. Another option would be to use a heartbeat Topic. These aren't very neat solutions and we'd like to do this without changing the GUI.

What I'd ideally like is to be able to detect the number of / last GUI participant. Happy to do this by checking some property of the participant / subscriber / publisher etc. I've been trawling the API  to try and find something, but have not had any success yet.

Has anyone got any ideas?



Share this post

Link to post
Share on other sites

Hi ,

Check out dds_publication_matched_status or dds_subscription_matched_status .

While the connection was changed , the callback will trigger and you can get current_count variable to know how many data reader or data writer is connecting .

Share this post

Link to post
Share on other sites


Another option is to exploit the notion of 'built-in-topics' in DDS that allow you to 'discover' any participant/publisher/subscriber/topic in the system by simply reading this meta-data from these pre-defined topics. In the OpenSplice examples-section I believe there is an example on how to do that ..



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now