public final class LocalSerialPortBuffered extends LocalSerialPort implements IStringCommand
LocalSerialPort.FlowControl, LocalSerialPort.Paritydebug, defaultPort, inStream, outStream, verbose| Constructor and Description |
|---|
LocalSerialPortBuffered(int portNumber) |
LocalSerialPortBuffered(String portName) |
LocalSerialPortBuffered(String portName,
int baud,
boolean verbose) |
LocalSerialPortBuffered(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) |
void |
open()
Opens the device with previously set parameters.
|
void |
open(boolean iterate)
This version of open tries, if its argument is true, to open the "following" device if opening of the requested device fails.
|
String |
readString()
Reads a line of text.
|
String |
readString(boolean wait) |
boolean |
ready()
Tells whether this stream is ready to be read.
|
void |
sendByte(byte b) |
void |
sendBytes(byte[] data) |
void |
sendBytes(byte[] data,
int offset,
int length) |
void |
sendString(String cmd) |
void |
waitFor(String goal,
String areUThere,
int delay,
int tries) |
close, dropDTR, flush, flushInput, getActualPortName, getSerialPortName, getSerialPortNames, getVersion, isValid, setDebug, setDTR, setTimeout, setVerbosityclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetVersion, isValid, setDebug, setTimeout, setVerbositypublic LocalSerialPortBuffered(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.NoSuchPortExceptiongnu.io.PortInUseExceptiongnu.io.UnsupportedCommOperationExceptionIOExceptionpublic LocalSerialPortBuffered(String portName, int baud, boolean verbose) throws gnu.io.NoSuchPortException, gnu.io.PortInUseException, gnu.io.UnsupportedCommOperationException, IOException
gnu.io.NoSuchPortExceptiongnu.io.PortInUseExceptiongnu.io.UnsupportedCommOperationExceptionIOExceptionpublic LocalSerialPortBuffered(String portName) throws gnu.io.NoSuchPortException, gnu.io.PortInUseException, gnu.io.UnsupportedCommOperationException, IOException
gnu.io.NoSuchPortExceptiongnu.io.PortInUseExceptiongnu.io.UnsupportedCommOperationExceptionIOExceptionpublic LocalSerialPortBuffered(int portNumber)
throws IOException,
gnu.io.NoSuchPortException,
gnu.io.PortInUseException,
gnu.io.UnsupportedCommOperationException
IOExceptiongnu.io.NoSuchPortExceptiongnu.io.PortInUseExceptiongnu.io.UnsupportedCommOperationExceptionpublic void open()
throws HarcHardwareException,
IOException
IHarcHardwareopen in interface IHarcHardwareopen in class LocalSerialPortHarcHardwareExceptionIOExceptionpublic void open(boolean iterate)
throws HarcHardwareException,
IOException
LocalSerialPortopen in class LocalSerialPortHarcHardwareExceptionIOExceptionpublic void sendString(String cmd) throws IOException
sendString in interface IStringCommandIOExceptionpublic void sendBytes(byte[] data)
throws IOException
IOExceptionpublic void sendBytes(byte[] data,
int offset,
int length)
throws IOException
IOExceptionpublic void sendByte(byte b)
throws IOException
IOExceptionpublic String readString() throws IOException
IStringCommandreadString in interface IStringCommandIOExceptionpublic String readString(boolean wait) throws IOException
IOExceptionpublic void waitFor(String goal, String areUThere, int delay, int tries) throws IOException, HarcHardwareException
IOExceptionHarcHardwareExceptionpublic boolean ready()
throws IOException
IStringCommandready in interface IStringCommandIOException - If an I/O error occurspublic static void main(String[] args)
Copyright © 2015. All rights reserved.