com.gary.msr.hid

## Class USBOp

- java.lang.Object
- - com.gary.msr.hid.USBOp

-     public class USBOp
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `LOGNAME`
    `static int` | `MAX_GLOBAL_BUFF_LEN`
    `static int` | `USB_TRANS_MAX_DATA_LEN`
    `static int` | `USB_TRANS_MAX_LEN`
    `static int` | `USB_TRANS_TIMEOUT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `USBOp(UsbManager manager, Context context, java.lang.String AppName)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `CloseDevice()`
    `static java.lang.String` | `converB2String(byte[] data, int length)`
    `static java.lang.String` | `convert2String(int[] data, int length)`
    `static int[]` | `convertStringToIntArr(java.lang.String hexString)`
    `static int` | `img_One2Two(byte[] psFrom, byte[] psTo, int psFromLen)`
    `int` | `readDataSubRfid(byte[] data)`
    `int` | `sendDataMsr(int[] data, int len)` 函数功能：读写MSR数据
    `int` | `sendDatarFinger(int[] data, int len)` 函数功能：读写Finger数据
    `int` | `sendDatarFingerImage(int[] data, int len)` 函数功能：读写Finger图片数据
    `int` | `sendDatarRfid(int[] data, int len)` 函数功能：读写RFID数据
    `void` | `SetUsbConfig(int npid, int nvid, int nInterfaceClass, int nInterfaceSub, int nInterfaceProtocol)`
    `boolean` | `UsbFeatureSupported()`
    `boolean` | `USBOpInit()`

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

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

- - ### Field Detail

    - #### LOGNAME

          public static final java.lang.String LOGNAME

      See Also:
        Constant Field Values

    - #### MAX_GLOBAL_BUFF_LEN

          public static final int MAX_GLOBAL_BUFF_LEN

      See Also:
        Constant Field Values

    - #### USB_TRANS_TIMEOUT

          public static final int USB_TRANS_TIMEOUT

      See Also:
        Constant Field Values

    - #### USB_TRANS_MAX_LEN

          public static final int USB_TRANS_MAX_LEN

      See Also:
        Constant Field Values

    - #### USB_TRANS_MAX_DATA_LEN

          public static final int USB_TRANS_MAX_DATA_LEN

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### USBOp

          public USBOp(UsbManager manager,
                       Context context,
                       java.lang.String AppName)

  - ### Method Detail

    - #### SetUsbConfig

          public void SetUsbConfig(int npid,
                                   int nvid,
                                   int nInterfaceClass,
                                   int nInterfaceSub,
                                   int nInterfaceProtocol)

    - #### USBOpInit

          public boolean USBOpInit()

    - #### CloseDevice

          public void CloseDevice()

    - #### UsbFeatureSupported

          public boolean UsbFeatureSupported()

    - #### sendDataMsr

          public int sendDataMsr(int[] data,
                                 int len)

      函数功能：读写MSR数据
      Parameters:
        `data` -
        `len` -
      Returns:

    - #### readDataSubRfid

          public int readDataSubRfid(byte[] data)

    - #### sendDatarRfid

          public int sendDatarRfid(int[] data,
                                   int len)

      函数功能：读写RFID数据
      Parameters:
        `data` -
        `len` -
      Returns:

    - #### sendDatarFinger

          public int sendDatarFinger(int[] data,
                                     int len)

      函数功能：读写Finger数据
      Parameters:
        `data` -
        `len` -
      Returns:

    - #### sendDatarFingerImage

          public int sendDatarFingerImage(int[] data,
                                          int len)

      函数功能：读写Finger图片数据
      Parameters:
        `data` -
        `len` -
      Returns:

    - #### converB2String

          public static java.lang.String converB2String(byte[] data,
                                                        int length)

    - #### convert2String

          public static java.lang.String convert2String(int[] data,
                                                        int length)

    - #### convertStringToIntArr

          public static int[] convertStringToIntArr(java.lang.String hexString)

    - #### img_One2Two

          public static int img_One2Two(byte[] psFrom,
                                        byte[] psTo,
                                        int psFromLen)