RTI Connext Modern C++ API  Version 6.1.0

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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 

Detailed Description

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:

Member Function Documentation

◆ alive_count()

int32_t dds::core::status::LivelinessChangedStatus::alive_count ( ) const
inline

The total count of currently alive dds::pub::DataWriter entities that write the dds::topic::Topic that this dds::sub::DataReader reads.

◆ not_alive_count()

int32_t dds::core::status::LivelinessChangedStatus::not_alive_count ( ) const
inline

The total count of currently not_alive dds::pub::DataWriter entities that write the dds::topic::Topic that this dds::sub::DataReader reads.

◆ alive_count_change()

int32_t dds::core::status::LivelinessChangedStatus::alive_count_change ( ) const
inline

The change in the alive_count since the last time the listener was called or the status was read.

◆ not_alive_count_change()

int32_t dds::core::status::LivelinessChangedStatus::not_alive_count_change ( ) const
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.

  • The matched DataWriter has lost liveliness or has been deleted.

◆ last_publication_handle()

const dds::core::InstanceHandle dds::core::status::LivelinessChangedStatus::last_publication_handle ( ) const
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.