public class RXTXFiscalPortSource extends java.lang.Object implements FiscalPortSource, java.lang.Cloneable
Most of the parameters of this class are defined in the gnu.io
package.
Defaults:
portName = null;
appName = "RXTXFiscalPort";
openTimeout = 2000; // In milliseconds.
baudRate = 9600;
dataBits = SerialPort.DATABITS_8;
stopBits = SerialPort.STOPBITS_1;
parity = SerialPort.PARITY_NONE;
flowControl = SerialPort.FLOWCONTROL_NONE;
The set of available serial port names can be obtained via RXTXFiscalPort.getPortNames()
.
Constructor and Description |
---|
RXTXFiscalPortSource() |
RXTXFiscalPortSource(java.lang.String portName) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Returns a deep copy of this port source.
|
java.lang.String |
getAppName()
Get the name to report as the requesting application for serial port contention negotiation during open().
|
int |
getBaudRate()
Get the baud rate.
|
int |
getDataBits()
Get the number of data bits.
|
FiscalPort |
getFiscalPort()
Create a RXTXFiscalPort object.
|
int |
getFlowControl()
Get the type of flow control if any.
|
int |
getOpenTimeout()
Get the timeout for serial port contention negotiation during open().
|
int |
getParity()
Get the type of parity if any.
|
java.lang.String |
getPortName()
Get the name of the serial port to use.
|
RXTXFiscalPort |
getRXTXFiscalPort()
Create a RXTXFiscalPort object.
|
int |
getStopBits()
Get the number of stop bits.
|
void |
setAppName(java.lang.String appName)
Set the name to report as the requesting application for serial port contention negotiation during open().
|
void |
setBaudRate(int baudRate)
Set the baud rate.
|
void |
setDataBits(int dataBits)
Set the number of data bits.
|
void |
setFlowControl(int flowControl)
Set the type of flow control if any.
|
void |
setOpenTimeout(int openTimeout)
Set the timeout for serial port contention negotiation during open().
|
void |
setParity(int parity)
Set the type of parity if any.
|
void |
setPortName(java.lang.String portName)
Set the name of the serial port to use.
|
void |
setStopBits(int stopBits)
Set the number of stop bits.
|
public RXTXFiscalPortSource()
public RXTXFiscalPortSource(java.lang.String portName)
public java.lang.Object clone()
FiscalPortSource
clone
in interface FiscalPortSource
clone
in class java.lang.Object
public void setPortName(java.lang.String portName)
public java.lang.String getPortName()
public void setAppName(java.lang.String appName)
public java.lang.String getAppName()
public void setOpenTimeout(int openTimeout)
public int getOpenTimeout()
public void setBaudRate(int baudRate)
public int getBaudRate()
public void setDataBits(int dataBits)
public int getDataBits()
public void setStopBits(int stopBits)
public int getStopBits()
public void setParity(int parity)
public int getParity()
public void setFlowControl(int flowControl)
public int getFlowControl()
public FiscalPort getFiscalPort() throws gnu.io.NoSuchPortException, gnu.io.UnsupportedCommOperationException
getFiscalPort
in interface FiscalPortSource
gnu.io.NoSuchPortException
gnu.io.UnsupportedCommOperationException
public RXTXFiscalPort getRXTXFiscalPort() throws gnu.io.NoSuchPortException, gnu.io.UnsupportedCommOperationException
gnu.io.NoSuchPortException
gnu.io.UnsupportedCommOperationException