Classification
Name |
GetDeviceServiceNameFromEvent
|
Short Description |
Returns a string that contains the name of the device and services
|
Class |
Term
|
Extension |
OTX Measure extension
|
Group |
Event related terms
|
Exceptions |
-
|
Checker Rules |
-
|
Standard Compliant |
Yes
|
OTL Syntax
StringTerm = Measure.GetDeviceServiceNameFromEvent(EventTerm);
Description
An event object accepts the GetDeviceServiceNameFromEvent term and returns a string that contains the device - and service name of the device and the service, which caused the event. By using this term can wait a sequence of OTX for an event from a device when receiving a new result and then decide which service of the device caused the event.
The string value that is returned will consist of two parts: "devicename.ServiceName", where devicename and servicename is the name as specified by the corresponding DeviceSignature has.
Return Value
The Term returns the value, see table below.
|
|
In OTX, Terms are categorized according to its return data type!
|
Data Type |
Description
|
String |
The string that contains the name of the device and services.
|
Properties
Name |
Data Type |
Class |
Default |
Cardinality |
Description
|
Event |
Event |
Term |
- |
[1] |
The event that is raised after the execution of a device services.
|
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;
String DeviceName;
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);
}
}
DeviceName = Measure.GetDeviceServiceNameFromEvent(Event);
}
See also
DeviceEventSource
IsDeviceEvent