|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectgnu.io.CommPort
gnu.io.SerialPort
org.mbari.siam.core.nvt.NVTSerialPort
public class NVTSerialPort
Implements gnu.io.SerialPortInterface for NVT (RFC 2217) serial devices.
This class does not implement EventListeners or any of notifyXXX() methods that impact notification.
| Field Summary | |
|---|---|
protected NVTInputStream |
_inStream
|
protected int |
_ipPort
|
protected boolean |
_isOpen
|
protected static org.apache.log4j.Logger |
_log4j
Log4j logger |
protected NVTCom |
_nvtCom
|
protected NVTOutputStream |
_outStream
|
protected java.lang.String |
_serialPortName
|
protected java.lang.String |
_server
|
static int |
DEFAULT_PORT
|
| Fields inherited from class gnu.io.SerialPort |
|---|
DATABITS_5, DATABITS_6, DATABITS_7, DATABITS_8, FLOWCONTROL_NONE, FLOWCONTROL_RTSCTS_IN, FLOWCONTROL_RTSCTS_OUT, FLOWCONTROL_XONXOFF_IN, FLOWCONTROL_XONXOFF_OUT, PARITY_EVEN, PARITY_MARK, PARITY_NONE, PARITY_ODD, PARITY_SPACE, STOPBITS_1, STOPBITS_1_5, STOPBITS_2 |
| Fields inherited from class gnu.io.CommPort |
|---|
name |
| Constructor Summary | |
|---|---|
NVTSerialPort(java.lang.String name)
Constructor with default TCP Port |
|
NVTSerialPort(java.lang.String host,
int port)
Constructor with IP address and port |
|
| Method Summary | |
|---|---|
void |
addEventListener(gnu.io.SerialPortEventListener listener)
Not Implemented. |
void |
close()
Close the connection to the server |
void |
closeInputStream()
Close the associated InputStream. |
void |
closeOutputStream()
Close the associated OutputStream. |
void |
disableReceiveFraming()
Not Implemented |
void |
disableReceiveThreshold()
Not Implemented |
void |
disableReceiveTimeout()
Not Implemented |
void |
enableReceiveFraming(int f)
|
void |
enableReceiveThreshold(int threshold)
|
void |
enableReceiveTimeout(int time)
|
void |
flush()
Flush the OutputStream |
int |
getBaudBase()
|
int |
getBaudRate()
|
boolean |
getCallOutHangup()
|
int |
getDataBits()
|
int |
getDivisor()
|
byte |
getEndOfInputChar()
|
int |
getFlowControlMode()
|
int |
getInputBufferSize()
|
java.io.InputStream |
getInputStream()
Get the associated NVTInputStream |
boolean |
getLowLatency()
|
java.lang.String |
getName()
|
NVTCom |
getNVT()
Get the underlying NVTCom. |
int |
getOutputBufferSize()
|
java.io.OutputStream |
getOutputStream()
Get the associated NVTOutputStream |
int |
getParity()
|
byte |
getParityErrorChar()
|
int |
getReceiveFramingByte()
|
int |
getReceiveThreshold()
|
int |
getReceiveTimeout()
|
int |
getStopBits()
|
java.lang.String |
getUARTType()
|
boolean |
isCD()
|
boolean |
isCTS()
|
boolean |
isDSR()
|
boolean |
isDTR()
|
boolean |
isOpen()
|
boolean |
isReceiveFramingEnabled()
|
boolean |
isReceiveThresholdEnabled()
|
boolean |
isReceiveTimeoutEnabled()
|
boolean |
isRI()
|
boolean |
isRTS()
|
void |
notifyOnBreakInterrupt(boolean enable)
Not Implemented |
void |
notifyOnCarrierDetect(boolean enable)
Not Implemented |
void |
notifyOnCTS(boolean enable)
Not Implemented |
void |
notifyOnDataAvailable(boolean enable)
Not Implemented |
void |
notifyOnDSR(boolean enable)
Not Implemented |
void |
notifyOnFramingError(boolean enable)
Not Implemented |
void |
notifyOnOutputEmpty(boolean enable)
Not Implemented |
void |
notifyOnOverrunError(boolean enable)
Not Implemented |
void |
notifyOnParityError(boolean enable)
Not Implemented |
void |
notifyOnRingIndicator(boolean enable)
Not Implemented |
void |
open()
Open the NVTCom |
void |
removeEventListener()
Not Implemented |
void |
sendBreak(int duration)
Send BREAK for duration milliseconds |
boolean |
setBaudBase(int base)
|
boolean |
setCallOutHangup(boolean noHup)
|
boolean |
setDivisor(int divisor)
|
void |
setDTR(boolean state)
Turn on/off DTR line |
boolean |
setEndOfInputChar(byte b)
|
void |
setFlowControlMode(int flowcontrol)
|
void |
setInputBufferSize(int size)
Not Implemented |
boolean |
setLowLatency()
|
void |
setOutputBufferSize(int size)
Not Implemented |
boolean |
setParityErrorChar(byte b)
|
void |
setRTS(boolean state)
Turn on/off RTS line |
void |
setSerialPortParams(int baud,
int databits,
int stopbits,
int parity)
Set serial port baud, datasize, etc |
boolean |
setUARTType(java.lang.String type,
boolean test)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static org.apache.log4j.Logger _log4j
public static final int DEFAULT_PORT
protected NVTCom _nvtCom
protected java.lang.String _server
protected java.lang.String _serialPortName
protected int _ipPort
protected NVTInputStream _inStream
protected NVTOutputStream _outStream
protected boolean _isOpen
| Constructor Detail |
|---|
public NVTSerialPort(java.lang.String host,
int port)
host - Host name, either as DNS name ("focets4.mars.mbari.org") or
dotted quad ("134.89.42.127")port - TCP port to use.public NVTSerialPort(java.lang.String name)
| Method Detail |
|---|
public void open()
throws java.io.IOException,
java.net.UnknownHostException
java.io.IOException - if can't connect to server
java.net.UnknownHostExceptionpublic void close()
close in class gnu.io.CommPortpublic boolean isOpen()
public NVTCom getNVT()
throws java.io.IOException
java.io.IOExceptionpublic void closeInputStream()
public void closeOutputStream()
public void flush()
throws java.io.IOException
java.io.IOException
public java.io.InputStream getInputStream()
throws java.io.IOException
getInputStream in class gnu.io.CommPortjava.io.IOException
public java.io.OutputStream getOutputStream()
throws java.io.IOException
getOutputStream in class gnu.io.CommPortjava.io.IOExceptionpublic int getBaudRate()
getBaudRate in class gnu.io.SerialPortpublic int getDataBits()
getDataBits in class gnu.io.SerialPortpublic int getFlowControlMode()
getFlowControlMode in class gnu.io.SerialPortpublic int getParity()
getParity in class gnu.io.SerialPortpublic int getStopBits()
getStopBits in class gnu.io.SerialPortpublic boolean isCD()
isCD in class gnu.io.SerialPortpublic boolean isCTS()
isCTS in class gnu.io.SerialPortpublic boolean isDSR()
isDSR in class gnu.io.SerialPortpublic boolean isDTR()
isDTR in class gnu.io.SerialPortpublic boolean isRI()
isRI in class gnu.io.SerialPortpublic boolean isRTS()
isRTS in class gnu.io.SerialPort
public void addEventListener(gnu.io.SerialPortEventListener listener)
throws java.util.TooManyListenersException
addEventListener in class gnu.io.SerialPortjava.util.TooManyListenersExceptionpublic void removeEventListener()
removeEventListener in class gnu.io.SerialPortpublic void notifyOnBreakInterrupt(boolean enable)
notifyOnBreakInterrupt in class gnu.io.SerialPortpublic void notifyOnCarrierDetect(boolean enable)
notifyOnCarrierDetect in class gnu.io.SerialPortpublic void notifyOnCTS(boolean enable)
notifyOnCTS in class gnu.io.SerialPortpublic void notifyOnDataAvailable(boolean enable)
notifyOnDataAvailable in class gnu.io.SerialPortpublic void notifyOnDSR(boolean enable)
notifyOnDSR in class gnu.io.SerialPortpublic void notifyOnFramingError(boolean enable)
notifyOnFramingError in class gnu.io.SerialPortpublic void notifyOnOutputEmpty(boolean enable)
notifyOnOutputEmpty in class gnu.io.SerialPortpublic void notifyOnOverrunError(boolean enable)
notifyOnOverrunError in class gnu.io.SerialPortpublic void notifyOnParityError(boolean enable)
notifyOnParityError in class gnu.io.SerialPortpublic void notifyOnRingIndicator(boolean enable)
notifyOnRingIndicator in class gnu.io.SerialPortpublic void sendBreak(int duration)
sendBreak in class gnu.io.SerialPortpublic void setDTR(boolean state)
setDTR in class gnu.io.SerialPortpublic void setRTS(boolean state)
setRTS in class gnu.io.SerialPort
public void setSerialPortParams(int baud,
int databits,
int stopbits,
int parity)
setSerialPortParams in class gnu.io.SerialPort
public void setFlowControlMode(int flowcontrol)
throws gnu.io.UnsupportedCommOperationException
setFlowControlMode in class gnu.io.SerialPortgnu.io.UnsupportedCommOperationExceptionpublic java.lang.String getName()
getName in class gnu.io.CommPortpublic java.lang.String toString()
toString in class gnu.io.CommPortpublic void disableReceiveFraming()
disableReceiveFraming in class gnu.io.CommPortpublic void disableReceiveThreshold()
disableReceiveThreshold in class gnu.io.CommPortpublic void disableReceiveTimeout()
disableReceiveTimeout in class gnu.io.CommPortpublic void setInputBufferSize(int size)
setInputBufferSize in class gnu.io.CommPortpublic void setOutputBufferSize(int size)
setOutputBufferSize in class gnu.io.CommPort
public void enableReceiveFraming(int f)
throws gnu.io.UnsupportedCommOperationException
enableReceiveFraming in class gnu.io.CommPortgnu.io.UnsupportedCommOperationException
public void enableReceiveThreshold(int threshold)
throws gnu.io.UnsupportedCommOperationException
enableReceiveThreshold in class gnu.io.CommPortgnu.io.UnsupportedCommOperationException
public void enableReceiveTimeout(int time)
throws gnu.io.UnsupportedCommOperationException
enableReceiveTimeout in class gnu.io.CommPortgnu.io.UnsupportedCommOperationExceptionpublic int getInputBufferSize()
getInputBufferSize in class gnu.io.CommPortpublic int getOutputBufferSize()
getOutputBufferSize in class gnu.io.CommPortpublic int getReceiveFramingByte()
getReceiveFramingByte in class gnu.io.CommPortpublic int getReceiveThreshold()
getReceiveThreshold in class gnu.io.CommPortpublic int getReceiveTimeout()
getReceiveTimeout in class gnu.io.CommPortpublic boolean isReceiveFramingEnabled()
isReceiveFramingEnabled in class gnu.io.CommPortpublic boolean isReceiveThresholdEnabled()
isReceiveThresholdEnabled in class gnu.io.CommPortpublic boolean isReceiveTimeoutEnabled()
isReceiveTimeoutEnabled in class gnu.io.CommPort
public boolean getCallOutHangup()
throws gnu.io.UnsupportedCommOperationException
getCallOutHangup in class gnu.io.SerialPortgnu.io.UnsupportedCommOperationException
public boolean setCallOutHangup(boolean noHup)
throws gnu.io.UnsupportedCommOperationException
setCallOutHangup in class gnu.io.SerialPortgnu.io.UnsupportedCommOperationException
public int getBaudBase()
throws gnu.io.UnsupportedCommOperationException
getBaudBase in class gnu.io.SerialPortgnu.io.UnsupportedCommOperationException
public boolean setBaudBase(int base)
throws gnu.io.UnsupportedCommOperationException
setBaudBase in class gnu.io.SerialPortgnu.io.UnsupportedCommOperationException
public int getDivisor()
throws gnu.io.UnsupportedCommOperationException
getDivisor in class gnu.io.SerialPortgnu.io.UnsupportedCommOperationException
public boolean setDivisor(int divisor)
throws gnu.io.UnsupportedCommOperationException
setDivisor in class gnu.io.SerialPortgnu.io.UnsupportedCommOperationException
public byte getEndOfInputChar()
throws gnu.io.UnsupportedCommOperationException
getEndOfInputChar in class gnu.io.SerialPortgnu.io.UnsupportedCommOperationException
public boolean setEndOfInputChar(byte b)
throws gnu.io.UnsupportedCommOperationException
setEndOfInputChar in class gnu.io.SerialPortgnu.io.UnsupportedCommOperationException
public boolean getLowLatency()
throws gnu.io.UnsupportedCommOperationException
getLowLatency in class gnu.io.SerialPortgnu.io.UnsupportedCommOperationException
public boolean setLowLatency()
throws gnu.io.UnsupportedCommOperationException
setLowLatency in class gnu.io.SerialPortgnu.io.UnsupportedCommOperationException
public java.lang.String getUARTType()
throws gnu.io.UnsupportedCommOperationException
getUARTType in class gnu.io.SerialPortgnu.io.UnsupportedCommOperationException
public boolean setUARTType(java.lang.String type,
boolean test)
throws gnu.io.UnsupportedCommOperationException
setUARTType in class gnu.io.SerialPortgnu.io.UnsupportedCommOperationException
public byte getParityErrorChar()
throws gnu.io.UnsupportedCommOperationException
getParityErrorChar in class gnu.io.SerialPortgnu.io.UnsupportedCommOperationException
public boolean setParityErrorChar(byte b)
throws gnu.io.UnsupportedCommOperationException
setParityErrorChar in class gnu.io.SerialPortgnu.io.UnsupportedCommOperationException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||