I'm working on an application using the DDS middleware. I have implemented the DataReaderListener interface due to the fact that i'm interesed on receiving liveliness notifications from datawriters. Currently it seems as if i only get notified the first time. I have also experienced the same problem with the on_requested_deadline_missed notifiation where I only receive the first deadline missed. I am sure that my Qos' are configured correctly. Is there something I have to do when my listener is invoked, to receive a notification again?
I'm using the Prismtech Opensplice middleware for my project.
Can you tell us which version of OpenSplice you are currently using? An older version of OpenSplice may still be based on the DDS 1.1 specification, where you explicitly needed to reset the status flag inside the listener callback in order to get notified of the next status event. The reason behind this is that a Listener only triggers when the status flag changes from FALSE to TRUE. If the flag is not explicitly reset, its value remains TRUE and so you do not get any further triggers.
The 1.1 version of the DDS spec states that the status flag will only be reset when you explicitly access the corresponding status struct, in your case by invoking the get_requested_deadline_missed_status() operation on your datareader. So adding a call to that operation in your listener callback probably solves your problem.
The 1.2 version of the DDS spec states that in case of a Listener callback, the status flag will automatically be reset so the explicit call to obtain the status struct is then no longer necessary. (Since the struct is already passed as a parameter, accessing it explicitly seems really silly).
I've tried the solution by invoking the get_requested_deadline_missed_status() and it works... but I would rather access the status by the passed parameter. Does V3.2.2 of the OpenSplice middleware not implement the version 1.2 of the DDS specification?