Difference between revisions of "Extensions.EventHandling.WaitForEvent"
Jump to navigation
Jump to search
(Created page with "Category:EventHandling == Classification == {{ClassificationActivity | WaitForEvent | Wait until an event is triggered and then continues processing | Action| DiagCo...") |
|||
Line 3: | Line 3: | ||
{{ClassificationActivity | WaitForEvent | Wait until an event is triggered and then continues processing | [[Action]]| [[DiagCom|OTX DiagCom extension]] | [[EventHandling related actions]] | - | - }} | {{ClassificationActivity | WaitForEvent | Wait until an event is triggered and then continues processing | [[Action]]| [[DiagCom|OTX DiagCom extension]] | [[EventHandling related actions]] | - | - }} | ||
− | == | + | == OTL Syntax == |
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | WaitForEvent( | + | EventHandling.WaitForEvent(EventSourceTerm); |
</syntaxhighlight> | </syntaxhighlight> | ||
Line 20: | Line 20: | ||
|} | |} | ||
− | == Examples == | + | == OTL Examples == |
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | WaitForEvent( | + | Boolean Bool1 = false; |
+ | EventHandling.EventSource EventSource1; | ||
+ | |||
+ | EventSource1 = EventHandling.MonitorChangeEventSource(Bool1); | ||
+ | parallel | ||
+ | { | ||
+ | lane | ||
+ | { | ||
+ | Bool1 = true; | ||
+ | } | ||
+ | lane | ||
+ | { | ||
+ | EventHandling.WaitForEvent({EventSource1}, Event1); | ||
+ | } | ||
+ | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== See also == | == See also == | ||
[[CloseEventSource]] | [[CloseEventSource]] |
Revision as of 08:53, 6 February 2015
Classification
Name | WaitForEvent |
Short Description | Wait until an event is triggered and then continues processing |
Class | Action |
Extension | OTX DiagCom extension |
Group | EventHandling related actions |
Exceptions | - |
Checker Rules | - |
Standard Compliant | Yes |
OTL Syntax
EventHandling.WaitForEvent(EventSourceTerm);
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] | After an event is triggered, this variable contains the corresponding event. |
EventSource | EventSource | Term | - | [1] | One or more event sources. The order is insignificant. Once a source triggering an event, the waiting is ended. |
OTL Examples
Boolean Bool1 = false;
EventHandling.EventSource EventSource1;
EventSource1 = EventHandling.MonitorChangeEventSource(Bool1);
parallel
{
lane
{
Bool1 = true;
}
lane
{
EventHandling.WaitForEvent({EventSource1}, Event1);
}
}