public class TransponderResponder
extends java.lang.Object
Captures the EP CR PC QT RI responses to form a TransponderData instance. Captures WW as WordsWritten and RD as data read Captures OK ER to raise TransponderReceived at the end of a response;
The delegate is called if: - A new response header is received that has been seen before (moreAvailable = true). Just received the start of the next transponder response - OK or ER is received and the current EPC is valid (moreAvailable = false). End of the command - TransponderComplete is called. This is provided for when a base class handles OR or ER and needs to complete a transponder
Constructor and Description |
---|
TransponderResponder() |
Modifier and Type | Method and Description |
---|---|
void |
clearLastResponse()
Clears the cache of values ready to receive a new transponder
|
boolean |
didKill() |
boolean |
didLock() |
TransponderAccessErrorCode |
getAccessErrorCode()
Gets the access error code for this transponder
|
TransponderBackscatterErrorCode |
getBackscatterErrorCode()
Gets the backscatter error for this transponder
|
java.lang.Integer |
getCrc() |
java.lang.String |
getEpc() |
byte[] |
getFastIdData() |
java.lang.Integer |
getIndex() |
java.lang.Integer |
getPc() |
java.lang.Integer |
getQt() |
byte[] |
getReadData() |
java.lang.Integer |
getRssi() |
java.util.Date |
getTimestamp()
Gets the timestamp for this command RESPONSE
This value will apply to all transponders from the same response
|
ITransponderReceivedDelegate |
getTransponderReceivedHandler() |
int |
getWordsWritten() |
boolean |
processReceivedLine(java.lang.String header,
java.lang.String value)
Each correctly terminated line from the device is passed to this method for processing
|
void |
setTransponderReceivedHandler(ITransponderReceivedDelegate value) |
void |
transponderComplete(boolean moreAvailable)
When called this method checks to see if the Epc is not empty.
|
public final java.lang.Integer getCrc()
public final java.lang.String getEpc()
public final java.lang.Integer getIndex()
public final java.lang.Integer getPc()
public final java.lang.Integer getQt()
public final boolean didKill()
public final boolean didLock()
public final java.lang.Integer getRssi()
public final java.util.Date getTimestamp()
public final TransponderAccessErrorCode getAccessErrorCode()
public final TransponderBackscatterErrorCode getBackscatterErrorCode()
public final byte[] getReadData()
public final byte[] getFastIdData()
public final int getWordsWritten()
public final ITransponderReceivedDelegate getTransponderReceivedHandler()
public final void setTransponderReceivedHandler(ITransponderReceivedDelegate value)
public final void clearLastResponse()
public final boolean processReceivedLine(java.lang.String header, java.lang.String value)
header
- The response line header excluding the colon e.g. 'CS' for a command started responsevalue
- The response line following the colon e.g. '.iv'public final void transponderComplete(boolean moreAvailable)
moreAvailable
- True if more transponders are pending to be notified