RTI Connext Modern C++ API  Version 7.0.0
dds::core::status::StatusMask Class Reference

A std::bitset (list) of statuses. More...

#include <State.hpp>

Inherits bitset< OMG_DDS_STATUS_COUNT >.

Public Types

typedef std::bitset< OMG_DDS_STATUS_COUNT > MaskType
 The base class, a std::bitset. More...
 

Public Member Functions

 StatusMask ()
 Creates StatusMask::none() More...
 
 StatusMask (uint64_t mask)
 Creates a StatusMask from the bits in a uint64_t value. More...
 
 StatusMask (const MaskType &mask)
 Creates a StatusMask from a bitset. More...
 

Static Public Member Functions

static const StatusMask all ()
 All the bits are set. More...
 
static const StatusMask none ()
 No bits are set. More...
 
static const StatusMask inconsistent_topic ()
 Another topic exists with the same name but different characteristics. More...
 
static const StatusMask offered_deadline_missed ()
 The deadline that the dds::pub::DataWriter has committed through its dds::core::policy::Deadline was not respected for a specific instance. More...
 
static const StatusMask requested_deadline_missed ()
 The deadline that the dds::sub::DataReader was expecting through its dds::core::policy::Deadline was not respected for a specific instance. More...
 
static const StatusMask offered_incompatible_qos ()
 A QosPolicy value was incompatible with what was requested. More...
 
static const StatusMask requested_incompatible_qos ()
 A QosPolicy value was incompatible with what is offered. More...
 
static const StatusMask sample_lost ()
 A sample has been lost (i.e. was never received). More...
 
static const StatusMask sample_rejected ()
 A (received) sample has been rejected. More...
 
static const StatusMask data_on_readers ()
 New data is available. More...
 
static const StatusMask data_available ()
 One or more new data samples have been received. More...
 
static const StatusMask liveliness_lost ()
 The liveliness that the dds::pub::DataWriter has committed to through its dds::core::policy::Liveliness policy was not respected, thus dds::sub::DataReader entities will consider the writer as no longer alive. More...
 
static const StatusMask liveliness_changed ()
 The liveliness of one or more dds::pub::DataWriter that were writing instances read through the dds::sub::DataReader has changed. Some dds::pub::DataWriter have become alive or not_alive. More...
 
static const StatusMask publication_matched ()
 The dds::pub::DataWriter has found dds::sub::DataReader that matches the dds::topic::Topic and has compatible QoS. More...
 
static const StatusMask subscription_matched ()
 The dds::sub::DataReader has found dds::pub::DataWriter that matches the dds::topic::Topic and has compatible QoS. More...
 
static const StatusMask reliable_writer_cache_changed ()
 <<extension>> The number of unacknowledged samples in a reliable writer's cache has changed such that it has reached a pre-defined trigger point. More...
 
static const StatusMask reliable_reader_activity_changed ()
 <<extension>> One or more reliable readers has become active or inactive. More...
 
static const StatusMask datawriter_cache ()
 <<extension>> The status of the writer's cache. More...
 
static const StatusMask datawriter_protocol ()
 <<extension>> The status of a writer's internal protocol related metrics More...
 
static const StatusMask datareader_cache ()
 <<extension>> The status of the reader's cache. More...
 
static const StatusMask datareader_protocol ()
 <<extension>> The status of a reader's internal protocol related metrics More...
 
static const StatusMask datawriter_application_acknowledgment ()
 <<extension>> A dds::pub::DataWriter has received an application-level acknowledgment for a sample More...
 
static const StatusMask datawriter_instance_replaced ()
 <<extension>> A dds::pub::DataWriter instance has been replaced More...
 
static const StatusMask service_request_accepted ()
 <<extension>> A service request has been received for a dds::pub::DataWriter More...
 
static const StatusMask sample_removed ()
 <<extension>> A sample has been removed from a dds::pub::DataWriter More...
 
static const StatusMask destination_unreachable ()
 <<extension>> A locator is unreachable from a dds::pub::DataWriter More...
 

Related Functions

(Note that these are not member functions.)

template<typename STATUS >
StatusMask get_status ()
 Obtains the StatusMask mask associated to a status class. More...
 

Detailed Description

A std::bitset (list) of statuses.

The bit-mask is an efficient and compact representation of a fixed-length list of dds::core::status::StatusMask values.

Bits in the mask correspond to different statuses. You can choose which changes in status will trigger a callback by setting the corresponding status bits in this bit-mask and installing callbacks for each of those statuses.

The bits that are true indicate that the listener will be called back for changes in the corresponding status.

See also
Changing the listener and enabling/disabling statuses associated with it

Member Typedef Documentation

◆ MaskType

typedef std::bitset<OMG_DDS_STATUS_COUNT > dds::core::status::StatusMask::MaskType

The base class, a std::bitset.

Constructor & Destructor Documentation

◆ StatusMask() [1/3]

dds::core::status::StatusMask::StatusMask ( )
inline

◆ StatusMask() [2/3]

dds::core::status::StatusMask::StatusMask ( uint64_t  mask)
inlineexplicit

Creates a StatusMask from the bits in a uint64_t value.

◆ StatusMask() [3/3]

dds::core::status::StatusMask::StatusMask ( const MaskType mask)
inline

Creates a StatusMask from a bitset.

Member Function Documentation

◆ all()

static const StatusMask dds::core::status::StatusMask::all ( )
inlinestatic

All the bits are set.

Referenced by dds::domain::DomainParticipant::DomainParticipant().

◆ none()

static const StatusMask dds::core::status::StatusMask::none ( )
inlinestatic

No bits are set.

◆ inconsistent_topic()

static const StatusMask dds::core::status::StatusMask::inconsistent_topic ( )
inlinestatic

Another topic exists with the same name but different characteristics.

Entity:
dds::topic::Topic
Status:
dds::core::status::InconsistentTopicStatus
Listener:
TopicListener

◆ offered_deadline_missed()

static const StatusMask dds::core::status::StatusMask::offered_deadline_missed ( )
inlinestatic

The deadline that the dds::pub::DataWriter has committed through its dds::core::policy::Deadline was not respected for a specific instance.

Entity:
dds::pub::DataWriter
QoS:
DEADLINE
Status:
dds::core::status::OfferedDeadlineMissedStatus
Listener:
dds::pub::DataWriterListener

◆ requested_deadline_missed()

static const StatusMask dds::core::status::StatusMask::requested_deadline_missed ( )
inlinestatic

The deadline that the dds::sub::DataReader was expecting through its dds::core::policy::Deadline was not respected for a specific instance.

Entity:
dds::sub::DataReader
QoS:
DEADLINE
Status:
dds::core::status::RequestedDeadlineMissedStatus
Listener:
dds::sub::DataReaderListener

◆ offered_incompatible_qos()

static const StatusMask dds::core::status::StatusMask::offered_incompatible_qos ( )
inlinestatic

A QosPolicy value was incompatible with what was requested.

Entity:
dds::pub::DataWriter
Status:
dds::core::status::OfferedIncompatibleQosStatus
Listener:
dds::pub::DataWriterListener

◆ requested_incompatible_qos()

static const StatusMask dds::core::status::StatusMask::requested_incompatible_qos ( )
inlinestatic

A QosPolicy value was incompatible with what is offered.

Entity:
dds::sub::DataReader
Status:
dds::core::status::RequestedIncompatibleQosStatus
Listener:
dds::sub::DataReaderListener

◆ sample_lost()

static const StatusMask dds::core::status::StatusMask::sample_lost ( )
inlinestatic

A sample has been lost (i.e. was never received).

Entity:
dds::sub::DataReader
Status:
dds::core::status::SampleLostStatus
Listener:
dds::sub::DataReaderListener

◆ sample_rejected()

static const StatusMask dds::core::status::StatusMask::sample_rejected ( )
inlinestatic

A (received) sample has been rejected.

Entity:
dds::sub::DataReader
QoS:
RESOURCE_LIMITS
Status:
dds::core::status::SampleRejectedStatus
Listener:
dds::sub::DataReaderListener

◆ data_on_readers()

static const StatusMask dds::core::status::StatusMask::data_on_readers ( )
inlinestatic

New data is available.

Entity:
dds::sub::Subscriber
Listener:
dds::sub::SubscriberListener

◆ data_available()

static const StatusMask dds::core::status::StatusMask::data_available ( )
inlinestatic

One or more new data samples have been received.

Entity:
dds::sub::DataReader
Listener:
dds::sub::DataReaderListener

◆ liveliness_lost()

static const StatusMask dds::core::status::StatusMask::liveliness_lost ( )
inlinestatic

The liveliness that the dds::pub::DataWriter has committed to through its dds::core::policy::Liveliness policy was not respected, thus dds::sub::DataReader entities will consider the writer as no longer alive.

Entity:
dds::pub::DataWriter
QoS:
LIVELINESS
Status:
dds::core::status::LivelinessLostStatus
Listener:
dds::pub::DataWriterListener

◆ liveliness_changed()

static const StatusMask dds::core::status::StatusMask::liveliness_changed ( )
inlinestatic

The liveliness of one or more dds::pub::DataWriter that were writing instances read through the dds::sub::DataReader has changed. Some dds::pub::DataWriter have become alive or not_alive.

Entity:
dds::sub::DataReader
QoS:
LIVELINESS
Status:
dds::core::status::LivelinessChangedStatus
Listener:
dds::sub::DataReaderListener

◆ publication_matched()

static const StatusMask dds::core::status::StatusMask::publication_matched ( )
inlinestatic

◆ subscription_matched()

static const StatusMask dds::core::status::StatusMask::subscription_matched ( )
inlinestatic

◆ reliable_writer_cache_changed()

static const StatusMask dds::core::status::StatusMask::reliable_writer_cache_changed ( )
inlinestatic

<<extension>> The number of unacknowledged samples in a reliable writer's cache has changed such that it has reached a pre-defined trigger point.

This status is considered changed at the following times: the cache is empty (i.e. contains no unacknowledge samples), full (i.e. the sample count has reached the value specified in dds::core::policy::ResourceLimits::max_samples), or the number of samples has reached a high (see rti::core::RtpsReliableWriterProtocol::high_watermark) or low (see rti::core::RtpsReliableWriterProtocol::low_watermark) watermark.

Entity:
dds::pub::DataWriter
Status:
rti::core::status::ReliableWriterCacheChangedStatus
Listener:
dds::pub::DataWriterListener

◆ reliable_reader_activity_changed()

static const StatusMask dds::core::status::StatusMask::reliable_reader_activity_changed ( )
inlinestatic

<<extension>> One or more reliable readers has become active or inactive.

A reliable reader is considered active by a reliable writer with which it is matched if that reader acknowledges the samples it has been sent in a timely fashion. For the definition of "timely" in this case, see rti::core::RtpsReliableWriterProtocol and rti::core::status::ReliableReaderActivityChangedStatus.

See also
rti::core::RtpsReliableWriterProtocol
rti::core::status::ReliableReaderActivityChangedStatus

◆ datawriter_cache()

static const StatusMask dds::core::status::StatusMask::datawriter_cache ( )
inlinestatic

<<extension>> The status of the writer's cache.

Changes to this status do not trigger a dds::core::cond::StatusCondition.

◆ datawriter_protocol()

static const StatusMask dds::core::status::StatusMask::datawriter_protocol ( )
inlinestatic

<<extension>> The status of a writer's internal protocol related metrics

The status of a writer's internal protocol-related metrics, such as the number of samples pushed, pulled, and filtered and the status of wire protocol traffic. Changes to this status information do not trigger a dds::core::cond::StatusCondition.

◆ datareader_cache()

static const StatusMask dds::core::status::StatusMask::datareader_cache ( )
inlinestatic

<<extension>> The status of the reader's cache.

Changes to this status do not trigger a dds::core::cond::StatusCondition.

◆ datareader_protocol()

static const StatusMask dds::core::status::StatusMask::datareader_protocol ( )
inlinestatic

<<extension>> The status of a reader's internal protocol related metrics

The status of a reader's internal protocol related metrics, like the number of samples received, filtered, rejected; and status of wire protocol traffic. Changes to this status do not trigger a dds::core::cond::StatusCondition.

◆ datawriter_application_acknowledgment()

static const StatusMask dds::core::status::StatusMask::datawriter_application_acknowledgment ( )
inlinestatic

<<extension>> A dds::pub::DataWriter has received an application-level acknowledgment for a sample

Enables a dds::pub::DataWriter callback that is called when an application-level acknowledgment from a dds::sub::DataReader is received. The callback is called for each sample that is application-level acknowledged. Changes to this status do not trigger a dds::core::cond::StatusCondition.

Entity:
dds::pub::DataWriter
Listener:
dds::pub::DataWriterListener

◆ datawriter_instance_replaced()

static const StatusMask dds::core::status::StatusMask::datawriter_instance_replaced ( )
inlinestatic

<<extension>> A dds::pub::DataWriter instance has been replaced

<<extension>> A dds::pub::DataWriter instance has been replaced

Enables a dds::pub::DataWriter callback that is called when an instance in the writer queue is replaced.

Entity:
dds::pub::DataWriter
Listener:
dds::pub::DataWriterListener

◆ service_request_accepted()

static const StatusMask dds::core::status::StatusMask::service_request_accepted ( )
inlinestatic

<<extension>> A service request has been received for a dds::pub::DataWriter

Enables a dds::pub::DataWriter callback that is called when a rti::topic::ServiceRequest has been accepted and dispatched to the DataWriter.

Entity:
dds::pub::DataWriter
Listener:
dds::pub::DataWriterListener

◆ sample_removed()

static const StatusMask dds::core::status::StatusMask::sample_removed ( )
inlinestatic

<<extension>> A sample has been removed from a dds::pub::DataWriter

Enables a dds::pub::DataWriter callback that is called when a sample is removed from its queue.

Entity:
dds::pub::DataWriter
Listener:
dds::pub::DataWriterListener

◆ destination_unreachable()

static const StatusMask dds::core::status::StatusMask::destination_unreachable ( )
inlinestatic

<<extension>> A locator is unreachable from a dds::pub::DataWriter

References dds::core::swap().

Friends And Related Function Documentation

◆ get_status()

template<typename STATUS >
StatusMask get_status ( )
related

Obtains the StatusMask mask associated to a status class.

For example:

using namespace dds::core::status;
StatusMask mask = get_status<PublicationMatchedStatus>();