cdev.dir
Interface DeviceData


public interface DeviceData
extends DirectoryItem

Interface DeviceData for fixed data about accelerator devices. Included is information about related devices.

Some of the information for connecting to the device may be site-specific. The site-specific variable names can be obtained with getSpecialvariableNames and their instance values with getSpecialValue(variableName).

A DeviceData object can be obtained with DirectoryService#getDeviceData(deviceName).
An array of DeviceData objects in a devicelist can be obtained with DirectoryService#getDeviceData.

General documentation in DirectoryService .

See Also:
DeviceData, DeviceClass, DeviceList

Method Summary
 java.lang.String getClassName()
          Gets the name of the device class.
 DeviceClass getDeviceClass()
          Gets the device class object.
 java.lang.String[] getRelatedDevices(java.lang.String role)
          Gets array of names of related devices for the role.
 java.lang.String[] getRoles()
          Gets array of role names (prefix "~" for inverse role).
 java.lang.String getSpecialValue(java.lang.String specialVariableName)
          Gets value for an implementation-specific variable as a string.
 java.lang.String[] getSpecialVariableNames()
          Gets the names of implementation-specific variables.
 boolean isDefined(java.lang.String role)
          Returns true if this device has the role (prefix "~" for inverse role).
 boolean needCycleType()
          Return true when the device depends on the cycle type.
 
Methods inherited from interface cdev.dir.DirectoryItem
getDescription, getInfo, getInfoLines, getInfoWidth, getName, getServiceName, toString
 

Method Detail

getClassName

public java.lang.String getClassName()
Gets the name of the device class.

getDeviceClass

public DeviceClass getDeviceClass()
                           throws NoSuchDataException,
                                  BadConnectionException,
                                  TooManyValuesException
Gets the device class object.
Throws:
NoSuchDataException - -
BadConnectionException - -
TooManyValuesException - -

getRelatedDevices

public java.lang.String[] getRelatedDevices(java.lang.String role)
                                     throws NoSuchDataException,
                                            BadConnectionException
Gets array of names of related devices for the role.
Parameters:
role - the name of the role (may have prefix ~ for passive role).
Returns:
array of names of related devices; NoSuchDataException if none
Throws:
NoSuchDataException - -
BadConnectionException - -

getRoles

public java.lang.String[] getRoles()
                            throws NoSuchDataException,
                                   BadConnectionException
Gets array of role names (prefix "~" for inverse role). roleName is the active role of the device for a related device. ~roleName is when a related device has the active role for this device.
Returns:
array of role names (prefix "~" for inverse role);
Throws:
NoSuchDataException - -
BadConnectionException - -

getSpecialValue

public java.lang.String getSpecialValue(java.lang.String specialVariableName)
                                 throws NoSuchDataException,
                                        BadConnectionException
Gets value for an implementation-specific variable as a string. It is up to the application to know the type of the variable and do the proper conversion.
Parameters:
SpecialVariableName - the name of an application-specific variable.
Returns:
the value of the variable as a string
Throws:
BadConnectionException - -
NoSuchDataException - -

getSpecialVariableNames

public java.lang.String[] getSpecialVariableNames()
                                           throws NoSuchDataException,
                                                  BadConnectionException
Gets the names of implementation-specific variables. These variables often indicate how to access the device. They may be needed by the device I/O implementation.
Returns:
array of variable names; NoSuchDataException if none
Throws:
NoSuchDataException - -
BadConnectionException - -

isDefined

public boolean isDefined(java.lang.String role)
                  throws BadConnectionException
Returns true if this device has the role (prefix "~" for inverse role). roleName is the active role of the device for a related device. ~roleName is when a related device has the active role for this device.
Parameters:
role - the name of the role (may have prefix ~ for passive role).
Returns:
true if this device has the role
Throws:
BadConnectionException - -

needCycleType

public boolean needCycleType()
Return true when the device depends on the cycle type.