Difference between revisions of "Extensions.Measure.DeviceEventSource"
Jump to navigation
Jump to search
(5 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:'''DeviceEventSource '''}}[[Category:Measure]] | {{DISPLAYTITLE:'''DeviceEventSource '''}}[[Category:Measure]] | ||
== Classification == | == Classification == | ||
− | {{ClassificationActivity | DeviceEventSource | | + | {{ClassificationActivity | DeviceEventSource | Enables an OTX sequence to use a measurement device as a source for events | [[Term]] | [[Extensions.Measure|OTX Measure extension]] | [[Extensions.Measure#Terms|Event related terms]] | - | [[Extensions.Measure.MeasureChk001|Measure_Chk001]] }} |
== OTL Syntax == | == OTL Syntax == | ||
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | EventSourceTerm | + | EventSourceTerm Measure.DeviceEventSource(OtxLink device); |
</syntaxhighlight> | </syntaxhighlight> | ||
== Description == | == Description == | ||
− | The '''DeviceEventSource''' term | + | The '''DeviceEventSource''' term accepts a link to a '''DeviceSignature''' of a device that is to be made an event source. This term enables an OTX sequence to use a measurement device as a source for events in the context of the [[Extensions.EventHandling|OTX EventHandling]] extension. A measurement device (driver) will trigger an event every time a new output parameter from one of its services has arrived. |
{{TermReturnValue| [[Extensions.EventHandling.EventSource|EventSource]] | EventSource from a measurement. }} | {{TermReturnValue| [[Extensions.EventHandling.EventSource|EventSource]] | EventSource from a measurement. }} | ||
Line 16: | Line 16: | ||
{| {{TableHeader}} | {| {{TableHeader}} | ||
{{TableRowPropertiesHeader}} | {{TableRowPropertiesHeader}} | ||
− | {{ | + | {{TableRowPropertie2| Device | [[OtxLink]] | - | - | [1] | Represents the to-be-monitored device. If an output parameter of an earlier triggered device service becomes available, the event will be fired, causing an embedding '''event:WaitForEventAction''' to exit.}} |
|} | |} | ||
== 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; | ||
+ | |||
+ | /// Flow | ||
− | + | EventSource1 = Measure.DeviceEventSource(DeviceSignature1); | |
+ | Measure.ExecuteDeviceService(DeviceSignature1, Add, {a = a1, Measurement = Measurement1}, false, false); | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> |
Latest revision as of 02:54, 13 September 2019
Contents
Classification
Name | DeviceEventSource |
Short Description | Enables an OTX sequence to use a measurement device as a source for events |
Class | Term |
Extension | OTX Measure extension |
Group | Event related terms |
Exceptions | - |
Checker Rules | Measure_Chk001 |
Standard Compliant | Yes |
OTL Syntax
EventSourceTerm Measure.DeviceEventSource(OtxLink device);
Description
The DeviceEventSource term accepts a link to a DeviceSignature of a device that is to be made an event source. This term enables an OTX sequence to use a measurement device as a source for events in the context of the OTX EventHandling extension. A measurement device (driver) will trigger an event every time a new output parameter from one of its services has arrived.
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 | EventSource from a measurement. |
Properties
Name | Data Type | Class | Default | Cardinality | Description |
Device | OtxLink | - | - | [1] | Represents the to-be-monitored device. If an output parameter of an earlier triggered device service becomes available, the event will be fired, causing an embedding event:WaitForEventAction to exit. |
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;
/// Flow
EventSource1 = Measure.DeviceEventSource(DeviceSignature1);
Measure.ExecuteDeviceService(DeviceSignature1, Add, {a = a1, Measurement = Measurement1}, false, false);
}