Class portio.SerialPortParams
All Packages Class Hierarchy This Package Previous Next Index
Class portio.SerialPortParams
java.lang.Object
|
+----portio.PortParams
|
+----portio.SerialPortParams
- public class SerialPortParams
- extends PortParams
- implements Cloneable
Port parameters for standard RS-232 serial ports. This serves simply as a
parameter block and provides no associated methods. Use the SerialPort.setParams
to set parameters. Note that the PortParams class itself is empty.
- Version:
- $Revision: 2.1 $ ($Date: 1997/02/19 18:00:00 $)
- See Also:
- Port, SerialPort
-
carrierSense
- causes eof (-1) to be returned on reads and writes upon loss of carrier (DCD)
-
charSize
- Character size; typically 5, 6, 7, or 8 bits/character.
-
exceptionOnBreak
- This causes an exception to be generated on reads if a break condition
is received.
-
exceptionOnFramingError
- This causes an exception to be thrown on reads if a
framing error is encountered.
-
exceptionOnOverrunError
- This causes an exception to be thrown on reads if an
overrun error is encountered.
-
exceptionOnParityError
- This causes an exception to be thrown on reads if a parity error
is encountered.
-
FLOW_IN_DTR
- input hardware flow control mode, uses DTR to pace input (used by some printers
but optionally supported--make a special cable to route RTS on
the port to DTR on such printers when not supported)
-
FLOW_IN_RTS
- input hardware flow control mode, uses RTS to pace input (most common)
-
FLOW_IXANY
- IXANY output mode (any character restarts stopped output)
-
FLOW_NONE
- no flow control mode
-
FLOW_OUT_CTS
- output hardware flow control mode, uses CTS to pace output (most common)
-
FLOW_OUT_DCD
- output hardware flow control mode, uses DCD to pace output (optional)
-
FLOW_OUT_DSR
- output hardware flow control mode, uses DSR to pace output (optional)
-
FLOW_SOFTWARE
- software flow control mode
-
flowStart
- software flow control start character
-
flowStop
- software flow control stop character
-
framing
- Framing bits, typically 1, 1.5, and 2 are legal values.
-
inBaud
- Input baud rate
-
inFlowControl
- input flow control mode (mode values can be OR'd together)
-
loopback
- optionally implemented, sets hardware loopback for testing
-
outBaud
- Output baud rate
-
outFlowControl
- output flow control mode (mode values can be OR'd together)
-
parity
- Parity bit code
-
PARITY_EVEN
- even parity
-
PARITY_MARK
- mark parity
-
PARITY_NONE
- no parity
-
PARITY_ODD
- odd parity
-
PARITY_SPACE
- space parity
-
receiveEnable
- optionally implemented, enables/disable receiver at hardware level
-
SerialPortParams()
- Instantiates a default serial port params object defaulting to
9600, 8, N, 1 with no flow control, receive enabled, and
start/stop chars set to the usual Control-S and Control-Q.
-
clone()
- Clones the port params object.
-
toString()
- Converts the object to a string.
PARITY_NONE
public final static int PARITY_NONE
- no parity
PARITY_ODD
public final static int PARITY_ODD
- odd parity
PARITY_EVEN
public final static int PARITY_EVEN
- even parity
PARITY_MARK
public final static int PARITY_MARK
- mark parity
PARITY_SPACE
public final static int PARITY_SPACE
- space parity
FLOW_NONE
public final static int FLOW_NONE
- no flow control mode
FLOW_SOFTWARE
public final static int FLOW_SOFTWARE
- software flow control mode
FLOW_IXANY
public final static int FLOW_IXANY
- IXANY output mode (any character restarts stopped output)
FLOW_OUT_CTS
public final static int FLOW_OUT_CTS
- output hardware flow control mode, uses CTS to pace output (most common)
FLOW_OUT_DSR
public final static int FLOW_OUT_DSR
- output hardware flow control mode, uses DSR to pace output (optional)
FLOW_OUT_DCD
public final static int FLOW_OUT_DCD
- output hardware flow control mode, uses DCD to pace output (optional)
FLOW_IN_RTS
public final static int FLOW_IN_RTS
- input hardware flow control mode, uses RTS to pace input (most common)
FLOW_IN_DTR
public final static int FLOW_IN_DTR
- input hardware flow control mode, uses DTR to pace input (used by some printers
but optionally supported--make a special cable to route RTS on
the port to DTR on such printers when not supported)
outBaud
public int outBaud
- Output baud rate
inBaud
public int inBaud
- Input baud rate
charSize
public int charSize
- Character size; typically 5, 6, 7, or 8 bits/character.
parity
public int parity
- Parity bit code
framing
public double framing
- Framing bits, typically 1, 1.5, and 2 are legal values. Some
hardware support other fractional stop bit settings. It's up to
the driver to determine what is supported and how to round values.
outFlowControl
public int outFlowControl
- output flow control mode (mode values can be OR'd together)
inFlowControl
public int inFlowControl
- input flow control mode (mode values can be OR'd together)
flowStart
public byte flowStart
- software flow control start character
flowStop
public byte flowStop
- software flow control stop character
carrierSense
public boolean carrierSense
- causes eof (-1) to be returned on reads and writes upon loss of carrier (DCD)
exceptionOnParityError
public boolean exceptionOnParityError
- This causes an exception to be thrown on reads if a parity error
is encountered. Regardless of the setting
of this flag, error characters are placed on the input stream as read from the
hardware.
exceptionOnFramingError
public boolean exceptionOnFramingError
- This causes an exception to be thrown on reads if a
framing error is encountered. Regardless of the setting
of this flag, error characters are placed on the input stream as read from the
hardware.
exceptionOnOverrunError
public boolean exceptionOnOverrunError
- This causes an exception to be thrown on reads if an
overrun error is encountered.
exceptionOnBreak
public boolean exceptionOnBreak
- This causes an exception to be generated on reads if a break condition
is received. Regardless of the setting of this flag, the break will appear
as one or more zero bytes on the input stream.
receiveEnable
public boolean receiveEnable
- optionally implemented, enables/disable receiver at hardware level
loopback
public boolean loopback
- optionally implemented, sets hardware loopback for testing
SerialPortParams
public SerialPortParams()
- Instantiates a default serial port params object defaulting to
9600, 8, N, 1 with no flow control, receive enabled, and
start/stop chars set to the usual Control-S and Control-Q.
This is the default parameter set that serial ports should be set to on open
for this package.
toString
public String toString()
- Converts the object to a string.
- Overrides:
- toString in class Object
clone
public Object clone()
- Clones the port params object.
- Overrides:
- clone in class Object
All Packages Class Hierarchy This Package Previous Next Index