public class Tag
extends java.lang.Object
RFIDReader.read()
or RFIDReader.inventory(RFIDCallback)
.Constructor and Description |
---|
Tag(RFIDReader reader) |
Tag(RFIDReader reader,
java.lang.String pcEPC) |
Tag(RFIDReader reader,
java.lang.String pcEPC,
double rssi) |
Tag(RFIDReader reader,
java.lang.String pcEPC,
double rssi,
java.lang.String tid) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getEPC()
Get the EPC value.
|
java.lang.String |
getPC()
Get the Gen2 Protocol-Control (PC) word value.
|
double |
getRSSI()
Get the Returned Signal Strength Indicator (RSSI).
|
java.lang.String |
getTID()
Get the TID value.
|
RFIDResult |
kill(java.lang.String killPassword)
Kill the RFID tag.
|
RFIDResult |
lock(LockFields fields,
LockType lockType)
This method is the same as
lock(LockFields, LockType, String) , but uses the default
access password (set by RFIDReader.setAccessPwd(String) ). |
RFIDResult |
lock(LockFields fields,
LockType lockType,
java.lang.String accessPassword)
Lock, Unlock, PermaLock, or PermaUnlock fields within a tag's memory.
|
RFIDResult |
read(Bank bank,
int wordPointer,
int wordCount)
This method is the same as
read(Bank, int, int, String) , but uses the default
access password (set by RFIDReader.setAccessPwd(String) ). |
RFIDResult |
read(Bank bank,
int wordPointer,
int wordCount,
java.lang.String accessPassword)
Read data from a specific location of the tag's memory.
|
RFIDResult |
readAccessPwd()
Read the Access Password from the RESERVED bank of the tag.
|
RFIDResult |
readKillPwd()
Read the Kill Password from the RESERVED bank of the tag.
|
RFIDResult |
readTID()
Read the TID data from the tag.
|
RFIDResult |
readUser()
Read data from the USER bank of the tag.
|
RFIDResult |
write(Bank bank,
int wordPointer,
java.lang.String data)
This method is the same as
write(Bank, int, String, String) , but uses the default
access password (set by RFIDReader.setAccessPwd(String) ). |
RFIDResult |
write(Bank bank,
int wordPointer,
java.lang.String data,
java.lang.String accessPassword)
Write data to a specific location of the tag's memory.
|
RFIDResult |
writeAccessPwd(java.lang.String accessPwd)
Write a new Access Password to RESERVED bank of the tag.
|
RFIDResult |
writeEPC(java.lang.String EPC)
Write new EPC data to the tag.
|
RFIDResult |
writeKillPwd(java.lang.String killPwd)
Write a new Kill Password to the RESERVED bank of the tag.
|
RFIDResult |
writeUser(java.lang.String user)
Write data to the USER bank of the tag.
|
public Tag(RFIDReader reader)
public Tag(RFIDReader reader, java.lang.String pcEPC)
public Tag(RFIDReader reader, java.lang.String pcEPC, double rssi)
public Tag(RFIDReader reader, java.lang.String pcEPC, double rssi, java.lang.String tid)
public double getRSSI()
public java.lang.String getEPC()
public java.lang.String getPC()
public java.lang.String getTID()
public RFIDResult readTID() throws ReaderException
RFIDResult.isSuccess()
will return true and RFIDResult.getData()
will contain the data string.ReaderException
- if there is an errorRFIDBusyException
- if the reader is busy (e.g. performing a continuous inventory)public RFIDResult writeEPC(java.lang.String EPC) throws ReaderException
EPC
- the EPC data to writeRFIDResult.isSuccess()
will return trueReaderException
- if there is an errorRFIDBusyException
- if the reader is busy (e.g. performing a continuous inventory)public RFIDResult readUser() throws ReaderException
RFIDResult.isSuccess()
will return true and RFIDResult.getData()
will contain the data string.ReaderException
- if there is an errorRFIDBusyException
- if the reader is busy (e.g. performing a continuous inventory)public RFIDResult writeUser(java.lang.String user) throws ReaderException
user
- the data to write to the tag's USER bankRFIDResult.isSuccess()
will return trueReaderException
- if there is an errorRFIDBusyException
- if the reader is busy (e.g. performing a continuous inventory)public RFIDResult readAccessPwd() throws ReaderException
RFIDResult.isSuccess()
will return true and RFIDResult.getData()
will contain the data string.ReaderException
- if there is an errorRFIDBusyException
- if the reader is busy (e.g. performing a continuous inventory)public RFIDResult writeAccessPwd(java.lang.String accessPwd) throws ReaderException
accessPwd
- the new access password for the tagRFIDResult.isSuccess()
will return trueReaderException
- if there is an errorRFIDBusyException
- if the reader is busy (e.g. performing a continuous inventory)public RFIDResult readKillPwd() throws ReaderException
RFIDResult.isSuccess()
will return true and RFIDResult.getData()
will contain the data string.ReaderException
- if there is an errorRFIDBusyException
- if the reader is busy (e.g. performing a continuous inventory)public RFIDResult writeKillPwd(java.lang.String killPwd) throws ReaderException
killPwd
- the new kill passwordRFIDResult.isSuccess()
will return trueReaderException
- if there is an errorRFIDBusyException
- if the reader is busy (e.g. performing a continuous inventory)public RFIDResult read(Bank bank, int wordPointer, int wordCount, java.lang.String accessPassword) throws ReaderException
bank
- the Gen2 memory bank to read fromwordPointer
- the offset in word unitswordCount
- the number of words to readaccessPassword
- the access password used when accessing protected tag memoryRFIDResult.isSuccess()
will return true and RFIDResult.getData()
will contain the data string.ReaderException
- if there is an errorRFIDBusyException
- if the reader is busy (e.g. performing a continuous inventory)public RFIDResult read(Bank bank, int wordPointer, int wordCount) throws ReaderException
read(Bank, int, int, String)
, but uses the default
access password (set by RFIDReader.setAccessPwd(String)
). The pointer and count values are in
word units.bank
- the Gen2 memory bank to read fromwordPointer
- the offset in word unitswordCount
- the number of words to readRFIDResult.isSuccess()
will return true and RFIDResult.getData()
will contain the data string.ReaderException
- if there is an errorRFIDBusyException
- if the reader is busy (e.g. performing a continuous inventory)public RFIDResult write(Bank bank, int wordPointer, java.lang.String data, java.lang.String accessPassword) throws ReaderException
bank
- the Gen2 memory bank to write towordPointer
- the offset in word units, where data will be writtendata
- the data to be writtenaccessPassword
- the access password used when accessing protected tag memoryRFIDResult.isSuccess()
will return trueReaderException
- if there is an errorRFIDBusyException
- if the reader is busy (e.g. performing a continuous inventory)public RFIDResult write(Bank bank, int wordPointer, java.lang.String data) throws ReaderException
write(Bank, int, String, String)
, but uses the default
access password (set by RFIDReader.setAccessPwd(String)
).
The pointer is in word units and the data is a hex String.bank
- the Gen2 memory bank to write towordPointer
- the offset in word units, where data will be writtendata
- the data to be writtenRFIDResult.isSuccess()
will return trueReaderException
- if there is an errorRFIDBusyException
- if the reader is busy (e.g. performing a continuous inventory)public RFIDResult kill(java.lang.String killPassword) throws ReaderException
killPassword
- The kill password must be non-zeroRFIDResult.isSuccess()
will return trueReaderException
- if there is an errorRFIDBusyException
- if the reader is busy (e.g. performing a continuous inventory)public RFIDResult lock(LockFields fields, LockType lockType, java.lang.String accessPassword) throws ReaderException
fields
- a bitmap of memory fields to be locked. Multiple memory fields can be specified using the '|' operation.lockType
- type of lock (lock, unlock, permaLock or permaUnlock)accessPassword
- The access password used when accessing protected tag memoryRFIDResult.isSuccess()
will return trueReaderException
- if there is an errorRFIDBusyException
- if the reader is busy (e.g. performing a continuous inventory)public RFIDResult lock(LockFields fields, LockType lockType) throws ReaderException
lock(LockFields, LockType, String)
, but uses the default
access password (set by RFIDReader.setAccessPwd(String)
).fields
- a bitmap of memory fields to be locked. Multiple memory fields can be specified using the '|' operation.lockType
- type of lock (lock, unlock, permaLock or permaUnlock)RFIDResult.isSuccess()
will return trueReaderException
- if there is an errorRFIDBusyException
- if the reader is busy (e.g. performing a continuous inventory)