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

The specialized DataWriter for the fictional type Space::Foo
More...

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

Public Member Functions

DDS.ReturnCode Dispose (Foo instanceData, DDS.InstanceHandle instanceHandle)
 This operation requests the Data Distribution Service to mark the instance for deletion. More...
 
DDS.ReturnCode DisposeWithTimestamp (Foo instanceData, DDS.InstanceHandle instanceHandle, DDS.Time sourceTimestamp)
 This operation requests the Data Distribution Service to mark the instance for deletion and provides a value for the sourceTimestamp explicitly. More...
 
DDS.ReturnCode GetKeyValue (ref Foo key, DDS.InstanceHandle instanceHandle)
 This operation retrieves the key value of a specific instance. More...
 
DDS.InstanceHandle LookupInstance (Foo instanceData)
 This operation returns the value of the instance handle which corresponds to the provided instanceData. More...
 
DDS.InstanceHandle RegisterInstance (Foo instanceData)
 This operation informs the Data Distribution Service that the application will be modifying a particular instance. More...
 
DDS.InstanceHandle RegisterInstanceWithTimestamp (Foo instanceData, DDS.Time sourceTimestamp)
 This operation will inform the Data Distribution Service that the application will be modifying a particular instance and provides a value for the sourceTimestamp explicitly. More...
 
DDS.ReturnCode UnregisterInstance (Foo instanceData, DDS.InstanceHandle instanceHandle)
 This operation informs the Data Distribution Service that the application will not be modifying a particular instance any more. explicitly. More...
 
DDS.ReturnCode UnregisterInstanceWithTimestamp (Foo instanceData, DDS.InstanceHandle instanceHandle, DDS.Time sourceTimestamp)
 This operation will inform the Data Distribution Service that the application will not be modifying a particular instance any more and provides a value for the sourceTimestamp explicitly. More...
 
DDS.ReturnCode Write (Foo instanceData)
 This operation modifies the value of a data instance. More...
 
DDS.ReturnCode Write (Foo instanceData, DDS.InstanceHandle instanceHandle)
 This operation modifies the value of a data instance. More...
 
DDS.ReturnCode WriteDispose (Foo instanceData)
 This operation requests the Data Distribution Service to modify the instance and mark it for deletion. More...
 
DDS.ReturnCode WriteDispose (Foo instanceData, DDS.InstanceHandle instanceHandle)
 This operation requests the Data Distribution Service to modify the instance and mark it for deletion. More...
 
DDS.ReturnCode WriteDisposeWithTimestamp (Foo instanceData, DDS.Time sourceTimestamp)
 This operation requests the Data Distribution Service to modify the instance and mark it for deletion and provides a value for the sourceTimestamp explicitly. More...
 
DDS.ReturnCode WriteDisposeWithTimestamp (Foo instanceData, DDS.InstanceHandle instanceHandle, DDS.Time sourceTimestamp)
 This operation requests the Data Distribution Service to modify the instance and mark it for deletion and provides a value for the sourceTimestamp explicitly. More...
 
DDS.ReturnCode WriteWithTimestamp (Foo instanceData, DDS.Time sourceTimestamp)
 This operation modifies the value of a data instance. More...
 
DDS.ReturnCode WriteWithTimestamp (Foo instanceData, DDS.InstanceHandle instanceHandle, DDS.Time sourceTimestamp)
 This operation modifies the value of a data instance and provides a value for the sourceTimestamp explicitly. More...
 
- Public Member Functions inherited from DDS.IDataWriter
ReturnCode AssertLiveliness ()
 This operation asserts the liveliness for the IDataWriter. More...
 
ReturnCode Dispose (< type > instanceData, InstanceHandle instanceHandle)
 This operation requests the Data Distribution Service to mark the instance for deletion (abstract). More...
 
ReturnCode DisposeWithTimestamp (< type > instanceData, InstanceHandle instanceHandle, Time sourceTimestamp)
 This operation requests the Data Distribution Service to mark the instance for deletion and provides a value for the sourceTimestamp explicitly (abstract). More...
 
ReturnCode GetKeyValue (ref< type > key, InstanceHandle instanceHandle)
 This operation retrieves the key value of a specific instance (abstract). More...
 
ReturnCode GetLivelinessLostStatus (ref LivelinessLostStatus status)
 This operation obtains the LivelinessLostStatus struct of the IDataWriter. More...
 
ReturnCode GetMatchedSubscriptionData (ref SubscriptionBuiltinTopicData subscriptionData, InstanceHandle subscriptionHandle)
 This operation retrieves information on the specified subscription that is currently “associated” with the IDataWriter. More...
 
ReturnCode GetMatchedSubscriptions (ref InstanceHandle[] subscriptionHandles)
 This operation retrieves the list of subscriptions currently "associated" with the IDataWriter. More...
 
ReturnCode GetOfferedDeadlineMissedStatus (ref OfferedDeadlineMissedStatus status)
 This operation obtains the OfferedDeadlineMissedStatus struct of the IDataWriter. More...
 
ReturnCode GetOfferedIncompatibleQosStatus (ref OfferedIncompatibleQosStatus status)
 This operation obtains the OfferedIncompatibleQosStatus struct of the IDataWriter. More...
 
ReturnCode GetPublicationMatchedStatus (ref PublicationMatchedStatus status)
 This operation obtains the PublicationMatchedStatus struct of the IDataWriter. More...
 
ReturnCode GetQos (ref DataWriterQos qos)
 This operation allows access to the existing list of QosPolicy settings for a IDataWriter. More...
 
InstanceHandle LookupInstance (< type > instanceData)
 This operation returns the value of the instance handle which corresponds to the provided instanceData (abstract). More...
 
InstanceHandle RegisterInstance (< type > instanceData)
 This operation informs the Data Distribution Service that the application will be modifying a particular instance (abstract). More...
 
InstanceHandle RegisterInstanceWithTimestamp (< type > instanceData, Time sourceTimestamp)
 This operation will inform the Data Distribution Service that the application will be modifying a particular instance and provides a value for the sourceTimestamp explicitly (abstract). More...
 
ReturnCode SetListener (IDataWriterListener listener, StatusKind mask)
 This operation attaches a IDataWriterListener to the IDataWriter. More...
 
ReturnCode SetQos (DataWriterQos qos)
 This operation replaces the existing set of QosPolicy settings for a IDataWriter. More...
 
ReturnCode UnregisterInstance (< type > instanceData, InstanceHandle instanceHandle)
 This operation informs the Data Distribution Service that the application will not be modifying a particular instance any more (abstract). More...
 
ReturnCode UnregisterInstanceWithTimestamp (< type > instanceData, InstanceHandle instanceHandle, Time sourceTimestamp)
 This operation will inform the Data Distribution Service that the application will not be modifying a particular instance any more and provides a value for the sourceTimestamp explicitly (abstract). More...
 
ReturnCode WaitForAcknowledgments (Duration maxWait)
 This operation blocks the calling thread until either all data written by all contained IDataWriter is acknowledged by the local infrastructure, or until the duration specified by maxWait parameter elapses, whichever happens first. More...
 
ReturnCode Write (< type > instanceData)
 This operation modifies the value of a data instance (abstract). More...
 
ReturnCode Write (< type > instanceData, InstanceHandle instanceHandle)
 This operation modifies the value of a data instance (abstract). More...
 
ReturnCode WriteDispose (< type > instanceData)
 This operation requests the Data Distribution Service to modify the instance and mark it for deletion (abstract). More...
 
ReturnCode WriteDispose (< type > instanceData, InstanceHandle instanceHandle)
 This operation requests the Data Distribution Service to modify the instance and mark it for deletion (abstract). More...
 
ReturnCode WriteDisposeWithTimestamp (< type > instanceData, Time sourceTimestamp)
 This operation requests the Data Distribution Service to modify the instance and mark it for deletion and provides a value for the sourceTimestamp explicitly (abstract). More...
 
ReturnCode WriteDisposeWithTimestamp (< type > instanceData, InstanceHandle instanceHandle, Time sourceTimestamp)
 This operation requests the Data Distribution Service to modify the instance and mark it for deletion and provides a value for the sourceTimestamp explicitly (abstract). More...
 
ReturnCode WriteWithTimestamp (< type > instanceData, Time sourceTimestamp)
 This operation modifies the value of a data instance (abstract). More...
 
ReturnCode WriteWithTimestamp (< type > instanceData, InstanceHandle instanceHandle, Time sourceTimestamp)
 This operation modifies the value of a data instance and provides a value for the sourceTimestamp explicitly (abstract). 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.IDataWriter
IDataWriterListener Listener [get]
 This property returns the IDataWriterListener currently attached to the IDataWriter. More...
 
IPublisher Publisher [get]
 This property returns the IPublisher to which the IDataWriter belongs. More...
 
ITopic Topic [get]
 This property returns the ITopic which is associated with the IDataWriter. 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

The specialized DataWriter for the fictional type Space::Foo

Note
Class hierarchy in the documentation has been simplified for clearity purposes.
/* Simplest creation of a typed datawriter.
* 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 datawriter. */
DDS.IPublisher publisher = participant.CreatePublisher();
Space.FooDataWriter writer = (Space.FooDataWriter)publisher.CreateDataWriter(topic);
/* Write a sample */
Space.Foo sample;
sample.Bar = 42;
retcode = writer.Write(sample);

Definition at line 1806 of file Typed.cs.

Member Function Documentation

◆ Dispose()

DDS.ReturnCode Space.FooDataWriter.Dispose ( Foo  instanceData,
DDS.InstanceHandle  instanceHandle 
)
inline

This operation requests the Data Distribution Service to mark the instance for deletion.

This operation requests the Data Distribution Service to mark the instance for deletion. Copies of the instance and its corresponding samples, which are stored in every connected DataReader and, dependent on the QoSPolicy settings, also in the Transient and Persistent stores, will be marked for deletion by setting their DDS.InstanceStateKind to NotAliveDisposed.

When this operation is used, the Data Distribution Service will automatically supply the value of the sourceTimestamp that is made available to connected DataReader objects. This timestamp is important for the interpretation of the DDS.DestinationOrderQosPolicy.

As a side effect, this operation asserts liveliness on the DataWriter itself and on the containing IDomainParticipant.

Effects on DataReaders

Actual deletion of the instance administration in a connected DataReader will be postponed until the following conditions have been met:

  • the instance must be unregistered (either implicitly or explicitly) by all connected DataWriters that have previously registered it.
    • A DataWriter can register an instance explicitly by using one of the special operations FooDataWriter.RegisterInstance or FooDataWriter.RegisterInstanceWithTimestamp.
    • A DataWriter can register an instance implicitly by using the special constant DDS.InstanceHandle.Nil in any of the other DataWriter operations.
    • A DataWriter can unregister an instance explicitly by using one of the special operations UnregisterInstance or UnregisterInstanceWithTimestamp.
    • A DataWriter will unregister all its contained instances implicitly when it is deleted.
    • When a DataReader detects a loss of liveliness in one of its connected DataWriters, it will consider all instances registered by that DataWriter as being implicitly unregistered.
  • and the application must have consumed all samples belonging to the instance, either implicitly or explicitly.
    • An application can consume samples explicitly by invoking the take operation, or one of its variants, on its DataReaders.
    • The DataReader can consume disposed samples implicitly when the AutoPurgeDisposedSamplesDelay of the DDS.ReaderDataLifecycleQosPolicy has expired.

The DataReader may also remove instances that haven’t been disposed first: this happens when the AutopurgeNoWriterSamplesDelay of the DDS.ReaderDataLifecycleQosPolicy has expired after the instance is considered unregistered by all connected DataWriters (i.e. when it has a DDS.InstanceStateKind of NotAliveNoWriters).

See also
Reader Data Lifecycle QoS.

Effects on Transient/Persistent Stores

Persistent stores will be postponed until the following conditions have been met:

  • the instance must be unregistered (either implicitly or explicitly) by all connected DataWriters that have previously registered it. (See above.)
  • and the period of time specified by the ServiceCleanupDelay attribute in the DDS.DurabilityServiceQosPolicy on the Topic must have elapsed after the instance is considered unregistered by all connected DataWriters.
See also
Durability Service QoS.

Instance Handle

The DDS.InstanceHandle.Nil constant can be used for the parameter instanceHandle. This indicates the identity of the instance is automatically deduced from the instanceData (by means of the key). If instancHandle is any value other than DDS.InstanceHandle.Nil, it must correspond to the value that was returned by either the FooDataWriter.RegisterInstance operation or the FooDataWriter.RegisterInstanceWithTimestamp operation, when the instance (identified by its key) was registered. If there is no correspondence, the result of the operation is unspecified. The sample that is passed as instanceData is only used to check for consistency between its key values and the supplied instanceHandle: the sample itself will not actually be delivered to the connected DataReaders. Use the FooDataWriter.WriteDispose operation if the sample itself should be delivered together with the dispose request.

Blocking

If the DDS.HistoryQosPolicy is set to KeepAllHistoryQos, the write operation on the DataWriter may block if the modification would cause data to be lost because one of the limits, specified in the DDS.ResourceLimitsQosPolicy, is exceeded. In case the synchronous attribute value of the DDS.ReliabilityQosPolicy is set to true for communicating DataWriters and DataReaders then the DataWriter will wait until all synchronous DataReaders have acknowledged the data. Under these circumstances, the MaxBlockingTime attribute of the DDS.ReliabilityQosPolicy configures the maximum time the write operation may block (either waiting for space to become available or data to be acknowledged). If MaxBlockingTime elapses before the DataWriter is able to store the modification without exceeding the limits and all expected acknowledgements are received, the Dispose operation will fail and returns DDS.ReturnCode Timeout.

Sample Validation

Since the sample that is passed as instanceData is merely used to check for consistency between its key values and the supplied instanceHandle, only these keyfields will be validated against the restrictions imposed by the IDL to C# language mapping, where:

  • a string (bounded or unbounded) may not be null. (Use “” for an empty string instead)
  • the length of a bounded string may not exceed the limit specified in IDL
  • the length of a bounded sequence may not exceed the limit specified in IDL
  • the length of an array must exactly match the size specified in IDL

If any of these restrictions is violated, the operation will fail and return a DDS.ReturnCode BadParameter. More specific information about the context of this error will be written to the error log.

Parameters
instanceDataThe actual instance to be disposed of.
instanceHandleThe handle to the instance to be disposed of.
Returns
Return codes are:
  • DDS.ReturnCode Ok - The Data Distribution Service is informed that the instance data must be disposed of.
  • DDS.ReturnCode Error - An internal error has occurred.
  • DDS.ReturnCode BadParameter - The handle is not a valid handle or instanceData is not a valid sample.
  • DDS.ReturnCode AlreadyDeleted - The DataWriter has already been deleted.
  • DDS.ReturnCode NotEnabled - The DataWriter is not enabled.
  • DDS.ReturnCode PreconditionNotMet - The handle has not been registered with this DataWriter.
  • DDS.ReturnCode Timeout - Either the current action overflowed the available resources as specified by the combination of the DDS.ReliablityQosPolicy, DDS.HistoryQosPolicy and DDS.ResourceLimitsQosPolicy, or the current action was waiting for data delivery acknowledgement by synchronous DataReaders.This caused blocking of the Dispose operation, which could not be resolved before MaxBlockingTime of the DDS.ReliabilityQosPolicy elapsed.
  • DDS.ReturnCode OutOfResources - The DDS ran out of resources to complete this operation.

Definition at line 2430 of file Typed.cs.

◆ DisposeWithTimestamp()

DDS.ReturnCode Space.FooDataWriter.DisposeWithTimestamp ( Foo  instanceData,
DDS.InstanceHandle  instanceHandle,
DDS.Time  sourceTimestamp 
)
inline

This operation requests the Data Distribution Service to mark the instance for deletion and provides a value for the sourceTimestamp explicitly.

This operation behaves simular to the Dispose(Foo instanceData, DDS.InstanceHandle instanceHandle) operation except that the application provides the value for the parameter sourceTimestamp that is made available to DataReader objects. This timestamp is important for the interpretation of the DDS.DestinationOrderQosPolicy.

Parameters
instanceDataThe data to be written.
instanceHandleThe handle to the instance as supplied by FooDataWriter.RegisterInstance.
sourceTimestampThe timestamp used.
Returns
Return codes are:
  • DDS.ReturnCode Ok - The Data Distribution Service is informed that the instance data must be disposed of.
  • DDS.ReturnCode Error - An internal error has occurred.
  • DDS.ReturnCode BadParameter - The handle is not a valid handle or instanceData is not a valid sample.
  • DDS.ReturnCode AlreadyDeleted - The DataWriter has already been deleted.
  • DDS.ReturnCode NotEnabled - The DataWriter is not enabled.
  • DDS.ReturnCode PreconditionNotMet - The handle has not been registered with this DataWriter.
  • DDS.ReturnCode Timeout - Either the current action overflowed the available resources as specified by the combination of the DDS.ReliablityQosPolicy, DDS.HistoryQosPolicy and DDS.ResourceLimitsQosPolicy, or the current action was waiting for data delivery acknowledgement by synchronous DataReaders.This caused blocking of the DisposeWithTimestamp operation, which could not be resolved before MaxBlockingTime of the DDS.ReliabilityQosPolicy elapsed.
  • DDS.ReturnCode OutOfResources - The DDS ran out of resources to complete this operation.

Definition at line 2470 of file Typed.cs.

◆ GetKeyValue()

DDS.ReturnCode Space.FooDataWriter.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 an DDS.IstanceHandle.Nil constant as an instanceHandle, the operation will return DDS.ReturnCode BadParameter. The operation will only fill the fields that form the key inside the provide key parameter. This means that the non-key fields are not applicable and may contain garbage.

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

Definition at line 2761 of file Typed.cs.

◆ LookupInstance()

DDS.InstanceHandle Space.FooDataWriter.LookupInstance ( Foo  instanceData)
inline

This operation returns the value of the instance handle which corresponds to the provided instanceData.

This operation returns the value of the instance handle which corresponds to the instanceData. The instanceData parameter is only used for the purpose of examining the fields that define the key. The instance handle can be used in any Write, Dispose or Unregister operations (or their timestamped variants) that operate on a specific instance. Note that DataWriter instance handles are local, and are not interchangeable with DataReader instance handles nor with instance handles of an other DataWriter.

This operation does not register the instance in question. If the instance has not been previously registered, if the DataWriter is already deleted or if for any other reason the Service is unable to provide an instance handle, the Service will return the special value DDS.InstanceHandle.Nil.

Sample Validation

Since the sample that is passed as instanceData is merely used to check for consistency between its key values and the supplied instanceHandle, only these keyfields will be validated against the restrictions imposed by the IDL to C# language mapping, where:

  • a string (bounded or unbounded) may not be null. (Use “” for an empty string instead)
  • the length of a bounded string may not exceed the limit specified in IDL

If any of these restrictions is violated, the operation will fail and return a DDS.InstanceHandle.Nil. More specific information about the context of this error will be written to the error log.

Parameters
instanceDataA reference to the instance for which the corresponding instance handle needs to be looked up.
Returns
The instance handle which corresponds to the instanceData.

Definition at line 2806 of file Typed.cs.

◆ RegisterInstance()

DDS.InstanceHandle Space.FooDataWriter.RegisterInstance ( Foo  instanceData)
inline

This operation informs the Data Distribution Service that the application will be modifying a particular instance.

This operation informs the Data Distribution Service that the application will be modifying a particular instance. This operation may be invoked prior to calling any operation that modifies the instance, such as FooDataWriter.Write, FooDataWriter.WriteWithTimestamp, FooDataWriter.UnregisterInstance, FooDataWriter.UnregisterInstanceWithTimestamp, FooDataWriter.Dispose, FooDataWriter.DisposeWithTimestamp, FooDataWriter.WriteDispose and FooDataWriter.WriteDisposeWithTimestamp. When the application does register the instance before modifying, the Data Distribution Service will handle the instance more efficiently. It takes as a parameter (instanceData) an instance (to get the key value) and returns a handle that can be used in successive FooDataWriter operations. In case of an error, DDS.InstanceHandle.Nil is returned.

The explicit use of this operation is optional as the application can directly call the FooDataWriter.Write, FooDataWriter.WriteWithTimestamp,FooDataWriter. UnregisterInstance, FooDataWriter.UnregisterInstanceWithTimestamp, FooDataWriter.Dispose, FooDataWriter.DisposeWithTimestamp, FooDataWriter.WriteDispose and FooDataWriter.WriteDisposeWithTimestamp operations and specify a DDS.InstanceHandle.Nil value to indicate that the sample should be examined to identify the instance. When this operation is used, the Data Distribution Service will automatically supply the value of the SourceTimestamp that is made available to connected FooDataReader objects. This timestamp is important for the interpretation of the DDS.DestinationOrderQosPolicy.

Blocking

If the DDS.HistoryQosPolicy is set to KeepAllHistoryQos, the FooDataWriter.RegisterInstance operation on the DataWriter may block if the modification would cause data to be lost because one of the limits, specified in the DDS.ResourceLimitsQosPolicy, to be exceeded. In case the synchronous attribute value of the DDS.ReliabilityQosPolicy is set to true for communicating DataWriters and DataReaders then the DataWriter will wait until all synchronous DataReaders have acknowledged the data. Under these circumstances, the MaxBlockingTime attribute of the DDS.ReliabilityQosPolicy configures the maximum time the FooDataWriter.RegisterInstance operation may block (either waiting for space to become available or data to be acknowledged). If MaxBlockingTime elapses before the DataWriter is able to store the modification without exceeding the limits and all expected acknowledgements are received, the FooDataWriter.RegisterInstance operation will fail and returns DDS.InstanceHandle.Nil.

Sample Validation

Since the sample that is passed as instanceData is merely used to determine the identity based on the uniqueness of its key values, only the keyfields will be validated against the restrictions imposed by the IDL to C# language mapping, where:

  • a string (bounded or unbounded) may not be null. (Use “” for an empty string instead)
  • the length of a bounded string may not exceed the limit specified in IDL

If any of these restrictions is violated, the operation will fail and return a DDS.InstanceHandle.Nil. More specific information about the context of this error will be written to the error log.

Multiple Calls

If this operation is called for an already registered instance, it just returns the already allocated instance handle. This may be used to look up and retrieve the handle allocated to a given instance.

Parameters
instanceDataThe instance, which the application writes to or disposes of.
Returns
Return codes are:

Definition at line 1883 of file Typed.cs.

◆ RegisterInstanceWithTimestamp()

DDS.InstanceHandle Space.FooDataWriter.RegisterInstanceWithTimestamp ( Foo  instanceData,
DDS.Time  sourceTimestamp 
)
inline

This operation will inform the Data Distribution Service that the application will be modifying a particular instance and provides a value for the sourceTimestamp explicitly.

This operation performs the same functions as FooDataWriter.RegisterInstance except that the application provides the value for the sourceTimestamp that is made available to connected DataReader objects. This timestamp is important for the interpretation of the DDS.DestinationOrderQosPolicy.

Multiple Calls

If this operation is called for an already registered instance, it just returns the already allocated instance handle. The sourceTimestamp is ignored in that case.

Parameters
instanceDataThe instance, which the application writes to or disposes of.
sourceTimestampThe timestamp used.
Returns
Return codes are:

Definition at line 1916 of file Typed.cs.

◆ UnregisterInstance()

DDS.ReturnCode Space.FooDataWriter.UnregisterInstance ( Foo  instanceData,
DDS.InstanceHandle  instanceHandle 
)
inline

This operation informs the Data Distribution Service that the application will not be modifying a particular instance any more. explicitly.

This operation informs the Data Distribution Service that the application will not be modifying a particular instance any more. Therefore, this operation reverses the action of FooDataWriter.RegisterInstance or FooDataWriter.RegisterInstanceWithTimestamp. It should only be called on an instance that is currently registered. This operation should be called just once per instance, regardless of how many times FooDataWriter.RegisterInstance was called for that instance. This operation also indicates that the Data Distribution Service can locally remove all information regarding that instance. The application should not attempt to use the handle, previously allocated to that instance, after calling this operation. When this operation is used, the Data Distribution Service will automatically supply the value of the SourceTimestamp that is made available to connected DataReader objects. This timestamp is important for the interpretation of the DDS.DestinationOrderQosPolicy.

Effects

If, after unregistering, the application wants to modify (write or dispose) the instance, it has to register the instance again, or it has to use the special constant DDS.InstanceHandle.Nil.

This operation does not indicate that the instance should be deleted (that is the purpose of dispose). This operation just indicates that the DataWriter no longer has “anything to say” about the instance. If there is no other DataWriter that has registered the instance as well, then the DDS.InstanceStateKind in all connected DataReaders will be changed to NotAliveNoWriters InstanceState, provided this DDS.InstanceStateKind was not already set to NotAliveDisposed. In the last case the DDS.InstanceStateKind will not be effected by the UnregisterInstance call.

See also
The SampleInfo

This operation can affect the ownership of the data instance. If the DataWriter was the exclusive owner of the instance, calling this operation will release that ownership, meaning ownership may be transferred to another, possibly lower strength, DataWriter. The operation must be called only on registered instances. Otherwise the operation returns the error DDS.ReturnCode PreconditionNotMet.

Instance Handle

The special constant DDS.InstanceHandle.Nil can be used for the parameter handle. This indicates that the identity of the instance is automatically deduced from the instanceData (by means of the key). If handle is any value other than the special constant DDS.InstanceHandle.Nil, then it must correspond to the value returned by FooDataWriter.RegisterInstance or FooDataWriter.RegisterInstanceWithTimestamp when the instance (identified by its key) was registered. If there is no correspondence, the result of the operation is unspecified. The sample that is passed as instanceData is only used to check for consistency between its key values and the supplied instanceHandle: the sample itself will not actually be delivered to the connected DataReaders.

Blocking

If the DDS.HistoryQosPolicy is set to KeepAllHistoryQos, the UnregisterInstance operation on the DataWriter may block if the modification would cause data to be lost because one of the limits, specified in the DDS.ResourceLimitsQosPolicy, to be exceeded. In case the synchronous attribute value of the DDS.ReliabilityQosPolicy is set to true for communicating DataWriters and DataReaders then the DataWriter will wait until all synchronous DataReaders have acknowledged the data. Under these circumstances, the MaxBlockingTime attribute of the DDS.ReliabilityQosPolicy configures the maximum time the UnregisterInstance operation may block (either waiting for space to become available or data to be acknowledged). If MaxBlockingTime elapses before the DataWriter is able to store the modification without exceeding the limits and all expected acknowledgements are received, the UnregisterInstance operation will fail and returns DDS.InstanceHandle.Nil.

Sample Validation

Since the sample that is passed as instanceData is merely used to check for consistency between its key values and the supplied instanceHandle, only these keyfields will be validated against the restrictions imposed by the IDL to C# language mapping, where:

  • a string (bounded or unbounded) may not be null. (Use “” for an empty string instead)
  • the length of a bounded string may not exceed the limit specified in IDL

If any of these restrictions is violated, the operation will fail and return a DDS.ReturnCode BadParameter. More specific information about the context of this error will be written to the error log.

Parameters
instanceDataThe instance, which the application writes to or disposes of.
instanceHandleThe handle to the Instance, which has been used for writing and disposing.
Returns
Return codes are:
  • DDS.ReturnCode Ok - The Data Distribution Service is informed that the instance will not be modified any more.
  • DDS.ReturnCode Error - An internal error has occurred.
  • DDS.ReturnCode BadParameter - The instanceHandle is not a valid handle or the instanceData is not a valid sample.
  • DDS.ReturnCode AlreadyDeleted - The DataWriter has already been deleted.
  • DDS.ReturnCode NotEnabled - The DataWriter is not enabled.
  • DDS.ReturnCode PreconditionNotMet - The handle has not been registered with this DataWriter.
  • DDS.ReturnCode Timeout - Either the current action overflowed the available resources as specified by the combination of the DDS.ReliablityQosPolicy, DDS.HistoryQosPolicy and DDS.ResourceLimitsQosPolicy, or the current action was waiting for data delivery acknowledgement by synchronous DataReaders. This caused blocking of the UnregisterInstance operation, which could not be resolved before MaxBlockingTime of the DDS.ReliabilityQosPolicy elapsed.
  • DDS.ReturnCode OutOfResources - The DDS ran out of resources to complete this operation.

Definition at line 2039 of file Typed.cs.

◆ UnregisterInstanceWithTimestamp()

DDS.ReturnCode Space.FooDataWriter.UnregisterInstanceWithTimestamp ( Foo  instanceData,
DDS.InstanceHandle  instanceHandle,
DDS.Time  sourceTimestamp 
)
inline

This operation will inform the Data Distribution Service that the application will not be modifying a particular instance any more and provides a value for the sourceTimestamp explicitly.

This operation performs the same functions as UnregisterInstance except that the application provides the value for the sourceTimestamp that is made available to connected DataReader objects. This timestamp is important for the interpretation of the DDS.DestinationOrderQosPolicy.

Parameters
instanceDataThe instance, which the application writes to or disposes of.
instanceHandleThe handle to the Instance, which has been used for writing and disposing.
sourceTimestampThe timestamp used.
Returns
Return codes are:
  • DDS.ReturnCode Ok - The Data Distribution Service is informed that the instance will not be modified any more.
  • DDS.ReturnCode Error - An internal error has occurred.
  • DDS.ReturnCode BadParameter - The instanceHandle is not a valid handle or the instanceData is not a valid sample.
  • DDS.ReturnCode AlreadyDeleted - The DataWriter has already been deleted.
  • DDS.ReturnCode NotEnabled - The DataWriter is not enabled.
  • DDS.ReturnCode PreconditionNotMet - The handle has not been registered with this DataWriter.
  • DDS.ReturnCode Timeout - Either the current action overflowed the available resources as specified by the combination of the DDS.ReliablityQosPolicy, DDS.HistoryQosPolicy and DDS.ResourceLimitsQosPolicy, or the current action was waiting for data delivery acknowledgement by synchronous DataReaders. This caused blocking of the UnregisterInstanceWithTimestamp operation, which could not be resolved before MaxBlockingTime of the DDS.ReliabilityQosPolicy elapsed.
  • DDS.ReturnCode OutOfResources - The DDS ran out of resources to complete this operation.

Definition at line 2084 of file Typed.cs.

◆ Write() [1/2]

DDS.ReturnCode Space.FooDataWriter.Write ( Foo  instanceData)
inline

This operation modifies the value of a data instance.

This operation behaves simular to the Write(Foo instanceData, DDS.InstanceHandle instanceHandle) operation where the instanceHandle is specified as DDS.InstanceHandle.Nil.

Parameters
instanceDataThe data to be written.
Returns
Return codes are:
  • DDS.ReturnCode Ok - the value of a data instance is modified.
  • DDS.ReturnCode Error - An internal error has occurred.
  • DDS.ReturnCode BadParameter - The handle is not a valid handle or instanceData is not a valid sample.
  • DDS.ReturnCode AlreadyDeleted - The DataWriter has already been deleted.
  • DDS.ReturnCode NotEnabled - The DataWriter is not enabled.
  • DDS.ReturnCode PreconditionNotMet - The handle has not been registered with this DataWriter.
  • DDS.ReturnCode Timeout - Either the current action overflowed the available resources as specified by the combination of the DDS.ReliablityQosPolicy, DDS.HistoryQosPolicy and DDS.ResourceLimitsQosPolicy, or the current action was waiting for data delivery acknowledgement by synchronous DataReaders.This caused blocking of the Write operation, which could not be resolved before MaxBlockingTime of the DDS.ReliabilityQosPolicy elapsed.
  • DDS.ReturnCode OutOfResources - The DDS ran out of resources to complete this operation.

Definition at line 2119 of file Typed.cs.

◆ Write() [2/2]

DDS.ReturnCode Space.FooDataWriter.Write ( Foo  instanceData,
DDS.InstanceHandle  instanceHandle 
)
inline

This operation modifies the value of a data instance.

This operation modifies the value of a data instance. When this operation is used, the Data Distribution Service will automatically supply the value of the SourceTimestamp that is made available to connected DataReader objects. This timestamp is important for the interpretat ion of the DDS.DestinationOrderQosPolicy. As a side effect, this operation asserts liveliness on the DataWriter itself and on the containing IDomainParticipant. Before writing data to an instance, the instance may be registered with the FooDataWriter.RegisterInstance or FooDataWriter.RegisterInstanceWithTimestamp operation. The handle returned by one of the FooDataWriter.RegisterInstance operations can be supplied to the parameter handle of the write operation. However, it is also possible to supply the special constant DDS.InstanceHandle.Nil, which means that the identity of the instance is automatically deduced from the instanceData (identified by the key).

Instance Handle

The special constant DDS.InstanceHandle.Nil can be used for the parameter handle. This indicates the identity of the instance is automatically deduced from the instanceData (by means of the key). If handle is any value other than the special constant DDS.InstanceHandle.Nil, it must correspond to the value returned by FooDataWriter.RegisterInstance or FooDataWriter.RegisterInstanceWithTimestamp when the instance (identified by its key) was registered. Passing such a registered handle helps the Data Distribution Service to process the sample more efficiently. If there is no correspondence between handle and sample, the result of the operation is unspecified.

Blocking

If the DDS.HistoryQosPolicy is set to KeepAllHistoryQos, the write operation on the DataWriter may block if the modification would cause data to be lost because one of the limits, specified in the DDS.ResourceLimitsQosPolicy, is exceeded. In case the synchronous attribute value of the DDS.ReliabilityQosPolicy is set to true for communicating DataWriters and DataReaders then the DataWriter will wait until all synchronous DataReaders have acknowledged the data. Under these circumstances, the MaxBlockingTime attribute of the DDS.ReliabilityQosPolicy configures the maximum time the write operation may block (either waiting for space to become available or data to be acknowledged). If MaxBlockingTime elapses before the DataWriter is able to store the modification without exceeding the limits and all expected acknowledgements are received, the write operation will fail and returns DDS.ReturnCode Timeout.

Sample Validation

Before the sample is accepted by the DataWriter, it will be validated against the restrictions imposed by the IDL to C# language mapping, where:

  • a string (bounded or unbounded) may not be null. (Use “” for an empty string instead)
  • the length of a bounded string may not exceed the limit specified in IDL
  • the length of a bounded sequence may not exceed the limit specified in IDL
  • the length of an array must exactly match the size specified in IDL

If any of these restrictions is violated, the operation will fail and return a DDS.ReturnCode BadParameter. More specific information about the context of this error will be written to the error log.

Parameters
instanceDataThe data to be written.
instanceHandleThe handle to the instance as supplied by FooDataWriter.RegisterInstance.
Returns
Return codes are:
  • DDS.ReturnCode Ok - the value of a data instance is modified.
  • DDS.ReturnCode Error - An internal error has occurred.
  • DDS.ReturnCode BadParameter - The handle is not a valid handle or instanceData is not a valid sample.
  • DDS.ReturnCode AlreadyDeleted - The DataWriter has already been deleted.
  • DDS.ReturnCode NotEnabled - The DataWriter is not enabled.
  • DDS.ReturnCode PreconditionNotMet - The handle has not been registered with this DataWriter.
  • DDS.ReturnCode Timeout - Either the current action overflowed the available resources as specified by the combination of the DDS.ReliablityQosPolicy, DDS.HistoryQosPolicy and DDS.ResourceLimitsQosPolicy, or the current action was waiting for data delivery acknowledgement by synchronous DataReaders.This caused blocking of the Write operation, which could not be resolved before MaxBlockingTime of the DDS.ReliabilityQosPolicy elapsed.
  • DDS.ReturnCode OutOfResources - The DDS ran out of resources to complete this operation.

Definition at line 2209 of file Typed.cs.

◆ WriteDispose() [1/2]

DDS.ReturnCode Space.FooDataWriter.WriteDispose ( Foo  instanceData)
inline

This operation requests the Data Distribution Service to modify the instance and mark it for deletion.

This operation behaves simular to the WriteDispose(Foo instanceData, DDS.InstanceHandle instanceHandle) operation where the instanceHandle is specified as DDS.InstanceHandle.Nil.

Parameters
instanceDataThe data to be written.
Returns
Return codes are:
  • DDS.ReturnCode Ok - The Data Distribution Service has modified the instance and marked it for deletion
  • DDS.ReturnCode Error - An internal error has occurred.
  • DDS.ReturnCode BadParameter - The handle is not a valid handle or instanceData is not a valid sample.
  • DDS.ReturnCode AlreadyDeleted - The DataWriter has already been deleted.
  • DDS.ReturnCode NotEnabled - The DataWriter is not enabled.
  • DDS.ReturnCode PreconditionNotMet - The handle has not been registered with this DataWriter.
  • DDS.ReturnCode Timeout - Either the current action overflowed the available resources as specified by the combination of the DDS.ReliablityQosPolicy, DDS.HistoryQosPolicy and DDS.ResourceLimitsQosPolicy, or the current action was waiting for data delivery acknowledgement by synchronous DataReaders.This caused blocking of the Write operation, which could not be resolved before MaxBlockingTime of the DDS.ReliabilityQosPolicy elapsed.
  • DDS.ReturnCode OutOfResources - The DDS ran out of resources to complete this operation.

Definition at line 2507 of file Typed.cs.

◆ WriteDispose() [2/2]

DDS.ReturnCode Space.FooDataWriter.WriteDispose ( Foo  instanceData,
DDS.InstanceHandle  instanceHandle 
)
inline

This operation requests the Data Distribution Service to modify the instance and mark it for deletion.

This operation requests the Data Distribution Service to modify the instance and mark it for deletion. Copies of the instance and its corresponding samples, which are stored in every connected DataReader and, dependent on the QoSPolicy settings, also in the Transient and Persistent stores, will be modified and marked for deletion by setting their DDS.InstanceStateKind to NotAliveDisposed.

When this operation is used, the Data Distribution Service will automatically supply the value of the sourceTimestamp that is made available to connected DataReader objects. This timestamp is important for the interpretation of the DDS.DestinationOrderQosPolicy.

As a side effect, this operation asserts liveliness on the DataWriter itself and on the containing IDomainParticipant.

Effects on DataReaders

Actual deletion of the instance administration in a connected DataReader will be postponed until the following conditions have been met:

  • the instance must be unregistered (either implicitly or explicitly) by all connected DataWriters that have previously registered it.
    • A DataWriter can register an instance explicitly by using one of the special operations FooDataWriter.RegisterInstance or FooDataWriter.RegisterInstanceWithTimestamp.
    • A DataWriter can register an instance implicitly by using the special constant DDS.InstanceHandle.Nil in any of the other DataWriter operations.
    • A DataWriter can unregister an instance explicitly by using one of the special operations UnregisterInstance or UnregisterInstanceWithTimestamp.
    • A DataWriter will unregister all its contained instances implicitly when it is deleted.
    • When a DataReader detects a loss of liveliness in one of its connected DataWriters, it will consider all instances registered by that DataWriter as being implicitly unregistered.
  • and the application must have consumed all samples belonging to the instance, either implicitly or explicitly.
    • An application can consume samples explicitly by invoking the take operation, or one of its variants, on its DataReaders.
    • The DataReader can consume disposed samples implicitly when the AutopurgeDisposedSamplesDelay of the ReaderData DDS.LifecycleQosPolicy has expired.

The DataReader may also remove instances that haven’t been disposed first: this happens when the AutopurgeNoWriterSamplesDelay of the DDS.ReaderDataLifecycleQosPolicy has expired after the instance is considered unregistered by all connected DataWriters (i.e. when it has a DDS.InstanceStateKind of NotAliveNoWriters).

See also
Reader Data Lifecycle QoS.

Effects on Transient/Persistent Stores

Persistent stores will be postponed until the following conditions have been met:

  • the instance must be unregistered (either implicitly or explicitly) by all connected DataWriters that have previously registered it. (See above.)
  • and the period of time specified by the ServiceCleanupDelay attribute in the DDS.DurabilityServiceQosPolicy on the Topic must have elapsed after the instance is considered unregistered by all connected DataWriters.
See also
Durability Service QoS.

Instance Handle

The DDS.InstanceHandle.Nil constant can be used for the parameter instanceHandle. This indicates the identity of the instance is automatically deduced from the instanceData (by means of the key). If instancHandle is any value other than DDS.InstanceHandle.Nil, it must correspond to the value that was returned by either the FooDataWriter.RegisterInstance operation or the FooDataWriter.RegisterInstanceWithTimestamp operation, when the instance (identified by its key) was registered. If there is no correspondence, the result of the operation is unspecified. The sample that is passed as instanceData will actually be delivered to the connected DataReaders, but will immediately be marked for deletion..

Blocking

If the DDS.HistoryQosPolicy is set to KeepAllHistoryQos, the write operation on the DataWriter may block if the modification would cause data to be lost because one of the limits, specified in the DDS.ResourceLimitsQosPolicy, is exceeded. In case the synchronous attribute value of the DDS.ReliabilityQosPolicy is set to true for communicating DataWriters and DataReaders then the DataWriter will wait until all synchronous DataReaders have acknowledged the data. Under these circumstances, the MaxBlockingTime attribute of the DDS.ReliabilityQosPolicy configures the maximum time the write operation may block (either waiting for space to become available or data to be acknowledged). If MaxBlockingTime elapses before the DataWriter is able to store the modification without exceeding the limits and all expected acknowledgements are received, the WriteDispose operation will fail and returns DDS.ReturnCode Timeout.

Sample Validation

Since the sample that is passed as instanceData is merely used to check for consistency between its key values and the supplied instanceHandle, only these keyfields will be validated against the restrictions imposed by the IDL to C# language mapping, where:

  • a string (bounded or unbounded) may not be null. (Use “” for an empty string instead)
  • the length of a bounded string may not exceed the limit specified in IDL
  • the length of a bounded sequence may not exceed the limit specified in IDL
  • the length of an array must exactly match the size specified in IDL

If any of these restrictions is violated, the operation will fail and return a DDS.ReturnCode BadParameter. More specific information about the context of this error will be written to the error log.

Parameters
instanceDataThe actual instance to be disposed of.
instanceHandleThe handle to the instance to be disposed of.
Returns
Return codes are:
  • DDS.ReturnCode Ok - The Data Distribution Service has modified the instance and marked it for deletion.
  • DDS.ReturnCode Error - An internal error has occurred.
  • DDS.ReturnCode BadParameter - The handle is not a valid handle or instanceData is not a valid sample.
  • DDS.ReturnCode AlreadyDeleted - The DataWriter has already been deleted.
  • DDS.ReturnCode NotEnabled - The DataWriter is not enabled.
  • DDS.ReturnCode PreconditionNotMet - The handle has not been registered with this DataWriter.
  • DDS.ReturnCode Timeout - Either the current action overflowed the available resources as specified by the combination of the DDS.ReliablityQosPolicy, DDS.HistoryQosPolicy and DDS.ResourceLimitsQosPolicy, or the current action was waiting for data delivery acknowledgement by synchronous DataReaders.This caused blocking of the Dispose operation, which could not be resolved before MaxBlockingTime of the DDS.ReliabilityQosPolicy elapsed.
  • DDS.ReturnCode OutOfResources - The DDS ran out of resources to complete this operation.

Definition at line 2651 of file Typed.cs.

◆ WriteDisposeWithTimestamp() [1/2]

DDS.ReturnCode Space.FooDataWriter.WriteDisposeWithTimestamp ( Foo  instanceData,
DDS.Time  sourceTimestamp 
)
inline

This operation requests the Data Distribution Service to modify the instance and mark it for deletion and provides a value for the sourceTimestamp explicitly.

This operation behaves simular to the WriteDisposeWithTimestamp(Foo instanceData, DDS.InstanceHandle instanceHandle, DDS.Time sourceTimestamp) operation operation where the instanceHandle is specified as DDS.InstanceHandle.Nil.

Parameters
instanceDataThe data to be written.
sourceTimestampThe timestamp used.
Returns
Return codes are:
  • DDS.ReturnCode Ok - The Data Distribution Service is informed that the instance data must be disposed of.
  • DDS.ReturnCode Error - An internal error has occurred.
  • DDS.ReturnCode BadParameter - The handle is not a valid handle or instanceData is not a valid sample.
  • DDS.ReturnCode AlreadyDeleted - The DataWriter has already been deleted.
  • DDS.ReturnCode NotEnabled - The DataWriter is not enabled.
  • DDS.ReturnCode PreconditionNotMet - The handle has not been registered with this DataWriter.
  • DDS.ReturnCode Timeout - Either the current action overflowed the available resources as specified by the combination of the DDS.ReliablityQosPolicy, DDS.HistoryQosPolicy and DDS.ResourceLimitsQosPolicy, or the current action was waiting for data delivery acknowledgement by synchronous DataReaders.This caused blocking of the DisposeWithTimestamp operation, which could not be resolved before MaxBlockingTime of the DDS.ReliabilityQosPolicy elapsed.
  • DDS.ReturnCode OutOfResources - The DDS ran out of resources to complete this operation.

Definition at line 2689 of file Typed.cs.

◆ WriteDisposeWithTimestamp() [2/2]

DDS.ReturnCode Space.FooDataWriter.WriteDisposeWithTimestamp ( Foo  instanceData,
DDS.InstanceHandle  instanceHandle,
DDS.Time  sourceTimestamp 
)
inline

This operation requests the Data Distribution Service to modify the instance and mark it for deletion and provides a value for the sourceTimestamp explicitly.

This operation behaves simular to the WriteDispose(Foo instanceData, DDS.InstanceHandle instanceHandle) operation except that the application provides the value for the parameter sourceTimestamp that is made available to DataReader objects. This timestamp is important for the interpretation of the DDS.DestinationOrderQosPolicy.

Parameters
instanceDataThe data to be written.
instanceHandleThe handle to the instance as supplied by FooDataWriter.RegisterInstance.
sourceTimestampThe timestamp used.
Returns
Return codes are:
  • DDS.ReturnCode Ok - The Data Distribution Service is informed that the instance data must be disposed of.
  • DDS.ReturnCode Error - An internal error has occurred.
  • DDS.ReturnCode BadParameter - The handle is not a valid handle or instanceData is not a valid sample.
  • DDS.ReturnCode AlreadyDeleted - The DataWriter has already been deleted.
  • DDS.ReturnCode NotEnabled - The DataWriter is not enabled.
  • DDS.ReturnCode PreconditionNotMet - The handle has not been registered with this DataWriter.
  • DDS.ReturnCode Timeout - Either the current action overflowed the available resources as specified by the combination of the DDS.ReliablityQosPolicy, DDS.HistoryQosPolicy and DDS.ResourceLimitsQosPolicy, or the current action was waiting for data delivery acknowledgement by synchronous DataReaders.This caused blocking of the DisposeWithTimestamp operation, which could not be resolved before MaxBlockingTime of the DDS.ReliabilityQosPolicy elapsed.
  • DDS.ReturnCode OutOfResources - The DDS ran out of resources to complete this operation.

Definition at line 2729 of file Typed.cs.

◆ WriteWithTimestamp() [1/2]

DDS.ReturnCode Space.FooDataWriter.WriteWithTimestamp ( Foo  instanceData,
DDS.Time  sourceTimestamp 
)
inline

This operation modifies the value of a data instance.

This operation behaves simular to the WriteWithTimestamp(Foo instanceData, DDS.InstanceHandle instanceHandle, DDS.Time sourceTimestamp) operation where the instanceHandle is specified as DDS.InstanceHandle.Nil.

Parameters
instanceDataThe data to be written.
sourceTimestampThe timestamp used.
Returns
Return codes are:
  • DDS.ReturnCode Ok - the value of a data instance is modified.
  • DDS.ReturnCode Error - An internal error has occurred.
  • DDS.ReturnCode BadParameter - The handle is not a valid handle or instanceData is not a valid sample.
  • DDS.ReturnCode AlreadyDeleted - The DataWriter has already been deleted.
  • DDS.ReturnCode NotEnabled - The DataWriter is not enabled.
  • DDS.ReturnCode PreconditionNotMet - The handle has not been registered with this DataWriter.
  • DDS.ReturnCode Timeout - Either the current action overflowed the available resources as specified by the combination of the DDS.ReliablityQosPolicy, DDS.HistoryQosPolicy and DDS.ResourceLimitsQosPolicy, or the current action was waiting for data delivery acknowledgement by synchronous DataReaders.This caused blocking of the Write operation, which could not be resolved before MaxBlockingTime of the DDS.ReliabilityQosPolicy elapsed.
  • DDS.ReturnCode OutOfResources - The DDS ran out of resources to complete this operation.

Definition at line 2245 of file Typed.cs.

◆ WriteWithTimestamp() [2/2]

DDS.ReturnCode Space.FooDataWriter.WriteWithTimestamp ( Foo  instanceData,
DDS.InstanceHandle  instanceHandle,
DDS.Time  sourceTimestamp 
)
inline

This operation modifies the value of a data instance and provides a value for the sourceTimestamp explicitly.

This operation behaves simular to the Write(Foo instanceData, DDS.InstanceHandle instanceHandle) operation except that the application provides the value for the parameter sourceTimestamp that is made available toDataReader objects. This timestamp is important for the interpretation of the DDS.DestinationOrderQosPolicy.

Parameters
instanceDataThe data to be written.
instanceHandleThe handle to the instance as supplied by FooDataWriter.RegisterInstance.
sourceTimestampThe timestamp used.
Returns
Return codes are:
  • DDS.ReturnCode Ok - the value of a data instance is modified.
  • DDS.ReturnCode Error - An internal error has occurred.
  • DDS.ReturnCode BadParameter - The handle is not a valid handle or instanceData is not a valid sample.
  • DDS.ReturnCode AlreadyDeleted - The DataWriter has already been deleted.
  • DDS.ReturnCode NotEnabled - The DataWriter is not enabled.
  • DDS.ReturnCode PreconditionNotMet - The handle has not been registered with this DataWriter.
  • DDS.ReturnCode Timeout - Either the current action overflowed the available resources as specified by the combination of the DDS.ReliablityQosPolicy, DDS.HistoryQosPolicy and DDS.ResourceLimitsQosPolicy, or the current action was waiting for data delivery acknowledgement by synchronous DataReaders.This caused blocking of the Write operation, which could not be resolved before MaxBlockingTime of the DDS.ReliabilityQosPolicy elapsed.
  • DDS.ReturnCode OutOfResources - The DDS ran out of resources to complete this operation.

Definition at line 2284 of file Typed.cs.


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