public interface IDeviceTypeTemplate
Note: The examples provided use the Jython syntax.
Modifier and Type | Method and Description |
---|---|
boolean |
doesSpecificationAttributeExist(String attribute)
Check if an specification attribute exists.
|
List<research.ch.cern.unicos.utilities.IDeviceInstance> |
getAllDeviceTypeInstances()
Method used to get a vector containing all the instances of the device type.
|
String |
getDescription()
Get the device type description as specified in the device type sheet.
|
research.ch.cern.unicos.utilities.IDeviceInstance |
getDeviceTypeInstance(int instanceNumber)
Method used to get a device type instance by its instance number.
|
String |
getDeviceTypeName()
Method used to get the device type name.
|
String |
getObjectType()
Method used to get the ObjectTypeFamily from the device type definition.
|
String |
getPackageName()
Method used to get the name of the package which the device belongs to (CPC, CRYO, ...).
|
List<research.ch.cern.unicos.utilities.ISpecificationAttribute> |
getSpecificationAttributes()
Get the list of specification attributes (e.g.: DeviceIdentification:Name, DeviceIdentification:Expert Name, ...)
|
List<research.ch.cern.unicos.utilities.IDeviceInstance> getAllDeviceTypeInstances()
Example: Display the name of all the DigitalInput instances.
# Get the DigitalInput device type diDeviceType = theUnicosProject.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"))
IDeviceInstance
,
IDeviceInstanceTemplate
research.ch.cern.unicos.utilities.IDeviceInstance getDeviceTypeInstance(int instanceNumber)
Example: Get the instance number 5 of the DigitalInput device type.
# Get the DigitalInput device type diDeviceType = theUnicosProject.getDeviceType("DigitalInput") # Get the DigitalInput instance number 5 diInstance = diDeviceType.getDeviceTypeInstance(5) # Display the name of the DigitalInput instance in the UAB log file (as a debug message) thePlugin.writeDebugInUABLog(diInstance.getAttributeData("DeviceIdentification:Name"))
instanceNumber
- The instance number.IDeviceInstance
,
IDeviceInstanceTemplate
String getDeviceTypeName()
String getPackageName()
String getObjectType()
String getDescription()
boolean doesSpecificationAttributeExist(String attribute)
attribute
- The attribute to check. E.g. "DeviceIdentification:Name"List<research.ch.cern.unicos.utilities.ISpecificationAttribute> getSpecificationAttributes()
Copyright © 2010–2020 CERN. All rights reserved.