java.lang.Object
com.tccc.kos.ext.freestyle.hardware.rfid.RfidTag
Direct Known Subclasses:
FreestyleRfidTag

public class RfidTag extends Object
Generic RFID tag base class that just hold banks of data and information about where the tag was read from.
Version:
2023-09-14
  • Constructor Details

    • RfidTag

      public RfidTag(RfidAntenna antenna, int physicalPos, short[] epcBank, short[] tidBank, short[] userBank, RfidTagFactory<?> factory, RfidReadDescriptor readDescriptor)
      Create a tag with the specified data.
      Parameters:
      antenna - the antenna the tag was read from
      physicalPos - the physical position on the antenna
      epcBank - the epc data from the tag
      tidBank - the tid data from the tag
      userBank - the user data from the tag
      factory - the factory that is calling this constructor
  • Method Details

    • writeTag

      public boolean writeTag(RfidWriteData data, boolean updateTag)
      Write the specified data to this tag. If updateTag is true and the write is successful, the data will be merged into the underlying tag data.
      Parameters:
      data - the data to write to the tag
      updateTag - if true, update the internal tag data after successful write
      Returns:
      true if the write was successful
    • updateTagData

      public void updateTagData(RfidWriteData data)
      Called when writeTag() performs a successful write with updateTag set to true. This is responsible for merging the write data back into this tag. This implementation simply merges the data back into the bank data. If a given tag implementation doesn't keep data in this raw format then it needs to override this method accordingly.
    • getAntennaNum

      public int getAntennaNum()
      The driver antenna number where the tag was found.
    • getLogicalPos

      public int getLogicalPos()
      The logical position of the tag on the antenna.
    • getPhysicalPos

      public int getPhysicalPos()
      Return the physical position of the tag on the antenna.
    • getSelector

      public RfidTagSelector getSelector()
      Return a selector for this tag. By default this returns a selector that matches all bank data exactly. This should be overridden to be more specific to the tag type.
      Returns:
      a selector to identify this tag
    • getAntenna

      public RfidAntenna getAntenna()
    • getTidBank

      public short[] getTidBank()
    • getEpcBank

      public short[] getEpcBank()
    • getUserBank

      public short[] getUserBank()
    • getFactory

      public RfidTagFactory<?> getFactory()
    • getReadDescriptor

      public RfidReadDescriptor getReadDescriptor()
    • getInfoRSSI

      public int getInfoRSSI()
    • getInfoPhase

      public int getInfoPhase()
    • getInfoChannel

      public int getInfoChannel()
    • getInfoAntenna

      public int getInfoAntenna()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • setReadDescriptor

      public void setReadDescriptor(RfidReadDescriptor readDescriptor)
    • setInfoRSSI

      public void setInfoRSSI(int infoRSSI)
    • setInfoPhase

      public void setInfoPhase(int infoPhase)
    • setInfoChannel

      public void setInfoChannel(int infoChannel)
    • setInfoAntenna

      public void setInfoAntenna(int infoAntenna)