public class GenericWinSerialPortSocket extends AbstractSerialPortSocket
SerialPortSocket.SerialPortSocketFactoryis, LOG, os, SPSW_PROPERTIESFACTORY| Constructor and Description |
|---|
GenericWinSerialPortSocket(String portName) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
close0()
Close port
|
protected int |
getBaudrate0() |
protected int |
getDataBits0() |
protected int |
getFlowControl0() |
int |
getInBufferBytesCount()
Get bytes count in in buffer of port
|
int |
getOutBufferBytesCount()
Get bytes count out inbuffer of port
|
protected int |
getParity0() |
protected int |
getStopBits0() |
char |
getXOFFChar() |
char |
getXONChar() |
boolean |
isCTS() |
boolean |
isDSR() |
boolean |
isIncommingRI() |
protected void |
open(String portName,
int type)
Open port
|
protected int |
readBytes(byte[] b,
int off,
int len)
Read data from port
|
protected int |
readSingle() |
void |
sendXOFF() |
void |
sendXON() |
protected void |
setBaudrate(int baudRate) |
void |
setBreak(boolean value)
Set Break singnal
|
protected void |
setDataBits(int value) |
void |
setDTR(boolean value)
Change DTR line state
|
protected void |
setFlowControl(int mask) |
protected void |
setParity(int parity) |
void |
setRTS(boolean value)
Change RTS line state
|
protected void |
setStopBits(int value) |
void |
setXOFFChar(char c) |
void |
setXONChar(char c) |
protected void |
writeBytes(byte[] b,
int off,
int len)
Write data to port
|
protected void |
writeSingle(int b) |
close, finalize, getArch, getBaudrate, getDatatBits, getFlowControl, getInputStream, getLibName, getOsName, getOutputStream, getParity, getPortName, getStopBits, isClosed, isLibLoaded, isOpen, loadNativeLib, openAsIs, openModem, openRaw, openRaw, openTerminal, setBaudrate, setDataBits, setFlowControl, setParity, setStopBits, toString, yesIhaveLoadedTheNativeLibMyselfpublic GenericWinSerialPortSocket(String portName)
protected void open(String portName, int type) throws IOException
AbstractSerialPortSocketopen in class AbstractSerialPortSocketportName - name of port for openingIOExceptionprotected void close0()
throws IOException
close0 in class AbstractSerialPortSocketIOExceptionpublic boolean isCTS()
public boolean isDSR()
public boolean isIncommingRI()
public void setRTS(boolean value)
throws IOException
SerialPortSocketvalue - true - ON, false - OFFIOExceptionpublic void setDTR(boolean value)
throws IOException
SerialPortSocketvalue - true - ON, false - OFFIOExceptionpublic void sendXON()
throws IOException
IOExceptionpublic void sendXOFF()
throws IOException
IOExceptionpublic void setXONChar(char c)
throws IOException
IOExceptionpublic void setXOFFChar(char c)
throws IOException
IOExceptionprotected int readSingle()
throws IOException
readSingle in class AbstractSerialPortSocketIOExceptionprotected int readBytes(byte[] b,
int off,
int len)
throws IOException
readBytes in class AbstractSerialPortSocketb - the data to be writtenoff - the start offset in the datalen - the number of bytes that are writtenIOException - If an I/O error has occurred.protected void writeSingle(int b)
throws IOException
writeSingle in class AbstractSerialPortSocketIOExceptionprotected void writeBytes(byte[] b,
int off,
int len)
throws IOException
writeBytes in class AbstractSerialPortSocketoff - the start offset in the data.len - the number of bytes to write.IOExceptionpublic int getInBufferBytesCount()
throws IOException
SerialPortSocketIOExceptionpublic int getOutBufferBytesCount()
throws IOException
SerialPortSocketIOExceptionprotected void setFlowControl(int mask)
throws IOException
setFlowControl in class AbstractSerialPortSocketIOExceptionprotected int getFlowControl0()
throws IOException
getFlowControl0 in class AbstractSerialPortSocketIOExceptionpublic void setBreak(boolean value)
throws IOException
SerialPortSocketvalue - the valueIOExceptionprotected void setBaudrate(int baudRate)
throws IOException
setBaudrate in class AbstractSerialPortSocketIOExceptionprotected void setDataBits(int value)
throws IOException
setDataBits in class AbstractSerialPortSocketIOExceptionprotected void setStopBits(int value)
throws IOException
setStopBits in class AbstractSerialPortSocketIOExceptionprotected void setParity(int parity)
throws IOException
setParity in class AbstractSerialPortSocketIOExceptionprotected int getBaudrate0()
throws IOException
getBaudrate0 in class AbstractSerialPortSocketIOExceptionprotected int getDataBits0()
throws IOException
getDataBits0 in class AbstractSerialPortSocketIOExceptionprotected int getStopBits0()
throws IOException
getStopBits0 in class AbstractSerialPortSocketIOExceptionprotected int getParity0()
throws IOException
getParity0 in class AbstractSerialPortSocketIOExceptionpublic char getXONChar()
throws IOException
IOExceptionpublic char getXOFFChar()
throws IOException
IOExceptionCopyright © 2009–2015 atmodem4j. All rights reserved.