Fast DDS  Version 3.6.1.0
Fast DDS
WaitSet Class Reference

The WaitSet class allows an application to wait until one or more of the attached Condition objects has a trigger_value of TRUE or until timeout expires. More...

#include <WaitSet.hpp>

Public Member Functions

FASTDDS_EXPORTED_API WaitSet ()
 
FASTDDS_EXPORTED_API ~WaitSet ()
 
 WaitSet (const WaitSet &)=delete
 
 WaitSet (WaitSet &&)=delete
 
WaitSetoperator= (const WaitSet &)=delete
 
WaitSetoperator= (WaitSet &&)=delete
 
FASTDDS_EXPORTED_API ReturnCode_t attach_condition (const Condition &cond)
 Attaches a Condition to the Wait Set. More...
 
FASTDDS_EXPORTED_API ReturnCode_t detach_condition (const Condition &cond)
 Detaches a Condition from the WaitSet. More...
 
FASTDDS_EXPORTED_API ReturnCode_t wait (ConditionSeq &active_conditions, const dds::Duration_t timeout) const
 Allows an application thread to wait for the occurrence of certain conditions. More...
 
FASTDDS_EXPORTED_API ReturnCode_t get_conditions (ConditionSeq &attached_conditions) const
 Retrieves the list of attached conditions. More...
 

Detailed Description

The WaitSet class allows an application to wait until one or more of the attached Condition objects has a trigger_value of TRUE or until timeout expires.

Constructor & Destructor Documentation

◆ WaitSet() [1/3]

FASTDDS_EXPORTED_API WaitSet ( )

◆ ~WaitSet()

FASTDDS_EXPORTED_API ~WaitSet ( )

◆ WaitSet() [2/3]

WaitSet ( const WaitSet )
delete

◆ WaitSet() [3/3]

WaitSet ( WaitSet &&  )
delete

Member Function Documentation

◆ attach_condition()

FASTDDS_EXPORTED_API ReturnCode_t attach_condition ( const Condition cond)

Attaches a Condition to the Wait Set.

Parameters
condCondition
Returns
RETCODE_OK if attached correctly, error code otherwise

◆ detach_condition()

FASTDDS_EXPORTED_API ReturnCode_t detach_condition ( const Condition cond)

Detaches a Condition from the WaitSet.

Parameters
condCondition
Returns
RETCODE_OK if detached correctly, PRECONDITION_NOT_MET if condition was not attached

◆ get_conditions()

FASTDDS_EXPORTED_API ReturnCode_t get_conditions ( ConditionSeq attached_conditions) const

Retrieves the list of attached conditions.

Parameters
attached_conditionsReference to the collection of attached conditions
Returns
RETCODE_OK if everything correct, error code otherwise

◆ operator=() [1/2]

WaitSet & operator= ( const WaitSet )
delete

◆ operator=() [2/2]

WaitSet & operator= ( WaitSet &&  )
delete

◆ wait()

FASTDDS_EXPORTED_API ReturnCode_t wait ( ConditionSeq active_conditions,
const dds::Duration_t  timeout 
) const

Allows an application thread to wait for the occurrence of certain conditions.

If none of the conditions attached to the WaitSet have a trigger_value of true, the wait operation will block suspending the calling thread

Parameters
active_conditionsReference to the collection of conditions which trigger_value are true
timeoutMaximum time of the wait
Returns
RETCODE_OK if everything correct, PRECONDITION_NOT_MET if WaitSet already waiting, TIMEOUT if maximum time expired, error code otherwise

The documentation for this class was generated from the following file: