Difference between revisions of "Extensions.Measure.DeviceEventSource"

From emotive
Jump to navigation Jump to search
Line 1: Line 1:
 
{{DISPLAYTITLE:'''DeviceEventSource '''}}[[Category:Measure]]
 
{{DISPLAYTITLE:'''DeviceEventSource '''}}[[Category:Measure]]
 
== Classification ==
 
== Classification ==
{{ClassificationActivity | DeviceEventSource | Measuring device used as a source for events | [[Term]] | [[Extensions.Measure|OTX Measure extension]] | [[Event related terms]] | - | [[Extensions.Measure.MeasureChk001|Measure_Chk001]] }}
+
{{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 = Measure.DeviceEventSource(Device);
+
EventSourceTerm = Measure.DeviceEventSource(OtxLink);
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
== Description ==
 
== Description ==
The '''DeviceEventSource''' term is a link to a '''DeviceSignature''', a device that is made to an event source. This term provides a sequence of OTX using a measuring as a source for the events related to the OTX [[Extensions.EventHandling|EventHandling]] library. A measurement will trigger an event when a new output parameters from one of its services has arrived.
+
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) shall 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}}
{{TableRowPropertie1| Device | - | [[OtxLink]] | - | [1] | The attribute represents a reference that refers to a device that is monitored.}}
+
{{TableRowPropertie2| Device | - | [[OtxLink]] | - | [1] | Represents the to-be-monitored device. If an output parameter of an earlier triggered device service becomes available, the event shall 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 TestDocument
+
/// Signatures
 +
 
 +
package Measure.DeviceSignature DeviceSignature1
 
{
 
{
  DeviceServiceSignature Addition(in Integer a, in Integer b, out Measure.Measurement OutValue);
+
Measure.DeviceServiceSignature Add(in Integer a, out Measure.Measurement Measurement);
 
}
 
}
  
public procedure DeviceEventSource()
+
/// Global Declarations
 +
 
 +
public procedure main()
 
{
 
{
  EventHandling.EventSource EventSource;
+
/// Local Declarations
 +
 
 +
Measure.Measurement Measurement1;
 +
Integer a1 = 10;
 +
EventHandling.EventSource EventSource1;
 +
 
 +
/// Flow
  
  EventSource = Measure.DeviceEventSource(TestDocument);
+
Measure.ExecuteDeviceService(DeviceSignature1, Add, {a = a1, Measurement = Measurement1}, false, false);
 +
EventSource1 = Measure.DeviceEventSource(DeviceSignature1);
 
}
 
}
 
</syntaxhighlight>
 
</syntaxhighlight>

Revision as of 08:41, 19 October 2018

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);

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) shall 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.

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

	Measure.ExecuteDeviceService(DeviceSignature1, Add, {a = a1, Measurement = Measurement1}, false, false);
	EventSource1 = Measure.DeviceEventSource(DeviceSignature1);
}

See also

IsDeviceEvent
GetDeviceServiceNameFromEvent