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 TypeFieldDescriptionint
UPOS property AsyncResultCode.int
UPOS property AsyncResultCodeExtended.boolean
UPOS property CapDeposit.boolean
UPOS property CapDepositDataEvent.boolean
UPOS property CapDiscrepancy.boolean
UPOS property CapEmptySensor.boolean
UPOS property CapFullSensor.boolean
UPOS property CapJamSensor.boolean
UPOS property CapNearEmptySensor.boolean
UPOS property CapNearFullSensor.boolean
UPOS property CapPauseDeposit.boolean
UPOS property CapRealTimeData.boolean
UPOS property CapRepayDeposit.UPOS property CurrencyCashList.UPOS property CurrencyCode.UPOS property CurrencyCodeList.int
UPOS property CurrentExit.int
UPOS property CurrentService.int
UPOS property DepositAmount.UPOS property DepositCashList.UPOS property DepositCodeList.UPOS property DepositCounts.UPOS property DepositStatus.Default value of DepositStatus property.int
UPOS property DeviceExits.UPOS property DeviceStatus.Default value of DeviceStatus property.UPOS property ExitCashList.UPOS property FullStatus.Default value of FullStatus property.UPOS property RealTimeDataEnabled.int
UPOS property ServiceCount.int
UPOS 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 TypeMethodDescriptionvoid
adjustCashCounts(String cashCounts)
Final part of AdjustCashCounts method.void
Default implementation of BeginDeposit simply sets DepositStatus to STATUS_DEPOSIT_START.void
currencyCode(String code)
Final part of setting CurrencyCode.void
currentExit(int i)
Final part of setting CurrentExit.void
currentService(int i)
Final part of setting CurrentService.void
dispenseCash(DispenseCash request)
Final part of DispenseCash method.dispenseCash(String cashCounts)
Validation part of DispenseCash method.dispenseChange(int amount)
Validation part of DispenseChange method.void
dispenseChange(DispenseChange request)
Final part of DispenseChange method.void
endDeposit(int success)
Default implementation of EndDeposit simply sets DepositStatus to STATUS_DEPOSIT_END.void
Default implementation of FixDeposit simply sets DepositStatus to STATUS_DEPOSIT_COUNT.void
initOnEnable(boolean enable)
Initialization of properties that must be initialized during deviceEnable.void
pauseDeposit(int control)
Final part of PauseDeposit method.void
readCashCounts(String[] cashCounts, boolean[] discrepancy)
Final part of ReadCashCounts method.void
realTimeDataEnabled(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, waitWaiter
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:JposCommonProperties
Initialization of properties that must be initialized during deviceEnable.- Overrides:
initOnEnable
in classJposCommonProperties
- Parameters:
enable
- True: initialize properties, false: do nothing
-
currencyCode
Description copied from interface:CashChangerInterface
Final 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:
currencyCode
in 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:CashChangerInterface
Final 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:
currentExit
in 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:CashChangerInterface
Final 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:
currentService
in 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:CashChangerInterface
Final 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:
realTimeDataEnabled
in interfaceCashChangerInterface
- Parameters:
flag
- New value for RealTimeDataEnabled property.- Throws:
jpos.JposException
- If an error occurs.
-
adjustCashCounts
Description copied from interface:CashChangerInterface
Final 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:
adjustCashCounts
in 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:
beginDeposit
in 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:
endDeposit
in 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:
fixDeposit
in interfaceCashChangerInterface
- Throws:
jpos.JposException
- never.
-
pauseDeposit
public void pauseDeposit(int control) throws jpos.JposExceptionDescription copied from interface:CashChangerInterface
Final 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:
pauseDeposit
in 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:CashChangerInterface
Final 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:
readCashCounts
in 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:CashChangerInterface
Validation 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:
dispenseCash
in 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:CashChangerInterface
Final 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:
dispenseCash
in 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:CashChangerInterface
Validation 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:
dispenseChange
in 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:CashChangerInterface
Final 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:
dispenseChange
in 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.
-