public void updateFirmware(String firmwareFileName) 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.9.0 if (serviceVersion < deviceVersion19) { throw new JposException(JPOS_E_NOSERVICE, "Device Service is not 1.9.0 compliant."); } // Perform the operation try { service19.updateFirmware(firmwareFileName); } catch (JposException je) { throw je; } catch (Exception e) { throw new JposException(JPOS_E_FAILURE, "Unhandled exception from Device Service", e); } }
public long getSettledAmount() 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.9.0 if (serviceVersion < deviceVersion19) { throw new JposException(JPOS_E_NOSERVICE, "Device Service is not 1.9.0 compliant."); } // Perform the operation try { return service19.getSettledAmount(); } catch (JposException je) { throw je; } catch (Exception e) { throw new JposException(JPOS_E_FAILURE, "Unhandled exception from Device Service", e); } }
public void cashDeposit(int sequenceNumber, long amount, int timeout) 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.9.0 if (serviceVersion < deviceVersion19) { throw new JposException(JPOS_E_NOSERVICE, "Device Service is not 1.9.0 compliant."); } // Perform the operation try { service19.cashDeposit(sequenceNumber, amount, timeout); } catch (JposException je) { throw je; } catch (Exception e) { throw new JposException(JPOS_E_FAILURE, "Unhandled exception from Device Service", e); } }