RTI Connext Traditional C++ API  Version 6.1.1
DDSDataReaderStatusConditionHandler Class Reference

<<interface>> Realization of a DDSConditionHandler that handles the status of a DDSDataReader. More...

Inheritance diagram for DDSDataReaderStatusConditionHandler:
DDSConditionHandler

Public Member Functions

virtual void on_condition_triggered (DDSCondition *condition)
 Handles the dispatch of a DDSCondition. More...
 
 DDSDataReaderStatusConditionHandler (DDSDataReader *reader, DDSDataReaderListener *listener, DDS_StatusMask listener_mask)
 Creates a new DDSDataReaderStatusConditionHandler instance. More...
 
virtual ~DDSDataReaderStatusConditionHandler ()
 Deletes a DDSDataReaderStatusConditionHandler instance previously created with DDSDataReaderStatusConditionHandler::DDSDataReaderStatusConditionHandler. More...
 

Detailed Description

<<interface>> Realization of a DDSConditionHandler that handles the status of a DDSDataReader.

A DDSDataReaderStatusConditionHandler demultiplexes a DDSDataReader status change into the corresponding callback of a provided DDSDataReaderListener implementation.

Note that the DDSDataReaderListener notifications have different considerations than if the were made by the DDSDataReader directly:

  • Context: The DDSDataReaderListener callback context is the one of the thread that dispatches the DDSCondition where this handler is set. For instance, if you attach the condition to a DDSAsyncWaitSet, the context will be one of the threads within the pool.
  • Status clearing: All the DDSDataReader's enabled statuses are cleared upon condition dispatch except the DDS_DATA_AVAILABLE_STATUS, which will not be cleared until your application reads the data.
  • Exclusive Area: Restrictions depend on the context of the dipsatching thread. For instance, if the DDSAsyncWaitSet dispatches the condition, the listener notications are free of any exclusive area restrictions.

The DDSDataReaderStatusConditionHandler is a convenience to handle the status changes of a DDSDataReader. You can install a DDSDataReaderStatusConditionHandler as the handler of a reader's DDSStatusCondition. You can then attach it to a DDSWaitSet or DDSAsyncWaitSet and receive status changes notifications through a specific DDSDataReaderListener implementation instance.

Constructor & Destructor Documentation

◆ DDSDataReaderStatusConditionHandler()

DDSDataReaderStatusConditionHandler::DDSDataReaderStatusConditionHandler ( DDSDataReader reader,
DDSDataReaderListener listener,
DDS_StatusMask  listener_mask 
)

Creates a new DDSDataReaderStatusConditionHandler instance.

The created DataReaderStatusConditionHandler can set as DDSConditionHandler in any DDSCondition and will demultiplex the specified status changes from the specified DDSDataReader

Parameters
reader<<in>> The DDSDataReader 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.
Returns
A new instance or NULL on error.
See also
DDSDataReader
DDSDataReader::set_listener
DDSStatusCondition
DDSConditionHandler

◆ ~DDSDataReaderStatusConditionHandler()

virtual DDSDataReaderStatusConditionHandler::~DDSDataReaderStatusConditionHandler ( )
virtual

Member Function Documentation

◆ on_condition_triggered()

virtual void DDSDataReaderStatusConditionHandler::on_condition_triggered ( DDSCondition condition)
virtual

Handles the dispatch of a DDSCondition.

This callback is called by DDSCondition::dispatch.

Implements DDSConditionHandler.