com.rscja.deviceapi.interfaces

## Interface IHF14443A

-     public interface IHF14443A

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `authentication(byte cMode, byte cBlock, byte[] pcKey)` 验证14443A卡(Authentication 14443A card)
    `byte[]` | `cpuCommand(byte[] cmd)` CPU卡发送命令(execute cpu card command)
    `byte[]` | `ratsTypeA()` CPU卡RATS操作指令(CPU card RATS operation command)
    `byte[]` | `readBlock(byte cBlock)` 读卡(Read card)
    `HF14443RequestEntity` | `requestTypeA()` 寻卡(Search card)
    `HF14443RequestEntity` | `requestTypeA(int mode)` 寻卡(Search card)
    `boolean` | `writeBlock(byte cBlock, byte[] pcBlockData)` 写卡(Write card)

- - ### Method Detail

    - #### requestTypeA

          HF14443RequestEntity requestTypeA()

      寻卡(Search card)
      Returns:
        success will return HF14443RequestEntity data, failure will return null.

    - #### requestTypeA

          HF14443RequestEntity requestTypeA(int mode)

      寻卡(Search card)
      Parameters:
        `mode` - 0x26:request idle; 0x52:request all
      Returns:
        success will return HF14443RequestEntity data, failure will return null.

    - #### authentication

          boolean authentication(byte cMode,
                                 byte cBlock,
                                 byte[] pcKey)
                          throws RFIDArgumentException

      验证14443A卡(Authentication 14443A card)
      Parameters:
        `cMode` - 模式0x60:类型A,0x61类型B (0x60 A type key, 0x61 B type key)
        `cBlock` - 要写入的数据块S50 0-63,S70 0-255(the cBlock of card,such as S50 card value 0~63,S70 0~255)
        `pcKey` - 6个字节的密码(6 bytes key value)
      Returns:
        true:success false:fail RFIDArgumentException
      Throws:
        `RFIDArgumentException`

    - #### readBlock

          byte[] readBlock(byte cBlock)

      读卡(Read card)
      Parameters:
        `cBlock` - 数据块0~63 (the cBlock of card,such as M1 card value 0~63 )
      Returns:
        success will return data, failure will return null.

    - #### writeBlock

          boolean writeBlock(byte cBlock,
                             byte[] pcBlockData)
                      throws RFIDArgumentException

      写卡(Write card)
      Parameters:
        `cBlock` - 要写入的数据块S50 0-63,S70 0-255(the cBlock of card,such as S50 card value 0~63,S70 0~255)
        `pcBlockData` - 十六个字节的数据(16 bytes Block data)
      Returns:
        true:success false:fail
      Throws:
        `RFIDArgumentException`

    - #### ratsTypeA

          byte[] ratsTypeA()

      CPU卡RATS操作指令(CPU card RATS operation command)
      Returns:
        success will return data, failure will return null.

    - #### cpuCommand

          byte[] cpuCommand(byte[] cmd)

      CPU卡发送命令(execute cpu card command)
      Parameters:
        `cmd` - 命令数据
      Returns:
        success will return data, failure will return null.