Class TagAccess


  • public class TagAccess
    extends java.lang.Object
    This class handles all the Tag Access operations. Access operations include Read, Write, Lock, Kill, BlockWrite, BlockErase.
    • Field Detail

      • OperationSequence

        public TagAccess.Sequence OperationSequence
        Used to perform a sequence of Access operations.
      • NXP

        public NXP NXP
        Used to call perform NXP's operations like SetEAS,ReadProtect,ResetReadProtect
      • Impinj

        public com.zebra.rfid.api3.Impinj Impinj
        Used to call perform Impinj's operations like QTReadParams, QTWriteParams, QTdata
    • Constructor Detail

      • TagAccess

        public TagAccess()
    • Method Detail

      • AssignMethods

        protected static void AssignMethods​(java.lang.String m_sProtocol)
      • finalize

        protected void finalize()
        Destructor
        Overrides:
        finalize in class java.lang.Object
      • init

        public void init​(com.zebra.rfid.api3.NativeLibParams nativeLibParams)
      • readWait

        public TagData readWait​(java.lang.String tagID,
                                TagAccess.ReadAccessParams readAccessParams,
                                AntennaInfo antennaInfo,
                                boolean bPrefilter)
                         throws InvalidUsageException,
                                OperationFailureException
        This method is used to read memory bank data from a specific tag.
        Parameters:
        tagID - EPC-ID of the Tag on which the Read operation is to be performed.
        readAccessParams - Parameters required for the Read operation.
        antennaInfo - Antennas on which the current operation is to be performed. If this is null, operation will be performed on all Antennas.
        bPrefilter - if true - Read API will apply tag ID as pre filter for read operation
        Returns:
        TagData corresponding to the Tag on which the read operation was performed.
        Throws:
        InvalidUsageException
        OperationFailureException
      • readWait

        public TagData readWait​(java.lang.String tagID,
                                TagAccess.ReadAccessParams readAccessParams,
                                AntennaInfo antennaInfo)
                         throws InvalidUsageException,
                                OperationFailureException
        This method is used to read memory bank data from a specific tag.
        Parameters:
        tagID - EPC-ID of the Tag on which the Read operation is to be performed.
        readAccessParams - Parameters required for the Read operation.
        antennaInfo - Antennas on which the current operation is to be performed. If this is null, operation will be performed on all Antennas.
        Returns:
        TagData corresponding to the Tag on which the read operation was performed.
        Throws:
        InvalidUsageException
        OperationFailureException
      • readEvent

        public void readEvent​(TagAccess.ReadAccessParams readAccessParams,
                              AccessFilter accessFilter,
                              AntennaInfo antennaInfo)
                       throws InvalidUsageException,
                              OperationFailureException
        This method is used to read memory bank data from tags that match the AccessFilter criteria if specified. Tags will be reported as notifications if the application has registered for Events.ReadNotify event. Else the Tags will be fetched using GetReadTags(s) methods. Completion of Access operation will be reported as RfidReadEvents event of type ACCESS_STOP_EVENT
        Parameters:
        readAccessParams - Parameters required for the Read operation.
        accessFilter - Access Filter which determines the Tags on which the Access operation is to be performed. If this is null, operation will be perfomed without any access filters.
        antennaInfo - Antennas on which the current operation is to be performed. If this is null, operation will be performed on all Antennas.
        Throws:
        InvalidUsageException
        OperationFailureException
      • writeWait

        public void writeWait​(java.lang.String tagID,
                              TagAccess.WriteAccessParams writeAccessParams,
                              AntennaInfo antennaInfo,
                              TagData tagData,
                              boolean bPrefilter,
                              boolean bTIDPrefilter)
                       throws InvalidUsageException,
                              OperationFailureException
        This method is used to write data to the memory bank of a specific tag.
        Parameters:
        tagID - EPC-ID of the Tag on which the Write operation is to be performed.
        writeAccessParams - Parameters required for the Write operation.
        antennaInfo - Antennas on which the current operation is to be performed. If this is null, operation will be performed on all Antennas.
        bPrefilter - if true - Write API will apply tag ID as pre filter for write operation
        bTIDPrefilter - if true - Write API will read TID memory of tag and apply TID data as pre filter for write operation Note: this will be used only for EPC memory writes, for other memory bank write tag ID (EPC) is used bPrefilter should be true for this to take effect
        Throws:
        InvalidUsageException
        OperationFailureException
      • writeEvent

        public void writeEvent​(TagAccess.WriteAccessParams writeAccessParams,
                               AccessFilter accessFilter,
                               AntennaInfo antennaInfo)
                        throws InvalidUsageException,
                               OperationFailureException
        This method is used to write data to the memory bank data of tags that match the AccessFilter criteria if specified. Completion of Access operation will be reported as Events.StatusNotify event of type ACCESS_STOP_EVENT.
        Parameters:
        writeAccessParams - Parameters required for the Write operation.
        accessFilter - Access Filter which determines the Tags on which the Access operation is to be performed. If this is null, operation will be perfomed without any access filters.
        antennaInfo - Antennas on which the current operation is to be performed. If this is null, operation will be performed on all Antennas.
        Throws:
        InvalidUsageException
        OperationFailureException
      • killWait

        public void killWait​(java.lang.String tagID,
                             TagAccess.KillAccessParams killAccessParams,
                             AntennaInfo antennaInfo,
                             boolean bPrefilter)
                      throws InvalidUsageException,
                             OperationFailureException
        This method is used to kill a specific tag.
        Parameters:
        tagID - EPC-ID of the Tag on which the Kill operation is to be performed.
        killAccessParams - Parameters required for the Kill operation.
        antennaInfo - Antennas on which the current operation is to be performed. If this is null, operation will be performed on all Antennas.
        bPrefilter - if true - kill API will apply tag ID as pre filter for kill operation
        Throws:
        InvalidUsageException
        OperationFailureException
      • killEvent

        public void killEvent​(TagAccess.KillAccessParams killAccessParams,
                              AccessFilter accessFilter,
                              AntennaInfo antennaInfo)
                       throws InvalidUsageException,
                              OperationFailureException
        This method is used to kill tags that match the AccessFilter criteria if specified. Completion of Access operation will be reported as Events.StatusNotify event of type ACCESS_STOP_EVENT.
        Parameters:
        killAccessParams - Parameters required for the Kill operation.
        accessFilter - Access Filter which determines the Tags on which the Access operation is to be performed. If this is null, operation will be perfomed without any access filters.
        antennaInfo - Antennas on which the current operation is to be performed. If this is null, operation will be performed on all Antennas.
        Throws:
        InvalidUsageException
        OperationFailureException
      • lockWait

        public void lockWait​(java.lang.String tagID,
                             TagAccess.LockAccessParams lockAccessParams,
                             AntennaInfo antennaInfo,
                             boolean bPrefilter)
                      throws InvalidUsageException,
                             OperationFailureException
        This method is used to lock a specific tag.
        Parameters:
        tagID - EPC-ID of the Tag on which the Lock operation is to be performed.
        lockAccessParams - Parameters required for the Lock operation.
        antennaInfo - Antennas on which the current operation is to be performed. If this is null, operation will be performed on all Antennas.
        bPrefilter - if true - lock API will apply tag ID as pre filter for lock operation
        Throws:
        InvalidUsageException
        OperationFailureException
      • lockEvent

        public void lockEvent​(TagAccess.LockAccessParams lockAccessParams,
                              AccessFilter accessFilter,
                              AntennaInfo antennaInfo)
                       throws InvalidUsageException,
                              OperationFailureException
        This method is used to lock tags that match the AccessFilter criteria if specified. Completion of Access operation will be reported as Events.StatusNotify event of type ACCESS_STOP_EVENT.
        Parameters:
        lockAccessParams - Parameters required for the Lock operation.
        accessFilter - Access Filter which determines the Tags on which the Access operation is to be performed. If this is null, operation will be perfomed without any access filters.
        antennaInfo - Antennas on which the current operation is to be performed. If this is null, /// operation will be performed on all Antennas.
        Throws:
        InvalidUsageException
        OperationFailureException
      • blockWriteWait

        public void blockWriteWait​(java.lang.String tagID,
                                   TagAccess.WriteAccessParams writeAccessParams,
                                   AntennaInfo antennaInfo,
                                   TagData tagData,
                                   boolean bPrefilter,
                                   boolean bTIDPrefilter)
                            throws InvalidUsageException,
                                   OperationFailureException
        This method is used to perform Block-Write operation on a specific tag.
        Parameters:
        tagID - EPC-ID of the Tag on which the Block-Write operation is to be performed.
        writeAccessParams - Parameters required for the Block-Write operation.
        antennaInfo - Antennas on which the current operation is to be performed. If this is null, operation will be performed on all Antennas.
        bPrefilter - if true - BlockWrite API will apply tag ID as pre filter for write operation
        bTIDPrefilter - if true - BlockWrite API will read TID memory of tag and apply TID data as pre filter for write operation Note: this will be used only for EPC memory block writes, for other memory bank write tag ID (EPC) is used bPrefilter should be true for this to take effect
        Throws:
        InvalidUsageException
        OperationFailureException
      • blockWriteEvent

        public void blockWriteEvent​(TagAccess.WriteAccessParams writeAccessParams,
                                    AccessFilter accessFilter,
                                    AntennaInfo antennaInfo)
                             throws InvalidUsageException,
                                    OperationFailureException
        This method is used to Block-Write on tags that match the AccessFilter criteria if specified. Completion of Access operation will be reported as Events.StatusNotify event of type ACCESS_STOP_EVENT.
        Parameters:
        writeAccessParams - Parameters required for the Block write operation.
        accessFilter - Access Filter which determines the Tags on which the Access operation is to be performed. If this is null, operation will be perfomed without any access filters.
        antennaInfo -
        Throws:
        InvalidUsageException
        OperationFailureException
      • blockEraseWait

        public void blockEraseWait​(java.lang.String tagID,
                                   TagAccess.BlockEraseAccessParams blockEraseAccessParams,
                                   AntennaInfo antennaInfo,
                                   TagData tagData,
                                   boolean bPrefilter)
                            throws InvalidUsageException,
                                   OperationFailureException
        This method is used to perform Block-Erase operation on a specific tag.
        Parameters:
        tagID - EPC-ID of the Tag on which the Block-Erase operation is to be performed.
        blockEraseAccessParams - Parameters required for the Block-Erase operation.
        antennaInfo - Antennas on which the current operation is to be performed. If this is null, operation will be performed on all Antennas.
        bPrefilter - if true - blockErase API will apply tag ID as pre filter for blockEraseWait operation
        Throws:
        InvalidUsageException
        OperationFailureException
      • blockEraseEvent

        public void blockEraseEvent​(TagAccess.BlockEraseAccessParams blockEraseAccessParams,
                                    AccessFilter accessFilter,
                                    AntennaInfo antennaInfo)
                             throws InvalidUsageException,
                                    OperationFailureException
        This method is used to perform Block-Erase on tags that match the AccessFilter criteria if specified. Completion of Access operation will be reported as Events.StatusNotify event of type ACCESS_STOP_EVENT.
        Parameters:
        blockEraseAccessParams - Parameters required for the Block-Erase operation.
        accessFilter - Access Filter which determines the Tags on which the Access operation is to be performed. If this is null, operation will be perfomed without any access filters.
        antennaInfo - Antennas on which the current operation is to be performed. If this is null, operation will be performed on all Antennas.
        Throws:
        InvalidUsageException
        OperationFailureException
      • blockPermalockWait

        public TagData blockPermalockWait​(java.lang.String tagID,
                                          TagAccess.BlockPermalockAccessParams blockPermalockAccessParams,
                                          AntennaInfo antennaInfo,
                                          boolean bPrefilter)
                                   throws InvalidUsageException,
                                          OperationFailureException
        Allows to permalock multiple words in a Tag’s Reserved, EPC, TID, or User memory with a single command, or read the permalock status of the memory blocks in a Tag's User memory
        Parameters:
        tagID - Access-Operation will be performed on Tag with mentioned TagID.
        blockPermalockAccessParams - Parameters required for the operation.
        antennaInfo - Antennas on which the current operation is to be performed. If this is null, operation will be performed on all Antennas.
        bPrefilter - if true - blockPermalock API will apply tag ID as pre filter for blockPermalock operation
        Returns:
        TagData corresponding to the Tag on which the BlockPermalock operation was performed.
        Throws:
        InvalidUsageException
        OperationFailureException
      • blockPermalockWait

        public TagData blockPermalockWait​(java.lang.String tagID,
                                          TagAccess.BlockPermalockAccessParams blockPermalockAccessParams,
                                          AntennaInfo antennaInfo)
                                   throws InvalidUsageException,
                                          OperationFailureException
        Allows to permalock multiple words in a Tag’s Reserved, EPC, TID, or User memory with a single command, or read the permalock status of the memory blocks in a Tag's User memory
        Parameters:
        tagID - Access-Operation will be performed on Tag with mentioned TagID.
        blockPermalockAccessParams - Parameters required for the operation.
        antennaInfo - Antennas on which the current operation is to be performed. If this is null, operation will be performed on all Antennas.
        Returns:
        TagData corresponding to the Tag on which the BlockPermalock operation was performed.
        Throws:
        InvalidUsageException
        OperationFailureException
      • blockPermalockEvent

        public void blockPermalockEvent​(TagAccess.BlockPermalockAccessParams blockPermalockAccessParams,
                                        AccessFilter accessFilter,
                                        AntennaInfo antennaInfo)
                                 throws InvalidUsageException,
                                        OperationFailureException
        Allows to permalock multiple words in a Tag’s Reserved, EPC, TID, or User memory with a single command, or read the permalock satus of the memory blocks in a Tag's User memory
        Parameters:
        blockPermalockAccessParams - Parameters required for the operation.
        accessFilter - Access Filter which determines the Tags on which the Access operation is to be performed. If this is null, operation will be perfomed without any access filters.
        antennaInfo - Antennas on which the current operation is to be performed. If this is null, operation will be performed on all Antennas.
        Throws:
        InvalidUsageException
        OperationFailureException
      • recommisionEvent

        public void recommisionEvent​(TagAccess.RecommisionAccessParams recommisionAccessParams,
                                     AccessFilter accessFilter,
                                     AntennaInfo antennaInfo)
                              throws InvalidUsageException,
                                     OperationFailureException
        Not Supported in the Android RFID SDK. Used for recommissioning tag(s).
        Parameters:
        recommisionAccessParams - Parameters required for the operation.
        accessFilter - Access Filter which determines the Tags on which the Access operation is to be performed. If this is null, operation will be perfomed without any access filters.
        antennaInfo - Antennas on which the current operation is to be performed. If this is null, operation will be performed on all Antennas.
        Throws:
        InvalidUsageException
        OperationFailureException
      • getLastAccessResult

        public void getLastAccessResult​(int[] successCount,
                                        int[] failureCount)
                                 throws InvalidUsageException,
                                        OperationFailureException
        This method retrives the result of the last performed access operation. If the last access operation was an Access Sequence, the result indicates the number of tags on which all the operations in the Access Sequence was a success. If atleast one operatin failed, that tag will be counted as failed.
        Parameters:
        successCount - Number of Tags on which the operation succeeded
        failureCount - Number of Tags on which the operation failed
        Throws:
        InvalidUsageException
        OperationFailureException