OpenSplice C# API  v6.x
OpenSplice C# Data Distribution Service Data-Centric Publish-Subscribe API
DDS.IDataWriter Interface Reference

IDataWriter allows the application to set the value of the sample to be published under a given ITopic. More...

Inheritance diagram for DDS.IDataWriter:
Inheritance graph
Collaboration diagram for DDS.IDataWriter:
Collaboration graph

Public Member Functions

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...
 

Properties

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

IDataWriter allows the application to set the value of the sample to be published under a given ITopic.

A IDataWriter is attached to exactly one IPublisher which acts as a factory for it. A IDataWriter is bound to exactly one ITopic and therefore to exactly one data type. The ITopic must exist prior to the IDataWriter's creation. IDataWriter is an abstract class. It must be specialized for each particular application data type. For a fictional application data type Foo (defined in the module Space) the specialized class would be Space.FooDataWriter.

See also
Space.FooDataWriter

Definition at line 3175 of file DdsDcpsInterfaces.cs.

Member Function Documentation

◆ AssertLiveliness()

ReturnCode DDS.IDataWriter.AssertLiveliness ( )

This operation asserts the liveliness for the IDataWriter.

This operation will manually assert the liveliness for the IDataWriter. This way, the Data Distribution Service is informed that the corresponding IDataWriter is still alive. This operation is used in combination with the LivelinessQosPolicy set to ManualByParticipantLivelinessQos or ManualByTopicLivelinessQos. Writing data via the write operation of a IDataWriter will assert the liveliness on the IDataWriter itself and its containing IDomainParticipant. Therefore, AssertLiveliness is only needed when not writing regularly. The liveliness should be asserted by the application, depending on the LivelinessQosPolicy. Asserting the liveliness for this IDataWriter can also be achieved by asserting the liveliness to the IDomainParticipant.

Returns
Return codes are:

◆ Dispose()

ReturnCode DDS.IDataWriter.Dispose ( < type >  instanceData,
InstanceHandle  instanceHandle 
)

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

This abstract operation is defined as a generic operation, which is implemented by the <type>DataWriter class. Therefore, to use this operation, the data type specific implementation of this operation in its respective derived class must be used.

For further explanation see the description for the fictional data type Space.Foo derived Space.FooDataWriter class.

See also
Space.FooDataWriter.Dispose(Foo instanceData, DDS.InstanceHandle instanceHandle)

◆ DisposeWithTimestamp()

ReturnCode DDS.IDataWriter.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).

This abstract operation is defined as a generic operation, which is implemented by the <type>DataWriter class. Therefore, to use this operation, the data type specific implementation of this operation in its respective derived class must be used.

For further explanation see the description for the fictional data type Space.Foo derived Space.FooDataWriter class.

See also
Space.FooDataWriter.DisposeWithTimestamp(Foo instanceData, DDS.InstanceHandle instanceHandle, DDS.Time sourceTimestamp)

◆ GetKeyValue()

ReturnCode DDS.IDataWriter.GetKeyValue ( ref< type >  key,
InstanceHandle  instanceHandle 
)

This operation retrieves the key value of a specific instance (abstract).

This abstract operation is defined as a generic operation, which is implemented by the <type>DataWriter class. Therefore, to use this operation, the data type specific implementation of this operation in its respective derived class must be used.

For further explanation see the description for the fictional data type Space.Foo derived Space.FooDataWriter class.

See also
Space.FooDataWriter.GetKeyValue(ref Foo key, DDS.InstanceHandle instanceHandle)

◆ GetLivelinessLostStatus()

ReturnCode DDS.IDataWriter.GetLivelinessLostStatus ( ref LivelinessLostStatus  status)

This operation obtains the LivelinessLostStatus struct of the IDataWriter.

This struct contains the information whether the liveliness (that the IDataWriter has committed through its LivelinessQosPolicy) was respected. This means, that the status represents whether the IDataWriter failed to actively signal its liveliness within the offered liveliness period. If the liveliness is lost, the IDataReader objects will consider the IDataWriter as no longer alive. The LivelinessLostStatus can also be monitored using a IDataWriterListener or by using the associated IStatusCondition.

Parameters
statusA reference to LivelinessLostStatus where the contents of the LivelinessLostStatus struct of the IDataWriter will be copied into.
Returns
Return values are:

◆ GetMatchedSubscriptionData()

ReturnCode DDS.IDataWriter.GetMatchedSubscriptionData ( ref SubscriptionBuiltinTopicData  subscriptionData,
InstanceHandle  subscriptionHandle 
)

This operation retrieves information on the specified subscription that is currently “associated” with the IDataWriter.

This operation retrieves information on the specified subscription that is currently “associated” with the IDataWriter. That is, a subscription with a matching ITopic and compatible QoS that the application has not indicated should be “ignored” by means of the IgnoreSubscription operation on the IDomainParticipant class.

The subscriptionHandle must correspond to a subscription currently associated with the IDataWriter, otherwise the operation will fail and return ReturnCode BadParameter. The operation GetMatchedSubscriptions can be used to find the subscriptions that are currently matched with the IDataWriter.

The operation may also fail if the infrastructure does not hold the information necessary to fill in the subscriptionData. This is the case when OpenSplice is configured not to maintain discovery information in the Networking Service. (See the description for the NetworkingService/Discovery/enabled property in the Deployment Manual for more information about this subject.) In such cases the operation will return ReturnCode Unsupported.

Parameters
subscriptionData<Reference to the variable in which the subscription data will be returned.
subscriptionHandleA handle to the subscription whose information needs to be retrieved.
Returns
Return codes are:

◆ GetMatchedSubscriptions()

ReturnCode DDS.IDataWriter.GetMatchedSubscriptions ( ref InstanceHandle []  subscriptionHandles)

This operation retrieves the list of subscriptions currently "associated" with the IDataWriter.

This operation retrieves the list of subscriptions currently "associated" with the IDataWriter. That is, subscriptions that have a matching Topic and compatible QoS that the application has not indicated should be “ignored” by means of the IgnoreSubscription operation on the DomainParticipant class.

The handles returned in the subscriptionHandles array are the ones that are used by the DDS implementation to locally identify the corresponding matched subscription entities. You can access more detailed information about a particular subscription by passing its subscriptionHandle to either the GetMatchedSubscriptionData operation or to the ReadInstance operation on the built-in reader for the “DCPSSubscription” topic.

Be aware that since an instance handle is an opaque datatype, it does not necessarily mean that the handles obtained from the GetMatchedSubscriptions operation have the same value as the ones that appear in the InstanceHandle field of the SampleInfo when retrieving the subscription info through corresponding "DCPSSubscriptions" built-in reader. You can’t just compare two handles to determine whether they represent the same subscription. If you want to know whether two handles actually do represent the same subscription, use both handles to retrieve their corresponding SubscriptionBuiltinTopicData samples and then compare the key field of both samples.

The operation may fail if the infrastructure does not locally maintain the connectivity information. This is the case when OpenSplice is configured not to maintain discovery information in the Networking Service. (See the description for the NetworkingService/Discovery/enabled property in the Deployment Manual for more information about this subject.) In such cases the operation will return ReturnCode Unsupported.

Parameters
subscriptionHandlesReference to an array to store the list of associated subscriptions
Returns
Return codes are:

◆ GetOfferedDeadlineMissedStatus()

ReturnCode DDS.IDataWriter.GetOfferedDeadlineMissedStatus ( ref OfferedDeadlineMissedStatus  status)

This operation obtains the OfferedDeadlineMissedStatus struct of the IDataWriter.

This struct contains the information whether the deadline (that the IDataWriter has committed through its DeadlineQosPolicy) was respected for each instance. The OfferedDeadlineMissedStatus can also be monitored using a IDataWriterListener or by using the associated IStatusCondition.

Parameters
statusA reference to OfferedDeadlineMissedStatus where the contents of the OfferedDeadlineMissedStatus struct of the IDataWriter will be copied into.
Returns
Return codes are:

◆ GetOfferedIncompatibleQosStatus()

ReturnCode DDS.IDataWriter.GetOfferedIncompatibleQosStatus ( ref OfferedIncompatibleQosStatus  status)

This operation obtains the OfferedIncompatibleQosStatus struct of the IDataWriter.

This struct contains the information whether a QosPolicy setting was incompatible with the requested QosPolicy setting. This means, that the status represents whether a IDataReader object has been discovered by the IDataWriter with the same ITopic and a requested DataReaderQos that was incompatible with the one offered by the IDataWriter. The OfferedIncompatibleQosStatus can also be monitored using a IDataWriterListener or by using the associated IStatusCondition.

Parameters
statusA reference to OfferedIncompatibleQosStatus where the contents of the OfferedIncompatibleQosStatus struct of the IDataWriter will be copied into.
Returns
Return codes are:

◆ GetPublicationMatchedStatus()

ReturnCode DDS.IDataWriter.GetPublicationMatchedStatus ( ref PublicationMatchedStatus  status)

This operation obtains the PublicationMatchedStatus struct of the IDataWriter.

This object contains the information whether a new match has been discovered for the current publication, or whether an existing match has ceased to exist.

This means that the status represents that either an IDataReader object has been discovered by the IDataWriter with the same ITopic and a compatible Qos, or that a previously discovered IDataReader has ceased to be matched to the current IDataWriter. An IDataReader may cease to match when it gets deleted, when it changes its Qos to a value that is incompatible with the current IDataWriter or when either the IDataWriter or the IDataReader has chosen to put its matching counterpart on its ignore-list using the IgnoreSubcription or IgnorePublication operations on the IDomainParticipant.

The operation may fail if the infrastructure does not hold the information necessary to fill in the PublicationMatchedStatus. This is the case when OpenSplice is configured not to maintain discovery information in the Networking Service. (See the description for the NetworkingService/Discovery/enabled property in the Deployment Manual for more information about this subject.) In this case the operation will return Unsupported.

The OfferedIncompatibleQosStatus can also be monitored using a IDataWriterListener or by using the associated IStatusCondition.

Parameters
statusA reference to OfferedIncompatibleQosStatus where the contents of the OfferedIncompatibleQosStatus struct of the IDataWriter will be copied into.
Returns
Return codes are:

◆ GetQos()

ReturnCode DDS.IDataWriter.GetQos ( ref DataWriterQos  qos)

This operation allows access to the existing list of QosPolicy settings for a IDataWriter.

This operation allows access to the existing list of QosPolicy settings of a IDataWriter on which this operation is used. This DataWriterQos is stored at the location pointed to by the qos parameter.

Parameters
qosA reference to the destination DataWriterQos struct in which the QosPolicy settings will be copied into.
Returns
Return values are:
  • DDS.ReturnCode Ok - the existing set of QoS policy values applied to this IDataWriter has been successfully copied into the specified qos parameter.
  • DDS.ReturnCode Error - an internal error has occurred.
  • DDS.ReturnCode AlreadyDeleted - the IPublisher has already been deleted
  • DDS.ReturnCode OutOfResources - the Data Distribution Service ran out of resources to complete this operation.

◆ LookupInstance()

InstanceHandle DDS.IDataWriter.LookupInstance ( < type >  instanceData)

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

This abstract operation is defined as a generic operation, which is implemented by the <type>DataWriter class. Therefore, to use this operation, the data type specific implementation of this operation in its respective derived class must be used.

For further explanation see the description for the fictional data type Space.Foo derived Space.FooDataWriter class.

See also
Space.FooDataWriter.LookupInstance(Foo instanceData)

◆ RegisterInstance()

InstanceHandle DDS.IDataWriter.RegisterInstance ( < type >  instanceData)

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

This abstract operation is defined as a generic operation, which is implemented by the <type>DataWriter class. Therefore, to use this operation, the data type specific implementation of this operation in its respective derived class must be used.

For further explanation see the description for the fictional data type Space.Foo derived Space.FooDataWriter class.

See also
Space.FooDataWriter.RegisterInstance(Foo instanceData)

◆ RegisterInstanceWithTimestamp()

InstanceHandle DDS.IDataWriter.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).

This abstract operation is defined as a generic operation, which is implemented by the <type>DataWriter class. Therefore, to use this operation, the data type specific implementation of this operation in its respective derived class must be used.

For further explanation see the description for the fictional data type Space.Foo derived Space.FooDataWriter class.

See also
Space.FooDataWriter.RegisterInstanceWithTimestamp(Foo instanceData, Time sourceTimestamp)

◆ SetListener()

ReturnCode DDS.IDataWriter.SetListener ( IDataWriterListener  listener,
StatusKind  mask 
)

This operation attaches a IDataWriterListener to the IDataWriter.

Only one IDataWriterListener can be attached to each IDataWriter. If a IDataWriterListener was already attached, the operation will replace it with the new one. When listener is null, it represents a listener that is treated as a No-Operation for all statuses activated in the bit mask.

Communication Status

For each communication status, the StatusChangedFlag flag is initially set to false. It becomes true whenever that communication status changes. For each communication status activated in the mask, the associated IDataWriterListener operation is invoked and the communication status is reset to fase, as the listener implicitly accesses the status which is passed as a parameter to that operation. The status is reset prior to calling the listener, so if the application calls the Get<status_name>Status from inside the listener it will see the status already reset. An exception to this rule is the null listener, which does not reset the communication statuses for which it is invoked. The following statuses are applicable to the IDataWriterListener:

Be aware that the DDS.StatusKind.PublicationMatchStatus is not applicable when the infrastructure does not have the information available to determine connectivity. This is the case when OpenSplice is configured not to maintain discovery information in the Networking Service. In this case the operation will return DDS.ReturnCode Unsupported.

Status bits are declared as a constant and can be used by the application in an OR operation to create a tailored mask. The value 0 can be used to indicate that the created entity should not respond to any of its available statuses. The DDS will therefore attempt to propagate these statuses to its factory.

Status Propagation

The Data Distribution Service will trigger the most specific and relevant Listener. In other words, in case a communication status is also activated on the IDataWriterListener of a contained IDataWriter, the IDataWriterListener on that contained IDataWriter is invoked instead of the PublisherListener. This means that a status change on a contained IDataWriter only invokes the PublisherListener if the contained IDataWriter itself does not handle the trigger event generated by the status change.

In case a status is not activated in the mask of the IDataWriterListener, the PublisherListener of the containing IPublisher is invoked (if attached and activated for the status that occurred). This allows the application to set a default behaviour in the PublisherListener of the containing IPublisher and an IDataWriter specific behaviour when needed. In case the communication status is not activated in the mask of the PublisherListener as well, the communication status will be propagated to the DomainParticipantListener of the containing IDomainParticipant. In case the DomainParticipantListener is also not attached or the communication status is not activated in its mask, the application is not notified of the change.

Parameters
listenerThe IDataWriterListener instance which will be attached to the DataWriter.
maska bit mask in which each bit enables the invocation of the IDataWriterListener for a certain status.
Returns
Return codes are:

◆ SetQos()

ReturnCode DDS.IDataWriter.SetQos ( DataWriterQos  qos)

This operation replaces the existing set of QosPolicy settings for a IDataWriter.

This operation replaces the existing set of QosPolicy settings for a IDataWriter. The parameter qos contains the struct with the QosPolicy settings which is checked for self-consistency and mutability. When the application tries to change a QosPolicy setting for an enabled IDataWriter, which can only be set before the IDataWriter is enabled, the operation will fail and a ImmutablePolicy is returned. In other words, the application must provide the presently set QosPolicy settings in case of the immutable QosPolicy settings. Only the mutable QosPolicy settings can be changed. When qos contains conflicting QosPolicy settings (not self-consistent), the operation will fail and a InconsistentPolicy is returned. The set of QosPolicy settings specified by the qos parameter are applied on top of the existing QoS, replacing the values of any policies previously set (provided, the operation returned OK).

Parameters
qosnew set of QosPolicy settings for the IDataWriter.
Returns
Return values are:
  • DDS.ReturnCode Ok - the new default DataWriterQos is set
  • DDS.ReturnCode Error - an internal error has occurred.
  • DDS.ReturnCode AlreadyDeleted - the IPublisher has already been deleted
  • DDS.ReturnCode OutOfResources - the Data Distribution Service ran out of resources to complete this operation.
  • DDS.ReturnCode BadParameter - the parameter qos is not a valid DataWriterQos. It contains a QosPolicy setting with an invalid Duration value or an enum value that is outside its legal boundaries.
  • DDS.ReturnCode Unsupported - one or more of the selected QosPolicy values are currently not supported by OpenSplice.
  • DDS.ReturnCode ImmutablePolicy - the parameter qos contains an immutable QosPolicy setting with a different value than set during enabling of the IDataWriter.
  • DDS.ReturnCode InconsistentPolicy - the parameter qos contains an inconsistent QosPolicy settings, e.g. a history depth that is higher than the specified resource limits.

◆ UnregisterInstance()

ReturnCode DDS.IDataWriter.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).

This abstract operation is defined as a generic operation, which is implemented by the <type>DataWriter class. Therefore, to use this operation, the data type specific implementation of this operation in its respective derived class must be used.

For further explanation see the description for the fictional data type Space.Foo derived Space.FooDataWriter class.

See also
Space.FooDataWriter.UnregisterInstance(Foo instanceData, DDS.InstanceHandle instanceHandle)

◆ UnregisterInstanceWithTimestamp()

ReturnCode DDS.IDataWriter.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).

This abstract operation is defined as a generic operation, which is implemented by the <type>DataWriter class. Therefore, to use this operation, the data type specific implementation of this operation in its respective derived class must be used.

For further explanation see the description for the fictional data type Space.Foo derived Space.FooDataWriter class.

See also
Space.FooDataWriter.UnregisterInstanceWithTimestamp(Foo instanceData, DDS.InstanceHandle instanceHandle, DDS.Time sourceTimestamp)

◆ WaitForAcknowledgments()

ReturnCode DDS.IDataWriter.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.

Data is acknowledged by the local infrastructure when it does not need to be stored in its IDataWriter’s local history. When a locally-connected subscription (including the networking service) has no more resources to store incoming samples it will start to reject these samples, resulting in their source DataWriter to store them temporarily in its own local history to be retransmitted at a later moment in time. In such scenarios, the WaitForAcknowledgments operation will block until the IDataWriter has retransmitted its entire history, which is therefore effectively empty, or until the maxWait timeout expires, whichever happens first. In the first case the operation will return Ok, in the latter it will return Timeout.

Be aware that in case the operation returns Ok, the data has only been acknowledged by the local infrastructure: it does not mean all remote subscriptions have already received the data. However, delivering the data to remote nodes is then the sole responsibility of the networking service: even when the publishing application would terminate, all data that has not yet been received may be considered ‘on-route’ and will therefore eventually arrive (unless the networking service itself will crash). In contrast, if an IDataWriter would still have data in its local history buffer when it terminates, this data is considered ‘lost’. This operation is intended to be used only if the IDataWriter has its ReliabilityQosPolicyKind set to ReliableReliabilityQos Otherwise the operation will return immediately with Ok, since best-effort DataWriters will never store rejected samples in their local history: they will just drop them and continue business as usual.

Parameters
maxWaitthe maximum duration to block for acknowledgments, after which the application thread is unblocked. The special constant Duration.Infinte can be used when the maximum waiting time does not need to be bounded.
Returns
Return values are:

◆ Write() [1/2]

ReturnCode DDS.IDataWriter.Write ( < type >  instanceData)

This operation modifies the value of a data instance (abstract).

This abstract operation is defined as a generic operation, which is implemented by the <type>DataWriter class. Therefore, to use this operation, the data type specific implementation of this operation in its respective derived class must be used.

For further explanation see the description for the fictional data type Space.Foo derived Space.FooDataWriter class.

See also
Space.FooDataWriter.Write(Foo instanceData)

◆ Write() [2/2]

ReturnCode DDS.IDataWriter.Write ( < type >  instanceData,
InstanceHandle  instanceHandle 
)

This operation modifies the value of a data instance (abstract).

This abstract operation is defined as a generic operation, which is implemented by the <type>DataWriter class. Therefore, to use this operation, the data type specific implementation of this operation in its respective derived class must be used.

For further explanation see the description for the fictional data type Space.Foo derived Space.FooDataWriter class.

See also
Space.FooDataWriter.Write(Foo instanceData, DDS.InstanceHandle instanceHandle)

◆ WriteDispose() [1/2]

ReturnCode DDS.IDataWriter.WriteDispose ( < type >  instanceData)

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

This abstract operation is defined as a generic operation, which is implemented by the <type>DataWriter class. Therefore, to use this operation, the data type specific implementation of this operation in its respective derived class must be used.

For further explanation see the description for the fictional data type Space.Foo derived Space.FooDataWriter class.

See also
Space.FooDataWriter.WriteDispose(Foo instanceData)

◆ WriteDispose() [2/2]

ReturnCode DDS.IDataWriter.WriteDispose ( < type >  instanceData,
InstanceHandle  instanceHandle 
)

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

This abstract operation is defined as a generic operation, which is implemented by the <type>DataWriter class. Therefore, to use this operation, the data type specific implementation of this operation in its respective derived class must be used.

For further explanation see the description for the fictional data type Space.Foo derived Space.FooDataWriter class.

See also
Space.FooDataWriter.WriteDispose(Foo instanceData, DDS.InstanceHandle instanceHandle)

◆ WriteDisposeWithTimestamp() [1/2]

ReturnCode DDS.IDataWriter.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).

This abstract operation is defined as a generic operation, which is implemented by the <type>DataWriter class. Therefore, to use this operation, the data type specific implementation of this operation in its respective derived class must be used.

For further explanation see the description for the fictional data type Space.Foo derived Space.FooDataWriter class.

See also
Space.FooDataWriter.WriteDisposeWithTimestamp(Foo instanceData, Time sourceTimestamp)

◆ WriteDisposeWithTimestamp() [2/2]

ReturnCode DDS.IDataWriter.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).

This abstract operation is defined as a generic operation, which is implemented by the <type>DataWriter class. Therefore, to use this operation, the data type specific implementation of this operation in its respective derived class must be used.

For further explanation see the description for the fictional data type Space.Foo derived Space.FooDataWriter class.

See also
Space.FooDataWriter.WriteDisposeWithTimestamp(Foo instanceData, DDS.InstanceHandle instanceHandle, DDS.Time sourceTimestamp)

◆ WriteWithTimestamp() [1/2]

ReturnCode DDS.IDataWriter.WriteWithTimestamp ( < type >  instanceData,
Time  sourceTimestamp 
)

This operation modifies the value of a data instance (abstract).

This abstract operation is defined as a generic operation, which is implemented by the <type>DataWriter class. Therefore, to use this operation, the data type specific implementation of this operation in its respective derived class must be used.

For further explanation see the description for the fictional data type Space.Foo derived Space.FooDataWriter class.

See also
Space.FooDataWriter.WriteWithTimestamp(Foo instanceData, DDS.Time sourceTimestamp)

◆ WriteWithTimestamp() [2/2]

ReturnCode DDS.IDataWriter.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).

This abstract operation is defined as a generic operation, which is implemented by the <type>DataWriter class. Therefore, to use this operation, the data type specific implementation of this operation in its respective derived class must be used.

For further explanation see the description for the fictional data type Space.Foo derived Space.FooDataWriter class.

See also
Space.FooDataWriter.WriteWithTimestamp(Foo instanceData, DDS.InstanceHandle instanceHandle, DDS.Time sourceTimestamp)

Property Documentation

◆ Listener

IDataWriterListener DDS.IDataWriter.Listener
get

This property returns the IDataWriterListener currently attached to the IDataWriter.

Only one listener can be attached to the IDataWriter at any particular time. This property returns the listener that is currently attached to the IDataWriter.

Returns
returns the IDataWriterListener currently attached to the IDataWriter.

Definition at line 3245 of file DdsDcpsInterfaces.cs.

◆ Publisher

IPublisher DDS.IDataWriter.Publisher
get

This property returns the IPublisher to which the IDataWriter belongs.

Definition at line 3328 of file DdsDcpsInterfaces.cs.

◆ Topic

ITopic DDS.IDataWriter.Topic
get

This property returns the ITopic which is associated with the IDataWriter.

Definition at line 3324 of file DdsDcpsInterfaces.cs.


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