RTI Connext C# API  6.1.0
AnyDataReader Class Referenceabstract

The base of a typed DataReader<T>. Provides type-independent methods and properties. More...

Inheritance diagram for AnyDataReader:
Entity DataReader< T >

Public Member Functions

ReadCondition CreateReadCondition (DataState state)
 Creates a ReadCondition. More...
 
QueryCondition CreateQueryCondition (Filter filter, DataState state)
 Creates a QueryCondition with a filter and a data state. More...
 
QueryCondition CreateQueryCondition (Filter filter)
 Creates a QueryCondition with DataState.Any. More...
 
PublicationBuiltinTopicData GetMatchedPublicationData (in InstanceHandle publicationHandle)
 Retrieves the information on a publication that is currently "associated" with this DataReader. More...
 
IEnumerable< PublicationBuiltinTopicDataGetMatchedPublicationData ()
 Retrieves the information on all publications that are currently "associated" with this DataReader. More...
 
ParticipantBuiltinTopicData GetMatchedPublicationParticipantData (in InstanceHandle publicationHandle)
 Retrieves the information on the discovered Domain.DomainParticipant associated with the publication that is currently matching with the DataReader<T> More...
 
void AcknowledgeAll ()
 Acknowledges all previously accessed samples. More...
 
void AcknowledgeAll (AckResponseData responseData)
 Acknowledges all previously accessed samples with a response. More...
 
void AcknowledgeSample (SampleInfo sampleInfo)
 Acknowledges a single sample explicitly. More...
 
void AcknowledgeSample (SampleInfo sampleInfo, AckResponseData responseData)
 Acknowledges a single sample explicitly with a response. More...
 
void AcknowledgeSample (SampleIdentity sampleIdentity)
 Acknowledges a single sample explicitly. More...
 
void AcknowledgeSample (SampleIdentity sampleIdentity, AckResponseData responseData)
 Acknowledges a single sample explicitly with a response. More...
 
DataReaderProtocolStatus GetMatchedPublicationDataReaderProtocolStatus (in InstanceHandle publicationHandle)
 Gets the DataReaderProtocolStatus for this reader, per matched publication identified by its InstanceHandle. More...
 
bool IsMatchedPublicationAlive (in InstanceHandle publicationHandle)
 Check if a publication currently matched with this reader is alive. More...
 
void WaitForHistoricalData (in Duration duration)
 Waits until all "historical" data is received if the reader was configured with a non-Volatile DurabilityKind. More...
 
abstract LoanedSamples< object > ReadUntyped ()
 Allows calling DataReader<T>.Read in a context where the type is not known. More...
 
abstract LoanedSamples< object > TakeUntyped ()
 Allows calling DataReader<T>.Take in a context where the type is not known. More...
 
abstract InstanceHandle LookupInstanceUntyped (object keyHolder)
 Allows calling DataReader<T>.LookupInstance in a context where the type is not known. More...
 
abstract object GetKeyValueUntyped (object keyHolder, in InstanceHandle InstanceHandle)
 Allows calling DataReader<T>.GetKeyValue in a context where the type is not known. More...
 
abstract SelectorUntyped SelectUntyped ()
 Allows calling DataReader<T>.Select in a context where the type is not known. More...
 
override void ResetEvents (StatusMask eventsToRemove=StatusMask.All)
 Stop notifying of certain events and remove their event handlers More...
 
void DisposeContainedEntities ()
 Disposes all the entities that were created by this reader. 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...
 

Properties

DataReaderQos Qos [get, set]
 Gets or sets the reader QoS. More...
 
abstract Subscriber Subscriber [get]
 Returns the Subscriber to which the DataReader belongs. More...
 
abstract ITopicDescription TopicDescription [get]
 Returns the TopicDescription associated with this DataReader. More...
 
SubscriptionMatchedStatus SubscriptionMatchedStatus [get]
 Retrieve the StatusMask.SubscriptionMatched status. More...
 
LivelinessChangedStatus LivelinessChangedStatus [get]
 Retrieve the StatusMask.LivelinessChanged status. More...
 
RequestedDeadlineMissedStatus RequestedDeadlineMissedStatus [get]
 Retrieve the StatusMask.RequestedDeadlineMissed status. More...
 
RequestedIncompatibleQosStatus RequestedIncompatibleQosStatus [get]
 Retrieve the StatusMask.RequestedIncompatibleQos status. More...
 
SampleLostStatus SampleLostStatus [get]
 Retrieve the StatusMask.SampleLost status. More...
 
SampleRejectedStatus SampleRejectedStatus [get]
 Retrieve the StatusMask.SampleRejected status. More...
 
DataReaderCacheStatus DataReaderCacheStatus [get]
 Retrieve the StatusMask.DataReaderCache status. More...
 
DataReaderProtocolStatus DataReaderProtocolStatus [get]
 Retrieve the StatusMask.DataReaderProtocol status. More...
 
IEnumerable< InstanceHandleMatchedPublications [get]
 Retrieves the list of publications currently "associated" with this DataReader. More...
 
SubscriptionMatchedEventHandler SubscriptionMatched
 Event triggered when the Rti.Dds.Core.Status.StatusMask.SubscriptionMatched status changes More...
 
DataAvailableEventHandler DataAvailable
 Event triggered when the Rti.Dds.Core.Status.StatusMask.DataAvailable status changes More...
 
LivelinessChangedEventHandler LivelinessChanged
 Event triggered when the Rti.Dds.Core.Status.StatusMask.LivelinessChanged status changes More...
 
RequestedDeadlineMissedEventHandler RequestedDeadlineMissed
 Event triggered when the Rti.Dds.Core.Status.StatusMask.RequestedDeadlineMissed status changes More...
 
RequestedIncompatibleQosEventHandler RequestedIncompatibleQos
 Event triggered when the Rti.Dds.Core.Status.StatusMask.RequestedIncompatibleQos status changes More...
 
SampleLostEventHandler SampleLost
 Event triggered when the Rti.Dds.Core.Status.StatusMask.SampleLost status changes More...
 
SampleRejectedEventHandler SampleRejected
 Event triggered when the Rti.Dds.Core.Status.StatusMask.SampleRejected 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

The base of a typed DataReader<T>. Provides type-independent methods and properties.

Member Function Documentation

◆ AcknowledgeAll() [1/2]

void AcknowledgeAll ( )

Acknowledges all previously accessed samples.

The full documentation is available in the C API: DDS_DataReader_acknowledge_all

◆ AcknowledgeAll() [2/2]

void AcknowledgeAll ( AckResponseData  responseData)

Acknowledges all previously accessed samples with a response.

The full documentation is available in the C API: DDS_DataReader_acknowledge_all_w_response

◆ AcknowledgeSample() [1/4]

void AcknowledgeSample ( SampleIdentity  sampleIdentity)

Acknowledges a single sample explicitly.

The SampleIdentity from a specific LoanedSample<T> can be obtained from its SampleInfo. This method is equivalent to AcknowledgeSample(SampleInfo), but can be used with a previously stored SampleIdentity when the specific LoanedSample<T> has already been disposed.

◆ AcknowledgeSample() [2/4]

void AcknowledgeSample ( SampleIdentity  sampleIdentity,
AckResponseData  responseData 
)

Acknowledges a single sample explicitly with a response.

The SampleIdentity from a specific LoanedSample<T> can be obtained from its SampleInfo. This method is equivalent to AcknowledgeSample(SampleInfo, AckResponseData), but can be used with a previously stored SampleIdentity when the specific LoanedSample<T> has already been disposed.

◆ AcknowledgeSample() [3/4]

void AcknowledgeSample ( SampleInfo  sampleInfo)

Acknowledges a single sample explicitly.

The full documentation is available in the C API: DDS_DataReader_acknowledge_sample

◆ AcknowledgeSample() [4/4]

void AcknowledgeSample ( SampleInfo  sampleInfo,
AckResponseData  responseData 
)

Acknowledges a single sample explicitly with a response.

The full documentation is available in the C API: DDS_DataReader_acknowledge_sample_w_response

◆ CreateQueryCondition() [1/2]

QueryCondition CreateQueryCondition ( Filter  filter)

Creates a QueryCondition with DataState.Any.

The full documentation is available in the C API: DDS_DataReader_create_querycondition

◆ CreateQueryCondition() [2/2]

QueryCondition CreateQueryCondition ( Filter  filter,
DataState  state 
)

Creates a QueryCondition with a filter and a data state.

The full documentation is available in the C API: DDS_DataReader_create_querycondition

◆ CreateReadCondition()

ReadCondition CreateReadCondition ( DataState  state)

Creates a ReadCondition.

The full documentation is available in the C API: DDS_DataReader_create_readcondition

◆ DisposeContainedEntities()

void DisposeContainedEntities ( )

Disposes all the entities that were created by this reader.

The full documentation is available in the C API: DDS_DataReader_delete_contained_entities

◆ GetKeyValueUntyped()

abstract object GetKeyValueUntyped ( object  keyHolder,
in InstanceHandle  InstanceHandle 
)
pure virtual

Allows calling DataReader<T>.GetKeyValue in a context where the type is not known.

Returns
The key values corresponding to the provided instance handle.

◆ GetMatchedPublicationData() [1/2]

IEnumerable<PublicationBuiltinTopicData> GetMatchedPublicationData ( )

Retrieves the information on all publications that are currently "associated" with this DataReader.

◆ GetMatchedPublicationData() [2/2]

PublicationBuiltinTopicData GetMatchedPublicationData ( in InstanceHandle  publicationHandle)

Retrieves the information on a publication that is currently "associated" with this DataReader.

The full documentation is available in the C API: DDS_DataReader_get_matched_publication_data

◆ GetMatchedPublicationDataReaderProtocolStatus()

DataReaderProtocolStatus GetMatchedPublicationDataReaderProtocolStatus ( in InstanceHandle  publicationHandle)

Gets the DataReaderProtocolStatus for this reader, per matched publication identified by its InstanceHandle.

The full documentation is available in the C API: DDS_DataReader_get_matched_publication_datareader_protocol_status

◆ GetMatchedPublicationParticipantData()

ParticipantBuiltinTopicData GetMatchedPublicationParticipantData ( in InstanceHandle  publicationHandle)

Retrieves the information on the discovered Domain.DomainParticipant associated with the publication that is currently matching with the DataReader<T>

The full documentation is available in the C API: DDS_DataReader_get_matched_publication_participant_data

◆ IsMatchedPublicationAlive()

bool IsMatchedPublicationAlive ( in InstanceHandle  publicationHandle)

Check if a publication currently matched with this reader is alive.

The full documentation is available in the C API: DDS_DataReader_is_matched_publication_alive

◆ LookupInstanceUntyped()

abstract InstanceHandle LookupInstanceUntyped ( object  keyHolder)
pure virtual

Allows calling DataReader<T>.LookupInstance in a context where the type is not known.

Returns
The InstanceHandle corresponding to the provided keyholder. The runtime type of the keyholder must match that of the actual DataReader<T> otherwise this operation throws InvalidCastException.

Implemented in DataReader< T >.

◆ ReadUntyped()

abstract LoanedSamples<object> ReadUntyped ( )
pure virtual

Allows calling DataReader<T>.Read in a context where the type is not known.

Returns
A collection equivalent to the one returned by DataReader<T>.Read, but one where the declared type of the data is object, instead of a concrete T.

Implemented in DataReader< T >.

◆ ResetEvents()

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

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

◆ SelectUntyped()

abstract SelectorUntyped SelectUntyped ( )
pure virtual

Allows calling DataReader<T>.Select in a context where the type is not known.

Returns
A Selector<T>, but one where the declared type of the data is object, instead of a concrete T.

Implemented in DataReader< T >.

◆ TakeUntyped()

abstract LoanedSamples<object> TakeUntyped ( )
pure virtual

Allows calling DataReader<T>.Take in a context where the type is not known.

Returns
A collection equivalent to the one returned by DataReader<T>.Take, but one where the declared type of the data is object, instead of a concrete T.

Implemented in DataReader< T >.

◆ WaitForHistoricalData()

void WaitForHistoricalData ( in Duration  duration)

Waits until all "historical" data is received if the reader was configured with a non-Volatile DurabilityKind.

The full documentation is available in the C API: DDS_DataReader_wait_for_historical_data

Property Documentation

◆ DataAvailable

DataAvailableEventHandler DataAvailable
addremove

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

◆ DataReaderCacheStatus

Retrieve the StatusMask.DataReaderCache status.

The full documentation is available in the C API: DDS_DataReader_get_datareader_cache_status

◆ DataReaderProtocolStatus

Retrieve the StatusMask.DataReaderProtocol status.

The full documentation is available in the C API: DDS_DataReader_get_datareader_protocol_status

◆ LivelinessChanged

LivelinessChangedEventHandler LivelinessChanged
addremove

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

◆ LivelinessChangedStatus

Retrieve the StatusMask.LivelinessChanged status.

The full documentation is available in the C API: DDS_DataReader_get_liveliness_changed_status

◆ MatchedPublications

IEnumerable<InstanceHandle> MatchedPublications
get

Retrieves the list of publications currently "associated" with this DataReader.

The full documentation is available in the C API: DDS_DataReader_get_matched_publications

◆ Qos

DataReaderQos Qos
getset

Gets or sets the reader QoS.

The full documentation is available in the C API: DDS_DataReader_set_qos

◆ RequestedDeadlineMissed

RequestedDeadlineMissedEventHandler RequestedDeadlineMissed
addremove

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

◆ RequestedDeadlineMissedStatus

Retrieve the StatusMask.RequestedDeadlineMissed status.

The full documentation is available in the C API: DDS_DataReader_get_requested_deadline_missed_status

◆ RequestedIncompatibleQos

RequestedIncompatibleQosEventHandler RequestedIncompatibleQos
addremove

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

◆ RequestedIncompatibleQosStatus

Retrieve the StatusMask.RequestedIncompatibleQos status.

The full documentation is available in the C API: DDS_DataReader_get_requested_incompatible_qos_status

◆ SampleLost

SampleLostEventHandler SampleLost
addremove

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

◆ SampleLostStatus

Retrieve the StatusMask.SampleLost status.

The full documentation is available in the C API: DDS_DataReader_get_sample_lost_status

◆ SampleRejected

SampleRejectedEventHandler SampleRejected
addremove

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

◆ SampleRejectedStatus

Retrieve the StatusMask.SampleRejected status.

The full documentation is available in the C API: DDS_DataReader_get_sample_rejected_status

◆ Subscriber

abstract Subscriber Subscriber
get

Returns the Subscriber to which the DataReader belongs.

The full documentation is available in the C API: DDS_DataReader_get_subscriber

◆ SubscriptionMatched

SubscriptionMatchedEventHandler SubscriptionMatched
addremove

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

◆ SubscriptionMatchedStatus

Retrieve the StatusMask.SubscriptionMatched status.

The full documentation is available in the C API: DDS_DataReader_get_subscription_matched_status

◆ TopicDescription

abstract ITopicDescription TopicDescription
get

Returns the TopicDescription associated with this DataReader.

The full documentation is available in the C API: DDS_DataReader_get_topicdescription