posted on Wednesday, April 02, 2008 - 09:04 am
This may sound too elemantary for you guys but, I would like to know if there is a built-in ID for every DDS topic by which one can identify the entity uniquely. I came across to get_instance_handle but could not be sure of it since I am a newbie.
Every topic created in a DDS Domain is represented by a so called builtin-topic, that describes its name, its datatype, its Qos settings and some other stuff. The keyfields of this builtin-topic sample are guaranteed to be unique in your DDS Domain.
These builtin topic samples can be accessed using the DCPSTopicDataReader in the builtin Subscriber. Every sample accessed this way is accompanied by an instance_handle that makes that sample unique within that specific DCPSTopicDataReader. The handle can only be used in the context of that specific DataReader instance, and has no meaning in another DCPSTopicDataReader instance.
The handle you receive when invoking the get_instance_handle() operation on the Topic object is the instance_handle that corresponds to the builtin topic sample that describes the state of that Topic object within the DCPSTopicDataReader of your builtin Subscriber. The instance_handle you receive that way is therefore only unique within your builtin Subscriber and thus your own DomainParticipant: not within the rest of the Domain. However, the keyfields in your builtin topic sample are unique throughout the entire Domain.
posted on Wednesday, April 02, 2008 - 09:33 am
Sorry, I asked the wrong question. I wonder if every INSTANCE is uniquely identified, not if a topic is identified uniquely.
so the answer to the question would be YES: a topic-instance is uniquely identified by the value of its key-field(s)
posted on Friday, December 11, 2009 - 07:52 pm
Hi Hans, can you please explain me how exactly we will combine the received topics in our application to make a complete structure for our use.The problem is that the topics that are going to be used to make complete structure will be received at different time and in different methods(say listener)? How will i come to know that my structure is completely filled i.e. all topics have been copied to structure?