cdev.dir
Interface DeviceList


public interface DeviceList
extends DirectoryItem

Interface DeviceList for a list of DeviceData for generic programs. This list tells the application program what devices it should work on.
The DeviceData objects in the list are devided in groups identified by a sequential number starting from 0.

A DeviceList object is identified by a name, which must be unique for the implementation, or by a query.
An array of all devicelist names can be obtained with DirectoryService#getDeviceListNames().
An array of selected devicelist names can be obtained with DirectoryService#getDeviceListNames(query).

A 'hand-made' DeviceList object can be obtained with DirectoryService#getDeviceListByName(listName).
An 'on-the-fly' DeviceList object can be obtained with DirectoryService#getDeviceListByQuery(query).

General documentation in DirectoryService .

See Also:
DeviceData, DeviceClass

Method Summary
 java.lang.String[] getClassNames()
          Gets the array of distinct class names in the device list.
 java.lang.String[] getClassNames(int n)
          Gets the array of distinct class names for group n.
 int getDeviceCount()
          Gets the number of devices in the device list.
 int getDeviceCount(int n)
          Gets the number of devices in group n of the device list.
 DeviceData[] getDeviceData()
          Gets the DeviceData array.
 DeviceData[] getDeviceData(int n)
          Gets the array of DeviceData objects for group n.
 java.lang.String[] getDeviceNames()
          Gets the array of device names in the device list.
 java.lang.String[] getDeviceNames(int n)
          Gets the array of device names for group n.
 int getGroupCount()
          Gets the number of groups in the device list.
 
Methods inherited from interface cdev.dir.DirectoryItem
getDescription, getInfo, getInfoLines, getInfoWidth, getName, getServiceName, toString
 

Method Detail

getDeviceCount

public int getDeviceCount()
Gets the number of devices in the device list.
Returns:
the device count

getDeviceCount

public int getDeviceCount(int n)
                   throws BadQueryException
Gets the number of devices in group n of the device list.
Parameters:
n - group number (from 0)
Returns:
device count (BadQueryException if not in [0..getGroupCount()-1])
Throws:
BadQueryException - -

getGroupCount

public int getGroupCount()
Gets the number of groups in the device list.
Returns:
the number of device groups

getDeviceData

public DeviceData[] getDeviceData()
Gets the DeviceData array.
Returns:
the DeviceData object array

getClassNames

public java.lang.String[] getClassNames()
Gets the array of distinct class names in the device list.
Returns:
array of class names

getDeviceNames

public java.lang.String[] getDeviceNames()
Gets the array of device names in the device list.
Returns:
array of device names

getDeviceData

public DeviceData[] getDeviceData(int n)
                           throws BadQueryException
Gets the array of DeviceData objects for group n.
Parameters:
n - the group sequence number [0..getGroupCount()-1]
Returns:
array of DeviceData objects (BadQueryException if n out of range)
Throws:
BadQueryException - -

getDeviceNames

public java.lang.String[] getDeviceNames(int n)
                                  throws BadQueryException
Gets the array of device names for group n.
Parameters:
n - the group sequence number [0..getGroupCount()-1]
Returns:
array of device names (BadQueryException if n out of range)
Throws:
BadQueryException - -

getClassNames

public java.lang.String[] getClassNames(int n)
                                 throws BadQueryException
Gets the array of distinct class names for group n.
Parameters:
n - the group sequence number [0..getGroupCount()-1]
Returns:
array of class names (BadQueryException if n out of range)
Throws:
BadQueryException - -