<UgiInventoryDelegate > Protocol Reference

Overview


A UgiInventoryDelegate object is passed to the startInventory method of the Ugi singleton.

This object receives notification when inventory events happen.

All of the protocol methods are optional, the delegate only implements the methods it needs.

Instance Methods

Filtering
(BOOL) - inventoryFilter:
 
Determine whether a newly found tag should be filtered out (not sent to inventoryTagFound or inventoryTagChanged, not put into the tags array). More...
 
(BOOL) - inventoryFilterLowLevel:
 
Filter out a tag at the raw EPC level – this is called on an arbitrary thread and must work very quickly More...
 
Tag state changes
(void) - inventoryTagChanged:isFirstFind:
 
The visibility of a tag has changed. More...
 
(void) - inventoryTagFound:withDetailedPerReadData:
 
A new tag has been found More...
 
(void) - inventoryTagSubsequentFinds:numFinds:withDetailedPerReadData:
 
A previously found tag has been found again More...
 
Other
(void) - inventoryHistoryInterval
 
A history interval has passed. More...
 

Lifecycle

enum  UgiInventoryCompletedReturnValues {
  UGI_INVENTORY_COMPLETED_OK =0, UGI_INVENTORY_COMPLETED_ERROR_SENDING =98, UGI_INVENTORY_COMPLETED_LOST_CONNECTION =99, UGI_INVENTORY_COMPLETED_SPI_NOT_WORKING =1,
  UGI_INVENTORY_COMPLETED_ENABLE_PIN_NOT_WORKING =2, UGI_INVENTORY_COMPLETED_INTERRUPT_PIN_NOT_WORKING =3, UGI_INVENTORY_COMPLETED_HF_NOT_SUPPORTED =4, UGI_INVENTORY_COMPLETED_CRYSTAL_NOT_STABLE =5,
  UGI_INVENTORY_COMPLETED_PLL_NOT_LOCKED =6, UGI_INVENTORY_COMPLETED_BATTERY_TOO_LOW =7, UGI_INVENTORY_COMPLETED_TEMPERATURE_TOO_HIGH =8, UGI_INVENTORY_COMPLETED_NOT_PROVISIONED =9,
  UGI_INVENTORY_COMPLETED_REGION_NOT_SET =10
}
 
Values passed to inventoryDidStopWithResult More...
 
(void) - inventoryDidStart
 
The reader has started doing inventory. More...
 
(void) - inventoryDidStopWithResult:
 
The reader has stopped doing inventory. More...
 

Instance Method Documentation

◆ inventoryDidStart()

- (void UgiInventoryDelegate) inventoryDidStart


The reader has started doing inventory.

This can happen multiple times during a single startInventory call, since the reader can be connected and disconnected from the host.

◆ inventoryDidStopWithResult:()

- (void UgiInventoryDelegate) inventoryDidStopWithResult: (UgiInventoryCompletedReturnValues result


The reader has stopped doing inventory.

If result is UGI_INVENTORY_COMPLETED_LOST_CONNECTION then this is a temporary stop and the inventory will continue when connection is reestablished.

Parameters
resultResult of inventory

◆ inventoryFilter:()

- (BOOL UgiInventoryDelegate) inventoryFilter: (UgiEpc *_Nonnull)  epc


Determine whether a newly found tag should be filtered out (not sent to inventoryTagFound or inventoryTagChanged, not put into the tags array).

Parameters
epcThe EPC
Returns
YES to filter out the tag (the defualt is to not filter out any tags)

◆ inventoryFilterLowLevel:()

- (BOOL UgiInventoryDelegate) inventoryFilterLowLevel: (UgiEpc *_Nonnull)  epc


Filter out a tag at the raw EPC level – this is called on an arbitrary thread and must work very quickly

Parameters
epcThe EPC
Returns
YES to filter out the EPC (the defualt is to not filter out any EPCs)

◆ inventoryTagChanged:isFirstFind:()

- (void UgiInventoryDelegate) inventoryTagChanged: (UgiTag *_Nullable)  tag
isFirstFind: (BOOL)  firstFind 


The visibility of a tag has changed.

  • A tag has been found for the first time
  • A tag has not been seen for the history period (interval * depth)
  • A tag that had not been seen for the history period has reappeared
Parameters
tagThe tag that has changed
firstFindYES if this is the first time this tag has been found

◆ inventoryTagFound:withDetailedPerReadData:()

- (void UgiInventoryDelegate) inventoryTagFound: (UgiTag *_Nonnull)  tag
withDetailedPerReadData: (NSArray< UgiDetailedPerReadData * > *_Nullable)  detailedPerReadData 


A new tag has been found

Parameters
tagThe tag that has been found
detailedPerReadDataArray of UgiDetailedPerReadData obejcts, if detailed per-read data was requested

◆ inventoryTagSubsequentFinds:numFinds:withDetailedPerReadData:()

- (void UgiInventoryDelegate) inventoryTagSubsequentFinds: (UgiTag *_Nonnull)  tag
numFinds: (int)  num
withDetailedPerReadData: (NSArray< UgiDetailedPerReadData * > *_Nullable)  detailedPerReadData 


A previously found tag has been found again

Parameters
tagThe tag
numThe number of finds since inventoryTagSubsequentFinds was last called
detailedPerReadDataArray of UgiDetailedPerReadData obejcts, if detailed per-read data was requested

◆ inventoryHistoryInterval()

- (void UgiInventoryDelegate) inventoryHistoryInterval


A history interval has passed.

This method is called at the end of each history interval IF one or more tags are currently visible

Enumeration Documentation

◆ UgiInventoryCompletedReturnValues

- (enum UgiInventoryDelegate) UgiInventoryCompletedReturnValues


Values passed to inventoryDidStopWithResult

Enumerator
UGI_INVENTORY_COMPLETED_OK 

Inventory completed normally.

UGI_INVENTORY_COMPLETED_ERROR_SENDING 

Error sending inventory command to reader.

UGI_INVENTORY_COMPLETED_LOST_CONNECTION 

Lost connection to the reader.

UGI_INVENTORY_COMPLETED_SPI_NOT_WORKING 

Reader error.

UGI_INVENTORY_COMPLETED_ENABLE_PIN_NOT_WORKING 

Reader error.

UGI_INVENTORY_COMPLETED_INTERRUPT_PIN_NOT_WORKING 

Reader error.

UGI_INVENTORY_COMPLETED_HF_NOT_SUPPORTED 

Reader error.

UGI_INVENTORY_COMPLETED_CRYSTAL_NOT_STABLE 

Reader error.

UGI_INVENTORY_COMPLETED_PLL_NOT_LOCKED 

Reader error.

UGI_INVENTORY_COMPLETED_BATTERY_TOO_LOW 

Reader error.

UGI_INVENTORY_COMPLETED_TEMPERATURE_TOO_HIGH 

Reader error.

UGI_INVENTORY_COMPLETED_NOT_PROVISIONED 

Reader error.

UGI_INVENTORY_COMPLETED_REGION_NOT_SET 

Reader error.