Extensions.Measure.IsDeviceEvent

From emotive
Revision as of 02:41, 16 February 2016 by Hb (talk | contribs)
Jump to navigation Jump to search

Classification

Name IsDeviceEvent
Short Description Checks whether the event originated from a DeviceEventSource term
Class Term
Extension OTX Measure extension
Group Event related terms
Exceptions -
Checker Rules -
Standard Compliant Yes

OTL Syntax

BooleanTerm = Measure.IsDeviceEvent(EventTerm);

Description

The term will return TRUE if if the event originated from a DeviceEventSource term.

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
Boolean This value is TRUE if if the event originated from a DeviceEventSource term.

Properties

Name Data Type Class Default Cardinality Description
Event Event Term - [1] The event, whose Type is checked.

OTL Examples

package Measure.DeviceSignature TestDocument
{
   DeviceServiceSignature Addition(in Integer a, in Integer b, out Measure.Measurement OutValue);
}

public procedure IsDeviceEvent()
{
   EventHandling.EventSource EventSource;
   Measure.Measurement Addition_Return;
   EventHandling.Event Event;
   Boolean IsDeviceEvent = false;

   EventSource = Measure.DeviceEventSource(TestDocument);

   parallel
   {
      lane
      {
         EventHandling.WaitForEvent({EventSource}, Event);
      }
      lane
      {
	 Measure.ExecuteDeviceService(TestDocument, Addition, {in a = 2, in b = 3, out OutValue = Addition_Return}, false, false);
      }
   }

   IsDeviceEvent = Measure.IsDeviceEvent(Event);
}

See also

DeviceEventSource
GetDeviceServiceNameFromEvent