RTI Connext Modern C++ API
Version 6.0.1
|
Information about the status dds::core::status::StatusMask::liveliness_changed() More...
#include <TStatus.hpp>
Public Member Functions | |
int32_t | alive_count () const |
The total count of currently alive dds::pub::DataWriter entities that write the dds::topic::Topic that this dds::sub::DataReader reads. | |
int32_t | not_alive_count () const |
The total count of currently not_alive dds::pub::DataWriter entities that write the dds::topic::Topic that this dds::sub::DataReader reads. | |
int32_t | alive_count_change () const |
The change in the alive_count since the last time the listener was called or the status was read. | |
int32_t | not_alive_count_change () const |
The change in the not_alive_count since the last time the listener was called or the status was read. | |
const dds::core::InstanceHandle | last_publication_handle () const |
This InstanceHandle can be used to look up which remote dds::pub::DataWriter was the last to cause this DataReader's status to change, using dds::sub::DataReader::matched_publication_data. | |
Information about the status dds::core::status::StatusMask::liveliness_changed()
The dds::sub::DataReaderListener::on_liveliness_changed callback may be invoked for the following reasons:
The liveliness of any dds::pub::DataWriter matching this DataReader (as defined by the dds::core::policy::LivelinessKind setting) is lost.
A DataWriter's liveliness is recovered after being lost.
A new matching DataWriter has been discovered.
A matching DataWriter has been deleted.
A QoS Policy has changed such that a DataWriter that matched this DataReader before no longer matches (such as a change to the dds::core::policy::Partition). In this case, RTI Connext will no longer keep track of the DataWriter's liveliness. Furthermore, consider two scenarios:
DataWriter was not alive when it and DataReader stopped matching: dds::core::status::LivelinessChangedStatus::alive_count will remain the same (since the matching DataWriter was not alive) and dds::core::status::LivelinessChangedStatus::not_alive_count will decrease (since there's one less not-alive matching DataWriter).
Note: There are several ways that a DataWriter and DataReader can become incompatible after the DataWriter has lost liveliness. For example, when the dds::core::policy::LivelinessKind is set to DDS_MANUAL_BY_PARTICIPANT_LIVELINESS_QOS, it is possible that the DataWriter has not asserted its liveliness in a timely manner, and then a QoS change occurs on the DataWriter or DataReader that makes the entities incompatible.
|
inline |
The total count of currently alive dds::pub::DataWriter entities that write the dds::topic::Topic that this dds::sub::DataReader reads.
|
inline |
The total count of currently not_alive dds::pub::DataWriter entities that write the dds::topic::Topic that this dds::sub::DataReader reads.
|
inline |
The change in the alive_count since the last time the listener was called or the status was read.
|
inline |
The change in the not_alive_count since the last time the listener was called or the status was read.
Note that a positive not_alive_count_change means one of the following:
The DomainParticipant containing the matched DataWriter has lost liveliness or has been deleted.
|
inline |
This InstanceHandle can be used to look up which remote dds::pub::DataWriter was the last to cause this DataReader's status to change, using dds::sub::DataReader::matched_publication_data.
It's possible that the DataWriter has been purged from the discovery database. (See the "What is Discovery?" section of the User's Manual.) If so, the dds::sub::DataReader::matched_publication_data method will not be able to return information about the DataWriter. In this case, the only way to get information about the lost DataWriter is if you cached the information previously.