Difference between revisions of "Extensions.EventHandling.MonitorChangeEventSource"
Jump to navigation
Jump to search
Line 5: | Line 5: | ||
== OTL Syntax == | == OTL Syntax == | ||
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | + | /// Local Declarations | |
+ | EventHandling.EventSource EventSourceVariable; | ||
+ | /// Flow | ||
+ | EventSourceVariable = EventHandling.MonitorChangeEventSource(Variable); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 10:57, 24 October 2018
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
/// Local Declarations
EventHandling.EventSource EventSourceVariable;
/// Flow
EventSourceVariable = EventHandling.MonitorChangeEventSource(Variable);
Description
The OTX MonitorChangeEventSource term creates an event source that shall monitor a variable's value and fire an event when it changes. The fired event shall maintain a snapshot of the new value of the monitored variable, which may be read out later (see GetNewValue term). Event queueing shall start immediately once the event source is created.
![]() |
Important: The case when a value is assigned to a formerly uninitialized variable shall also be recognized as a change event and shall NOT pose an error. |
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] | Represents the variable that shall be monitored. |
OTL Examples
/// Local Declarations
Boolean Bool1 = false;
EventHandling.EventSource EventSource1;
EventHandling.Event Event1;
/// Flow
EventSource1 = EventHandling.MonitorChangeEventSource(Bool1);
parallel
{
lane
{
Bool1 = true;
}
lane
{
EventHandling.WaitForEvent({EventSource1}, Event1);
}
}