## com.thingmagic
Class SerialReader

    java.lang.Object
      com.thingmagic.Reader
          com.thingmagic.SerialReader

    public class SerialReader

extends Reader

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.Region`

Field Summary
`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
`hasContinuousReadStarted, simpleTransportListener`

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
`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()` 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)` Deprecated.
`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` `cmdSetRegionLbt(Reader.Region region, boolean lbt)`
`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` `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` `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` `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, 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

### TMR_SR_MODEL_M5E

    public static final int TMR_SR_MODEL_M5E

See Also:
  Constant Field Values

### TMR_SR_MODEL_M5E_COMPACT

    public static final int TMR_SR_MODEL_M5E_COMPACT

See Also:
  Constant Field Values

### TMR_SR_MODEL_M5E_I

    public static final int TMR_SR_MODEL_M5E_I

See Also:
  Constant Field Values

### TMR_SR_MODEL_M4E

    public static final int TMR_SR_MODEL_M4E

See Also:
  Constant Field Values

### TMR_SR_MODEL_M6E

    public static final int TMR_SR_MODEL_M6E

See Also:
  Constant Field Values

### TMR_SR_MODEL_M6E_I

    public static final int TMR_SR_MODEL_M6E_I

See Also:
  Constant Field Values

### TMR_SR_MODEL_M6E_I_REV1

    public static final int TMR_SR_MODEL_M6E_I_REV1

See Also:
  Constant Field Values

### TMR_SR_MODEL_M6E_I_PRC

    public static final int TMR_SR_MODEL_M6E_I_PRC

See Also:
  Constant Field Values

### TMR_SR_MODEL_M6E_I_JIC

    public static final int TMR_SR_MODEL_M6E_I_JIC

See Also:
  Constant Field Values

### TMR_SR_MODEL_MICRO

    public static final int TMR_SR_MODEL_MICRO

See Also:
  Constant Field Values

### TMR_SR_MODEL_M6E_MICRO

    public static final int TMR_SR_MODEL_M6E_MICRO

See Also:
  Constant Field Values

### TMR_SR_MODEL_M6E_MICRO_USB

    public static final int TMR_SR_MODEL_M6E_MICRO_USB

See Also:
  Constant Field Values

### TMR_SR_MODEL_M6E_MICRO_USB_PRO

    public static final int TMR_SR_MODEL_M6E_MICRO_USB_PRO

See Also:
  Constant Field Values

### TMR_SR_MODEL_M6E_NANO

    public static final int TMR_SR_MODEL_M6E_NANO

See Also:
  Constant Field Values

### TMR_SR_MODEL_M5E_I_REV_EU

    public static final int TMR_SR_MODEL_M5E_I_REV_EU

See Also:
  Constant Field Values

### TMR_SR_MODEL_M5E_I_REV_NA

    public static final int TMR_SR_MODEL_M5E_I_REV_NA

See Also:
  Constant Field Values

### TMR_SR_MODEL_M5E_I_REV_JP

    public static final int TMR_SR_MODEL_M5E_I_REV_JP

See Also:
  Constant Field Values

### TMR_SR_MODEL_M5E_I_REV_PRC

    public static final int TMR_SR_MODEL_M5E_I_REV_PRC

See Also:
  Constant Field Values

Constructor Detail

### SerialReader

    public SerialReader(SerialTransport st)
                 throws ReaderException

Throws:
  `ReaderException`

Method Detail

### receiveAutonomousReading

    public void receiveAutonomousReading()

  Specified by:
    `receiveAutonomousReading` in class `Reader`

### doBackgroundReceiveAutonomousReading

    public void doBackgroundReceiveAutonomousReading()

### startReading

    public void startReading()

  Description copied from class: `Reader`
  Start reading RFID tags in the background. The tags found will be passed to the registered read listeners, and any exceptions that occur during reading will be passed to the registered exception listeners. Reading will continue until stopReading() is called.

  Specified by:
    `startReading` in class `Reader`
  See Also:
    `Reader.addReadListener(com.thingmagic.ReadListener)`, `Reader.addReadExceptionListener(com.thingmagic.ReadExceptionListener)`

### versionCompare

    public static int versionCompare(java.lang.String str1,
                                     java.lang.String str2)

### stopReading

    public boolean stopReading()

  Description copied from class: `Reader`
  Stop reading RFID tags in the background.

  Specified by:
    `stopReading` in class `Reader`
  Returns:
    stop reading success or failure

### firmwareLoad

    public void firmwareLoad(java.io.InputStream firmware,
                             FirmwareLoadOptions loadOptions)
                      throws ReaderException,
                             java.io.IOException

  Description copied from class: `Reader`
  Load a new firmware image into the device's nonvolatile memory. This installs the given image data onto the device and restarts it with that image. The firmware must be of an appropriate type for the device. Interrupting this operation may damage the reader.

  Specified by:
    `firmwareLoad` in class `Reader`
  Parameters:
    `firmware` - a data stream of the firmware contents
  Throws:
    `ReaderException`
    `java.io.IOException`

### toSL900aTime

    public static int toSL900aTime(java.util.Calendar calendar)
                            throws ReaderException

  Throws:
    `ReaderException`

### fromSL900aTime

    public static java.util.Calendar fromSL900aTime(int t32)

### cmdRaw

    public byte[] cmdRaw(int timeout,
                         byte... message)
                  throws ReaderException

  Throws:
    `ReaderException`

### addTransportListener

    public void addTransportListener(TransportListener listener)

  Register an object to be notified of serial packets.

  Specified by:
    `addTransportListener` in class `Reader`
  Parameters:
    `listener` - the SerialListener to add

### removeTransportListener

    public void removeTransportListener(TransportListener l)

  Description copied from class: `Reader`
  Remove a listener from the list of listeners to be notified of message packets.

  Specified by:
    `removeTransportListener` in class `Reader`
  Parameters:
    `l` - the TransportListener to add

### addStatusListener

    public void addStatusListener(StatusListener listener)

  Description copied from class: `Reader`
  Register a listener to be notified about the read statistics

  Specified by:
    `addStatusListener` in class `Reader`
  Parameters:
    `listener` - - StatusLisenter to add

### removeStatusListener

    public void removeStatusListener(StatusListener listener)

  Description copied from class: `Reader`
  remove a listener from the list of listeners to be notified of read statistics

  Specified by:
    `removeStatusListener` in class `Reader`
  Parameters:
    `listener` - - StatusListener to remove

### addStatsListener

    public void addStatsListener(StatsListener listener)

  Description copied from class: `Reader`
  Register a listener to be notified about the read stats

  Specified by:
    `addStatsListener` in class `Reader`
  Parameters:
    `listener` - - StatsLisenter to add

### removeStatsListener

    public void removeStatsListener(StatsListener listener)

  Description copied from class: `Reader`
  remove a listener from the list of listeners to be notified of read stats

  Specified by:
    `removeStatsListener` in class `Reader`
  Parameters:
    `listener` - - StatsListener to remove

### setSerialBaudRate

    public void setSerialBaudRate(int rate)
                           throws ReaderException

  Set the baud rate of the serial port in use.

  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.

  Throws:
    `ReaderException`

### cmdReadFlash

    public byte[] cmdReadFlash(int sector,
                               int address,
                               int length)
                        throws ReaderException

  Deprecated.

  Read the contents of flash from the specified address in the specified flash sector.

  Parameters:
    `sector` - the flash sector, as described in the embedded module user manual
    `address` - the byte address to start reading from
    `length` - the number of bytes to read. Limited to 248 bytes.
  Returns:
    the bytes read
  Throws:
    `ReaderException`

### cmdBootFirmware

    public SerialReader.VersionInfo cmdBootFirmware()
                                             throws ReaderException

  Tell the boot loader to verify the application firmware and execute it.

  Throws:
    `ReaderException`

### cmdVerifyImage

    public boolean cmdVerifyImage()
                           throws ReaderException

  Deprecated.

  Verify that the application image in flash has a valid checksum. The device will report an invalid checksum with a error code response, which would normally generate a ReaderCodeException; this routine traps that particular exception and simply returns "false".

  Returns:
    whether the image is valid
  Throws:
    `ReaderException`

### cmdEraseFlash

    public void cmdEraseFlash(int sector,
                              int password)
                       throws ReaderException

  Erase a sector of the device's flash.

  Parameters:
    `sector` - the flash sector, as described in the embedded module user manual
    `password` - the erase password for the sector
  Throws:
    `ReaderException`

### cmdWriteFlash

    public void cmdWriteFlash(int sector,
                              int address,
                              int password,
                              byte[] data,
                              int offset)
                       throws ReaderException

  Deprecated.

  Write data to a previously erased region of the device's flash.

  Parameters:
    `sector` - the flash sector, as described in the embedded module user manual
    `address` - the byte address to start writing from
    `password` - the write password for the sector
    `data` - the data to write (from offset to offset + length - 1)
    `offset` - the index of the data to be written in the data array
  Throws:
    `ReaderException`

### cmdGetSectorSize

    public int cmdGetSectorSize(int sector)
                         throws ReaderException

  Return the size of a flash sector of the device.

  Parameters:
    `sector` - the flash sector, as described in the embedded module user manual
  Throws:
    `ReaderException`

### cmdModifyFlash

    public void cmdModifyFlash(int sector,
                               int address,
                               int password,
                               byte[] data,
                               int offset)
                        throws ReaderException

  Deprecated.

  Write data to the device's flash, erasing if necessary.

  Parameters:
    `sector` - the flash sector, as described in the embedded module user manual
    `address` - the byte address to start writing from
    `password` - the write password for the sector
    `data` - the data to write (from offset to offset + length - 1)
    `offset` - the index of the data to be writtin in the data array
  Throws:
    `ReaderException`

### cmdBootBootloader

    public void cmdBootBootloader()
                           throws ReaderException

  Deprecated.

  Quit running the application and execute the bootloader. Note that this changes the reader's baud rate to 9600; the user is responsible for changing the local serial sort speed.

  Throws:
    `ReaderException`

### cmdGetCurrentProgram

    public int cmdGetCurrentProgram()
                             throws ReaderException

  Return the identity of the program currently running on the device (bootloader or application).

  Throws:
    `ReaderException`

### cmdReadTagSingle

    public TagReadData cmdReadTagSingle(int timeout,
                                        java.util.Set<TagReadData.TagMetadataFlag> metadataFlags,
                                        TagFilter filter,
                                        TagProtocol protocol)
                                 throws ReaderException

  Deprecated.

  Search for a single tag for up to a specified amount of time.

  Parameters:
    `timeout` - the duration in milliseconds to search for a tag. Valid range is 0-65535
    `metadataFlags` - the set of metadata values to retrieve and store in the returned object
    `filter` - a specification of the air protocol filtering to perform
    `protocol` - the protocol to expect in the returned data
  Returns:
    a TagReadData object containing the tag found and the metadata associated with the successful search, or null if no tag is found.
  Throws:
    `ReaderException`

### cmdReadTagMultiple

    public int cmdReadTagMultiple(int timeout,
                                  SerialReader.AntennaSelection selection,
                                  TagProtocol protocol,
                                  TagFilter filter,
                                  boolean fastSearch)
                           throws ReaderException

  Search for tags for a specified amount of time.

  Parameters:
    `timeout` - the duration in milliseconds to search for tags. Valid range is 0-65535
    `selection` - the antenna or antennas to use for the search
    `filter` - a specification of the air protocol filtering to perform
  Returns:
    the number of tags found
  Throws:
    `ReaderException`
  See Also:
    `cmdGetTagBuffer(int, boolean, com.thingmagic.TagProtocol)`

### cmdReadTagAndKillMultiple

    public int[] cmdReadTagAndKillMultiple(int timeout,
                                           SerialReader.AntennaSelection selection,
                                           TagFilter filter,
                                           int accessPassword,
                                           int killPassword)
                                    throws ReaderException

  Deprecated.

  Search for tags for a specified amount of time and kill each one.

  Parameters:
    `timeout` - the duration in milliseconds to search for tags. Valid range is 0-65535
    `selection` - the antenna or antennas to use for the search
    `filter` - a specification of the air protocol filtering to perform
    `accessPassword` - the access password to use when killing the tag
    `killPassword` - the kill password to use when killing found tags
  Returns:
    A three-element array: {the number of tags found, the number of tags successfully killed, the number of tags unsuccessfully killed}
  Throws:
    `ReaderException`

### cmdReadTagAndLockMultiple

    public int[] cmdReadTagAndLockMultiple(int timeout,
                                           SerialReader.AntennaSelection selection,
                                           TagFilter filter,
                                           int accessPassword,
                                           int mask,
                                           int action)
                                    throws ReaderException

  Deprecated.

  Search for tags for a specified amount of time and lock each one.

  Parameters:
    `timeout` - the duration in milliseconds to search for tags. Valid range is 0-65535
    `selection` - the antenna or antennas to use for the search
    `accessPassword` - the password to use when locking the tag
    `filter` - a specification of the air protocol filtering to perform
    `mask` - the Gen2 lock mask
    `action` - the Gen2 lock action
  Returns:
    A three-element array: {the number of tags found, the number of tags successfully locked, the number of tags unsuccessfully locked}
  Throws:
    `ReaderException`

### cmdReadTagAndDataWriteMultiple

    public int[] cmdReadTagAndDataWriteMultiple(int timeout,
                                                SerialReader.AntennaSelection selection,
                                                TagFilter filter,
                                                int accessPassword,
                                                Gen2.Bank bank,
                                                int address,
                                                byte[] data)
                                         throws ReaderException

  Deprecated.

  Search for tags for a specified amount of time and write data to each one.

  Parameters:
    `timeout` - the duration in milliseconds to search for tags. Valid range is 0-65535
    `selection` - the antenna or antennas to use for the search
    `filter` - a specification of the air protocol filtering to perform
    `accessPassword` - the password to use when writing the tag
    `bank` - the Gen2 memory bank to write to
    `address` - the word address to start writing at
    `data` - the data to write
  Returns:
    A three-element array: {the number of tags found, the number of tags successfully written to, the number of tags unsuccessfully written to}.
  Throws:
    `ReaderException`

### cmdReadTagAndDataReadMultiple

    public int[] cmdReadTagAndDataReadMultiple(int timeout,
                                               SerialReader.AntennaSelection selection,
                                               TagFilter filter,
                                               int accessPassword,
                                               Gen2.Bank bank,
                                               int address,
                                               int length)
                                        throws ReaderException

  Deprecated.

  Search for tags for a specified amount of time and read data from each one.

  Parameters:
    `timeout` - the duration in milliseconds to search for tags. Valid range is 0-65535
    `selection` - the antenna or antennas to use for the search
    `filter` - a specification of the air protocol filtering to perform
    `accessPassword` - the password to use when writing the tag
    `bank` - the Gen2 memory bank to read from
    `address` - the word address to start reading from
    `length` - the number of words to read. Only two words per tag will be stored in the tag buffer.
  Returns:
    A three-element array, containing: {the number of tags found, the number of tags successfully read from, the number of tags unsuccessfully read from}.
  Throws:
    `ReaderException`

### cmdGen2LockTag

    public void cmdGen2LockTag(int timeout,
                               int mask,
                               int action,
                               int accessPassword,
                               TagFilter filter)
                        throws ReaderException

  Deprecated.

  Lock a Gen2 tag

  Parameters:
    `timeout` - the duration in milliseconds to search for a tag to lock. Valid range is 0-65535
    `mask` - the Gen2 lock mask
    `action` - the Gen2 lock action
    `accessPassword` - the password to use when locking the tag
    `filter` - a specification of the air protocol filtering to perform
  Throws:
    `ReaderException`

### cmdKillTag

    public void cmdKillTag(int timeout,
                           int killPassword,
                           TagFilter filter)
                    throws ReaderException

  Deprecated.

  Kill a Gen2 tag.

  Parameters:
    `timeout` - the duration in milliseconds to search for a tag to kill. Valid range is 0-65535
    `killPassword` - the tag kill password
    `filter` - a specification of the air protocol filtering to perform
  Throws:
    `ReaderException`

### cmdGen2ReadTagData

    public TagReadData cmdGen2ReadTagData(int timeout,
                                          java.util.Set<TagReadData.TagMetadataFlag> metadataFlags,
                                          int bankValue,
                                          int address,
                                          int length,
                                          int accessPassword,
                                          TagFilter filter)
                                   throws ReaderException

  Deprecated.

  Read the memory of a Gen2 tag.

  Parameters:
    `timeout` - the duration in milliseconds to search for the operation. Valid range is 0-65535
    `metadataFlags` - the set of metadata values to retrieve and store in the returned object
    `bank` - the Gen2 memory bank to read from
    `address` - the word address to start reading from
    `length` - the number of words to read.
    `accessPassword` - the password to use when writing the tag
    `filter` - a specification of the air protocol filtering to perform
  Returns:
    a TagReadData object containing the tag data and any requested metadata (note: the tag EPC will not be present in the object)
  Throws:
    `ReaderException`

### cmdGetTagsRemaining

    public int[] cmdGetTagsRemaining()
                              throws ReaderException

  Deprecated.

  Get the number of tags stored in the tag buffer

  Returns:
    a three-element array containing: {the number of tags remaining, the current read index of the tag buffer, the current write index of the tag buffer}.
  Throws:
    `ReaderException`

### cmdGetTagBuffer

    public TagData[] cmdGetTagBuffer(int count,
                                     boolean epc496,
                                     TagProtocol protocol)
                              throws ReaderException

  Deprecated.

  Get tag data of a number of tags from the tag buffer. This command moves a read index into the tag buffer, so that repeated calls will fetch all of the tags in the buffer.

  Parameters:
    `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)
  Returns:
    the tag data. Fewer tags may be returned than were requested.
  Throws:
    `ReaderException`

### cmdGetTagBuffer

    public TagData[] cmdGetTagBuffer(int start,
                                     int end,
                                     boolean epc496,
                                     TagProtocol protocol)
                              throws ReaderException

  Deprecated.

  Get tag data of a tags from certain locations in the tag buffer, without updating the read index.

  Parameters:
    `start` - the start index to read from
    `end` - the end index to read to
    `epc496` - Whether the EPCs expected are 496 bits (true) or 96 bits (false)
  Returns:
    the tag data. Fewer tags may be returned than were requested.
  Throws:
    `ReaderException`

### cmdGetTagBuffer

    public TagReadData[] cmdGetTagBuffer(java.util.Set<TagReadData.TagMetadataFlag> metadataFlags,
                                         boolean resend,
                                         TagProtocol protocol)
                                  throws ReaderException

  Deprecated.

  Get tag data and associated read metadata from the tag buffer.

  Parameters:
    `metadataFlags` - the set of metadata values to retrieve and store in the returned objects
    `resend` - whether to resend the same tag data sent in a previous call
  Returns:
    an array of TagReadData objects containing the tag and requested metadata
  Throws:
    `ReaderException`

### cmdHibikiReadLock

    public void cmdHibikiReadLock(int timeout,
                                  int accessPassword,
                                  int mask,
                                  int action)
                           throws ReaderException

  Deprecated.

  Send the Hitachi Hibiki Read Lock command.

  Parameters:
    `timeout` - the timeout of the operation, in milliseconds. Valid range is 0-65535.
    `accessPassword` - the access password to use to write to the tag
    `mask` - bitmask of read lock bits to alter
    `action` - action value of read lock bits to alter
  Throws:
    `ReaderException`

### cmdHibikiGetSystemInformation

    public SerialReader.HibikiSystemInformation cmdHibikiGetSystemInformation(int timeout,
                                                                              int accessPassword)
                                                                       throws ReaderException

  Deprecated.

  Send the Hitachi Hibiki Get System Information command.

  Parameters:
    `timeout` - the timeout of the operation, in milliseconds. Valid range is 0-65535.
    `accessPassword` - the access password to use to write to the tag
  Returns:
    10-element array of integers: {info flags, reserved memory size, EPC memory size, TID memory size, user memory size, set attenuate value, bank lock bits, block read lock bits, block r/w lock bits, block write lock bits}
  Throws:
    `ReaderException`

### cmdHibikiSetAttenuate

    public void cmdHibikiSetAttenuate(int timeout,
                                      int accessPassword,
                                      int level,
                                      boolean lock)
                               throws ReaderException

  Deprecated.

  Send the Hitachi Hibiki Set Attenuate command.

  Parameters:
    `timeout` - the timeout of the operation, in milliseconds. Valid range is 0-65535.
    `accessPassword` - the access password to use to write to the tag
    `level` - the attenuation level to set
    `lock` - whether to permanently lock the attenuation level
  Throws:
    `ReaderException`

### cmdHibikiBlockLock

    public void cmdHibikiBlockLock(int timeout,
                                   int accessPassword,
                                   int block,
                                   int blockPassword,
                                   int mask,
                                   int action)
                            throws ReaderException

  Deprecated.

  Send the Hitachi Hibiki Block Lock command.

  Parameters:
    `timeout` - the timeout of the operation, in milliseconds. Valid range is 0-65535.
    `accessPassword` - the access password to use to write to the tag
    `block` - the block of memory to operate on
    `blockPassword` - the password for the block
    `mask` - bitmask of lock bits to alter
    `action` - value of lock bits to alter
  Throws:
    `ReaderException`

### cmdHibikiBlockReadLock

    public void cmdHibikiBlockReadLock(int timeout,
                                       int accessPassword,
                                       int block,
                                       int blockPassword,
                                       int mask,
                                       int action)
                                throws ReaderException

  Deprecated.

  Send the Hitachi Hibiki Block Read Lock command.

  Parameters:
    `timeout` - the timeout of the operation, in milliseconds. Valid range is 0-65535.
    `accessPassword` - the access password to use to write to the tag
    `block` - the block of memory to operate on
    `blockPassword` - the password for the block
    `mask` - bitmask of read lock bits to alter
    `action` - value of read lock bits to alter
  Throws:
    `ReaderException`

### cmdHibikiWriteMultipleWords

    public void cmdHibikiWriteMultipleWords(int timeout,
                                            int accessPassword,
                                            Gen2.Bank bank,
                                            int wordOffset,
                                            byte[] data)
                                     throws ReaderException

  Deprecated.

  Send the Hitachi Hibiki Write Multiple Words Lock command.

  Parameters:
    `timeout` - the timeout of the operation, in milliseconds. Valid range is 0-65535.
    `accessPassword` - the access password to use to write to the tag
    `bank` - the Gen2 memory bank to write to
    `wordOffset` - the word address to start writing at
    `data` - the data to write - must be an even number of bytes
  Throws:
    `ReaderException`

### cmdEraseBlockTagSpecific

    public void cmdEraseBlockTagSpecific(int timeout,
                                         Gen2.Bank bank,
                                         int address,
                                         int count)
                                  throws ReaderException

  Deprecated.

  Erase a range of words on a Gen2 tag that supports the optional Erase Block command.

  Parameters:
    `bank` - the Gen2 memory bank to erase words in
    `address` - the word address to start erasing at
    `count` - the number of words to erase
  Throws:
    `ReaderException`

### cmdGetSerialNumber

    public java.lang.String cmdGetSerialNumber(int option,
                                               int flags)
                                        throws ReaderException

  Throws:
    `ReaderException`

### cmdGetTxRxPorts

    public int[] cmdGetTxRxPorts()
                          throws ReaderException

  Deprecated.

  Get the currently set Tx and Rx antenna port.

  Returns:
    a two-element array: {tx port, rx port}
  Throws:
    `ReaderException`

### cmdGetAntennaConfiguration

    public SerialReader.AntennaPort cmdGetAntennaConfiguration()
                                                        throws ReaderException

  Deprecated.

  Get the current Tx and Rx antenna port, the number of physical ports, and a list of ports where an antenna has been detected.

  Returns:
    an object containing the antenna port information
  Throws:
    `ReaderException`

### cmdGetAntennaSearchList

    public int[][] cmdGetAntennaSearchList()
                                    throws ReaderException

  Deprecated.

  Gets the search list of logical antenna ports.

  Returns:
    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}}
  Throws:
    `ReaderException`

### getAntennaReturnLoss

    public int[][] getAntennaReturnLoss()
                                 throws ReaderException

  Throws:
    `ReaderException`

### cmdGetAntennaPortPowers

    public int[][] cmdGetAntennaPortPowers()
                                    throws ReaderException

  Deprecated.

  Gets the transmit powers of each antenna port.

  Returns:
    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}}
  Throws:
    `ReaderException`

### cmdGetAntennaPortPowersAndSettlingTime

    public int[][] cmdGetAntennaPortPowersAndSettlingTime()
                                                   throws ReaderException

  Deprecated.

  Gets the transmit powers and settling time of each antenna port.

  Returns:
    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}}
  Throws:
    `ReaderException`

### cmdAntennaDetect

    public int[][] cmdAntennaDetect()
                             throws ReaderException

  Deprecated.

  Enumerate the logical antenna ports and report the antenna detection status of each one.

  Returns:
    an array of 2-element arrays of integers which are (module logical port, detected) pairs. An example, where module's logical ports 1 and 2 have detected antennas and 3 and 4 do not: {{1, 1}, {2, 1}, {3, 0}, {4, 0}}
  Throws:
    `ReaderException`

### cmdGetReadTxPower

    public int cmdGetReadTxPower()
                          throws ReaderException

  Deprecated.

  Get the current global Tx power setting for read operations.

  Returns:
    the power setting, in centidBm
  Throws:
    `ReaderException`

### cmdGetReadTxPowerWithLimits

    public int[] cmdGetReadTxPowerWithLimits()
                                      throws ReaderException

  Deprecated.

  Get the current global Tx power setting for read operations, and the minimum and maximum power levels supported.

  Returns:
    a three-element array: {tx power setting in centidBm, maximum power, minimum power}. Example: {2500, 3000, 500}
  Throws:
    `ReaderException`

### cmdGetWriteTxPower

    public int cmdGetWriteTxPower()
                           throws ReaderException

  Deprecated.

  Get the current global Tx power setting for write operations.

  Returns:
    the power setting, in centidBm
  Throws:
    `ReaderException`

### cmdGetProtocol

    public TagProtocol cmdGetProtocol()
                               throws ReaderException

  Deprecated.

  Get the current RFID protocol the device is configured to use.

  Returns:
    the current protocol
  Throws:
    `ReaderException`

### cmdGetWriteTxPowerWithLimits

    public int[] cmdGetWriteTxPowerWithLimits()
                                       throws ReaderException

  Deprecated.

  Get the current global Tx power setting for write operations, and the minimum and maximum power levels supported.

  Returns:
    a three-element array: {tx power setting in centidBm, maximum power, minimum power}. Example: {2500, 3000, 500}
  Throws:
    `ReaderException`

### cmdGetFrequencyHopTable

    public int[] cmdGetFrequencyHopTable()
                                  throws ReaderException

  Deprecated.

  Gets the frequencies in the current hop table

  Returns:
    an array of the frequencies in the hop table, in kHz
  Throws:
    `ReaderException`

### cmdGetRegionConfiguration

    public java.lang.Object cmdGetRegionConfiguration(SerialReader.RegionConfiguration key)
                                               throws ReaderException

  Deprecated.

  Get the value of a region-specific configuration setting.

  Parameters:
    `key` - the setting
  Returns:
    an object with the setting value. The type of the object is dependant on the key; see the RegionConfiguration class for details;
  Throws:
    `ReaderException`

### cmdGetPowerMode

    public SerialReader.PowerMode cmdGetPowerMode()
                                           throws ReaderException

  Deprecated.

  Gets the current power mode of the device.

  Returns:
    the power mode
  Throws:
    `ReaderException`

### cmdGetUserMode

    public SerialReader.UserMode cmdGetUserMode()
                                         throws ReaderException

  Deprecated.

  Gets the current user mode of the device.

  Returns:
    the user mode
  Throws:
    `ReaderException`

### cmdGetAvailableProtocols

    public TagProtocol[] cmdGetAvailableProtocols()
                                           throws ReaderException

  Deprecated.

  Get the list of RFID protocols supported by the device.

  Returns:
    an array of supported protocols
  Throws:
    `ReaderException`

### cmdGetAvailableRegions

    public Reader.Region[] cmdGetAvailableRegions()
                                           throws ReaderException

  Deprecated.

  Get the list of regulatory regions supported by the device.

  Returns:
    an array of supported regions
  Throws:
    `ReaderException`

### cmdGetTemperature

    public int cmdGetTemperature()
                          throws ReaderException

  Deprecated.

  Get the current temperature of the device.

  Returns:
    the temperature, in degrees C
  Throws:
    `ReaderException`

### cmdSetTxRxPorts

    public void cmdSetTxRxPorts(int txPort,
                                int rxPort)
                         throws ReaderException

  Deprecated.

  Sets the Tx and Rx antenna port. Port numbers range from 1-255.

  Parameters:
    `txPort` - the logical antenna port to use for transmitting
    `rxPort` - the logical antenna port to use for receiving
  Throws:
    `ReaderException`

### cmdSetAntennaSearchList

    public void cmdSetAntennaSearchList(int[][] list)
                                 throws ReaderException

  Deprecated.

  Sets the search list of logical antenna ports. Port numbers range from 1-255.

  Parameters:
    `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}}
  Throws:
    `ReaderException`

### cmdSetAntennaPortPowers

    public void cmdSetAntennaPortPowers(int[][] list)
                                 throws ReaderException

  Deprecated.

  Sets the transmit powers of each antenna port. Note that setting a power level to 0 will cause the corresponding global power level to be used. Port numbers range from 1-255; power levels range from 0-65535.

  Parameters:
    `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}}
  Throws:
    `ReaderException`

### cmdSetAntennaPortPowersAndSettlingTime

    public void cmdSetAntennaPortPowersAndSettlingTime(int[][] list)
                                                throws ReaderException

  Deprecated.

  Sets the transmit powers and settling times of each antenna port. Note that setting a power level to 0 will cause the corresponding global power level to be used. Port numbers range from 1-255; power levels range from 0-65535; settling time ranges from 0-65535.

  Parameters:
    `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}}
  Throws:
    `ReaderException`

### cmdSetReadTxPower

    public void cmdSetReadTxPower(int centidBm)
                           throws ReaderException

  Deprecated.

  Set the current global Tx power setting for read operations.

  Parameters:
    `centidBm` - the power level
  Throws:
    `ReaderException`

### cmdSetWriteTxPower

    public void cmdSetWriteTxPower(int centidBm)
                            throws ReaderException

  Deprecated.

  Set the current global Tx power setting for write operations.

  Parameters:
    `centidBm` - the power level.
  Throws:
    `ReaderException`

### cmdSetFrequencyHopTable

    public void cmdSetFrequencyHopTable(int[] table)
                                 throws ReaderException

  Deprecated.

  Set the frequency hop table.

  Parameters:
    `table` - A list of frequencies, in kHz. The list may be at most 62 elements.
  Throws:
    `ReaderException`

### cmdSetProtocolLicenseKey

    public void cmdSetProtocolLicenseKey(Reader.LicenseOption option,
                                         byte[] key)
                                  throws ReaderException

  set protocol license key

  Parameters:
    `key` - license key
  Throws:
    `ReaderException`

### cmdGetGPIODirection

    public boolean cmdGetGPIODirection(int pin)
                                throws ReaderException

  Deprecated.

  Get direction of a single GPIO pin

  Parameters:
    `pin` - GPIO pin number
  Returns:
    true if output pin, false if input pin
  Throws:
    `ReaderException`

### cmdSetGPIODirection

    public void cmdSetGPIODirection(int pin,
                                    boolean out)
                             throws ReaderException

  Deprecated.

  Set direction of a single GPIO pin

  Parameters:
    `pin` - GPIO pin number
    `out` - true for output, false for input
  Throws:
    `ReaderException`

### getGPIODirection

    public int[] getGPIODirection(boolean wantOut)
                           throws ReaderException

  Deprecated.

  Get directions of all GPIO pins

  Parameters:
    `wantOut` - false = get inputs, true = get outputs
  Returns:
    list of pins that are set in the requested direction
  Throws:
    `ReaderException`

### setGPIODirection

    public void setGPIODirection(boolean wantOut,
                                 int[] pins)
                          throws ReaderException

  Deprecated.

  Set directions of all GPIO pins

  Parameters:
    `wantOut` - false = input, true = output
    `pins` - GPIO pins to set to the desired direction. All other pins implicitly set the other way.
  Throws:
    `ReaderException`

### cmdSetRegionLbt

    public void cmdSetRegionLbt(Reader.Region region,
                                boolean lbt)
                         throws ReaderException

  Throws:
    `ReaderException`

### cmdSetPowerMode

    public void cmdSetPowerMode(SerialReader.PowerMode mode)
                         throws ReaderException

  Deprecated.

  Set the current power mode of the device.

  Parameters:
    `mode` - the mode to set
  Throws:
    `ReaderException`

### cmdSetUserMode

    public void cmdSetUserMode(SerialReader.UserMode mode)
                        throws ReaderException

  Deprecated.

  Set the current user mode of the device.

  Parameters:
    `mode` - the mode to set
  Throws:
    `ReaderException`

### cmdSetUserProfile

    public void cmdSetUserProfile(SerialReader.SetUserProfileOption option,
                                  SerialReader.ConfigKey key,
                                  SerialReader.ConfigValue val)
                           throws ReaderException

  Setting user profile on the basis of option,key and value parameter

  Parameters:
    `option` - Save,restore,verify and reset configuration
    `key` - Which part of configuration to operate on
    `val` - Type of configuration value to use (default, custom...)
  Throws:
    `ReaderException`

### cmdGetUserProfile

    public byte[] cmdGetUserProfile(byte[] data)

  get save/restore configuration

  Parameters:
    `data` - Byte array consisting of opcode option
  Returns:
    Byte array

### cmdResetReaderStatistics

    public void cmdResetReaderStatistics(java.util.Set<SerialReader.ReaderStatisticsFlag> stats)
                                  throws ReaderException

  Reset the per-port statistics.

  Parameters:
    `stats` - the set of statistics to reset. Only the RF on time statistic may be reset.
  Throws:
    `ReaderException`

### cmdResetReaderStats

    public void cmdResetReaderStats(int flagBits)
                             throws ReaderException

  Reset the per-port stats.

  Parameters:
    `flagBits` - the set of stats to reset. Only the RF on time stats may be reset.
  Throws:
    `ReaderException`

### cmdTestSetFrequency

    public void cmdTestSetFrequency(int frequency)
                             throws ReaderException

  Set the operating frequency of the device. Testing command.

  Parameters:
    `frequency` - the frequency to set, in kHz
  Throws:
    `ReaderException`

### cmdTestSendCw

    public void cmdTestSendCw(boolean on)
                       throws ReaderException

  Turn CW transmission on or off. Testing command.

  Parameters:
    `on` - whether to turn CW on or off
  Throws:
    `ReaderException`

### cmdTestSendPrbs

    public void cmdTestSendPrbs(int duration)
                         throws ReaderException

  Turn on pseudo-random bit stream transmission for a particular duration. Testing command.

  Parameters:
    `duration` - the duration to transmit the PRBS signal. Valid range is 0-65535
  Throws:
    `ReaderException`

### getSerialTransport

    public SerialTransport getSerialTransport()

### connect

    public void connect()
                 throws ReaderException

  Description copied from class: `Reader`
  Open the communication channel and initialize the session with the reader.

  Specified by:
    `connect` in class `Reader`
  Throws:
    `ReaderException`

### reboot

    public void reboot()
                throws ReaderException

  Description copied from class: `Reader`
  reboots the reader device.

  Specified by:
    `reboot` in class `Reader`
  Throws:
    `ReaderException`

### destroy

    public void destroy()

  Description copied from class: `Reader`
  Shuts down the connection with the reader device.

  Specified by:
    `destroy` in class `Reader`

### read

    public TagReadData[] read(long timeout)
                       throws ReaderException

  reading tags for specified amount of time

  Specified by:
    `read` in class `Reader`
  Parameters:
    `timeout` -
  Returns:
    array of tag data
  Throws:
    `ReaderException`
  See Also:
    `TagReadData`

### writeTag

    public void writeTag(TagFilter filter,
                         TagData newID)
                  throws ReaderException

  Description copied from class: `Reader`
  Write a new ID to a tag.

  Specified by:
    `writeTag` in class `Reader`
  Parameters:
    `filter` - the tag to write to, or null
    `newID` - the new tag ID to write
  Throws:
    `ReaderException`

### readAfterwriteTagEPC

    public short[] readAfterwriteTagEPC(TagFilter filter,
                                        TagData newID,
                                        Gen2.Bank readBank,
                                        int readAddress,
                                        int readLen)
                                 throws ReaderException

  Read data from a memory bank after writing tag EPC

  Parameters:
    `filter` - a specification of the air protocol filtering to perform to find the tag
    `newID` - the EPC to write to the tag
    `readBank` - the Gen2 memory bank to read from
    `readAddress` - the word address to start reading from
    `readLen` - the number of words to read
  Throws:
    `ReaderException`

### killTag

    public void killTag(TagFilter target,
                        TagAuthentication auth)
                 throws ReaderException

  Description copied from class: `Reader`
  Kill a tag. The first tag seen is killed.

  Specified by:
    `killTag` in class `Reader`
  Parameters:
    `target` - the tag kill, or null
    `auth` - the authentication needed to kill the tag
  Throws:
    `ReaderException`

### readTagMemBytes

    public byte[] readTagMemBytes(TagFilter target,
                                  int bankValue,
                                  int address,
                                  int count)
                           throws ReaderException

  read tag memory

  Specified by:
    `readTagMemBytes` in class `Reader`
  Parameters:
    `target` -
    `bank` -
    `address` -
    `count` -
  Returns:
    byte array data
  Throws:
    `ReaderException`

### readTagMemWords

    public short[] readTagMemWords(TagFilter target,
                                   int bank,
                                   int address,
                                   int count)
                            throws ReaderException

  read tag memory in word format

  Specified by:
    `readTagMemWords` in class `Reader`
  Parameters:
    `target` -
    `bank` -
    `address` -
    `count` -
  Returns:
    short array data
  Throws:
    `ReaderException`

### writeTagMemBytes

    public void writeTagMemBytes(TagFilter target,
                                 int bank,
                                 int address,
                                 byte[] data)
                          throws ReaderException

  write tag memory

  Specified by:
    `writeTagMemBytes` in class `Reader`
  Parameters:
    `target` -
    `bank` -
    `address` -
    `data` -
  Throws:
    `ReaderException`

### writeTagMemWords

    public void writeTagMemWords(TagFilter target,
                                 int bank,
                                 int address,
                                 short[] data)
                          throws ReaderException

  write tag memory in terms of word data

  Specified by:
    `writeTagMemWords` in class `Reader`
  Parameters:
    `target` -
    `bank` -
    `address` -
    `data` -
  Throws:
    `ReaderException`

### wordsToBytes

    public byte[] wordsToBytes(short[] data)
                        throws ReaderException

  Converts word array into byte array

  Parameters:
    `data` -
  Throws:
    `ReaderException`

### bytesToWords

    public short[] bytesToWords(byte[] bytes)
                         throws ReaderException

  Converts byte array into word array

  Parameters:
    `bytes` -
  Throws:
    `ReaderException`

### lockTag

    public void lockTag(TagFilter target,
                        TagLockAction lock)
                 throws ReaderException

  Description copied from class: `Reader`
  Perform a lock or unlock operation on a tag. The first tag seen is operated on - the singulation parameter may be used to control this. Note that a tag without an access password set may not accept a lock operation or remain locked.

  Specified by:
    `lockTag` in class `Reader`
  Parameters:
    `target` - the tag to lock, or null
    `lock` - the locking action to take.
  Throws:
    `ReaderException`

### lockTag

    public void lockTag(TagFilter target,
                        TagLockAction lock,
                        int accessPassword)
                 throws ReaderException

  lock tag operation

  Parameters:
    `target` -
    `lock` -
    `accessPassword` -
  Throws:
    `ReaderException`

### blockWrite

    public void blockWrite(TagFilter target,
                           Gen2.Bank bank,
                           int wordPtr,
                           byte wordCount,
                           short[] data)
                    throws ReaderException

  Throws:
    `ReaderException`

### blockPermaLock

    public byte[] blockPermaLock(TagFilter target,
                                 byte readLock,
                                 Gen2.Bank bank,
                                 int blockPtr,
                                 byte blockRange,
                                 short[] mask)
                          throws ReaderException

  Throws:
    `ReaderException`

### blockErase

    public void blockErase(TagFilter target,
                           Gen2.Bank bank,
                           int wordPtr,
                           byte wordCount)
                    throws ReaderException

  Throws:
    `ReaderException`

### cmdBlockWrite

    public void cmdBlockWrite(int timeout,
                              Gen2.Bank memBank,
                              int wordPtr,
                              byte wordCount,
                              short[] data,
                              int accessPassword,
                              TagFilter target)
                       throws ReaderException

  Throws:
    `ReaderException`

### cmdBlockPermaLock

    public byte[] cmdBlockPermaLock(int timeout,
                                    byte readLock,
                                    Gen2.Bank memBank,
                                    int blockPtr,
                                    byte blockRange,
                                    short[] mask,
                                    int accessPassword,
                                    TagFilter target)
                             throws ReaderException

  Throws:
    `ReaderException`

### cmdBlockErase

    public void cmdBlockErase(int timeout,
                              Gen2.Bank memBank,
                              int wordPtr,
                              byte wordCount,
                              int accessPassword,
                              TagFilter target)
                       throws ReaderException

  Throws:
    `ReaderException`

### gpiGet

    public Reader.GpioPin[] gpiGet()
                            throws ReaderException

  gpiGet

  Specified by:
    `gpiGet` in class `Reader`
  Returns:
    array of GpioPin
  Throws:
    `ReaderException`

### gpoSet

    public void gpoSet(Reader.GpioPin[] state)
                throws ReaderException

  gpoSet

  Specified by:
    `gpoSet` in class `Reader`
  Parameters:
    `state` - array of GpioPin (id, high) settings (output field is ignored)
  Throws:
    `ReaderException`

### firmwareLoad

    public void firmwareLoad(java.io.InputStream fwStr)
                      throws ReaderException,
                             java.io.IOException

  Description copied from class: `Reader`
  Load a new firmware image into the device's nonvolatile memory. This installs the given image data onto the device and restarts it with that image. The firmware must be of an appropriate type for the device. Interrupting this operation may damage the reader.

  Specified by:
    `firmwareLoad` in class `Reader`
  Parameters:
    `fwStr` - a data stream of the firmware contents
  Throws:
    `ReaderException`
    `java.io.IOException`

### executeTagOp

    public java.lang.Object executeTagOp(TagOp tagOP,
                                         TagFilter target)
                                  throws ReaderException

  Handles tag operations

  Specified by:
    `executeTagOp` in class `Reader`
  Parameters:
    `tagOP` -
    `target` -
  Returns:
    Object
  Throws:
    `ReaderException`

### msgSetupMultiProtocolSearch

    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

  prepare multi protocol search

  Parameters:
    `opcode` -
    `plans` -
    `metadataFlags` -
    `antennas` -
    `timeout` -
    `m` -
  Throws:
    `ReaderException`

### cmdMultiProtocolSearch

    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

  multi protocol search

  Parameters:
    `opcode` -
    `plans` -
    `metadataFlags` -
    `antennas` -
    `timeout` -
    `collectedTags` -
  Throws:
    `ReaderException`

### msgSetupReadTagSingle

    public byte[] msgSetupReadTagSingle(java.util.Set<TagReadData.TagMetadataFlag> metadataFlags,
                                        TagFilter filter,
                                        TagProtocol protocol,
                                        short timeout)