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...") |
|||
(9 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | [[Category:EventHandling]] | + | {{DISPLAYTITLE: '''MonitorChangeEventSource '''}}[[Category:EventHandling]] |
== Classification == | == Classification == | ||
− | {{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]] | [[Extensions.EventHandling|OTX EventHandling extension]] | [[Extensions.EventHandling#Terms|Event source related terms]] | - | [[Extensions.EventHandling.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 variable); | |
</syntaxhighlight> | </syntaxhighlight> | ||
== Description == | == Description == | ||
− | The OTX '''MonitorChangeEventSource''' term creates an event source that | + | The OTX '''MonitorChangeEventSource''' term creates an event source that will monitor a variable's value and fire an event when it changes. The fired event will maintain a snapshot of the new value of the monitored variable, which may be read out later (see [[Extensions.EventHandling.GetNewValue|GetNewValue]] term). Event queueing will start immediately once the event source is created. |
− | {{ | + | {{Important|Change-monitoring will be shallow. This means that changes inside of complex values will NOT be recognized, like e.g. a change of an item in a List or Map, or the removal of items from a List or Map, etc. Regarding complex data types the only recognized change is when the variable changes its value, e.g. when another List is assigned to the variable.}} |
− | {{TermReturnValue| [[EventSource]] | '''The EventSource''', the changes in the value of a variable monitored.}} | + | {{Important|The case when a value is assigned to a formerly uninitialized variable will also be recognized as a change event and will NOT pose an error.}} |
+ | |||
+ | {{TermReturnValue| [[Extensions.EventHandling.EventSource|EventSource]] | '''The EventSource''', the changes in the value of a variable monitored.}} | ||
== Properties == | == Properties == | ||
{| {{TableHeader}} | {| {{TableHeader}} | ||
{{TableRowPropertiesHeader}} | {{TableRowPropertiesHeader}} | ||
− | {{ | + | {{TableRowPropertie2| Variable | - | [[Variable]] | - | [1] | Represents the variable that will be monitored.}} |
|} | |} | ||
− | == Examples == | + | == OTL Examples == |
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | EventSource | + | /// 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); | ||
+ | } | ||
+ | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== See also == | == See also == | ||
− | [[ThresholdExceededEventSource]] <br/> | + | [[Extensions.EventHandling.ThresholdExceededEventSource|ThresholdExceededEventSource]] <br/> |
− | [[TimerExpiredEventSource]] | + | [[Extensions.EventHandling.TimerExpiredEventSource|TimerExpiredEventSource]] |
Latest revision as of 10:36, 12 September 2019
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 variable);
Description
The OTX MonitorChangeEventSource term creates an event source that will monitor a variable's value and fire an event when it changes. The fired event will maintain a snapshot of the new value of the monitored variable, which may be read out later (see GetNewValue term). Event queueing will start immediately once the event source is created.
![]() |
Important: The case when a value is assigned to a formerly uninitialized variable will also be recognized as a change event and will 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 will 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);
}
}