org.mbari.siam.distributed.platform
Class PuckUtils

java.lang.Object
  extended by org.mbari.siam.distributed.platform.PuckUtils

public class PuckUtils
extends java.lang.Object

The PuckUtils class provides various methods to manipulate the puck such as erasing the non volitale memory and putting it into pass through mode.


Constructor Summary
PuckUtils(java.io.InputStream in, java.io.OutputStream out)
          Creates a PuckUtils objetc by using an intput and output stream to a device that implements the pucks serial protocol.
PuckUtils(gnu.io.SerialPort serial_port)
          Creates a PuckUtils object by using a SerialPort object to a device that supports the pucks serial protocol.
 
Method Summary
 void erasePuck()
          Erases pucks non-volatile memory.
 java.lang.String getPuckHeader(int entry)
          Returns a puck header entry.
 boolean initPuckUtils()
          This method is used to synchronize communications with the puck.
 void puckOut()
          Places the puck into pass through mode.
 void setPuckHeader(int entry, java.lang.String val)
          Sets a puck header entry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PuckUtils

public PuckUtils(java.io.InputStream in,
                 java.io.OutputStream out)
Creates a PuckUtils objetc by using an intput and output stream to a device that implements the pucks serial protocol.


PuckUtils

public PuckUtils(gnu.io.SerialPort serial_port)
Creates a PuckUtils object by using a SerialPort object to a device that supports the pucks serial protocol.

Method Detail

getPuckHeader

public java.lang.String getPuckHeader(int entry)
                               throws java.io.IOException
Returns a puck header entry. Puck header entries are strings that can be used by a host to describe the contents of the pucks non-volatile memory.

Throws:
java.io.IOException

setPuckHeader

public void setPuckHeader(int entry,
                          java.lang.String val)
                   throws java.io.IOException
Sets a puck header entry. Puck header entries are strings that can be used by a host to describe the contents of the pucks non-volatile memory.

Throws:
java.io.IOException

erasePuck

public void erasePuck()
               throws java.io.IOException
Erases pucks non-volatile memory. The erasePuck method erases all of the pucks headers as well was all of the pucks bulk non-volatile storage.

Throws:
java.io.IOException

puckOut

public void puckOut()
             throws java.io.IOException
Places the puck into pass through mode. When the puckOut method is called the serial connection is handed over to the instrument.

Throws:
java.io.IOException

initPuckUtils

public boolean initPuckUtils()
This method is used to synchronize communications with the puck. Though called by the constructor when the utility object is created it may be necessary to call this method if a puck was not attached when the utility object was created. When this method is called after the utility object has been created it will try to synchronize communications with the puck.



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.