RTI Connext Modern C++ API  Version 6.0.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
rti::queuing::QueueConsumerListener< T > Class Template Referenceabstract

Called when certain events occur in a QueueConsumer. More...

#include <rti/queuing/QueueConsumerListener.hpp>

Inheritance diagram for rti::queuing::QueueConsumerListener< T >:
rti::queuing::NoOpQueueConsumerListener< T >

Public Member Functions

virtual void on_sample_available (QueueConsumer< T > &consumer)=0
 User callback.
 
virtual void on_shared_reader_queue_matched (QueueConsumer< T > &consumer, const dds::core::status::SubscriptionMatchedStatus &status)=0
 User callback.
 

Detailed Description

template<typename T>
class rti::queuing::QueueConsumerListener< T >

Called when certain events occur in a QueueConsumer.

A QueueConsumer listener is a way to implement a callback that will be invoked when certain events happen. It is an optional parameter in QueueConsumerParams.

You can use this listener to receive notification when:

  • Samples are available
  • There are SharedReaderQueue matching events
See Also
QueueConsumer::QueueConsumer()

Member Function Documentation

template<typename T>
virtual void rti::queuing::QueueConsumerListener< T >::on_sample_available ( QueueConsumer< T > &  consumer)
pure virtual

User callback.

This callback is invoked whenever the QueueConsumer has received at least one sample. Any operation to get samples i.e. QueueConsumer::take_sample) can be called within this context.

See Also
dds::sub::DataReaderListener::on_data_available

Implemented in rti::queuing::NoOpQueueConsumerListener< T >, rti::queuing::NoOpQueueConsumerListener< TReq >, and rti::queuing::NoOpQueueConsumerListener< TRep >.

template<typename T>
virtual void rti::queuing::QueueConsumerListener< T >::on_shared_reader_queue_matched ( QueueConsumer< T > &  consumer,
const dds::core::status::SubscriptionMatchedStatus status 
)
pure virtual

User callback.

This callback is invoked whenever a new SharedReaderQueue hosted by Queuing Service has matched the QueueConsumer, or if an existing matching SharedReaderQueue is disposed.

See Also
dds::core::status::SubscriptionMatchedStatus
dds::sub::DataReaderListener::on_subscription_matched

Implemented in rti::queuing::NoOpQueueConsumerListener< T >, rti::queuing::NoOpQueueConsumerListener< TReq >, and rti::queuing::NoOpQueueConsumerListener< TRep >.


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