RTI Connext .Net APIs  Version 5.2.0
 All Classes Namespaces Functions Variables Enumerations Properties Groups Pages
DDS::DataReader Class Reference

<<interface>> Allows the application to: (1) declare the data it wishes to receive (i.e. make a subscription) and (2) access the data received by the attached DDS::Subscriber. More...

#include <managed_subscription.h>

Inheritance diagram for DDS::DataReader:
DDS::DomainEntity DDS::Entity DDS::TypedDataReader< T > DDS::TypedDataReader< Bytes^  > DDS::TypedDataReader< DynamicData^  > DDS::TypedDataReader< Foo^  > DDS::TypedDataReader< KeyedBytes^  > DDS::TypedDataReader< KeyedString^  > DDS::TypedDataReader< ParticipantBuiltinTopicData^  > DDS::TypedDataReader< PublicationBuiltinTopicData^  > DDS::TypedDataReader< StringWrapper^  > DDS::TypedDataReader< SubscriptionBuiltinTopicData^  > DDS::TypedDataReader< TopicBuiltinTopicData^  >

Public Member Functions

ReadConditioncreate_readcondition (System::UInt32 sample_states, System::UInt32 view_states, System::UInt32 instance_states)
 Creates a DDS::ReadCondition.
 
QueryConditioncreate_querycondition (System::UInt32 sample_states, System::UInt32 view_states, System::UInt32 instance_states, System::String^ query_expression, StringSeq^ query_parameters)
 Creates a DDS::QueryCondition.
 
void delete_readcondition (ReadCondition^ %condition)
 Deletes a DDS::ReadCondition or DDS::QueryCondition attached to the DDS::DataReader.
 
void delete_contained_entities ()
 Deletes all the entities that were created by means of the "create" operations on the DDS::DataReader.
 
void wait_for_historical_data (Duration_t% max_wait)
 Waits until all "historical" data is received for DDS::DataReader entities that have a non-VOLATILE Durability Qos kind.
 
void acknowledge_sample (SampleInfo^ sample_info, AckResponseData_t^ response_data)
 Acknowledge a single sample explicitly.
 
void acknowledge_sample (SampleInfo^ sample_info)
 Acknowledge a single sample explicitly.
 
void acknowledge_all (AckResponseData_t^ response_data)
 Acknowledge all previously accessed samples.
 
void acknowledge_all ()
 Acknowledge all previously accessed samples.
 
void get_matched_publications (InstanceHandleSeq^ publication_handles)
 Retrieve the list of publications currently "associated" with this DDS::DataReader.
 
void get_matched_publication_data (PublicationBuiltinTopicData^ publication_data, InstanceHandle_t% publication_handle)
 This operation retrieves the information on a publication that is currently "associated" with the DDS::DataReader.
 
void get_matched_publication_participant_data (ParticipantBuiltinTopicData^ participant_data, InstanceHandle_t% publication_handle)
 <<extension>> This operation retrieves the information on the discovered DDS::DomainParticipant associated with the publication that is currently matching with the DDS::DataReader.
 
ITopicDescriptionget_topicdescription ()
 Returns the ::DDS::TopicDescription associated with the DDS::DataReader.
 
Subscriberget_subscriber ()
 Returns the DDS::Subscriber to which the DDS::DataReader belongs.
 
void get_sample_rejected_status (SampleRejectedStatus% status)
 Accesses the ::DDS::StatusKind::SAMPLE_REJECTED_STATUS communication status.
 
void get_liveliness_changed_status (LivelinessChangedStatus% status)
 Accesses the ::DDS::StatusKind::LIVELINESS_CHANGED_STATUS communication status.
 
void get_requested_deadline_missed_status (RequestedDeadlineMissedStatus% status)
 Accesses the ::DDS::StatusKind::REQUESTED_DEADLINE_MISSED_STATUS communication status.
 
void get_requested_incompatible_qos_status (RequestedIncompatibleQosStatus^ status)
 Accesses the ::DDS::StatusKind::REQUESTED_INCOMPATIBLE_QOS_STATUS communication status.
 
void get_sample_lost_status (SampleLostStatus% status)
 Accesses the ::DDS::StatusKind::SAMPLE_LOST_STATUS communication status.
 
void get_subscription_matched_status (SubscriptionMatchedStatus% status)
 Accesses the ::DDS::StatusKind::SUBSCRIPTION_MATCHED_STATUS communication status.
 
virtual void get_datareader_cache_status (DataReaderCacheStatus% status)
 <<extension>> Get the datareader cache status for this reader.
 
virtual void get_datareader_protocol_status (DataReaderProtocolStatus% status)
 <<extension>> Get the datareader protocol status for this reader.
 
virtual void get_matched_publication_datareader_protocol_status (DataReaderProtocolStatus% status, InstanceHandle_t% publication_handle)
 <<extension>> Get the datareader protocol status for this reader, per matched publication identified by the publication_handle.
 
void set_qos (DataReaderQos^ qos)
 Sets the reader QoS.
 
void set_qos_with_profile (System::String^ library_name, System::String^ profile_name)
 <<extension>> Change the QoS of this reader using the input XML QoS profile.
 
void get_qos (DataReaderQos^ qos)
 Gets the reader QoS.
 
void set_listener (DataReaderListener^ l, StatusMask mask)
 Sets the reader listener.
 
DataReaderListenerget_listener ()
 Get the reader listener.
 
template<typename T >
void read_untyped (DDS::LoanableSequence< T >^received_data, DDS::SampleInfoSeq^ info_seq, System::Int32 max_samples, System::UInt32 sample_states, System::UInt32 view_states, System::UInt32 instance_states)
 Read data samples, if any are available.
 
template<typename T >
void take_untyped (DDS::LoanableSequence< T >^received_data, DDS::SampleInfoSeq^ info_seq, System::Int32 max_samples, System::UInt32 sample_states, System::UInt32 view_states, System::UInt32 instance_states)
 Take data samples, if any are available.
 
template<typename T >
void read_w_condition_untyped (DDS::LoanableSequence< T >^received_data, DDS::SampleInfoSeq^ info_seq, System::Int32 max_samples, DDS::ReadCondition^ condition)
 Read data samples, if any are available.
 
template<typename T >
void take_w_condition_untyped (DDS::LoanableSequence< T >^received_data, DDS::SampleInfoSeq^ info_seq, System::Int32 max_samples, DDS::ReadCondition^ condition)
 Take data samples, if any are available.
 
void read_next_sample_untyped (System::Object^ received_data, DDS::SampleInfo^ sample_info)
 Read data samples, if any are available.
 
void take_next_sample_untyped (System::Object^ received_data, DDS::SampleInfo^ sample_info)
 Take data samples, if any are available.
 
template<typename T >
void read_instance_untyped (DDS::LoanableSequence< T >^received_data, DDS::SampleInfoSeq^ info_seq, System::Int32 max_samples, DDS::InstanceHandle_t% a_handle, System::UInt32 sample_states, System::UInt32 view_states, System::UInt32 instance_states)
 Read data samples, if any are available.
 
template<typename T >
void take_instance_untyped (DDS::LoanableSequence< T >^received_data, DDS::SampleInfoSeq^ info_seq, System::Int32 max_samples, DDS::InstanceHandle_t% a_handle, System::UInt32 sample_states, System::UInt32 view_states, System::UInt32 instance_states)
 Take data samples, if any are available.
 
template<typename T >
void read_next_instance_untyped (DDS::LoanableSequence< T >^received_data, DDS::SampleInfoSeq^ info_seq, System::Int32 max_samples, DDS::InstanceHandle_t% previous_handle, System::UInt32 sample_states, System::UInt32 view_states, System::UInt32 instance_states)
 Read data samples, if any are available.
 
template<typename T >
void take_next_instance_untyped (DDS::LoanableSequence< T >^received_data, DDS::SampleInfoSeq^ info_seq, System::Int32 max_samples, DDS::InstanceHandle_t% previous_handle, System::UInt32 sample_states, System::UInt32 view_states, System::UInt32 instance_states)
 Take data samples, if any are available.
 
template<typename T >
void read_next_instance_w_condition_untyped (DDS::LoanableSequence< T >^received_data, DDS::SampleInfoSeq^ info_seq, System::Int32 max_samples, DDS::InstanceHandle_t% previous_handle, DDS::ReadCondition^ condition)
 Read data samples, if any are available.
 
template<typename T >
void take_next_instance_w_condition_untyped (DDS::LoanableSequence< T >^received_data, DDS::SampleInfoSeq^ info_seq, System::Int32 max_samples, DDS::InstanceHandle_t% previous_handle, DDS::ReadCondition^ condition)
 Take data samples, if any are available.
 
template<typename T >
void return_loan_untyped (DDS::LoanableSequence< T >^received_data, DDS::SampleInfoSeq^ info_seq)
 Return loaned sample data and meta-data.
 
void get_key_value_untyped (System::Object^ key_holder, DDS::InstanceHandle_t% handle)
 Fill in the key fields of the given data sample.
 
DDS::InstanceHandle_t lookup_instance_untyped (System::Object^ key_holder)
 
virtual void enable () override
 Enables the DDS::Entity.
 
virtual StatusConditionget_statuscondition () override
 Allows access to the DDS::StatusCondition associated with the DDS::Entity.
 
virtual StatusMask get_status_changes () override
 Retrieves the list of communication statuses in the DDS::Entity that are triggered.
 
virtual InstanceHandle_t get_instance_handle () override
 Allows access to the DDS::InstanceHandle_t associated with the DDS::Entity.
 

Detailed Description

<<interface>> Allows the application to: (1) declare the data it wishes to receive (i.e. make a subscription) and (2) access the data received by the attached DDS::Subscriber.

QoS:
DDS::DataReaderQos
Status:
::DDS::StatusKind::DATA_AVAILABLE_STATUS;
::DDS::StatusKind::LIVELINESS_CHANGED_STATUS, DDS::LivelinessChangedStatus;
::DDS::StatusKind::REQUESTED_DEADLINE_MISSED_STATUS, DDS::RequestedDeadlineMissedStatus;
::DDS::StatusKind::REQUESTED_INCOMPATIBLE_QOS_STATUS, DDS::RequestedIncompatibleQosStatus;
::DDS::StatusKind::SAMPLE_LOST_STATUS, DDS::SampleLostStatus;
::DDS::StatusKind::SAMPLE_REJECTED_STATUS, DDS::SampleRejectedStatus;
::DDS::StatusKind::SUBSCRIPTION_MATCHED_STATUS, DDS::SubscriptionMatchedStatus;
Listener:
DDS::DataReaderListener

A DDS::DataReader refers to exactly one ::DDS::TopicDescription (either a DDS::Topic, a DDS::ContentFilteredTopic or a DDS::MultiTopic) that identifies the data to be read.

The subscription has a unique resulting type. The data-reader may give access to several instances of the resulting type, which can be distinguished from each other by their key.

DDS::DataReader is an abstract class. It must be specialised for each particular application data-type (see USER_DATA). The additional methods or functions that must be defined in the auto-generated class for a hypothetical application type Foo are specified in the generic type DDS::TypedDataReader.

The following operations may be called even if the DDS::DataReader is not enabled. Other operations will fail with the value DDS::Retcode_NotEnabled if called on a disabled DDS::DataReader:

All sample-accessing operations, namely: DDS::TypedDataReader::read, DDS::TypedDataReader::take, DDS::TypedDataReader::read_w_condition, and DDS::TypedDataReader::take_w_condition may fail with the error DDS::Retcode_PreconditionNotMet as described in DDS::Subscriber::begin_access.

See Also
Operations Allowed in Listener Callbacks
Access to data samples
Examples:
HelloWorld_subscriber.cpp, and HelloWorldSupport.cpp.

Member Function Documentation

ReadCondition ^ DDS::DataReader::create_readcondition ( System::UInt32  sample_states,
System::UInt32  view_states,
System::UInt32  instance_states 
)

Creates a DDS::ReadCondition.

The returned DDS::ReadCondition will be attached and belong to the DDS::DataReader.

Parameters
sample_states<<in>> sample state of the data samples that are of interest
view_states<<in>> view state of the data samples that are of interest
instance_states<<in>> instance state of the data samples that are of interest
Returns
return DDS::ReadCondition created. Returns NULL in case of failure.
QueryCondition ^ DDS::DataReader::create_querycondition ( System::UInt32  sample_states,
System::UInt32  view_states,
System::UInt32  instance_states,
System::String^  query_expression,
StringSeq query_parameters 
)

Creates a DDS::QueryCondition.

The returned DDS::QueryCondition will be attached and belong to the DDS::DataReader.

Queries and Filters Syntax describes the syntax of query_expression and query_parameters.

Parameters
sample_states<<in>> sample state of the data samples that are of interest
view_states<<in>> view state of the data samples that are of interest
instance_states<<in>> instance state of the data samples that are of interest
query_expression<<in>> Expression for the query. Cannot be NULL.
query_parameters<<in>> Parameters for the query expression. Cannot be NULL.
Returns
return DDS::QueryCondition created. Returns NULL in case of failure.
void DDS::DataReader::delete_readcondition ( ReadCondition^ %  condition)

Deletes a DDS::ReadCondition or DDS::QueryCondition attached to the DDS::DataReader.

Since DDS::QueryCondition specializes DDS::ReadCondition, it can also be used to delete a DDS::QueryCondition.

Precondition
The DDS::ReadCondition must be attached to the DDS::DataReader, or the operation will fail with the error DDS::Retcode_PreconditionNotMet.
Parameters
condition<<in>> Condition to be deleted.
Exceptions
Oneof the Standard Return Codes, or DDS::Retcode_PreconditionNotMet
void DDS::DataReader::delete_contained_entities ( )

Deletes all the entities that were created by means of the "create" operations on the DDS::DataReader.

Deletes all contained DDS::ReadCondition and DDS::QueryCondition objects.

The operation will fail with DDS::Retcode_PreconditionNotMet if the any of the contained entities is in a state where it cannot be deleted.

Once DDS::DataReader::delete_contained_entities completes successfully, the application may delete the DDS::DataReader, knowing that it has no contained DDS::ReadCondition and DDS::QueryCondition objects.

Exceptions
Oneof the Standard Return Codes, or DDS::Retcode_PreconditionNotMet
void DDS::DataReader::wait_for_historical_data ( Duration_t max_wait)

Waits until all "historical" data is received for DDS::DataReader entities that have a non-VOLATILE Durability Qos kind.

This operation is intended only for DDS::DataReader entities that have a non-VOLATILE Durability QoS kind.

As soon as an application enables a non-VOLATILE DDS::DataReader, it will start receiving both "historical" data (i.e., the data that was written prior to the time the DDS::DataReader joined the domain) as well as any new data written by the DDS::DataWriter entities. There are situations where the application logic may require the application to wait until all "historical" data is received. This is the purpose of the DDS::DataReader::wait_for_historical_data operations.

DDS::DataReader::wait_for_historical_data() blocks the calling thread until either all "historical" data is received, or until the duration specified by the max_wait parameter elapses, whichever happens first. It will return immediately if no DataWriters have been discovered at the time the operation is called; therefore it is advisable to make sure at least one DDS::DataWriter has been discovered before calling this operation. (One way to do this is by using DDS::DataReader::get_subscription_matched_status.)

A successful completion indicates that all the "historical" data was "received"; timing out indicates that max_wait elapsed before all the data was received.

Parameters
max_wait<<in>> Timeout value. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes, DDS::Retcode_Timeout or DDS::Retcode_NotEnabled.
void DDS::DataReader::acknowledge_sample ( SampleInfo sample_info,
AckResponseData_t response_data 
)

Acknowledge a single sample explicitly.

Applicable only when DDS::ReliabilityQosPolicy::acknowledgement_mode = ::DDS::ReliabilityQosPolicyAcknowledgmentModeKind::APPLICATION_EXPLICIT_ACKNOWLEDGMENT_MODE

A call to this method does not necessarily trigger the sending of an AppAck RTPS message from the DataReader to the DataWriter. How and when AppAck messages are sent can be configured using the QoS values DDS::RtpsReliableReaderProtocol_t::samples_per_app_ack and DDS::RtpsReliableReaderProtocol_t::app_ack_period.

The maximum length of the response is configured using DDS::DataReaderResourceLimitsQosPolicy::max_app_ack_response_length

Parameters
sample_info<<in>> DDS::SampleInfo identifying the sample being acknowledged.
response_data<<in>> Response data sent to DDS::DataWriter upon acknowledgment (via DDS::DataWriterListener::on_application_acknowledgment)
Exceptions
Oneof the Standard Return Codes
void DDS::DataReader::acknowledge_sample ( SampleInfo sample_info)

Acknowledge a single sample explicitly.

Applicable only when DDS::ReliabilityQosPolicy::acknowledgement_mode = ::DDS::ReliabilityQosPolicyAcknowledgmentModeKind::APPLICATION_EXPLICIT_ACKNOWLEDGMENT_MODE

A call to this method does not necessarily trigger the sending of an AppAck RTPS message from the DataReader to the DataWriter. How and when AppAck messages are sent can be configured using the QoS values DDS::RtpsReliableReaderProtocol_t::samples_per_app_ack and DDS::RtpsReliableReaderProtocol_t::app_ack_period.

Parameters
sample_info<<in>> DDS::SampleInfo identifying the sample being acknowledged.
Exceptions
Oneof the Standard Return Codes
void DDS::DataReader::acknowledge_all ( AckResponseData_t response_data)

Acknowledge all previously accessed samples.

Applicable only when DDS::ReliabilityQosPolicy::acknowledgement_mode = ::DDS::ReliabilityQosPolicyAcknowledgmentModeKind::APPLICATION_EXPLICIT_ACKNOWLEDGMENT_MODE

A call to this method does not necessarily trigger the sending of an AppAck RTPS message from the DataReader to the DataWriter. How and when AppAck messages are sent can be configured using the QoS values DDS::RtpsReliableReaderProtocol_t::samples_per_app_ack and DDS::RtpsReliableReaderProtocol_t::app_ack_period.

The maximum length of the response is configured using DDS::DataReaderResourceLimitsQosPolicy::max_app_ack_response_length

Parameters
response_data<<in>> Response data sent to DDS::DataWriter upon acknowledgment
Exceptions
Oneof the Standard Return Codes
void DDS::DataReader::acknowledge_all ( )

Acknowledge all previously accessed samples.

Applicable only when DDS::ReliabilityQosPolicy::acknowledgement_mode = ::DDS::ReliabilityQosPolicyAcknowledgmentModeKind::APPLICATION_EXPLICIT_ACKNOWLEDGMENT_MODE

A call to this method does not necessarily trigger the sending of an AppAck RTPS message from the DataReader to the DataWriter. How and when AppAck messages are sent can be configured using the QoS values DDS::RtpsReliableReaderProtocol_t::samples_per_app_ack and DDS::RtpsReliableReaderProtocol_t::app_ack_period.

Exceptions
Oneof the Standard Return Codes
void DDS::DataReader::get_matched_publications ( InstanceHandleSeq publication_handles)

Retrieve the list of publications currently "associated" with this DDS::DataReader.

Matching publications are those in the same domain that have a matching DDS::Topic, compatible QoS common partition that the DDS::DomainParticipant has not indicated should be "ignored" by means of the DDS::DomainParticipant::ignore_publication operation.

The handles returned in the publication_handles list are the ones that are used by the RTI Connext implementation to locally identify the corresponding matched DDS::DataWriter entities. These handles match the ones that appear in the instance_handle field of the DDS::SampleInfo when reading the DDS::PublicationBuiltinTopicDataTypeSupport::PUBLICATION_TOPIC_NAME builtin topic

Parameters
publication_handles<<inout>>. The sequence will be grown if the sequence has ownership and the system has the corresponding resources. Use a sequence without ownership to avoid dynamic memory allocation. If the sequence is too small to store all the matches and the system can not resize the sequence, this method will fail with DDS::Retcode_OutOfResources. The maximum number of matches possible is configured with DDS::DomainParticipantResourceLimitsQosPolicy. You can use a zero-maximum sequence without ownership to quickly check whether there are any matches without allocating any memory. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes, or DDS::Retcode_OutOfResources if the sequence is too small and the system can not resize it, or DDS::Retcode_NotEnabled
void DDS::DataReader::get_matched_publication_data ( PublicationBuiltinTopicData publication_data,
InstanceHandle_t publication_handle 
)

This operation retrieves the information on a publication that is currently "associated" with the DDS::DataReader.

Matched publications are those with a matching DDS::Topic, compatible QoS and common partition that the application has not indicated should be "ignored" by means of the DDS::DomainParticipant::ignore_publication operation.

The publication_handle must correspond to a publication currently associated with the DDS::DataReader. Otherwise, the operation will fail with DDS::Retcode_BadParameter. Use the operation DDS::DataReader::get_matched_publications to find the publications that are currently matched with the DDS::DataReader.

Note: This operation does not retrieve the following information in DDS::PublicationBuiltinTopicData:

The above information is available through DDS::DataReaderListener::on_data_available() (if a reader listener is installed on the DDS::PublicationBuiltinTopicDataDataReader).

Parameters
publication_data<<inout>>. The information to be filled in on the associated publication. Cannot be NULL.
publication_handle<<in>>. Handle to a specific publication associated with the DDS::DataWriter. Cannot be NULL.. Must correspond to a publication currently associated with the DDS::DataReader.
Exceptions
Oneof the Standard Return Codes or DDS::Retcode_NotEnabled
void DDS::DataReader::get_matched_publication_participant_data ( ParticipantBuiltinTopicData participant_data,
InstanceHandle_t publication_handle 
)

<<extension>> This operation retrieves the information on the discovered DDS::DomainParticipant associated with the publication that is currently matching with the DDS::DataReader.

Matched Participants are those with a matching DDS::Topic, compatible QoS and common partition that the application has not indicated should be "ignored" by means of the DDS::DomainParticipant::ignore_publication operation.

The publication_handle must correspond to a publication currently associated with the DDS::DataReader. Otherwise, the operation will fail with DDS::Retcode_BadParameter. The operation may also fail with DDS::Retcode_PreconditionNotMet if the publication corresponds to the same DDS::DomainParticipant that the DataReader belongs to. Use the operation DDS::DataReader::get_matched_publications to find the publications that are currently matched with the DDS::DataReader.

Note: This operation does not retrieve the ::DDS::ParticipantBuiltinTopicData::property.

The above information is available through DDS::DataReaderListener::on_data_available() (if a reader listener is installed on the DDS::PublicationBuiltinTopicDataDataReader).

Parameters
participant_data<<inout>>. The information to be filled in on the associated participant. Cannot be NULL.
publication_handle<<in>>. Handle to a specific publication associated with a DDS::DataWriter. Cannot be NULL.. Must correspond to a publication currently associated with the DDS::DataReader.
Exceptions
Oneof the Standard Return Codes or DDS::Retcode_NotEnabled
ITopicDescription ^ DDS::DataReader::get_topicdescription ( )

Returns the ::DDS::TopicDescription associated with the DDS::DataReader.

Returns that same ::DDS::TopicDescription that was used to create the DDS::DataReader.

Returns
::DDS::TopicDescription associated with the DDS::DataReader.
Subscriber ^ DDS::DataReader::get_subscriber ( )

Returns the DDS::Subscriber to which the DDS::DataReader belongs.

Returns
DDS::Subscriber to which the DDS::DataReader belongs.
void DDS::DataReader::get_sample_rejected_status ( SampleRejectedStatus status)

Accesses the ::DDS::StatusKind::SAMPLE_REJECTED_STATUS communication status.

This also resets the status so that it is no longer considered changed.

Parameters
status<<inout>> DDS::SampleRejectedStatus to be filled in. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes
void DDS::DataReader::get_liveliness_changed_status ( LivelinessChangedStatus status)

Accesses the ::DDS::StatusKind::LIVELINESS_CHANGED_STATUS communication status.

This also resets the status so that it is no longer considered changed.

Parameters
status<<inout>> DDS::LivelinessChangedStatus to be filled in. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes
void DDS::DataReader::get_requested_deadline_missed_status ( RequestedDeadlineMissedStatus status)

Accesses the ::DDS::StatusKind::REQUESTED_DEADLINE_MISSED_STATUS communication status.

This also resets the status so that it is no longer considered changed.

Parameters
status<<inout>> DDS::RequestedDeadlineMissedStatus to be filled in. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes
void DDS::DataReader::get_requested_incompatible_qos_status ( RequestedIncompatibleQosStatus status)

Accesses the ::DDS::StatusKind::REQUESTED_INCOMPATIBLE_QOS_STATUS communication status.

This also resets the status so that it is no longer considered changed.

Parameters
status<<inout>> DDS::RequestedIncompatibleQosStatus to be filled in. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes
void DDS::DataReader::get_sample_lost_status ( SampleLostStatus status)

Accesses the ::DDS::StatusKind::SAMPLE_LOST_STATUS communication status.

This also resets the status so that it is no longer considered changed.

Parameters
status<<inout>> DDS::SampleLostStatus to be filled in. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes
void DDS::DataReader::get_subscription_matched_status ( SubscriptionMatchedStatus status)

Accesses the ::DDS::StatusKind::SUBSCRIPTION_MATCHED_STATUS communication status.

Parameters
status<<inout>> DDS::SubscriptionMatchedStatus to be filled in. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes
virtual void DDS::DataReader::get_datareader_cache_status ( DataReaderCacheStatus status)
virtual

<<extension>> Get the datareader cache status for this reader.

Parameters
status<<inout>> DDS::DataReaderCacheStatus to be filled in. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes or DDS::Retcode_NotEnabled.
virtual void DDS::DataReader::get_datareader_protocol_status ( DataReaderProtocolStatus status)
virtual

<<extension>> Get the datareader protocol status for this reader.

This also resets the status so that it is no longer considered changed.

Parameters
status<<inout>> DDS::DataReaderProtocolStatus to be filled in. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes or DDS::Retcode_NotEnabled.
virtual void DDS::DataReader::get_matched_publication_datareader_protocol_status ( DataReaderProtocolStatus status,
InstanceHandle_t publication_handle 
)
virtual

<<extension>> Get the datareader protocol status for this reader, per matched publication identified by the publication_handle.

This also resets the status so that it is no longer considered changed.

Note: Status for a remote entity is only kept while the entity is alive. Once a remote entity is no longer alive, its status is deleted.

Parameters
status<<inout>>. The information to be filled in on the associated publication. Cannot be NULL.
publication_handle<<in>>. Handle to a specific publication associated with the DDS::DataWriter. Cannot be NULL.. Must correspond to a publication currently associated with the DDS::DataReader.
Exceptions
Oneof the Standard Return Codes or DDS::Retcode_NotEnabled
void DDS::DataReader::set_qos ( DataReaderQos qos)

Sets the reader QoS.

This operation modifies the QoS of the DDS::DataReader.

The DDS::DataReaderQos::user_data, DDS::DataReaderQos::deadline, DDS::DataReaderQos::latency_budget, DDS::DataReaderQos::time_based_filter, DDS::DataReaderQos::reader_data_lifecycle can be changed. The other policies are immutable.

Parameters
qos<<in>> The DDS::DataReaderQos to be set to. Policies must be consistent. Immutable policies cannot be changed after DDS::DataReader is enabled. The special value DDS::Subscriber::DATAREADER_QOS_DEFAULT can be used to indicate that the QoS of the DDS::DataReader should be changed to match the current default DDS::DataReaderQos set in the DDS::Subscriber. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes, DDS::Retcode_ImmutablePolicy, or DDS::Retcode_InconsistentPolicy.
See Also
DDS::DataReaderQos for rules on consistency among QoS
set_qos (abstract)
DDS::DataReader::set_qos
Operations Allowed in Listener Callbacks
void DDS::DataReader::set_qos_with_profile ( System::String^  library_name,
System::String^  profile_name 
)

<<extension>> Change the QoS of this reader using the input XML QoS profile.

This operation modifies the QoS of the DDS::DataReader.

The DDS::DataReaderQos::user_data, DDS::DataReaderQos::deadline, DDS::DataReaderQos::latency_budget, DDS::DataReaderQos::time_based_filter, DDS::DataReaderQos::reader_data_lifecycle can be changed. The other policies are immutable.

Parameters
library_name<<in>> Library name containing the XML QoS profile. If library_name is null RTI Connext will use the default library (see DDS::Subscriber::set_default_library).
profile_name<<in>> XML QoS Profile name. If profile_name is null RTI Connext will use the default profile (see DDS::Subscriber::set_default_profile).
Exceptions
Oneof the Standard Return Codes, DDS::Retcode_ImmutablePolicy, or DDS::Retcode_InconsistentPolicy.
See Also
DDS::DataReaderQos for rules on consistency among QoS
DDS::DataReader::set_qos
Operations Allowed in Listener Callbacks
void DDS::DataReader::get_qos ( DataReaderQos qos)

Gets the reader QoS.

This method may potentially allocate memory depending on the sequences contained in some QoS policies.

Parameters
qos<<inout>> The DDS::DataReaderQos to be filled up. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes
See Also
get_qos (abstract)
void DDS::DataReader::set_listener ( DataReaderListener l,
StatusMask  mask 
)

Sets the reader listener.

Parameters
l<<in>> DDS::DataReaderListener to set to
mask<<in>> ::DDS::StatusMask associated with the DDS::DataReaderListener.
Exceptions
Oneof the Standard Return Codes
See Also
set_listener (abstract)
DataReaderListener ^ DDS::DataReader::get_listener ( )

Get the reader listener.

Returns
DDS::DataReaderListener of the DDS::DataReader.
See Also
Entity_get_listener
template<typename T >
void DDS::DataReader::read_untyped ( DDS::LoanableSequence< T >^  received_data,
DDS::SampleInfoSeq info_seq,
System::Int32  max_samples,
System::UInt32  sample_states,
System::UInt32  view_states,
System::UInt32  instance_states 
)

Read data samples, if any are available.

This method allows type-independent code to work with a variety of concrete DDS::TypedDataReader classes in a consistent way.

Statically type-safe code should use the appropriate DDS::TypedDataReader::read method instead of this one. See that method for detailed documentation.

See Also
DDS::DataReader::take_untyped
DDS::TypedDataReader::read
template<typename T >
void DDS::DataReader::take_untyped ( DDS::LoanableSequence< T >^  received_data,
DDS::SampleInfoSeq info_seq,
System::Int32  max_samples,
System::UInt32  sample_states,
System::UInt32  view_states,
System::UInt32  instance_states 
)

Take data samples, if any are available.

This method allows type-independent code to work with a variety of concrete DDS::TypedDataReader classes in a consistent way.

Statically type-safe code should use the appropriate DDS::TypedDataReader::take method instead of this one. See that method for detailed documentation.

See Also
DDS::DataReader::read_untyped
DDS::TypedDataReader::take
template<typename T >
void DDS::DataReader::read_w_condition_untyped ( DDS::LoanableSequence< T >^  received_data,
DDS::SampleInfoSeq info_seq,
System::Int32  max_samples,
DDS::ReadCondition condition 
)

Read data samples, if any are available.

This method allows type-independent code to work with a variety of concrete DDS::TypedDataReader classes in a consistent way.

Statically type-safe code should use the appropriate DDS::TypedDataReader::read_w_condition method instead of this one. See that method for detailed documentation.

See Also
DDS::DataReader::take_w_condition_untyped
DDS::TypedDataReader::read_w_condition
template<typename T >
void DDS::DataReader::take_w_condition_untyped ( DDS::LoanableSequence< T >^  received_data,
DDS::SampleInfoSeq info_seq,
System::Int32  max_samples,
DDS::ReadCondition condition 
)

Take data samples, if any are available.

This method allows type-independent code to work with a variety of concrete DDS::TypedDataReader classes in a consistent way.

Statically type-safe code should use the appropriate DDS::TypedDataReader::take_w_condition method instead of this one. See that method for detailed documentation.

See Also
DDS::DataReader::read_w_condition_untyped
DDS::TypedDataReader::take_w_condition
void DDS::DataReader::read_next_sample_untyped ( System::Object^  received_data,
DDS::SampleInfo sample_info 
)

Read data samples, if any are available.

This method allows type-independent code to work with a variety of concrete DDS::TypedDataReader classes in a consistent way.

Statically type-safe code should use the appropriate DDS::TypedDataReader::read_next_sample method instead of this one. See that method for detailed documentation.

See Also
DDS::DataReader::take_next_sample_untyped
DDS::TypedDataReader::read_next_sample
void DDS::DataReader::take_next_sample_untyped ( System::Object^  received_data,
DDS::SampleInfo sample_info 
)

Take data samples, if any are available.

This method allows type-independent code to work with a variety of concrete DDS::TypedDataReader classes in a consistent way.

Statically type-safe code should use the appropriate DDS::TypedDataReader::take_next_sample method instead of this one. See that method for detailed documentation.

See Also
DDS::DataReader::read_next_sample_untyped
DDS::TypedDataReader::take_next_sample
template<typename T >
void DDS::DataReader::read_instance_untyped ( DDS::LoanableSequence< T >^  received_data,
DDS::SampleInfoSeq info_seq,
System::Int32  max_samples,
DDS::InstanceHandle_t a_handle,
System::UInt32  sample_states,
System::UInt32  view_states,
System::UInt32  instance_states 
)

Read data samples, if any are available.

This method allows type-independent code to work with a variety of concrete DDS::TypedDataReader classes in a consistent way.

Statically type-safe code should use the appropriate DDS::TypedDataReader::read_instance method instead of this one. See that method for detailed documentation.

See Also
DDS::DataReader::take_instance_untyped
DDS::TypedDataReader::read_instance
template<typename T >
void DDS::DataReader::take_instance_untyped ( DDS::LoanableSequence< T >^  received_data,
DDS::SampleInfoSeq info_seq,
System::Int32  max_samples,
DDS::InstanceHandle_t a_handle,
System::UInt32  sample_states,
System::UInt32  view_states,
System::UInt32  instance_states 
)

Take data samples, if any are available.

This method allows type-independent code to work with a variety of concrete DDS::TypedDataReader classes in a consistent way.

Statically type-safe code should use the appropriate DDS::TypedDataReader::take_instance method instead of this one. See that method for detailed documentation.

See Also
DDS::DataReader::read_instance_untyped
DDS::TypedDataReader::take_instance
template<typename T >
void DDS::DataReader::read_next_instance_untyped ( DDS::LoanableSequence< T >^  received_data,
DDS::SampleInfoSeq info_seq,
System::Int32  max_samples,
DDS::InstanceHandle_t previous_handle,
System::UInt32  sample_states,
System::UInt32  view_states,
System::UInt32  instance_states 
)

Read data samples, if any are available.

This method allows type-independent code to work with a variety of concrete DDS::TypedDataReader classes in a consistent way.

Statically type-safe code should use the appropriate DDS::TypedDataReader::read_next_instance method instead of this one. See that method for detailed documentation.

See Also
DDS::DataReader::take_next_instance_untyped
DDS::TypedDataReader::read_next_instance
template<typename T >
void DDS::DataReader::take_next_instance_untyped ( DDS::LoanableSequence< T >^  received_data,
DDS::SampleInfoSeq info_seq,
System::Int32  max_samples,
DDS::InstanceHandle_t previous_handle,
System::UInt32  sample_states,
System::UInt32  view_states,
System::UInt32  instance_states 
)

Take data samples, if any are available.

This method allows type-independent code to work with a variety of concrete DDS::TypedDataReader classes in a consistent way.

Statically type-safe code should use the appropriate DDS::TypedDataReader::take_next_instance method instead of this one. See that method for detailed documentation.

See Also
DDS::DataReader::read_next_instance_untyped
DDS::TypedDataReader::take_next_instance
template<typename T >
void DDS::DataReader::read_next_instance_w_condition_untyped ( DDS::LoanableSequence< T >^  received_data,
DDS::SampleInfoSeq info_seq,
System::Int32  max_samples,
DDS::InstanceHandle_t previous_handle,
DDS::ReadCondition condition 
)

Read data samples, if any are available.

This method allows type-independent code to work with a variety of concrete DDS::TypedDataReader classes in a consistent way.

Statically type-safe code should use the appropriate DDS::TypedDataReader::read_next_instance_w_condition method instead of this one. See that method for detailed documentation.

See Also
DDS::DataReader::take_next_instance_w_condition_untyped
DDS::TypedDataReader::read_next_instance_w_condition
template<typename T >
void DDS::DataReader::take_next_instance_w_condition_untyped ( DDS::LoanableSequence< T >^  received_data,
DDS::SampleInfoSeq info_seq,
System::Int32  max_samples,
DDS::InstanceHandle_t previous_handle,
DDS::ReadCondition condition 
)

Take data samples, if any are available.

This method allows type-independent code to work with a variety of concrete DDS::TypedDataReader classes in a consistent way.

Statically type-safe code should use the appropriate DDS::TypedDataReader::take_next_instance_w_condition method instead of this one. See that method for detailed documentation.

See Also
DDS::DataReader::read_next_instance_w_condition_untyped
DDS::TypedDataReader::take_next_instance_w_condition
template<typename T >
void DDS::DataReader::return_loan_untyped ( DDS::LoanableSequence< T >^  received_data,
DDS::SampleInfoSeq info_seq 
)

Return loaned sample data and meta-data.

This method allows type-independent code to work with a variety of concrete DDS::TypedDataReader classes in a consistent way.

Statically type-safe code should use the appropriate DDS::TypedDataReader::return_loan method instead of this one. See that method for detailed documentation.

See Also
DDS::TypedDataReader::return_loan
void DDS::DataReader::get_key_value_untyped ( System::Object^  key_holder,
DDS::InstanceHandle_t handle 
)

Fill in the key fields of the given data sample.

This method allows type-independent code to work with a variety of concrete DDS::TypedDataReader classes in a consistent way.

Statically type-safe code should use the appropriate DDS::TypedDataReader::get_key_value method instead of this one. See that method for detailed documentation.

See Also
DDS::TypedDataReader::get_key_value
DDS::InstanceHandle_t DDS::DataReader::lookup_instance_untyped ( System::Object^  key_holder)
virtual void DDS::DataReader::enable ( )
overridevirtual

Enables the DDS::Entity.

This operation enables the Entity. Entity objects can be created either enabled or disabled. This is controlled by the value of the ENTITY_FACTORY QoS policy on the corresponding factory for the DDS::Entity.

By default, ENTITY_FACTORY is set so that it is not necessary to explicitly call DDS::Entity::enable on newly created entities.

The DDS::Entity::enable operation is idempotent. Calling enable on an already enabled Entity returns OK and has no effect.

If a DDS::Entity has not yet been enabled, the following kinds of operations may be invoked on it:

Other operations may explicitly state that they may be called on disabled entities; those that do not will return the error DDS::Retcode_NotEnabled.

It is legal to delete an DDS::Entity that has not been enabled by calling the proper operation on its factory.

Entities created from a factory Entity that is disabled are created disabled, regardless of the setting of the DDS::EntityFactoryQosPolicy.

Calling enable on an Entity whose factory Entity is not enabled will fail and return DDS::Retcode_PreconditionNotMet.

If DDS::EntityFactoryQosPolicy::autoenable_created_entities is TRUE, the enable operation on a factory will automatically enable all entities created from that factory (for example, enabling a DDS::Publisher will enable all its contained DDS::DataWriter objects)

Listeners associated with an entity are not called until the entity is enabled.

Conditions associated with a disabled entity are "inactive," that is, they have a trigger_value == FALSE.

Exceptions
Oneof the Standard Return Codes, Standard Return Codes or DDS::Retcode_PreconditionNotMet.

Implements DDS::Entity.

virtual StatusCondition ^ DDS::DataReader::get_statuscondition ( )
overridevirtual

Allows access to the DDS::StatusCondition associated with the DDS::Entity.

The returned condition can then be added to a DDS::WaitSet so that the application can wait for specific status changes that affect the DDS::Entity.

Returns
the status condition associated with this entity.

Implements DDS::Entity.

virtual StatusMask DDS::DataReader::get_status_changes ( )
overridevirtual

Retrieves the list of communication statuses in the DDS::Entity that are triggered.

That is, the list of statuses whose value has changed since the last time the application read the status using the get_*_status() method.

When the entity is first created or if the entity is not enabled, all communication statuses are in the "untriggered" state so the list returned by the get_status_changes operation will be empty.

The list of statuses returned by the get_status_changes operation refers to the status that are triggered on the Entity itself and does not include statuses that apply to contained entities.

Returns
list of communication statuses in the DDS::Entity that are triggered.
See Also
Status Kinds

Implements DDS::Entity.

virtual InstanceHandle_t DDS::DataReader::get_instance_handle ( )
overridevirtual

Allows access to the DDS::InstanceHandle_t associated with the DDS::Entity.

This operation returns the DDS::InstanceHandle_t that represents the DDS::Entity.

Returns
the instance handle associated with this entity.

Implements DDS::Entity.


RTI Connext .Net APIs Version 5.2.0 Copyright © Sun Jun 21 2015 Real-Time Innovations, Inc