コード例 #1
0
ファイル: CAT.java プロジェクト: openlpos/OpenShoppe
  public boolean getCapUpdateStatistics() throws JposException {
    // Make sure control is opened
    if (!bOpen) {
      throw new JposException(JPOS_E_CLOSED, "Control not opened");
    }

    // Make sure service supports at least version 1.8.0
    if (serviceVersion < deviceVersion18) {
      throw new JposException(JPOS_E_NOSERVICE, "Device Service is not 1.8.0 compliant.");
    }

    // Perform the operation
    try {
      return service18.getCapUpdateStatistics();
    } catch (JposException je) {
      throw je;
    } catch (Exception e) {
      throw new JposException(JPOS_E_FAILURE, "Unhandled exception from Device Service", e);
    }
  }
コード例 #2
0
ファイル: CAT.java プロジェクト: openlpos/OpenShoppe
  public void retrieveStatistics(String[] statisticsBuffer) throws JposException {
    // Make sure control is opened
    if (!bOpen) {
      throw new JposException(JPOS_E_CLOSED, "Control not opened");
    }

    // Make sure service supports at least version 1.8.0
    if (serviceVersion < deviceVersion18) {
      throw new JposException(JPOS_E_NOSERVICE, "Device Service is not 1.8.0 compliant.");
    }

    // Perform the operation
    try {
      service18.retrieveStatistics(statisticsBuffer);
    } catch (JposException je) {
      throw je;
    } catch (Exception e) {
      throw new JposException(JPOS_E_FAILURE, "Unhandled exception from Device Service", e);
    }
  }