public final class LocalSerialPortRaw extends LocalSerialPort implements IBytesCommand
LocalSerialPort.FlowControl, LocalSerialPort.Parity
defaultPort, inStream, outStream, verbose
Constructor and Description |
---|
LocalSerialPortRaw(String portName,
int baud,
int length,
int stopBits,
LocalSerialPort.Parity parity,
LocalSerialPort.FlowControl flowControl,
int timeout,
boolean verbose) |
Modifier and Type | Method and Description |
---|---|
static void |
main(String[] args) |
int |
readByte() |
int |
readBytes(byte[] buf) |
byte[] |
readBytes(int size) |
void |
sendByte(byte b) |
void |
sendBytes(byte[] data) |
void |
sendBytes(byte[] data,
int offset,
int length) |
void |
setDebug(int debug)
Sets a debug parameter.
|
close, dropDTR, flush, flushInput, getPortName, getSerialPortName, getSerialPortNames, getVersion, isValid, open, setDTR, setTimeout, setVerbose
public LocalSerialPortRaw(String portName, int baud, int length, int stopBits, LocalSerialPort.Parity parity, LocalSerialPort.FlowControl flowControl, int timeout, boolean verbose) throws gnu.io.NoSuchPortException, gnu.io.PortInUseException, gnu.io.UnsupportedCommOperationException, IOException
gnu.io.NoSuchPortException
gnu.io.PortInUseException
gnu.io.UnsupportedCommOperationException
IOException
public static void main(String[] args)
public byte[] readBytes(int size) throws IOException
readBytes
in interface IBytesCommand
IOException
public int readBytes(byte[] buf) throws IOException
IOException
public int readByte() throws IOException
IOException
public void sendBytes(byte[] data) throws IOException
sendBytes
in interface IBytesCommand
IOException
public void sendBytes(byte[] data, int offset, int length) throws IOException
IOException
public void sendByte(byte b) throws IOException
IOException
public void setDebug(int debug)
IHarcHardware
setDebug
in interface IHarcHardware
Copyright © 2019. All rights reserved.