Click or drag to resize

PublisherCreateDataWriter Method (Topic, DataWriterQos, DataWriterListener, StatusMask)

Creates a new DataWriter with the desired QoS policies and attaches to it the specified DataWriterListener.

Namespace:  OpenDDSharp.DDS
Assembly:  OpenDDSharp (in OpenDDSharp.dll) Version: 0.5.0.0
Syntax
public DataWriter CreateDataWriter(
	Topic topic,
	DataWriterQos qos,
	DataWriterListener listener,
	StatusMask statusMask
)

Parameters

topic
Type: OpenDDSharp.DDSTopic
The Topic that the DataWriter will be associated with.
qos
Type: OpenDDSharp.DDSDataWriterQos
The DataWriterQos policies to be used for creating the new DataWriter.
listener
Type: OpenDDSharp.OpenDDS.DCPSDataWriterListener
The DataWriterListener to be attached to the newly created DataWriter.
statusMask
Type: OpenDDSharp.DDSStatusMask
The StatusMask of which status changes the listener should be notified.

Return Value

Type: DataWriter
The newly created DataWriter on success, otherwise .
Remarks

The created DataWriter will be attached and belongs to the Publisher that is its factory.

The Topic passed to this operation must have been created from the same DomainParticipant that was used to create this Publisher. If the Topic was created from a different DomainParticipant, the operation will fail and return a result.

See Also