public abstract class SwitchPressUserActionCommand extends AsciiSelfResponderCommandBase
LibraryCommandId
Constructor and Description |
---|
SwitchPressUserActionCommand(java.lang.String commandName,
java.lang.String header) |
Modifier and Type | Method and Description |
---|---|
protected void |
buildCommandLine(java.lang.StringBuilder line)
Builds the command line to send to the reader to execute the command
|
IAsciiCommand |
getActionCommand() |
java.lang.String |
getValue() |
protected boolean |
processReceivedLine(java.lang.String fullLine,
java.lang.String header,
java.lang.String value,
boolean moreAvailable)
Each correctly terminated line from the device is passed to this method for processing
|
void |
setActionCommand(IAsciiCommand command) |
void |
setValue(java.lang.String value) |
getMaxSynchronousWaitTime, getSynchronousCommandResponder, setMaxSynchronousWaitTime, setSynchronousCommandResponder
captureNonLibraryResponses, setCaptureNonLibraryResponses
clearLastResponse, getCommandLine, getCommandName, getResponseLifecycleDelegate, getResponseStarted, isResponseFinished, parseParameters, processReceivedLine, responseDidFinish, responseDidReceiveParameter, responseDidStart, setCommandName, setResponseLifecycleDelegate, setResponseStarted, splitParameters
appendToMessages, appendToParameters, appendToResponse, getErrorCode, getMessages, getParameters, getResponse, isSuccessful, setErrorCode, setIsSuccessful, setResponse
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCommandLine, getCommandName
public SwitchPressUserActionCommand(java.lang.String commandName, java.lang.String header)
commandName
- the ASCII 2 command name - including '.'header
- the header response to capture e.g. 'SP' or 'DP'public java.lang.String getValue()
public void setValue(java.lang.String value)
value
- the new single press user action as a stringpublic IAsciiCommand getActionCommand()
public void setActionCommand(IAsciiCommand command)
command
- the new single press user action as a commandprotected void buildCommandLine(java.lang.StringBuilder line)
buildCommandLine
in class AsciiSelfResponderCommandBase
line
- The command line to append to
When overriding this method call the base class to construct the command line as known to the base class and
then append the additional parameters to the end of the lineprotected boolean processReceivedLine(java.lang.String fullLine, java.lang.String header, java.lang.String value, boolean moreAvailable) throws java.lang.Exception
processReceivedLine
in class AsciiCommandLibraryResponderBase
fullLine
- The line to be processedheader
- The response line header excluding the colon e.g. 'CS' for a command started responsevalue
- The response line following the colon e.g. '.iv'moreAvailable
- When true indicates there are additional lines to be processed (and will also be passed to this method)java.lang.Exception