![]() |
OpenSplice C# API
v6.x
OpenSplice C# Data Distribution Service Data-Centric Publish-Subscribe API
|
An IWaitSet object allows an application to wait until one or more of the attached ICondition objects evaluates to true or until the timeout expires. More...
Public Member Functions | |
ReturnCode | AttachCondition (ICondition condition) |
This operation attaches a condition to the WaitSet. More... | |
ReturnCode | DetachCondition (ICondition condition) |
This operation detaches an ICondition from the IWaitSet. More... | |
ReturnCode | GetConditions (ref ICondition[] attachedConditions) |
This operation retrieves the list of attached conditions. More... | |
ReturnCode | Wait (ref ICondition[] activeConditions, Duration timeout) |
This operation allows an application thread to wait for the occurrence of at least one of the conditions that is attached to the IWaitSet. More... | |
An IWaitSet object allows an application to wait until one or more of the attached ICondition objects evaluates to true or until the timeout expires.
The IWaitSet has no factory and must be created by the application. It is directly created as an object by using the WaitSet constructor.
Definition at line 104 of file DdsDcpsInterfaces.cs.
ReturnCode DDS.IWaitSet.AttachCondition | ( | ICondition | condition | ) |
This operation attaches a condition to the WaitSet.
This operation attaches an ICondition to the WaitSet. The parameter condition must be either an IReadCondition, IQueryCondition, IStatusCondition or IGuardCondition. To get this parameter see:
When an IGuardCondition is initially created, the TriggerValue is false. When an ICondition, whose TriggerValue evaluates to true, is attached to an IWaitSet that is currently being waited on (using the Wait operation), the IWaitSet will unblock immediately.
condition | The condition to be attached to the IWaitSet. The parameter must be either an IReadCondition, IQueryCondition, IStatusCondition or IGuardCondition |
ReturnCode DDS.IWaitSet.DetachCondition | ( | ICondition | condition | ) |
This operation detaches an ICondition from the IWaitSet.
If the ICondition was not attached to this IWaitSet, the operation returns PreconditionNotMet.
condition | The attached condition in the IWaitSet which is to be detached. |
ReturnCode DDS.IWaitSet.GetConditions | ( | ref ICondition [] | attachedConditions | ) |
This operation retrieves the list of attached conditions.
This operation retrieves the list of attached conditions in the IWaitSet. The parameter attachedConditions is a reference to a sequence which afterwards will refer to the sequence of attached conditions. The resulting sequence will either be an empty sequence, meaning there were no conditions attached, or will contain a list of IReadCondition, IQueryCondition, IStatusCondition and IGuardCondition. These conditions previously have been attached by AttachCondition and were created by there respective create operation:
attachedConditions | A reference to a sequence that will hold all the attached conditions on the IWaitSet |
ReturnCode DDS.IWaitSet.Wait | ( | ref ICondition [] | activeConditions, |
Duration | timeout | ||
) |
This operation allows an application thread to wait for the occurrence of at least one of the conditions that is attached to the IWaitSet.
This operation allows an application thread to wait for the occurrence of at least one of the conditions to evaluate to true that is attached to the WaitSet. If all of the conditions attached to the WaitSet have a TriggerValue of false, the wait operation will block the calling thread. The result of the operation is the continuation of the application thread after which the result is left in activeConditions. This is a reference to a sequence, which will contain the list of all the attached conditions that have a TriggerValue of true.
The parameter timeout specifies the maximum duration for the wait to block the calling application thread (when none of the attached conditions has a TriggerValue of true). In that case the return value is Timeout and the activeConditions sequence is left empty. Since it is not allowed for more than one application thread to be waiting on the same WaitSet, the operation returns immediately with the value PreconditionNotMet when the wait operation is invoked on a WaitSet which already has an application thread blocking on it.
activeConditions | A sequence which is used to pass the list of all the attached conditions that have a TriggerValue of true. |
timeout | The maximum duration to block for the wait, after which the application thread is unblocked. The special constant Infinite can be used when the maximum waiting time does not need to be bounded. |