I trying to figure out which instance in a topic missed its deadline.
Given a system with topic t and intances t1 and t2, where DeadlineQosPolicy is configured and the subscriber has Registered the REQUESTED_DEADLINE_MISSED_STATUS and implemented the on_requested_deadline_missed method.
In my current implementation whenever I get notified on a missed deadline(at the subscriber and publisher ends), the last_instance_handle is always 0, no matter which instance (t1 or t1) in topic t missed its deadline.
Am I using the last_intance_handle in a wrong way? Is their something I have to do before the last_instance_handle can be used to detect which instance(t1 or t2) in topic t triggered the on_requested_deadline_missed method?
You do not use the deadline mechanism in a wrong way: the last_instance_handle parameter is meant to do exactly what you want it to: identifying the instance for which the deadline has been missed. Probably you encountered an omission in the product you are using. Please contact the support office of your DDS vendor for the details of the issue and for potential fixes.