org.mbari.siam.core
Class HttpInstrumentPort

java.lang.Object
  extended by org.mbari.siam.core.BaseInstrumentPort
      extended by org.mbari.siam.core.HttpInstrumentPort
All Implemented Interfaces:
InstrumentPort

public class HttpInstrumentPort
extends BaseInstrumentPort
implements InstrumentPort

InstrumentPort implementation for Web-based instruments with URL interface.


Nested Class Summary
 class HttpInstrumentPort.InputStream
          Input stream
 
Field Summary
protected  HttpInstrumentPort.InputStream _input
           
protected static org.apache.log4j.Logger _log4j
          Log4j logger
protected  java.lang.String _name
           
protected  InstrumentPortOutputStream _output
           
 
Fields inherited from class org.mbari.siam.core.BaseInstrumentPort
_powerPort
 
Fields inherited from interface org.mbari.siam.core.InstrumentPort
RTS_SENSE
 
Constructor Summary
HttpInstrumentPort(java.lang.String serverURLString, PowerPort powerPort)
           
 
Method Summary
 java.lang.String getCommPortName()
          get the name of the communications port
 java.io.InputStream getInputStream()
          get an InputStream to the instrument
 InstrumentConsole getInstrumentConsole()
          get a console to an Instrument
 InstrumentPortOutputStream getOutputStream()
          get an OutputStream to the instrument
 void initialize()
          initialize the InstrumentPort
 void resume()
          resumes instrument comms from suspended state
 void suspend()
          suspends comms so another application can communicate with the instrument
 
Methods inherited from class org.mbari.siam.core.BaseInstrumentPort
connectPower, disableCommunications, disconnectPower, enableCommunications, getCurrentLevel, getCurrentLimit, getStatusMessage, getStatusSummaryMessage, getTemperature, getTerseStatus, getVoltageLevel, isolatePort, isSuspended, resetStatus, setCommsMode, setCurrentLimit, shutDown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mbari.siam.core.InstrumentPort
connectPower, disableCommunications, disconnectPower, enableCommunications, getCurrentLevel, getCurrentLimit, getStatusMessage, getStatusSummaryMessage, getTerseStatus, getVoltageLevel, isolatePort, isSuspended, resetStatus, setCommsMode, setCurrentLimit, shutDown
 

Field Detail

_log4j

protected static org.apache.log4j.Logger _log4j
Log4j logger


_name

protected java.lang.String _name

_input

protected HttpInstrumentPort.InputStream _input

_output

protected InstrumentPortOutputStream _output
Constructor Detail

HttpInstrumentPort

public HttpInstrumentPort(java.lang.String serverURLString,
                          PowerPort powerPort)
                   throws java.net.MalformedURLException,
                          java.io.IOException
Throws:
java.net.MalformedURLException
java.io.IOException
Method Detail

initialize

public void initialize()
                throws InitializeException
initialize the InstrumentPort

Specified by:
initialize in interface InstrumentPort
Overrides:
initialize in class BaseInstrumentPort
Throws:
InitializeException

resume

public void resume()
resumes instrument comms from suspended state

Specified by:
resume in interface InstrumentPort

suspend

public void suspend()
suspends comms so another application can communicate with the instrument

Specified by:
suspend in interface InstrumentPort

getCommPortName

public java.lang.String getCommPortName()
get the name of the communications port

Specified by:
getCommPortName in interface InstrumentPort

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
get an InputStream to the instrument

Specified by:
getInputStream in interface InstrumentPort
Throws:
java.io.IOException

getOutputStream

public InstrumentPortOutputStream getOutputStream()
                                           throws java.io.IOException
get an OutputStream to the instrument

Specified by:
getOutputStream in interface InstrumentPort
Throws:
java.io.IOException

getInstrumentConsole

public InstrumentConsole getInstrumentConsole()
                                       throws java.io.IOException
get a console to an Instrument

Specified by:
getInstrumentConsole in interface InstrumentPort
Throws:
java.io.IOException


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.