com.pax.dal

Interface IWLTax

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      void fiscalSPIClose()
      关闭设备。
      Close device.
      java.lang.String fiscalSPIGetVersion()
      获取设备版本信息。
      Obtain device version information.
      boolean fiscalSPIIsBusy(int nDeviceID)
      获取设备是否处于Busy状态。
      Gets whether the device is Busy.
      boolean fiscalSPIIsOpened()
      检查设备是否打开。
      Check whether the device is turned on.
      void fiscalSPIOpen()
      打开设备。
      Open Device.
      boolean fiscalSPIReset(int nDeviceID)
      重置设备。
      Reset device.
      void fiscalSPISetSettings(int nDeviceID, int frequency, int mode, int delay)
      该API为设备提供SPI设置。
      This API provides SPI settings to the device.
      byte[] fiscalSPIWriteRead(int nDeviceID, byte[] senddata, int recvdatalen, int timeout)
      该API用于对设备进行读与写。
      This API is used to communicate with the module.
    • Method Detail

      • fiscalSPIIsOpened

        boolean fiscalSPIIsOpened()
                           throws WLTaxDevException
        检查设备是否打开。
        Check whether the device is turned on.
        Returns:
        true 打开; false 关闭
        Open true; false Close.
        Throws:
        WLTaxDevException - WLTaxDevException
        Since:
        V4.11.00
      • fiscalSPIGetVersion

        java.lang.String fiscalSPIGetVersion()
                                      throws WLTaxDevException
        获取设备版本信息。
        Obtain device version information.
        Returns:
        设备版本信息。
        Version integer value which is indicating version of the Device. To get this value, the Device must be opened.
        Throws:
        WLTaxDevException - WLTaxDevException
        Since:
        V4.11.00
      • fiscalSPIIsBusy

        boolean fiscalSPIIsBusy(int nDeviceID)
                         throws WLTaxDevException
        获取设备是否处于Busy状态。
        Gets whether the device is Busy.
        Parameters:
        nDeviceID -
        nDeviceID = FISCAL_MODULE_ID表示财政模块,以后该值可以用于任何其他模块。
        nDeviceID = FISCAL_MODULE_ID indicating fiscal module, in the future this value could be used for any other module.
        Returns:
        true:处于Busy状态,falss:不是处于Busy状态。
        true, if the busy signal of the fiscal board is set; else false.
        Throws:
        WLTaxDevException - WLTaxDevException
        Since:
        V4.11.00
      • fiscalSPIReset

        boolean fiscalSPIReset(int nDeviceID)
                        throws WLTaxDevException
        重置设备。
        Reset device.
        Parameters:
        nDeviceID -
        nDeviceID = FISCAL_MODULE_ID表示财政模块,以后该值可以用于任何其他模块。
        nDeviceID = FISCAL_MODULE_ID indicating fiscal module, in the future this value could be used for any other module.
        Returns:
        true:成功,false:失败
        true, if the busy signal of the fiscal board is set; else false.
        Throws:
        WLTaxDevException - WLTaxDevException
        Since:
        V4.11.00
      • fiscalSPISetSettings

        void fiscalSPISetSettings(int nDeviceID,
                                  int frequency,
                                  int mode,
                                  int delay)
                           throws WLTaxDevException
        该API为设备提供SPI设置。
        This API provides SPI settings to the device. Such as clock frequency.
        Parameters:
        nDeviceID -
        nDeviceID = FISCAL_MODULE_ID表示财政模块,以后该值可以用于任何其他模块。
        nDeviceID = FISCAL_MODULE_ID indicating fiscal module, in the future this value could be used for any other module.
        frequency -
        时钟频率。
        Clock frequency.
        mode -
        0 ~ 3 模式(保留,默认为0)。
        0~3.Mode (reserved, default to 0).
        delay -
        延迟时间,以微秒为单位。
        Delay time, in microseconds.
        Throws:
        WLTaxDevException - WLTaxDevException
        Since:
        V4.11.00
      • fiscalSPIWriteRead

        byte[] fiscalSPIWriteRead(int nDeviceID,
                                  byte[] senddata,
                                  int recvdatalen,
                                  int timeout)
                           throws WLTaxDevException
        该API用于对设备进行读与写。
        This API is used to communicate with the module.
        Parameters:
        nDeviceID -
        nDeviceID = FISCAL_MODULE_ID表示财政模块,以后该值可以用于任何其他模块。
        nDeviceID = FISCAL_MODULE_ID indicating fiscal module, in the future this value could be used for any other module.
        senddata -
        下发输出给税控的数据,MAX length <= 2048 bytes。
        Send data output to tax control,MAX length < = 2048 bytes.
        recvdatalen -
        设置返回数据长度 ,最大长度 <= 2048 bytes。
        Set the return data length, maximum length <= 2048 bytes.
        timeout -
        超时时间单位ms。
        Timeout value in ms.
        Returns:
        税控返回的数据 数据长度根据recvdatalen返回,如果recvdatalen>2048或recvdatalen<=0则默认返回长度为2048用于填充的数组。
        The data length returned by tax control is returned according to recvdatalen, if recvdatalen >2048 or recvdatalen <=0 by default returns an array of length 2048 for padding.
        Throws:
        WLTaxDevException - WLTaxDevException
        Since:
        V4.11.00