public interface IDeviceInstanceTemplate
Note: The examples provided use the Jython syntax.
Modifier and Type | Method and Description |
---|---|
boolean |
doesSpecificationAttributeExist(String attribute)
Check if an specification attribute exists.
|
String |
getAttributeData(String theAttributeIdentifier)
Returns the data associated with the instance attribute.
|
research.ch.cern.unicos.utilities.IDeviceType |
getDeviceType()
Method used to get the device type of the current instance.
|
String |
getDeviceTypeName()
Method used to get the device type name of the current instance.
|
int |
getInstanceNumber()
Get the number of the current instance as defined in the specifications file.
|
research.ch.cern.unicos.utilities.IDeviceType getDeviceType()
IDeviceTypeTemplate
,
IDeviceType
String getDeviceTypeName()
IDeviceTypeTemplate
,
IDeviceType
int getInstanceNumber()
boolean doesSpecificationAttributeExist(String attribute)
attribute
- The attribute to check. E.g. "DeviceIdentification:Name"String getAttributeData(String theAttributeIdentifier)
Example: Display the name of all the DigitalInput instances.
# Get the DigitalInput device type diDeviceType = theRawInstances.getDeviceType("DigitalInput") # Get a vector with all the DigitalInput instances diInstances = diDeviceType.getAllDeviceTypeInstances() # Display the name of all the DigitalInput instances in the UAB log file (as a debug message) for instance in diInstances: thePlugin.writeDebugInUABLog(instance.getAttributeData("DeviceIdentification:Name"))
theAttributeIdentifier
- The instance attribute (e.g. DeviceIdentification:Name")Copyright © 2010–2020 CERN. All rights reserved.