public class DateTimeCommand extends AsciiSelfResponderCommandBase
LibraryCommandId
Constructor and Description |
---|
DateTimeCommand()
Initializes a new instance of the DateTimeCommand class
|
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
|
java.util.Date |
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
|
protected void |
responseDidFinish(boolean async)
The is called when the responder received a line with an OK: or an ER: header.
|
protected void |
responseDidStart()
This is called when the responder receives the CS: line
|
void |
setValue(java.util.Date value) |
static DateTimeCommand |
synchronousCommand()
Returns a new instance of the command class that will execute synchronously (as its own responder)
|
static DateTimeCommand |
synchronousCommand(java.util.Date value)
Returns a new instance of the command class that will execute synchronously (as its own responder)
|
getMaxSynchronousWaitTime, getSynchronousCommandResponder, setMaxSynchronousWaitTime, setSynchronousCommandResponder
captureNonLibraryResponses, setCaptureNonLibraryResponses
clearLastResponse, getCommandLine, getCommandName, getResponseLifecycleDelegate, getResponseStarted, isResponseFinished, parseParameters, processReceivedLine, responseDidReceiveParameter, 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 DateTimeCommand()
public final java.util.Date getValue()
public final void setValue(java.util.Date value)
public static DateTimeCommand synchronousCommand()
public static DateTimeCommand synchronousCommand(java.util.Date value)
value
- The date time to set the reader toprotected 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 void responseDidFinish(boolean async)
responseDidFinish
in class AsciiCommandResponderBase
async
- True if the command finished asynchronouslyprotected void responseDidStart()
AsciiCommandResponderBase
responseDidStart
in class AsciiCommandResponderBase
protected 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