Click or drag to resize

Publisher Class

A Publisher is the object responsible for the actual dissemination of publications.
Inheritance Hierarchy

Namespace:  OpenDDSharp.DDS
Assembly:  OpenDDSharp (in OpenDDSharp.dll) Version: 0.4.1.0
Syntax
public class Publisher : Entity

The Publisher type exposes the following members.

Properties
  NameDescription
Public propertyInstanceHandle
Gets the InstanceHandle that represents the Entity.
(Inherited from Entity.)
Public propertyParticipant
Gets the DomainParticipant to which the Publisher belongs.
Public propertyStatusChanges
Gets the list of communication statuses in the Entity that are 'triggered'. That is, the list of statuses whose value has changed since the last time the application read the status.
(Inherited from Entity.)
Public propertyStatusCondition
Allows access to the StatusCondition associated with the Entity. The returned condition can then be added to a WaitSet so that the application can wait for specific status changes that affect the Entity.
(Inherited from Entity.)
Top
Methods
  NameDescription
Public methodBeginCoherentChanges
Requests that the application will begin a 'coherent set' of modifications using DataWriter objects attached to the Publisher. The 'coherent set' will be completed by a matching call to EndCoherentChanges.
Public methodCreateDataWriter(Topic)
Creates a new DataWriter with the default QoS policies and without listener attached.
Public methodCreateDataWriter(Topic, DataWriterQos)
Creates a new DataWriter with the desired QoS policies and without listener attached.
Public methodCreateDataWriter(Topic, DataWriterListener)
Creates a new DataWriter with the default QoS policies and attaches to it the specified DataWriterListener. The specified DataWriterListener will be attached with the default StatusMask.
Public methodCreateDataWriter(Topic, DataWriterQos, DataWriterListener)
Creates a new DataWriter with the desired QoS policies and attaches to it the specified DataWriterListener. The specified DataWriterListener will be attached with the default StatusMask.
Public methodCreateDataWriter(Topic, DataWriterListener, StatusMask)
Creates a new DataWriter with the default QoS policies and attaches to it the specified DataWriterListener.
Public methodCreateDataWriter(Topic, DataWriterQos, DataWriterListener, StatusMask)
Creates a new DataWriter with the desired QoS policies and attaches to it the specified DataWriterListener.
Public methodDeleteContainedEntities
This operation deletes all the entities that were created by means of the “create” operations on the Publisher. That is, it deletes all contained DataWriter objects.
Public methodDeleteDataWriter
Deletes a DataWriter that belongs to the Publisher.
Public methodEnable
Enables the Entity. The enable operation is idempotent. Calling enable on an already enabled Entity returns Ok and has no effect.
(Inherited from Entity.)
Public methodEndCoherentChanges
Terminates the 'coherent set' initiated by the matching call to BeginCoherentChanges. If there is no matching call to BeginCoherentChanges, the operation will return the error PreconditionNotMet.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetDefaultDataWriterQos
Gets the default value of the DataWriter QoS, that is, the QoS policies which will be used for newly created DataWriter entities in the case where the QoS policies are defaulted in the CreateDataWriter operation.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetListener
Allows access to the attached PublisherListener.
Public methodGetQos
Gets the Publisher QoS policies.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodLookupDataWriter
Gets a previously created DataWriter belonging to the Publisher that is attached to a Topic with a matching topic name. If no such DataWriter exists, the operation will return .
Public methodResumePublications
This operation indicates to DDS that the application has completed the multiple changes initiated by the previous SuspendPublications.
Public methodSetDefaultDataWriterQos
Sets a default value of the DataWriter QoS policies which will be used for newly created DataWriter entities in the case where the QoS policies are defaulted in the CreateDataWriter operation.
Public methodSetListener(PublisherListener)
Sets the PublisherListener using the DefaultStatusMask.
Public methodSetListener(PublisherListener, StatusMask)
Sets the PublisherListener.
Public methodSetQos
Sets the Publisher QoS policies.
Public methodSuspendPublications
This operation indicates to DDS that the application is about to make multiple modifications using DataWriter objects belonging to the Publisher. It is a hint to DDS so it can optimize its performance by e.g., holding the dissemination of the modifications and then batching them.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodWaitForAcknowledgments
Blocks the calling thread until either all data written by the reliable DataWriter entities is acknowledged by all matched reliable DataReader entities, or else the duration specified by the maxWait parameter elapses, whichever happens first. A return value of Ok indicates that all the samples written have been acknowledged by all reliable matched data readers; a return value of Timeout indicates that maxWait elapsed before all the data was acknowledged.
Top
Remarks

The Publisher acts on the behalf of one or several DataWriter objects that belong to it. When it is informed of a change to the data associated with one of its DataWriter objects, it decides when it is appropriate to actually send the data-update message. In making this decision, it considers any extra information that goes with the data(timestamp, writer, etc.) as well as the QoS of the Publisher and the DataWriter.

All operations except for the operations SetQos, Publisher::GetQos, SetListener,GetListener, Enable, GetStatusCondition, CreateDataWriter, and DeleteDataWriter return the value NotEnabled if the Publisher has not been enabled yet.

See Also