public class PurgeDataCommand extends ComPortCommand
PURGE-DATA command.| Constructor and Description |
|---|
PurgeDataCommand(boolean client,
int purgeData)
Encoding constructor.
|
PurgeDataCommand(int[] bytes)
Decoding constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isPurgeReceiveDataBuffer() |
boolean |
isPurgeTransmitDataBuffer() |
java.lang.String |
toString()
Get the human-readable description of this option.
|
void |
visit(ComPortCommandSwitch sw)
Apply visitor pattern.
|
equals, getBytes, getCommand, getName, hashCode, isServerCommandpublic PurgeDataCommand(int[] bytes)
bytes - encoded option starting with the COM-PORT-OPTION byte
NullPointerException if bytes is null
IllegalArgumentException if bytes has length != 3
IllegalArgumentException if bytes[0] is not RFC2217.COM_PORT_OPTION
IllegalArgumentException if bytes[1] is not RFC2217.PURGE_DATA (client or server)
IllegalArgumentException if bytes[2] is not a valid RFC 2217 purge data valuepublic PurgeDataCommand(boolean client,
int purgeData)
purgeData - purge data valueclient - true for the client-to-server command, false for the server-to-client command
IllegalArgumentException if purgeData is not a valid RFC 2217 purge data valuepublic java.lang.String toString()
ComPortCommandtoString in class ComPortCommandpublic void visit(ComPortCommandSwitch sw)
ComPortCommandvisit in class ComPortCommandsw - visitor switch handlerpublic boolean isPurgeReceiveDataBuffer()
public boolean isPurgeTransmitDataBuffer()