|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.engidea.comm.CommPort
com.engidea.comm.SerialPort
com.engidea.win32jcom.WinjcomPort
public final class WinjcomPort
Field Summary |
---|
Fields inherited from class com.engidea.comm.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 com.engidea.comm.CommPort |
---|
portName |
Method Summary | |
---|---|
int |
available()
Return the number of bytes available on read. |
void |
close()
Close does not throw exception since there is no receovery from it. |
void |
disableReceiveFraming()
|
void |
disableReceiveThreshold()
|
void |
disableReceiveTimeout()
|
void |
enableReceiveFraming(int f)
|
void |
enableReceiveThreshold(int thresh)
|
void |
enableReceiveTimeout(int timeoutMilli)
|
void |
finalize()
Ideally the program MUST call close, but if it does not this is a chance to recover. |
void |
flush()
This THROWS AWAY any char that is in the input or output queue !!!! |
int |
getBaudRate()
|
int |
getDataBits()
|
int |
getFlowControlMode()
|
int |
getInputBufferSize()
|
int |
getOutputBufferSize()
|
int |
getParity()
|
int |
getReceiveFramingByte()
|
int |
getReceiveThreshold()
|
int |
getReceiveTimeout()
|
int |
getStopBits()
|
boolean |
isCD()
|
boolean |
isCTS()
|
boolean |
isDSR()
|
boolean |
isDTR()
|
boolean |
isReceiveFramingEnabled()
|
boolean |
isReceiveThresholdEnabled()
|
boolean |
isReceiveTimeoutEnabled()
|
boolean |
isRI()
|
boolean |
isRTS()
|
void |
notifyOnBreakInterrupt(boolean enable)
|
void |
notifyOnCarrierDetect(boolean enable)
|
void |
notifyOnCTS(boolean enable)
|
void |
notifyOnDataAvailable(boolean enable)
|
void |
notifyOnDSR(boolean enable)
|
void |
notifyOnFramingError(boolean enable)
|
void |
notifyOnOutputEmpty(boolean enable)
|
void |
notifyOnOverrunError(boolean enable)
|
void |
notifyOnParityError(boolean enable)
|
void |
notifyOnRingIndicator(boolean enable)
|
void |
open()
Opens the port to be used for work. |
int |
read(byte[] buff,
int offset,
int len)
Port instances are allowed to read less chars than requested at their wish. |
void |
sendBreak(int duration)
|
void |
setDTR(boolean state)
|
void |
setEventListener(SerialPortEventListener portListener)
Set the listener to be used, if null then it just clears the listener. |
void |
setFlowControlMode(int flowcontrol)
The param is one of FLOWCONTROL_ defined in SerialPort |
void |
setInputBufferSize(int size)
|
void |
setOutputBufferSize(int size)
|
void |
setRTS(boolean state)
|
void |
setSerialPortParams(int baudrate,
int databits,
int stopbits,
int parity)
|
java.lang.String |
toString()
What is probably useful is to have the port this driver is bound to. |
int |
write(byte[] buff,
int offset,
int len)
Port instances are allowed to write less chars than requested. |
Methods inherited from class com.engidea.comm.CommPort |
---|
getName |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public void open() throws java.io.IOException
open
in class CommPort
java.io.IOException
public void setSerialPortParams(int baudrate, int databits, int stopbits, int parity) throws java.io.IOException
setSerialPortParams
in class SerialPort
java.io.IOException
public int getBaudRate() throws java.io.IOException
getBaudRate
in class SerialPort
java.io.IOException
public int getDataBits() throws java.io.IOException
getDataBits
in class SerialPort
java.io.IOException
public int getStopBits() throws java.io.IOException
getStopBits
in class SerialPort
java.io.IOException
public int getParity() throws java.io.IOException
getParity
in class SerialPort
java.io.IOException
public int getFlowControlMode() throws java.io.IOException
getFlowControlMode
in class SerialPort
java.io.IOException
public void setFlowControlMode(int flowcontrol) throws java.io.IOException
setFlowControlMode
in class SerialPort
flowcontrol
-
java.io.IOException
public void enableReceiveFraming(int f) throws java.io.IOException
enableReceiveFraming
in class CommPort
java.io.IOException
public void disableReceiveFraming() throws java.io.IOException
disableReceiveFraming
in class CommPort
java.io.IOException
public boolean isReceiveFramingEnabled() throws java.io.IOException
isReceiveFramingEnabled
in class CommPort
java.io.IOException
public int getReceiveFramingByte() throws java.io.IOException
getReceiveFramingByte
in class CommPort
java.io.IOException
public void disableReceiveTimeout() throws java.io.IOException
disableReceiveTimeout
in class CommPort
java.io.IOException
public void enableReceiveTimeout(int timeoutMilli) throws java.io.IOException
enableReceiveTimeout
in class CommPort
java.io.IOException
public boolean isReceiveTimeoutEnabled() throws java.io.IOException
isReceiveTimeoutEnabled
in class CommPort
java.io.IOException
public int getReceiveTimeout() throws java.io.IOException
getReceiveTimeout
in class CommPort
java.io.IOException
public void enableReceiveThreshold(int thresh) throws java.io.IOException
enableReceiveThreshold
in class CommPort
java.io.IOException
public void disableReceiveThreshold() throws java.io.IOException
disableReceiveThreshold
in class CommPort
java.io.IOException
public int getReceiveThreshold() throws java.io.IOException
getReceiveThreshold
in class CommPort
java.io.IOException
public boolean isReceiveThresholdEnabled() throws java.io.IOException
isReceiveThresholdEnabled
in class CommPort
java.io.IOException
public void setInputBufferSize(int size) throws java.io.IOException
setInputBufferSize
in class CommPort
java.io.IOException
public int getInputBufferSize() throws java.io.IOException
getInputBufferSize
in class CommPort
java.io.IOException
public void setOutputBufferSize(int size) throws java.io.IOException
setOutputBufferSize
in class CommPort
java.io.IOException
public int getOutputBufferSize() throws java.io.IOException
getOutputBufferSize
in class CommPort
java.io.IOException
public boolean isDTR() throws java.io.IOException
isDTR
in class SerialPort
java.io.IOException
public void setDTR(boolean state) throws java.io.IOException
setDTR
in class SerialPort
java.io.IOException
public void setRTS(boolean state) throws java.io.IOException
setRTS
in class SerialPort
java.io.IOException
public void sendBreak(int duration) throws java.lang.InterruptedException, java.io.IOException
sendBreak
in class SerialPort
java.lang.InterruptedException
java.io.IOException
public boolean isCTS() throws java.io.IOException
isCTS
in class SerialPort
java.io.IOException
public boolean isDSR() throws java.io.IOException
isDSR
in class SerialPort
java.io.IOException
public boolean isCD() throws java.io.IOException
isCD
in class SerialPort
java.io.IOException
public boolean isRI() throws java.io.IOException
isRI
in class SerialPort
java.io.IOException
public boolean isRTS() throws java.io.IOException
isRTS
in class SerialPort
java.io.IOException
public void setEventListener(SerialPortEventListener portListener)
setEventListener
in class SerialPort
portListener
- public void notifyOnDataAvailable(boolean enable)
notifyOnDataAvailable
in class SerialPort
public void notifyOnOutputEmpty(boolean enable)
notifyOnOutputEmpty
in class SerialPort
public void notifyOnCTS(boolean enable)
notifyOnCTS
in class SerialPort
public void notifyOnDSR(boolean enable)
notifyOnDSR
in class SerialPort
public void notifyOnRingIndicator(boolean enable)
notifyOnRingIndicator
in class SerialPort
public void notifyOnCarrierDetect(boolean enable)
notifyOnCarrierDetect
in class SerialPort
public void notifyOnOverrunError(boolean enable)
notifyOnOverrunError
in class SerialPort
public void notifyOnParityError(boolean enable)
notifyOnParityError
in class SerialPort
public void notifyOnFramingError(boolean enable)
notifyOnFramingError
in class SerialPort
public void notifyOnBreakInterrupt(boolean enable)
notifyOnBreakInterrupt
in class SerialPort
public int write(byte[] buff, int offset, int len) throws java.io.IOException
CommPort
write
in class CommPort
java.io.IOException
public void flush() throws java.io.IOException
CommPort
flush
in class CommPort
java.io.IOException
public int read(byte[] buff, int offset, int len) throws java.io.IOException
CommPort
read
in class CommPort
java.io.IOException
public int available() throws java.io.IOException
CommPort
available
in class CommPort
java.io.IOException
public void close()
close
in class CommPort
public void finalize()
finalize
in class java.lang.Object
public java.lang.String toString()
toString
in class CommPort
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |