public class GenericTermiosSerialPortSocket extends AbstractSerialPortSocket
SerialPortSocket.SerialPortSocketFactory
is, LOG, os, SPSW_PROPERTIES
FACTORY
Constructor and Description |
---|
GenericTermiosSerialPortSocket(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 |
isDTR() |
boolean |
isIncommingRI() |
boolean |
isRTS() |
protected void |
open(String portName,
int type)
Open port
|
void |
printTermios() |
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, yesIhaveLoadedTheNativeLibMyself
public GenericTermiosSerialPortSocket(String portName)
protected void open(String portName, int type) throws IOException
AbstractSerialPortSocket
open
in class AbstractSerialPortSocket
portName
- name of port for openingIOException
protected void close0() throws IOException
close0
in class AbstractSerialPortSocket
IOException
public boolean isCTS()
public boolean isRTS()
public boolean isDSR()
public boolean isDTR()
public boolean isIncommingRI()
public void setRTS(boolean value) throws IOException
SerialPortSocket
value
- true - ON, false - OFFIOException
public void setDTR(boolean value) throws IOException
SerialPortSocket
value
- true - ON, false - OFFIOException
public void setXONChar(char c) throws IOException
IOException
public void setXOFFChar(char c) throws IOException
IOException
protected int readSingle() throws IOException
readSingle
in class AbstractSerialPortSocket
IOException
protected int readBytes(byte[] b, int off, int len) throws IOException
readBytes
in class AbstractSerialPortSocket
b
- 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 AbstractSerialPortSocket
IOException
protected void writeBytes(byte[] b, int off, int len) throws IOException
writeBytes
in class AbstractSerialPortSocket
off
- the start offset in the data.len
- the number of bytes to write.IOException
public int getInBufferBytesCount() throws IOException
SerialPortSocket
IOException
public int getOutBufferBytesCount() throws IOException
SerialPortSocket
IOException
protected void setFlowControl(int mask) throws IOException
setFlowControl
in class AbstractSerialPortSocket
IOException
protected int getFlowControl0() throws IOException
getFlowControl0
in class AbstractSerialPortSocket
IOException
public void setBreak(boolean value) throws IOException
SerialPortSocket
value
- the valueIOException
protected void setBaudrate(int baudRate) throws IOException
setBaudrate
in class AbstractSerialPortSocket
IOException
protected void setDataBits(int value) throws IOException
setDataBits
in class AbstractSerialPortSocket
IOException
protected void setStopBits(int value) throws IOException
setStopBits
in class AbstractSerialPortSocket
IOException
protected void setParity(int parity) throws IOException
setParity
in class AbstractSerialPortSocket
IOException
protected int getBaudrate0() throws IOException
getBaudrate0
in class AbstractSerialPortSocket
IOException
protected int getDataBits0() throws IOException
getDataBits0
in class AbstractSerialPortSocket
IOException
protected int getStopBits0() throws IOException
getStopBits0
in class AbstractSerialPortSocket
IOException
protected int getParity0() throws IOException
getParity0
in class AbstractSerialPortSocket
IOException
public char getXONChar() throws IOException
IOException
public char getXOFFChar() throws IOException
IOException
public void printTermios() throws IOException
IOException
public void sendXON() throws IOException
IOException
public void sendXOFF() throws IOException
IOException
Copyright © 2009–2015 atmodem4j. All rights reserved.