Package gnu.io.rfc2217
Class ModemStateMaskCommand
- java.lang.Object
-
- gnu.io.rfc2217.ComPortCommand
-
- gnu.io.rfc2217.ModemStateMaskCommand
-
public class ModemStateMaskCommand extends ComPortCommand
RFC 2217SET-MODEMSTATE-MASKcommand.- See Also:
- RFC 2217
-
-
Constructor Summary
Constructors Constructor Description ModemStateMaskCommand(boolean client, int modemStateMask)Encoding constructor.ModemStateMaskCommand(int[] bytes)Decoding constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetModemStateMask()java.lang.StringtoString()Get the human-readable description of this option.voidvisit(ComPortCommandSwitch sw)Apply visitor pattern.-
Methods inherited from class gnu.io.rfc2217.ComPortCommand
equals, getBytes, getCommand, getName, hashCode, isServerCommand
-
-
-
-
Constructor Detail
-
ModemStateMaskCommand
public ModemStateMaskCommand(int[] bytes)
Decoding constructor.- Parameters:
bytes- encoded option starting with theCOM-PORT-OPTIONbyte NullPointerException ifbytesis null IllegalArgumentException ifbyteshas length != 3 IllegalArgumentException ifbytes[0]is notRFC2217.COM_PORT_OPTIONIllegalArgumentException ifbytes[1]is notRFC2217.SET_MODEMSTATE_MASK(client or server)
-
ModemStateMaskCommand
public ModemStateMaskCommand(boolean client, int modemStateMask)Encoding constructor.- Parameters:
modemStateMask- modem state mask valueclient- true for the client-to-server command, false for the server-to-client command
-
-
Method Detail
-
toString
public java.lang.String toString()
Description copied from class:ComPortCommandGet the human-readable description of this option.- Specified by:
toStringin classComPortCommand
-
visit
public void visit(ComPortCommandSwitch sw)
Description copied from class:ComPortCommandApply visitor pattern.- Specified by:
visitin classComPortCommand- Parameters:
sw- visitor switch handler
-
getModemStateMask
public int getModemStateMask()
-
-