RTI Connext Traditional C++ API
Version 5.3.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 DDSSubscriber. 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 DDSSubscriber.
A DDSDataReader refers to exactly one DDSTopicDescription (either a DDSTopic, a DDSContentFilteredTopic or a DDSMultiTopic) 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
.
DDSDataReader is an abstract class. It must be specialised for each particular application data-type (see USER_DATA). The additional methods or functions that must be defined in the auto-generated class for a hypothetical application type Foo
are specified in the generic type FooDataReader.
The following operations may be called even if the DDSDataReader is not enabled. Other operations will fail with the value DDS_RETCODE_NOT_ENABLED if called on a disabled DDSDataReader:
All sample-accessing operations, namely: FooDataReader::read, FooDataReader::take, FooDataReader::read_w_condition, and FooDataReader::take_w_condition may fail with the error DDS_RETCODE_PRECONDITION_NOT_MET as described in DDSSubscriber::begin_access.
|
inlinevirtual |
Creates a DDSReadCondition.
The returned DDSReadCondition will be attached and belong to the DDSDataReader.
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 |
|
inlinevirtual |
<<extension>> Creates a DDSReadCondition with parameters.
The returned DDSReadCondition will be attached and belong to the DDSDataReader.
params | <<in>> creation parameters. |
|
inlinevirtual |
Creates a DDSQueryCondition.
The returned DDSQueryCondition will be attached and belong to the DDSDataReader.
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. |
|
inlinevirtual |
<<extension>> Creates a DDSQueryCondition with parameters.
The returned DDSQueryCondition will be attached and belong to the DDSDataReader.
params | <<in>> creation parameters. |
|
inlinevirtual |
Deletes a DDSReadCondition or DDSQueryCondition attached to the DDSDataReader.
Since DDSQueryCondition specializes DDSReadCondition, it can also be used to delete a DDSQueryCondition.
condition | <<in>> Condition to be deleted. |
|
inlinevirtual |
Deletes all the entities that were created by means of the "create" operations on the DDSDataReader.
Deletes all contained DDSReadCondition and DDSQueryCondition objects.
The operation will fail with DDS_RETCODE_PRECONDITION_NOT_MET if the any of the contained entities is in a state where it cannot be deleted.
Once DDSDataReader::delete_contained_entities completes successfully, the application may delete the DDSDataReader, knowing that it has no contained DDSReadCondition and DDSQueryCondition objects.
|
inlinevirtual |
Waits until all "historical" data is received for DDSDataReader entities that have a non-VOLATILE Durability Qos kind.
This operation is intended only for DDSDataReader entities that have a non-VOLATILE Durability QoS kind.
As soon as an application enables a non-VOLATILE DDSDataReader, it will start receiving both "historical" data (i.e., the data that was written prior to the time the DDSDataReader joined the domain) as well as any new data written by the DDSDataWriter 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 DDSDataReader::wait_for_historical_data operations.
DDSDataReader::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 DDSDataWriter has been discovered before calling this operation. (One way to do this is by using DDSDataReader::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. |
|
inlinevirtual |
Acknowledge a single sample explicitly.
Applicable only when DDS_ReliabilityQosPolicy::acknowledgment_kind = DDS_APPLICATION_EXPLICIT_ACKNOWLEDGMENT_MODE
A call to this method does not necessarily trigger the sending of an AppAck RTPS message from the DataReader to the DataWriter. How and when AppAck messages are sent can be configured using the QoS values DDS_RtpsReliableReaderProtocol_t::samples_per_app_ack and DDS_RtpsReliableReaderProtocol_t::app_ack_period.
sample_info | <<in>> DDS_SampleInfo identifying the sample being acknowledged. |
|
inlinevirtual |
Acknowledge all previously accessed samples.
Applicable only when DDS_ReliabilityQosPolicy::acknowledgment_kind = DDS_APPLICATION_EXPLICIT_ACKNOWLEDGMENT_MODE
A call to this method does not necessarily trigger the sending of an AppAck RTPS message from the DataReader to the DataWriter. How and when AppAck messages are sent can be configured using the QoS values DDS_RtpsReliableReaderProtocol_t::samples_per_app_ack and DDS_RtpsReliableReaderProtocol_t::app_ack_period.
|
inlinevirtual |
Acknowledge a single sample explicitly.
Applicable only when DDS_ReliabilityQosPolicy::acknowledgment_kind = DDS_APPLICATION_EXPLICIT_ACKNOWLEDGMENT_MODE
A call to this method does not necessarily trigger the sending of an AppAck RTPS message from the DataReader to the DataWriter. How and when AppAck messages are sent can be configured using the QoS values DDS_RtpsReliableReaderProtocol_t::samples_per_app_ack and DDS_RtpsReliableReaderProtocol_t::app_ack_period.
The maximum length of the response is configured using DDS_DataReaderResourceLimitsQosPolicy::max_app_ack_response_length
sample_info | <<in>> DDS_SampleInfo identifying the sample being acknowledged. |
response_data | <<in>> Response data sent to DDSDataWriter upon acknowledgment (via DDSDataWriterListener::on_application_acknowledgment) |
|
inlinevirtual |
Acknowledge all previously accessed samples.
Applicable only when DDS_ReliabilityQosPolicy::acknowledgment_kind = DDS_APPLICATION_EXPLICIT_ACKNOWLEDGMENT_MODE
A call to this method does not necessarily trigger the sending of an AppAck RTPS message from the DataReader to the DataWriter. How and when AppAck messages are sent can be configured using the QoS values DDS_RtpsReliableReaderProtocol_t::samples_per_app_ack and DDS_RtpsReliableReaderProtocol_t::app_ack_period.
The maximum length of the response is configured using DDS_DataReaderResourceLimitsQosPolicy::max_app_ack_response_length
response_data | <<in>> Response data sent to DDSDataWriter upon acknowledgment |
|
inlinevirtual |
Retrieve the list of publications currently "associated" with this DDSDataReader.
Matching publications are those in the same domain that have a matching DDSTopic, compatible QoS common partition that the DDSDomainParticipant has not indicated should be "ignored" by means of the DDSDomainParticipant::ignore_publication operation.
The handles returned in the publication_handles
list are the ones that are used by the RTI Connext implementation to locally identify the corresponding matched DDSDataWriter entities. These handles match the ones that appear in the instance_handle
field of the DDS_SampleInfo when reading the DDS_PUBLICATION_TOPIC_NAME builtin topic
publication_handles | <<inout>>. The sequence will be grown if the sequence has ownership and the system has the corresponding resources. Use a sequence without ownership to avoid dynamic memory allocation. If the sequence is too small to store all the matches and the system can not resize the sequence, this method will fail with DDS_RETCODE_OUT_OF_RESOURCES. The maximum number of matches possible is configured with DDS_DomainParticipantResourceLimitsQosPolicy. You can use a zero-maximum sequence without ownership to quickly check whether there are any matches without allocating any memory. |
|
inlinevirtual |
This operation retrieves the information on a publication that is currently "associated" with the DDSDataReader.
Matched publications are those with a matching DDSTopic, compatible QoS and common partition that the application has not indicated should be "ignored" by means of the DDSDomainParticipant::ignore_publication operation.
The publication_handle
must correspond to a publication currently associated with the DDSDataReader. Otherwise, the operation will fail with DDS_RETCODE_BAD_PARAMETER. Use the operation DDSDataReader::get_matched_publications to find the publications that are currently matched with the DDSDataReader.
Note: This operation does not retrieve the following information in DDS_PublicationBuiltinTopicData:
The above information is available through DDSDataReaderListener::on_data_available() (if a reader listener is installed on the DDSPublicationBuiltinTopicDataDataReader).
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 DDSDataWriter. . Must correspond to a publication currently associated with the DDSDataReader. |
|
inlinevirtual |
<<extension>> This operation retrieves the information on the discovered DDSDomainParticipant associated with the publication that is currently matching with the DDSDataReader.
Matched Participants are those with a matching DDSTopic, compatible QoS and common partition that the application has not indicated should be "ignored" by means of the DDSDomainParticipant::ignore_publication operation.
The publication_handle
must correspond to a publication currently associated with the DDSDataReader. Otherwise, the operation will fail with DDS_RETCODE_BAD_PARAMETER. The operation may also fail with DDS_RETCODE_PRECONDITION_NOT_MET if the publication corresponds to the same DDSDomainParticipant that the DataReader belongs to. Use the operation DDSDataReader::get_matched_publications to find the publications that are currently matched with the DDSDataReader.
Note: This operation does not retrieve the DDS_ParticipantBuiltinTopicData::property.
The above information is available through DDSDataReaderListener::on_data_available() (if a reader listener is installed on the DDSPublicationBuiltinTopicDataDataReader).
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 DDSDataWriter. . Must correspond to a publication currently associated with the DDSDataReader. |
|
inlinevirtual |
Returns the DDSTopicDescription associated with the DDSDataReader.
Returns that same DDSTopicDescription that was used to create the DDSDataReader.
|
inlinevirtual |
Returns the DDSSubscriber to which the DDSDataReader belongs.
|
inlinevirtual |
Accesses the DDS_SAMPLE_REJECTED_STATUS communication status.
This also resets the status so that it is no longer considered changed.
status | <<inout>> DDS_SampleRejectedStatus to be filled in. |
|
inlinevirtual |
Accesses the DDS_LIVELINESS_CHANGED_STATUS communication status.
This also resets the status so that it is no longer considered changed.
status | <<inout>> DDS_LivelinessChangedStatus to be filled in. |
|
inlinevirtual |
Accesses the DDS_REQUESTED_DEADLINE_MISSED_STATUS communication status.
This also resets the status so that it is no longer considered changed.
status | <<inout>> DDS_RequestedDeadlineMissedStatus to be filled in. |
|
inlinevirtual |
Accesses the DDS_REQUESTED_INCOMPATIBLE_QOS_STATUS communication status.
This also resets the status so that it is no longer considered changed.
status | <<inout>> DDS_RequestedIncompatibleQosStatus to be filled in. |
|
inlinevirtual |
Accesses the DDS_SAMPLE_LOST_STATUS communication status.
This also resets the status so that it is no longer considered changed.
status | <<inout>> DDS_SampleLostStatus to be filled in. |
|
inlinevirtual |
Accesses the DDS_SUBSCRIPTION_MATCHED_STATUS communication status.
status | <<inout>> DDS_SubscriptionMatchedStatus to be filled in. |
|
inlinevirtual |
<<extension>> Get the datareader cache status for this reader.
status | <<inout>> DDS_DataReaderCacheStatus to be filled in. |
|
inlinevirtual |
<<extension>> Get the datareader protocol status for this reader.
This also resets the status so that it is no longer considered changed.
status | <<inout>> DDS_DataReaderProtocolStatus to be filled in. |
|
inlinevirtual |
<<extension>> Get the datareader protocol status for this reader, per matched publication identified by the publication_handle.
This also resets the status so that it is no longer considered changed.
Note: Status for a remote entity is only kept while the entity is alive. Once a remote entity is no longer alive, its status is deleted.
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 DDSDataWriter. . Must correspond to a publication currently associated with the DDSDataReader. |
|
inlinevirtual |
Sets the reader QoS.
This operation modifies the QoS of the DDSDataReader.
The DDS_DataReaderQos::user_data, DDS_DataReaderQos::deadline, DDS_DataReaderQos::latency_budget, DDS_DataReaderQos::time_based_filter, DDS_DataReaderQos::reader_data_lifecycle can be changed. The other policies are immutable.
qos | <<in>> The DDS_DataReaderQos to be set to. Policies must be consistent. Immutable policies cannot be changed after DDSDataReader is enabled. The special value DDS_DATAREADER_QOS_DEFAULT can be used to indicate that the QoS of the DDSDataReader should be changed to match the current default DDS_DataReaderQos set in the DDSSubscriber. |
|
inlinevirtual |
Gets the reader QoS.
This method may potentially allocate memory depending on the sequences contained in some QoS policies.
qos | <<inout>> The DDS_DataReaderQos to be filled up. |
|
inlinevirtual |
<<extension>> Change the QoS of this reader using the input XML QoS profile.
This operation modifies the QoS of the DDSDataReader.
The DDS_DataReaderQos::user_data, DDS_DataReaderQos::deadline, DDS_DataReaderQos::latency_budget, DDS_DataReaderQos::time_based_filter, DDS_DataReaderQos::reader_data_lifecycle can be changed. The other policies are immutable.
library_name | <<in>> Library name containing the XML QoS profile. If library_name is null RTI Connext will use the default library (see DDSSubscriber::set_default_library). |
profile_name | <<in>> XML QoS Profile name. If profile_name is null RTI Connext will use the default profile (see DDSSubscriber::set_default_profile). |
|
inlinevirtual |
Sets the reader listener.
l | <<in>> DDSDataReaderListener to set to |
mask | <<in>> DDS_StatusMask associated with the DDSDataReaderListener. |
|
inlinevirtual |
Get the reader listener.
|
inlinevirtual |
Creates a DDSTopicQuery.
The returned DDSTopicQuery will haven been issued if the DDSDataReader is enabled. Otherwise, the DDSTopicQuery will be issued once the DDSDataReader is enabled
selection | <<in>> The selection with which to create the DDSTopicQuery. The special values DDS_TOPIC_QUERY_SELECTION_SELECT_ALL and DDS_TOPIC_QUERY_SELECTION_USE_READER_CONTENT_FILTER can be used. |
|
inlinevirtual |
Deletes a DDSTopicQuery.
Cancels an active DDSTopicQuery. 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 DDSTopicQuery to delete. |
|
inlinevirtual |
Retrieves an existing DDSTopicQuery.
Retrieves the DDSTopicQuery that corresponds to the input DDS_GUID_t.
The obtain the DDS_GUID_t associated with a DDSTopicQuery the user can use the method DDSTopicQuery::get_guid.
guid | <<in>> The DDSTopicQuery GUID. |
|
inlinevirtual |
Enables the DDSEntity.
This operation enables the Entity. Entity objects can be created either enabled or disabled. This is controlled by the value of the ENTITY_FACTORY QoS policy on the corresponding factory for the DDSEntity.
By default, ENTITY_FACTORY is set so that it is not necessary to explicitly call DDSEntity::enable on newly created entities.
The DDSEntity::enable operation is idempotent. Calling enable on an already enabled Entity returns OK and has no effect.
If a DDSEntity has not yet been enabled, the following kinds of operations may be invoked on it:
Other operations may explicitly state that they may be called on disabled entities; those that do not will return the error DDS_RETCODE_NOT_ENABLED.
It is legal to delete an DDSEntity that has not been enabled by calling the proper operation on its factory.
Entities created from a factory Entity that is disabled are created disabled, regardless of the setting of the DDS_EntityFactoryQosPolicy.
Calling enable on an Entity whose factory Entity is not enabled will fail and return DDS_RETCODE_PRECONDITION_NOT_MET.
If DDS_EntityFactoryQosPolicy::autoenable_created_entities is TRUE, the enable operation on a factory will automatically enable all entities created from that factory (for example, enabling a DDSPublisher will enable all its contained DDSDataWriter objects)
Listeners associated with an entity are not called until the entity is enabled.
Conditions associated with a disabled entity are "inactive," that is, they have a trigger_value
== FALSE.
Implements DDSEntity.
|
inlinevirtual |
Allows access to the DDSStatusCondition associated with the DDSEntity.
The returned condition can then be added to a DDSWaitSet so that the application can wait for specific status changes that affect the DDSEntity.
Implements DDSEntity.
|
inlinevirtual |
Retrieves the list of communication statuses in the DDSEntity that are triggered.
That is, the list of statuses whose value has changed since the last time the application read the status using the get_*_status() method.
When the entity is first created or if the entity is not enabled, all communication statuses are in the "untriggered" state so the list returned by the get_status_changes operation will be empty.
The list of statuses returned by the get_status_changes operation refers to the status that are triggered on the Entity itself and does not include statuses that apply to contained entities.
Implements DDSEntity.
|
inlinevirtual |
Allows access to the DDS_InstanceHandle_t associated with the DDSEntity.
This operation returns the DDS_InstanceHandle_t that represents the DDSEntity.
Implements DDSEntity.