- java.lang.Object
-
- java.lang.Enum<Handshake>
-
- org.refcodes.serial.alt.tty.Handshake
-
- All Implemented Interfaces:
Serializable
,Comparable<Handshake>
public enum Handshake extends Enum<Handshake>
TheHandshake
as of "https://en.wikipedia.org/wiki/Serial_port#Flow_control"
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AUTO
The underlying system's implementation or other implementation specific handshaking is used.DTR
"Hardware handshaking is done with extra signals, often the RS-232 RTS/CTS or DTR/DSR signal circuits."NONE
"If no handshaking is employed, an overrun receiver might simply fail to receive data from the transmitter."RTS
"Hardware handshaking is done with extra signals, often the RS-232 RTS/CTS or DTR/DSR signal circuits."SOFTWARE
"Software handshaking is done for example with ASCII control characters XON/XOFF to control the flow of data."
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.refcodes.serial.FlowControlType
getFlowControlType()
Retrieves theFlowControlType
.boolean
isHardwareFlowControl()
Determines whether theHandshake
represents a hardware flow control.boolean
isSoftwareFlowControl()
Determines whether theHandshake
represents a software flow control.static Handshake
valueOf(String name)
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 Detail
-
NONE
public static final Handshake NONE
"If no handshaking is employed, an overrun receiver might simply fail to receive data from the transmitter."
-
SOFTWARE
public static final Handshake SOFTWARE
"Software handshaking is done for example with ASCII control characters XON/XOFF to control the flow of data."
-
RTS
public static final Handshake RTS
"Hardware handshaking is done with extra signals, often the RS-232 RTS/CTS or DTR/DSR signal circuits."
-
DTR
public static final Handshake DTR
"Hardware handshaking is done with extra signals, often the RS-232 RTS/CTS or DTR/DSR signal circuits."
-
AUTO
public static final Handshake AUTO
The underlying system's implementation or other implementation specific handshaking is used.
-
-
Method Detail
-
values
public static Handshake[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Handshake c : Handshake.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Handshake valueOf(String name)
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) .
-
-