RTI Connext C# API Version 7.2.0
Rti.Dds.Publication.Publisher Class Reference

A publisher is the object responsible for the actual dissemination of publications. More...

Inheritance diagram for Rti.Dds.Publication.Publisher:
Rti.Dds.Core.Entity

Public Member Functions

DataWriter< T > LookupDataWriter< T > (string topicName)
 Retrieves a writer for a specific topic. More...
 
AnyDataWriter LookupDataWriter (string topicName)
 Retrieves a writer for a specific topic. More...
 
AnyDataWriter LookupDataWriterByName (string writerName)
 Retrieves a writer by its name More...
 
DataWriter< T > CreateDataWriter< T > (Topic< T > topic)
 Creates a DataWriter<T> that will be attached and belong to this publisher. More...
 
DataWriter< T > CreateDataWriter< T > (Topic< T > topic, DataWriterQos qos)
 Creates a DataWriter<T> that will be attached and belong to this publisher. More...
 
DataWriter< T > CreateDataWriter< T > (Topic< T > topic, Action< DataWriter< T > > preEnableAction)
 Creates a DataWriter<T> that will be attached and belong to this publisher. More...
 
DataWriter< T > CreateDataWriter< T > (Topic< T > topic, DataWriterQos qos, Action< DataWriter< T > > preEnableAction)
 Creates a DataWriter<T> that will be attached and belong to this publisher. More...
 
AnyDataWriter CreateDataWriter (Topics.IAnyTopic topic, DataWriterQos qos)
 Creates a DataWriter that will be attached and belong to this Publisher, without knowing the type at compile time. More...
 
AnyDataWriter CreateDataWriter (Topics.IAnyTopic topic)
 Creates a DataWriter that will be attached and belong to this Publisher, without knowing the type at compile time. More...
 
void DisposeContainedEntities ()
 Disposes all the entities that were created by this Publisher. More...
 
override void ResetEvents (StatusMask eventsToRemove=StatusMask.All)
 Stop notifying of certain events and remove their event handlers More...
 
CoherentSet BeginCoherentChanges ()
 Indicates that a coherent set of modifications is going to be performed using DataWriter<T> objects belonging to this publisher. More...
 
void EndCoherentChanges ()
 Ends a coherent set of changes (alternative to CoherentSet.Dispose) More...
 
SuspendedPublication SuspendPublications ()
 Indicates that the application is about to make multiple modifications using DataWriter<T> objects belonging this publisher. More...
 
void ResumePublications ()
 Indicates that the application has completed the multiple changes initiated by the previous call to SuspendPublications (alternative to SuspendedPublication.Dispose) More...
 
void WaitForAcknowledgments (Duration maxWait)
 Blocks the calling thread until all data written by the Publisher's reliable DataWriters is acknowledged, or until timeout expires. More...
 
void WaitForAsynchronousPublishing (Duration maxWait)
 Blocks the calling thread until asynchronous sending is complete. More...
 
- Public Member Functions inherited from Rti.Dds.Core.Entity
void Enable ()
 Enables this Entity (by default entities are automatically enabled after creation) More...
 
abstract void ResetEvents (StatusMask eventsToRemove=StatusMask.All)
 Stop notifying of events and remove their event handlers. The actual events are defined in each derived entity class. More...
 
EntityLock Lock ()
 Locks the Entity using its internal lock. More...
 
void Dispose ()
 Releases the resources used by this Entity and disposes its contained entities as well (if any). More...
 

Properties

DataWriterQos DefaultDataWriterQos [get, set]
 Get or change the default DataWriterQos used by More...
 
IEnumerable< AnyDataWriterDataWriters [get]
 Retrieve all the writers created by this publisher More...
 
PublisherQos Qos [get, set]
 Gets or sets the publisher QoS. More...
 
DomainParticipant DomainParticipant [get]
 Returns the DomainParticipant to which this publisher belongs. More...
 
LivelinessLostEventHandler LivelinessLost
 Event triggered when the Rti.Dds.Core.Status.StatusMask.LivelinessLost status changes on any DataWriter<T> created by this Publisher for which this event is not being monitored. More...
 
OfferedIncompatibleQosEventHandler OfferedIncompatibleQos
 Event triggered when the Rti.Dds.Core.Status.StatusMask.OfferedIncompatibleQos status changes on any DataWriter<T> created by this Publisher for which this event is not being monitored. More...
 
OfferedDeadlineMissedEventHandler OfferedDeadlineMissed
 Event triggered when the Rti.Dds.Core.Status.StatusMask.OfferedDeadlineMissed status changes on any DataWriter<T> created by this Publisher for which this event is not being monitored. More...
 
PublicationMatchedEventHandler PublicationMatched
 Event triggered when the Rti.Dds.Core.Status.StatusMask.PublicationMatched status changes on any DataWriter<T> created by this Publisher for which this event is not being monitored. More...
 
ReliableReaderActivityChangedEventHandler ReliableReaderActivityChanged
 Event triggered when the Rti.Dds.Core.Status.StatusMask.ReliableReaderActivityChanged status changes on any DataWriter<T> created by this Publisher for which this event is not being monitored. More...
 
ReliableWriterCacheChangedEventHandler ReliableWriterCacheChanged
 Event triggered when the Rti.Dds.Core.Status.StatusMask.ReliableWriterCacheChanged status changes on any DataWriter<T> created by this Publisher for which this event is not being monitored. More...
 
ServiceRequestAcceptedEventHandler ServiceRequestAccepted
 Event triggered when the Rti.Dds.Core.Status.StatusMask.ServiceRequestAccepted status changes on any DataWriter<T> created by this Publisher for which this event is not being monitored. More...
 
ApplicationAcknowledgementReceivedEventHandler ApplicationAcknowledgementReceived
 Event triggered when the Rti.Dds.Core.Status.StatusMask.DataWriterApplicationAcknowledgementReceived status changes on any DataWriter<T> created by this Publisher for which this event is not being monitored. More...
 
InstanceReplacedEventHandler InstanceReplaced
 Event triggered when the Rti.Dds.Core.Status.StatusMask.DataWriterInstanceReplaced status changes on any DataWriter<T> created by this Publisher for which this event is not being monitored. More...
 
SampleRemovedEventHandler SampleRemoved
 Event triggered when the Rti.Dds.Core.Status.StatusMask.DataWriterSampleRemoved status changes on any DataWriter<T> created by this Publisher for which this event is not being monitored. More...
 
- Properties inherited from Rti.Dds.Core.Entity
InstanceHandle InstanceHandle [get]
 Gets the InstanceHandle that identifies this Entity More...
 
StatusMask StatusChanges [get]
 Retrieves the list of communication statuses in this Entity that are triggered. More...
 
StatusCondition StatusCondition [get]
 Gets the StatusCondition associated with this Entity. More...
 
bool Enabled [get]
 Indicates whether this Entity is enabled. More...
 
bool Disposed [get]
 Indicates whether this Entity has already been disposed. More...
 

Detailed Description

A publisher is the object responsible for the actual dissemination of publications.

The full documentation is available in the C API: DDS_Publisher

Member Function Documentation

◆ LookupDataWriter< T >()

Retrieves a writer for a specific topic.

Returns
The writer if it exists or null if it doesn't

The full documentation is available in the C API: DDS_Publisher_lookup_datawriter

◆ LookupDataWriter()

AnyDataWriter Rti.Dds.Publication.Publisher.LookupDataWriter ( string  topicName)
inline

Retrieves a writer for a specific topic.

Returns
The writer if it exists or null if it doesn't

The full documentation is available in the C API: DDS_Publisher_lookup_datawriter

◆ LookupDataWriterByName()

AnyDataWriter Rti.Dds.Publication.Publisher.LookupDataWriterByName ( string  writerName)
inline

Retrieves a writer by its name

The full documentation is available in the C API: DDS_Publisher_lookup_datawriter_by_name

◆ CreateDataWriter< T >() [1/4]

Creates a DataWriter<T> that will be attached and belong to this publisher.

The full documentation is available in the C API: DDS_Publisher_create_datawriter

◆ CreateDataWriter< T >() [2/4]

Creates a DataWriter<T> that will be attached and belong to this publisher.

The full documentation is available in the C API: DDS_Publisher_create_datawriter

◆ CreateDataWriter< T >() [3/4]

DataWriter< T > Rti.Dds.Publication.Publisher.CreateDataWriter< T > ( Topic< T >  topic,
Action< DataWriter< T > >  preEnableAction 
)
inline

Creates a DataWriter<T> that will be attached and belong to this publisher.

Parameters
topicThe Topic<T> that the writer will be associated with.
preEnableActionAn action that allows adding handlers to writer events before the writer is enabled.

◆ CreateDataWriter< T >() [4/4]

DataWriter< T > Rti.Dds.Publication.Publisher.CreateDataWriter< T > ( Topic< T >  topic,
DataWriterQos  qos,
Action< DataWriter< T > >  preEnableAction 
)
inline

Creates a DataWriter<T> that will be attached and belong to this publisher.

Parameters
topicThe Topic<T> that the writer will be associated with.
qosThe quality of service
preEnableActionAn action that allows adding handlers to writer events before the writer is enabled.

◆ CreateDataWriter() [1/2]

AnyDataWriter Rti.Dds.Publication.Publisher.CreateDataWriter ( Topics.IAnyTopic  topic,
DataWriterQos  qos 
)
inline

Creates a DataWriter that will be attached and belong to this Publisher, without knowing the type at compile time.

◆ CreateDataWriter() [2/2]

AnyDataWriter Rti.Dds.Publication.Publisher.CreateDataWriter ( Topics.IAnyTopic  topic)
inline

Creates a DataWriter that will be attached and belong to this Publisher, without knowing the type at compile time.

◆ DisposeContainedEntities()

void Rti.Dds.Publication.Publisher.DisposeContainedEntities ( )
inline

Disposes all the entities that were created by this Publisher.

The full documentation is available in the C API: DDS_Publisher_delete_contained_entities

◆ ResetEvents()

override void Rti.Dds.Publication.Publisher.ResetEvents ( StatusMask  eventsToRemove = StatusMask.All)
inlinevirtual

Stop notifying of certain events and remove their event handlers

Parameters
eventsToRemoveSelects which events will stop receiving notifications. Use StatusMask.All to remove all event handlers.

Implements Rti.Dds.Core.Entity.

◆ BeginCoherentChanges()

CoherentSet Rti.Dds.Publication.Publisher.BeginCoherentChanges ( )
inline

Indicates that a coherent set of modifications is going to be performed using DataWriter<T> objects belonging to this publisher.

Returns
An object whose disposal indicates the end of the coherent set
using (publisher.BeginCoherentChanges())
{
writer1.Write(sample1);
writer1.Write(sample2);
writer2.Write(sample3); // writer1 and writer2 belong to publisher
} // end of coherent set

The full documentation is available in the C API: DDS_Publisher_begin_coherent_changes

◆ EndCoherentChanges()

void Rti.Dds.Publication.Publisher.EndCoherentChanges ( )

Ends a coherent set of changes (alternative to CoherentSet.Dispose)

The full documentation is available in the C API: DDS_Publisher_end_coherent_changes

◆ SuspendPublications()

SuspendedPublication Rti.Dds.Publication.Publisher.SuspendPublications ( )
inline

Indicates that the application is about to make multiple modifications using DataWriter<T> objects belonging this publisher.

Returns
An object whose disposal indicates the end of the suspension

The full documentation is available in the C API: DDS_Publisher_suspend_publications

◆ ResumePublications()

void Rti.Dds.Publication.Publisher.ResumePublications ( )

Indicates that the application has completed the multiple changes initiated by the previous call to SuspendPublications (alternative to SuspendedPublication.Dispose)

The full documentation is available in the C API: DDS_Publisher_resume_publications

◆ WaitForAcknowledgments()

void Rti.Dds.Publication.Publisher.WaitForAcknowledgments ( Duration  maxWait)

Blocks the calling thread until all data written by the Publisher's reliable DataWriters is acknowledged, or until timeout expires.

The full documentation is available in the C API: DDS_Publisher_wait_for_acknowledgments

◆ WaitForAsynchronousPublishing()

void Rti.Dds.Publication.Publisher.WaitForAsynchronousPublishing ( Duration  maxWait)

Blocks the calling thread until asynchronous sending is complete.

The full documentation is available in the C API: DDS_Publisher_wait_for_asynchronous_publishing

Property Documentation

◆ DefaultDataWriterQos

DataWriterQos Rti.Dds.Publication.Publisher.DefaultDataWriterQos
getset

Get or change the default DataWriterQos used by

The full documentation is available in the C API: DDS_Publisher_get_default_datawriter_qos

◆ DataWriters

IEnumerable<AnyDataWriter> Rti.Dds.Publication.Publisher.DataWriters
get

Retrieve all the writers created by this publisher

The full documentation is available in the C API: DDS_Publisher_get_all_datawriters

◆ Qos

PublisherQos Rti.Dds.Publication.Publisher.Qos
getset

Gets or sets the publisher QoS.

The full documentation is available in the C API: DDS_Publisher_set_qos

◆ DomainParticipant

DomainParticipant Rti.Dds.Publication.Publisher.DomainParticipant
get

Returns the DomainParticipant to which this publisher belongs.

The full documentation is available in the C API: DDS_Publisher_get_participant

◆ LivelinessLost

LivelinessLostEventHandler Rti.Dds.Publication.Publisher.LivelinessLost
addremove

Event triggered when the Rti.Dds.Core.Status.StatusMask.LivelinessLost status changes on any DataWriter<T> created by this Publisher for which this event is not being monitored.

◆ OfferedIncompatibleQos

OfferedIncompatibleQosEventHandler Rti.Dds.Publication.Publisher.OfferedIncompatibleQos
addremove

Event triggered when the Rti.Dds.Core.Status.StatusMask.OfferedIncompatibleQos status changes on any DataWriter<T> created by this Publisher for which this event is not being monitored.

◆ OfferedDeadlineMissed

OfferedDeadlineMissedEventHandler Rti.Dds.Publication.Publisher.OfferedDeadlineMissed
addremove

Event triggered when the Rti.Dds.Core.Status.StatusMask.OfferedDeadlineMissed status changes on any DataWriter<T> created by this Publisher for which this event is not being monitored.

◆ PublicationMatched

PublicationMatchedEventHandler Rti.Dds.Publication.Publisher.PublicationMatched
addremove

Event triggered when the Rti.Dds.Core.Status.StatusMask.PublicationMatched status changes on any DataWriter<T> created by this Publisher for which this event is not being monitored.

◆ ReliableReaderActivityChanged

ReliableReaderActivityChangedEventHandler Rti.Dds.Publication.Publisher.ReliableReaderActivityChanged
addremove

Event triggered when the Rti.Dds.Core.Status.StatusMask.ReliableReaderActivityChanged status changes on any DataWriter<T> created by this Publisher for which this event is not being monitored.

◆ ReliableWriterCacheChanged

ReliableWriterCacheChangedEventHandler Rti.Dds.Publication.Publisher.ReliableWriterCacheChanged
addremove

Event triggered when the Rti.Dds.Core.Status.StatusMask.ReliableWriterCacheChanged status changes on any DataWriter<T> created by this Publisher for which this event is not being monitored.

◆ ServiceRequestAccepted

ServiceRequestAcceptedEventHandler Rti.Dds.Publication.Publisher.ServiceRequestAccepted
addremove

Event triggered when the Rti.Dds.Core.Status.StatusMask.ServiceRequestAccepted status changes on any DataWriter<T> created by this Publisher for which this event is not being monitored.

◆ ApplicationAcknowledgementReceived

ApplicationAcknowledgementReceivedEventHandler Rti.Dds.Publication.Publisher.ApplicationAcknowledgementReceived
addremove

Event triggered when the Rti.Dds.Core.Status.StatusMask.DataWriterApplicationAcknowledgementReceived status changes on any DataWriter<T> created by this Publisher for which this event is not being monitored.

◆ InstanceReplaced

InstanceReplacedEventHandler Rti.Dds.Publication.Publisher.InstanceReplaced
addremove

Event triggered when the Rti.Dds.Core.Status.StatusMask.DataWriterInstanceReplaced status changes on any DataWriter<T> created by this Publisher for which this event is not being monitored.

◆ SampleRemoved

SampleRemovedEventHandler Rti.Dds.Publication.Publisher.SampleRemoved
addremove

Event triggered when the Rti.Dds.Core.Status.StatusMask.DataWriterSampleRemoved status changes on any DataWriter<T> created by this Publisher for which this event is not being monitored.