Difference between revisions of "Extensions.EventHandling.MonitorChangeEventSource"
Jump to navigation
Jump to search
(Created page with "Category:EventHandling == Classification == {{ClassificationActivity | MonitorChangeEventSource | Create an event source for change event | Term | EventHandling|OTX...") |
|||
Line 3: | Line 3: | ||
{{ClassificationActivity | MonitorChangeEventSource | Create an event source for change event | [[Term]] | [[EventHandling|OTX EventHandling extension]] | [[Event source related terms]] | - | [[EventChk002|Event_Chk002]] }} | {{ClassificationActivity | MonitorChangeEventSource | Create an event source for change event | [[Term]] | [[EventHandling|OTX EventHandling extension]] | [[Event source related terms]] | - | [[EventChk002|Event_Chk002]] }} | ||
− | == | + | == OTL Syntax == |
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | + | EventSourceTerm = EventHandling.MonitorChangeEventSource(Variable); | |
</syntaxhighlight> | </syntaxhighlight> | ||
Line 21: | Line 21: | ||
|} | |} | ||
− | == Examples == | + | == OTL Examples == |
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | EventSource | + | Boolean Bool1 = false; |
+ | EventHandling.EventSource EventSource1; | ||
+ | EventHandling.Event Event1; | ||
+ | |||
+ | EventSource1 = EventHandling.MonitorChangeEventSource(Bool1); | ||
+ | |||
+ | parallel | ||
+ | { | ||
+ | lane | ||
+ | { | ||
+ | Bool1 = true; | ||
+ | } | ||
+ | lane | ||
+ | { | ||
+ | EventHandling.WaitForEvent({EventSource1}, Event1); | ||
+ | } | ||
+ | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 09:01, 6 February 2015
Contents
Classification
Name | MonitorChangeEventSource |
Short Description | Create an event source for change event |
Class | Term |
Extension | OTX EventHandling extension |
Group | Event source related terms |
Exceptions | - |
Checker Rules | Event_Chk002 |
Standard Compliant | Yes |
OTL Syntax
EventSourceTerm = EventHandling.MonitorChangeEventSource(Variable);
Description
The OTX MonitorChangeEventSource term creates an event source that monitors the value of a variable and an event triggers when the value changed. Event queue should start immediately as soon as the event source is created.
![]()
The case when a value to a previously uninitialized variable is assigned to count as a change event and make no mistake.
Return Value
The Term returns the value, see table below.
![]()
In OTX, Terms are categorized according to its return data type!
Data Type | Description |
EventSource | The EventSource, the changes in the value of a variable monitored. |
Properties
Name | Data Type | Class | Default | Cardinality | Description |
Variable | - | Variable | - | [1] | The variable which has to be monitored. |
OTL Examples
Boolean Bool1 = false;
EventHandling.EventSource EventSource1;
EventHandling.Event Event1;
EventSource1 = EventHandling.MonitorChangeEventSource(Bool1);
parallel
{
lane
{
Bool1 = true;
}
lane
{
EventHandling.WaitForEvent({EventSource1}, Event1);
}
}