Extensions.Measure.DeviceEventSource

From emotive
Jump to navigation Jump to search

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.

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

See also

IsDeviceEvent
GetDeviceServiceNameFromEvent