OpenSplice C# API  v6.x
OpenSplice C# Data Distribution Service Data-Centric Publish-Subscribe API
Space.FooDataReader Class Reference

A DataReader allows the application to access published sample data. More...

Inheritance diagram for Space.FooDataReader:
Inheritance graph
Collaboration diagram for Space.FooDataReader:
Collaboration graph

Public Member Functions

DDS.ReturnCode GetKeyValue (ref Foo key, DDS.InstanceHandle instanceHandle)
 This operation retrieves the key value of a specific instance. More...
 
DDS.InstanceHandle LookupInstance (Foo instance)
 This operation returns the handle which corresponds to the instance data. More...
 
DDS.ReturnCode Read (ref Foo[] dataValues, ref DDS.SampleInfo[] sampleInfos)
 This operation reads an array of typed samples from the DataReader. More...
 
DDS.ReturnCode Read (ref Foo[] dataValues, ref DDS.SampleInfo[] sampleInfos, int maxSamples)
 This operation reads an array of typed samples from the DataReader. More...
 
DDS.ReturnCode Read (ref Foo[] dataValues, ref DDS.SampleInfo[] sampleInfos, DDS.SampleStateKind sampleStates, DDS.ViewStateKind viewStates, DDS.InstanceStateKind instanceStates)
 This operation reads an array of typed samples from the DataReader. More...
 
DDS.ReturnCode Read (ref Foo[] dataValues, ref DDS.SampleInfo[] sampleInfos, int maxSamples, DDS.SampleStateKind sampleStates, DDS.ViewStateKind viewStates, DDS.InstanceStateKind instanceStates)
 This operation reads an array of typed samples from the DataReader. More...
 
DDS.ReturnCode ReadInstance (ref Foo[] dataValues, ref DDS.SampleInfo[] sampleInfos, DDS.InstanceHandle instanceHandle)
 This operation reads an array of typed samples from the DataReader. More...
 
DDS.ReturnCode ReadInstance (ref Foo[] dataValues, ref DDS.SampleInfo[] sampleInfos, int maxSamples, DDS.InstanceHandle instanceHandle)
 This operation reads an array of typed samples from the DataReader. More...
 
DDS.ReturnCode ReadInstance (ref Foo[] dataValues, ref DDS.SampleInfo[] sampleInfos, int maxSamples, DDS.InstanceHandle instanceHandle, DDS.SampleStateKind sampleStates, DDS.ViewStateKind viewStates, DDS.InstanceStateKind instanceStates)
 This operation reads an array of typed samples from the DataReader. More...
 
DDS.ReturnCode ReadNextInstance (ref Foo[] dataValues, ref DDS.SampleInfo[] sampleInfos, DDS.InstanceHandle instanceHandle)
 This operation reads an array of typed samples from the DataReader. More...
 
DDS.ReturnCode ReadNextInstance (ref Foo[] dataValues, ref DDS.SampleInfo[] sampleInfos, int maxSamples, DDS.InstanceHandle instanceHandle)
 This operation reads an array of typed samples from the DataReader. More...
 
DDS.ReturnCode ReadNextInstance (ref Foo[] dataValues, ref DDS.SampleInfo[] sampleInfos, int maxSamples, DDS.InstanceHandle instanceHandle, DDS.SampleStateKind sampleStates, DDS.ViewStateKind viewStates, DDS.InstanceStateKind instanceStates)
 This operation reads an array of typed samples from the DataReader. More...
 
DDS.ReturnCode ReadNextInstanceWithCondition (ref Foo[] dataValues, ref DDS.SampleInfo[] sampleInfos, DDS.InstanceHandle instanceHandle, DDS.IReadCondition readCondition)
 This operation reads an array of typed samples from the DataReader. More...
 
DDS.ReturnCode ReadNextInstanceWithCondition (ref Foo[] dataValues, ref DDS.SampleInfo[] sampleInfos, int maxSamples, DDS.InstanceHandle instanceHandle, DDS.IReadCondition readCondition)
 This operation reads an array of typed samples from the DataReader. More...
 
DDS.ReturnCode ReadNextSample (ref Foo dataValue, ref DDS.SampleInfo sampleInfo)
 This operation reads an array of typed samples from the DataReader. More...
 
DDS.ReturnCode ReadWithCondition (ref Foo[] dataValues, ref DDS.SampleInfo[] sampleInfos, DDS.IReadCondition readCondition)
 This operation reads an array of typed samples from the DataReader. More...
 
DDS.ReturnCode ReadWithCondition (ref Foo[] dataValues, ref DDS.SampleInfo[] sampleInfos, int maxSamples, DDS.IReadCondition readCondition)
 This operation reads an array of typed samples from the DataReader. More...
 
DDS.ReturnCode ReturnLoan (ref Foo[] dataValues, ref DDS.SampleInfo[] sampleInfos)
 This operation indicates to the DataReader that the application is done accessing the dataValues and sampleInfos arrays. More...
 
DDS.ReturnCode Take (ref Foo[] dataValues, ref DDS.SampleInfo[] sampleInfos)
 This operation takes an array of typed samples from the DataReader. More...
 
DDS.ReturnCode Take (ref Foo[] dataValues, ref DDS.SampleInfo[] sampleInfos, int maxSamples)
 This operation takes an array of typed samples from the DataReader. More...
 
DDS.ReturnCode Take (ref Foo[] dataValues, ref DDS.SampleInfo[] sampleInfos, DDS.SampleStateKind sampleStates, DDS.ViewStateKind viewStates, DDS.InstanceStateKind instanceStates)
 This operation takes an array of typed samples from the DataReader. More...
 
DDS.ReturnCode Take (ref Foo[] dataValues, ref DDS.SampleInfo[] sampleInfos, int maxSamples, DDS.SampleStateKind sampleStates, DDS.ViewStateKind viewStates, DDS.InstanceStateKind instanceStates)
 This operation takes an array of typed samples from the DataReader. More...
 
DDS.ReturnCode TakeInstance (ref Foo[] dataValues, ref DDS.SampleInfo[] sampleInfos, DDS.InstanceHandle instanceHandle)
 This operation takes an array of typed samples from the DataReader. More...
 
DDS.ReturnCode TakeInstance (ref Foo[] dataValues, ref DDS.SampleInfo[] sampleInfos, int maxSamples, DDS.InstanceHandle instanceHandle)
 This operation takes an array of typed samples from the DataReader. More...
 
DDS.ReturnCode TakeInstance (ref Foo[] dataValues, ref DDS.SampleInfo[] sampleInfos, int maxSamples, DDS.InstanceHandle instanceHandle, DDS.SampleStateKind sampleStates, DDS.ViewStateKind viewStates, DDS.InstanceStateKind instanceStates)
 This operation takes an array of typed samples from the DataReader. More...
 
DDS.ReturnCode TakeNextInstance (ref Foo[] dataValues, ref DDS.SampleInfo[] sampleInfos, DDS.InstanceHandle instanceHandle)
 This operation takes an array of typed samples from the DataReader. More...
 
DDS.ReturnCode TakeNextInstance (ref Foo[] dataValues, ref DDS.SampleInfo[] sampleInfos, int maxSamples, DDS.InstanceHandle instanceHandle)
 This operation takes an array of typed samples from the DataReader. More...
 
DDS.ReturnCode TakeNextInstance (ref Foo[] dataValues, ref DDS.SampleInfo[] sampleInfos, int maxSamples, DDS.InstanceHandle instanceHandle, DDS.SampleStateKind sampleStates, DDS.ViewStateKind viewStates, DDS.InstanceStateKind instanceStates)
 This operation takes an array of typed samples from the DataReader. More...
 
DDS.ReturnCode TakeNextInstanceWithCondition (ref Foo[] dataValues, ref DDS.SampleInfo[] sampleInfos, DDS.InstanceHandle instanceHandle, DDS.IReadCondition readCondition)
 This operation takes an array of typed samples from the DataReader. More...
 
DDS.ReturnCode TakeNextInstanceWithCondition (ref Foo[] dataValues, ref DDS.SampleInfo[] sampleInfos, int maxSamples, DDS.InstanceHandle instanceHandle, DDS.IReadCondition readCondition)
 This operation takes an array of typed samples from the DataReader. More...
 
DDS.ReturnCode TakeNextSample (ref Foo dataValue, ref DDS.SampleInfo sampleInfo)
 This operation takes an array of typed samples from the DataReader. More...
 
DDS.ReturnCode TakeWithCondition (ref Foo[] dataValues, ref DDS.SampleInfo[] sampleInfos, DDS.IReadCondition readCondition)
 This operation takes an array of typed samples from the DataReader. More...
 
DDS.ReturnCode TakeWithCondition (ref Foo[] dataValues, ref DDS.SampleInfo[] sampleInfos, int maxSamples, DDS.IReadCondition readCondition)
 This operation takes an array of typed samples from the DataReader. More...
 
- Public Member Functions inherited from DDS.IDataReader
IQueryCondition CreateQueryCondition (string queryExpression, params string[] queryParameters)
 This operation creates a new IQueryCondition for the IDataReader. More...
 
IQueryCondition CreateQueryCondition (SampleStateKind sampleStates, ViewStateKind viewStates, InstanceStateKind instanceStates, string queryExpression, params string[] queryParameters)
 This operation creates a new IQueryCondition for the IDataReader. More...
 
IReadCondition CreateReadCondition ()
 This operation creates a new IReadCondition for the IDataReader. More...
 
IReadCondition CreateReadCondition (SampleStateKind sampleStates, ViewStateKind viewStates, InstanceStateKind instanceStates)
 This operation creates a new IReadCondition for the IDataReader. More...
 
ReturnCode DeleteContainedEntities ()
 This operation deletes all the IEntity objects that were created by means of one of the Create operations on the IDataReader. More...
 
ReturnCode DeleteReadCondition (IReadCondition condition)
 This operation deletes a IReadCondition or IQueryCondition which is attached to the IDataReader. More...
 
ReturnCode GetKeyValue (ref< data > key, InstanceHandle handle)
 This operation retrieves the key value of a specific instance (abstract). More...
 
ReturnCode GetLivelinessChangedStatus (ref LivelinessChangedStatus status)
 This operation obtains the LivelinessChangedStatus struct of the IDataReader. More...
 
ReturnCode GetMatchedPublicationData (ref PublicationBuiltinTopicData publicationData, InstanceHandle publicationHandle)
 This operation retrieves information on the specified publication that is currently “associated” with the IDataReader. More...
 
ReturnCode GetMatchedPublications (ref InstanceHandle[] publicationHandles)
 This operation retrieves the list of publications currently "associated" with the DataReader. More...
 
ReturnCode GetQos (ref DataReaderQos qos)
 This operation allows access to the existing set of QoS policies for a IDataReader. More...
 
ReturnCode GetRequestedDeadlineMissedStatus (ref RequestedDeadlineMissedStatus status)
 This operation obtains the DDS.RequestedDeadlineMissedStatus struct of the IDataReader. More...
 
ReturnCode GetRequestedIncompatibleQosStatus (ref RequestedIncompatibleQosStatus status)
 This operation obtains the DDS.RequestedIncompatibleQosStatus struct of the IDataReader. More...
 
ReturnCode GetSampleLostStatus (ref SampleLostStatus status)
 This operation obtains the DDS.SampleLostStatus struct of the IDataReader. More...
 
ReturnCode GetSampleRejectedStatus (ref SampleRejectedStatus status)
 This operation obtains the DDS.SampleRejectedStatus of the IDataReader. More...
 
ReturnCode GetSubscriptionMatchedStatus (ref SubscriptionMatchedStatus status)
 This operation obtains the DDS.SubscriptionMatchedStatus struct of the IDataReader. More...
 
ITopicDescription GetTopicDescription ()
 This operation returns the DDS.ITopicDescription which is associated with the IDataReader. More...
 
InstanceHandle LookupInstance (< data > instance)
 This operation returns the handle which corresponds to the instance data (abstract). More...
 
ReturnCode Read (ref< data >[] dataValues, ref SampleInfo[] sampleInfos)
 This operation reads an array of typed samples from the DataReader (abstract). More...
 
ReturnCode Read (ref< data > dataValues, ref SampleInfo[] sampleInfos, int maxSamples)
 This operation reads an array of typed samples from the DataReader (abstract). More...
 
ReturnCode Read (ref< data >[] dataValues, ref SampleInfo[] sampleInfos, SampleStateKind sampleStates, ViewStateKind viewStates, InstanceStateKind instanceStates)
 This operation reads an array of typed samples from the DataReader (abstract). More...
 
ReturnCode Read (ref< data >[] dataValues, ref SampleInfo[] sampleInfos, int maxSamples, SampleStateKind sampleStates, ViewStateKind viewStates, InstanceStateKind instanceStates)
 This operation reads an array of typed samples from the DataReader (abstract). More...
 
ReturnCode ReadInstance (ref< data >[] dataValues, ref SampleInfo[] sampleInfos, InstanceHandle instanceHandle)
 This operation reads an array of typed samples from the DataReader (abstract). More...
 
ReturnCode ReadInstance (ref< data >[] dataValues, ref SampleInfo[] sampleInfos, int maxSamples, InstanceHandle instanceHandle)
 This operation reads an array of typed samples from the DataReader (abstract). More...
 
ReturnCode ReadInstance (ref< data >[] dataValues, ref SampleInfo[] sampleInfos, int maxSamples, InstanceHandle instanceHandle, SampleStateKind sampleStates, ViewStateKind viewStates, InstanceStateKind instanceStates)
 This operation reads an array of typed samples from the DataReader (abstract). More...
 
ReturnCode ReadNextInstance (ref< data >[] dataValues, ref SampleInfo[] sampleInfos, InstanceHandle instanceHandle)
 This operation reads an array of typed samples from the DataReader (abstract). More...
 
ReturnCode ReadNextInstance (ref< data >[] dataValues, ref SampleInfo[] sampleInfos, int maxSamples, InstanceHandle instanceHandle)
 This operation reads an array of typed samples from the DataReader (abstract). More...
 
ReturnCode ReadNextInstance (ref< data >[] dataValues, ref SampleInfo[] sampleInfos, int maxSamples, InstanceHandle instanceHandle, SampleStateKind sampleStates, ViewStateKind viewStates, InstanceStateKind instanceStates)
 This operation reads an array of typed samples from the DataReader (abstract). More...
 
ReturnCode ReadNextInstanceWithCondition (ref< data >[] dataValues, ref SampleInfo[] sampleInfos, InstanceHandle instanceHandle, IReadCondition readCondition)
 This operation reads an array of typed samples from the DataReader (abstract). More...
 
ReturnCode ReadNextInstanceWithCondition (ref< data >[] dataValues, ref SampleInfo[] sampleInfos, int maxSamples, InstanceHandle instanceHandle, IReadCondition readCondition)
 This operation reads an array of typed samples from the DataReader (abstract). More...
 
ReturnCode ReadWithCondition (ref< data >[] dataValues, ref SampleInfo[] sampleInfos, IReadCondition readCondition)
 This operation reads an array of typed samples from the DataReader (abstract). More...
 
ReturnCode ReadWithCondition (ref< data >[] dataValues, ref SampleInfo[] sampleInfos, int maxSamples, IReadCondition readCondition)
 This operation reads an array of typed samples from the DataReader (abstract). More...
 
ReturnCode ReturnLoan (ref< data >[] dataValues, ref SampleInfo[] sampleInfos)
 This operation indicates to the DataReader that the application is done accessing the dataValues and sampleInfos arrays (abstract). More...
 
ReturnCode SetListener (IDataReaderListener listener, StatusKind mask)
 This operation attaches a IDataReaderListener to the IDataReader. More...
 
ReturnCode SetQos (DataReaderQos qos)
 This operation replaces the existing set of QosPolicy settings for a IDataReader. More...
 
ReturnCode Take (ref< data >[] dataValues, ref SampleInfo[] sampleInfos)
 This operation takes an array of typed samples from the DataReader (abstract). More...
 
ReturnCode Take (ref< data >[] dataValues, ref SampleInfo[] sampleInfos, int maxSamples)
 This operation takes an array of typed samples from the DataReader (abstract). More...
 
ReturnCode Take (ref< data >[] dataValues, ref SampleInfo[] sampleInfos, SampleStateKind sampleStates, ViewStateKind viewStates, InstanceStateKind instanceStates)
 This operation takes an array of typed samples from the DataReader (abstract). More...
 
ReturnCode Take (ref< data >[] dataValues, ref SampleInfo[] sampleInfos, int maxSamples, SampleStateKind sampleStates, ViewStateKind viewStates, InstanceStateKind instanceStates)
 This operation takes an array of typed samples from the DataReader (abstract). More...
 
ReturnCode TakeInstance (ref< data >[] dataValues, ref SampleInfo[] sampleInfos, InstanceHandle instanceHandle)
 This operation takes an array of typed samples from the DataReader (abstract). More...
 
ReturnCode TakeInstance (ref< data >[] dataValues, ref SampleInfo[] sampleInfos, int maxSamples, InstanceHandle instanceHandle)
 This operation takes an array of typed samples from the DataReader (abstract). More...
 
ReturnCode TakeInstance (ref< data >[] dataValues, ref SampleInfo[] sampleInfos, int maxSamples, InstanceHandle instanceHandle, SampleStateKind sampleStates, ViewStateKind viewStates, InstanceStateKind instanceStates)
 This operation takes an array of typed samples from the DataReader (abstract). More...
 
ReturnCode TakeNextInstance (ref< data >[] dataValues, ref SampleInfo[] sampleInfos, InstanceHandle instanceHandle)
 This operation takes an array of typed samples from the DataReader (abstract). More...
 
ReturnCode TakeNextInstance (ref< data >[] dataValues, ref SampleInfo[] sampleInfos, int maxSamples, InstanceHandle instanceHandle)
 This operation takes an array of typed samples from the DataReader (abstract). More...
 
ReturnCode TakeNextInstance (ref< data >[] dataValues, ref SampleInfo[] sampleInfos, int maxSamples, InstanceHandle instanceHandle, SampleStateKind sampleStates, ViewStateKind viewStates, InstanceStateKind instanceStates)
 This operation takes an array of typed samples from the DataReader (abstract). More...
 
ReturnCode TakeNextInstanceWithCondition (ref< data >[] dataValues, ref SampleInfo[] sampleInfos, InstanceHandle instanceHandle, IReadCondition readCondition)
 This operation takes an array of typed samples from the DataReader (abstract). More...
 
ReturnCode TakeNextInstanceWithCondition (ref< data >[] dataValues, ref SampleInfo[] sampleInfos, int maxSamples, InstanceHandle instanceHandle, IReadCondition readCondition)
 This operation takes an array of typed samples from the DataReader (abstract). More...
 
ReturnCode TakeWithCondition (ref< data >[] dataValues, ref SampleInfo[] sampleInfos, IReadCondition readCondition)
 This operation takes an array of typed samples from the DataReader (abstract). More...
 
ReturnCode TakeWithCondition (ref< data >[] dataValues, ref SampleInfo[] sampleInfos, int maxSamples, IReadCondition readCondition)
 This operation takes an array of typed samples from the DataReader (abstract). More...
 
ReturnCode WaitForHistoricalData (Duration maxWait)
 This operation will block the application thread until all historical data is received. More...
 
- Public Member Functions inherited from DDS.IEntity
ReturnCode Enable ()
 This operation enables the IEntity on which it is being called when the IEntity was created with the EntityFactoryQosPolicy set to false. More...
 

Additional Inherited Members

- Properties inherited from DDS.IDataReader
IDataReaderListener Listener [get]
 This property returns the IDataReaderListener currently attached to the IDataReader. More...
 
ISubscriber Subscriber [get]
 This property returns the ISubscriber to which the IDataReader belongs. More...
 
- Properties inherited from DDS.IEntity
InstanceHandle InstanceHandle [get]
 This operation returns the InstanceHandle of the builtin topic sample that represents the specified IEntity. More...
 
StatusKind StatusChanges [get]
 This operation returns a mask with the communication statuses in the IEntity that are triggered. More...
 
IStatusCondition StatusCondition [get]
 This property allows access to the IStatusCondition associated with the IEntity. More...
 

Detailed Description

A DataReader allows the application to access published sample data.

Note
This is an example of a generated typed DataReader, used for documentation.

A typed DataReader allows the application:

  • to declare the data it wishes to receive (i.e., make a subscription)
  • to access the data received by the attached Subscriber

A DataReader refers to exactly one DDS.ITopicDescription (either a DDS.ITopic, a DDS.IContentFilteredTopic or a DDS.IMultiTopic) that identifies the samples to be read. The DDS.ITopic must exist prior to the DataReader creation.

A DataReader is attached to exactly one DDS.ISubscriber which acts as a factory for it.

The DataReader may give access to several instances of the data type, which are distinguished from each other by their key.

The pre-processor generates from IDL type descriptions the application <module>.<struct>DataReader classes. In this example it is Space.FooDataReader. For each application data type that is used as DDS.ITopic data type, a typed class <module>.<struct>DataReader is derived from the DDS.IDataReader class.

Note
Class hierarchy in the documentation has been simplified for clearity purposes.

Example
The memory used for storing the sample may be loaned by the middleware thus allowing less copy operations. This also means that the buffer loans have to be returned to the middleware.

/* Simplest creation of a typed datareader.
* Defaults are used and possible errors are ignored. */
/* Prepare Domain. */
DDS.IDomainParticipant participant = factory.CreateParticipant(DDS.DomainId.Default);
/* Add topic data type to the system. */
DDS.ITypeSupport typesupport = new Space.FooTypeSupport();
DDS.ReturnCode retcode = typesupport.RegisterType(participant, "Space.Foo");
DDS.ITopic topic = participant.CreateTopic("SpaceFooTopic", "Space.Foo");
/* Create typed datareader. */
DDS.ISubscriber subscriber = participant.CreateSubscriber();
Space.FooDataReader reader = (Space.FooDataReader)subscriber.CreateDataReader(topic);
/* Read data (using defaults like unlimited samples). */
Space.Foo[] dataList = null;
DDS.SampleInfo[] infoList = null;
retcode = reader.Read(ref dataList, ref infoList);
if (retcode == DDS.ReturnCode.Ok) {
for (int i = 0; i < dataList.Length; i++) {
Space.Foo data = dataList[i];
DDS.SampleInfo info = infoList[i]
/* Use data and info. */
}
reader.ReturnLoan(ref dataList, ref infoList);
}
See also
Subscription concept
DataReader concept

Definition at line 122 of file Typed.cs.

Member Function Documentation

◆ GetKeyValue()

DDS.ReturnCode Space.FooDataReader.GetKeyValue ( ref Foo  key,
DDS.InstanceHandle  instanceHandle 
)
inline

This operation retrieves the key value of a specific instance.

This operation retrieves the key value of the instance referenced to by instanceHandle. When the operation is called with a DDS.InstanceHandle.Nil handle value as an instanceHandle, the operation will return DDS.ReturnCode BadParameter.

The operation will only fill the data fields that form the key inside the data instance (Space.Foo in this case). This means that the non-key fields are not applicable and may contain garbage.

The operation must only be called on registered instances. Otherwise the operation returns DDS.ReturnCode PreconditionNotMet.

Parameters
keyA sample in which the key values are stored.
instanceHandleThe handle to the instance from which to get the key value.
Returns
Return values are:
  • DDS.ReturnCode Ok - The key fields are set in the sample
  • DDS.ReturnCode Error - An internal error has occurred.
  • DDS.ReturnCode AlreadyDeleted - The DataReader has already been deleted.
  • DDS.ReturnCode OutOfResources - The DDS has ran out of resources to complete this operation.
  • DDS.ReturnCode PreconditionNotMet - The handle has not been registered with this DataReader.
  • DDS.ReturnCode BadParameter - The parameter handle is not a valid handle.
  • DDS.ReturnCode NotEnabled - The DataReader has not yet been enabled.

Definition at line 1739 of file Typed.cs.

◆ LookupInstance()

DDS.InstanceHandle Space.FooDataReader.LookupInstance ( Foo  instance)
inline

This operation returns the handle which corresponds to the instance data.

The instance handle can be used in read operations that operate on a specific instance.

Note that DataReader instance handles are local, and are not interchangeable with DataWriter instance handles nor with instance handles of an other DataReader. If the DataReader is already deleted, the handle value DDS.InstanceHandle.Nil is returned.

Parameters
instanceThe instance for which the corresponding instance handle needs to be looked up.
Returns
Return values are:

Definition at line 1765 of file Typed.cs.

◆ Read() [1/4]

DDS.ReturnCode Space.FooDataReader.Read ( ref Foo []  dataValues,
ref DDS.SampleInfo []  sampleInfos 
)
inline

This operation reads an array of typed samples from the DataReader.

The data is put into the given dataValues array, while meta data is put into the given sampleInfos array.
The given arrays will be resized to fit the number of read samples.

Reading a sample will just keep the sample in the DataReaders' buffer. The sample can be replaced by a write action depending on QoS history policy (DDS.HistoryQosPolicy) of that DataReader.
Taking the sample will remove the sample from the DataReaders' buffer.

Data Sequence
On output, the dataValues and sampleInfos arrays are of the same length and are in an one-to-one correspondence. Each DDS.SampleInfo object provides information, such as the SourceTimestamp, the SampleState, ViewState, and InstanceState, etc., about the matching sample.

Some elements in the returned sequence may not have valid data: the ValidData field in the DDS.SampleInfo indicates whether the corresponding data value contains any meaningful data. If not, the data value is just a ‘dummy’ sample for which only the keyfields have been assigned. It is used to accompany the DDS.SampleInfo that communicates a change in the InstanceState of an instance for which there is no ‘real’ sample available.

For example, when an application always ‘takes’ all available samples of a particular instance, there is no sample available to report the disposal of that instance. In such a case the DataReader will insert a dummy sample into the dataValues array to accompany the DDS.SampleInfo element in the sampleInfos sequence that communicates the disposal of the instance.

The act of reading a sample sets its SampleState to DDS.SampleStateKind Read state. If the sample belongs to the most recent generation of the instance, it also sets the ViewState of the instance to DDS.ViewStateKind NotNew state. It does not affect the SampleState of the instance.

Destination Order
In any case, the relative order between the samples of one instance is consistent with the DestinationOrderQosPolicy of the Subscriber.

  • When the DDS.DestinationOrderQosPolicykind is ByReceptionTimestampDestinationOrderQos, the samples belonging to the same instances will appear in the relative order in which they were received (FIFO).
  • When the DDS.DestinationOrderQosPolicykind is BySourceTimestampDestinationOrderQos, the samples belonging to the same instances will appear in the relative order implied by the BySourceTimestampDestinationOrderQos.
See also
Simple DataReader creation and read example.
Parameters
dataValuesArray (will be resized) that'll contain the samples.
sampleInfosArray (will be resized) that'll contain the samples meta information.
Returns
Return values are:

Definition at line 190 of file Typed.cs.

◆ Read() [2/4]

DDS.ReturnCode Space.FooDataReader.Read ( ref Foo []  dataValues,
ref DDS.SampleInfo []  sampleInfos,
int  maxSamples 
)
inline

This operation reads an array of typed samples from the DataReader.

The data is put into the given dataValues array, while meta data is put into the given sampleInfos array.
The given arrays will be resized to fit the number of read samples.

It will only read a maximum number of samples in one call.

Reading a sample will just keep the sample in the DataReaders' buffer. The sample can be replaced by a write action depending on QoS history policy (DDS.HistoryQosPolicy) of that DataReader.
Taking the sample will remove the sample from the DataReaders' buffer.

See also
Simple DataReader creation and read example.
Data sequence meta-info information.
Destination order information.
Parameters
dataValuesArray (will be resized) that'll contain the samples.
sampleInfosArray (will be resized) that'll contain the samples meta information.
maxSamplesThe maximum count of samples that will be read.
Returns
Return values are:

Definition at line 232 of file Typed.cs.

◆ Read() [3/4]

DDS.ReturnCode Space.FooDataReader.Read ( ref Foo []  dataValues,
ref DDS.SampleInfo []  sampleInfos,
DDS.SampleStateKind  sampleStates,
DDS.ViewStateKind  viewStates,
DDS.InstanceStateKind  instanceStates 
)
inline

This operation reads an array of typed samples from the DataReader.

The data is put into the given dataValues array, while meta data is put into the given sampleInfos array.
The given arrays will be resized to fit the number of read samples.

It will only read samples that have the given states.

Reading a sample will just keep the sample in the DataReaders' buffer. The sample can be replaced by a write action depending on QoS history policy (DDS.HistoryQosPolicy) of that DataReader.
Taking the sample will remove the sample from the DataReaders' buffer.

State Masks
The read operation depends on a selection of the samples by using three masks:

  • DDS.SampleStateKind sampleStates is the mask, which selects only those samples with the desired sample states Read, NotRead or both.
  • DDS.ViewStateKind viewStates is the mask, which selects only those samples with the desired view states New, NotNew or both.
  • DDS.InstanceStateKind instanceStates is the mask, which selects only those samples with the desired instance states Alive, NotAliveDisposed, NotAliveNoWriters or a combination of these.
See also
Simple DataReader creation and read example.
Data sequence meta-info information.
Destination order information.
Parameters
dataValuesArray (will be resized) that'll contain the samples.
sampleInfosArray (will be resized) that'll contain the samples meta information.
sampleStatesA mask, which selects only those samples with the desired sample states.
viewStatesA mask, which selects only those samples with the desired view states.
instanceStatesA mask, which selects only those samples with the desired instance states.
Returns
Return values are:

Definition at line 290 of file Typed.cs.

◆ Read() [4/4]

DDS.ReturnCode Space.FooDataReader.Read ( ref Foo []  dataValues,
ref DDS.SampleInfo []  sampleInfos,
int  maxSamples,
DDS.SampleStateKind  sampleStates,
DDS.ViewStateKind  viewStates,
DDS.InstanceStateKind  instanceStates 
)
inline

This operation reads an array of typed samples from the DataReader.

The data is put into the given dataValues array, while meta data is put into the given sampleInfos array.
The given arrays will be resized to fit the number of read samples.

It will only read a maximum number of samples in one call.

It will also only read samples that have the given states.

Reading a sample will just keep the sample in the DataReaders' buffer. The sample can be replaced by a write action depending on QoS history policy (DDS.HistoryQosPolicy) of that DataReader.
Taking the sample will remove the sample from the DataReaders' buffer.

See also
Simple DataReader creation and read example.
Data sequence meta-info information.
Destination order information.
State masks information.
Parameters
dataValuesArray (will be resized) that'll contain the samples.
sampleInfosArray (will be resized) that'll contain the samples meta information.
maxSamplesThe maximum count of samples that will be read.
sampleStatesA mask, which selects only those samples with the desired sample states.
viewStatesA mask, which selects only those samples with the desired view states.
instanceStatesA mask, which selects only those samples with the desired instance states.
Returns
Return values are:

Definition at line 344 of file Typed.cs.

◆ ReadInstance() [1/3]

DDS.ReturnCode Space.FooDataReader.ReadInstance ( ref Foo []  dataValues,
ref DDS.SampleInfo []  sampleInfos,
DDS.InstanceHandle  instanceHandle 
)
inline

This operation reads an array of typed samples from the DataReader.

The data is put into the given dataValues array, while meta data is put into the given sampleInfos array.
The given arrays will be resized to fit the number of read samples.

It will only read samples of the given instance.

Reading a sample will just keep the sample in the DataReaders' buffer. The sample can be replaced by a write action depending on QoS history policy (DDS.HistoryQosPolicy) of that DataReader.
Taking the sample will remove the sample from the DataReaders' buffer.

See also
Simple DataReader creation and read example.
Data sequence meta-info information.
Destination order information.
State masks information.
Parameters
dataValuesArray (will be resized) that'll contain the samples.
sampleInfosArray (will be resized) that'll contain the samples meta information.
instanceHandleThe single instance, which the samples belong to.
Returns
Return values are:

Definition at line 829 of file Typed.cs.

◆ ReadInstance() [2/3]

DDS.ReturnCode Space.FooDataReader.ReadInstance ( ref Foo []  dataValues,
ref DDS.SampleInfo []  sampleInfos,
int  maxSamples,
DDS.InstanceHandle  instanceHandle 
)
inline

This operation reads an array of typed samples from the DataReader.

The data is put into the given dataValues array, while meta data is put into the given sampleInfos array.
The given arrays will be resized to fit the number of read samples.

It will only read samples of the given instance.

It will also only read a maximum number of samples in one call.

Reading a sample will just keep the sample in the DataReaders' buffer. The sample can be replaced by a write action depending on QoS history policy (DDS.HistoryQosPolicy) of that DataReader.
Taking the sample will remove the sample from the DataReaders' buffer.

See also
Simple DataReader creation and read example.
Data sequence meta-info information.
Destination order information.
State masks information.
Parameters
dataValuesArray (will be resized) that'll contain the samples.
sampleInfosArray (will be resized) that'll contain the samples meta information.
maxSamplesThe maximum count of samples that will be read.
instanceHandleThe single instance, which the samples belong to.
Returns
Return values are:

Definition at line 879 of file Typed.cs.

◆ ReadInstance() [3/3]

DDS.ReturnCode Space.FooDataReader.ReadInstance ( ref Foo []  dataValues,
ref DDS.SampleInfo []  sampleInfos,
int  maxSamples,
DDS.InstanceHandle  instanceHandle,
DDS.SampleStateKind  sampleStates,
DDS.ViewStateKind  viewStates,
DDS.InstanceStateKind  instanceStates 
)
inline

This operation reads an array of typed samples from the DataReader.

The data is put into the given dataValues array, while meta data is put into the given sampleInfos array.
The given arrays will be resized to fit the number of read samples.

It will only read samples of the given instance.

It will also only read a maximum number of samples in one call.

It will also only read samples that have the given states.

Reading a sample will just keep the sample in the DataReaders' buffer. The sample can be replaced by a write action depending on QoS history policy (DDS.HistoryQosPolicy) of that DataReader.
Taking the sample will remove the sample from the DataReaders' buffer.

See also
Simple DataReader creation and read example.
Data sequence meta-info information.
Destination order information.
State masks information.
Parameters
dataValuesArray (will be resized) that'll contain the samples.
sampleInfosArray (will be resized) that'll contain the samples meta information.
maxSamplesThe maximum count of samples that will be read.
instanceHandleThe single instance, which the samples belong to.
sampleStatesA mask, which selects only those samples with the desired sample states.
viewStatesA mask, which selects only those samples with the desired view states.
instanceStatesA mask, which selects only those samples with the desired instance states.
Returns
Return values are:

Definition at line 938 of file Typed.cs.

◆ ReadNextInstance() [1/3]

DDS.ReturnCode Space.FooDataReader.ReadNextInstance ( ref Foo []  dataValues,
ref DDS.SampleInfo []  sampleInfos,
DDS.InstanceHandle  instanceHandle 
)
inline

This operation reads an array of typed samples from the DataReader.

The data is put into the given dataValues array, while meta data is put into the given sampleInfos array.
The given arrays will be resized to fit the number of read samples.

It will only read samples of a single instance. The behaviour is similar to ReadInstance (all samples returned belong to a single instance) except that the actual instance is not directly specified. Rather the samples will all belong to the ‘next’ instance with DDS.InstanceHandle ‘greater’ (according to some internal-defined order) than instanceHandle, that has available samples.
Providing DDS.InstanceHandle.Nil will return samples of the 'first' instance.

Reading a sample will just keep the sample in the DataReaders' buffer. The sample can be replaced by a write action depending on QoS history policy (DDS.HistoryQosPolicy) of that DataReader.
Taking the sample will remove the sample from the DataReaders' buffer.

Instance Order
The internal-defined order is not important and is implementation specific. The important thing is that, according to the Data Distribution Service, all instances are ordered relative to each other. This ordering is between the instances, that is, it does not depend on the actual samples received. For the purposes of this explanation it is ‘as if’ each instance handle was represented as a unique integer. The behaviour of ReadNextInstance is ‘as if ’ the DataReader invoked ReadInstance passing the smallest instanceHandle among all the ones that:

  • are greater than instanceHandle
  • have available samples (i.e. samples that meet the constraints imposed by the specified states).
  • The special value DDS.InstanceHandle.Nil is guaranteed to be ‘less than’ any valid DDS.InstanceHandle.
    So the use of the parameter value instanceHandle==DDS.InstanceHandle.Nil will return the samples for the instance which has the smallest DDS.InstanceHandle among all the instances that contain available samples.

Typical Use
The operation ReadNextInstance is intended to be used in an application-driven iteration where the application starts by passing instanceHandle==DDS.InstanceHandle.Nil, examines the samples returned, and then uses the DDS.InstanceHandle from the returned SampleInfo as the value of instanceHandle argument to the next call to ReadNextInstance. The iteration continues until ReadNextInstance returns the return value NoData.

DDS.ReturnCode result = DDS.ReturnCode.Ok;
while (result == DDS.ReturnCode.Ok) {
result = reader.ReadNextInstance(ref dataList, ref infoList, handle);
if (result == DDS.ReturnCode.Ok) {
handle = infoList[0].InstanceHandle;
// Handle data and meta-info.
} else if (result == DDS.ReturnCode.NoData) {
// All instances have been read.
} else {
// An error has occured.
}
}
See also
Simple DataReader creation and read example.
Data sequence meta-info information.
Destination order information.
State masks information.
Parameters
dataValuesArray (will be resized) that'll contain the samples.
sampleInfosArray (will be resized) that'll contain the samples meta information.
instanceHandleThe single instance, which the samples belong to.
Returns
Return values are:
  • DDS.ReturnCode Ok - Data is available.
  • DDS.ReturnCode Error - An internal error has occurred.
  • DDS.ReturnCode AlreadyDeleted - The DataReader has already been deleted.
  • DDS.ReturnCode BadParameter - The parameter instanceHandle is not a valid handle.
  • DDS.ReturnCode OutOfResources - The DDS has ran out of resources to complete this operation.
  • DDS.ReturnCode PreconditionNotMet - The instanceHandle has not been registered with this DataReader.
  • DDS.ReturnCode NotEnabled - The DataReader has not yet been enabled.
  • DDS.ReturnCode NoData - No samples that meet the constraints are available.

Definition at line 1187 of file Typed.cs.

◆ ReadNextInstance() [2/3]

DDS.ReturnCode Space.FooDataReader.ReadNextInstance ( ref Foo []  dataValues,
ref DDS.SampleInfo []  sampleInfos,
int  maxSamples,
DDS.InstanceHandle  instanceHandle 
)
inline

This operation reads an array of typed samples from the DataReader.

The data is put into the given dataValues array, while meta data is put into the given sampleInfos array.
The given arrays will be resized to fit the number of read samples.

It will only read samples of a single instance. The behaviour is similar to ReadInstance (all samples returned belong to a single instance) except that the actual instance is not directly specified. Rather the samples will all belong to the ‘next’ instance with DDS.InstanceHandle ‘greater’ (according to some internal-defined order) than instanceHandle, that has available samples.
Providing DDS.InstanceHandle.Nil will return samples of the 'first' instance.

It will also only read a maximum number of samples in one call.

Reading a sample will just keep the sample in the DataReaders' buffer. The sample can be replaced by a write action depending on QoS history policy (DDS.HistoryQosPolicy) of that DataReader.
Taking the sample will remove the sample from the DataReaders' buffer.

See also
Simple DataReader creation and read example.
Simple ReadNextInstance usage example.
Data sequence meta-info information.
Destination order information.
State masks information.
Instance order information.
Parameters
dataValuesArray (will be resized) that'll contain the samples.
sampleInfosArray (will be resized) that'll contain the samples meta information.
maxSamplesThe maximum count of samples that will be read.
instanceHandleThe single instance, which the samples belong to.
Returns
Return values are:
  • DDS.ReturnCode Ok - Data is available.
  • DDS.ReturnCode Error - An internal error has occurred.
  • DDS.ReturnCode AlreadyDeleted - The DataReader has already been deleted.
  • DDS.ReturnCode BadParameter - The parameter instanceHandle is not a valid handle.
  • DDS.ReturnCode OutOfResources - The DDS has ran out of resources to complete this operation.
  • DDS.ReturnCode PreconditionNotMet - The instanceHandle has not been registered with this DataReader.
  • DDS.ReturnCode NotEnabled - The DataReader has not yet been enabled.
  • DDS.ReturnCode NoData - No samples that meet the constraints are available.

Definition at line 1244 of file Typed.cs.

◆ ReadNextInstance() [3/3]

DDS.ReturnCode Space.FooDataReader.ReadNextInstance ( ref Foo []  dataValues,
ref DDS.SampleInfo []  sampleInfos,
int  maxSamples,
DDS.InstanceHandle  instanceHandle,
DDS.SampleStateKind  sampleStates,
DDS.ViewStateKind  viewStates,
DDS.InstanceStateKind  instanceStates 
)
inline

This operation reads an array of typed samples from the DataReader.

The data is put into the given dataValues array, while meta data is put into the given sampleInfos array.
The given arrays will be resized to fit the number of read samples.

It will only read samples of a single instance. The behaviour is similar to ReadInstance (all samples returned belong to a single instance) except that the actual instance is not directly specified. Rather the samples will all belong to the ‘next’ instance with DDS.InstanceHandle ‘greater’ (according to some internal-defined order) than instanceHandle, that has available samples.
Providing DDS.InstanceHandle.Nil will return samples of the 'first' instance.

It will also only read a maximum number of samples in one call.

It will also only read samples that have the given states.

Reading a sample will just keep the sample in the DataReaders' buffer. The sample can be replaced by a write action depending on QoS history policy (DDS.HistoryQosPolicy) of that DataReader.
Taking the sample will remove the sample from the DataReaders' buffer.

See also
Simple DataReader creation and read example.
Simple ReadNextInstance usage example.
Data sequence meta-info information.
Destination order information.
State masks information.
Instance order information.
Parameters
dataValuesArray (will be resized) that'll contain the samples.
sampleInfosArray (will be resized) that'll contain the samples meta information.
maxSamplesThe maximum count of samples that will be read.
instanceHandleThe single instance, which the samples belong to.
sampleStatesA mask, which selects only those samples with the desired sample states.
viewStatesA mask, which selects only those samples with the desired view states.
instanceStatesA mask, which selects only those samples with the desired instance states.
Returns
Return values are:
  • DDS.ReturnCode Ok - Data is available.
  • DDS.ReturnCode Error - An internal error has occurred.
  • DDS.ReturnCode AlreadyDeleted - The DataReader has already been deleted.
  • DDS.ReturnCode BadParameter - The parameter instanceHandle is not a valid handle.
  • DDS.ReturnCode OutOfResources - The DDS has ran out of resources to complete this operation.
  • DDS.ReturnCode PreconditionNotMet - The instanceHandle has not been registered with this DataReader.
  • DDS.ReturnCode NotEnabled - The DataReader has not yet been enabled.
  • DDS.ReturnCode NoData - No samples that meet the constraints are available.

Definition at line 1310 of file Typed.cs.

◆ ReadNextInstanceWithCondition() [1/2]

DDS.ReturnCode Space.FooDataReader.ReadNextInstanceWithCondition ( ref Foo []  dataValues,
ref DDS.SampleInfo []  sampleInfos,
DDS.InstanceHandle  instanceHandle,
DDS.IReadCondition  readCondition 
)
inline

This operation reads an array of typed samples from the DataReader.

Note
This operation is not yet implemented. It is scheduled for a future release.
See also
Simple DataReader creation and read example.
Simple ReadNextInstance usage example.
Data sequence meta-info information.
Destination order information.
State masks information.
Instance order information.
Parameters
dataValuesArray (will be resized) that'll contain the samples.
sampleInfosArray (will be resized) that'll contain the samples meta information.
instanceHandleThe single instance, which the samples belong to.
readConditionA DDS.IReadCondition or DDS.IQueryCondition which filters the data before it is returned by the read operation.
Returns
Return values are:

Definition at line 1523 of file Typed.cs.

◆ ReadNextInstanceWithCondition() [2/2]

DDS.ReturnCode Space.FooDataReader.ReadNextInstanceWithCondition ( ref Foo []  dataValues,
ref DDS.SampleInfo []  sampleInfos,
int  maxSamples,
DDS.InstanceHandle  instanceHandle,
DDS.IReadCondition  readCondition 
)
inline

This operation reads an array of typed samples from the DataReader.

Note
This operation is not yet implemented. It is scheduled for a future release.
See also
Simple DataReader creation and read example.
Simple ReadNextInstance usage example.
Data sequence meta-info information.
Destination order information.
State masks information.
Instance order information.
Parameters
dataValuesArray (will be resized) that'll contain the samples.
sampleInfosArray (will be resized) that'll contain the samples meta information.
maxSamplesThe maximum count of samples that will be read.
instanceHandleThe single instance, which the samples belong to.
readConditionA DDS.IReadCondition or DDS.IQueryCondition which filters the data before it is returned by the read operation.
Returns
Return values are:

Definition at line 1561 of file Typed.cs.

◆ ReadNextSample()

DDS.ReturnCode Space.FooDataReader.ReadNextSample ( ref Foo  dataValue,
ref DDS.SampleInfo  sampleInfo 
)
inline

This operation reads an array of typed samples from the DataReader.

Note
This operation is not yet implemented. It is scheduled for a future release.

The data is put into the given dataValues array, while meta data is put into the given sampleInfos array.
The given arrays will be resized to fit the number of read samples.

Reading a sample will just keep the sample in the DataReaders' buffer. The sample can be replaced by a write action depending on QoS history policy (DDS.HistoryQosPolicy) of that DataReader.
Taking the sample will remove the sample from the DataReaders' buffer.

See also
Simple DataReader creation and read example.
Data sequence meta-info information.
Destination order information.
State masks information.
Parameters
dataValueSample data.
sampleInfoSample info.
Returns
Return values are:

Implements DDS.IDataReader.

Definition at line 752 of file Typed.cs.

◆ ReadWithCondition() [1/2]

DDS.ReturnCode Space.FooDataReader.ReadWithCondition ( ref Foo []  dataValues,
ref DDS.SampleInfo []  sampleInfos,
DDS.IReadCondition  readCondition 
)
inline

This operation reads an array of typed samples from the DataReader.

The data that will be read is filtered by a DDS.IReadCondition or DDS.IQueryCondition.

The data is put into the given dataValues array, while meta data is put into the given sampleInfos array.
The given arrays will be resized to fit the number of read samples.

Reading a sample will just keep the sample in the DataReaders' buffer. The sample can be replaced by a write action depending on QoS history policy (DDS.HistoryQosPolicy) of that DataReader.
Taking the sample will remove the sample from the DataReaders' buffer.

See also
Simple DataReader creation and read example.
Data sequence meta-info information.
Destination order information.
State masks information.
Parameters
dataValuesArray (will be resized) that'll contain the samples.
sampleInfosArray (will be resized) that'll contain the samples meta information.
readConditionA DDS.IReadCondition or DDS.IQueryCondition which filters the data before it is returned by the read operation.
Returns
Return values are:

Definition at line 573 of file Typed.cs.

◆ ReadWithCondition() [2/2]

DDS.ReturnCode Space.FooDataReader.ReadWithCondition ( ref Foo []  dataValues,
ref DDS.SampleInfo []  sampleInfos,
int  maxSamples,
DDS.IReadCondition  readCondition 
)
inline

This operation reads an array of typed samples from the DataReader.

The data that will be read is filtered by a DDS.IReadCondition or DDS.IQueryCondition.

The data is put into the given dataValues array, while meta data is put into the given sampleInfos array.
The given arrays will be resized to fit the number of read samples.

It will only read a maximum number of samples in one call.

Reading a sample will just keep the sample in the DataReaders' buffer. The sample can be replaced by a write action depending on QoS history policy (DDS.HistoryQosPolicy) of that DataReader.
Taking the sample will remove the sample from the DataReaders' buffer.

See also
Simple DataReader creation and read example.
Data sequence meta-info information.
Destination order information.
State masks information.
Parameters
dataValuesArray (will be resized) that'll contain the samples.
sampleInfosArray (will be resized) that'll contain the samples meta information.
maxSamplesThe maximum count of samples that will be read.
readConditionA DDS.IReadCondition or DDS.IQueryCondition which filters the data before it is returned by the read operation.
Returns
Return values are:

Definition at line 623 of file Typed.cs.

◆ ReturnLoan()

DDS.ReturnCode Space.FooDataReader.ReturnLoan ( ref Foo []  dataValues,
ref DDS.SampleInfo []  sampleInfos 
)
inline

This operation indicates to the DataReader that the application is done accessing the dataValues and sampleInfos arrays.

This operation indicates to the DataReader that the application is done accessing the dataValues and sampleInfos arrays obtained by some earlier invocation of the operation Read or Take (or any of the similar operations) on the DataReader.

The dataValues and sampleInfos must belong to a single related pair. That is, they should correspond to a pair returned from a single call to the operation Read or Take. The dataValues and sampleInfos must also have been obtained from the same DataReader to which they are returned. If either of these conditions is not met the operation will fail and returns DDS.ReturnCode PreconditionNotMet.

Buffer Loan
The operation ReturnLoan allows implementations of the Read and Take operations to “loan” buffers from the Data Distribution Service to the application and in this manner provide “zero-copy” access to the data. During the loan, the Data Distribution Service will guarantee that the dataValues and sampleInfos are not modified.
It is not necessary for an application to return the loans immediately after calling the operation Read or Take. However, as these buffers can correspond to internal resources inside the DataReader, the application should not retain them indefinitely.

See also
Simple DataReader creation and read example.
Parameters
dataValuesThe sample data which was loaned from the DataReader.
sampleInfosThe SampleInfo which was loaned from the DataReader.
Returns
Return values are:
  • DDS.ReturnCode Ok - The DataReader is informed that the arrays will not be used any more
  • DDS.ReturnCode Error - An internal error has occurred.
  • DDS.ReturnCode AlreadyDeleted - The DataReader has already been deleted.
  • DDS.ReturnCode OutOfResources - The DDS has ran out of resources to complete this operation.
  • DDS.ReturnCode PreconditionNotMet - The dataValues and sampleInfos do not belong to a single pair.
  • DDS.ReturnCode NotEnabled - The DataReader has not yet been enabled.

Definition at line 1694 of file Typed.cs.

◆ Take() [1/4]

DDS.ReturnCode Space.FooDataReader.Take ( ref Foo []  dataValues,
ref DDS.SampleInfo []  sampleInfos 
)
inline

This operation takes an array of typed samples from the DataReader.

The data is put into the given dataValues array, while meta data is put into the given sampleInfos array.
The given arrays will be resized to fit the number of read samples.

Reading a sample will just keep the sample in the DataReaders' buffer.
Taking the sample will remove the sample from the DataReaders' buffer.

See also
Simple DataReader creation and read example.
Data sequence meta-info information.
Destination order information.
State masks information.
Parameters
dataValuesArray (will be resized) that'll contain the samples.
sampleInfosArray (will be resized) that'll contain the samples meta information.
Returns
Return values are:

Definition at line 385 of file Typed.cs.

◆ Take() [2/4]

DDS.ReturnCode Space.FooDataReader.Take ( ref Foo []  dataValues,
ref DDS.SampleInfo []  sampleInfos,
int  maxSamples 
)
inline

This operation takes an array of typed samples from the DataReader.

The data is put into the given dataValues array, while meta data is put into the given sampleInfos array.
The given arrays will be resized to fit the number of read samples.

It will only take a maximum number of samples in one call.

Reading a sample will just keep the sample in the DataReaders' buffer.
Taking the sample will remove the sample from the DataReaders' buffer.

See also
Simple DataReader creation and read example.
Data sequence meta-info information.
Destination order information.
State masks information.
Parameters
dataValuesArray (will be resized) that'll contain the samples.
sampleInfosArray (will be resized) that'll contain the samples meta information.
maxSamplesThe maximum count of samples that will be taken.
Returns
Return values are:

Definition at line 426 of file Typed.cs.

◆ Take() [3/4]

DDS.ReturnCode Space.FooDataReader.Take ( ref Foo []  dataValues,
ref DDS.SampleInfo []  sampleInfos,
DDS.SampleStateKind  sampleStates,
DDS.ViewStateKind  viewStates,
DDS.InstanceStateKind  instanceStates 
)
inline

This operation takes an array of typed samples from the DataReader.

The data is put into the given dataValues array, while meta data is put into the given sampleInfos array.
The given arrays will be resized to fit the number of read samples.

It will only take samples that have the given states.

Reading a sample will just keep the sample in the DataReaders' buffer.
Taking the sample will remove the sample from the DataReaders' buffer.

See also
Simple DataReader creation and read example.
Data sequence meta-info information.
Destination order information.
State masks information.
Parameters
dataValuesArray (will be resized) that'll contain the samples.
sampleInfosArray (will be resized) that'll contain the samples meta information.
sampleStatesA mask, which selects only those samples with the desired sample states.
viewStatesA mask, which selects only those samples with the desired view states.
instanceStatesA mask, which selects only those samples with the desired instance states.
Returns
Return values are:

Definition at line 472 of file Typed.cs.

◆ Take() [4/4]

DDS.ReturnCode Space.FooDataReader.Take ( ref Foo []  dataValues,
ref DDS.SampleInfo []  sampleInfos,
int  maxSamples,
DDS.SampleStateKind  sampleStates,
DDS.ViewStateKind  viewStates,
DDS.InstanceStateKind  instanceStates 
)
inline

This operation takes an array of typed samples from the DataReader.

The data is put into the given dataValues array, while meta data is put into the given sampleInfos array.
The given arrays will be resized to fit the number of read samples.

It will only take a maximum number of samples in one call.

It will also only take samples that have the given states.

Reading a sample will just keep the sample in the DataReaders' buffer.
Taking the sample will remove the sample from the DataReaders' buffer.

See also
Simple DataReader creation and read example.
Data sequence meta-info information.
Destination order information.
State masks information.
Parameters
dataValuesArray (will be resized) that'll contain the samples.
sampleInfosArray (will be resized) that'll contain the samples meta information.
maxSamplesThe maximum count of samples that will be taken.
sampleStatesA mask, which selects only those samples with the desired sample states.
viewStatesA mask, which selects only those samples with the desired view states.
instanceStatesA mask, which selects only those samples with the desired instance states.
Returns
Return values are:

Definition at line 524 of file Typed.cs.

◆ TakeInstance() [1/3]

DDS.ReturnCode Space.FooDataReader.TakeInstance ( ref Foo []  dataValues,
ref DDS.SampleInfo []  sampleInfos,
DDS.InstanceHandle  instanceHandle 
)
inline

This operation takes an array of typed samples from the DataReader.

The data is put into the given dataValues array, while meta data is put into the given sampleInfos array.
The given arrays will be resized to fit the number of read samples.

It will only take samples of the given instance.

Reading a sample will just keep the sample in the DataReaders' buffer.
Taking the sample will remove the sample from the DataReaders' buffer.

See also
Simple DataReader creation and read example.
Data sequence meta-info information.
Destination order information.
State masks information.
Parameters
dataValuesArray (will be resized) that'll contain the samples.
sampleInfosArray (will be resized) that'll contain the samples meta information.
instanceHandleThe single instance, which the samples belong to.
Returns
Return values are:

Definition at line 986 of file Typed.cs.

◆ TakeInstance() [2/3]

DDS.ReturnCode Space.FooDataReader.TakeInstance ( ref Foo []  dataValues,
ref DDS.SampleInfo []  sampleInfos,
int  maxSamples,
DDS.InstanceHandle  instanceHandle 
)
inline

This operation takes an array of typed samples from the DataReader.

The data is put into the given dataValues array, while meta data is put into the given sampleInfos array.
The given arrays will be resized to fit the number of read samples.

It will only take samples of the given instance.

It will also only take a maximum number of samples in one call.

Reading a sample will just keep the sample in the DataReaders' buffer.
Taking the sample will remove the sample from the DataReaders' buffer.

See also
Simple DataReader creation and read example.
Data sequence meta-info information.
Destination order information.
State masks information.
Parameters
dataValuesArray (will be resized) that'll contain the samples.
sampleInfosArray (will be resized) that'll contain the samples meta information.
maxSamplesThe maximum count of samples that will be taken.
instanceHandleThe single instance, which the samples belong to.
Returns
Return values are:

Definition at line 1034 of file Typed.cs.

◆ TakeInstance() [3/3]

DDS.ReturnCode Space.FooDataReader.TakeInstance ( ref Foo []  dataValues,
ref DDS.SampleInfo []  sampleInfos,
int  maxSamples,
DDS.InstanceHandle  instanceHandle,
DDS.SampleStateKind  sampleStates,
DDS.ViewStateKind  viewStates,
DDS.InstanceStateKind  instanceStates 
)
inline

This operation takes an array of typed samples from the DataReader.

The data is put into the given dataValues array, while meta data is put into the given sampleInfos array.
The given arrays will be resized to fit the number of read samples.

It will only take samples of the given instance.

It will also only take a maximum number of samples in one call.

It will also only take samples that have the given states.

Reading a sample will just keep the sample in the DataReaders' buffer.
Taking the sample will remove the sample from the DataReaders' buffer.

See also
Simple DataReader creation and read example.
Data sequence meta-info information.
Destination order information.
State masks information.
Parameters
dataValuesArray (will be resized) that'll contain the samples.
sampleInfosArray (will be resized) that'll contain the samples meta information.
maxSamplesThe maximum count of samples that will be taken.
instanceHandleThe single instance, which the samples belong to.
sampleStatesA mask, which selects only those samples with the desired sample states.
viewStatesA mask, which selects only those samples with the desired view states.
instanceStatesA mask, which selects only those samples with the desired instance states.
Returns
Return values are:

Definition at line 1091 of file Typed.cs.

◆ TakeNextInstance() [1/3]

DDS.ReturnCode Space.FooDataReader.TakeNextInstance ( ref Foo []  dataValues,
ref DDS.SampleInfo []  sampleInfos,
DDS.InstanceHandle  instanceHandle 
)
inline

This operation takes an array of typed samples from the DataReader.

The data is put into the given dataValues array, while meta data is put into the given sampleInfos array.
The given arrays will be resized to fit the number of read samples.

It will only take samples of a single instance. The behaviour is similar to TakeInstance (all samples returned belong to a single instance) except that the actual instance is not directly specified. Rather the samples will all belong to the ‘next’ instance with DDS.InstanceHandle ‘greater’ (according to some internal-defined order) than instanceHandle, that has available samples.
Providing DDS.InstanceHandle.Nil will return samples of the 'first' instance.

Reading a sample will just keep the sample in the DataReaders' buffer.
Taking the sample will remove the sample from the DataReaders' buffer.

See also
Simple DataReader creation and read example.
Simple ReadNextInstance usage example.
Data sequence meta-info information.
Destination order information.
State masks information.
Instance order information.
Parameters
dataValuesArray (will be resized) that'll contain the samples.
sampleInfosArray (will be resized) that'll contain the samples meta information.
instanceHandleThe single instance, which the samples belong to.
Returns
Return values are:
  • DDS.ReturnCode Ok - Data is available.
  • DDS.ReturnCode Error - An internal error has occurred.
  • DDS.ReturnCode AlreadyDeleted - The DataReader has already been deleted.
  • DDS.ReturnCode BadParameter - The parameter instanceHandle is not a valid handle.
  • DDS.ReturnCode OutOfResources - The DDS has ran out of resources to complete this operation.
  • DDS.ReturnCode PreconditionNotMet - The instanceHandle has not been registered with this DataReader.
  • DDS.ReturnCode NotEnabled - The DataReader has not yet been enabled.
  • DDS.ReturnCode NoData - No samples that meet the constraints are available.

Definition at line 1365 of file Typed.cs.

◆ TakeNextInstance() [2/3]

DDS.ReturnCode Space.FooDataReader.TakeNextInstance ( ref Foo []  dataValues,
ref DDS.SampleInfo []  sampleInfos,
int  maxSamples,
DDS.InstanceHandle  instanceHandle 
)
inline

This operation takes an array of typed samples from the DataReader.

The data is put into the given dataValues array, while meta data is put into the given sampleInfos array.
The given arrays will be resized to fit the number of read samples.

It will only take samples of a single instance. The behaviour is similar to TakeInstance (all samples returned belong to a single instance) except that the actual instance is not directly specified. Rather the samples will all belong to the ‘next’ instance with DDS.InstanceHandle ‘greater’ (according to some internal-defined order) than instanceHandle, that has available samples.
Providing DDS.InstanceHandle.Nil will return samples of the 'first' instance.

It will also only take a maximum number of samples in one call.

Reading a sample will just keep the sample in the DataReaders' buffer.
Taking the sample will remove the sample from the DataReaders' buffer.

See also
Simple DataReader creation and read example.
Simple ReadNextInstance usage example.
Data sequence meta-info information.
Destination order information.
State masks information.
Instance order information.
Parameters
dataValuesArray (will be resized) that'll contain the samples.
sampleInfosArray (will be resized) that'll contain the samples meta information.
maxSamplesThe maximum count of samples that will be taken.
instanceHandleThe single instance, which the samples belong to.
Returns
Return values are:
  • DDS.ReturnCode Ok - Data is available.
  • DDS.ReturnCode Error - An internal error has occurred.
  • DDS.ReturnCode AlreadyDeleted - The DataReader has already been deleted.
  • DDS.ReturnCode BadParameter - The parameter instanceHandle is not a valid handle.
  • DDS.ReturnCode OutOfResources - The DDS has ran out of resources to complete this operation.
  • DDS.ReturnCode PreconditionNotMet - The instanceHandle has not been registered with this DataReader.
  • DDS.ReturnCode NotEnabled - The DataReader has not yet been enabled.
  • DDS.ReturnCode NoData - No samples that meet the constraints are available.

Definition at line 1420 of file Typed.cs.

◆ TakeNextInstance() [3/3]

DDS.ReturnCode Space.FooDataReader.TakeNextInstance ( ref Foo []  dataValues,
ref DDS.SampleInfo []  sampleInfos,
int  maxSamples,
DDS.InstanceHandle  instanceHandle,
DDS.SampleStateKind  sampleStates,
DDS.ViewStateKind  viewStates,
DDS.InstanceStateKind  instanceStates 
)
inline

This operation takes an array of typed samples from the DataReader.

The data is put into the given dataValues array, while meta data is put into the given sampleInfos array.
The given arrays will be resized to fit the number of read samples.

It will only take samples of a single instance. The behaviour is similar to TakeInstance (all samples returned belong to a single instance) except that the actual instance is not directly specified. Rather the samples will all belong to the ‘next’ instance with DDS.InstanceHandle ‘greater’ (according to some internal-defined order) than instanceHandle, that has available samples.
Providing DDS.InstanceHandle.Nil will return samples of the 'first' instance.

It will also only take a maximum number of samples in one call.

It will also only take samples that have the given states.

Reading a sample will just keep the sample in the DataReaders' buffer.
Taking the sample will remove the sample from the DataReaders' buffer.

See also
Simple DataReader creation and read example.
Simple ReadNextInstance usage example.
Data sequence meta-info information.
Destination order information.
State masks information.
Instance order information.
Parameters
dataValuesArray (will be resized) that'll contain the samples.
sampleInfosArray (will be resized) that'll contain the samples meta information.
maxSamplesThe maximum count of samples that will be taken.
instanceHandleThe single instance, which the samples belong to.
sampleStatesA mask, which selects only those samples with the desired sample states.
viewStatesA mask, which selects only those samples with the desired view states.
instanceStatesA mask, which selects only those samples with the desired instance states.
Returns
Return values are:
  • DDS.ReturnCode Ok - Data is available.
  • DDS.ReturnCode Error - An internal error has occurred.
  • DDS.ReturnCode AlreadyDeleted - The DataReader has already been deleted.
  • DDS.ReturnCode BadParameter - The parameter instanceHandle is not a valid handle.
  • DDS.ReturnCode OutOfResources - The DDS has ran out of resources to complete this operation.
  • DDS.ReturnCode PreconditionNotMet - The instanceHandle has not been registered with this DataReader.
  • DDS.ReturnCode NotEnabled - The DataReader has not yet been enabled.
  • DDS.ReturnCode NoData - No samples that meet the constraints are available.

Definition at line 1484 of file Typed.cs.

◆ TakeNextInstanceWithCondition() [1/2]

DDS.ReturnCode Space.FooDataReader.TakeNextInstanceWithCondition ( ref Foo []  dataValues,
ref DDS.SampleInfo []  sampleInfos,
DDS.InstanceHandle  instanceHandle,
DDS.IReadCondition  readCondition 
)
inline

This operation takes an array of typed samples from the DataReader.

Note
This operation is not yet implemented. It is scheduled for a future release.
See also
Simple DataReader creation and read example.
Simple ReadNextInstance usage example.
Data sequence meta-info information.
Destination order information.
State masks information.
Instance order information.
Parameters
dataValuesArray (will be resized) that'll contain the samples.
sampleInfosArray (will be resized) that'll contain the samples meta information.
instanceHandleThe single instance, which the samples belong to.
readConditionA DDS.IReadCondition or DDS.IQueryCondition which filters the data before it is returned by the read operation.
Returns
Return values are:

Definition at line 1598 of file Typed.cs.

◆ TakeNextInstanceWithCondition() [2/2]

DDS.ReturnCode Space.FooDataReader.TakeNextInstanceWithCondition ( ref Foo []  dataValues,
ref DDS.SampleInfo []  sampleInfos,
int  maxSamples,
DDS.InstanceHandle  instanceHandle,
DDS.IReadCondition  readCondition 
)
inline

This operation takes an array of typed samples from the DataReader.

Note
This operation is not yet implemented. It is scheduled for a future release.
See also
Simple DataReader creation and read example.
Simple ReadNextInstance usage example.
Data sequence meta-info information.
Destination order information.
State masks information.
Instance order information.
Parameters
dataValuesArray (will be resized) that'll contain the samples.
sampleInfosArray (will be resized) that'll contain the samples meta information.
maxSamplesThe maximum count of samples that will be taken.
instanceHandleThe single instance, which the samples belong to.
readConditionA DDS.IReadCondition or DDS.IQueryCondition which filters the data before it is returned by the read operation.
Returns
Return values are:

Definition at line 1636 of file Typed.cs.

◆ TakeNextSample()

DDS.ReturnCode Space.FooDataReader.TakeNextSample ( ref Foo  dataValue,
ref DDS.SampleInfo  sampleInfo 
)
inline

This operation takes an array of typed samples from the DataReader.

Note
This operation is not yet implemented. It is scheduled for a future release.

The data is put into the given dataValues array, while meta data is put into the given sampleInfos array.
The given arrays will be resized to fit the number of read samples.

Reading a sample will just keep the sample in the DataReaders' buffer.
Taking the sample will remove the sample from the DataReaders' buffer.

See also
Simple DataReader creation and read example.
Data sequence meta-info information.
Destination order information.
State masks information.
Parameters
dataValueSample data.
sampleInfoSample info.
Returns
Return values are:

Implements DDS.IDataReader.

Definition at line 784 of file Typed.cs.

◆ TakeWithCondition() [1/2]

DDS.ReturnCode Space.FooDataReader.TakeWithCondition ( ref Foo []  dataValues,
ref DDS.SampleInfo []  sampleInfos,
DDS.IReadCondition  readCondition 
)
inline

This operation takes an array of typed samples from the DataReader.

The data that will be taken is filtered by a DDS.IReadCondition or DDS.IQueryCondition.

The data is put into the given dataValues array, while meta data is put into the given sampleInfos array.
The given arrays will be resized to fit the number of read samples.

Reading a sample will just keep the sample in the DataReaders' buffer.
Taking the sample will remove the sample from the DataReaders' buffer.

See also
Simple DataReader creation and read example.
Data sequence meta-info information.
Destination order information.
State masks information.
Parameters
dataValuesArray (will be resized) that'll contain the samples.
sampleInfosArray (will be resized) that'll contain the samples meta information.
readConditionA DDS.IReadCondition or DDS.IQueryCondition which filters the data before it is returned by the take operation.
Returns
Return values are:

Definition at line 668 of file Typed.cs.

◆ TakeWithCondition() [2/2]

DDS.ReturnCode Space.FooDataReader.TakeWithCondition ( ref Foo []  dataValues,
ref DDS.SampleInfo []  sampleInfos,
int  maxSamples,
DDS.IReadCondition  readCondition 
)
inline

This operation takes an array of typed samples from the DataReader.

The data that will be taken is filtered by a DDS.IReadCondition or DDS.IQueryCondition.

The data is put into the given dataValues array, while meta data is put into the given sampleInfos array.
The given arrays will be resized to fit the number of read samples.

It will only take a maximum number of samples in one call.

Reading a sample will just keep the sample in the DataReaders' buffer.
Taking the sample will remove the sample from the DataReaders' buffer.

See also
Simple DataReader creation and read example.
Data sequence meta-info information.
Destination order information.
State masks information.
Parameters
dataValuesArray (will be resized) that'll contain the samples.
sampleInfosArray (will be resized) that'll contain the samples meta information.
maxSamplesThe maximum count of samples that will be taken.
readConditionA DDS.IReadCondition or DDS.IQueryCondition which filters the data before it is returned by the take operation.
Returns
Return values are:

Definition at line 716 of file Typed.cs.


The documentation for this class was generated from the following file: