RTI Connext Java API
Version 7.0.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...
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... | |
![]() | |
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... | |
<<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.
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.
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.
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 |
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.
params | <<in>> creation parameters. |
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
.
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. |
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.
params | <<in>> creation parameters. |
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.
condition | <<in>> Condition to be deleted. |
One | of the Standard Return Codes, or com.rti.dds.infrastructure.RETCODE_PRECONDITION_NOT_MET |
void set_qos | ( | DataReaderQos | qos | ) |
Sets the reader QoS.
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.
qos | <<in>> The com.rti.dds.subscription.DataReaderQos to be set to. Policies must be consistent. Immutable policies cannot be changed after com.rti.dds.subscription.DataReader is enabled. The special value com.rti.dds.subscription.Subscriber.DATAREADER_QOS_DEFAULT can be used to indicate that the QoS of the com.rti.dds.subscription.DataReader should be changed to match the current default com.rti.dds.subscription.DataReaderQos set in the com.rti.dds.subscription.Subscriber. Cannot be NULL. |
One | of the Standard Return Codes, com.rti.dds.infrastructure.RETCODE_IMMUTABLE_POLICY, or com.rti.dds.infrastructure.RETCODE_INCONSISTENT_POLICY. |
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.
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). |
One | of the Standard Return Codes, com.rti.dds.infrastructure.RETCODE_IMMUTABLE_POLICY, or com.rti.dds.infrastructure.RETCODE_INCONSISTENT_POLICY. |
void get_qos | ( | DataReaderQos | qos | ) |
Gets the reader QoS.
This method may potentially allocate memory depending on the sequences contained in some QoS policies.
qos | <<inout>> The com.rti.dds.subscription.DataReaderQos to be filled up. Cannot be NULL. |
One | of the Standard Return Codes |
void set_listener | ( | DataReaderListener | l, |
int | mask | ||
) |
Sets the reader listener.
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. |
One | of the Standard Return Codes |
DataReaderListener get_listener | ( | ) |
Gets 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.
This also resets the status so that it is no longer considered changed.
status | <<inout>> com.rti.dds.subscription.SampleRejectedStatus to be filled in. Cannot be NULL. |
One | of the Standard Return Codes |
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.
status | <<inout>> com.rti.dds.subscription.LivelinessChangedStatus to be filled in. Cannot be NULL. |
One | of the Standard Return Codes |
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.
status | <<inout>> com.rti.dds.subscription.RequestedDeadlineMissedStatus to be filled in. Cannot be NULL. |
One | of the Standard Return Codes |
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.
status | <<inout>> com.rti.dds.subscription.RequestedIncompatibleQosStatus to be filled in. Cannot be NULL. |
One | of the Standard Return Codes |
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.
status | <<inout>> com.rti.dds.subscription.SampleLostStatus to be filled in. Cannot be NULL. |
One | of the Standard Return Codes |
void get_subscription_matched_status | ( | SubscriptionMatchedStatus | status | ) |
Accesses the com.rti.dds.infrastructure.StatusKind.StatusKind.SUBSCRIPTION_MATCHED_STATUS communication status.
status | <<inout>> com.rti.dds.subscription.SubscriptionMatchedStatus to be filled in. Cannot be NULL. |
One | of the Standard Return Codes |
void get_datareader_cache_status | ( | DataReaderCacheStatus | status | ) |
<<extension>> Gets the datareader cache status for this reader.
status | <<inout>> com.rti.dds.subscription.DataReaderCacheStatus to be filled in. Cannot be NULL. |
One | of the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_NOT_ENABLED. |
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.
status | <<inout>> com.rti.dds.subscription.DataReaderProtocolStatus to be filled in. Cannot be NULL. |
One | of the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_NOT_ENABLED. |
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.
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. |
One | of the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_NOT_ENABLED |
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.
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. |
One | of 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 |
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).
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. |
One | of the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_NOT_ENABLED |
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.
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. |
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.
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. |
One | of the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_NOT_ENABLED |
TopicDescription get_topicdescription | ( | ) |
Returns the com.rti.dds.topic.TopicDescription associated with the com.rti.dds.subscription.DataReader.
Returns that same com.rti.dds.topic.TopicDescription that was used to create the com.rti.dds.subscription.DataReader.
Referenced by DynamicDataReader.read().
Subscriber get_subscriber | ( | ) |
Returns the com.rti.dds.subscription.Subscriber to which the com.rti.dds.subscription.DataReader belongs.
Referenced by DynamicDataReader.read().
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.
One | of the Standard Return Codes, or com.rti.dds.infrastructure.RETCODE_PRECONDITION_NOT_MET |
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.
max_wait | <<in>> Timeout value. Cannot be NULL. |
One | of the Standard Return Codes, com.rti.dds.infrastructure.RETCODE_TIMEOUT or com.rti.dds.infrastructure.RETCODE_NOT_ENABLED. |
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.
sample_info | <<in>> com.rti.dds.subscription.SampleInfo identifying the sample being acknowledged. |
One | of the Standard Return Codes |
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.
One | of the Standard Return Codes |
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
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) |
One | of the Standard Return Codes |
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.
response_data | <<in>> Response data sent to com.rti.dds.publication.DataWriter upon acknowledgment |
One | of the Standard Return Codes |
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
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. |
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.
query | <<in>> The com.rti.dds.subscription.TopicQuery to delete. Cannot be NULL. |
One | of the Standard Return Codes |
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.
guid | <<in>> The com.rti.dds.subscription.TopicQuery GUID. Cannot be NULL. |
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.
Referenced by FooDataReader.read(), BytesDataReader.read(), DynamicDataReader.read(), KeyedBytesDataReader.read(), KeyedStringDataReader.read(), and StringDataReader.read().
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.
Referenced by DynamicDataReader.read(), FooDataReader.take(), BytesDataReader.take(), KeyedBytesDataReader.take(), KeyedStringDataReader.take(), and StringDataReader.take().
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.
Referenced by DynamicDataReader.read(), FooDataReader.read_w_condition(), BytesDataReader.read_w_condition(), KeyedBytesDataReader.read_w_condition(), KeyedStringDataReader.read_w_condition(), and StringDataReader.read_w_condition().
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.
Referenced by DynamicDataReader.read(), FooDataReader.take_w_condition(), BytesDataReader.take_w_condition(), KeyedBytesDataReader.take_w_condition(), KeyedStringDataReader.take_w_condition(), and StringDataReader.take_w_condition().
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.
Referenced by DynamicDataReader.read(), BytesDataReader.read_next_sample(), FooDataReader.read_next_sample(), KeyedBytesDataReader.read_next_sample(), KeyedStringDataReader.read_next_sample(), and StringDataReader.read_next_sample().
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.
Referenced by DynamicDataReader.read(), BytesDataReader.take_next_sample(), FooDataReader.take_next_sample(), KeyedBytesDataReader.take_next_sample(), KeyedStringDataReader.take_next_sample(), and StringDataReader.take_next_sample().
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.
Referenced by DynamicDataReader.read(), FooDataReader.read_instance(), KeyedBytesDataReader.read_instance(), KeyedStringDataReader.read_instance(), BytesDataReader.take_next_sample(), and StringDataReader.take_next_sample().
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.
Referenced by DynamicDataReader.read(), FooDataReader.take_instance(), KeyedBytesDataReader.take_instance(), KeyedStringDataReader.take_instance(), BytesDataReader.take_next_sample(), and StringDataReader.take_next_sample().
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.
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.
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.
Referenced by DynamicDataReader.read(), KeyedBytesDataReader.read_instance_w_condition(), KeyedStringDataReader.read_instance_w_condition(), FooDataReader.read_instance_w_condition(), BytesDataReader.take_next_sample(), and StringDataReader.take_next_sample().
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.
Referenced by DynamicDataReader.read(), KeyedBytesDataReader.take_instance_w_condition(), KeyedStringDataReader.take_instance_w_condition(), FooDataReader.take_instance_w_condition(), BytesDataReader.take_next_sample(), and StringDataReader.take_next_sample().
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.
Referenced by DynamicDataReader.read(), FooDataReader.read_next_instance(), KeyedBytesDataReader.read_next_instance(), KeyedStringDataReader.read_next_instance(), BytesDataReader.take_next_sample(), and StringDataReader.take_next_sample().
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.
Referenced by DynamicDataReader.read(), FooDataReader.take_next_instance(), KeyedBytesDataReader.take_next_instance(), KeyedStringDataReader.take_next_instance(), BytesDataReader.take_next_sample(), and StringDataReader.take_next_sample().
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.
Referenced by DynamicDataReader.read(), KeyedBytesDataReader.read_next_instance_w_condition(), KeyedStringDataReader.read_next_instance_w_condition(), FooDataReader.read_next_instance_w_condition(), BytesDataReader.take_next_sample(), and StringDataReader.take_next_sample().
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.
Referenced by DynamicDataReader.read(), KeyedBytesDataReader.take_next_instance_w_condition(), KeyedStringDataReader.take_next_instance_w_condition(), FooDataReader.take_next_instance_w_condition(), BytesDataReader.take_next_sample(), and StringDataReader.take_next_sample().
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.
Referenced by DynamicDataReader.read(), BytesDataReader.return_loan(), KeyedBytesDataReader.return_loan(), KeyedStringDataReader.return_loan(), FooDataReader.return_loan(), and StringDataReader.take_next_sample().
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.
Referenced by KeyedBytesDataReader.get_key_value(), KeyedStringDataReader.get_key_value(), FooDataReader.get_key_value(), DynamicDataReader.read(), BytesDataReader.return_loan(), and StringDataReader.take_next_sample().
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.
The snapshot will be printed through the com.rti.ndds.config.Logger. A possible output may be the following:
One | of the Standard Return Codes. |
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:
file_name | <<in>> Name of the file where snapshot should be printed. |
One | of the Standard Return Codes. |