com.gary.fingerprint.proto

## Class FingerprintPacket

- java.lang.Object
- - com.gary.fingerprint.proto.FingerprintPacket

-     public class FingerprintPacket
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static char` | `CommandNum`
    `static int` | `HIDREC_ERR`
    `static int` | `HIDSUCC`
    `static byte[]` | `imgbuff`
    `static int` | `imgbuffLen`
    `static boolean` | `isEndPack`
    `static boolean` | `IsPicture`
    `USBOp` | `mUSBOp`
    `static byte[]` | `picturebuff`
    `static char` | `picturelen`
    `static char` | `ReceiveDtaLen`
    `static int[]` | `Sendbuff`

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static int` | `CHK(byte[] Data, int Length)`
    `void` | `CloseDeviceUsb()`
    `static void` | `MakeBMPBuf(byte[] inbuff, int inlen, int pictureWidth, int pictureHigh, byte[] picturebuff)`
    `boolean` | `OpenDeviceUsb()`
    `int` | `USB_PS_Cancel()` Functional description:Cancel instruction
    `int` | `USB_PS_DeletChar(int pageID, int num)` Functional description:Delete template
    `int` | `USB_PS_Empty()` Functional description:Clear fingerprint library
    `int` | `USB_PS_GetChar(int BufferID)` Functional description:Generating features
    `int` | `USB_PS_GetImage()` Functional description:Get image
    `Bitmap` | `USB_PS_GiveImage()` Functional description: Return image
    `int` | `USB_PS_ReadDataProcess(int[] ReadData, int[] ProcessResult)`
    `int` | `USB_PS_ReadIndexTable(int page_number, int[] outIdTable)` Functional description:Read index table
    `int` | `USB_PS_RegMB()` Functional description:Merge template
    `int` | `USB_PS_SearchMB(int BufferID, int StartPage, int PageNum, int[] recBuf)` Functional description:Search template(1:n Comparison)
    `int` | `USB_PS_StorMB(int BufferID, int PageID)` Functional description:Storage template
    `int` | `USB_PS_UpImage()` Functional description: Upload image

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

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

- - ### Field Detail

    - #### Sendbuff

          public static int[] Sendbuff

    - #### imgbuff

          public static byte[] imgbuff

    - #### imgbuffLen

          public static int imgbuffLen

    - #### isEndPack

          public static boolean isEndPack

    - #### HIDSUCC

          public static final int HIDSUCC

      See Also:
        Constant Field Values

    - #### HIDREC_ERR

          public static final int HIDREC_ERR

      See Also:
        Constant Field Values

    - #### CommandNum

          public static char CommandNum

    - #### picturebuff

          public static byte[] picturebuff

    - #### ReceiveDtaLen

          public static char ReceiveDtaLen

    - #### picturelen

          public static char picturelen

    - #### IsPicture

          public static boolean IsPicture

    - #### mUSBOp

          public USBOp mUSBOp

  - ### Constructor Detail

    - #### FingerprintPacket

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

  - ### Method Detail

    - #### OpenDeviceUsb

          public boolean OpenDeviceUsb()

    - #### CloseDeviceUsb

          public void CloseDeviceUsb()

    - #### USB_PS_ReadDataProcess

          public int USB_PS_ReadDataProcess(int[] ReadData,
                                            int[] ProcessResult)

    - #### CHK

          public static int CHK(byte[] Data,
                                int Length)

    - #### USB_PS_GetImage

          public int USB_PS_GetImage()

      Functional description:Get image
      Returns:
        = 0 operation successfully
        < 0 operation failed
        prerequisites USB device is successfully opened£¨OpenDeviceUsb£©

    - #### USB_PS_UpImage

          public int USB_PS_UpImage()

      Functional description: Upload image
      Returns:
        = 0 operation successfully
        < 0 operation failed
        prerequisites USB device is successfully opened£¨OpenDeviceUsb£©

    - #### USB_PS_GiveImage

          public Bitmap USB_PS_GiveImage()

      Functional description: Return image
      Returns:
        =Fingerprint picture BMP image prerequisites USB_PS_GetImage is successful

    - #### USB_PS_ReadIndexTable

          public int USB_PS_ReadIndexTable(int page_number,
                                           int[] outIdTable)

      Functional description:Read index table
      Parameters:
        `page_number` - £¨0--Corresponding template index from 0-95£©--input
        `outIdTable` - Readbuff£ºRead data returned£¨outIdTable[0--1]-Index information data length
        £¨=outIdTable[0]*256+outIdTable[1])outIdTable[2--n]--Index information
        (each 1 bit represents a template, =1 represents the mode corresponding to the storage
        area Version has been entered, =0 means not entered£©£©--output
      Returns:
        = 0 operation successfully
        < 0 operation failed
        prerequisites USB device is successfully opened£¨OpenDeviceUsb£©

    - #### USB_PS_GetChar

          public int USB_PS_GetChar(int BufferID)

      Functional description:Generating features
      Parameters:
        `BufferID` - :Buffer number (1--4 during the registration process,
        BufferID indicates the first few fingers)--input
      Returns:
        = 0 operation successfully
        < 0 operation failed
        prerequisites USB device is successfully opened£¨OpenDeviceUsb£©

    - #### USB_PS_RegMB

          public int USB_PS_RegMB()

      Functional description:Merge template
      Returns:
        = 0 operation successfully
        < 0 operation failed
        prerequisites USB device is successfully opened£¨OpenDeviceUsb£©

    - #### USB_PS_StorMB

          public int USB_PS_StorMB(int BufferID,
                                   int PageID)

      Functional description:Storage template
      Parameters:
        `BufferID:` - Buffer number£¨1--4£¬The default is 1£©--input
        `PageID:` - User number£¨0--99£©--input
      Returns:
        = 0 operation successfully
        < 0 operation failed
        prerequisites USB device is successfully opened£¨OpenDeviceUsb£©

    - #### USB_PS_DeletChar

          public int USB_PS_DeletChar(int pageID,
                                      int num)

      Functional description:Delete template
      Parameters:
        `pageID:` - page number£¨0--95£©
        `num:` - Delete number(0--95)
      Returns:
        = 0 operation successfully
        < 0 operation failed
        prerequisites USB device is successfully opened£¨OpenDeviceUsb£©

    - #### USB_PS_Empty

          public int USB_PS_Empty()

      Functional description:Clear fingerprint library
      Returns:
        = 0 operation successfully
        < 0 operation failed
        prerequisites USB device is successfully opened£¨OpenDeviceUsb£©

    - #### USB_PS_Cancel

          public int USB_PS_Cancel()

      Functional description:Cancel instruction
      Returns:
        = 0 operation successfully
        < 0 operation failed
        prerequisites USB device is successfully opened£¨OpenDeviceUsb£©

    - #### USB_PS_SearchMB

          public int USB_PS_SearchMB(int BufferID,
                                     int StartPage,
                                     int PageNum,
                                     int[] recBuf)

      Functional description:Search template(1:n Comparison)
      Parameters:
        `BufferID:` - Buffer number (1--4, default is 1)--input
        `StartPage:` - Start page£¨default is 0£©--input
        `PageNum:` - Number of pages£¨default is 99£©--input
        `recBuf:` - Read data returned£¨ recBuf[0--1]--page number(=recBuf[0]*256+recBuf[1])
        recBuf[2--3]--Score(=recBuf[2]*256+recBuf[3]))
      Returns:
        = 0 operation successfully
        < 0 operation failed
        prerequisites USB device is successfully opened£¨OpenDeviceUsb£©

    - #### MakeBMPBuf

          public static void MakeBMPBuf(byte[] inbuff,
                                        int inlen,
                                        int pictureWidth,
                                        int pictureHigh,
                                        byte[] picturebuff)