Difference between revisions of "Extensions.Measure.IsDeviceEvent"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
{{DISPLAYTITLE:'''IsDeviceEvent '''}}[[Category:Measure]] | {{DISPLAYTITLE:'''IsDeviceEvent '''}}[[Category:Measure]] | ||
== Classification == | == Classification == | ||
− | {{ClassificationActivity | IsDeviceEvent | Checks whether the event originated from a '''DeviceEventSource''' term | [[Term]] | [[Extensions.Measure|OTX Measure extension]] | [[Event related terms]] | - | - }} | + | {{ClassificationActivity | IsDeviceEvent | Checks whether the event originated from a '''DeviceEventSource''' term or not.| [[Term]] | [[Extensions.Measure|OTX Measure extension]] | [[Extensions.Measure#Terms|Event related terms]] | - | - }} |
== OTL Syntax == | == OTL Syntax == | ||
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | BooleanTerm = Measure.IsDeviceEvent( | + | BooleanTerm = Measure.IsDeviceEvent(EventValue); |
</syntaxhighlight> | </syntaxhighlight> | ||
== Description == | == Description == | ||
− | The term | + | The '''IsDeviceEvent''' term shall return '''true''' if and only if the Event originates from a [[Extensions.Measure.DeviceEventSource|DeviceEventSource]] term. |
− | {{TermReturnValue| [[Core.DataTypes.SimpleDataType.Boolean|Boolean]] | This value is TRUE if if the event originated from a DeviceEventSource term. }} | + | {{TermReturnValue| [[Core.DataTypes.SimpleDataType.Boolean|Boolean]] | This value is TRUE if and only if the event originated from a '''DeviceEventSource''' term. }} |
== Properties == | == Properties == | ||
{| {{TableHeader}} | {| {{TableHeader}} | ||
{{TableRowPropertiesHeader}} | {{TableRowPropertiesHeader}} | ||
− | {{TableRowPropertie1| Event | [[Extensions.EventHandling.Event|Event]] | [[ | + | {{TableRowPropertie1| Event | [[Extensions.EventHandling.Event|Event]] | [[Value]] | - | [1] | Represents the '''Event''' whose type shall be tested.}} |
|} | |} | ||
== OTL Examples == | == OTL Examples == | ||
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | package Measure.DeviceSignature | + | /// Signatures |
+ | |||
+ | package Measure.DeviceSignature DeviceSignature1 | ||
{ | { | ||
− | + | Measure.DeviceServiceSignature Add(in Integer a, out Measure.Measurement Measurement); | |
} | } | ||
− | public procedure | + | /// Global Declarations |
+ | |||
+ | public procedure main() | ||
{ | { | ||
− | + | /// Local Declarations | |
− | + | ||
− | + | Measure.Measurement Measurement1; | |
− | + | Integer a1 = 10; | |
+ | EventHandling.EventSource EventSource1; | ||
+ | EventHandling.Event Event1; | ||
+ | Boolean Boolean1 = false; | ||
− | + | /// Flow | |
− | + | EventSource1 = Measure.DeviceEventSource(DeviceSignature1); | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | parallel | |
+ | { | ||
+ | lane | ||
+ | { | ||
+ | Measure.ExecuteDeviceService(DeviceSignature1, Add, {a = a1, Measurement = Measurement1}, false, false); | ||
+ | } | ||
+ | lane | ||
+ | { | ||
+ | EventHandling.WaitForEvent({EventSource1}, Event1); | ||
+ | } | ||
+ | } | ||
+ | Boolean1 = Measure.IsDeviceEvent(Event1); | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 08:50, 19 October 2018
Contents
Classification
Name | IsDeviceEvent |
Short Description | Checks whether the event originated from a DeviceEventSource term or not. |
Class | Term |
Extension | OTX Measure extension |
Group | Event related terms |
Exceptions | - |
Checker Rules | - |
Standard Compliant | Yes |
OTL Syntax
BooleanTerm = Measure.IsDeviceEvent(EventValue);
Description
The IsDeviceEvent term shall return true if and only if the Event originates from a DeviceEventSource term.
Return Value
The Term returns the value, see table below.
![]()
In OTX, Terms are categorized according to its return data type!
Data Type | Description |
Boolean | This value is TRUE if and only if the event originated from a DeviceEventSource term. |
Properties
Name | Data Type | Class | Default | Cardinality | Description |
Event | Event | Value | - | [1] | Represents the Event whose type shall be tested. |
OTL Examples
/// Signatures
package Measure.DeviceSignature DeviceSignature1
{
Measure.DeviceServiceSignature Add(in Integer a, out Measure.Measurement Measurement);
}
/// Global Declarations
public procedure main()
{
/// Local Declarations
Measure.Measurement Measurement1;
Integer a1 = 10;
EventHandling.EventSource EventSource1;
EventHandling.Event Event1;
Boolean Boolean1 = false;
/// Flow
EventSource1 = Measure.DeviceEventSource(DeviceSignature1);
parallel
{
lane
{
Measure.ExecuteDeviceService(DeviceSignature1, Add, {a = a1, Measurement = Measurement1}, false, false);
}
lane
{
EventHandling.WaitForEvent({EventSource1}, Event1);
}
}
Boolean1 = Measure.IsDeviceEvent(Event1);
}