com.pax.dal.entity

Class PiccCardInfo

  • java.lang.Object
    • com.pax.dal.entity.PiccCardInfo
    • Constructor Summary

      Constructors 
      Constructor and Description
      PiccCardInfo() 
      PiccCardInfo(byte cardType, byte[] serialInfo, byte cid, byte[] other) 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      byte getCardType()
      获取卡类型, 参考setCardType(byte)
      get card type setCardType(byte)
      byte getCID()
      获取逻辑通道号
      Card ID, points to buffer storing card logical channel number.
      byte[] getOther() 
      byte[] getSerialInfo()
      获取卡片序列号
      Points to first address of buffer storing card serial number information
      void setCardType(byte cardType)
      设置卡片类型
      set card type
      void setCID(byte cID)
      设置逻辑通道号,存放卡片逻辑通道号,该通道号由驱动内部分配和指定,取值范围为0~14
      Card ID, points to buffer storing card logical channel number.
      void setOther(byte[] other)
      存放详细错误代码、卡片响应信息等内容的缓冲区
      Points to buffer storing detailed error code and card response information
      void setSerialInfo(byte[] serialInfo)
      设置卡片序列号
      Points to first address of buffer storing card serial number information
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PiccCardInfo

        public PiccCardInfo(byte cardType,
                            byte[] serialInfo,
                            byte cid,
                            byte[] other)
    • Method Detail

      • setCardType

        public void setCardType(byte cardType)
        设置卡片类型
        set card type
        Parameters:
        cardType -
        • 'A': 搜寻到A型卡
        • 'B': 搜寻到B型卡
        • 'M': 搜寻到m1卡
        • 'A': Found type A card
        • 'B': Found type B card
        • 'M': Found type M1 card
      • getSerialInfo

        public byte[] getSerialInfo()
        获取卡片序列号
        Points to first address of buffer storing card serial number information
        Returns:
      • setSerialInfo

        public void setSerialInfo(byte[] serialInfo)
        设置卡片序列号
        Points to first address of buffer storing card serial number information
        Parameters:
        serialInfo -
      • getCID

        public byte getCID()
        获取逻辑通道号
        Card ID, points to buffer storing card logical channel number. The channel number is allocated internally by driver, and range is 0~14.
        Returns:
      • setCID

        public void setCID(byte cID)
        设置逻辑通道号,存放卡片逻辑通道号,该通道号由驱动内部分配和指定,取值范围为0~14
        Card ID, points to buffer storing card logical channel number. The channel number is allocated internally by driver, and range is 0~14.
        Parameters:
        cID -
      • getOther

        public byte[] getOther()
        Returns:
        Other:len(1字节)+errcode(2字节)+卡片相关信息
        • 1.len表示返回信息的总长度,不包括len本身的1个字节
        • 2.对A型卡,Other表示:len[1]+errcode[2]+ATQA[2]+SAK1+[SAK2]+[SAK3]+ATS
          SAK1/SAK2/SAK3均为1字节,[SAK2]和[SAK3]表示可选,当SerialInfo为4字节时只有SAK1,当SerialInfo为7字节时包含SAK1和SAK2,当SerialInfo为10字节时包含SAK1,SAK2及SAK3。 ATQA为2字节,其中ATS的长度为len减去已知信息的长度。
        • 3.对M型卡,Other表示:len[1]+errcode[2]+ATQA[2]+SAK1
        • 4.对B型卡,Other表示:len[1]+errcode[2]+ATQB[12]+ATTRIB
          ATQB长度为12字节,ATTRIB的长度为len减去已知信息的长度
        有关ATS、ATQB、ATQA的详细信息请查阅ISO14443-3、ISO14443-4的相关部分。
        Other: len (1 byte) + errCode (2 bytes) + card related information
        • 1. len denotes the total length of the returned information, excluding one byte of len itself
        • .
        • 2. For type A card, Other means len [1] + errCode [2] + ATQA [2] + SAK1 + [SAK2] + [SAK3] + ATS
          SAK1/SAK2/SAK3 are 1 byte, [SAK2] and [SAK3] are optional, only SAK1 when SerialInfo is 4 bytes, SAK1 and SAK2 when SerialInfo is 7 bytes, and SAK1, SAK2 and SAK3 when SerialInfo is 10 bytes. ATQA is 2 bytes, where the length of ATS is len minus the length of known information.
        • 3. For M-card, Other means len [1] + errCode [2] + ATQA [2] + SAK1
        • 4. For type B cards, Other means len [1] + errCode [2] + ATQB [12] + ATTRIB
          ATQB length is 12 bytes, ATTRIB length is len minus the length of known information
        • .
        For detailed information on ATS, ATQB and ATQA, please refer to the relevant parts of ISO14443-3 and ISO14443-4.
      • setOther

        public void setOther(byte[] other)
        存放详细错误代码、卡片响应信息等内容的缓冲区
        Points to buffer storing detailed error code and card response information
        Parameters:
        other -
        Other:len(1字节)+errcode(2字节)+卡片相关信息
        • 1.len表示返回信息的总长度,不包括len本身的1个字节
        • 2.对A型卡,Other表示:len[1]+errcode[2]+ATQA[2]+SAK1+[SAK2]+[SAK3]+ATS
          SAK1/SAK2/SAK3均为1字节,[SAK2]和[SAK3]表示可选,当SerialInfo为4字节时只有SAK1,当SerialInfo为7字节时包含SAK1和SAK2,当SerialInfo为10字节时包含SAK1,SAK2及SAK3。 ATQA为2字节,其中ATS的长度为len减去已知信息的长度。
        • 3.对M型卡,Other表示:len[1]+errcode[2]+ATQA[2]+SAK1
        • 4.对B型卡,Other表示:len[1]+errcode[2]+ATQB[12]+ATTRIB
          ATQB长度为12字节,ATTRIB的长度为len减去已知信息的长度
        有关ATS、ATQB、ATQA的详细信息请查阅ISO14443-3、ISO14443-4的相关部分。
        Other: len (1 byte) + errCode (2 bytes) + card related information
        • 1. len denotes the total length of the returned information, excluding one byte of len itself
        • .
        • 2. For type A card, Other means len [1] + errCode [2] + ATQA [2] + SAK1 + [SAK2] + [SAK3] + ATS
          SAK1/SAK2/SAK3 are 1 byte, [SAK2] and [SAK3] are optional, only SAK1 when SerialInfo is 4 bytes, SAK1 and SAK2 when SerialInfo is 7 bytes, and SAK1, SAK2 and SAK3 when SerialInfo is 10 bytes. ATQA is 2 bytes, where the length of ATS is len minus the length of known information.
        • 3. For M-card, Other means len [1] + errCode [2] + ATQA [2] + SAK1
        • 4. For type B cards, Other means len [1] + errCode [2] + ATQB [12] + ATTRIB
          ATQB length is 12 bytes, ATTRIB length is len minus the length of known information
        • .
        For detailed information on ATS, ATQB and ATQA, please refer to the relevant parts of ISO14443-3 and ISO14443-4.