Difference between revisions of "Extensions.EventHandling.GetNewValue"
Jump to navigation
Jump to search
(Created page with "Category:EventHandling == Classification == {{ClassificationActivity | GetNewValue | Return the value that was stored in the given event | Term | EventHandling|OTX E...") |
|||
Line 3: | Line 3: | ||
{{ClassificationActivity | GetNewValue | Return the value that was stored in the given event | [[Term]] | [[EventHandling|OTX EventHandling extension]] | [[Event source property related terms]] | [[TypeMismatchException]] | - }} | {{ClassificationActivity | GetNewValue | Return the value that was stored in the given event | [[Term]] | [[EventHandling|OTX EventHandling extension]] | [[Event source property related terms]] | [[TypeMismatchException]] | - }} | ||
− | == | + | == OTL Syntax == |
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | Variable GetNewValue( | + | Variable = EventHandling.GetNewValue(EventTerm); |
</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;"> | ||
− | + | EventHandling.Event Event1; | |
+ | String Variable1 = "String"; | ||
+ | String Result1; | ||
+ | EventHandling.EventSource EventSource1; | ||
+ | |||
+ | EventSource1 = EventHandling.MonitorChangeEventSource(Variable1); | ||
+ | |||
+ | parallel | ||
+ | { | ||
+ | lane | ||
+ | { | ||
+ | EventHandling.WaitForEvent({EventSource1}, Event1); | ||
+ | } | ||
+ | lane | ||
+ | { | ||
+ | Variable1 = "String changed"; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | Result1 = EventHandling.GetNewValue(Event1); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 09:38, 6 February 2015
Contents
Classification
Name | GetNewValue |
Short Description | Return the value that was stored in the given event |
Class | Term |
Extension | OTX EventHandling extension |
Group | Event source property related terms |
Exceptions | TypeMismatchException |
Checker Rules | - |
Standard Compliant | Yes |
OTL Syntax
Variable = EventHandling.GetNewValue(EventTerm);
Description
The OTX GetNewValue term applies only to events that are triggered by a monitor change event source or one of its descendants. The term is return the value that was stored in the given event. This value represents a snapshot of the new value of the monitored variables at the time when the event was triggered. The term is useful to find out what new value has a variable after it has changed.
Return Value
The Term returns the value, see table below.
![]()
In OTX, Terms are categorized according to its return data type!
Data Type | Description |
Variable | The value that was stored in the given event. |
Properties
Name | Data Type | Class | Default | Cardinality | Description |
Event | Event | Term | - | [1] | The monitor change event from which you want to return the new value of the formerly monitored variables at the time of the change in value. |
OTL Examples
EventHandling.Event Event1;
String Variable1 = "String";
String Result1;
EventHandling.EventSource EventSource1;
EventSource1 = EventHandling.MonitorChangeEventSource(Variable1);
parallel
{
lane
{
EventHandling.WaitForEvent({EventSource1}, Event1);
}
lane
{
Variable1 = "String changed";
}
}
Result1 = EventHandling.GetNewValue(Event1);
See also
IsTresholdExceededEvent
IsMonitorChangeEvent
IsTimerExpiredEvent