Extensions.EventHandling.GetNewValue

From emotive
Revision as of 08:19, 31 July 2014 by Nb (talk | contribs) (Created page with "Category:EventHandling == Classification == {{ClassificationActivity | GetNewValue | Return the value that was stored in the given event | Term | EventHandling|OTX E...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

Pseudo-Code Syntax

Variable GetNewValue(Event myEvent);

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.

Icons Note.png Because of it the data type of the variable, the monitor change by event source depends was monitored, the return type is getNewValue usually not known at the authors. Therefore, type-safety of this term not be verified statically. Runtime exceptions can occur if the results of that term in the wrong place, for example when using. otx:ToInteger to a value that can not be converted to integer.

Return Value

The Term returns the value, see table below.

Icons Note.png 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.

Examples

Variable result = GetNewValue(myEvent);

See also

IsTresholdExceededEvent
IsMonitorChangeEvent
IsTimerExpiredEvent