com.rscja.barcode

## Class BarcodeDecoder

- java.lang.Object
- - com.rscja.barcode.BarcodeDecoder

-     public abstract class BarcodeDecoder
      extends java.lang.Object

  Author:
    zhoupin

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `BarcodeDecoder.DecodeCallback`
    `static interface` | `BarcodeDecoder.IBarcodeImageCallback`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DECODE_CANCEL` 解码取消(cancel)
    `static int` | `DECODE_ENGINE_ERROR` 扫描头出现错误(error)
    `static int` | `DECODE_FAILURE` 解码失败(failure)
    `static int` | `DECODE_SUCCESS` 解码成功(success)
    `static int` | `DECODE_TIMEOUT` 解码超时(timeout)

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BarcodeDecoder()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract void` | `close()` 关闭二维扫描设备 Switch off 2D barcode scannning device
    `java.lang.String` | `getDecoderSVersionInfo()` 返回扫描头和解码库信息
    `void` | `getLastDecImage(BarcodeDecoder.IBarcodeImageCallback decodeImageCallback)`
    `boolean` | `isOpen()` 扫描头是否已经打开
    `abstract boolean` | `open(Context context)` 打开二维扫描设备 Switch on 2D scanning device
    `abstract void` | `setDecodeCallback(BarcodeDecoder.DecodeCallback scanCallbackListener)` 设置回调对象接收条码数据,主线程回调 Setup call-back target to acquire barcode data.
    `boolean` | `setParameter(int paramNum, int paramVal)` 设置扫描头参数(Setup scanning module parameter)
    `abstract void` | `setTimeOut(int timeOut)` 设置超时时间 setup time-out duration
    `abstract boolean` | `startScan()` 触发二维条码扫描 Trigger 2D barcode scanning function
    `abstract void` | `stopScan()` 终止扫描 Scanning terminated

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

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

- - ### Field Detail

    - #### DECODE_TIMEOUT

          public static final int DECODE_TIMEOUT

      解码超时(timeout)
      See Also:
        Constant Field Values

    - #### DECODE_SUCCESS

          public static final int DECODE_SUCCESS

      解码成功(success)
      See Also:
        Constant Field Values

    - #### DECODE_CANCEL

          public static final int DECODE_CANCEL

      解码取消(cancel)
      See Also:
        Constant Field Values

    - #### DECODE_FAILURE

          public static final int DECODE_FAILURE

      解码失败(failure)
      See Also:
        Constant Field Values

    - #### DECODE_ENGINE_ERROR

          public static final int DECODE_ENGINE_ERROR

      扫描头出现错误(error)
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### BarcodeDecoder

          public BarcodeDecoder()

  - ### Method Detail

    - #### open

          public abstract boolean open(Context context)

      打开二维扫描设备
      Switch on 2D scanning device
      Parameters:
        `context` -
      Returns:

    - #### close

          public abstract void close()

      关闭二维扫描设备
      Switch off 2D barcode scannning device

    - #### startScan

          public abstract boolean startScan()

      触发二维条码扫描
      Trigger 2D barcode scanning function

    - #### stopScan

          public abstract void stopScan()

      终止扫描
      Scanning terminated

    - #### setDecodeCallback

          public abstract void setDecodeCallback(BarcodeDecoder.DecodeCallback scanCallbackListener)

      设置回调对象接收条码数据,主线程回调
      Setup call-back target to acquire barcode data.
      Parameters:
        `scanCallbackListener` -

    - #### setTimeOut

          public abstract void setTimeOut(int timeOut)

      设置超时时间
      setup time-out duration
      Parameters:
        `timeOut` - 超时时间,单位:秒(timeOut,Unit: second)

    - #### isOpen

          public boolean isOpen()

      扫描头是否已经打开
      Returns:
        true:扫描头已打开, false:扫描头已关闭

    - #### getDecoderSVersionInfo

          public java.lang.String getDecoderSVersionInfo()

      返回扫描头和解码库信息

    - #### setParameter

          public boolean setParameter(int paramNum,
                                      int paramVal)

      设置扫描头参数(Setup scanning module parameter)
      Parameters:
        `paramNum` -
        `paramVal` -
      Returns:

    - #### getLastDecImage

          public void getLastDecImage(BarcodeDecoder.IBarcodeImageCallback decodeImageCallback)