question about coherent_access in presentation qos

2 posts / 0 new
Last post
Offline
Last seen: 7 years 8 months ago
Joined: 04/14/2016
Posts: 3
question about coherent_access in presentation qos

Hello, I was working with the rti-dds examples about the 'presentation' qos, when i set the publisher's and subscriber's presentation qos as access_scope = INSTANCE_PRESENTATION_QOS, coherent_access = true. And I published some data between begin_coherent_changes and end_coherent_changes, it supposed behave as the same as the coherent_access = false since the description about the access_scope = INSTANCE_PRESENTATION_QOS in DDS specification is like this "If access_scopeis set to INSTANCE, the use of begin_coherent_change and end_coherent_change has no effect on how the subscriber can access the data because with the scope limited to each instance, changes to separate instances are considered independent and thus cannot be grouped by a coherent change." But the result I get was the same as the access_scope = TOPIC_PRESENTATION_QOS, that is the samples grouped into a coherent set, the datareader read the samples when the publisher end_coherent_changes. I think this is not correct according my understand. Can anyone explains to me? Thank you!

Gerardo Pardo's picture
Offline
Last seen: 3 weeks 1 day ago
Joined: 06/02/2010
Posts: 601

Hi,

Sorry for the delayed response...

I think the confusion arises from an oveloading of the word "Subscriber".  The document you quote uses "Subscriber" as a noun, meaning the DDS Subscriber entity.  This DDS Entity contains a collection of DDS DataReader entities.  Use of API calls on the DDS Subscriber is needed when reading coherent samples with access_scope = GROUP_PRESENTATION_QOS because the collection of samples on a coherent may can contain samples belonging to different DDS DataReader entities. Therefore the only way to access them as a group is using API calls on the DDS Subscriber that contains those DDS DataReader entities.

At the same time a DDS DataReader is used to "subscribe" to data so when using "subscribe" as a verb it can be confusing...

When setting  access_scope = INSTANCE_PRESENTATION_QOS  or  access_scope = TOPIC_PRESENTATION_QOS, then the coherent changes span only samples beloging to a single DDS DataReader and therefore the begin/end coherent operations on the DDS Subscriber are not needed. The application can simply call the read/take API calls that retun sequences on the DataReader and the DDS DataReader will make sure the samples are delivered in coherent sets.  

Gerardo