public class RXTXFiscalPort extends java.lang.Object implements FiscalPort
Constructor and Description |
---|
RXTXFiscalPort(java.lang.String portName,
java.lang.String appName,
int openTimeout,
int baudRate,
int dataBits,
int stopBits,
int parity,
int flowControl) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the port.
|
void |
flushAndWait()
Flush the output stream and wait until output is done.
|
int |
getBaudRate()
Get the baud rate.
|
java.io.InputStream |
getInputStream()
Get the input stream.
|
java.io.OutputStream |
getOutputStream()
Get the output stream.
|
java.lang.String |
getPortName()
Get the underlying serial port name.
|
static java.util.SortedSet |
getPortNames()
Get an alphabetically sorted set of available serial port names.
|
gnu.io.SerialPort |
getSerialPort()
Get the underlying serial port or null if the port is not open.
|
int |
getTimeout()
Get the receive timeout.
|
boolean |
isOpen()
Returns true if the port is open.
|
void |
open()
Open the port.
|
void |
setBaudRate(int baudRate)
Set the baud rate.
|
void |
setTimeout(int ms)
Set the receive timeout.
|
public RXTXFiscalPort(java.lang.String portName, java.lang.String appName, int openTimeout, int baudRate, int dataBits, int stopBits, int parity, int flowControl) throws gnu.io.NoSuchPortException, gnu.io.UnsupportedCommOperationException
gnu.io.NoSuchPortException
gnu.io.UnsupportedCommOperationException
public static java.util.SortedSet getPortNames()
public void open() throws gnu.io.PortInUseException, gnu.io.UnsupportedCommOperationException, java.io.IOException
FiscalPort
open
in interface FiscalPort
gnu.io.PortInUseException
gnu.io.UnsupportedCommOperationException
java.io.IOException
public void close() throws java.io.IOException
FiscalPort
close
in interface FiscalPort
java.io.IOException
public boolean isOpen()
FiscalPort
isOpen
in interface FiscalPort
public java.lang.String getPortName()
public gnu.io.SerialPort getSerialPort()
public void setBaudRate(int baudRate) throws gnu.io.UnsupportedCommOperationException
FiscalPort
setBaudRate
in interface FiscalPort
gnu.io.UnsupportedCommOperationException
public int getBaudRate()
FiscalPort
getBaudRate
in interface FiscalPort
public void setTimeout(int ms) throws gnu.io.UnsupportedCommOperationException
FiscalPort
setTimeout
in interface FiscalPort
gnu.io.UnsupportedCommOperationException
public int getTimeout()
FiscalPort
getTimeout
in interface FiscalPort
public java.io.InputStream getInputStream() throws java.io.IOException
FiscalPort
getInputStream
in interface FiscalPort
java.io.IOException
public java.io.OutputStream getOutputStream() throws java.io.IOException
FiscalPort
getOutputStream
in interface FiscalPort
java.io.IOException
public void flushAndWait() throws java.io.IOException
FiscalPort
flushAndWait
in interface FiscalPort
java.io.IOException