public final class LocalSerialPortBuffered extends LocalSerialPort implements IStringCommand
LocalSerialPort.FlowControl, LocalSerialPort.Parity
debug, 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, setVerbosity
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getVersion, isValid, setDebug, setTimeout, setVerbosity
public 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.NoSuchPortException
gnu.io.PortInUseException
gnu.io.UnsupportedCommOperationException
IOException
public LocalSerialPortBuffered(String portName, int baud, boolean verbose) throws gnu.io.NoSuchPortException, gnu.io.PortInUseException, gnu.io.UnsupportedCommOperationException, IOException
gnu.io.NoSuchPortException
gnu.io.PortInUseException
gnu.io.UnsupportedCommOperationException
IOException
public LocalSerialPortBuffered(String portName) throws gnu.io.NoSuchPortException, gnu.io.PortInUseException, gnu.io.UnsupportedCommOperationException, IOException
gnu.io.NoSuchPortException
gnu.io.PortInUseException
gnu.io.UnsupportedCommOperationException
IOException
public LocalSerialPortBuffered(int portNumber) throws IOException, gnu.io.NoSuchPortException, gnu.io.PortInUseException, gnu.io.UnsupportedCommOperationException
IOException
gnu.io.NoSuchPortException
gnu.io.PortInUseException
gnu.io.UnsupportedCommOperationException
public void open() throws HarcHardwareException, IOException
IHarcHardware
open
in interface IHarcHardware
open
in class LocalSerialPort
HarcHardwareException
IOException
public void open(boolean iterate) throws HarcHardwareException, IOException
LocalSerialPort
open
in class LocalSerialPort
HarcHardwareException
IOException
public void sendString(String cmd) throws IOException
sendString
in interface IStringCommand
IOException
public void sendBytes(byte[] data) throws IOException
IOException
public void sendBytes(byte[] data, int offset, int length) throws IOException
IOException
public void sendByte(byte b) throws IOException
IOException
public String readString() throws IOException
IStringCommand
readString
in interface IStringCommand
IOException
public String readString(boolean wait) throws IOException
IOException
public void waitFor(String goal, String areUThere, int delay, int tries) throws IOException, HarcHardwareException
IOException
HarcHardwareException
public boolean ready() throws IOException
IStringCommand
ready
in interface IStringCommand
IOException
- If an I/O error occurspublic static void main(String[] args)
Copyright © 2015. All rights reserved.