Hi,
I've been investigating using partitions as a way to identify our data. If I use a string that identifies the location of the publisher like "Room_302" and my subscriber partition is "Room_*" is there a way that the reader can parse the publisher partition string to determine that the sample was published by Room 302? I haven't seen any reader methods that have the partition strings of the publisher.
Thanks,
Anne Fiore
I have done this by retrieving the publication data of the writer of the sample which can be found from the publication handle in the sample info. Something like the following:
DDS_ParticipantBuiltinTopicData participant_data;
reader->get_matched_publication_participant_data( participant_data, sample_info.publication_handle );
DDS_PublicationBuiltinTopicData publication_data;
reader->get_matched_publication_data( publication_data, info[i].publication_handle );
cout << publication_data.partition.name[0];
Thanks very much. This worked.