RTI Connext C# API  6.1.2
Subscriber Class Reference

A subscriber is the object responsible for actually receiving data from a subscription. More...

Inheritance diagram for Subscriber:
Entity

Public Member Functions

DataReader< T > CreateDataReader< T > (Topic< T > topic)
 Creates a DataReader that will be attached and belong to this Subscriber, using default QoS. More...
 
DataReader< T > CreateDataReader< T > (Topic< T > topic, Action< DataReader< T >> preEnableAction)
 Creates a DataReader that will be attached and belong to this Subscriber, using default QoS. More...
 
DataReader< T > CreateDataReader< T > (Topic< T > topic, DataReaderQos qos, Action< DataReader< T >> preEnableAction)
 Creates a DataReader that will be attached and belong to this Subscriber. More...
 
DataReader< T > CreateDataReader< T > (ContentFilteredTopic< T > cft)
 Creates a DataReader that will be attached and belong to this Subscriber, using default QoS. More...
 
DataReader< T > CreateDataReader< T > (ContentFilteredTopic< T > cft, Action< DataReader< T >> preEnableAction)
 Creates a DataReader that will be attached and belong to this Subscriber, using default QoS More...
 
DataReader< T > CreateDataReader< T > (ContentFilteredTopic< T > cft, DataReaderQos qos, Action< DataReader< T >> preEnableAction)
 Creates a DataReader that will be attached and belong to this Subscriber, using default QoS More...
 
DataReader< T > CreateDataReader< T > (Topic< T > topic, DataReaderQos qos)
 Creates a DataReader that will be attached and belong to this Subscriber, providing the QoS. More...
 
DataReader< T > CreateDataReader< T > (ContentFilteredTopic< T > cft, DataReaderQos qos)
 Creates a DataReader that will be attached and belong to this Subscriber, providing the QoS. More...
 
AnyDataReader CreateDataReader (ITopicDescription topic)
 Creates a DataReader that will be attached and belong to this Subscriber, without knowing the type at compile time, using default QoS. More...
 
AnyDataReader CreateDataReader (ITopicDescription topic, DataReaderQos qos)
 Creates a DataReader that will be attached and belong to this Subscriber, without knowing the type at compile time, and providing the QoS. More...
 
DataReader< T > CreateDataReader< T > (ITopicDescription topicDescription, Action< DataReader< T >> preEnableAction)
 Creates a DataReader<T> that will be attached and belong to this subscriber. More...
 
DataReader< T > CreateDataReader< T > (ITopicDescription topicDescription, DataReaderQos qos, Action< DataReader< T >> preEnableAction)
 Creates a DataReader<T> that will be attached and belong to this subscriber. More...
 
DataReader< T > LookupDataReader< T > (string topicName)
 Retrieves a DataReader by looking it up by topic name More...
 
AnyDataReader LookupDataReader (string topicName)
 Retrieves a DataReader by looking it up by topic name More...
 
AnyDataReader LookupDataReaderByName (string readerName)
 Retrieves a DataReader contained within this looking it up by the DataReader entity name. More...
 
CoherentAccess BeginAccess ()
 Indicates that the application is about to access the data samples in any of the DataReader<T> objects attached to this subscriber. More...
 
void EndAccess ()
 Indicates that the application has finished accessing the data samples in DataReader<T> objects managed by this (alternative to CoherentAccess.Dispose.) More...
 
IEnumerable< AnyDataReaderGetDataReaders ()
 Returns all readers (equivalent to the property DataReaders). More...
 
IEnumerable< AnyDataReaderGetDataReaders (DataState state)
 Returns the DataReader<T> objects that contain data samples with the specified state. More...
 
void NotifyDataReaders ()
 When a subscriber handles the DataOnReaders event, the AnyDataReader.DataAvailable event is not triggered on its contained readers until this function is called. More...
 
override void ResetEvents (StatusMask eventsToRemove=StatusMask.All)
 Stop notifying of events and remove their event handlers More...
 
void DisposeContainedEntities ()
 Disposes all the entities that were created by this Subscriber. More...
 
- Public Member Functions inherited from Entity
void Enable ()
 Enables this Entity (by default entities are automatically enabled after creation) 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...
 

Static Public Attributes

const string SubscriptionBuiltinTopicName
 The topic name of the DataReader in DomainParticipant.BuiltinSubscriber that provides information about Subscriptions discovered by a participant. More...
 
const string PublicationBuiltinTopicName
 The topic name of the DataReader in DomainParticipant.BuiltinSubscriber that provides information about Publications discovered by a participant. More...
 
const string TopicBuiltinTopicName
 The topic name of the DataReader in DomainParticipant.BuiltinSubscriber that provides information about Topics discovered by a participant. More...
 
const string ParticipantBuiltinTopicName
 The topic name of the DataReader in DomainParticipant.BuiltinSubscriber that provides information about participants discovered by another participant. More...
 

Properties

DataReaderQos DefaultDataReaderQos [get, set]
 Copies the default DataReaderQos values into the provided DataReaderQos instance. More...
 
SubscriberQos Qos [get, set]
 Gets or sets the subscriber QoS. More...
 
DomainParticipant DomainParticipant [get]
 Returns the DomainParticipant to which this Subscriber belongs. More...
 
IEnumerable< AnyDataReaderDataReaders [get]
 Retrieve all the DataReaders created from this Subscriber More...
 
DataOnReadersEventHandler DataOnReaders
 Event triggered when the Rti.Dds.Core.Status.StatusMask.DataOnReaders status changes More...
 
- Properties inherited from 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 subscriber is the object responsible for actually receiving data from a subscription.

Member Function Documentation

◆ BeginAccess()

CoherentAccess BeginAccess ( )

Indicates that the application is about to access the data samples in any of the DataReader<T> objects attached to this subscriber.

Returns
An object whose disposal indicates the end of the coherent access

The full documentation is available in the C API: DDS_Subscriber_begin_access

◆ CreateDataReader() [1/2]

AnyDataReader CreateDataReader ( ITopicDescription  topic)

Creates a DataReader that will be attached and belong to this Subscriber, without knowing the type at compile time, using default QoS.

The full documentation is available in the C API: DDS_Subscriber_create_datareader

◆ CreateDataReader() [2/2]

AnyDataReader CreateDataReader ( ITopicDescription  topic,
DataReaderQos  qos 
)

Creates a DataReader that will be attached and belong to this Subscriber, without knowing the type at compile time, and providing the QoS.

The full documentation is available in the C API: DDS_Subscriber_create_datareader

◆ CreateDataReader< T >() [1/10]

Creates a DataReader that will be attached and belong to this Subscriber, using default QoS.

Parameters
cftThe ContentFilteredTopic<T> that the DataReader will be associated with

The full documentation is available in the C API: DDS_Subscriber_create_datareader

◆ CreateDataReader< T >() [2/10]

DataReader<T> CreateDataReader< T > ( ContentFilteredTopic< T >  cft,
Action< DataReader< T >>  preEnableAction 
)

Creates a DataReader that will be attached and belong to this Subscriber, using default QoS

Parameters
cftThe ContentFilteredTopic<T> that the DataReader will be associated with.
preEnableActionAn action that allows adding handlers to reader events before the reader is enabled.

The full documentation is available in the C API: DDS_Subscriber_create_datareader

◆ CreateDataReader< T >() [3/10]

Creates a DataReader that will be attached and belong to this Subscriber, providing the QoS.

The full documentation is available in the C API: DDS_Subscriber_create_datareader

◆ CreateDataReader< T >() [4/10]

DataReader<T> CreateDataReader< T > ( ContentFilteredTopic< T >  cft,
DataReaderQos  qos,
Action< DataReader< T >>  preEnableAction 
)

Creates a DataReader that will be attached and belong to this Subscriber, using default QoS

Parameters
cftThe ContentFilteredTopic<T> that the DataReader will be associated with.
qosThe reader QoS.
preEnableActionAn action that allows adding handlers to reader events before the reader is enabled.

The full documentation is available in the C API: DDS_Subscriber_create_datareader

◆ CreateDataReader< T >() [5/10]

DataReader<T> CreateDataReader< T > ( ITopicDescription  topicDescription,
Action< DataReader< T >>  preEnableAction 
)

Creates a DataReader<T> that will be attached and belong to this subscriber.

Parameters
topicDescriptionThe ITopicDescription that the reader will be associated with.
preEnableActionAn action that allows adding handlers to reader events before the reader is enabled.

◆ CreateDataReader< T >() [6/10]

DataReader<T> CreateDataReader< T > ( ITopicDescription  topicDescription,
DataReaderQos  qos,
Action< DataReader< T >>  preEnableAction 
)

Creates a DataReader<T> that will be attached and belong to this subscriber.

Parameters
topicDescriptionThe ITopicDescription that the reader will be associated with.
qosThe reader QoS
preEnableActionAn action that allows adding handlers to reader events before the reader is enabled.

◆ CreateDataReader< T >() [7/10]

DataReader<T> CreateDataReader< T > ( Topic< T >  topic)

Creates a DataReader that will be attached and belong to this Subscriber, using default QoS.

Parameters
topicThe Topic<T> that the DataReader will be associated with.

The full documentation is available in the C API: DDS_Subscriber_create_datareader

◆ CreateDataReader< T >() [8/10]

DataReader<T> CreateDataReader< T > ( Topic< T >  topic,
Action< DataReader< T >>  preEnableAction 
)

Creates a DataReader that will be attached and belong to this Subscriber, using default QoS.

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

The full documentation is available in the C API: DDS_Subscriber_create_datareader

◆ CreateDataReader< T >() [9/10]

DataReader<T> CreateDataReader< T > ( Topic< T >  topic,
DataReaderQos  qos 
)

Creates a DataReader that will be attached and belong to this Subscriber, providing the QoS.

The full documentation is available in the C API: DDS_Subscriber_create_datareader

◆ CreateDataReader< T >() [10/10]

DataReader<T> CreateDataReader< T > ( Topic< T >  topic,
DataReaderQos  qos,
Action< DataReader< T >>  preEnableAction 
)

Creates a DataReader that will be attached and belong to this Subscriber.

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

The full documentation is available in the C API: DDS_Subscriber_create_datareader

◆ DisposeContainedEntities()

void DisposeContainedEntities ( )

Disposes all the entities that were created by this Subscriber.

The full documentation is available in the C API: DDS_Subscriber_delete_contained_entities

◆ EndAccess()

void EndAccess ( )

Indicates that the application has finished accessing the data samples in DataReader<T> objects managed by this (alternative to CoherentAccess.Dispose.)

The full documentation is available in the C API: DDS_Subscriber_end_access

◆ GetDataReaders() [1/2]

IEnumerable<AnyDataReader> GetDataReaders ( )

Returns all readers (equivalent to the property DataReaders).

◆ GetDataReaders() [2/2]

IEnumerable<AnyDataReader> GetDataReaders ( DataState  state)

Returns the DataReader<T> objects that contain data samples with the specified state.

The full documentation is available in the C API: DDS_Subscriber_get_datareaders

◆ LookupDataReader()

AnyDataReader LookupDataReader ( string  topicName)

Retrieves a DataReader by looking it up by topic name

Returns
A reader with that topic name or null if none exist

The full documentation is available in the C API: DDS_Subscriber_lookup_datareader

◆ LookupDataReader< T >()

DataReader<T> LookupDataReader< T > ( string  topicName)

Retrieves a DataReader by looking it up by topic name

Returns
A reader with that topic name or null if none exist

The full documentation is available in the C API: DDS_Subscriber_lookup_datareader

◆ LookupDataReaderByName()

AnyDataReader LookupDataReaderByName ( string  readerName)

Retrieves a DataReader contained within this looking it up by the DataReader entity name.

Returns
A reader with that entity name or null if none exist

The full documentation is available in the C API: DDS_Subscriber_lookup_datareader_by_name

◆ NotifyDataReaders()

void NotifyDataReaders ( )

When a subscriber handles the DataOnReaders event, the AnyDataReader.DataAvailable event is not triggered on its contained readers until this function is called.

The full documentation is available in the C API: DDS_Subscriber_notify_datareaders

◆ ResetEvents()

override void ResetEvents ( StatusMask  eventsToRemove = StatusMask.All)
virtual

Stop notifying of events and remove their event handlers

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

Implements Entity.

Member Data Documentation

◆ ParticipantBuiltinTopicName

const string ParticipantBuiltinTopicName
static

The topic name of the DataReader in DomainParticipant.BuiltinSubscriber that provides information about participants discovered by another participant.

See Entity Discovery

◆ PublicationBuiltinTopicName

const string PublicationBuiltinTopicName
static

The topic name of the DataReader in DomainParticipant.BuiltinSubscriber that provides information about Publications discovered by a participant.

See Entity Discovery

◆ SubscriptionBuiltinTopicName

const string SubscriptionBuiltinTopicName
static

The topic name of the DataReader in DomainParticipant.BuiltinSubscriber that provides information about Subscriptions discovered by a participant.

See Entity Discovery

◆ TopicBuiltinTopicName

const string TopicBuiltinTopicName
static

The topic name of the DataReader in DomainParticipant.BuiltinSubscriber that provides information about Topics discovered by a participant.

See Entity Discovery

Property Documentation

◆ DataOnReaders

DataOnReadersEventHandler DataOnReaders
addremove

Event triggered when the Rti.Dds.Core.Status.StatusMask.DataOnReaders status changes

◆ DataReaders

IEnumerable<AnyDataReader> DataReaders
get

Retrieve all the DataReaders created from this Subscriber

The full documentation is available in the C API: DDS_Subscriber_get_all_datareaders

◆ DefaultDataReaderQos

DataReaderQos DefaultDataReaderQos
getset

Copies the default DataReaderQos values into the provided DataReaderQos instance.

The full documentation is available in the C API: DDS_Subscriber_get_default_datareader_qos

◆ DomainParticipant

Returns the DomainParticipant to which this Subscriber belongs.

The full documentation is available in the C API: DDS_Subscriber_get_participant

◆ Qos

SubscriberQos Qos
getset

Gets or sets the subscriber QoS.

The full documentation is available in the C API: DDS_Subscriber_get_qos