RTI Connext .NET API (legacy)  Version 6.1.2
DDS::SubscriptionMatchedStatus Struct Reference

SUBSCRIPTION_MATCHED_STATUS. More...

#include <managed_subscription.h>

Public Attributes

System::Int32 total_count
 The total cumulative number of times that this DDS::DataReader discovered a "match" with a DDS::DataWriter. More...
 
System::Int32 total_count_change
 The changes in total_count since the last time the listener was called or the status was read. More...
 
System::Int32 current_count
 The current number of DataWriters with which the DDS::DataReader is matched. More...
 
System::Int32 current_count_peak
 <<extension>> Greatest number of DataWriters that matched this DataReader simultaneously. More...
 
System::Int32 current_count_change
 The change in current_count since the last time the listener was called or the status was read. More...
 
InstanceHandle_t last_publication_handle
 This InstanceHandle can be used to look up which remote DDS::DataWriter was the last to cause this DataReader's status to change, using DDS::DataReader::get_matched_publication_data. More...
 

Detailed Description

SUBSCRIPTION_MATCHED_STATUS.

A "match" happens when the DDS::DataReader finds a DDS::DataWriter with the same DDS::Topic, same or compatible data type, and an offered QoS that is compatible with that requested by the DDS::DataReader. (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::DataReader will become "unmatched" from a remote DDS::DataWriter when that DDS::DataWriter goes away for any of the following reasons:

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

Note: A DataWriter's loss of liveliness (which is determined by DDS::LivelinessQosPolicyKind) does not trigger an unmatch event. So a DataWriter may still match even though its liveliness is lost.

Examples:
HelloWorld_subscriber.cpp.

Member Data Documentation

◆ total_count

System::Int32 DDS::SubscriptionMatchedStatus::total_count

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

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::SubscriptionMatchedStatus.

◆ total_count_change

System::Int32 DDS::SubscriptionMatchedStatus::total_count_change

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 the DataReader ever matched with a DataWriter).

◆ current_count

System::Int32 DDS::SubscriptionMatchedStatus::current_count

The current number of DataWriters with which the DDS::DataReader 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::SubscriptionMatchedStatus.

◆ current_count_peak

System::Int32 DDS::SubscriptionMatchedStatus::current_count_peak

<<extension>> Greatest number of DataWriters that matched this DataReader simultaneously.

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

◆ current_count_change

System::Int32 DDS::SubscriptionMatchedStatus::current_count_change

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 DataWriters have become unmatched for one or more of the reasons described in DDS::SubscriptionMatchedStatus.

◆ last_publication_handle

InstanceHandle_t DDS::SubscriptionMatchedStatus::last_publication_handle

This InstanceHandle can be used to look up which remote DDS::DataWriter was the last to cause this DataReader's status to change, using DDS::DataReader::get_matched_publication_data.

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