Package SampleUdpDevice
Class BeltCashboxDrawer
java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.JposBaseDevice
de.gmxhome.conrad.jpos.jpos_base.JposDevice
SampleUdpDevice.Device
SampleUdpDevice.BeltCashboxDrawer
- All Implemented Interfaces:
Runnable
JposDevice based implementation of some JavaPOS device service implementations for the
sample device implemented in SampleUdpDevice.tcl. It becomes the following JavaPOS
device services in combination with the corresponding DeviceClassServer classes:
Belt, BillAcceptor, BillDispenser, CashChanger, CashDrawer, CoinAcceptor and CoinDispenser.
Multiple commands can be sent in a single frame, separated by comma (,). The corresponding responses will be sent in one frame, separated by comma as well.
The simulator supports the following commands:
- CashDrawer:
- 'DRAWER:GetState': Status request. Sends back 'DRAWER:0' if drawer is closed, otherwise 'DRAWER:1'.
- 'DRAWER:Open': Opens the drawer. Sends back the new status which is always 'DRAWER:1'.
- Belt:
- 'BELT:GetState': Status request. Sends back 'BELT:WXYZ' with the following values for W, X, Y
and Z:
- W: The current belt speed, 0 (stopped), 1 (slow) or 2 (faster),
- X: The current motor state, 0 (ok), 1 (overheated) or 2 (defective),
- Y: The current security flap state, 0 (closed) or 1 (open) and
- Z: The current light barrier state, 0 (free) or 1 (interrupted).
- 'BELT:SpeedX': Sets the belt speed. Valid values for X are 0 (stopped), 1 (slow) and 2 (faster). Sends back the belt status in the same format as for command BELT:GetState.
- 'BELT:GetState': Status request. Sends back 'BELT:WXYZ' with the following values for W, X, Y
and Z:
- Cashbox:
- 'CASHBOX:GetState': Command to retrieve the current state: Sends back 'GetStateNMO' where
- N is 0: (one slot)Empty, 1: (one slot) Low, 2: OK,
- M is 0: (one slot) Full, 1: (one slot) High, 2: OK and
- O is 0: Operational, 1: Waiting for input, 2: Input stopped, 3: Jam, 4: Opened
- 'GetInput': Command to retrieve current input amount in minimum units. Sends back 'GetInputN' where N is current input in minimum units.
- 'OutputXN': Command to output N minimum X-units, where X =C for coins, =B for bills and =A for coins or bills. Sends back 'OutputM' where M is the minimum units that could be output (If M < N, at least one slot is empty)
- 'StartInputX': Command to start cash input. Enables the '+' buttons. X specifies whether coins (1), bills (2) or both (3) shall be accepted. Sends back 'StartInputN' where N is the current input (normally 0) in minimum units.
- 'StopInput': Command to stop cash input. Disables enabled '+' buttons. Sends back 'StopInputN' where N is the final input in minimum units.
- 'EndInput': Command to finish cash input. Disables enabled '+' buttons. Sends back 'EndInputN' where N is the final input in minimum units.
- 'CancelInput': Command to cancel input. Disables enabled '+' buttons and restores previous slot values. Sends back 'CancelInputN' where N is the cancelled input (normally 0) in minimum units.
- 'GetSlots': Command to retrieve the current slot amounts. Sends back 'GetSlotsL', where L is a list of value pairs separated by spaces where the first value of each pair specifies the cash value and the second value the amount of cash units in a slot.
- 'AddSlotsK': Command to add cash units to the corresponding slots. K is a list of value pairs separated by spaces, two values per slot, where the first value of each pair specifies the cash value and the second value the amount of cash units to be added. Sends back 'AddSlotsL', where L is a list of value pairs separated by spaces where the first value of each pair specifies the cash value and the second value the amount of cash units in a slot.
- 'CASHBOX:GetState': Command to retrieve the current state: Sends back 'GetStateNMO' where
Multiple commands can be sent in a single frame, separated by comma (,). The corresponding responses will be sent in one frame, separated by comma as well.
-
Nested Class Summary
Nested classes/interfaces inherited from class SampleUdpDevice.Device
Device.CommonSubDeviceToolset
-
Field Summary
Fields inherited from class de.gmxhome.conrad.jpos.jpos_base.JposDevice
Belts, BillAcceptors, BillDispensers, Biometricss, BumpBars, CashChangers, CashDrawers, CATs, CheckScanners, ClaimedBelt, ClaimedBillAcceptor, ClaimedBillDispenser, ClaimedBiometrics, ClaimedBumpBar, ClaimedCashChanger, ClaimedCashDrawer, ClaimedCAT, ClaimedCheckScanner, ClaimedCoinAcceptor, ClaimedCoinDispenser, ClaimedDeviceMonitor, ClaimedElectronicJournal, ClaimedElectronicValueRW, ClaimedFiscalPrinter, ClaimedGate, ClaimedGestureControl, ClaimedGraphicDisplay, ClaimedHardTotals, ClaimedImageScanner, ClaimedIndividualRecognition, ClaimedItemDispenser, ClaimedKeylock, ClaimedLights, ClaimedLineDisplay, ClaimedMICR, ClaimedMotionSensor, ClaimedMSR, ClaimedPINPad, ClaimedPointCardRW, ClaimedPOSKeyboard, ClaimedPOSPower, ClaimedPOSPrinter, ClaimedRemoteOrderDisplay, ClaimedRFIDScanner, ClaimedScale, ClaimedScanner, ClaimedSignatureCapture, ClaimedSmartCardRW, ClaimedSoundPlayer, ClaimedSoundRecorder, ClaimedSpeechSynthesis, ClaimedToneIndicator, ClaimedVideoCapture, ClaimedVoiceRecognition, CoinAcceptors, CoinDispensers, DeviceMonitors, ElectronicJournals, ElectronicValueRWs, FiscalPrinters, Gates, GestureControls, GraphicDisplays, HardTotalss, ImageScanners, IndividualRecognitions, ItemDispensers, Keylocks, Lightss, LineDisplays, MICRs, MotionSensors, MSRs, PINPads, PointCardRWs, POSKeyboards, POSPowers, POSPrinters, RemoteOrderDisplays, RFIDScanners, Scales, Scanners, SignatureCaptures, SmartCardRWs, SoundPlayers, SoundRecorders, SpeechSynthesiss, ToneIndicators, VideoCaptures, VoiceRecognitions
Fields inherited from class de.gmxhome.conrad.jpos.jpos_base.JposBaseDevice
AllowAlwaysSetProperties, AsyncProcessorRunning, CapCompareFirmwareVersion, CapPowerReporting, CapUpdateFirmware, CurrentCommand, DrawerBeepVolume, ID, JposVersion, Log, LogFilePath, LogFilePattern, LoggerFormat, LoggerName, LogLevel, MaxArrayStringElements, MaximumConfirmationEventWaitingTime, PendingCommands, PhysicalDeviceDescription, PhysicalDeviceName, SerialIOAdapterClass, StrictFIFOEventHandling
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
changeDefaults(BeltProperties props)
Change defaults of properties.void
changeDefaults(BillAcceptorProperties props)
Change defaults of properties.void
Change defaults of properties.void
changeDefaults(CashChangerProperties props)
Change defaults of properties.void
changeDefaults(CashDrawerProperties props)
Change defaults of properties.void
changeDefaults(CoinAcceptorProperties props)
Change defaults of properties.void
Change defaults of properties.getBeltProperties(int index)
Returns device implementation of BeltProperties.getBillAcceptorProperties(int index)
Returns device implementation of BillAcceptorProperties.getBillDispenserProperties(int index)
Returns device implementation of BillDispenserProperties.getCashChangerProperties(int index)
Returns device implementation of CashChangerProperties.getCashDrawerProperties(int index)
Returns device implementation of CashDrawerProperties.getCoinAcceptorProperties(int index)
Returns device implementation of CoinAcceptorProperties.getCoinDispenserProperties(int index)
Returns device implementation of CoinDispenserProperties.Methods inherited from class SampleUdpDevice.Device
checkProperties, run, sendResp, sendResp
Methods inherited from class de.gmxhome.conrad.jpos.jpos_base.JposDevice
beltInit, billAcceptorInit, billDispenserInit, biometricsInit, bumpBarInit, cashChangerInit, cashDrawerInit, cATInit, changeDefaults, changeDefaults, changeDefaults, changeDefaults, changeDefaults, changeDefaults, changeDefaults, changeDefaults, changeDefaults, changeDefaults, changeDefaults, changeDefaults, changeDefaults, changeDefaults, changeDefaults, changeDefaults, changeDefaults, changeDefaults, changeDefaults, changeDefaults, changeDefaults, changeDefaults, changeDefaults, changeDefaults, changeDefaults, changeDefaults, changeDefaults, changeDefaults, changeDefaults, changeDefaults, changeDefaults, changeDefaults, changeDefaults, changeDefaults, changeDefaults, changeDefaults, changeDefaults, changeDefaults, checkScannerInit, coinAcceptorInit, coinDispenserInit, deviceMonitorInit, electronicJournalInit, electronicValueRWInit, fiscalPrinterInit, gateInit, gestureControlInit, getArrayOf, getBiometricsProperties, getBumpBarProperties, getCATProperties, getCheckScannerProperties, getDeviceMonitorProperties, getElectronicJournalProperties, getElectronicValueRWProperties, getFiscalPrinterProperties, getGateProperties, getGestureControlProperties, getGraphicDisplayProperties, getHardTotalsProperties, getImageScannerProperties, getIndividualRecognitionProperties, getItemDispenserProperties, getKeylockProperties, getLightsProperties, getLineDisplayProperties, getMICRProperties, getMotionSensorProperties, getMSRProperties, getPINPadProperties, getPointCardRWProperties, getPOSKeyboardProperties, getPOSPowerProperties, getPOSPrinterProperties, getRemoteOrderDisplayProperties, getRFIDScannerProperties, getScaleProperties, getScannerProperties, getSignatureCaptureProperties, getSmartCardRWProperties, getSoundPlayerProperties, getSoundRecorderProperties, getSpeechSynthesisProperties, getToneIndicatorProperties, getVideoCaptureProperties, getVoiceRecognitionProperties, graphicDisplayInit, hardTotalsInit, imageScannerInit, individualRecognitionInit, itemDispenserInit, keylockInit, lightsInit, lineDisplayInit, mICRInit, motionSensorInit, mSRInit, noOfPropertySets, pINPadInit, pointCardRWInit, pOSKeyboardInit, pOSPowerInit, pOSPrinterInit, remoteOrderDisplayInit, rFIDScannerInit, scaleInit, scannerInit, signatureCaptureInit, smartCardRWInit, soundPlayerInit, soundRecorderInit, speechSynthesisInit, toneIndicatorInit, videoCaptureInit, voiceRecognitionInit
Methods inherited from class de.gmxhome.conrad.jpos.jpos_base.JposBaseDevice
check, checkext, checkMember, checkRange, concurrentProcessingSupported, createConcurrentRequestThread, delay, getClaimingInstance, getCount, getPropertySetInstance, getRequestRunnersRequest, handleEvent, handleEvent, handleEvent, handleEvent, handleEvent, handleEvent, handlePowerStateOnEnable, invokeRequestThread, log, member, member, postDirectIOProcessing, postTransitionProcessing, prepareSignalStatusWaits, processEventList, removePropertySet, signalStatusWaits, stringArrayToLongArray, synchronizedMessageBox
-
Constructor Details
-
BeltCashboxDrawer
Constructor. id specifies the server to be connected in format host:port.- Parameters:
id
- IPv4 target address and port
-
-
Method Details
-
changeDefaults
Description copied from class:JposDevice
Change defaults of properties. Must be implemented within derived classed that support cash drawer services.- Overrides:
changeDefaults
in classJposDevice
- Parameters:
props
- Property set for setting the property defaults
-
getCashDrawerProperties
Description copied from class:JposDevice
Returns device implementation of CashDrawerProperties.- Overrides:
getCashDrawerProperties
in classJposDevice
- Parameters:
index
- Device index, see constructor of JposCommonProperties.- Returns:
- Instance of CashDrawerProperties that matches the requirements of the corresponding device service.
-
changeDefaults
Description copied from class:JposDevice
Change defaults of properties. Must be implemented within derived classed that support belt services.- Overrides:
changeDefaults
in classJposDevice
- Parameters:
props
- Property set for setting the property defaults
-
getBeltProperties
Description copied from class:JposDevice
Returns device implementation of BeltProperties.- Overrides:
getBeltProperties
in classJposDevice
- Parameters:
index
- Device index, see constructor of JposCommonProperties.- Returns:
- Instance of BeltProperties that matches the requirements of the corresponding device service.
-
changeDefaults
Description copied from class:JposDevice
Change defaults of properties. Must be implemented within derived classed that support bill acceptor services.- Overrides:
changeDefaults
in classJposDevice
- Parameters:
props
- Property set for setting the property defaults
-
changeDefaults
Description copied from class:JposDevice
Change defaults of properties. Must be implemented within derived classed that support bill dispenser services.- Overrides:
changeDefaults
in classJposDevice
- Parameters:
props
- Property set for setting the property defaults
-
changeDefaults
Description copied from class:JposDevice
Change defaults of properties. Must be implemented within derived classed that support cash changer services.- Overrides:
changeDefaults
in classJposDevice
- Parameters:
props
- Property set for setting the property defaults
-
changeDefaults
Description copied from class:JposDevice
Change defaults of properties. Must be implemented within derived classed that support coin acceptor services.- Overrides:
changeDefaults
in classJposDevice
- Parameters:
props
- Property set for setting the property defaults
-
changeDefaults
Description copied from class:JposDevice
Change defaults of properties. Must be implemented within derived classed that support coin dispenser services.- Overrides:
changeDefaults
in classJposDevice
- Parameters:
props
- Property set for setting the property defaults
-
getBillAcceptorProperties
Description copied from class:JposDevice
Returns device implementation of BillAcceptorProperties.- Overrides:
getBillAcceptorProperties
in classJposDevice
- Parameters:
index
- Device index, see constructor of JposCommonProperties.- Returns:
- Instance of BillAcceptorProperties that matches the requirements of the corresponding device service.
-
getCoinAcceptorProperties
Description copied from class:JposDevice
Returns device implementation of CoinAcceptorProperties.- Overrides:
getCoinAcceptorProperties
in classJposDevice
- Parameters:
index
- Device index, see constructor of JposCommonProperties.- Returns:
- Instance of CoinAcceptorProperties that matches the requirements of the corresponding device service.
-
getCashChangerProperties
Description copied from class:JposDevice
Returns device implementation of CashChangerProperties.- Overrides:
getCashChangerProperties
in classJposDevice
- Parameters:
index
- Device index, see constructor of JposCommonProperties.- Returns:
- Instance of CashChangerProperties that matches the requirements of the corresponding device service.
-
getBillDispenserProperties
Description copied from class:JposDevice
Returns device implementation of BillDispenserProperties.- Overrides:
getBillDispenserProperties
in classJposDevice
- Parameters:
index
- Device index, see constructor of JposCommonProperties.- Returns:
- Instance of BillDispenserProperties that matches the requirements of the corresponding device service.
-
getCoinDispenserProperties
Description copied from class:JposDevice
Returns device implementation of CoinDispenserProperties.- Overrides:
getCoinDispenserProperties
in classJposDevice
- Parameters:
index
- Device index, see constructor of JposCommonProperties.- Returns:
- Instance of CoinDispenserProperties that matches the requirements of the corresponding device service.
-