OTX Reference  
OpenTestSystem.Otx.Extensions.EventHandling.Actions.WaitForEvent Class Reference

Waiting for an event More...

Inheritance diagram for OpenTestSystem.Otx.Extensions.EventHandling.Actions.WaitForEvent:
Inheritance graph

Public Attributes

EventVariable _event
 Event that was triggered. More...
 
EventSourceTerm[] source
 One or more sources that can generate events. More...
 
- Public Attributes inherited from OpenTestSystem.Otx.Core.Actions.ActionRealisation
OtxLink validFor
 Validity of ActionRealisation. More...
 

Detailed Description

Waiting for an event

The WaitForEvent action blocks the thread of execution until any one of its sources produces an event. As soon as a source fires an event, WaitForEvent exits and the thread of execution continues to the next node.

Syntax
EventHandling.WaitForEvent({EventSourceTerm[ ] source}, EventVariable event);
EventSourceTerm[] source
One or more sources that can generate events.
Definition: EventHandling.cs:299
Examples
// Local Declarations
Integer Integer1;
EventHandling.EventSource EventSource1;
EventHandling.Event Event1;
// Flow
EventSource1 = EventHandling.MonitorChangeEventSource(Integer1);
parallel
{
lane
{
EventHandling.WaitForEvent({EventSource1}, Event1);
}
lane
{
EventHandling.Sleep(500);
Integer1 = 13;
}
}

Member Data Documentation

◆ _event

EventVariable OpenTestSystem.Otx.Extensions.EventHandling.Actions.WaitForEvent._event

Event that was triggered.

◆ source

EventSourceTerm [] OpenTestSystem.Otx.Extensions.EventHandling.Actions.WaitForEvent.source

One or more sources that can generate events.