|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.thingmagic.Reader
com.thingmagic.SerialReader
public class SerialReader
The SerialReader class is an implementation of a Reader object that communicates with a ThingMagic embedded RFID module via the embedded module serial protocol. In addition to the Reader interface, direct access to the commands of the embedded module serial protocol is supported.
Instances of the SerialReader class are created with the com.thingmagic.Reader.create method with a "eapi" URI or a generic "tmr" URI that references a local serial port.
Nested Class Summary | |
---|---|
static class |
SerialReader.AntennaPort
Representation of the device's antenna state. |
static class |
SerialReader.AntennaSelection
The antenna configuration to use for cmdReadTagMultiple(int, com.thingmagic.SerialReader.AntennaSelection, com.thingmagic.TagProtocol, com.thingmagic.TagFilter, boolean) . |
static class |
SerialReader.AntennaStatusReport
|
static class |
SerialReader.ConfigKey
Configuration key for cmdSetUserProfile |
static class |
SerialReader.Configuration
The device configuration keys for use in cmdGetReaderConfiguration(com.thingmagic.SerialReader.Configuration) and cmdSetReaderConfiguration(com.thingmagic.SerialReader.Configuration, java.lang.Object) . |
static class |
SerialReader.ConfigValue
The configuration values for cmdSetUserProfile |
static class |
SerialReader.FrequencyHopTableOption
|
static class |
SerialReader.FrequencyStatusReport
|
static class |
SerialReader.Gen2Configuration
Gen2-specific parameters that are supported on the device. |
static class |
SerialReader.HibikiSystemInformation
|
static class |
SerialReader.ISO180006BConfiguration
ISO18000-6B-specific parameters that are supported on the device. |
static class |
SerialReader.PowerMode
The device power mode, for use in the /reader/powerMode parameter, cmdGetPowerMode() , and cmdSetPowerMode(com.thingmagic.SerialReader.PowerMode) . |
static interface |
SerialReader.ProtocolConfiguration
Interface for per-protocol parameter enumerations to implement. |
static class |
SerialReader.ReaderStatistics
Reader Statistics |
static class |
SerialReader.ReaderStatisticsFlag
The statistics available for retrieval by cmdGetReaderStatistics. |
static class |
SerialReader.ReaderStats
Reader Stats |
static class |
SerialReader.ReaderStatsFlag
The Stats available for retrieval by cmdGetReaderStats. |
static class |
SerialReader.ReaderStatusFlag
The statistics available for retrieval by cmdGetReaderStatistics. |
static class |
SerialReader.RegionConfiguration
Region-specific parameters that are supported on the device. |
static class |
SerialReader.SetUserProfileOption
Operation Options for cmdSetUserProfile |
static class |
SerialReader.StatusReport
This object contains the information related to status reports sent by the module during continuous reading |
static class |
SerialReader.TemperatureStatusReport
|
static class |
SerialReader.TransportType
|
static class |
SerialReader.UserConfigOp
User Configuration Operation |
static class |
SerialReader.UserMode
The device user mode, for use in the /reader/userMode parameter, cmdGetUserMode() , and cmdSetUserMode(com.thingmagic.SerialReader.UserMode) . |
static class |
SerialReader.VersionInfo
Container class for the version information about the device, including a list of the protocols that are supported. |
static class |
SerialReader.VersionNumber
This class represents a version number for a component of the module. |
Nested classes/interfaces inherited from class com.thingmagic.Reader |
---|
Reader.GpioPin, Reader.LicenseOperation, Reader.LicenseOption, Reader.ReaderFeaturesFlag, Reader.Region, Reader.RegulatoryMode, Reader.RegulatoryModulation |
Field Summary | |
---|---|
boolean |
isM6eVariant
To fix Bug#5899 Making this flag true for M6e variant modules. |
boolean |
isTxRxMapSet
|
boolean |
isValidationSuccess
|
static int |
TMR_SR_LOGICALANTENNAS_ALLOWED
|
static int |
TMR_SR_MODEL_M4E
|
static int |
TMR_SR_MODEL_M5E
|
static int |
TMR_SR_MODEL_M5E_COMPACT
|
static int |
TMR_SR_MODEL_M5E_I
|
static int |
TMR_SR_MODEL_M5E_I_REV_EU
|
static int |
TMR_SR_MODEL_M5E_I_REV_JP
|
static int |
TMR_SR_MODEL_M5E_I_REV_NA
|
static int |
TMR_SR_MODEL_M5E_I_REV_PRC
|
static int |
TMR_SR_MODEL_M6E
|
static int |
TMR_SR_MODEL_M6E_I
|
static int |
TMR_SR_MODEL_M6E_I_JIC
|
static int |
TMR_SR_MODEL_M6E_I_PRC
|
static int |
TMR_SR_MODEL_M6E_I_REV1
|
static int |
TMR_SR_MODEL_M6E_MICRO
|
static int |
TMR_SR_MODEL_M6E_MICRO_USB
|
static int |
TMR_SR_MODEL_M6E_MICRO_USB_PRO
|
static int |
TMR_SR_MODEL_M6E_NANO
|
static int |
TMR_SR_MODEL_MICRO
|
Fields inherited from class com.thingmagic.Reader |
---|
featuresFlag, fetchTagReads, hasContinuousReadStarted, isOffTimeAdded, probeSettingPassed, simpleTransportListener, subOffTime, tagFetchTime |
Constructor Summary | |
---|---|
SerialReader(SerialTransport st)
|
Method Summary | |
---|---|
void |
addStatsListener(StatsListener listener)
Register a listener to be notified about the read stats |
void |
addStatusListener(StatusListener listener)
Register a listener to be notified about the read statistics |
void |
addTransportListener(TransportListener listener)
Register an object to be notified of serial packets. |
void |
blockErase(TagFilter target,
Gen2.Bank bank,
int wordPtr,
byte wordCount)
|
byte[] |
blockPermaLock(TagFilter target,
byte readLock,
Gen2.Bank bank,
int blockPtr,
byte blockRange,
short[] mask)
|
void |
blockWrite(TagFilter target,
Gen2.Bank bank,
int wordPtr,
byte wordCount,
short[] data)
|
short[] |
bytesToWords(byte[] bytes)
Converts byte array into word array |
void |
checkForSupportedFeatures()
This method will check whether the below features are supported by the reader or not. |
int[][] |
cmdAntennaDetect()
Deprecated. |
void |
cmdBlockErase(int timeout,
Gen2.Bank memBank,
int wordPtr,
byte wordCount,
int accessPassword,
TagFilter target)
|
byte[] |
cmdBlockPermaLock(int timeout,
byte readLock,
Gen2.Bank memBank,
int blockPtr,
byte blockRange,
short[] mask,
int accessPassword,
TagFilter target)
|
void |
cmdBlockWrite(int timeout,
Gen2.Bank memBank,
int wordPtr,
byte wordCount,
short[] data,
int accessPassword,
TagFilter target)
|
void |
cmdBootBootloader()
Deprecated. |
SerialReader.VersionInfo |
cmdBootFirmware()
Tell the boot loader to verify the application firmware and execute it. |
void |
cmdEraseBlockTagSpecific(int timeout,
Gen2.Bank bank,
int address,
int count)
Deprecated. |
void |
cmdEraseFlash(int sector,
int password)
Erase a sector of the device's flash. |
void |
cmdGen2LockTag(int timeout,
int mask,
int action,
int accessPassword,
TagFilter filter)
Deprecated. |
TagReadData |
cmdGen2ReadTagData(int timeout,
java.util.Set<TagReadData.TagMetadataFlag> metadataFlags,
int bankValue,
int address,
int length,
int accessPassword,
TagFilter filter)
Deprecated. |
SerialReader.AntennaPort |
cmdGetAntennaConfiguration()
Deprecated. |
int[][] |
cmdGetAntennaPortPowers()
Deprecated. |
int[][] |
cmdGetAntennaPortPowersAndSettlingTime(int column)
Deprecated. |
int[][] |
cmdGetAntennaSearchList()
Deprecated. |
TagProtocol[] |
cmdGetAvailableProtocols()
Deprecated. |
Reader.Region[] |
cmdGetAvailableRegions()
Deprecated. |
int |
cmdGetCurrentProgram()
Return the identity of the program currently running on the device (bootloader or application). |
int[] |
cmdGetFrequencyHopTable()
Deprecated. |
boolean |
cmdGetGPIODirection(int pin)
Deprecated. |
SerialReader.PowerMode |
cmdGetPowerMode()
Deprecated. |
TagProtocol |
cmdGetProtocol()
Deprecated. |
int |
cmdGetReadTxPower()
Deprecated. |
int[] |
cmdGetReadTxPowerWithLimits()
Deprecated. |
java.lang.Object |
cmdGetRegionConfiguration(SerialReader.RegionConfiguration key)
Deprecated. |
int |
cmdGetSectorSize(int sector)
Return the size of a flash sector of the device. |
java.lang.String |
cmdGetSerialNumber(int option,
int flags)
|
TagData[] |
cmdGetTagBuffer(int count,
boolean epc496,
TagProtocol protocol)
Deprecated. |
TagData[] |
cmdGetTagBuffer(int start,
int end,
boolean epc496,
TagProtocol protocol)
Deprecated. |
TagReadData[] |
cmdGetTagBuffer(java.util.Set<TagReadData.TagMetadataFlag> metadataFlags,
boolean resend,
TagProtocol protocol)
Deprecated. |
int[] |
cmdGetTagsRemaining()
Deprecated. |
int |
cmdGetTemperature()
Deprecated. |
int[] |
cmdGetTxRxPorts()
Deprecated. |
SerialReader.UserMode |
cmdGetUserMode()
Deprecated. |
byte[] |
cmdGetUserProfile(byte[] data)
get save/restore configuration |
int |
cmdGetWriteTxPower()
Deprecated. |
int[] |
cmdGetWriteTxPowerWithLimits()
Deprecated. |
void |
cmdHibikiBlockLock(int timeout,
int accessPassword,
int block,
int blockPassword,
int mask,
int action)
Deprecated. |
void |
cmdHibikiBlockReadLock(int timeout,
int accessPassword,
int block,
int blockPassword,
int mask,
int action)
Deprecated. |
SerialReader.HibikiSystemInformation |
cmdHibikiGetSystemInformation(int timeout,
int accessPassword)
Deprecated. |
void |
cmdHibikiReadLock(int timeout,
int accessPassword,
int mask,
int action)
Deprecated. |
void |
cmdHibikiSetAttenuate(int timeout,
int accessPassword,
int level,
boolean lock)
Deprecated. |
void |
cmdHibikiWriteMultipleWords(int timeout,
int accessPassword,
Gen2.Bank bank,
int wordOffset,
byte[] data)
Deprecated. |
void |
cmdKillTag(int timeout,
int killPassword,
TagFilter filter)
Deprecated. |
void |
cmdModifyFlash(int sector,
int address,
int password,
byte[] data,
int offset)
Deprecated. |
void |
cmdMultiProtocolSearch(int opcode,
java.util.List<SimpleReadPlan> plans,
java.util.Set<TagReadData.TagMetadataFlag> metadataFlags,
int antennas,
int timeout,
java.util.List<TagReadData> collectedTags)
multi protocol search |
byte[] |
cmdRaw(int timeout,
byte... message)
|
byte[] |
cmdReadFlash(int sector,
int address,
int length)
Deprecated. |
int[] |
cmdReadTagAndDataReadMultiple(int timeout,
SerialReader.AntennaSelection selection,
TagFilter filter,
int accessPassword,
Gen2.Bank bank,
int address,
int length)
Deprecated. |
int[] |
cmdReadTagAndDataWriteMultiple(int timeout,
SerialReader.AntennaSelection selection,
TagFilter filter,
int accessPassword,
Gen2.Bank bank,
int address,
byte[] data)
Deprecated. |
int[] |
cmdReadTagAndKillMultiple(int timeout,
SerialReader.AntennaSelection selection,
TagFilter filter,
int accessPassword,
int killPassword)
Deprecated. |
int[] |
cmdReadTagAndLockMultiple(int timeout,
SerialReader.AntennaSelection selection,
TagFilter filter,
int accessPassword,
int mask,
int action)
Deprecated. |
int |
cmdReadTagMultiple(int timeout,
SerialReader.AntennaSelection selection,
TagProtocol protocol,
TagFilter filter,
boolean fastSearch)
Search for tags for a specified amount of time. |
TagReadData |
cmdReadTagSingle(int timeout,
java.util.Set<TagReadData.TagMetadataFlag> metadataFlags,
TagFilter filter,
TagProtocol protocol)
Deprecated. |
void |
cmdResetReaderStatistics(java.util.Set<SerialReader.ReaderStatisticsFlag> stats)
Reset the per-port statistics. |
void |
cmdResetReaderStats(int flagBits)
Reset the per-port stats. |
void |
cmdSetAntennaPortPowers(int[][] list)
Deprecated. |
void |
cmdSetAntennaPortPowersAndSettlingTime(int[][] list,
int column)
Deprecated. |
void |
cmdSetAntennaReadTimeList(ReadPlan plan,
int timeout)
This method sets the antenna read time in the list as per the read plans |
void |
cmdSetAntennaSearchList(int[][] list)
Deprecated. |
void |
cmdSetFrequencyHopTable(int[] table)
Deprecated. |
void |
cmdSetGPIODirection(int pin,
boolean out)
Deprecated. |
void |
cmdSetPowerMode(SerialReader.PowerMode mode)
Deprecated. |
void |
cmdSetProtocolLicenseKey(Reader.LicenseOption option,
byte[] key)
set protocol license key |
void |
cmdSetReadTxPower(int centidBm)
Deprecated. |
void |
cmdSetRegionDwellTime(Reader.Region region,
int dwellTime)
|
void |
cmdSetRegionDwellTimeEnable(Reader.Region region,
boolean dwellTimeFlag)
|
void |
cmdSetRegionLbt(Reader.Region region,
boolean lbt)
|
void |
cmdSetRegionLbtThreshold(Reader.Region region,
int lbtThreshold)
|
void |
cmdSetTxRxPorts(int txPort,
int rxPort)
Deprecated. |
void |
cmdSetUserMode(SerialReader.UserMode mode)
Deprecated. |
void |
cmdSetUserProfile(SerialReader.SetUserProfileOption option,
SerialReader.ConfigKey key,
SerialReader.ConfigValue val)
Setting user profile on the basis of option,key and value parameter |
void |
cmdSetWriteTxPower(int centidBm)
Deprecated. |
void |
cmdTestSendCw(boolean on)
Turn CW transmission on or off. |
void |
cmdTestSendPrbs(int duration)
Turn on pseudo-random bit stream transmission for a particular duration. |
void |
cmdTestSendRegulatoryTest(Reader.RegulatoryMode mode,
Reader.RegulatoryModulation modulation,
int onTime,
int offTime,
boolean enable)
Turn ON PRBS/CW transmission for a particular duration(timed) or continuously until turn OFF command is issued. |
void |
cmdTestSetFrequency(int frequency)
Set the operating frequency of the device. |
boolean |
cmdVerifyImage()
Deprecated. |
void |
cmdWriteFlash(int sector,
int address,
int password,
byte[] data,
int offset)
Deprecated. |
void |
connect()
Open the communication channel and initialize the session with the reader. |
void |
destroy()
Shuts down the connection with the reader device. |
void |
doBackgroundReceiveAutonomousReading()
|
java.lang.Object |
executeTagOp(TagOp tagOP,
TagFilter target)
Handles tag operations |
void |
firmwareLoad(java.io.InputStream fwStr)
Load a new firmware image into the device's nonvolatile memory. |
void |
firmwareLoad(java.io.InputStream firmware,
FirmwareLoadOptions loadOptions)
Load a new firmware image into the device's nonvolatile memory. |
static java.util.Calendar |
fromSL900aTime(int t32)
|
int[][] |
getAntennaReturnLoss()
|
int[] |
getGPIODirection(boolean wantOut)
Deprecated. |
SerialTransport |
getSerialTransport()
|
Reader.GpioPin[] |
gpiGet()
gpiGet |
void |
gpoSet(Reader.GpioPin[] state)
gpoSet |
void |
killTag(TagFilter target,
TagAuthentication auth)
Kill a tag. |
void |
lockTag(TagFilter target,
TagLockAction lock)
Perform a lock or unlock operation on a tag. |
void |
lockTag(TagFilter target,
TagLockAction lock,
int accessPassword)
lock tag operation |
void |
msgSetupMultiProtocolSearch(int opcode,
java.util.List<SimpleReadPlan> plans,
java.util.Set<TagReadData.TagMetadataFlag> metadataFlags,
int antennas,
int timeout,
com.thingmagic.SerialReader.Message m)
prepare multi protocol search |
byte[] |
msgSetupReadTagSingle(java.util.Set<TagReadData.TagMetadataFlag> metadataFlags,
TagFilter filter,
TagProtocol protocol,
short timeout)
|
TagReadData[] |
read(long timeout)
reading tags for specified amount of time |
short[] |
readAfterwriteTagEPC(TagFilter filter,
TagData newID,
Gen2.Bank readBank,
int readAddress,
int readLen)
Read data from a memory bank after writing tag EPC |
byte[] |
readTagMemBytes(TagFilter target,
int bankValue,
int address,
int count)
read tag memory |
short[] |
readTagMemWords(TagFilter target,
int bank,
int address,
int count)
read tag memory in word format |
void |
reboot()
reboots the reader device. |
void |
receiveAutonomousReading()
|
void |
regionConfiguration(boolean LBTEnable,
int LBTThreshold,
boolean dwellTimeEnable,
int dwellTime)
|
void |
removeStatsListener(StatsListener listener)
remove a listener from the list of listeners to be notified of read stats |
void |
removeStatusListener(StatusListener listener)
remove a listener from the list of listeners to be notified of read statistics |
void |
removeTransportListener(TransportListener l)
Remove a listener from the list of listeners to be notified of message packets. |
void |
setAntennaReadTimeHelper(com.thingmagic.SerialReader.Message m,
ReadPlan plan,
int onTime,
int offTime)
Recursively assemble a setAntennaReadTime command |
void |
setGPIODirection(boolean wantOut,
int[] pins)
Deprecated. |
void |
setSerialBaudRate(int rate)
Set the baud rate of the serial port in use. |
void |
startReading()
Start reading RFID tags in the background. |
boolean |
stopReading()
Stop reading RFID tags in the background. |
static int |
toSL900aTime(java.util.Calendar calendar)
|
static int |
versionCompare(java.lang.String str1,
java.lang.String str2)
|
byte[] |
wordsToBytes(short[] data)
Converts word array into byte array |
void |
writeTag(TagFilter filter,
TagData newID)
Write a new ID to a tag. |
void |
writeTagMemBytes(TagFilter target,
int bank,
int address,
byte[] data)
write tag memory |
void |
writeTagMemWords(TagFilter target,
int bank,
int address,
short[] data)
write tag memory in terms of word data |
Methods inherited from class com.thingmagic.Reader |
---|
addReadAuthenticationListener, addReadExceptionListener, addReadListener, create, isAntDetectEnabled, loadConfig, paramGet, paramList, paramSet, removeReadAuthenticationListener, removeReadExceptionListener, removeReadListener, saveConfig, setSerialTransport |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public boolean isTxRxMapSet
public boolean isValidationSuccess
public boolean isM6eVariant
public static final int TMR_SR_MODEL_M5E
public static final int TMR_SR_MODEL_M5E_COMPACT
public static final int TMR_SR_MODEL_M5E_I
public static final int TMR_SR_MODEL_M4E
public static final int TMR_SR_MODEL_M6E
public static final int TMR_SR_MODEL_M6E_I
public static final int TMR_SR_MODEL_M6E_I_REV1
public static final int TMR_SR_MODEL_M6E_I_PRC
public static final int TMR_SR_MODEL_M6E_I_JIC
public static final int TMR_SR_MODEL_MICRO
public static final int TMR_SR_MODEL_M6E_MICRO
public static final int TMR_SR_MODEL_M6E_MICRO_USB
public static final int TMR_SR_MODEL_M6E_MICRO_USB_PRO
public static final int TMR_SR_MODEL_M6E_NANO
public static final int TMR_SR_MODEL_M5E_I_REV_EU
public static final int TMR_SR_MODEL_M5E_I_REV_NA
public static final int TMR_SR_MODEL_M5E_I_REV_JP
public static final int TMR_SR_MODEL_M5E_I_REV_PRC
public static final int TMR_SR_LOGICALANTENNAS_ALLOWED
Constructor Detail |
---|
public SerialReader(SerialTransport st) throws ReaderException
ReaderException
Method Detail |
---|
public void receiveAutonomousReading()
receiveAutonomousReading
in class Reader
public void doBackgroundReceiveAutonomousReading()
public void startReading()
Reader
startReading
in class Reader
Reader.addReadListener(com.thingmagic.ReadListener)
,
Reader.addReadExceptionListener(com.thingmagic.ReadExceptionListener)
public void checkForSupportedFeatures()
public static int versionCompare(java.lang.String str1, java.lang.String str2)
public boolean stopReading()
Reader
stopReading
in class Reader
public void firmwareLoad(java.io.InputStream firmware, FirmwareLoadOptions loadOptions) throws ReaderException, java.io.IOException
Reader
firmwareLoad
in class Reader
firmware
- a data stream of the firmware contents
ReaderException
java.io.IOException
public static int toSL900aTime(java.util.Calendar calendar) throws ReaderException
ReaderException
public static java.util.Calendar fromSL900aTime(int t32)
public byte[] cmdRaw(int timeout, byte... message) throws ReaderException
ReaderException
public void addTransportListener(TransportListener listener)
addTransportListener
in class Reader
listener
- the SerialListener to addpublic void removeTransportListener(TransportListener l)
Reader
removeTransportListener
in class Reader
l
- the TransportListener to addpublic void addStatusListener(StatusListener listener)
Reader
addStatusListener
in class Reader
listener
- - StatusLisenter to addpublic void removeStatusListener(StatusListener listener)
Reader
removeStatusListener
in class Reader
listener
- - StatusListener to removepublic void addStatsListener(StatsListener listener)
Reader
addStatsListener
in class Reader
listener
- - StatsLisenter to addpublic void removeStatsListener(StatsListener listener)
Reader
removeStatsListener
in class Reader
listener
- - StatsListener to removepublic void setSerialBaudRate(int rate) throws ReaderException
NOTE: This is a low-level command and should only be used in conjunction with cmdSetBaudRate() or cmdBootBootloader() below. For changing the rate used by the API in general, see the "/reader/baudRate" parameter.
ReaderException
public byte[] cmdReadFlash(int sector, int address, int length) throws ReaderException
sector
- the flash sector, as described in the embedded module user manualaddress
- the byte address to start reading fromlength
- the number of bytes to read. Limited to 248 bytes.
ReaderException
public SerialReader.VersionInfo cmdBootFirmware() throws ReaderException
ReaderException
public boolean cmdVerifyImage() throws ReaderException
ReaderException
public void cmdEraseFlash(int sector, int password) throws ReaderException
sector
- the flash sector, as described in the embedded
module user manualpassword
- the erase password for the sector
ReaderException
public void cmdWriteFlash(int sector, int address, int password, byte[] data, int offset) throws ReaderException
sector
- the flash sector, as described in the embedded module user manualaddress
- the byte address to start writing frompassword
- the write password for the sectordata
- the data to write (from offset to offset + length - 1)offset
- the index of the data to be written in the data array
ReaderException
public int cmdGetSectorSize(int sector) throws ReaderException
sector
- the flash sector, as described in the embedded module user manual
ReaderException
public void cmdModifyFlash(int sector, int address, int password, byte[] data, int offset) throws ReaderException
sector
- the flash sector, as described in the embedded module user manualaddress
- the byte address to start writing frompassword
- the write password for the sectordata
- the data to write (from offset to offset + length - 1)offset
- the index of the data to be writtin in the data array
ReaderException
public void cmdBootBootloader() throws ReaderException
ReaderException
public int cmdGetCurrentProgram() throws ReaderException
ReaderException
public TagReadData cmdReadTagSingle(int timeout, java.util.Set<TagReadData.TagMetadataFlag> metadataFlags, TagFilter filter, TagProtocol protocol) throws ReaderException
timeout
- the duration in milliseconds to search for a tag. Valid range is 0-65535metadataFlags
- the set of metadata values to retrieve and store in the returned objectfilter
- a specification of the air protocol filtering to performprotocol
- the protocol to expect in the returned data
ReaderException
public int cmdReadTagMultiple(int timeout, SerialReader.AntennaSelection selection, TagProtocol protocol, TagFilter filter, boolean fastSearch) throws ReaderException
timeout
- the duration in milliseconds to search for
tags. Valid range is 0-65535selection
- the antenna or antennas to use for the searchfilter
- a specification of the air protocol filtering to perform
ReaderException
cmdGetTagBuffer(int, boolean, com.thingmagic.TagProtocol)
public int[] cmdReadTagAndKillMultiple(int timeout, SerialReader.AntennaSelection selection, TagFilter filter, int accessPassword, int killPassword) throws ReaderException
timeout
- the duration in milliseconds to search for
tags. Valid range is 0-65535selection
- the antenna or antennas to use for the searchfilter
- a specification of the air protocol filtering to performaccessPassword
- the access password to use when killing the tagkillPassword
- the kill password to use when killing found tags
ReaderException
public int[] cmdReadTagAndLockMultiple(int timeout, SerialReader.AntennaSelection selection, TagFilter filter, int accessPassword, int mask, int action) throws ReaderException
timeout
- the duration in milliseconds to search for
tags. Valid range is 0-65535selection
- the antenna or antennas to use for the searchaccessPassword
- the password to use when locking the tagfilter
- a specification of the air protocol filtering to performmask
- the Gen2 lock maskaction
- the Gen2 lock action
ReaderException
public int[] cmdReadTagAndDataWriteMultiple(int timeout, SerialReader.AntennaSelection selection, TagFilter filter, int accessPassword, Gen2.Bank bank, int address, byte[] data) throws ReaderException
timeout
- the duration in milliseconds to search for
tags. Valid range is 0-65535selection
- the antenna or antennas to use for the searchfilter
- a specification of the air protocol filtering to performaccessPassword
- the password to use when writing the tagbank
- the Gen2 memory bank to write toaddress
- the word address to start writing atdata
- the data to write
ReaderException
public int[] cmdReadTagAndDataReadMultiple(int timeout, SerialReader.AntennaSelection selection, TagFilter filter, int accessPassword, Gen2.Bank bank, int address, int length) throws ReaderException
timeout
- the duration in milliseconds to search for
tags. Valid range is 0-65535selection
- the antenna or antennas to use for the searchfilter
- a specification of the air protocol filtering to performaccessPassword
- the password to use when writing the tagbank
- the Gen2 memory bank to read fromaddress
- the word address to start reading fromlength
- the number of words to read. Only two words per tag
will be stored in the tag buffer.
ReaderException
public void cmdGen2LockTag(int timeout, int mask, int action, int accessPassword, TagFilter filter) throws ReaderException
timeout
- the duration in milliseconds to search for
a tag to lock. Valid range is 0-65535mask
- the Gen2 lock maskaction
- the Gen2 lock actionaccessPassword
- the password to use when locking the tagfilter
- a specification of the air protocol filtering to perform
ReaderException
public void cmdKillTag(int timeout, int killPassword, TagFilter filter) throws ReaderException
timeout
- the duration in milliseconds to search for
a tag to kill. Valid range is 0-65535killPassword
- the tag kill passwordfilter
- a specification of the air protocol filtering to perform
ReaderException
public TagReadData cmdGen2ReadTagData(int timeout, java.util.Set<TagReadData.TagMetadataFlag> metadataFlags, int bankValue, int address, int length, int accessPassword, TagFilter filter) throws ReaderException
timeout
- the duration in milliseconds to search for the operation. Valid range is 0-65535metadataFlags
- the set of metadata values to retrieve and store in the returned objectbank
- the Gen2 memory bank to read fromaddress
- the word address to start reading fromlength
- the number of words to read.accessPassword
- the password to use when writing the tagfilter
- a specification of the air protocol filtering to perform
ReaderException
public int[] cmdGetTagsRemaining() throws ReaderException
ReaderException
public TagData[] cmdGetTagBuffer(int count, boolean epc496, TagProtocol protocol) throws ReaderException
count
- the maximum of tags to get from the buffer. No more
than 65535 may be requested. It is an error to request more tags
than exist.epc496
- Whether the EPCs expected are 496 bits (true) or 96 bits (false)
ReaderException
public TagData[] cmdGetTagBuffer(int start, int end, boolean epc496, TagProtocol protocol) throws ReaderException
start
- the start index to read fromend
- the end index to read toepc496
- Whether the EPCs expected are 496 bits (true) or 96 bits (false)
ReaderException
public TagReadData[] cmdGetTagBuffer(java.util.Set<TagReadData.TagMetadataFlag> metadataFlags, boolean resend, TagProtocol protocol) throws ReaderException
metadataFlags
- the set of metadata values to retrieve and store in the returned objectsresend
- whether to resend the same tag data sent in a previous call
ReaderException
public void cmdHibikiReadLock(int timeout, int accessPassword, int mask, int action) throws ReaderException
timeout
- the timeout of the operation, in milliseconds.
Valid range is 0-65535.accessPassword
- the access password to use to write to the tagmask
- bitmask of read lock bits to alteraction
- action value of read lock bits to alter
ReaderException
public SerialReader.HibikiSystemInformation cmdHibikiGetSystemInformation(int timeout, int accessPassword) throws ReaderException
timeout
- the timeout of the operation, in milliseconds.
Valid range is 0-65535.accessPassword
- the access password to use to write to the tag
ReaderException
public void cmdHibikiSetAttenuate(int timeout, int accessPassword, int level, boolean lock) throws ReaderException
timeout
- the timeout of the operation, in milliseconds.
Valid range is 0-65535.accessPassword
- the access password to use to write to the taglevel
- the attenuation level to setlock
- whether to permanently lock the attenuation level
ReaderException
public void cmdHibikiBlockLock(int timeout, int accessPassword, int block, int blockPassword, int mask, int action) throws ReaderException
timeout
- the timeout of the operation, in milliseconds.
Valid range is 0-65535.accessPassword
- the access password to use to write to the tagblock
- the block of memory to operate onblockPassword
- the password for the blockmask
- bitmask of lock bits to alteraction
- value of lock bits to alter
ReaderException
public void cmdHibikiBlockReadLock(int timeout, int accessPassword, int block, int blockPassword, int mask, int action) throws ReaderException
timeout
- the timeout of the operation, in milliseconds.
Valid range is 0-65535.accessPassword
- the access password to use to write to the tagblock
- the block of memory to operate onblockPassword
- the password for the blockmask
- bitmask of read lock bits to alteraction
- value of read lock bits to alter
ReaderException
public void cmdHibikiWriteMultipleWords(int timeout, int accessPassword, Gen2.Bank bank, int wordOffset, byte[] data) throws ReaderException
timeout
- the timeout of the operation, in milliseconds.
Valid range is 0-65535.accessPassword
- the access password to use to write to the tagbank
- the Gen2 memory bank to write towordOffset
- the word address to start writing atdata
- the data to write - must be an even number of bytes
ReaderException
public void cmdEraseBlockTagSpecific(int timeout, Gen2.Bank bank, int address, int count) throws ReaderException
bank
- the Gen2 memory bank to erase words inaddress
- the word address to start erasing atcount
- the number of words to erase
ReaderException
public java.lang.String cmdGetSerialNumber(int option, int flags) throws ReaderException
ReaderException
public int[] cmdGetTxRxPorts() throws ReaderException
ReaderException
public SerialReader.AntennaPort cmdGetAntennaConfiguration() throws ReaderException
ReaderException
public int[][] cmdGetAntennaSearchList() throws ReaderException
ReaderException
public int[][] getAntennaReturnLoss() throws ReaderException
ReaderException
public int[][] cmdGetAntennaPortPowers() throws ReaderException
ReaderException
public int[][] cmdGetAntennaPortPowersAndSettlingTime(int column) throws ReaderException
ReaderException
public int[][] cmdAntennaDetect() throws ReaderException
ReaderException
public int cmdGetReadTxPower() throws ReaderException
ReaderException
public int[] cmdGetReadTxPowerWithLimits() throws ReaderException
ReaderException
public int cmdGetWriteTxPower() throws ReaderException
ReaderException
public TagProtocol cmdGetProtocol() throws ReaderException
ReaderException
public int[] cmdGetWriteTxPowerWithLimits() throws ReaderException
ReaderException
public int[] cmdGetFrequencyHopTable() throws ReaderException
ReaderException
public java.lang.Object cmdGetRegionConfiguration(SerialReader.RegionConfiguration key) throws ReaderException
key
- the setting
ReaderException
public SerialReader.PowerMode cmdGetPowerMode() throws ReaderException
ReaderException
public SerialReader.UserMode cmdGetUserMode() throws ReaderException
ReaderException
public TagProtocol[] cmdGetAvailableProtocols() throws ReaderException
ReaderException
public Reader.Region[] cmdGetAvailableRegions() throws ReaderException
ReaderException
public int cmdGetTemperature() throws ReaderException
ReaderException
public void cmdSetTxRxPorts(int txPort, int rxPort) throws ReaderException
txPort
- the logical antenna port to use for transmittingrxPort
- the logical antenna port to use for receiving
ReaderException
public void cmdSetAntennaSearchList(int[][] list) throws ReaderException
list
- the ordered search list. An array of 2-element arrays
of integers interpreted as (tx port, rx port) pairs. Example,
representing a monostatic antenna on port 1 and a bistatic
antenna pair on ports 3 and 4: {{1, 1}, {3, 4}}
ReaderException
public void cmdSetAntennaReadTimeList(ReadPlan plan, int timeout) throws ReaderException
plan
- - the read plantimeout
- - the read timeout
ReaderException
public void cmdSetAntennaPortPowers(int[][] list) throws ReaderException
list
- an array of 3-element arrays of integers interpreted as
(tx port, read power in centidBm, write power in centidBm)
triples. Example, with read power levels of 30 dBm and write
power levels of 25 dBm : {{1, 3000, 2500}, {2, 3000, 2500}}
ReaderException
public void cmdSetAntennaPortPowersAndSettlingTime(int[][] list, int column) throws ReaderException
list
- an array of 4-element arrays of integers interpreted as
(tx port, read power in centidBm, write power in centidBm,
settling time in microseconds) tuples. An example with two
antenna ports, read power levels of 30 dBm, write power levels of
25 dBm, and 500us settling times:
{{1, 3000, 2500, 500}, {2, 3000, 2500, 500}}
ReaderException
public void setAntennaReadTimeHelper(com.thingmagic.SerialReader.Message m, ReadPlan plan, int onTime, int offTime) throws ReaderException
m
- Message object used for framing serial commandplan
- Read plan (recursively descended)onTime
- Number of milliseconds of read time alloted to this read planoffTime
- Number of milliseconds of OFF time alloted to this read plan
ReaderException
public void cmdSetReadTxPower(int centidBm) throws ReaderException
centidBm
- the power level
ReaderException
public void cmdSetWriteTxPower(int centidBm) throws ReaderException
centidBm
- the power level.
ReaderException
public void cmdSetFrequencyHopTable(int[] table) throws ReaderException
table
- A list of frequencies, in kHz. The list may be at
most 62 elements.
ReaderException
public void cmdSetProtocolLicenseKey(Reader.LicenseOption option, byte[] key) throws ReaderException
key
- license key
ReaderException
public boolean cmdGetGPIODirection(int pin) throws ReaderException
pin
- GPIO pin number
ReaderException
public void cmdSetGPIODirection(int pin, boolean out) throws ReaderException
pin
- GPIO pin numberout
- true for output, false for input
ReaderException
public int[] getGPIODirection(boolean wantOut) throws ReaderException
wantOut
- false = get inputs, true = get outputs
ReaderException
public void setGPIODirection(boolean wantOut, int[] pins) throws ReaderException
wantOut
- false = input, true = outputpins
- GPIO pins to set to the desired direction. All other pins implicitly set the other way.
ReaderException
public void regionConfiguration(boolean LBTEnable, int LBTThreshold, boolean dwellTimeEnable, int dwellTime) throws ReaderException
regionConfiguration
in class Reader
ReaderException
public void cmdSetRegionLbt(Reader.Region region, boolean lbt) throws ReaderException
ReaderException
public void cmdSetRegionDwellTimeEnable(Reader.Region region, boolean dwellTimeFlag) throws ReaderException
ReaderException
public void cmdSetRegionDwellTime(Reader.Region region, int dwellTime) throws ReaderException
ReaderException
public void cmdSetRegionLbtThreshold(Reader.Region region, int lbtThreshold) throws ReaderException
ReaderException
public void cmdSetPowerMode(SerialReader.PowerMode mode) throws ReaderException
mode
- the mode to set
ReaderException
public void cmdSetUserMode(SerialReader.UserMode mode) throws ReaderException
mode
- the mode to set
ReaderException
public void cmdSetUserProfile(SerialReader.SetUserProfileOption option, SerialReader.ConfigKey key, SerialReader.ConfigValue val) throws ReaderException
option
- Save,restore,verify and reset configurationkey
- Which part of configuration to operate onval
- Type of configuration value to use (default, custom...)
ReaderException
public byte[] cmdGetUserProfile(byte[] data)
data
- Byte array consisting of opcode option
public void cmdResetReaderStatistics(java.util.Set<SerialReader.ReaderStatisticsFlag> stats) throws ReaderException
stats
- the set of statistics to reset. Only the RF on time statistic
may be reset.
ReaderException
public void cmdResetReaderStats(int flagBits) throws ReaderException
flagBits
- the set of stats to reset. Only the RF on time stats
may be reset.
ReaderException
public void cmdTestSetFrequency(int frequency) throws ReaderException
frequency
- the frequency to set, in kHz
ReaderException
public void cmdTestSendCw(boolean on) throws ReaderException
on
- whether to turn CW on or off
ReaderException
public void cmdTestSendPrbs(int duration) throws ReaderException
duration
- the duration to transmit the PRBS signal. Valid
range is 0-65535
ReaderException
public void cmdTestSendRegulatoryTest(Reader.RegulatoryMode mode, Reader.RegulatoryModulation modulation, int onTime, int offTime, boolean enable) throws ReaderException
mode
- the mode to operate on - Continuous or Time basedmodulation
- the modulation is either CW or PRBSonTime
- the duration to transmit the PRBS signal. Valid
range is 0-65535offTime
- the duration to transmit the PRBS signal. Valid
range is 0-65535enable
- flag which tells to turn ON or turn OFF CW/PRBS
value is either true or false.
ReaderException
public SerialTransport getSerialTransport()
public void connect() throws ReaderException
Reader
connect
in class Reader
ReaderException
public void reboot() throws ReaderException
Reader
reboot
in class Reader
ReaderException
public void destroy()
Reader
destroy
in class Reader
public TagReadData[] read(long timeout) throws ReaderException
read
in class Reader
timeout
-
ReaderException
TagReadData
public void writeTag(TagFilter filter, TagData newID) throws ReaderException
Reader
writeTag
in class Reader
filter
- the tag to write to, or nullnewID
- the new tag ID to write
ReaderException
public short[] readAfterwriteTagEPC(TagFilter filter, TagData newID, Gen2.Bank readBank, int readAddress, int readLen) throws ReaderException
filter
- a specification of the air protocol filtering to
perform to find the tagnewID
- the EPC to write to the tagreadBank
- the Gen2 memory bank to read fromreadAddress
- the word address to start reading fromreadLen
- the number of words to read
ReaderException
public void killTag(TagFilter target, TagAuthentication auth) throws ReaderException
Reader
killTag
in class Reader
target
- the tag kill, or nullauth
- the authentication needed to kill the tag
ReaderException
public byte[] readTagMemBytes(TagFilter target, int bankValue, int address, int count) throws ReaderException
readTagMemBytes
in class Reader
target
- bank
- address
- count
-
ReaderException
public short[] readTagMemWords(TagFilter target, int bank, int address, int count) throws ReaderException
readTagMemWords
in class Reader
target
- bank
- address
- count
-
ReaderException
public void writeTagMemBytes(TagFilter target, int bank, int address, byte[] data) throws ReaderException
writeTagMemBytes
in class Reader
target
- bank
- address
- data
-
ReaderException
public void writeTagMemWords(TagFilter target, int bank, int address, short[] data) throws ReaderException
writeTagMemWords
in class Reader
target
- bank
- address
- data
-
ReaderException
public byte[] wordsToBytes(short[] data) throws ReaderException
data
-
ReaderException
public short[] bytesToWords(byte[] bytes) throws ReaderException
bytes
-
ReaderException
public void lockTag(TagFilter target, TagLockAction lock) throws ReaderException
Reader
lockTag
in class Reader
target
- the tag to lock, or nulllock
- the locking action to take.
ReaderException
public void lockTag(TagFilter target, TagLockAction lock, int accessPassword) throws ReaderException
target
- lock
- accessPassword
-
ReaderException
public void blockWrite(TagFilter target, Gen2.Bank bank, int wordPtr, byte wordCount, short[] data) throws ReaderException
ReaderException
public byte[] blockPermaLock(TagFilter target, byte readLock, Gen2.Bank bank, int blockPtr, byte blockRange, short[] mask) throws ReaderException
ReaderException
public void blockErase(TagFilter target, Gen2.Bank bank, int wordPtr, byte wordCount) throws ReaderException
ReaderException
public void cmdBlockWrite(int timeout, Gen2.Bank memBank, int wordPtr, byte wordCount, short[] data, int accessPassword, TagFilter target) throws ReaderException
ReaderException
public byte[] cmdBlockPermaLock(int timeout, byte readLock, Gen2.Bank memBank, int blockPtr, byte blockRange, short[] mask, int accessPassword, TagFilter target) throws ReaderException
ReaderException
public void cmdBlockErase(int timeout, Gen2.Bank memBank, int wordPtr, byte wordCount, int accessPassword, TagFilter target) throws ReaderException
ReaderException
public Reader.GpioPin[] gpiGet() throws ReaderException
gpiGet
in class Reader
ReaderException
public void gpoSet(Reader.GpioPin[] state) throws ReaderException
gpoSet
in class Reader
state
- array of GpioPin (id, high) settings (output field is ignored)
ReaderException
public void firmwareLoad(java.io.InputStream fwStr) throws ReaderException, java.io.IOException
Reader
firmwareLoad
in class Reader
fwStr
- a data stream of the firmware contents
ReaderException
java.io.IOException
public java.lang.Object executeTagOp(TagOp tagOP, TagFilter target) throws ReaderException
executeTagOp
in class Reader
tagOP
- target
-
ReaderException
public void msgSetupMultiProtocolSearch(int opcode, java.util.List<SimpleReadPlan> plans, java.util.Set<TagReadData.TagMetadataFlag> metadataFlags, int antennas, int timeout, com.thingmagic.SerialReader.Message m) throws ReaderException
opcode
- plans
- metadataFlags
- antennas
- timeout
- m
-
ReaderException
public void cmdMultiProtocolSearch(int opcode, java.util.List<SimpleReadPlan> plans, java.util.Set<TagReadData.TagMetadataFlag> metadataFlags, int antennas, int timeout, java.util.List<TagReadData> collectedTags) throws ReaderException
opcode
- plans
- metadataFlags
- antennas
- timeout
- collectedTags
-
ReaderException
public byte[] msgSetupReadTagSingle(java.util.Set<TagReadData.TagMetadataFlag> metadataFlags, TagFilter filter, TagProtocol protocol, short timeout)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |