RTI Connext Modern C++ API Version 7.3.0

Information about the status dds::core::status::StatusMask::publication_matched() More...

#include <TStatus.hpp>

Public Member Functions

int32_t total_count () const
 The total cumulative number of times that this dds::pub::DataWriter discovered a "match" with a dds::sub::DataReader. More...
 
int32_t total_count_change () const
 The changes in total_count since the last time the listener was called or the status was read. More...
 
int32_t current_count () const
 The current number of DataReaders with which this dds::pub::DataWriter is matched. More...
 
int32_t current_count_change () const
 The change in current_count since the last time the listener was called or the status was read. More...
 
const dds::core::InstanceHandle last_subscription_handle () const
 This InstanceHandle can be used to look up which remote dds::sub::DataReader was the last to cause this DataWriter's status to change, using dds::pub::matched_subscription_data(). More...
 
int32_t current_count_peak () const
 <<extension>> Greatest number of DataReaders that matched this dds::pub::DataWriter simultaneously. More...
 

Detailed Description

Information about the status dds::core::status::StatusMask::publication_matched()

A "match" happens when the dds::pub::DataWriter finds a dds::sub::DataReader with the same dds::topic::Topic, same or compatible data type, and requested QoS that is compatible with that offered by the dds::pub::DataWriter. (For information on compatible data types, see the Extensible Types Guide.)

This status is also changed (and the listener, if any, called) when a match is ended. A local dds::pub::DataWriter will become "unmatched" from a remote dds::sub::DataReader when that dds::sub::DataReader goes away for any of the following reasons:

This status may reflect changes from multiple match or unmatch events, and the dds::core::status::PublicationMatchedStatus::current_count_change can be used to determine the number of changes since the listener was called back or the status was checked.

Member Function Documentation

◆ total_count()

int32_t dds::core::status::PublicationMatchedStatus::total_count ( ) const
inline

The total cumulative number of times that this dds::pub::DataWriter discovered a "match" with a dds::sub::DataReader.

This number increases whenever a new match is discovered. It does not decrease when an existing match goes away for any of the reasons described in dds::core::status::PublicationMatchedStatus.

◆ total_count_change()

int32_t dds::core::status::PublicationMatchedStatus::total_count_change ( ) const
inline

The changes in total_count since the last time the listener was called or the status was read.

Note that this number will never be negative (because it's the total number of times this DataWriter ever matched with a DataReader).

◆ current_count()

int32_t dds::core::status::PublicationMatchedStatus::current_count ( ) const
inline

The current number of DataReaders with which this dds::pub::DataWriter is matched.

This number increases when a new match is discovered and decreases when an existing match goes away for any of the reasons described in dds::core::status::PublicationMatchedStatus.

◆ current_count_change()

int32_t dds::core::status::PublicationMatchedStatus::current_count_change ( ) const
inline

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

Note that a negative current_count_change means that one or more DataReaders have become unmatched for one or more of the reasons described in dds::core::status::PublicationMatchedStatus.

◆ last_subscription_handle()

const dds::core::InstanceHandle dds::core::status::PublicationMatchedStatus::last_subscription_handle ( ) const
inline

This InstanceHandle can be used to look up which remote dds::sub::DataReader was the last to cause this DataWriter's status to change, using dds::pub::matched_subscription_data().

If the DataReader no longer matches this DataWriter due to any of the reasons in dds::core::status::PublicationMatchedStatus except incompatible QoS, then the DataReader has been purged from this DataWriter's DomainParticipant discovery database. (See the "Discovery Overview" section of the User's Manual.) In that case, the dds::pub::matched_subscription_data() method will not be able to return information about the DataReader. The only way to get information about the lost DataReader is if you cached the information previously.

◆ current_count_peak()

int32_t current_count_peak ( ) const

<<extension>> Greatest number of DataReaders that matched this dds::pub::DataWriter simultaneously.

That is, there was no moment in time when more than this many DataReaders matched this DataWriter. (As a result, total_count can be higher than current_count_peak.)