Class CashChangerProperties
java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
de.gmxhome.conrad.jpos.jpos_base.cashchanger.CashChangerProperties
- All Implemented Interfaces:
CashChangerInterface,JposBaseInterface
Class containing the cash changer specific properties, their default values and default implementations of
CashChangerInterface.
For details about properties, methods and method parameters, see UPOS specification, chapter Cash Changer.
-
Field Summary
FieldsModifier and TypeFieldDescriptionintUPOS property AsyncResultCode.intUPOS property AsyncResultCodeExtended.booleanUPOS property CapDeposit.booleanUPOS property CapDepositDataEvent.booleanUPOS property CapDiscrepancy.booleanUPOS property CapEmptySensor.booleanUPOS property CapFullSensor.booleanUPOS property CapJamSensor.booleanUPOS property CapNearEmptySensor.booleanUPOS property CapNearFullSensor.booleanUPOS property CapPauseDeposit.booleanUPOS property CapRealTimeData.booleanUPOS property CapRepayDeposit.UPOS property CurrencyCashList.UPOS property CurrencyCode.UPOS property CurrencyCodeList.intUPOS property CurrentExit.intUPOS property CurrentService.intUPOS property DepositAmount.UPOS property DepositCashList.UPOS property DepositCodeList.UPOS property DepositCounts.UPOS property DepositStatus.Default value of DepositStatus property.intUPOS property DeviceExits.UPOS property DeviceStatus.Default value of DeviceStatus property.UPOS property ExitCashList.UPOS property FullStatus.Default value of FullStatus property.UPOS property RealTimeDataEnabled.intUPOS property ServiceCount.intUPOS property ServiceIndex.Fields inherited from class de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
AllowAlwaysSetProperties, AllowDeprecatedMethods, AsyncInputActive, AsyncMode, AutoDisable, CapStatisticsReporting, CapUpdateStatistics, CheckHealthText, Claimed, Claiming, ClaimWaiters, CurrentCommands, CurrentUnitID, DataCount, DataEventEnabled, DataEventList, Device, DeviceEnabled, DeviceServiceDescription, DeviceServiceVersion, DevProps, ErrorString, ErrorUnits, EventCB, EventList, EventSource, EventString, EventUnitID, EventUnits, ExclusiveAllowed, ExclusiveNo, ExclusiveUse, ExclusiveYes, FirstEnableHappened, FlagWhenIdle, FlagWhenIdleStatusValue, FreezeEvents, Index, LogicalName, MaximumConfirmationEventWaitingTime, OutputID, PowerNotify, PowerState, SerializedRequestRunner, SerializedRequests, State, StrictFIFOEventHandling, SuspendedCommands, SuspendedConcurrentCommands, UnitsOnline, UsesSubsystemUnits -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadjustCashCounts(String cashCounts)Final part of AdjustCashCounts method.voidDefault implementation of BeginDeposit simply sets DepositStatus to STATUS_DEPOSIT_START.voidcurrencyCode(String code)Final part of setting CurrencyCode.voidcurrentExit(int i)Final part of setting CurrentExit.voidcurrentService(int i)Final part of setting CurrentService.voiddispenseCash(DispenseCash request)Final part of DispenseCash method.dispenseCash(String cashCounts)Validation part of DispenseCash method.dispenseChange(int amount)Validation part of DispenseChange method.voiddispenseChange(DispenseChange request)Final part of DispenseChange method.voidendDeposit(int success)Default implementation of EndDeposit simply sets DepositStatus to STATUS_DEPOSIT_END.voidDefault implementation of FixDeposit simply sets DepositStatus to STATUS_DEPOSIT_COUNT.voidinitOnEnable(boolean enable)Initialization of properties that must be initialized during deviceEnable.voidpauseDeposit(int control)Final part of PauseDeposit method.voidreadCashCounts(String[] cashCounts, boolean[] discrepancy)Final part of ReadCashCounts method.voidrealTimeDataEnabled(boolean flag)Final part of setting RealTimeDataEnabled.Methods inherited from class de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
addProperties, asyncMode, attachWaiter, autoDisable, checkForDeprecation, checkHealth, checkProperties, claim, clearDataProperties, clearErrorProperties, clearInput, clearOutput, clearOutputErrorProperties, close, compareFirmwareVersion, dataEventEnabled, deviceEnabled, directIO, directIO, flagWhenIdle, freezeEvents, getClaimingInstance, handlePowerStateOnEnable, initOnClaim, initOnFirstEnable, initOnOpen, newJposOutputRequest, open, powerNotify, release, releaseWaiter, removeFromPropertySetList, resetStatistics, retrieveStatistics, retryInput, retryOutput, signalWaiter, unitDataCount, updateFirmware, updateFirmware, updateStatistics, waitWaiterMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.gmxhome.conrad.jpos.jpos_base.JposBaseInterface
asyncMode, autoDisable, checkHealth, claim, clearInput, clearOutput, close, compareFirmwareVersion, dataEventEnabled, deviceEnabled, directIO, directIO, flagWhenIdle, freezeEvents, handlePowerStateOnEnable, newJposOutputRequest, open, powerNotify, release, removeFromPropertySetList, resetStatistics, retrieveStatistics, retryInput, retryOutput, unitDataCount, updateFirmware, updateFirmware, updateStatistics
-
Field Details
-
AsyncResultCode
public int AsyncResultCodeUPOS property AsyncResultCode. Default: STATUS_OK. Will be set when throwing a BillDispenserStatusUpdateEvent with STATUS_ASYNC. -
AsyncResultCodeExtended
public int AsyncResultCodeExtendedUPOS property AsyncResultCodeExtended. Default: 0. Will be set when throwing a BillDispenserStatusUpdateEvent with STATUS_ASYNC. -
CapDeposit
public boolean CapDepositUPOS property CapDeposit. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapDepositDataEvent
public boolean CapDepositDataEventUPOS property CapDepositDataEvent. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapDiscrepancy
public boolean CapDiscrepancyUPOS property CapDiscrepancy. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapEmptySensor
public boolean CapEmptySensorUPOS property CapEmptySensor. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapFullSensor
public boolean CapFullSensorUPOS property CapFullSensor. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapJamSensor
public boolean CapJamSensorUPOS property CapJamSensor. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapNearEmptySensor
public boolean CapNearEmptySensorUPOS property CapNearEmptySensor. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapNearFullSensor
public boolean CapNearFullSensorUPOS property CapNearFullSensor. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapPauseDeposit
public boolean CapPauseDepositUPOS property CapPauseDeposit. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapRealTimeData
public boolean CapRealTimeDataUPOS property CapRealTimeData. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapRepayDeposit
public boolean CapRepayDepositUPOS property CapRepayDeposit. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CurrencyCashList
UPOS property CurrencyCashList. Default: null. Must be overwritten by objects derived from JposDevice within the changeDefaults method. -
CurrencyCode
UPOS property CurrencyCode. Default: null. Must be overwritten by objects derived from JposDevice within the changeDefaults method. -
CurrencyCodeList
UPOS property CurrencyCodeList. Default: null. Must be overwritten by objects derived from JposDevice within the changeDefaults method. -
CurrentExit
public int CurrentExitUPOS property CurrentExit. Default: 1. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CurrentService
public int CurrentServiceUPOS property CurrentService. Default: 0. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
DepositAmount
public int DepositAmountUPOS property DepositAmount. Default: 0. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
DepositCashList
UPOS property DepositCashList. Default: null. Must be overwritten by objects derived from JposDevice within the changeDefaults method. -
DepositCodeList
UPOS property DepositCodeList. Default: null. Must be overwritten by objects derived from JposDevice within the changeDefaults method. -
DepositCounts
UPOS property DepositCounts. Default: null. Must be overwritten by objects derived from JposDevice within the changeDefaults method. -
DepositStatus
UPOS property DepositStatus. -
DepositStatusDef
Default value of DepositStatus property. Default: null. Must be updated before calling initOnEnable the first time. -
DeviceExits
public int DeviceExitsUPOS property DeviceExits. Default: 1. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
DeviceStatus
UPOS property DeviceStatus. -
DeviceStatusDef
Default value of DeviceStatus property. Default: null. Must be updated before calling initOnEnable the first time. -
ExitCashList
UPOS property ExitCashList. Default: null. Must be overwritten by objects derived from JposDevice within the changeDefaults method. -
FullStatus
UPOS property FullStatus. -
FullStatusDef
Default value of FullStatus property. Default: null. Must be overwritten before calling initOnEnable the first time. -
RealTimeDataEnabled
UPOS property RealTimeDataEnabled. Default: null. Must be overwritten by objects derived from JposDevice within the changeDefaults method. -
ServiceCount
public int ServiceCountUPOS property ServiceCount. Default: 0. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
ServiceIndex
public int ServiceIndexUPOS property ServiceIndex. Default: 0. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
-
-
Constructor Details
-
CashChangerProperties
protected CashChangerProperties(int dev)Constructor.- Parameters:
dev- Device index
-
-
Method Details
-
initOnEnable
public void initOnEnable(boolean enable)Description copied from class:JposCommonPropertiesInitialization of properties that must be initialized during deviceEnable.- Overrides:
initOnEnablein classJposCommonProperties- Parameters:
enable- True: initialize properties, false: do nothing
-
currencyCode
Description copied from interface:CashChangerInterfaceFinal part of setting CurrencyCode. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is open,
- code is one of the values specified in CurrencyCodeList,
- internal property AllowAlwaysSetProperties is true or code equals the previous value of CurrencyCode.
- Specified by:
currencyCodein interfaceCashChangerInterface- Parameters:
code- New value for CurrencyCode property.- Throws:
jpos.JposException- If an error occurs.
-
currentExit
public void currentExit(int i) throws jpos.JposExceptionDescription copied from interface:CashChangerInterfaceFinal part of setting CurrentExit. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is open,
- i is neither less than one nor greater than DeviceExits.
- Specified by:
currentExitin interfaceCashChangerInterface- Parameters:
i- New value for CurrentExit property.- Throws:
jpos.JposException- If an error occurs.
-
currentService
public void currentService(int i) throws jpos.JposExceptionDescription copied from interface:CashChangerInterfaceFinal part of setting CurrentService. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is open,
- i is neither less than zero nor greater than ServiceCount,
- i is one of the index values specified in ServiceIndex.
- Specified by:
currentServicein interfaceCashChangerInterface- Parameters:
i- New value for CurrentService property.- Throws:
jpos.JposException- If an error occurs.
-
realTimeDataEnabled
public void realTimeDataEnabled(boolean flag) throws jpos.JposExceptionDescription copied from interface:CashChangerInterfaceFinal part of setting RealTimeDataEnabled. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapRealTimeData is true or flag is false.
- Specified by:
realTimeDataEnabledin interfaceCashChangerInterface- Parameters:
flag- New value for RealTimeDataEnabled property.- Throws:
jpos.JposException- If an error occurs.
-
adjustCashCounts
Description copied from interface:CashChangerInterfaceFinal part of AdjustCashCounts method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- cashCounts consists of a comma separated, not empty list of integer value pairs separated by double-point,
- one pair may start with ";" to indicate the first bill adjustment.
- Specified by:
adjustCashCountsin interfaceCashChangerInterface- Parameters:
cashCounts- The cashCounts parameter contains cash types and amounts to be initialized.- Throws:
jpos.JposException- If an error occurs.
-
beginDeposit
public void beginDeposit() throws jpos.JposExceptionDefault implementation of BeginDeposit simply sets DepositStatus to STATUS_DEPOSIT_START.- Specified by:
beginDepositin interfaceCashChangerInterface- Throws:
jpos.JposException- never.
-
endDeposit
public void endDeposit(int success) throws jpos.JposExceptionDefault implementation of EndDeposit simply sets DepositStatus to STATUS_DEPOSIT_END.- Specified by:
endDepositin interfaceCashChangerInterface- Parameters:
success- The success parameter holds the value of how to deal with the cash that was deposited. Must be DEPOSIT_COMPLETE.- Throws:
jpos.JposException- never.
-
fixDeposit
public void fixDeposit() throws jpos.JposExceptionDefault implementation of FixDeposit simply sets DepositStatus to STATUS_DEPOSIT_COUNT.- Specified by:
fixDepositin interfaceCashChangerInterface- Throws:
jpos.JposException- never.
-
pauseDeposit
public void pauseDeposit(int control) throws jpos.JposExceptionDescription copied from interface:CashChangerInterfaceFinal part of PauseDeposit method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapPauseDeposit is true,
- control is DEPOSIT_PAUSE or DEPOSIT_RESTART,
- if control is DEPOSIT_PAUSE, DepositStatus is not STATUS_DEPOSIT_END.
- Specified by:
pauseDepositin interfaceCashChangerInterface- Parameters:
control- The control parameter contains one of DEPOSIT_PAUSE and DEPOSIT_RESTART.- Throws:
jpos.JposException- If an error occurs.
-
readCashCounts
Description copied from interface:CashChangerInterfaceFinal part of ReadCashCounts method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- cashCounts and discrepancy are arrays with length one.
- Specified by:
readCashCountsin interfaceCashChangerInterface- Parameters:
cashCounts- The cash count data is placed into cashCounts.discrepancy- Reports whether not all counts could be updated as requested.- Throws:
jpos.JposException- If an error occurs.
-
dispenseCash
Description copied from interface:CashChangerInterfaceValidation part of DispenseCash method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- all previous DispenseCash operations have been finished,
- the remainder of cashCounts consists of a comma separated, not empty list of integer value pairs separated by double-point;
- one pair may start with ";" to indicate the first bill dispense.
- Specified by:
dispenseCashin interfaceCashChangerInterface- Parameters:
cashCounts- The cashCounts parameter contains the dispensing cash units and counts.- Returns:
- DispenseCash object for use in final part.
- Throws:
jpos.JposException- If an error occurs.
-
dispenseCash
Description copied from interface:CashChangerInterfaceFinal part of DispenseCash method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a DispenseCash object. This method will be called when the corresponding operation shall be performed, either synchronously or asynchronously. All plausibility checks have been made before, only runtime errors can occur.- Specified by:
dispenseCashin interfaceCashChangerInterface- Parameters:
request- Output request object returned by validation method that contains all parameters to be used by DispenseCash.- Throws:
jpos.JposException- If an error occurs.
-
dispenseChange
Description copied from interface:CashChangerInterfaceValidation part of DispenseChange method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- all previous DispenseCash and DispenseChange operations have been finished,
- amount is greater than zero.
- Specified by:
dispenseChangein interfaceCashChangerInterface- Parameters:
amount- The amount parameter contains the amount of change to be dispensed.- Returns:
- DispenseChange object for use in final part.
- Throws:
jpos.JposException- If an error occurs.
-
dispenseChange
Description copied from interface:CashChangerInterfaceFinal part of DispenseChange method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a DispenseChange object. This method will be called when the corresponding operation shall be performed, either synchronously or asynchronously. All plausibility checks have been made before, only runtime errors can occur.- Specified by:
dispenseChangein interfaceCashChangerInterface- Parameters:
request- Output request object returned by validation method that contains all parameters to be used by DispenseChange.- Throws:
jpos.JposException- If an error occurs.
-