RTI Connext Modern C++ API  Version 5.3.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
dds::core::cond::GuardCondition Class Reference

<<reference-type>> A condition whose trigger value is under the control of the application. More...

#include <dds/core/cond/GuardCondition.hpp>

Inheritance diagram for dds::core::cond::GuardCondition:
dds::core::cond::Condition

Public Member Functions

template<typename Functor >
void handler (const Functor &func)
 Registers a custom handler with this condition.
 
void reset_handler ()
 Resets the handler for this condition.
 
void trigger_value (bool value)
 Manually sets the trigger value.
 
- Public Member Functions inherited from dds::core::cond::Condition
void dispatch ()
 Dispatches the functors that have been registered with the condition.
 
bool trigger_value () const
 This operation retrieves the trigger_value of the Condition.
 

Detailed Description

<<reference-type>> A condition whose trigger value is under the control of the application.

The dds::core::cond::GuardCondition provides a way for an application to manually wake up a dds::core::cond::WaitSet. This is accomplished by attaching the dds::core::cond::GuardCondition to the dds::core::cond::WaitSet and then setting the trigger_value by means of the dds::core::cond::GuardCondition::trigger_value() operation.

See Also
dds::core::cond::WaitSet.

Member Function Documentation

template<typename Functor >
void dds::core::cond::GuardCondition::handler ( const Functor &  func)
inline

Registers a custom handler with this condition.

For information about condition handlers, see this ReadCondition constructor

MT Safety:
It is not safe to call handler(), reset_handler() or trigger_value() concurrently.
void dds::core::cond::GuardCondition::reset_handler ( )
inline

Resets the handler for this condition.

After the invocation of this method no handler will be registered with this condition.

MT Safety:
It is not safe to call handler(), reset_handler() or trigger_value() concurrently.
void dds::core::cond::GuardCondition::trigger_value ( bool  value)
inline

Manually sets the trigger value.

Setting the trigger value to true causes the activation of the condition in a WaitSet.

See Also
WaitSet::wait()
WaitSet::dispatch()

RTI Connext Modern C++ API Version 5.3.1 Copyright © Mon Feb 19 2018 Real-Time Innovations, Inc