RFIDWithISO14443B

com.rscja.deviceapi

## Class RFIDWithISO14443B

- java.lang.Object
- - com.rscja.deviceapi.RFIDWithISO14443B

-     public class RFIDWithISO14443B
      extends java.lang.Object

  RFID模块ISO14443B协议操作类
  RFID module ISO14443B protocol operation type

  注意：
  Attention:
  1、使用前请确认您的机器已安装此模块。
  1. Make sure this module is installed before using.
  2、要正常使用模块需要在\libs\armeabi\目录放置libDeviceAPI.so文件
  2. Put libDeviceAPI.so file in directoy \libs\armeabi\ then module can be used normally.
  3、在操作设备前需要调用 `init()` 打开设备，使用完后调用 `free()` 关闭设备
  3. call `init()` to switch on the device before operating, call `free()` to switch off the device after using.

  Author:
    liuruifeng

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `free()` 释放rfid模块 Release RFID module
    `static RFIDWithISO14443B` | `getInstance()` 获取ISO14443B协议操作实例 Acquire ISO14443B protocol operation Instance
    `java.lang.String` | `getUID()` 获取卡片ID Acquire card ID
    `byte[]` | `getUIDBytes()` 获取卡片ID Acquire card ID
    `java.lang.String` | `getVersion()` 获取rfid 版本信息 Acquire RFID version infor
    `boolean` | `init()` 初始化rfid模块 initialize RFID module
    `boolean` | `init(boolean isRfOff)`
    `boolean` | `isPowerOn()` 判断设备是否上电 Judge the device is powered on or not.
    `java.lang.String` | `reset()` CPU卡复位操作指令 CPU card reset operation commande
    `boolean` | `rfidUpgrade(int packageCount, int index, int currSize, byte[] data)` 固件升级 firmware upgrade
    `java.lang.String` | `sendCommand(java.lang.String cmd)` CPU卡 T=CL发送COS指令 CPU card T=CL send COS command

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getInstance

          public static RFIDWithISO14443B getInstance()
                                               throws ConfigurationException

      获取ISO14443B协议操作实例
      Acquire ISO14443B protocol operation Instance
      Returns:
        ISO14443B协议操作实例
        ISO14443B protocol operation Instance
      Throws:
        `ConfigurationException` - 配置错误异常
        Configuration err.

    - #### getUID

          public java.lang.String getUID()

      获取卡片ID
      Acquire card ID
      Returns:
        失败返回null
        failure return null

    - #### getUIDBytes

          public byte[] getUIDBytes()

      获取卡片ID
      Acquire card ID
      Returns:
        失败返回null
        failure return null

    - #### sendCommand

          public java.lang.String sendCommand(java.lang.String cmd)

      CPU卡 T=CL发送COS指令
      CPU card T=CL send COS command
      Parameters:
        `cmd` - COS指令内容
        COS command content
      Returns:
        CPU卡返回的COS指令内容
        CPU card return COS command

    - #### reset

          public java.lang.String reset()

      CPU卡复位操作指令
      CPU card reset operation commande
      Returns:
        CPU卡返回的reset操作数据
        CPU card return reset operation data

    - #### init

          public boolean init()

      初始化rfid模块
      initialize RFID module
      Returns:
        true成功，false失败

    - #### init

          public boolean init(boolean isRfOff)

    - #### free

          public boolean free()

      释放rfid模块
      Release RFID module
      Returns:
        true成功，false失败
        true success, false failure

    - #### getVersion

          public java.lang.String getVersion()

      获取rfid 版本信息
      Acquire RFID version infor
      Returns:
        返回版本信息，null为失败
        return version infor, null is failure

    - #### rfidUpgrade

          public boolean rfidUpgrade(int packageCount,
                                     int index,
                                     int currSize,
                                     byte[] data)

      固件升级
      firmware upgrade
      Parameters:
        `packageCount` - 包的数量
        package amount
        `index` - 当前为第几个包
        current package
        `currSize` - 当前包大小
        current package size
        `data` - 包数据
        package data
      Returns:
        true成功，false失败
        true success, false failure

    - #### isPowerOn

          public boolean isPowerOn()

      判断设备是否上电
      Judge the device is powered on or not.
      Returns: