Class CoinAcceptorProperties
java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
de.gmxhome.conrad.jpos.jpos_base.coinacceptor.CoinAcceptorProperties
- All Implemented Interfaces:
CoinAcceptorInterface
,JposBaseInterface
Class containing the coin acceptor specific properties, their default values and default implementations of
CoinAcceptorInterface.
For details about properties, methods and method parameters, see UPOS specification, chapter Coin Acceptor.
-
Field Summary
FieldsModifier and TypeFieldDescriptionboolean
UPOS property CapDiscrepancy.boolean
UPOS property CapFullSensor.boolean
UPOS property CapJamSensor.boolean
UPOS property CapNearFullSensor.boolean
UPOS property CapPauseDeposit.boolean
UPOS property CapRealTimeData.UPOS property CurrencyCode.int
UPOS property DepositAmount.UPOS property DepositCashList.UPOS property DepositCodeList.UPOS property DepositCounts.int
UPOS property DepositStatus.int
Default value of DepositStatus property.UPOS property FullStatus.Default value of FullStatus property.UPOS property RealTimeDataEnabled.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
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
-
CapDiscrepancy
public boolean CapDiscrepancyUPOS property CapDiscrepancy. 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. -
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. -
CurrencyCode
UPOS property CurrencyCode. Default: null. Must be overwritten by objects derived from JposDevice within the changeDefaults method. -
DepositAmount
public int DepositAmountUPOS property DepositAmount. Default: 0. -
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
public int DepositStatusUPOS property DepositStatus. -
DepositStatusDef
public int DepositStatusDefDefault value of DepositStatus property. Default: STATUS_DEPOSIT_END. Should be updated before calling initOnEnable the first time. -
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.
-
-
Constructor Details
-
CoinAcceptorProperties
protected CoinAcceptorProperties(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:CoinAcceptorInterface
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 DepositCodeList,
- internal property AllowAlwaysSetProperties is true or code equals the previous value of CurrencyCode.
- Specified by:
currencyCode
in interfaceCoinAcceptorInterface
- Parameters:
code
- New value for CurrencyCode property.- Throws:
jpos.JposException
- If an error occurs.
-
realTimeDataEnabled
public void realTimeDataEnabled(boolean flag) throws jpos.JposExceptionDescription copied from interface:CoinAcceptorInterface
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 interfaceCoinAcceptorInterface
- Parameters:
flag
- New value for RealTimeDataEnabled property.- Throws:
jpos.JposException
- If an error occurs.
-
adjustCashCounts
Description copied from interface:CoinAcceptorInterface
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.
- Specified by:
adjustCashCounts
in interfaceCoinAcceptorInterface
- 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 interfaceCoinAcceptorInterface
- 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 interfaceCoinAcceptorInterface
- 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 interfaceCoinAcceptorInterface
- Throws:
jpos.JposException
- never.
-
pauseDeposit
public void pauseDeposit(int control) throws jpos.JposExceptionDescription copied from interface:CoinAcceptorInterface
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 interfaceCoinAcceptorInterface
- 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:CoinAcceptorInterface
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 interfaceCoinAcceptorInterface
- 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.
-