Status¶
Each Entity is associated with a set of Status objects whose values represent the communication status of that Entity. Changes on the status values occur due to communication events related to each of the entities, e.g., when new data arrives, a new participant is discovered, or a remote endpoint is lost. The status is decomposed into several status objects, each concerning a different aspect of the communication, so that each of these status objects can vary independently of the others.
Changes on a status object trigger the corresponding Listener callbacks that allow the Entity to inform the application about the event.
For a given status object with name LivelinessChangedStatus, the entity listener interface defines a callback function on_liveliness_changed() that will be called when the status changes.
Beware that some statuses have data members that are reset every time the corresponding listener is called.
The only exception to this rule is when the entity has no listener attached, so the callback cannot be called.
The entities expose functions to access the value of its statuses.
For a given status with name LivelinessChangedStatus, the entity exposes a member function get_liveliness_changed_status() to access the data in its LivelinessChangedStatus.
Beware that some statuses have data members that are reset every time the getter function is called by the application.
InconsistentTopicStatus¶
This status changes every time an inconsistent remote Topic is discovered, that is, one with the same name but different characteristics than the current Topic.
List of status data members:
BaseStatus::total_countTotal cumulative count of inconsistent Topics discovered since the creation of the current Topic.
BaseStatus::total_count_changeThe change in
BaseStatus::total_countsince the last timeTopicListener::on_inconsistent_topicwas called or the status was read.
DataOnReaders¶
This status becomes active every time there is new data available for the application on any DataReader belonging to the current Subscriber.
There is no getter function to access this status, as it does not keep track of any information related to the data itself.
Its only purpose is to trigger the SubscriberListener::on_data_on_readers callback on the listener attached to the Subscriber.
DataAvailable¶
This status becomes active every time there is new data available for the application on the DataReader.
There is no getter function to access this status, as it does not keep track of any information related to the data itself.
Its only purpose is to trigger the DataReaderListener::on_data_available callback on the listener attached to the DataReader.
LivelinessChangedStatus¶
This status changes every time the liveliness status of a matched DataWriter has changed. Either because a DataWriter that was inactive has become active or the other way around.
List of status data members:
LivelinessChangedStatus::alive_countTotal number of currently active DataWriters. This count increases every time a newly matched DataWriter asserts its liveliness or a DataWriter that was considered not alive reasserts its liveliness. It decreases every time an active DataWriter becomes not alive, either because it failed to asserts its liveliness or because it was deleted for any reason.
LivelinessChangedStatus::not_alive_countTotal number of matched DataWriters that are currently considered not alive. This count increases every time an active DataWriter becomes not alive because it fails to assert its liveliness. It decreases every time a DataWriter that was considered not alive its liveliness. Normal matching and unmatching of DataWriters does not affect this count.
LivelinessChangedStatus::alive_count_changeThe change in
LivelinessChangedStatus::alive_countsince the last timeDataReaderListener::on_liveliness_changedwas called or the status was read. It can have positive or negative values.
LivelinessChangedStatus::not_alive_count_changeThe change in
LivelinessChangedStatus::not_alive_countsince the last timeDataReaderListener::on_liveliness_changedwas called or the status was read. It can have positive or negative values.
LivelinessChangedStatus::last_publication_handleHandle to the last DataWriter whose liveliness status was changed. If no liveliness has ever changed, it will have value
HANDLE_NIL.
RequestedDeadlineMissedStatus¶
This status changes every time the DataReader does not receive data within the deadline period configured on its DataReader.
List of status data members:
DeadlineMissedStatus::total_countTotal cumulative count of missed deadlines for any instance associated to the current DataReader. As the deadline period applies to each instance of the Topic independently, the count will will be incremented by one for each instance for which data was not received in the deadline period.
DeadlineMissedStatus::total_count_changeThe change in
DeadlineMissedStatus::total_countsince the last timeDataReaderListener::on_requested_deadline_missedwas called or the status was read. It can only have zero or positive values.
DeadlineMissedStatus::last_instance_handleHandle to the last instance that missed the deadline. If no deadline was ever missed, it will have value
HANDLE_NIL.
RequestedIncompatibleQosStatus¶
This status changes every time the DataReader finds a DataWriter that matches the Topic and has a common partition, but with a QoS configuration incompatible with the one defined on the DataReader.
List of status data members:
IncompatibleQosStatus::total_countTotal cumulative count of DataWriters found matching the Topic and with a common partition, but with a QoS configuration that is incompatible with the one defined on the DataReader.
IncompatibleQosStatus::total_count_changeThe change in
IncompatibleQosStatus::total_countsince the last timeDataReaderListener::on_requested_incompatible_qoswas called or the status was read. It can only have zero or positive values.
IncompatibleQosStatus::last_policy_idThe policy ID of one of the policies that was found to be incompatible with the current DataReader. If more than one policy happens to be incompatible, only one of them will be reported in this member.
IncompatibleQosStatus::policiesA collection that holds, for each policy, the total number of times that the policy was found to be incompatible with the one offered by a remote DataWriter that matched the Topic and with a common partition. See QosPolicyCount for more information the information that is stored for each policy.
QosPolicyCount¶
This structure holds a counter for each Policy. For more information about this class method, check API Reference:
SampleLostStatus¶
This status changes every time a new data sample is lost and will never be received.
There are two different criteria for considering a sample as lost depending on the DataReaderQos::reliability:
When using
BEST_EFFORT_RELIABILITY_QOS, a not yet received sample is considered lost whenever a sample with a greater sequence number is received.When using
RELIABLE_RELIABILITY_QOS, a not yet received sample is considered lost whenever the DataWriter informs, through an RTPSHEARTBEATsubmessage, that the sample is not available anymore.
List of status data members:
BaseStatus::total_countTotal cumulative count of lost samples under the Topic of the current DataReader.
BaseStatus::total_count_changeThe change in
BaseStatus::total_countsince the last timeDataReaderListener::on_sample_lostwas called or the status was read. It can only be positive or zero.
SampleRejectedStatus¶
This status changes every time an incoming data sample is rejected by the DataReader. The reason for the rejection is defined by SampleRejectedStatusKind.
List of status data members:
SampleRejectedStatus::total_countTotal cumulative count of rejected samples under the Topic of the current DataReader.
SampleRejectedStatus::total_count_changeThe change in
SampleRejectedStatus::total_countsince the last timeDataReaderListener::on_sample_rejectedwas called or the status was read. It can only be positive or zero.
SampleRejectedStatus::last_reasonThe reason for rejecting the last rejected sample. If no sample was ever rejected, it will have value
NOT_REJECTED. See SampleRejectedStatusKind for further details.
SampleRejectedStatus::last_instance_handleHandle to the last instance whose sample was rejected. If no sample was ever rejected, it will have value
HANDLE_NIL.
SampleRejectedStatusKind¶
In Safe DDS, samples can be rejected due to resource limit reasons.
SampleRejectedStatusKind specifies the reason of the rejection:
NOT_REJECTEDSpecifies that the samples were not rejected.
REJECTED_BY_SAMPLES_LIMITSpecifies that the samples were rejected because there were not enough resources to stored them. This can happen even when there are free resources if those resources must be guaranteed to be available for other samples. This situation occurs when there are yet to be received samples with lower sequence number and there is not enough resources for all of them (because
max_sampleshas been reached).
REJECTED_BY_INSTANCES_LIMITSpecifies that the samples were rejected because there were not enough resources to allocate the samples’ instances. This situation occurs when the sample corresponds to a new instance for which the middleware should reserve resources but the number of instances has already reached
max_instances.
REJECTED_BY_SAMPLES_PER_INSTANCE_LIMITSpecifies that the samples were rejected because there were not enough resources within their instance to stored them. This situation occurs when the DataReader is configured with
KEEP_ALL_HISTORY_QOSand the instance’s number of samples has reachedmax_samples_per_instance.
SubscriptionMatchedStatus¶
This status changes every time the DataReader finds a DataWriter that matches the Topic and has a common partition and a compatible QoS, or has ceased to be matched with a DataWriter that was previously considered to be matched.
List of status data members:
MatchedStatus::total_countTotal cumulative count of remote DataWriters that have been discovered publishing on the same Topic and has a common partition and a compatible QoS.
MatchedStatus::total_count_changeThe change in
MatchedStatus::total_countsince the last timeDataReaderListener::on_subscription_matchedwas called or the status was read. It can only have zero or positive values.
MatchedStatus::current_countThe number of remote DataWriters currently matched to the DataReader.
MatchedStatus::current_count_changeThe change in
MatchedStatus::current_countsince the last timeDataReaderListener::on_subscription_matchedwas called or the status was read. It can have positive or negative values.
SubscriptionMatchedStatus::last_publication_handleHandle to the last DataWriter that matched the DataReader. If no matching ever happened, it will have value
HANDLE_NIL.
LivelinessLostStatus¶
This status changes every time the DataWriter failed to assert its liveliness during the period configured on its DataWriterQoS. This means that matched DataReader entities will consider the DataWriter as no longer alive.
List of status data members:
BaseStatus::total_countTotal cumulative count of times that the DataWriter failed to assert its liveliness during the period configured on its DataWriterQoS, becoming considered not alive. This count does not change when the DataWriter is already considered not alive and simply remains not alive for another liveliness period.
BaseStatus::total_count_changeThe change in
BaseStatus::total_countsince the last timeDataWriterListener::on_liveliness_lostwas called or the status was read. It can only have zero or positive values.
OfferedDeadlineMissedStatus¶
This status changes every time the DataWriter fails to provide data within the deadline period configured on its DataWriterQoS.
List of status data members:
DeadlineMissedStatus::total_countTotal cumulative count of missed deadlines for any instance written by the current DataWriter. As the deadline period applies to each instance of the Topic independently, the count will will be incremented by one for each instance for which data was not sent in the deadline period.
DeadlineMissedStatus::total_count_changeThe change in
DeadlineMissedStatus::total_countsince the last timeDataWriterListener::on_offered_deadline_missedwas called or the status was read. It can only have zero or positive values.
DeadlineMissedStatus::last_instance_handleHandle to the last instance that missed the deadline. If no deadline was ever missed, it will have value
HANDLE_NIL.
OfferedIncompatibleQosStatus¶
This status changes every time the DataWriter finds a DataReader that matches the Topic and has a common partition, but with a QoS configuration that is incompatible with the one defined on the DataWriter.
List of status data members:
IncompatibleQosStatus::total_countTotal cumulative count of DataReaders found matching the Topic and with a common partition, but with a QoS configuration that is incompatible with the one defined on the DataWriter.
IncompatibleQosStatus::total_count_changeThe change in
IncompatibleQosStatus::total_countsince the last timeDataWriterListener::on_offered_incompatible_qoswas called or the status was read. It can only have zero or positive values.
IncompatibleQosStatus::last_policy_idThe policy ID of one of the policies that was found to be incompatible with the current DataWriter. If more than one policy happens to be incompatible, only one of them will be reported in this member.
IncompatibleQosStatus::policiesA collection that holds, for each policy, the total number of times that the policy was found to be incompatible with the one requested by a remote DataReader that matched the Topic and with a common partition. See QosPolicyCount for more information the information that is stored for each policy.
PublicationMatchedStatus¶
This status changes every time the DataWriter finds a DataReader that matches the Topic and has a common partition and a compatible QoS, or has ceased to be matched with a DataReader that was previously considered to be matched.
List of status data members:
MatchedStatus::total_countTotal cumulative count of remote DataReaders that have been discovered publishing on the same Topic and has a common partition and a compatible QoS. They may not all be matched at the moment.
MatchedStatus::total_count_changeThe change in
MatchedStatus::total_countsince the last timeDataWriterListener::on_publication_matchedwas called or the status was read. It can only have zero or positive values.
MatchedStatus::current_countThe number of remote DataReaders currently matched to the DataWriter.
MatchedStatus::current_count_changeThe change in
MatchedStatus::current_countsince the last timeDataWriterListener::on_publication_matchedwas called or the status was read. It can have positive or negative values.
PublicationMatchedStatus::last_subscription_handleHandle to the last DataReader that matched the DataWriter. If no matching ever happened, it will have value
HANDLE_NIL.