Overview
An inventory session
Public Member Functions | |
UgiInventoryDelegate | getDelegate () |
Get the inventory delegate. More... | |
UgiRfidConfiguration | getRfidConfiguration () |
Get the configuration used for this inventory. More... | |
Date | getStartTime () |
Get the time the inventory started. More... | |
UgiTag | getTagByEpc (UgiEpc epc) |
Get information for an EPC. More... | |
List< UgiTag > | getTags () |
Get the array of tags that have been found. More... | |
boolean | isPaused () |
Is inventory paused. More... | |
boolean | isScanning () |
Is the Grokker actively scanning. More... | |
int | getNumInventoryRounds () |
Get the number of inventory rounds that the Grokker has run in this inventory. More... | |
void | setDelegate (UgiInventoryDelegate delegate) |
Set the inventory delegate. More... | |
void | stopInventory (StopInventoryCompletion completion) |
Stop running inventory with a completion. More... | |
void | stopInventory () |
Stop running inventory. | |
void | pauseInventory () |
Stop running inventory temporarily (such as while a dialog box is displayed) | |
void | resumeInventory () |
Restart inventory after a temporarily stop. | |
void | resumeInventory (UgiInventoryDelegate newDelegate) |
Restart inventory after a temporarily stop, with a new delegate to send notifications to. More... | |
void | resumeInventory (UgiRfidConfiguration configuration) |
Restart inventory after a temporarily stop. More... | |
void | resumeInventory (UgiInventoryDelegate newDelegate, UgiRfidConfiguration configuration) |
Restart inventory after a temporarily stop. More... | |
void | programTag (UgiEpc oldEpc, UgiEpc newEpc, int password, TagAccessCompletion completion) |
Program a tag. More... | |
void | writeTag (UgiEpc epc, UgiRfidConfiguration.MemoryBank memoryBank, int offset, byte[] data, byte[] previousData, int password, TagAccessCompletion completion) |
Write memory. More... | |
void | setTagAccessPassword (UgiEpc epc, int currentPassword, int newPassword, TagAccessCompletion completion) |
Set a tag's access password. More... | |
void | setTagKillPassword (UgiEpc epc, int currentPassword, int killPassword, TagAccessCompletion completion) |
Set a tag's kill password. More... | |
void | lockUnlockTag (UgiEpc epc, int maskAndAction, int password, TagAccessCompletion completion) |
Lock/unlock a tag. More... | |
void | killTag (UgiEpc epc, int password, TagAccessCompletion completion) |
Kill a tag. More... | |
void | readTag (UgiEpc epc, UgiRfidConfiguration.MemoryBank memoryBank, int offset, int minNumBytes, int maxNumBytes, int password, TagReadCompletion completion) |
Read a tag's memory. More... | |
void | customCommandToTag (UgiEpc epc, byte[] command, int commandBits, int responseBitLengthNoHeaderBit, int responseBitLengthWithHeaderBit, int receiveTimeoutUsec, TagCustomCommandCompletion completion) |
Do a custom command to a tag More... | |
void | changePower (double initialPowerLevel, double minPowerLevel, double maxPowerLevel, ChangePowerCompletion completion) |
Change power More... | |
void | getBatteryInfo (GetBatteryInfoCompletion completion) |
Get battery level while scanning. More... | |
Classes | |
interface | ChangePowerCompletion |
Completion interface passed to changePower. More... | |
class | DetailedPerReadData |
Data for each tag read, sent if detailedPerReadData is YES in the RFID configuration. More... | |
interface | GetBatteryInfoCompletion |
Completion interface passed to getBatteryInfo. More... | |
class | LockUnlockMaskAndAction |
Definitions for value passed to lockUnlockTag choosing what banks to change the locked status for and what to change them to. More... | |
interface | StopInventoryCompletion |
Completion interface passed to stopInventory. More... | |
interface | TagAccessCompletion |
Completion interface passed to writeTag and lockUnlockTag. More... | |
enum | TagAccessReturnValues |
Return values from programTag, writeTag, lockUnlockTag and readTag. More... | |
interface | TagCustomCommandCompletion |
Completion interface passed to readTag. More... | |
interface | TagReadCompletion |
Completion interface passed to readTag. More... | |
Static Public Attributes | |
static final int | NO_PASSWORD = 0 |
Default password, meaning the tag is not password protected. | |
Member Function Documentation
◆ getDelegate()
UgiInventoryDelegate com.ugrokit.api.UgiInventory.getDelegate | ( | ) |
Get the inventory delegate.
- Returns
- Inventory delegate
◆ getRfidConfiguration()
UgiRfidConfiguration com.ugrokit.api.UgiInventory.getRfidConfiguration | ( | ) |
Get the configuration used for this inventory.
- Returns
- UgiRfidConfiguration used for this inventory
◆ getStartTime()
Date com.ugrokit.api.UgiInventory.getStartTime | ( | ) |
Get the time the inventory started.
- Returns
- the time the inventory started
◆ getTagByEpc()
Get information for an EPC.
- Parameters
-
epc EPC to find
- Returns
- UgiTag object if the tag has been found, nil if the tag has not been found
◆ getTags()
List<UgiTag> com.ugrokit.api.UgiInventory.getTags | ( | ) |
Get the array of tags that have been found.
- Returns
- Array of tags that have been found
◆ isPaused()
boolean com.ugrokit.api.UgiInventory.isPaused | ( | ) |
Is inventory paused.
- Returns
- true if inventory is paused
◆ isScanning()
boolean com.ugrokit.api.UgiInventory.isScanning | ( | ) |
Is the Grokker actively scanning.
- Returns
- true if Grokker is scanning
◆ getNumInventoryRounds()
int com.ugrokit.api.UgiInventory.getNumInventoryRounds | ( | ) |
Get the number of inventory rounds that the Grokker has run in this inventory.
- Returns
- The number of inventory rounds that the Grokker has run in this inventory
◆ setDelegate()
void com.ugrokit.api.UgiInventory.setDelegate | ( | UgiInventoryDelegate | delegate | ) |
Set the inventory delegate.
- Parameters
-
delegate Delegate to set
◆ stopInventory()
void com.ugrokit.api.UgiInventory.stopInventory | ( | StopInventoryCompletion | completion | ) |
Stop running inventory with a completion.
- Parameters
-
completion code to run after inventory is stopped
◆ resumeInventory() [1/3]
void com.ugrokit.api.UgiInventory.resumeInventory | ( | UgiInventoryDelegate | newDelegate | ) |
Restart inventory after a temporarily stop, with a new delegate to send notifications to.
- Parameters
-
newDelegate new inventory delegate (or null to use existing delegate)
◆ resumeInventory() [2/3]
void com.ugrokit.api.UgiInventory.resumeInventory | ( | UgiRfidConfiguration | configuration | ) |
Restart inventory after a temporarily stop.
- Parameters
-
configuration new configuration (or null to use existing configuration)
◆ resumeInventory() [3/3]
void com.ugrokit.api.UgiInventory.resumeInventory | ( | UgiInventoryDelegate | newDelegate, |
UgiRfidConfiguration | configuration | ||
) |
Restart inventory after a temporarily stop.
- Parameters
-
newDelegate new inventory delegate (or null to use existing delegate) configuration new configuration (or null to use existing configuration)
◆ programTag()
void com.ugrokit.api.UgiInventory.programTag | ( | UgiEpc | oldEpc, |
UgiEpc | newEpc, | ||
int | password, | ||
TagAccessCompletion | completion | ||
) |
Program a tag.
This must be called while inventory is running. This method call returns immediately, the delegate object is informed of the success or failure of the programming. NOTE: the byte length of the newEpc must be the same as the oldEpc.
- Parameters
-
oldEpc EPC of tag to change newEpc EPC to write to the tag password Password to use (NO_PASSWORD for not password protected) completion Completion code after tag is programmed
- Exceptions
-
IllegalArgumentException if the byte length of newEpc and oldEpc differ.
◆ writeTag()
void com.ugrokit.api.UgiInventory.writeTag | ( | UgiEpc | epc, |
UgiRfidConfiguration.MemoryBank | memoryBank, | ||
int | offset, | ||
byte [] | data, | ||
byte [] | previousData, | ||
int | password, | ||
TagAccessCompletion | completion | ||
) |
Write memory.
This must be called while inventory is running. This method call returns immediately, the delegate object is informed of the success or failure of the write.
- Parameters
-
epc EPC of tag to write to memoryBank Memory bank to write to offset Byte offset to write at (must be a multiple of 2) data Data to write previousData Previous value for this data (null if unknown or not available) password Password to use (NO_PASSWORD for not password protected) completion Completion code after tag is programmed
◆ setTagAccessPassword()
void com.ugrokit.api.UgiInventory.setTagAccessPassword | ( | UgiEpc | epc, |
int | currentPassword, | ||
int | newPassword, | ||
TagAccessCompletion | completion | ||
) |
Set a tag's access password.
- Parameters
-
epc EPC of tag to set the password for currentPassword Current password (UGI_NO_PASSWORD if not password protected) newPassword Password to set (UGI_NO_PASSWORD for not password protected) completion Completion code after pasword is set
◆ setTagKillPassword()
void com.ugrokit.api.UgiInventory.setTagKillPassword | ( | UgiEpc | epc, |
int | currentPassword, | ||
int | killPassword, | ||
TagAccessCompletion | completion | ||
) |
Set a tag's kill password.
- Parameters
-
epc EPC of tag to set the password for currentPassword Current password (UGI_NO_PASSWORD if not password protected) killPassword Password to set (UGI_NO_PASSWORD for not password protected) completion Completion code after password is set
◆ lockUnlockTag()
void com.ugrokit.api.UgiInventory.lockUnlockTag | ( | UgiEpc | epc, |
int | maskAndAction, | ||
int | password, | ||
TagAccessCompletion | completion | ||
) |
Lock/unlock a tag.
- Parameters
-
epc EPC of tag to lock/unlock maskAndAction Description for which protection bits to change and what to change them to (UgiLockUnlockMaskAndAction) password Password to use (NO_PASSWORD for not password protected) completion Completion code after tag is locked/unlocked
◆ killTag()
void com.ugrokit.api.UgiInventory.killTag | ( | UgiEpc | epc, |
int | password, | ||
TagAccessCompletion | completion | ||
) |
Kill a tag.
- Parameters
-
epc EPC of tag to kill password Kill password completion Completion code after tag is killed
◆ readTag()
void com.ugrokit.api.UgiInventory.readTag | ( | UgiEpc | epc, |
UgiRfidConfiguration.MemoryBank | memoryBank, | ||
int | offset, | ||
int | minNumBytes, | ||
int | maxNumBytes, | ||
int | password, | ||
TagReadCompletion | completion | ||
) |
Read a tag's memory.
- Parameters
-
epc EPC of tag to read memoryBank Memory bank to read offset Byte offset to read at (must be a multiple of 2) minNumBytes Minimum number of bytes to read (must be a multiple of 2) maxNumBytes Maximum number of bytes to read (must be a multiple of 2) password Password to use (UGI_NO_PASSWORD for not password protected), only relavant for the ACESS and KILL passwords. Password is only supported in Grokkers with firmware 1.12.2 and above completion Completion code after tag is read
◆ customCommandToTag()
void com.ugrokit.api.UgiInventory.customCommandToTag | ( | UgiEpc | epc, |
byte [] | command, | ||
int | commandBits, | ||
int | responseBitLengthNoHeaderBit, | ||
int | responseBitLengthWithHeaderBit, | ||
int | receiveTimeoutUsec, | ||
TagCustomCommandCompletion | completion | ||
) |
Do a custom command to a tag
- Parameters
-
epc EPC of tag to read command Command bytes to send commandBits Number of command bits to send responseBitLengthNoHeaderBit Number of response bits to expect, if header bit is not set in the response responseBitLengthWithHeaderBit Number of response bits to expect, if header bit is set in the response (if 0 then do not expect a header bit at all) receiveTimeoutUsec Response timeout in uSec (some tags require more than the standard for custom commands) completion Completion code after the custom command is executed
◆ changePower()
void com.ugrokit.api.UgiInventory.changePower | ( | double | initialPowerLevel, |
double | minPowerLevel, | ||
double | maxPowerLevel, | ||
ChangePowerCompletion | completion | ||
) |
Change power
- Parameters
-
initialPowerLevel Initial power level minPowerLevel Minimum power level maxPowerLevel Maximum power level completion Completion code after the power is changed
◆ getBatteryInfo()
void com.ugrokit.api.UgiInventory.getBatteryInfo | ( | GetBatteryInfoCompletion | completion | ) |
Get battery level while scanning.
This causing inventory to pause for a short period of time.
- Parameters
-
completion Completion code called with battery information
Overview
Completion interface passed to stopInventory.
Public Member Functions | |
void | exec () |
Completion method. | |
Overview
Completion interface passed to readTag.
Public Member Functions | |
void | exec (UgiTag tag, boolean headerBit, byte[] response, TagAccessReturnValues result) |
Completion method More... | |
Member Function Documentation
◆ exec()
void com.ugrokit.api.UgiInventory.TagCustomCommandCompletion.exec | ( | UgiTag | tag, |
boolean | headerBit, | ||
byte [] | response, | ||
TagAccessReturnValues | result | ||
) |
Completion method
- Parameters
-
tag Tag the custom command was done to headerBit YES if the header bit was set in the response (usually used to indicate an error) response Tag's response to the custom command result Result of the operation
Overview
Completion interface passed to changePower.
Public Member Functions | |
void | exec (boolean success) |
Completion method More... | |
Member Function Documentation
◆ exec()
void com.ugrokit.api.UgiInventory.ChangePowerCompletion.exec | ( | boolean | success | ) |
Completion method
- Parameters
-
success true if operation succeeded
Overview
Definitions for value passed to lockUnlockTag choosing what banks to change the locked status for and what to change them to.
Static Public Attributes | |
static final int | KILL_PASSWORD_MASK_BIT_OFFSET = 18 |
Offset for mask bits for kill password. | |
static final int | ACCESS_PASSWORD_MASK_BIT_OFFSET = 16 |
Offset for mask bits for access password. | |
static final int | EPC_MASK_BIT_OFFSET = 14 |
Offset for mask bits for EPC memory bank. | |
static final int | TID_MASK_BIT_OFFSET = 12 |
Offset for mask bits for TID memory bank. | |
static final int | USER_MASK_BIT_OFFSET = 10 |
Offset for mask bits for USER memory bank. | |
static final int | KILL_PASSWORD_ACTION_BIT_OFFSET = 8 |
Offset for action bits for kill password. | |
static final int | ACCESS_PASSWORD_ACTION_BIT_OFFSET = 6 |
Offset for action bits for access password. | |
static final int | EPC_ACTION_BIT_OFFSET = 4 |
Offset for action bits for EPC memory bank. | |
static final int | TID_ACTION_BIT_OFFSET = 2 |
Offset for action bits for TID memory bank. | |
static final int | USER_ACTION_BIT_OFFSET = 0 |
Offset for action bits for USER memory bank. | |
static final int | MASK_CHANGE_NONE = 0 |
Mask: don't change. | |
static final int | MASK_CHANGE_PERMALOCK = 1 |
Mask: change permlock bit. | |
static final int | MASK_CHANGE_WRITABLE = 2 |
Mask: change writable bit. | |
static final int | MASK_CHANGE_WRITABLE_AND_PERMALOCK = 3 |
Mask: change permlock and writable bits. | |
static final int | ACTION_WRITABLE = 0 |
Action: writable. | |
static final int | ACTION_PERMANENTLY_WRITABLE = 1 |
Action: permanently writable. | |
static final int | ACTION_WRITE_RESTRICTED = 2 |
Action: write restricted (password required) | |
static final int | ACTION_PERMANENTLY_NOT_WRITABLE = 3 |
Action: permanently not writable. | |
Overview
Completion interface passed to writeTag and lockUnlockTag.
Public Member Functions | |
void | exec (UgiTag tag, TagAccessReturnValues result) |
Completion method. More... | |
Member Function Documentation
◆ exec()
void com.ugrokit.api.UgiInventory.TagAccessCompletion.exec | ( | UgiTag | tag, |
TagAccessReturnValues | result | ||
) |
Completion method.
- Parameters
-
tag Tag accessed result Result of the access
Overview
Completion interface passed to getBatteryInfo.
Public Member Functions | |
void | exec (Ugi.BatteryInfo info) |
Completion method More... | |
Member Function Documentation
◆ exec()
void com.ugrokit.api.UgiInventory.GetBatteryInfoCompletion.exec | ( | Ugi.BatteryInfo | info | ) |
Completion method
- Parameters
-
info Battery information
Overview
Data for each tag read, sent if detailedPerReadData is YES in the RFID configuration.
Public Member Functions | |
Date | getTimestamp () |
Get when the find happened. More... | |
int | getFrequency () |
Get frequency the find happened at. More... | |
double | getRssiI () |
Get RSSI, I channel (0-15) More... | |
double | getRssiQ () |
Get RSSI, Q channel (0-15) More... | |
int | getReadData1 () |
Get read data. More... | |
int | getReadData2 () |
Get read data. More... | |
String | toString () |
Get a description of the tag, generally for debugging. More... | |
Member Function Documentation
◆ getTimestamp()
Date com.ugrokit.api.UgiInventory.DetailedPerReadData.getTimestamp | ( | ) |
Get when the find happened.
- Returns
- When the find happened
◆ getFrequency()
int com.ugrokit.api.UgiInventory.DetailedPerReadData.getFrequency | ( | ) |
Get frequency the find happened at.
- Returns
- frequency
◆ getRssiI()
double com.ugrokit.api.UgiInventory.DetailedPerReadData.getRssiI | ( | ) |
Get RSSI, I channel (0-15)
- Returns
- RSSI, I channel (0-15)
◆ getRssiQ()
double com.ugrokit.api.UgiInventory.DetailedPerReadData.getRssiQ | ( | ) |
Get RSSI, Q channel (0-15)
- Returns
- RSSI, Q channel (0-15)
◆ getReadData1()
int com.ugrokit.api.UgiInventory.DetailedPerReadData.getReadData1 | ( | ) |
Get read data.
- Returns
- Read data
◆ getReadData2()
int com.ugrokit.api.UgiInventory.DetailedPerReadData.getReadData2 | ( | ) |
Get read data.
- Returns
- Read data
◆ toString()
String com.ugrokit.api.UgiInventory.DetailedPerReadData.toString | ( | ) |
Get a description of the tag, generally for debugging.
- Returns
- string description
Overview
Return values from programTag, writeTag, lockUnlockTag and readTag.
Public Attributes | |
OK | |
Access was successful. | |
WRONG_PASSWORD | |
Incorrect password passed. | |
PASSWORD_REQUIRED | |
No password passed, but a password is required. | |
MEMORY_OVERRUN | |
Read/write to a memory locaion that does not exist on tht tag. | |
TAG_NOT_FOUND | |
Tag was not found. | |
GENERAL_ERROR | |
General error. | |
INVENTORY_STOPPED | |
Inventory stopped. | |
Overview
Completion interface passed to readTag.
Public Member Functions | |
void | exec (@SuppressWarnings("unused") UgiTag tag, byte[] data, TagAccessReturnValues result) |
Completion method. More... | |
Member Function Documentation
◆ exec()
void com.ugrokit.api.UgiInventory.TagReadCompletion.exec | ( | @SuppressWarnings("unused") UgiTag | tag, |
byte [] | data, | ||
TagAccessReturnValues | result | ||
) |
Completion method.
- Parameters
-
tag Tag read data Data read result Result of the read
Copyright © 2012-2017 U Grok It, Inc. connect@UGrokIt.com U Grok It and the U Grok It logo are registered trademarks of U Grok It, Inc. All other trademarks and copyrights are the property of their respective owners |