A DDS_WaitSet maintains a set of Condition objects and allows the application to wait until one or more of them have a trigger_value of TRUE. More...
Public Member Functions | |
WaitSet () | |
void | destroy () |
ReturnCode_t | attach_condition (Condition c) |
ReturnCode_t | detach_condition (Condition c) |
ReturnCode_t | wait (Vector active_conditions, Duration_t timeout) |
ReturnCode_t | get_conditions (Vector attached_conditions) |
A DDS_WaitSet maintains a set of Condition objects and allows the application to wait until one or more of them have a trigger_value of TRUE.
Multiple conditions may be attached to a WaitSet.
WaitSet | ( | ) |
Constructor.
ReturnCode_t attach_condition | ( | Condition | c | ) |
void destroy | ( | ) |
ReturnCode_t detach_condition | ( | Condition | c | ) |
ReturnCode_t get_conditions | ( | Vector | attached_conditions | ) |
Retrieves the current list of attached conditions. Populates the attached_conditions sequence.
ReturnCode_t wait | ( | Vector | active_conditions, |
Duration_t | timeout | ||
) |
Causes the controlling thread to block until an attached condition is triggered or timeout elapses.
A return value of DDS_RETCODE_OK indicates that one or more of the attached conditions evaluated to TRUE. Those 'active' conditions are included in the 'out' parameter active_conditions.
A return value of DDS_RETCODE_TIMEOUT indicates that the timeout period elapsed without any of the conditions evaluating to TRUE.