Extensions.EventHandling.WaitForEvent

From emotive
Revision as of 07:47, 26 September 2018 by Hb (talk | contribs) (→‎Properties)
Jump to navigation Jump to search

Classification

Name WaitForEvent
Short Description Wait until an event is triggered and then continues processing
Class Action
Extension OTX EventHandling extension
Group EventHandling related actions
Exceptions -
Checker Rules -
Standard Compliant Yes

OTL Syntax

EventHandling.WaitForEvent(EventSourceTerm, EventVariable);

Description

The OTX WaitForEvent activity blocks the current flow (thread) until a specified event sources has triggered an event. When an event is triggered, completed the WaitForEvent activity and the process continues with the next activity. The event that led to the termination of the activity can be evaluated using the Event property, see below.

Ending the waitforevent activity, all on-the-fly (ie on the corresponding event source term, see Property Source) event sources generated automatically.

Properties

Name Data Type Class Default Cardinality Description
Event Event Variable - [0..1] This optional element represents an Event-type variable which shall receive the event that terminates this wait.
Source EventSource Term - [1..*] This represents one or more event sources that the action shall wait for. The wait shall be terminated by the first source to fire an event.

OTL Examples

Boolean Bool1 = false;
EventHandling.EventSource EventSource1;

EventSource1 = EventHandling.MonitorChangeEventSource(Bool1);
parallel
{
   lane
   {
      Bool1 = true;
   }
   lane
   {
     EventHandling.WaitForEvent({EventSource1}, Event1);
   }
}

See also

CloseEventSource