RTI Connext Java API  Version 5.1.0
DynamicDataReader Class Reference

Reads (subscribes to) objects of type com.rti.dds.dynamicdata.DynamicData. More...

Inheritance diagram for DynamicDataReader:
DataReader DomainEntity Entity

Public Member Functions

void read (DynamicDataSeq received_data, SampleInfoSeq info_seq, int max_samples, int sample_states, int view_states, int instance_states)
 Access a collection of data samples from the com.rti.dds.subscription.DataReader.
 
- Public Member Functions inherited from DataReader
ReadCondition create_readcondition (int sample_states, int view_states, int instance_states)
 Creates a com.rti.dds.subscription.ReadCondition.
 
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.
 
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.
 
void set_qos (DataReaderQos qos)
 Sets the reader QoS.
 
void set_qos_with_profile (String library_name, 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, int mask)
 Sets the reader listener.
 
DataReaderListener get_listener ()
 Get the reader listener.
 
void call_listenerT (int mask)
 Calls the reader listener.
 
void get_sample_rejected_status (SampleRejectedStatus status)
 Accesses the com.rti.dds.infrastructure.StatusKind.StatusKind.SAMPLE_REJECTED_STATUS communication status.
 
void get_liveliness_changed_status (LivelinessChangedStatus status)
 Accesses the com.rti.dds.infrastructure.StatusKind.StatusKind.LIVELINESS_CHANGED_STATUS communication status.
 
void get_requested_deadline_missed_status (RequestedDeadlineMissedStatus status)
 Accesses the com.rti.dds.infrastructure.StatusKind.StatusKind.REQUESTED_DEADLINE_MISSED_STATUS communication status.
 
void get_requested_incompatible_qos_status (RequestedIncompatibleQosStatus status)
 Accesses the com.rti.dds.infrastructure.StatusKind.StatusKind.REQUESTED_INCOMPATIBLE_QOS_STATUS communication status.
 
void get_sample_lost_status (SampleLostStatus status)
 Accesses the com.rti.dds.infrastructure.StatusKind.StatusKind.SAMPLE_LOST_STATUS_STATUS communication status.
 
void get_subscription_matched_status (SubscriptionMatchedStatus status)
 Accesses the com.rti.dds.infrastructure.StatusKind.StatusKind.SUBSCRIPTION_MATCHED_STATUS communication status.
 
void get_datareader_cache_status (DataReaderCacheStatus status)
 <<eXtension>> Get the datareader cache status for this reader.
 
void get_datareader_protocol_status (DataReaderProtocolStatus status)
 <<eXtension>> Get the datareader protocol status for this reader.
 
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 get_matched_publications (InstanceHandleSeq publication_handles)
 Retrieve the list of publications currently "associated" with this com.rti.dds.subscription.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 com.rti.dds.subscription.DataReader.
 
void get_matched_publication_participant_data (ParticipantBuiltinTopicData participant_data, InstanceHandle_t publication_handle)
 This operation 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.
 
TopicDescription get_topicdescription ()
 Returns the com.rti.dds.topic.TopicDescription associated with the com.rti.dds.subscription.DataReader.
 
Subscriber get_subscriber ()
 Returns the com.rti.dds.subscription.Subscriber to which the com.rti.dds.subscription.DataReader belongs.
 
void delete_contained_entities ()
 Deletes all the entities that were created by means of the "create" operations on the com.rti.dds.subscription.DataReader.
 
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.
 
void acknowledge_sample (SampleInfo sample_info)
 Acknowledge a single sample explicitly.
 
void acknowledge_all ()
 Acknowledge all previously accessed samples.
 
void acknowledge_sample (SampleInfo sample_info, AckResponseData_t response_data)
 [Not supported.] Acknowledge a single sample explicitly
 
void acknowledge_all (AckResponseData_t response_data)
 [Not supported.] Acknowledge all previously accessed samples
 
void read_untyped (List received_data, SampleInfoSeq info_seq, int max_samples, int sample_states, int view_states, int instance_states)
 Read data samples, if any are available.
 
void take_untyped (List received_data, SampleInfoSeq info_seq, int max_samples, int sample_states, int view_states, int instance_states)
 Take data samples, if any are available.
 
void read_w_condition_untyped (List received_data, SampleInfoSeq info_seq, int max_samples, ReadCondition read_condition)
 Read data samples, if any are available.
 
void take_w_condition_untyped (List received_data, SampleInfoSeq info_seq, int max_samples, ReadCondition read_condition)
 Take data samples, if any are available.
 
void read_next_sample_untyped (Object received_data, SampleInfo sample_info)
 Read data samples, if any are available.
 
void take_next_sample_untyped (Object received_data, SampleInfo sample_info)
 Take data samples, if any are available.
 
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)
 Read data samples, if any are available.
 
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)
 Take data samples, if any are available.
 
void read_instance_w_condition_untyped (List received_data, SampleInfoSeq info_seq, int max_samples, InstanceHandle_t a_handle, ReadCondition read_condition)
 Read data samples, if any are available.
 
void take_instance_w_condition_untyped (List received_data, SampleInfoSeq info_seq, int max_samples, InstanceHandle_t a_handle, ReadCondition read_condition)
 Take data samples, if any are available.
 
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)
 Read data samples, if any are available.
 
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)
 Take data samples, if any are available.
 
void read_next_instance_w_condition_untyped (List received_data, SampleInfoSeq info_seq, int max_samples, InstanceHandle_t a_handle, ReadCondition read_condition)
 Read data samples, if any are available.
 
void take_next_instance_w_condition_untyped (List received_data, SampleInfoSeq info_seq, int max_samples, InstanceHandle_t a_handle, ReadCondition read_condition)
 Take data samples, if any are available.
 
void return_loan_untyped (List received_data, SampleInfoSeq info_seq)
 Return loaned sample data and meta-data.
 
void get_key_value_untyped (Object key_holder, InstanceHandle_t handle)
 Fill in the key fields of the given data sample.
 
InstanceHandle_t lookup_instance_untyped (Object key_value)
 

Detailed Description

Member Function Documentation

void read ( DynamicDataSeq  received_data,
SampleInfoSeq  info_seq,
int  max_samples,
int  sample_states,
int  view_states,
int  instance_states 
)

Access a collection of data samples from the com.rti.dds.subscription.DataReader.

This operation offers the same functionality and API as com.rti.ndds.example.FooDataReader.take except that the samples returned remain in the com.rti.dds.subscription.DataReader such that they can be retrieved again by means of a read or take operation.

Please refer to the documentation of com.rti.ndds.example.FooDataReader.take() for details on the number of samples returned within the received_data and info_seq as well as the order in which the samples appear in these sequences.

The act of reading a sample changes its sample_state to com.rti.dds.subscription.SampleStateKind.SampleStateKind.READ_SAMPLE_STATE. If the sample belongs to the most recent generation of the instance, it will also set the view_state of the instance to be com.rti.dds.subscription.ViewStateKind.ViewStateKind.NOT_NEW_VIEW_STATE. It will not affect the instance_state of the instance.

Important: If the samples "returned" by this method are loaned from RTI Connext (see com.rti.ndds.example.FooDataReader.take for more information on memory loaning), it is important that their contents not be changed. Because the memory in which the data is stored belongs to the middleware, any modifications made to the data will be seen the next time the same samples are read or taken; the samples will no longer reflect the state that was received from the network.

Parameters
received_data<<inout>> User data type-specific com.rti.dds.infrastructure.com.rti.dds.util.Sequence object where the received data samples will be returned. Must be a valid non-NULL FooSeq. The method will fail with com.rti.dds.infrastructure.RETCODE_BAD_PARAMETER if it is NULL.
info_seq<<inout>> A com.rti.dds.subscription.SampleInfoSeq object where the received sample info will be returned. Must be a valid non-NULL com.rti.dds.subscription.SampleInfoSeq. The method will fail with com.rti.dds.infrastructure.RETCODE_BAD_PARAMETER if it is NULL.
max_samples<<in>> The maximum number of samples to be returned. If the special value com.rti.dds.infrastructure.ResourceLimitsQosPolicy.LENGTH_UNLIMITED is provided, as many samples will be returned as are available, up to the limits described in the documentation for com.rti.ndds.example.FooDataReader.take().
sample_states<<in>> Data samples matching one of these sample_states are returned. See the valid values for this parameter here: com.rti.dds.subscription.SampleStateKind.
view_states<<in>> Data samples matching one of these view_state are returned. See the valid values for this parameter here: com.rti.dds.subscription.ViewStateKind.
instance_states<<in>> Data samples matching ones of these instance_state are returned. See the valid values for this parameter here: com.rti.dds.subscription.InstanceStateKind.
Exceptions
Oneof the Standard Return Codes, com.rti.dds.infrastructure.RETCODE_PRECONDITION_NOT_MET, com.rti.dds.infrastructure.RETCODE_NO_DATA or com.rti.dds.infrastructure.RETCODE_NOT_ENABLED.
See Also
com.rti.ndds.example.FooDataReader.read_w_condition, com.rti.ndds.example.FooDataReader.take, com.rti.ndds.example.FooDataReader.take_w_condition
com.rti.dds.infrastructure.ResourceLimitsQosPolicy.LENGTH_UNLIMITED

RTI Connext Java API Version 5.1.0 Copyright © Mon Feb 3 2014 Real-Time Innovations, Inc