DDS-PSM-C++ 1.0 ISO C++ API for OpenSplice DDS |
#include <TWaitSet.hpp>
Public Types | |
typedef std::vector < dds::core::cond::Condition > | ConditionSeq |
Additional Inherited Members | |
Protected Attributes inherited from dds::core::Reference< DELEGATE > | |
DELEGATE_REF_T | impl_ |
A WaitSet object allows an application to wait until one or more of the attached Condition objects has a trigger_value of TRUE or else until the timeout expires. A WaitSet is not necessarily associated with a single DomainParticipant and could be used to wait on Condition objects associated with different DomainParticipant objects.
Definition at line 46 of file TWaitSet.hpp.
typedef std::vector<dds::core::cond::Condition> dds::core::cond::TWaitSet< DELEGATE >::ConditionSeq |
Definition at line 48 of file TWaitSet.hpp.
dds::core::cond::TWaitSet< DELEGATE >::TWaitSet | ( | ) |
Creates a new waitset.
dds::core::cond::TWaitSet< DELEGATE >::~TWaitSet | ( | ) |
WaitSet& dds::core::cond::TWaitSet< DELEGATE >::attach_condition | ( | const dds::core::cond::Condition & | cond | ) |
Attaches a Condition to the WaitSet. It is possible to attach a Condition on a WaitSet that is currently being waited upon (via the wait operation). In this case, if the Condition has a trigger_value of TRUE, then attaching the condition will unblock the WaitSet. Adding a Condition that is already attached to the WaitSet has no effect.
cond | the condition to be attached to this waitset. |
const ConditionSeq dds::core::cond::TWaitSet< DELEGATE >::conditions | ( | ) |
This operation retrieves the list of attached conditions.
ConditionSeq& dds::core::cond::TWaitSet< DELEGATE >::conditions | ( | ConditionSeq & | conds | ) | const |
This operation retrieves the list of attached conditions.
bool dds::core::cond::TWaitSet< DELEGATE >::detach_condition | ( | const dds::core::cond::Condition & | cond | ) |
Detaches a Condition from the WaitSet. If the Condition was not attached to the WaitSet, the operation will return false.
cond | the condition to detach from this WaitSet |
void dds::core::cond::TWaitSet< DELEGATE >::dispatch | ( | ) |
Waits for at least one of the attached conditions to trigger and then dispatches the events.
void dds::core::cond::TWaitSet< DELEGATE >::dispatch | ( | const dds::core::Duration & | timeout | ) |
Waits for at least one of the attached conditions to trigger and then dispatches the events, or, times out and unblocks.
WaitSet& dds::core::cond::TWaitSet< DELEGATE >::operator+= | ( | const dds::core::cond::Condition & | cond | ) |
A synonym for attach_condition.
WaitSet& dds::core::cond::TWaitSet< DELEGATE >::operator-= | ( | const dds::core::cond::Condition & | cond | ) |
A synonym for detach_condition.
const ConditionSeq dds::core::cond::TWaitSet< DELEGATE >::wait | ( | const dds::core::Duration & | timeout | ) |
This operation 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.
The wait operation takes a timeout argument that specifies the maximum duration for the wait. It this duration is exceeded and none of the attached Condition objects is true, wait will continue and the returned ConditionSeq will be empty.
It is not allowed for more than one application thread to be waiting on the same WaitSet. If the wait operation is invoked on a WaitSet that already has a thread blocking on it, the operation will raise immediately an exception PreconditionNotMet.
The result of the wait operation is the list of all the attached conditions that have a trigger_value of TRUE (i.e., the conditions that unblocked the wait).
timeout | the maximum amount of time for which the wait should block while waiting for a condition to be triggered. |
PreconditionNotMetException when multiple thread try to invoke the method concurrently.
const ConditionSeq dds::core::cond::TWaitSet< DELEGATE >::wait | ( | ) |
This operation 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.
The wait operation takes a timeout argument that specifies the maximum duration for the wait. It this duration is exceeded and none of the attached Condition objects is true, wait will continue and the returned ConditionSeq will be empty.
It is not allowed for more than one application thread to be waiting on the same WaitSet. If the wait operation is invoked on a WaitSet that already has a thread blocking on it, the operation will raise immediately an exception PreconditionNotMet.
The result of the wait operation is the list of all the attached conditions that have a trigger_value of TRUE (i.e., the conditions that unblocked the wait).
timeout | the maximum amount of time for which the wait should block while waiting for a condition to be triggered. |
PreconditionNotMetException when multiple thread try to invoke the method concurrently.
ConditionSeq& dds::core::cond::TWaitSet< DELEGATE >::wait | ( | ConditionSeq & | triggered, |
const dds::core::Duration & | timeout | ||
) |
This operation 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.
The wait operation takes a timeout argument that specifies the maximum duration for the wait. It this duration is exceeded and none of the attached Condition objects is true, wait will continue and the returned ConditionSeq will be empty.
It is not allowed for more than one application thread to be waiting on the same WaitSet. If the wait operation is invoked on a WaitSet that already has a thread blocking on it, the operation will raise immediately an exception PreconditionNotMet.
The result of the wait operation is the list of all the attached conditions that have a trigger_value of TRUE (i.e., the conditions that unblocked the wait).
timeout | the maximum amount of time for which the wait should block while waiting for a condition to be triggered. |
PreconditionNotMetException when multiple thread try to invoke the method concurrently.
ConditionSeq& dds::core::cond::TWaitSet< DELEGATE >::wait | ( | ConditionSeq & | triggered | ) |
This operation 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.
The wait operation takes a timeout argument that specifies the maximum duration for the wait. It this duration is exceeded and none of the attached Condition objects is true, wait will continue and the returned ConditionSeq will be empty.
It is not allowed for more than one application thread to be waiting on the same WaitSet. If the wait operation is invoked on a WaitSet that already has a thread blocking on it, the operation will raise immediately an exception PreconditionNotMet.
The result of the wait operation is the list of all the attached conditions that have a trigger_value of TRUE (i.e., the conditions that unblocked the wait).
timeout | the maximum amount of time for which the wait should block while waiting for a condition to be triggered. |
PreconditionNotMetException when multiple thread try to invoke the method concurrently.