RTI Connext Java API Version 7.1.0

<<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 com.rti.dds.subscription.Subscriber. More...

Inheritance diagram for DataReader:
DomainEntity Entity DynamicDataReader BytesDataReader KeyedBytesDataReader KeyedStringDataReader StringDataReader FooDataReader

Public Member Functions

ReadCondition create_readcondition (int sample_states, int view_states, int instance_states)
 Creates a com.rti.dds.subscription.ReadCondition. More...
 
ReadCondition create_readcondition_w_params (ReadConditionParams params)
 <<extension>> Creates a com.rti.dds.subscription.ReadCondition with parameters. More...
 
QueryCondition create_querycondition (int sample_states, int view_states, int instance_states, String query_expression, StringSeq query_parameters)
 Creates a com.rti.dds.subscription.QueryCondition. More...
 
QueryCondition create_querycondition_w_params (QueryConditionParams params)
 <<extension>> Creates a com.rti.dds.subscription.QueryCondition with parameters. More...
 
void delete_readcondition (ReadCondition condition)
 Deletes a com.rti.dds.subscription.ReadCondition or com.rti.dds.subscription.QueryCondition attached to the com.rti.dds.subscription.DataReader. More...
 
void set_qos (DataReaderQos qos)
 Sets the reader QoS. More...
 
void set_qos_with_profile (String library_name, String profile_name)
 <<extension>> Changes the QoS of this reader using the input XML QoS profile. More...
 
void get_qos (DataReaderQos qos)
 Gets the reader QoS. More...
 
void set_listener (DataReaderListener l, int mask)
 Sets the reader listener. More...
 
DataReaderListener get_listener ()
 Gets the reader listener. More...
 
void call_listenerT (int mask)
 Calls the reader listener. More...
 
void get_sample_rejected_status (SampleRejectedStatus status)
 Accesses the com.rti.dds.infrastructure.StatusKind.StatusKind.SAMPLE_REJECTED_STATUS communication status. More...
 
void get_liveliness_changed_status (LivelinessChangedStatus status)
 Accesses the com.rti.dds.infrastructure.StatusKind.StatusKind.LIVELINESS_CHANGED_STATUS communication status. More...
 
void get_requested_deadline_missed_status (RequestedDeadlineMissedStatus status)
 Accesses the com.rti.dds.infrastructure.StatusKind.StatusKind.REQUESTED_DEADLINE_MISSED_STATUS communication status. More...
 
void get_requested_incompatible_qos_status (RequestedIncompatibleQosStatus status)
 Accesses the com.rti.dds.infrastructure.StatusKind.StatusKind.REQUESTED_INCOMPATIBLE_QOS_STATUS communication status. More...
 
void get_sample_lost_status (SampleLostStatus status)
 Accesses the com.rti.dds.infrastructure.StatusKind.StatusKind.SAMPLE_LOST_STATUS_STATUS communication status. More...
 
void get_subscription_matched_status (SubscriptionMatchedStatus status)
 Accesses the com.rti.dds.infrastructure.StatusKind.StatusKind.SUBSCRIPTION_MATCHED_STATUS communication status. More...
 
void get_datareader_cache_status (DataReaderCacheStatus status)
 <<extension>> Gets the datareader cache status for this reader. More...
 
void get_datareader_protocol_status (DataReaderProtocolStatus status)
 <<extension>> Gets the datareader protocol status for this reader. More...
 
void get_matched_publication_datareader_protocol_status (DataReaderProtocolStatus status, InstanceHandle_t publication_handle)
 <<extension>> Gets the datareader protocol status for this reader, per matched publication identified by the publication_handle. More...
 
void get_matched_publications (InstanceHandleSeq publication_handles)
 Retrieves the list of publications currently "associated" with this com.rti.dds.subscription.DataReader. More...
 
void get_matched_publication_data (PublicationBuiltinTopicData publication_data, InstanceHandle_t publication_handle)
 Retrieves the information on a publication that is currently "associated" with the com.rti.dds.subscription.DataReader. More...
 
boolean is_matched_publication_alive (InstanceHandle_t publication_handle)
 Check if a publication currently matched with a DataReader is alive. More...
 
void get_matched_publication_participant_data (ParticipantBuiltinTopicData participant_data, InstanceHandle_t publication_handle)
 <<extension>> Retrieves the information on the discovered com.rti.dds.domain.DomainParticipant associated with the publication that is currently matching with the com.rti.dds.subscription.DataReader. More...
 
TopicDescription get_topicdescription ()
 Returns the com.rti.dds.topic.TopicDescription associated with the com.rti.dds.subscription.DataReader. More...
 
Subscriber get_subscriber ()
 Returns the com.rti.dds.subscription.Subscriber to which the com.rti.dds.subscription.DataReader belongs. More...
 
void delete_contained_entities ()
 Deletes all the entities that were created by means of the "create" operations on the com.rti.dds.subscription.DataReader. More...
 
void wait_for_historical_data (Duration_t max_wait)
 Waits until all "historical" data is received for com.rti.dds.subscription.DataReader entities that have a non-VOLATILE Durability Qos kind. More...
 
void acknowledge_sample (SampleInfo sample_info)
 <<extension>> Acknowledges a single sample explicitly. More...
 
void acknowledge_all ()
 <<extension>> Acknowledges all previously accessed samples. More...
 
void acknowledge_sample (SampleInfo sample_info, AckResponseData_t response_data)
 <<extension>> Acknowledges a single sample explicitly. More...
 
void acknowledge_all (AckResponseData_t response_data)
 <<extension>> Acknowledges all previously accessed samples. More...
 
TopicQuery create_topic_query (TopicQuerySelection selection)
 Creates a com.rti.dds.subscription.TopicQuery. More...
 
void delete_topic_query (TopicQuery query)
 Deletes a com.rti.dds.subscription.TopicQuery. More...
 
TopicQuery lookup_topic_query (GUID_t guid)
 Retrieves an existing com.rti.dds.subscription.TopicQuery. More...
 
void read_untyped (List<?> received_data, SampleInfoSeq info_seq, int max_samples, int sample_states, int view_states, int instance_states)
 Reads data samples, if any are available. More...
 
void take_untyped (List<?> received_data, SampleInfoSeq info_seq, int max_samples, int sample_states, int view_states, int instance_states)
 Takes data samples, if any are available. More...
 
void read_w_condition_untyped (List<?> received_data, SampleInfoSeq info_seq, int max_samples, ReadCondition read_condition)
 Reads data samples, if any are available. More...
 
void take_w_condition_untyped (List<?> received_data, SampleInfoSeq info_seq, int max_samples, ReadCondition read_condition)
 Takes data samples, if any are available. More...
 
void read_next_sample_untyped (Object received_data, SampleInfo sample_info)
 Reads data samples, if any are available. More...
 
void take_next_sample_untyped (Object received_data, SampleInfo sample_info)
 Takes data samples, if any are available. More...
 
void read_instance_untyped (List<?> received_data, SampleInfoSeq info_seq, int max_samples, InstanceHandle_t a_handle, int sample_states, int view_states, int instance_states)
 Reads data samples, if any are available. More...
 
void take_instance_untyped (List<?> received_data, SampleInfoSeq info_seq, int max_samples, InstanceHandle_t a_handle, int sample_states, int view_states, int instance_states)
 Takes data samples, if any are available. More...
 
void read_instance_untyped (List<?> received_data, SampleInfoSeq info_seq, int max_samples, InstanceHandle_t a_handle, GUID_t topic_query_guid, int sample_states, int view_states, int instance_states)
 Reads data samples, if any are available. More...
 
void take_instance_untyped (List<?> received_data, SampleInfoSeq info_seq, int max_samples, InstanceHandle_t a_handle, GUID_t topic_query_guid, int sample_states, int view_states, int instance_states)
 Takes data samples, if any are available. More...
 
void read_instance_w_condition_untyped (List<?> received_data, SampleInfoSeq info_seq, int max_samples, InstanceHandle_t a_handle, ReadCondition read_condition)
 Reads data samples, if any are available. More...
 
void take_instance_w_condition_untyped (List<?> received_data, SampleInfoSeq info_seq, int max_samples, InstanceHandle_t a_handle, ReadCondition read_condition)
 Takes data samples, if any are available. More...
 
void read_next_instance_untyped (List<?> received_data, SampleInfoSeq info_seq, int max_samples, InstanceHandle_t a_handle, int sample_states, int view_states, int instance_states)
 Reads data samples, if any are available. More...
 
void take_next_instance_untyped (List<?> received_data, SampleInfoSeq info_seq, int max_samples, InstanceHandle_t a_handle, int sample_states, int view_states, int instance_states)
 Takes data samples, if any are available. More...
 
void read_next_instance_w_condition_untyped (List<?> received_data, SampleInfoSeq info_seq, int max_samples, InstanceHandle_t a_handle, ReadCondition read_condition)
 Reads data samples, if any are available. More...
 
void take_next_instance_w_condition_untyped (List<?> received_data, SampleInfoSeq info_seq, int max_samples, InstanceHandle_t a_handle, ReadCondition read_condition)
 Takes data samples, if any are available. More...
 
void return_loan_untyped (List<?> received_data, SampleInfoSeq info_seq)
 Returns loaned sample data and meta-data. More...
 
void get_key_value_untyped (Object key_holder, InstanceHandle_t handle)
 Fills in the key fields of the given data sample. More...
 
InstanceHandle_t lookup_instance_untyped (Object key_value)
 
void take_discovery_snapshot ()
 Take a snapshot of the compatible and incompatible remote writers matched by a local reader. More...
 
void take_discovery_snapshot (String file_name)
 Take a snapshot of the compatible and incompatible remote writers matched by a local reader. More...
 
- Public Member Functions inherited from Entity
void enable ()
 Enables the com.rti.dds.infrastructure.Entity. More...
 
StatusCondition get_statuscondition ()
 Allows access to the com.rti.dds.infrastructure.StatusCondition associated with the com.rti.dds.infrastructure.Entity. More...
 
int get_status_changes ()
 Retrieves the list of communication statuses in the com.rti.dds.infrastructure.Entity that are triggered. More...
 
InstanceHandle_t get_instance_handle ()
 Allows access to the com.rti.dds.infrastructure.InstanceHandle_t associated with the com.rti.dds.infrastructure.Entity. More...
 

Static Public Attributes

static final TopicQuerySelection TOPIC_QUERY_SELECTION_USE_READER_CONTENT_FILTER
 Special value for creating a com.rti.dds.subscription.TopicQuery that applies the same filter as the DataReader's com.rti.dds.topic.ContentFilteredTopic. More...
 
static final TopicQuerySelection TOPIC_QUERY_SELECTION_SELECT_ALL
 Special value for creating a com.rti.dds.subscription.TopicQuery that selects all the samples in a com.rti.dds.publication.DataWriter cache. More...
 

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 com.rti.dds.subscription.Subscriber.

QoS:
com.rti.dds.subscription.DataReaderQos
Status:
com.rti.dds.infrastructure.StatusKind.StatusKind.DATA_AVAILABLE_STATUS;
com.rti.dds.infrastructure.StatusKind.StatusKind.LIVELINESS_CHANGED_STATUS, com.rti.dds.subscription.LivelinessChangedStatus;
com.rti.dds.infrastructure.StatusKind.StatusKind.REQUESTED_DEADLINE_MISSED_STATUS, com.rti.dds.subscription.RequestedDeadlineMissedStatus;
com.rti.dds.infrastructure.StatusKind.StatusKind.REQUESTED_INCOMPATIBLE_QOS_STATUS, com.rti.dds.subscription.RequestedIncompatibleQosStatus;
com.rti.dds.infrastructure.StatusKind.StatusKind.SAMPLE_LOST_STATUS_STATUS, com.rti.dds.subscription.SampleLostStatus;
com.rti.dds.infrastructure.StatusKind.StatusKind.SAMPLE_REJECTED_STATUS, com.rti.dds.subscription.SampleRejectedStatus;
com.rti.dds.infrastructure.StatusKind.StatusKind.SUBSCRIPTION_MATCHED_STATUS, com.rti.dds.subscription.SubscriptionMatchedStatus;
Listener:
com.rti.dds.subscription.DataReaderListener

A com.rti.dds.subscription.DataReader refers to exactly one com.rti.dds.topic.TopicDescription (either a com.rti.dds.topic.Topic, a com.rti.dds.topic.ContentFilteredTopic or a com.rti.dds.topic.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.

com.rti.dds.subscription.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 com.rti.ndds.example.Foo are specified in the generic type com.rti.ndds.example.FooDataReader.

The following operations may be called even if the com.rti.dds.subscription.DataReader is not enabled. Other operations will fail with the value com.rti.dds.infrastructure.RETCODE_NOT_ENABLED if called on a disabled com.rti.dds.subscription.DataReader:

All sample-accessing operations, namely: com.rti.ndds.example.FooDataReader.read, com.rti.ndds.example.FooDataReader.take, com.rti.ndds.example.FooDataReader.read_w_condition, and com.rti.ndds.example.FooDataReader.take_w_condition may fail with the error com.rti.dds.infrastructure.RETCODE_PRECONDITION_NOT_MET as described in com.rti.dds.subscription.Subscriber.begin_access.

See also
Operations Allowed in Listener Callbacks
Access to data samples

Member Function Documentation

◆ create_readcondition()

ReadCondition create_readcondition ( int  sample_states,
int  view_states,
int  instance_states 
)

Creates a com.rti.dds.subscription.ReadCondition.

The returned com.rti.dds.subscription.ReadCondition will be attached and belong to the com.rti.dds.subscription.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 com.rti.dds.subscription.ReadCondition created. Returns NULL in case of failure.

◆ create_readcondition_w_params()

ReadCondition create_readcondition_w_params ( ReadConditionParams  params)

<<extension>> Creates a com.rti.dds.subscription.ReadCondition with parameters.

The returned com.rti.dds.subscription.ReadCondition will be attached and belong to the com.rti.dds.subscription.DataReader.

Parameters
params<<in>> creation parameters.
Returns
return com.rti.dds.subscription.ReadCondition created. Returns NULL in case of failure.

◆ create_querycondition()

QueryCondition create_querycondition ( int  sample_states,
int  view_states,
int  instance_states,
String  query_expression,
StringSeq  query_parameters 
)

Creates a com.rti.dds.subscription.QueryCondition.

The returned com.rti.dds.subscription.QueryCondition will be attached and belong to the com.rti.dds.subscription.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 com.rti.dds.subscription.QueryCondition created. Returns NULL in case of failure.

◆ create_querycondition_w_params()

QueryCondition create_querycondition_w_params ( QueryConditionParams  params)

<<extension>> Creates a com.rti.dds.subscription.QueryCondition with parameters.

The returned com.rti.dds.subscription.QueryCondition will be attached and belong to the com.rti.dds.subscription.DataReader.

Parameters
params<<in>> creation parameters.
Returns
return com.rti.dds.subscription.QueryCondition created. Returns NULL in case of failure.

◆ delete_readcondition()

void delete_readcondition ( ReadCondition  condition)

Deletes a com.rti.dds.subscription.ReadCondition or com.rti.dds.subscription.QueryCondition attached to the com.rti.dds.subscription.DataReader.

Since com.rti.dds.subscription.QueryCondition specializes com.rti.dds.subscription.ReadCondition, it can also be used to delete a com.rti.dds.subscription.QueryCondition.

Precondition
The com.rti.dds.subscription.ReadCondition must be attached to the com.rti.dds.subscription.DataReader, or the operation will fail with the error com.rti.dds.infrastructure.RETCODE_PRECONDITION_NOT_MET.
MT Safety:
UNSAFE. It is not safe to delete an entity while another thread may be simultaneously calling an API that uses the entity.
Parameters
condition<<in>> Condition to be deleted.
Exceptions
Oneof the Standard Return Codes, or com.rti.dds.infrastructure.RETCODE_PRECONDITION_NOT_MET

◆ set_qos()

◆ set_qos_with_profile()

void set_qos_with_profile ( String  library_name,
String  profile_name 
)

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

This operation modifies the QoS of the com.rti.dds.subscription.DataReader.

The com.rti.dds.subscription.DataReaderQos.user_data, com.rti.dds.subscription.DataReaderQos.deadline, com.rti.dds.subscription.DataReaderQos.latency_budget, com.rti.dds.subscription.DataReaderQos.time_based_filter, com.rti.dds.subscription.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 com.rti.dds.subscription.Subscriber.set_default_library).
profile_name<<in>> XML QoS Profile name. If profile_name is null RTI Connext will use the default profile (see com.rti.dds.subscription.Subscriber.set_default_profile).
Exceptions
Oneof the Standard Return Codes, com.rti.dds.infrastructure.RETCODE_IMMUTABLE_POLICY, or com.rti.dds.infrastructure.RETCODE_INCONSISTENT_POLICY.
See also
com.rti.dds.subscription.DataReaderQos for rules on consistency among QoS
com.rti.dds.subscription.DataReader.set_qos
Operations Allowed in Listener Callbacks

◆ get_qos()

void 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 com.rti.dds.subscription.DataReaderQos to be filled up. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes
See also
get_qos (abstract)

◆ set_listener()

void set_listener ( DataReaderListener  l,
int  mask 
)

Sets the reader listener.

Parameters
l<<in>> com.rti.dds.subscription.DataReaderListener to set to
mask<<in>> com.rti.dds.infrastructure.StatusMask associated with the com.rti.dds.subscription.DataReaderListener.
Exceptions
Oneof the Standard Return Codes
See also
set_listener (abstract)

◆ get_listener()

◆ call_listenerT()

void call_listenerT ( int  mask)

Calls the reader listener.

See also
get_listener (abstract)

◆ get_sample_rejected_status()

void get_sample_rejected_status ( SampleRejectedStatus  status)

Accesses the com.rti.dds.infrastructure.StatusKind.StatusKind.SAMPLE_REJECTED_STATUS communication status.

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

Parameters
status<<inout>> com.rti.dds.subscription.SampleRejectedStatus to be filled in. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes

◆ get_liveliness_changed_status()

void get_liveliness_changed_status ( LivelinessChangedStatus  status)

Accesses the com.rti.dds.infrastructure.StatusKind.StatusKind.LIVELINESS_CHANGED_STATUS communication status.

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

Parameters
status<<inout>> com.rti.dds.subscription.LivelinessChangedStatus to be filled in. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes

◆ get_requested_deadline_missed_status()

void get_requested_deadline_missed_status ( RequestedDeadlineMissedStatus  status)

Accesses the com.rti.dds.infrastructure.StatusKind.StatusKind.REQUESTED_DEADLINE_MISSED_STATUS communication status.

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

Parameters
status<<inout>> com.rti.dds.subscription.RequestedDeadlineMissedStatus to be filled in. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes

◆ get_requested_incompatible_qos_status()

void get_requested_incompatible_qos_status ( RequestedIncompatibleQosStatus  status)

Accesses the com.rti.dds.infrastructure.StatusKind.StatusKind.REQUESTED_INCOMPATIBLE_QOS_STATUS communication status.

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

Parameters
status<<inout>> com.rti.dds.subscription.RequestedIncompatibleQosStatus to be filled in. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes

◆ get_sample_lost_status()

void get_sample_lost_status ( SampleLostStatus  status)

Accesses the com.rti.dds.infrastructure.StatusKind.StatusKind.SAMPLE_LOST_STATUS_STATUS communication status.

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

Parameters
status<<inout>> com.rti.dds.subscription.SampleLostStatus to be filled in. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes

◆ get_subscription_matched_status()

void get_subscription_matched_status ( SubscriptionMatchedStatus  status)

Accesses the com.rti.dds.infrastructure.StatusKind.StatusKind.SUBSCRIPTION_MATCHED_STATUS communication status.

Parameters
status<<inout>> com.rti.dds.subscription.SubscriptionMatchedStatus to be filled in. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes

◆ get_datareader_cache_status()

void get_datareader_cache_status ( DataReaderCacheStatus  status)

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

Parameters
status<<inout>> com.rti.dds.subscription.DataReaderCacheStatus to be filled in. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_NOT_ENABLED.

◆ get_datareader_protocol_status()

void get_datareader_protocol_status ( DataReaderProtocolStatus  status)

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

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

Parameters
status<<inout>> com.rti.dds.subscription.DataReaderProtocolStatus to be filled in. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_NOT_ENABLED.

◆ get_matched_publication_datareader_protocol_status()

void get_matched_publication_datareader_protocol_status ( DataReaderProtocolStatus  status,
InstanceHandle_t  publication_handle 
)

<<extension>> Gets 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 com.rti.dds.publication.DataWriter. Cannot be NULL. . Must correspond to a publication currently associated with the com.rti.dds.subscription.DataReader.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_NOT_ENABLED

◆ get_matched_publications()

void get_matched_publications ( InstanceHandleSeq  publication_handles)

Retrieves the list of publications currently "associated" with this com.rti.dds.subscription.DataReader.

A publication is considered to be matching if all of the following criteria are true:

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 com.rti.dds.publication.DataWriter entities. These handles match the ones that appear in the instance_handle field of the com.rti.dds.subscription.SampleInfo when reading the com.rti.dds.publication.builtin.PublicationBuiltinTopicDataTypeSupport.PUBLICATION_TOPIC_NAME builtin topic.

This API may return the publication handles of publications that are not alive. com.rti.dds.subscription.DataReader.is_matched_publication_alive can be used to check the liveliness of the remote publication.

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 of the matches and the system cannot resize the sequence, this method will fail with com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES. The maximum number of matches possible is configured with com.rti.dds.infrastructure.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 com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES if the sequence is too small and the system cannot resize it, or com.rti.dds.infrastructure.RETCODE_NOT_ENABLED

◆ get_matched_publication_data()

void get_matched_publication_data ( PublicationBuiltinTopicData  publication_data,
InstanceHandle_t  publication_handle 
)

Retrieves the information on a publication that is currently "associated" with the com.rti.dds.subscription.DataReader.

The publication_handle must correspond to a publication currently associated with the com.rti.dds.subscription.DataReader. Otherwise, the operation will fail with com.rti.dds.infrastructure.RETCODE_BAD_PARAMETER. Use the operation com.rti.dds.subscription.DataReader.get_matched_publications to find the publications that are currently matched with the com.rti.dds.subscription.DataReader.

Note: This operation does not retrieve the builtin.PublicationBuiltinTopicData.type_code. This information is available through com.rti.dds.subscription.DataReaderListener::on_data_available() (if a reader listener is installed on the builtin.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 com.rti.dds.publication.DataWriter. Must correspond to a publication currently associated with the com.rti.dds.subscription.DataReader. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_NOT_ENABLED

◆ is_matched_publication_alive()

boolean is_matched_publication_alive ( InstanceHandle_t  publication_handle)

Check if a publication currently matched with a DataReader is alive.

This API is used for querying the endpoint liveliness of a matched publication. A matched publication will be marked as not alive if the liveliness that it committed to through its LIVELINESS QoS policy was not respected. Note that if the participant associated with the matched publication loses liveliness, the com.rti.dds.infrastructure.InstanceHandle_t will become invalid and this function will fail with com.rti.dds.infrastructure.RETCODE_BAD_PARAMETER.

Parameters
publication_handle<<in>> The com.rti.dds.infrastructure.InstanceHandle_t of the matched publication. See com.rti.dds.subscription.DataReader.get_matched_publications for a description of what is considered a matched publication.
Returns
A boolean indicating whether or not the matched publication is active.

◆ get_matched_publication_participant_data()

void get_matched_publication_participant_data ( ParticipantBuiltinTopicData  participant_data,
InstanceHandle_t  publication_handle 
)

<<extension>> Retrieves the information on the discovered com.rti.dds.domain.DomainParticipant associated with the publication that is currently matching with the com.rti.dds.subscription.DataReader.

The publication_handle must correspond to a publication currently associated with the com.rti.dds.subscription.DataReader. Otherwise, the operation will fail with com.rti.dds.infrastructure.RETCODE_BAD_PARAMETER. The operation may also fail with com.rti.dds.infrastructure.RETCODE_PRECONDITION_NOT_MET if the publication corresponds to the same com.rti.dds.domain.DomainParticipant that the DataReader belongs to. Use the operation com.rti.dds.subscription.DataReader.get_matched_publications to find the publications that are currently matched with the com.rti.dds.subscription.DataReader.

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 com.rti.dds.publication.DataWriter. Must correspond to a publication currently associated with the com.rti.dds.subscription.DataReader. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_NOT_ENABLED

◆ get_topicdescription()

◆ get_subscriber()

◆ delete_contained_entities()

void delete_contained_entities ( )

Deletes all the entities that were created by means of the "create" operations on the com.rti.dds.subscription.DataReader.

Deletes all contained com.rti.dds.subscription.ReadCondition, com.rti.dds.subscription.QueryCondition, and com.rti.dds.subscription.TopicQuery objects.

The operation will fail with com.rti.dds.infrastructure.RETCODE_PRECONDITION_NOT_MET if the any of the contained entities is in a state where it cannot be deleted.

Once com.rti.dds.subscription.DataReader.delete_contained_entities completes successfully, the application may delete the com.rti.dds.subscription.DataReader.

MT Safety:
UNSAFE. It is not safe to delete an entity while another thread may be simultaneously calling an API that uses the entity.
Exceptions
Oneof the Standard Return Codes, or com.rti.dds.infrastructure.RETCODE_PRECONDITION_NOT_MET

◆ wait_for_historical_data()

void wait_for_historical_data ( Duration_t  max_wait)

Waits until all "historical" data is received for com.rti.dds.subscription.DataReader entities that have a non-VOLATILE Durability Qos kind.

This operation is intended only for com.rti.dds.subscription.DataReader entities that have a non-VOLATILE Durability QoS kind.

As soon as an application enables a non-VOLATILE com.rti.dds.subscription.DataReader, it will start receiving both "historical" data (i.e., the data that was written prior to the time the com.rti.dds.subscription.DataReader joined the domain) as well as any new data written by the com.rti.dds.publication.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 com.rti.dds.subscription.DataReader.wait_for_historical_data operations.

com.rti.dds.subscription.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 com.rti.dds.publication.DataWriter has been discovered before calling this operation. (One way to do this is by using com.rti.dds.subscription.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, com.rti.dds.infrastructure.RETCODE_TIMEOUT or com.rti.dds.infrastructure.RETCODE_NOT_ENABLED.

◆ acknowledge_sample() [1/2]

void acknowledge_sample ( SampleInfo  sample_info)

<<extension>> Acknowledges a single sample explicitly.

Applicable only when com.rti.dds.infrastructure.ReliabilityQosPolicy.acknowledgment_kind = com.rti.dds.infrastructure.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 com.rti.dds.infrastructure.RtpsReliableReaderProtocol_t.samples_per_app_ack and com.rti.dds.infrastructure.RtpsReliableReaderProtocol_t.app_ack_period.

Parameters
sample_info<<in>> com.rti.dds.subscription.SampleInfo identifying the sample being acknowledged.
Exceptions
Oneof the Standard Return Codes

◆ acknowledge_all() [1/2]

void acknowledge_all ( )

<<extension>> Acknowledges all previously accessed samples.

Applicable only when com.rti.dds.infrastructure.ReliabilityQosPolicy.acknowledgment_kind = com.rti.dds.infrastructure.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 com.rti.dds.infrastructure.RtpsReliableReaderProtocol_t.samples_per_app_ack and com.rti.dds.infrastructure.RtpsReliableReaderProtocol_t.app_ack_period.

Exceptions
Oneof the Standard Return Codes

◆ acknowledge_sample() [2/2]

void acknowledge_sample ( SampleInfo  sample_info,
AckResponseData_t  response_data 
)

<<extension>> Acknowledges a single sample explicitly.

Applicable only when com.rti.dds.infrastructure.ReliabilityQosPolicy.acknowledgment_kind = com.rti.dds.infrastructure.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 com.rti.dds.infrastructure.RtpsReliableReaderProtocol_t.samples_per_app_ack and com.rti.dds.infrastructure.RtpsReliableReaderProtocol_t.app_ack_period.

The maximum length of the response is configured using com.rti.dds.infrastructure.DataReaderResourceLimitsQosPolicy.max_app_ack_response_length

Parameters
sample_info<<in>> com.rti.dds.subscription.SampleInfo identifying the sample being acknowledged.
response_data<<in>> Response data sent to com.rti.dds.publication.DataWriter upon acknowledgment (via com.rti.dds.publication.DataWriterListener.on_application_acknowledgment)
Exceptions
Oneof the Standard Return Codes

◆ acknowledge_all() [2/2]

void acknowledge_all ( AckResponseData_t  response_data)

<<extension>> Acknowledges all previously accessed samples.

Applicable only when com.rti.dds.infrastructure.ReliabilityQosPolicy.acknowledgment_kind = com.rti.dds.infrastructure.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 com.rti.dds.infrastructure.RtpsReliableReaderProtocol_t.samples_per_app_ack and com.rti.dds.infrastructure.RtpsReliableReaderProtocol_t.app_ack_period.

The maximum length of the response is configured using com.rti.dds.infrastructure.DataReaderResourceLimitsQosPolicy.max_app_ack_response_length.

Parameters
response_data<<in>> Response data sent to com.rti.dds.publication.DataWriter upon acknowledgment
Exceptions
Oneof the Standard Return Codes

◆ create_topic_query()

TopicQuery create_topic_query ( TopicQuerySelection  selection)

Creates a com.rti.dds.subscription.TopicQuery.

The returned com.rti.dds.subscription.TopicQuery will have been issued if the com.rti.dds.subscription.DataReader is enabled. Otherwise, the com.rti.dds.subscription.TopicQuery will be issued once the com.rti.dds.subscription.DataReader is enabled

Parameters
selection<<in>> The selection with which to create the com.rti.dds.subscription.TopicQuery. The special values com.rti.dds.subscription.DataReader.TOPIC_QUERY_SELECTION_SELECT_ALL and com.rti.dds.subscription.DataReader.TOPIC_QUERY_SELECTION_USE_READER_CONTENT_FILTER can be used. The expression can start with the special condition "@instance_state = ALIVE AND" followed by the rest of the expression. This restricts the selection to samples of alive instances. Cannot be NULL.
Returns
return Created com.rti.dds.subscription.TopicQuery. Returns NULL in case of failure.

◆ delete_topic_query()

void delete_topic_query ( TopicQuery  query)

Deletes a com.rti.dds.subscription.TopicQuery.

Cancels an active com.rti.dds.subscription.TopicQuery. After deleting a TopicQuery, new DataWriters won't discover it and existing DataWriters currently publishing cached samples may stop before delivering all of them.

Parameters
query<<in>> The com.rti.dds.subscription.TopicQuery to delete. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes

◆ lookup_topic_query()

TopicQuery lookup_topic_query ( GUID_t  guid)

Retrieves an existing com.rti.dds.subscription.TopicQuery.

Retrieves the com.rti.dds.subscription.TopicQuery that corresponds to the input com.rti.dds.infrastructure.GUID_t.

If no TopicQuery is found for the specified GUID or the TopicQuery is marked for deletion, this returns NULL.

To get the com.rti.dds.infrastructure.GUID_t associated with a com.rti.dds.subscription.TopicQuery, use the method com.rti.dds.subscription.TopicQuery.get_guid.

Parameters
guid<<in>> The com.rti.dds.subscription.TopicQuery GUID. Cannot be NULL.

◆ read_untyped()

void read_untyped ( List<?>  received_data,
SampleInfoSeq  info_seq,
int  max_samples,
int  sample_states,
int  view_states,
int  instance_states 
)

Reads data samples, if any are available.

This method allows type-independent code to work with a variety of concrete com.rti.ndds.example.FooDataReader classes in a consistent way.

Statically type-safe code should use the appropriate com.rti.ndds.example.FooDataReader.read method instead of this one. See that method for detailed documentation.

See also
com.rti.dds.subscription.DataReader.take_untyped
com.rti.ndds.example.FooDataReader.read

Referenced by BytesDataReader.read(), DynamicDataReader.read(), FooDataReader.read(), KeyedBytesDataReader.read(), KeyedStringDataReader.read(), and StringDataReader.read().

◆ take_untyped()

void take_untyped ( List<?>  received_data,
SampleInfoSeq  info_seq,
int  max_samples,
int  sample_states,
int  view_states,
int  instance_states 
)

Takes data samples, if any are available.

This method allows type-independent code to work with a variety of concrete com.rti.ndds.example.FooDataReader classes in a consistent way.

Statically type-safe code should use the appropriate com.rti.ndds.example.FooDataReader.take method instead of this one. See that method for detailed documentation.

See also
com.rti.dds.subscription.DataReader.read_untyped
com.rti.ndds.example.FooDataReader.take

Referenced by BytesDataReader.take(), DynamicDataReader.take(), FooDataReader.take(), KeyedBytesDataReader.take(), KeyedStringDataReader.take(), and StringDataReader.take().

◆ read_w_condition_untyped()

void read_w_condition_untyped ( List<?>  received_data,
SampleInfoSeq  info_seq,
int  max_samples,
ReadCondition  read_condition 
)

Reads data samples, if any are available.

This method allows type-independent code to work with a variety of concrete com.rti.ndds.example.FooDataReader classes in a consistent way.

Statically type-safe code should use the appropriate com.rti.ndds.example.FooDataReader.read_w_condition method instead of this one. See that method for detailed documentation.

See also
com.rti.dds.subscription.DataReader.take_w_condition_untyped
com.rti.ndds.example.FooDataReader.read_w_condition

Referenced by BytesDataReader.read_w_condition(), DynamicDataReader.read_w_condition(), FooDataReader.read_w_condition(), KeyedBytesDataReader.read_w_condition(), KeyedStringDataReader.read_w_condition(), and StringDataReader.read_w_condition().

◆ take_w_condition_untyped()

void take_w_condition_untyped ( List<?>  received_data,
SampleInfoSeq  info_seq,
int  max_samples,
ReadCondition  read_condition 
)

Takes data samples, if any are available.

This method allows type-independent code to work with a variety of concrete com.rti.ndds.example.FooDataReader classes in a consistent way.

Statically type-safe code should use the appropriate com.rti.ndds.example.FooDataReader.take_w_condition method instead of this one. See that method for detailed documentation.

See also
com.rti.dds.subscription.DataReader.read_w_condition_untyped
com.rti.ndds.example.FooDataReader.take_w_condition

Referenced by BytesDataReader.take_w_condition(), DynamicDataReader.take_w_condition(), FooDataReader.take_w_condition(), KeyedBytesDataReader.take_w_condition(), KeyedStringDataReader.take_w_condition(), and StringDataReader.take_w_condition().

◆ read_next_sample_untyped()

void read_next_sample_untyped ( Object  received_data,
SampleInfo  sample_info 
)

Reads data samples, if any are available.

This method allows type-independent code to work with a variety of concrete com.rti.ndds.example.FooDataReader classes in a consistent way.

Statically type-safe code should use the appropriate com.rti.ndds.example.FooDataReader.read_next_sample method instead of this one. See that method for detailed documentation.

See also
com.rti.dds.subscription.DataReader.take_next_sample_untyped
com.rti.ndds.example.FooDataReader.read_next_sample

Referenced by BytesDataReader.read_next_sample(), DynamicDataReader.read_next_sample(), FooDataReader.read_next_sample(), KeyedBytesDataReader.read_next_sample(), KeyedStringDataReader.read_next_sample(), and StringDataReader.read_next_sample().

◆ take_next_sample_untyped()

void take_next_sample_untyped ( Object  received_data,
SampleInfo  sample_info 
)

Takes data samples, if any are available.

This method allows type-independent code to work with a variety of concrete com.rti.ndds.example.FooDataReader classes in a consistent way.

Statically type-safe code should use the appropriate com.rti.ndds.example.FooDataReader.take_next_sample method instead of this one. See that method for detailed documentation.

See also
com.rti.dds.subscription.DataReader.read_next_sample_untyped
com.rti.ndds.example.FooDataReader.take_next_sample

Referenced by BytesDataReader.take_next_sample(), DynamicDataReader.take_next_sample(), FooDataReader.take_next_sample(), KeyedBytesDataReader.take_next_sample(), KeyedStringDataReader.take_next_sample(), and StringDataReader.take_next_sample().

◆ read_instance_untyped() [1/2]

void read_instance_untyped ( List<?>  received_data,
SampleInfoSeq  info_seq,
int  max_samples,
InstanceHandle_t  a_handle,
int  sample_states,
int  view_states,
int  instance_states 
)

Reads data samples, if any are available.

This method allows type-independent code to work with a variety of concrete com.rti.ndds.example.FooDataReader classes in a consistent way.

Statically type-safe code should use the appropriate com.rti.ndds.example.FooDataReader.read_instance method instead of this one. See that method for detailed documentation.

See also
com.rti.dds.subscription.DataReader.take_instance_untyped
com.rti.ndds.example.FooDataReader.read_instance

Referenced by DynamicDataReader.read_instance(), FooDataReader.read_instance(), KeyedBytesDataReader.read_instance(), and KeyedStringDataReader.read_instance().

◆ take_instance_untyped() [1/2]

void take_instance_untyped ( List<?>  received_data,
SampleInfoSeq  info_seq,
int  max_samples,
InstanceHandle_t  a_handle,
int  sample_states,
int  view_states,
int  instance_states 
)

Takes data samples, if any are available.

This method allows type-independent code to work with a variety of concrete com.rti.ndds.example.FooDataReader classes in a consistent way.

Statically type-safe code should use the appropriate com.rti.ndds.example.FooDataReader.take_instance method instead of this one. See that method for detailed documentation.

See also
com.rti.dds.subscription.DataReader.read_instance_untyped
com.rti.ndds.example.FooDataReader.take_instance

Referenced by DynamicDataReader.take_instance(), FooDataReader.take_instance(), KeyedBytesDataReader.take_instance(), and KeyedStringDataReader.take_instance().

◆ read_instance_untyped() [2/2]

void read_instance_untyped ( List<?>  received_data,
SampleInfoSeq  info_seq,
int  max_samples,
InstanceHandle_t  a_handle,
GUID_t  topic_query_guid,
int  sample_states,
int  view_states,
int  instance_states 
)

Reads data samples, if any are available.

This method allows type-independent code to work with a variety of concrete com.rti.ndds.example.FooDataReader classes in a consistent way.

Statically type-safe code should use the appropriate com.rti.ndds.example.FooDataReader.read_instance method instead of this one. See that method for detailed documentation.

See also
com.rti.dds.subscription.DataReader.take_instance_untyped
com.rti.ndds.example.FooDataReader.read_instance

◆ take_instance_untyped() [2/2]

void take_instance_untyped ( List<?>  received_data,
SampleInfoSeq  info_seq,
int  max_samples,
InstanceHandle_t  a_handle,
GUID_t  topic_query_guid,
int  sample_states,
int  view_states,
int  instance_states 
)

Takes data samples, if any are available.

This method allows type-independent code to work with a variety of concrete com.rti.ndds.example.FooDataReader classes in a consistent way.

Statically type-safe code should use the appropriate com.rti.ndds.example.FooDataReader.take_instance method instead of this one. See that method for detailed documentation.

See also
com.rti.dds.subscription.DataReader.read_instance_untyped
com.rti.ndds.example.FooDataReader.take_instance

◆ read_instance_w_condition_untyped()

void read_instance_w_condition_untyped ( List<?>  received_data,
SampleInfoSeq  info_seq,
int  max_samples,
InstanceHandle_t  a_handle,
ReadCondition  read_condition 
)

Reads data samples, if any are available.

This method allows type-independent code to work with a variety of concrete com.rti.ndds.example.FooDataReader classes in a consistent way.

Statically type-safe code should use the appropriate com.rti.ndds.example.FooDataReader.read_next_instance_w_condition method instead of this one. See that method for detailed documentation.

See also
com.rti.dds.subscription.DataReader.take_next_instance_w_condition_untyped
com.rti.ndds.example.FooDataReader.read_next_instance_w_condition

Referenced by DynamicDataReader.read_instance_w_condition(), FooDataReader.read_instance_w_condition(), KeyedBytesDataReader.read_instance_w_condition(), and KeyedStringDataReader.read_instance_w_condition().

◆ take_instance_w_condition_untyped()

void take_instance_w_condition_untyped ( List<?>  received_data,
SampleInfoSeq  info_seq,
int  max_samples,
InstanceHandle_t  a_handle,
ReadCondition  read_condition 
)

Takes data samples, if any are available.

This method allows type-independent code to work with a variety of concrete com.rti.ndds.example.FooDataReader classes in a consistent way.

Statically type-safe code should use the appropriate com.rti.ndds.example.FooDataReader.take_next_instance_w_condition method instead of this one. See that method for detailed documentation.

See also
com.rti.dds.subscription.DataReader.read_next_instance_w_condition_untyped
com.rti.ndds.example.FooDataReader.take_next_instance_w_condition

Referenced by DynamicDataReader.take_instance_w_condition(), FooDataReader.take_instance_w_condition(), KeyedBytesDataReader.take_instance_w_condition(), and KeyedStringDataReader.take_instance_w_condition().

◆ read_next_instance_untyped()

void read_next_instance_untyped ( List<?>  received_data,
SampleInfoSeq  info_seq,
int  max_samples,
InstanceHandle_t  a_handle,
int  sample_states,
int  view_states,
int  instance_states 
)

Reads data samples, if any are available.

This method allows type-independent code to work with a variety of concrete com.rti.ndds.example.FooDataReader classes in a consistent way.

Statically type-safe code should use the appropriate com.rti.ndds.example.FooDataReader.read_next_instance method instead of this one. See that method for detailed documentation.

See also
com.rti.dds.subscription.DataReader.take_next_instance_untyped
com.rti.ndds.example.FooDataReader.read_next_instance

Referenced by DynamicDataReader.read_next_instance(), FooDataReader.read_next_instance(), KeyedBytesDataReader.read_next_instance(), and KeyedStringDataReader.read_next_instance().

◆ take_next_instance_untyped()

void take_next_instance_untyped ( List<?>  received_data,
SampleInfoSeq  info_seq,
int  max_samples,
InstanceHandle_t  a_handle,
int  sample_states,
int  view_states,
int  instance_states 
)

Takes data samples, if any are available.

This method allows type-independent code to work with a variety of concrete com.rti.ndds.example.FooDataReader classes in a consistent way.

Statically type-safe code should use the appropriate com.rti.ndds.example.FooDataReader.take_next_instance method instead of this one. See that method for detailed documentation.

See also
com.rti.dds.subscription.DataReader.read_next_instance_untyped
com.rti.ndds.example.FooDataReader.take_next_instance

Referenced by DynamicDataReader.take_next_instance(), FooDataReader.take_next_instance(), KeyedBytesDataReader.take_next_instance(), and KeyedStringDataReader.take_next_instance().

◆ read_next_instance_w_condition_untyped()

void read_next_instance_w_condition_untyped ( List<?>  received_data,
SampleInfoSeq  info_seq,
int  max_samples,
InstanceHandle_t  a_handle,
ReadCondition  read_condition 
)

Reads data samples, if any are available.

This method allows type-independent code to work with a variety of concrete com.rti.ndds.example.FooDataReader classes in a consistent way.

Statically type-safe code should use the appropriate com.rti.ndds.example.FooDataReader.read_next_instance_w_condition method instead of this one. See that method for detailed documentation.

See also
com.rti.dds.subscription.DataReader.take_next_instance_w_condition_untyped
com.rti.ndds.example.FooDataReader.read_next_instance_w_condition

Referenced by DynamicDataReader.read_next_instance_w_condition(), FooDataReader.read_next_instance_w_condition(), KeyedBytesDataReader.read_next_instance_w_condition(), and KeyedStringDataReader.read_next_instance_w_condition().

◆ take_next_instance_w_condition_untyped()

void take_next_instance_w_condition_untyped ( List<?>  received_data,
SampleInfoSeq  info_seq,
int  max_samples,
InstanceHandle_t  a_handle,
ReadCondition  read_condition 
)

Takes data samples, if any are available.

This method allows type-independent code to work with a variety of concrete com.rti.ndds.example.FooDataReader classes in a consistent way.

Statically type-safe code should use the appropriate com.rti.ndds.example.FooDataReader.take_next_instance_w_condition method instead of this one. See that method for detailed documentation.

See also
com.rti.dds.subscription.DataReader.read_next_instance_w_condition_untyped
com.rti.ndds.example.FooDataReader.take_next_instance_w_condition

Referenced by DynamicDataReader.take_next_instance_w_condition(), FooDataReader.take_next_instance_w_condition(), KeyedBytesDataReader.take_next_instance_w_condition(), and KeyedStringDataReader.take_next_instance_w_condition().

◆ return_loan_untyped()

void return_loan_untyped ( List<?>  received_data,
SampleInfoSeq  info_seq 
)

Returns loaned sample data and meta-data.

This method allows type-independent code to work with a variety of concrete com.rti.ndds.example.FooDataReader classes in a consistent way.

Statically type-safe code should use the appropriate com.rti.ndds.example.FooDataReader.return_loan method instead of this one. See that method for detailed documentation.

See also
com.rti.ndds.example.FooDataReader.return_loan

Referenced by BytesDataReader.return_loan(), DynamicDataReader.return_loan(), FooDataReader.return_loan(), KeyedBytesDataReader.return_loan(), and KeyedStringDataReader.return_loan().

◆ get_key_value_untyped()

void get_key_value_untyped ( Object  key_holder,
InstanceHandle_t  handle 
)

Fills in the key fields of the given data sample.

This method allows type-independent code to work with a variety of concrete com.rti.ndds.example.FooDataReader classes in a consistent way.

Statically type-safe code should use the appropriate com.rti.ndds.example.FooDataReader.get_key_value method instead of this one. See that method for detailed documentation.

See also
com.rti.ndds.example.FooDataReader.get_key_value

Referenced by DynamicDataReader.get_key_value(), FooDataReader.get_key_value(), KeyedBytesDataReader.get_key_value(), and KeyedStringDataReader.get_key_value().

◆ lookup_instance_untyped()

◆ take_discovery_snapshot() [1/2]

void take_discovery_snapshot ( )

Take a snapshot of the compatible and incompatible remote writers matched by a local reader.

The snapshot will be printed through the com.rti.ndds.config.Logger. A possible output may be the following:

Remote writers that match the local reader domain=0 name="readerTestName"
guid="0x0101542A,0x2C59B595,0xA1693BDF:0x80000004"
topic="FooTopic" type="FooType"
----------------------------------------------------------------------------
Compatible writers:
1. 0x0101D8D1,0x20B83C0D,0x4495246E:0x80000003 name="writer1TestName"
kind="unkeyed user datareader"
unicastLocators="udpv4://192.168.1.170:7411"
liveliness="ALIVE"
Incompatible writers:
1. 0x0101D8D1,0x20B83C0D,0x4495246E:0x80000103 name="writer2TestName"
kind="unkeyed user datareader"
unicastLocators="udpv4://192.168.1.170:7411"
reason="Inconsistent QoS"
----------------------------------------------------------------------------
Exceptions
Oneof the Standard Return Codes.

◆ take_discovery_snapshot() [2/2]

void take_discovery_snapshot ( String  file_name)

Take a snapshot of the compatible and incompatible remote writers matched by a local reader.

The snapshot will be printed in the file specified by file_name. A possible output may be the following:

Remote writers that match the local reader domain=0 name="readerTestName"
guid="0x0101542A,0x2C59B595,0xA1693BDF:0x80000004"
topic="FooTopic" type="FooType"
----------------------------------------------------------------------------
Compatible writers:
1. 0x0101D8D1,0x20B83C0D,0x4495246E:0x80000003 name="writer1TestName"
kind="unkeyed user datareader"
unicastLocators="udpv4://192.168.1.170:7411"
liveliness="ALIVE"
Incompatible writers:
1. 0x0101D8D1,0x20B83C0D,0x4495246E:0x80000103 name="writer2TestName"
kind="unkeyed user datareader"
unicastLocators="udpv4://192.168.1.170:7411"
reason="Inconsistent QoS"
----------------------------------------------------------------------------
Parameters
file_name<<in>> Name of the file where snapshot should be printed.
Exceptions
Oneof the Standard Return Codes.