org.mbari.siam.distributed
Class Port

java.lang.Object
  extended by org.mbari.siam.distributed.Port
All Implemented Interfaces:
java.io.Serializable

public class Port
extends java.lang.Object
implements java.io.Serializable

A Port represents a node's instrument communication port. Each Port has a name (e.g. "/dev/ttySX3"). Moreover, a Port may have an associated DeviceService; this associated DeviceService is characterized by a deviceID and a service mnemonic (e.g. "Seabird").

Author:
Tom O'Reilly
See Also:
Serialized Form

Field Summary
protected  long _deviceID
           
protected  boolean _hasPowerSwitch
           
protected  boolean _hasService
           
protected  byte[] _portName
           
protected  byte[] _serviceMnem
           
 
Constructor Summary
Port(byte[] portName)
          Create Port, with no service.
Port(byte[] portName, long deviceID, byte[] serviceMnem)
          Create Port, with deviceID and mnemonic.
 
Method Summary
 long getDeviceID()
          Get port service Device ID.
 byte[] getName()
          Get name of port.
 byte[] getServiceMnemonic()
          Get port service mnemonic.
 boolean hasPowerSwitch()
          True if port has associated power switch.
 boolean hasService()
          True if port has associated service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_portName

protected byte[] _portName

_serviceMnem

protected byte[] _serviceMnem

_deviceID

protected long _deviceID

_hasService

protected boolean _hasService

_hasPowerSwitch

protected boolean _hasPowerSwitch
Constructor Detail

Port

public Port(byte[] portName,
            long deviceID,
            byte[] serviceMnem)
Create Port, with deviceID and mnemonic.


Port

public Port(byte[] portName)
Create Port, with no service.

Method Detail

getName

public byte[] getName()
Get name of port.


getDeviceID

public long getDeviceID()
                 throws DeviceNotFound
Get port service Device ID.

Throws:
DeviceNotFound

getServiceMnemonic

public byte[] getServiceMnemonic()
                          throws DeviceNotFound
Get port service mnemonic.

Throws:
DeviceNotFound

hasService

public boolean hasService()
True if port has associated service.


hasPowerSwitch

public boolean hasPowerSwitch()
True if port has associated power switch.



Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.