dLife Home Page

dlife.vision.server
Class VisionServerDeviceList

java.lang.Object
  extended by dlife.sys.SerializationBase
      extended by dlife.vision.server.VisionServerDeviceList
All Implemented Interfaces:
Serializable

public class VisionServerDeviceList
extends SerializationBase

A VisionServerDeviceList is a useful object for storing device information about video devices on a given VisionServer. This object is also serialized and sent across the TCP connection in the VisionServer.

Version:
June 25, 2010
Author:
Russell Toris, Dickinson College
See Also:
Serialized Form

Constructor Summary
VisionServerDeviceList()
          Create a new, empty VisionServerDeviceList.
 
Method Summary
 void addDevice(String deviceFile)
          Add the device with the given device file name.
 void addInput(String deviceFile, String inputName, int inputNumber)
          Add an input with the given name and given index number to a specific device.
 void addStandard(String deviceFile, String inputName, int inputNumber, String standard)
          Add a standard to a given input for a given device.
 boolean containsDevice(String deviceFile)
          Check if a device with the given device file exits in the list
 boolean containsInput(String deviceFile, String inputName)
          Checks if the given input name exits for the given device.
 boolean containsStandard(String deviceFile, String inputName, String standard)
          Checks if the given standard exits for the given input on the given device.
 String[] getDeviceFiles()
          Get an array of all the device file names in the list.
 int getInputIndex(String deviceFile, String inputName)
          Get the input index number for a specified input on a given device.
 String[] getInputNames(String deviceFile)
          Get the names of all the inputs for a specified device.
 String[] getStandards(String deviceFile, String inputName)
          Get a list of standards for a given input on a given device.
 
Methods inherited from class dlife.sys.SerializationBase
read, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VisionServerDeviceList

public VisionServerDeviceList()
Create a new, empty VisionServerDeviceList.

Method Detail

addDevice

public void addDevice(String deviceFile)
Add the device with the given device file name. If a device with that name already exists, no changes are made to the list.

Parameters:
deviceFile - the name of the device file to add

addInput

public void addInput(String deviceFile,
                     String inputName,
                     int inputNumber)
Add an input with the given name and given index number to a specific device. If the device does not already exits, it will be added to the list. If it does, the input is added to that device's list of inputs. If an input with the given name and index number already exists for that device, no changes are made.

Parameters:
deviceFile - the name of the device this input belongs to
inputName - the name of the input
inputNumber - the index number of that input for the given device

addStandard

public void addStandard(String deviceFile,
                        String inputName,
                        int inputNumber,
                        String standard)
Add a standard to a given input for a given device. If the specified device and/or input do not exist yet, entries are made for them. Otherwise the standard is added to the list for that input on that device. If the standard already exists on a given input for a given device, no changes are made.

Parameters:
deviceFile - he name of the device the input and standard belong to
inputName - the name of the input
inputNumber - the index number of that input for the given device
standard - the name of the standard for that input on that device

containsDevice

public boolean containsDevice(String deviceFile)
Check if a device with the given device file exits in the list

Parameters:
deviceFile - the name of the device to check for
Returns:
if that device is in the list

containsInput

public boolean containsInput(String deviceFile,
                             String inputName)
Checks if the given input name exits for the given device.

Parameters:
deviceFile - the name of the device to check for
inputName - the name of the input to check for
Returns:
if the given input name exits for the given device

containsStandard

public boolean containsStandard(String deviceFile,
                                String inputName,
                                String standard)
Checks if the given standard exits for the given input on the given device.

Parameters:
deviceFile - the name of the device to check for
inputName - the name of the input to check for
standard - the name of the standard to check for
Returns:
if the given standard exists for the given input on a given device

getDeviceFiles

public String[] getDeviceFiles()
Get an array of all the device file names in the list. If the list is empty, null is returned.

Returns:
all the device file names in the list

getInputNames

public String[] getInputNames(String deviceFile)
Get the names of all the inputs for a specified device. If the device name does not exist in the list, null is returned.

Parameters:
deviceFile - the device file name to get the inputs for
Returns:
the names of all the inputs for a specified device

getInputIndex

public int getInputIndex(String deviceFile,
                         String inputName)
Get the input index number for a specified input on a given device. If the input does not exist on that device, or if the device does not exist, -1 is returned.

Parameters:
deviceFile - the name of the device file the input belongs to
inputName - the name of the input
Returns:
the index number for that input on the given device

getStandards

public String[] getStandards(String deviceFile,
                             String inputName)
Get a list of standards for a given input on a given device. If the input does not exist on that device, or if the device does not exist, null is returned.

Parameters:
deviceFile - the name of the device file the input belongs to
inputName - the name of the input
Returns:
a list of standards for a given input on a given device

dLife Home Page