RTI Connext DDS Micro C API
Version 2.4.14
|
<<interface>> <<cert>> DDS_Listener for reader status. More...
#include <dds_c_subscription.h>
<<interface>> <<cert>> DDS_Listener for reader status.
struct DDS_Listener DDS_DataReaderListener::as_listener |
<<cert>> The superclass instance of this DDS_DataReaderListener.
DDS_DataReaderListener_RequestedDeadlineMissedCallback DDS_DataReaderListener::on_requested_deadline_missed |
<<cert>> Handles the DDS_REQUESTED_DEADLINE_MISSED_STATUS communication status.
DDS_DataReaderListener_RequestedIncompatibleQosCallback DDS_DataReaderListener::on_requested_incompatible_qos |
<<cert>> Handles the DDS_REQUESTED_INCOMPATIBLE_QOS_STATUS communication status.
DDS_DataReaderListener_SampleRejectedCallback DDS_DataReaderListener::on_sample_rejected |
<<cert>> Handles the DDS_SAMPLE_REJECTED_STATUS communication status.
DDS_DataReaderListener_LivelinessChangedCallback DDS_DataReaderListener::on_liveliness_changed |
<<cert>> Handles the DDS_LIVELINESS_CHANGED_STATUS communication status.
DDS_DataReaderListener_DataAvailableCallback DDS_DataReaderListener::on_data_available |
<<cert>> Handle the DDS_DATA_AVAILABLE_STATUS communication status.
DDS_DataReaderListener_SubscriptionMatchedCallback DDS_DataReaderListener::on_subscription_matched |
<<cert>> Handles the DDS_SUBSCRIPTION_MATCHED_STATUS communication status.
DDS_DataReaderListener_SampleLostCallback DDS_DataReaderListener::on_sample_lost |
<<cert>> Handles the DDS_SAMPLE_LOST_STATUS communication status.
DDS_DataReaderListener_BeforeSampleDeserializeCallback DDS_DataReaderListener::on_before_sample_deserialize |
<<cert>> Callback to filter a received sample based on serialized data
When a DataReader receives a (serialized) sample, it will deserialize it before storing it in its queue. On_before_sample_deserialize() is called before deserialization. It allows the application to determine whether or not to drop the sample, before it is read or taken.
The callback controls whether the sample is filter out of the DataReader's queue, with the sample_dropped parameter. If user code within the callback determines that the sample should be dropped, the user should set sample_dropped to true; consequently, when the callback returns, the DataReader will drop the sample before it is committed to the queue. Otherwise, returning the callback with sample_dropped as false will allow the sample to be read or taken.
Compared to on_before_sample_commit(), the sample would be dropped with less processing (without deserialization) by the subscribing application, but with the added complexity of filtering on serialized data.
The callback is not associated with a DDS Status. It is enabled when the callback in the listener is assigned, to a non-NULL callback.
DDS_DataReaderListener_BeforeSampleCommitCallback DDS_DataReaderListener::on_before_sample_commit |
<<cert>> Callback to filter a received sample based on deserialized data
When a DataReader receives a (serialized) sample, it will deserialize it before storing it in its queue. On_before_sample_commit() is called after deserialization, but before the sample is stored into the DataReader's queue. It allows the application to determine whether or not to drop the sample, before it is read or taken.
The callback controls whether the sample is filter out of the DataReader's queue, with the sample_dropped parameter. If user code within the callback determines that the sample should be dropped, the user should set sample_dropped to true; consequently, when the callback returns, the DataReader will drop the sample before it is committed to the queue. Otherwise, returning the callback with sample_dropped as false will allow the sample to be read or taken.
Compared to on_before_sample_deserialize(), the sample would be dropped with more processing (with deserialization) by the subscribing application, but with the lesser complexity of filtering on deserialized data.
The callback is not associated with a DDS Status. It is enabled when the callback in the listener is assigned, to a non-NULL callback.
The following fields are valid in the DDS_SampleInfo structure:
DDS_DataReaderListener_InstanceReplacedCallback DDS_DataReaderListener::on_instance_replaced |
<<cert>> Handles the DDS_INSTANCE_REPLACED_STATUS communication status.
This listener may only be called when the instance replacement policy is set to DDS_REPLACE_OLDEST_INSTANCE_REPLACEMENT_QOS. When a new instance is detected and resources are exhausted the oldest instance will be removed even if samples with a not read state exists for the instance. Thus, this is a forceful removal of samples and the instance. The freed instance resources will be re-used for the newly detected instance. If there are outstanding loans for the replaced instance the samples can not be freed until returned. However, when the loan is returned the samples are automatically freed. Note that the instance will not be rejected.