Using DDS_ParticipantBuiltinTopicData

3 posts / 0 new
Last post
Offline
Last seen: 7 years 1 month ago
Joined: 06/10/2014
Posts: 49
Using DDS_ParticipantBuiltinTopicData

Hi,

I'm using DDS_ParticipantBuiltinTopicData to get participant ip addresses.  When I receive an ALIVE_INSTANCE_STATE sample, I save the key value from the topic along with the topic data in a hashmap. When I receive a NOT_ALIVE_DISPOSED_INSTANCE_STATE, I'm using the reader get_key_value so that I can match the dispose to a saved instance. However the topic "key" value is always 0.  Is this not a keyed field in the topic?  Is there any way to correlate a disposed sample to a previous alive sample?

Thanks,

Anne Fiore

Organization:
Gerardo Pardo's picture
Offline
Last seen: 1 month 1 week ago
Joined: 06/02/2010
Posts: 602

Hello Anne,

There appears to be a bug on how we implemented the get_key() operation for not alive samples.

The work-around would be to use the instance_handle (actually the from the SampleInfo. This contains essentially the same information as the "key" for that Topic so you can use this in the hashmap.

Gerardo

Offline
Last seen: 7 years 1 month ago
Joined: 06/10/2014
Posts: 49

Thanks that works well.

Anne