SubscriberGetDataReaders Method (IListDataReader, SampleStateMask, ViewStateMask, InstanceStateMask) |
Namespace: OpenDDSharp.DDS
public ReturnCode GetDataReaders( IList<DataReader> readers, SampleStateMask sampleStates, ViewStateMask viewStates, InstanceStateMask instanceStates )
If the PresentationQosPolicy of the Subscriber to which the DataReader belongs has the AccessScope set to GroupPresentationQos, this operation should only be invoked inside a BeginAccess/EndAccess block. Otherwise it will return the error PreconditionNotMet.
Depending on the setting of the PresentationQosPolicy, the returned collection of DataReader objects may be a 'set' containing each DataReader at most once in no specified order, or a 'list' containing each DataReader one or more times in a specific order.
This difference is due to the fact that, in the second situation it is required to access samples belonging to different DataReader objects in a particular order. In this case, the application should process each DataReader in the same order it appears in the 'list' and Read or Take exactly one sample from each DataReader.