- All Implemented Interfaces:
Serializable
,Comparable<Handshake>
,java.lang.constant.Constable
The
Handshake
as of
"https://en.wikipedia.org/wiki/Serial_port#Flow_control"-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe underlying system's implementation or other implementation specific handshaking is used."Hardware handshaking is done with extra signals, often the RS-232 RTS/CTS or DTR/DSR signal circuits.""If no handshaking is employed, an overrun receiver might simply fail to receive data from the transmitter.""Hardware handshaking is done with extra signals, often the RS-232 RTS/CTS or DTR/DSR signal circuits.""Software handshaking is done for example with ASCII control characters XON/XOFF to control the flow of data." -
Method Summary
Modifier and TypeMethodDescriptionorg.refcodes.serial.FlowControlType
Retrieves theFlowControlType
.boolean
Determines whether theHandshake
represents a hardware flow control.boolean
Determines whether theHandshake
represents a software flow control.static Handshake
Returns the enum constant of this type with the specified name.static Handshake[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
NONE
"If no handshaking is employed, an overrun receiver might simply fail to receive data from the transmitter." -
SOFTWARE
"Software handshaking is done for example with ASCII control characters XON/XOFF to control the flow of data." -
RTS
"Hardware handshaking is done with extra signals, often the RS-232 RTS/CTS or DTR/DSR signal circuits." -
DTR
"Hardware handshaking is done with extra signals, often the RS-232 RTS/CTS or DTR/DSR signal circuits." -
AUTO
The underlying system's implementation or other implementation specific handshaking is used.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
isHardwareFlowControl
public boolean isHardwareFlowControl()Determines whether theHandshake
represents a hardware flow control.- Returns:
- True in case of hardware flow control.
-
isSoftwareFlowControl
public boolean isSoftwareFlowControl()Determines whether theHandshake
represents a software flow control.- Returns:
- True in case of software flow control.
-
getFlowControlType
public org.refcodes.serial.FlowControlType getFlowControlType()Retrieves theFlowControlType
.- Returns:
- The according flow control type (hardware or software) .
-