Class RFIDScannerProperties

java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
de.gmxhome.conrad.jpos.jpos_base.rfidscanner.RFIDScannerProperties
All Implemented Interfaces:
JposBaseInterface, RFIDScannerInterface

public class RFIDScannerProperties extends JposCommonProperties implements RFIDScannerInterface
Class containing the RFID scanner specific properties, their default values and default implementations of RFIDScannerInterface. For details about properties, methods and method parameters, see UPOS specification, chapter RFID Scanner. No methods for meth
  • Field Details

    • CapContinuousRead

      public boolean CapContinuousRead
      UPOS property CapContinuousRead. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapDisableTag

      public boolean CapDisableTag
      UPOS property CapDisableTag. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapLockTag

      public boolean CapLockTag
      UPOS property CapLockTag. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapMultipleProtocols

      public int CapMultipleProtocols
      UPOS property CapMultipleProtocols. Default: 0. Must be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapReadTimer

      public boolean CapReadTimer
      UPOS property CapReadTimer. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapWriteTag

      public int CapWriteTag
      UPOS property CapWriteTag. Default: CWT_NONE. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • ContinuousReadMode

      public boolean ContinuousReadMode
      UPOS property ContinuousReadMode. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CurrentTagID

      public byte[] CurrentTagID
      UPOS property CurrentTagID. Default: null. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CurrentTagProtocol

      public int CurrentTagProtocol
      UPOS property CurrentTagProtocol. Default: 0. Must be overwritten by objects derived from JposDevice before delivering a DataEvent.
    • CurrentTagUserData

      public byte[] CurrentTagUserData
      UPOS property CurrentTagUserData. Default: null. Must be overwritten by objects derived from JposDevice before delivering a DataEvent.
    • ProtocolMask

      public int ProtocolMask
      UPOS property ProtocolMask. Default: Same as CapMultipleProtocols.
    • ReadTimerInterval

      public int ReadTimerInterval
      UPOS property ReadTimerInterval. Default: 0.
    • TagCount

      public int TagCount
      UPOS property CapCardErrorDetection. Default: 0.
  • Constructor Details

    • RFIDScannerProperties

      protected RFIDScannerProperties(int dev)
      Constructor.
      Parameters:
      dev - Device index
  • Method Details

    • clearDataProperties

      public void clearDataProperties()
      Description copied from class: JposCommonProperties
      Clear data properties. Performed during ClearInput and ClearInputProperties.
      Overrides:
      clearDataProperties in class JposCommonProperties
    • initOnOpen

      public void initOnOpen()
      Description copied from class: JposCommonProperties
      Initialization of properties that must be initialized during open.
      Overrides:
      initOnOpen in class JposCommonProperties
    • protocolMask

      public void protocolMask(int mask) throws jpos.JposException
      Description copied from interface: RFIDScannerInterface
      Final part of setting ProtocolMask. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is claimed,
      • Mask contains only bits that are set in CapMultipleProtocols as well.
      Specified by:
      protocolMask in interface RFIDScannerInterface
      Parameters:
      mask - Bit pattern wherein each bit signifies one predefined RFID tag protocol.
      Throws:
      jpos.JposException - If an error occurs.
    • readTimerInterval

      public void readTimerInterval(int interval) throws jpos.JposException
      Description copied from interface: RFIDScannerInterface
      Final part of setting ReadTimerInterval. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is claimed,
      • CapReadTimer is true,
      • ContinuousReadMode is false,
      • interval is not negative.
      Specified by:
      readTimerInterval in interface RFIDScannerInterface
      Parameters:
      interval - The minimum time interval between tag reads in milliseconds.
      Throws:
      jpos.JposException - If an error occurs.
    • stopReadTags

      public void stopReadTags(byte[] password) throws jpos.JposException
      Description copied from interface: RFIDScannerInterface
      Final part of StopReadTags method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • ContinuousReadMode is true.
      After successful completion, ContinuousReadMode must be reset to false.
      Specified by:
      stopReadTags in interface RFIDScannerInterface
      Parameters:
      password - Authorized key for reader, if needed, null or zero length binary otherwise.
      Throws:
      jpos.JposException - If an error occurs.
    • startReadTags

      public StartReadTags startReadTags(int cmd, byte[] filterID, byte[] filtermask, int start, int length, byte[] password) throws jpos.JposException
      Description copied from interface: RFIDScannerInterface
      Final part of StartReadTags method. Can be overwritten in derived class, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • CapContinuousRead is true,
      • ContinuousReadMode is false,
      • State is S_IDLE,
      • filterID and filtermask have the same length,
      • cmd is one of RT_ID, RT_FULLUSERDATA, RT_PARTIALUSERDATA, RT_ID_FULLUSERDATA or RT_ID_PARTIALUSERDATA,
      • If cmd is one of RT_PARTIALUSERDATA or RT_ID_PARTIALUSERDATA, start and length are positive.
      Since the UPOS specification specifies StartReadMode as asynchronous method, this method must only start polling and return after setting ContinuousReadMode to true.
      Specified by:
      startReadTags in interface RFIDScannerInterface
      Parameters:
      cmd - Read command, specifies what has to be read.
      filterID - Holds a bit pattern to be AND’ed with filtermask to specify which tags shall be read.
      filtermask - Mask for filterID and tag ID, a tag will be read whenever the tag ID AND'ed with filtermask is equal to filterID AND'ed with filtermask.
      start - In case of partial user data read, start specifies the zero-based position within user data where read shall start.
      length - In case of partial user data read, length specifies the number of bytes to be read.
      password - Authorized key for reader, if needed, null or zero length binary otherwise.
      Returns:
      StartReadTags object for use in final part.
      Throws:
      jpos.JposException - If an error occurs.
    • readTags

      public ReadTags readTags(int cmd, byte[] filterID, byte[] filtermask, int start, int length, int timeout, byte[] password) throws jpos.JposException
      Description copied from interface: RFIDScannerInterface
      Validation part of ReadTags method. Can be overwritten in derived class, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • ContinuousReadMode is false,
      • State is S_IDLE,
      • filterID and filtermask have the same length,
      • cmd is one of RT_ID, RT_FULLUSERDATA, RT_PARTIALUSERDATA, RT_ID_FULLUSERDATA or RT_ID_PARTIALUSERDATA,
      • If cmd is one of RT_PARTIALUSERDATA or RT_ID_PARTIALUSERDATA, start and length are positive,
      • timeout is positive or FOREVER.
      Since the UPOS specification specifies StartReadMode as asynchronous method, this method must only start polling and return after setting ContinuousReadMode to true.
      Specified by:
      readTags in interface RFIDScannerInterface
      Parameters:
      cmd - Read command, specifies what has to be read.
      filterID - Holds a bit pattern to be AND’ed with filtermask to specify which tags shall be read.
      filtermask - Mask for filterID and tag ID, a tag will be read whenever the tag ID AND'ed with filtermask is equal to filterID AND'ed with filtermask.
      start - In case of partial user data read, start specifies the zero-based position within user data where read shall start.
      length - In case of partial user data read, length specifies the number of bytes to be read.
      timeout - Allowed execution time, in milliseconds or FOREVER for unlimited execution time.
      password - Authorized key for reader, if needed, null or zero length binary otherwise.
      Returns:
      ReadTags object for use in final part.
      Throws:
      jpos.JposException - If an error occurs.
    • disableTag

      public DisableTag disableTag(byte[] tagID, int timeout, byte[] password) throws jpos.JposException
      Description copied from interface: RFIDScannerInterface
      Validation part of DisableTag method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • CapDisableTag is true,
      • ContinuousReadMode is false,
      • State is S_IDLE,
      • timeout is positive or FOREVER.
      Specified by:
      disableTag in interface RFIDScannerInterface
      Parameters:
      tagID - Tag ID to be processed.
      timeout - Allowed execution time, in milliseconds.
      password - Authorized key for reader that might be required, zero length if not needed.
      Returns:
      DisableTag object for use in final part.
      Throws:
      jpos.JposException - If an error occurs.
    • lockTag

      public LockTag lockTag(byte[] tagID, int timeout, byte[] password) throws jpos.JposException
      Description copied from interface: RFIDScannerInterface
      Validation part of LockTag method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • CapLockTag is true,
      • ContinuousReadMode is false,
      • State is S_IDLE,
      • timeout is positive or FOREVER.
      Specified by:
      lockTag in interface RFIDScannerInterface
      Parameters:
      tagID - Tag ID to be processed.
      timeout - Allowed execution time, in milliseconds.
      password - Authorized key for reader that might be required, zero length if not needed.
      Returns:
      LockTag object for use in final part.
      Throws:
      jpos.JposException - If an error occurs.
    • writeTagData

      public WriteTagData writeTagData(byte[] tagID, byte[] userdata, int start, int timeout, byte[] password) throws jpos.JposException
      Description copied from interface: RFIDScannerInterface
      Validation part of WriteTagData method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • CapWriteTag is one of CWT_ALL or CWT_USERDATA,
      • ContinuousReadMode is false,
      • State is S_IDLE,
      • start is positive,
      • timeout is positive or FOREVER.
      Specified by:
      writeTagData in interface RFIDScannerInterface
      Parameters:
      tagID - Tag ID to be processed.
      userdata - Data to be written.
      start - Zero-based position within the tags UserData field to begin writing.
      timeout - Allowed execution time, in milliseconds.
      password - Authorized key for reader that might be required, zero length if not needed.
      Returns:
      WriteTagData object for use in final part.
      Throws:
      jpos.JposException - If an error occurs.
    • writeTagID

      public WriteTagID writeTagID(byte[] sourceID, byte[] destID, int timeout, byte[] password) throws jpos.JposException
      Description copied from interface: RFIDScannerInterface
      Validation part of DisableTag method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • CapWriteTag is one of CWT_ALL or CWT_ID,
      • ContinuousReadMode is false,
      • State is S_IDLE,
      • timeout is positive or FOREVER.
      Specified by:
      writeTagID in interface RFIDScannerInterface
      Parameters:
      sourceID - Original Tag ID to be processed.
      destID - New ID of the tag.
      timeout - Allowed execution time, in milliseconds.
      password - Authorized key for reader that might be required, zero length if not needed.
      Returns:
      WriteTagID object for use in final part.
      Throws:
      jpos.JposException - If an error occurs.
    • disableTag

      public void disableTag(DisableTag request) throws jpos.JposException
      Description copied from interface: RFIDScannerInterface
      Final part of DisableTag method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a DisableTag object. This method will be called when the corresponding operation shall be performed. All plausibility checks have been made before, only runtime errors can occur.
      Specified by:
      disableTag in interface RFIDScannerInterface
      Parameters:
      request - Output request object returned by validation method that contains all parameters to be used by DisableTag.
      Throws:
      jpos.JposException - If an error occurs.
    • lockTag

      public void lockTag(LockTag request) throws jpos.JposException
      Description copied from interface: RFIDScannerInterface
      Final part of LockTag method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a LockTag object. This method will be called when the corresponding operation shall be performed. All plausibility checks have been made before, only runtime errors can occur.
      Specified by:
      lockTag in interface RFIDScannerInterface
      Parameters:
      request - Output request object returned by validation method that contains all parameters to be used by LockTag.
      Throws:
      jpos.JposException - If an error occurs.
    • writeTagData

      public void writeTagData(WriteTagData request) throws jpos.JposException
      Description copied from interface: RFIDScannerInterface
      Final part of WriteTagData method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a WriteTagData object. This method will be called when the corresponding operation shall be performed. All plausibility checks have been made before, only runtime errors can occur.
      Specified by:
      writeTagData in interface RFIDScannerInterface
      Parameters:
      request - Output request object returned by validation method that contains all parameters to be used by WriteTagData.
      Throws:
      jpos.JposException - If an error occurs.
    • writeTagID

      public void writeTagID(WriteTagID request) throws jpos.JposException
      Description copied from interface: RFIDScannerInterface
      Final part of WriteTagID method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a WriteTagID object. This method will be called when the corresponding operation shall be performed. All plausibility checks have been made before, only runtime errors can occur.
      Specified by:
      writeTagID in interface RFIDScannerInterface
      Parameters:
      request - Output request object returned by validation method that contains all parameters to be used by WriteTagID.
      Throws:
      jpos.JposException - If an error occurs.
    • readTags

      public void readTags(ReadTags request) throws jpos.JposException
      Description copied from interface: RFIDScannerInterface
      Final part of ReadTags method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a ReadTags object. This method will be called when the corresponding operation shall be performed. All plausibility checks have been made before, only runtime errors can occur.
      Specified by:
      readTags in interface RFIDScannerInterface
      Parameters:
      request - Input request object returned by validation method that contains all parameters to be used by ReadTags.
      Throws:
      jpos.JposException - If an error occurs.
    • startReadTags

      public void startReadTags(StartReadTags request) throws jpos.JposException
      Description copied from interface: RFIDScannerInterface
      Final part of StartReadTags method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a StartReadTags object. This method will be called when the corresponding operation shall be performed. All plausibility checks have been made before, only runtime errors can occur.
      Specified by:
      startReadTags in interface RFIDScannerInterface
      Parameters:
      request - Input request object returned by validation method that contains all parameters to be used by StartReadTags.
      Throws:
      jpos.JposException - If an error occurs.