RTI Connext Modern C++ API  Version 6.0.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
rti::sub::cond::DataReaderStatusConditionHandler< T > Class Template Reference

<<interface>> Realization of a functor handler that handles the status of a dds::sub::DataReader. More...

#include <DataReaderStatusConditionHandler.hpp>

Public Member Functions

 DataReaderStatusConditionHandler (dds::sub::DataReader< T > &reader, dds::sub::DataReaderListener< T > *listener, const dds::core::status::StatusMask &listener_mask)
 Creates a new rti::core::sub::DataReaderStatusConditionHandler instance.

Detailed Description

template<typename T>
class rti::sub::cond::DataReaderStatusConditionHandler< T >

<<interface>> Realization of a functor handler that handles the status of a dds::sub::DataReader.

A rti::core::sub::DataReaderStatusConditionHandler demultiplexes a dds::sub::DataReader status change into the corresponding callback of a provided dds::sub::DataReaderListener implementation.

Note that the dds::sub::DataReaderListener notifications have different considerations than if the were made by the dds::sub::DataReader directly:

The rti::core::sub::DataReaderStatusConditionHandler is a convenience to handle the status changes of a dds::sub::DataReader. You can install a rti::core::sub::DataReaderStatusConditionHandler as the handler of a reader's dds::core::cond::StatusCondition. You can then attach it to a dds::core::cond::WaitSet or rti::core::cond::AsyncWaitSet and receive status changes notifications through a specific dds::sub::DataReaderListener implementation instance.

Constructor & Destructor Documentation

template<typename T >
rti::sub::cond::DataReaderStatusConditionHandler< T >::DataReaderStatusConditionHandler ( dds::sub::DataReader< T > &  reader,
dds::sub::DataReaderListener< T > *  listener,
const dds::core::status::StatusMask listener_mask 

Creates a new rti::core::sub::DataReaderStatusConditionHandler instance.

The created DataReaderStatusConditionHandler can set as functor handler in any dds::core::cond::Condition and will demultiplex the specified status changes from the specified dds::sub::DataReader

reader<<in>> The dds::sub::DataReader for which the status changes are demultiplexed to the specified listener
listener<<in>> that receives the status changes notifications from the specified reader.
listener_mask<<in>> Specifies which status changes from the reader to demultiplex to the listener.
A new instance or NULL on error.
See Also
dds::sub::DataReader::listener(Listener* the_listener,const dds::core::status::StatusMask& event_mask)
functor handler

RTI Connext Modern C++ API Version 6.0.1 Copyright © Sat Nov 23 2019 Real-Time Innovations, Inc