Package SampleHardTotals
Class Device
java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.JposBaseDevice
de.gmxhome.conrad.jpos.jpos_base.JposDevice
SampleHardTotals.Device
Base of a JposDevice based implementation of JavaPOS HardTotals device service implementation for the sample device
based on the RandomAccessFile class. Error detection is not supported by this sample.
Here a full list of all device specific properties that can be changed via jpos.xml:
- DevIndex: Positive integer between 0 and MaxTotals - 1, specifying one part of the hard totals file. Default: 0
- HardTotalsFileName: Path to the disk file that contains the HardTotals. Stored in class variable ID.
- MaxHardTotalFileSize: Maximum size of each of the MaxTotals Hard totals. Default 32768 (0x8000).
- MaxTotals: Maximum number of hard totals. Limited by memory and disk space because each hard total requires MaxHardTotalFileSize bytes in both, RAM and disk. Default: DevIndex + 1.
- SingleFileOnly: Must be true if only one file shall be supported per hard total, otherwise false. Default: false.
- MaxTotals: 32-bit integer value.
- MaxTotals times:
- MaxHardTotalFileSize: 32-bit integer value, size of the corresponding HardTotals device,
- SingleFileOnly: 8-bit boolean value, specifies whether the corresponding HardTotals device supports only one single file.
- MaxTotals times: N bytes representing the corresponding HardTotals, where N is the corresponding MaxHardTotalFileSize value.
- Size: 32-bit integer value, the size of the created file or 0 if file has not been created,
- Contents: Size byte contents of the hard totals file, if it exists.
- Undefined: N - Size - 4 byte random values, where N is the corresponding MaxHardTotalFileSize value.
- For NumberOfFiles:
- Size: 32-bit integer value, the size of a file,
- Name: 10 byte file name,
- Contents: Size byte contents.
- At the end: 32-bit integer 0 as end of information mark.
- All remaining bytes of a HardTotals device contain random values.
-
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(HardTotalsProperties props)
Change defaults of properties.void
checkProperties(jpos.config.JposEntry entry, int index)
Checks whether a JposEntry belongs to a predefined property value an if so, sets the corresponding driver value for device global properties or for a specific hard totals device.getHardTotalsProperties(int index)
Returns device implementation of HardTotalsProperties.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, changeDefaults, changeDefaults, changeDefaults, changeDefaults, changeDefaults, changeDefaults, checkScannerInit, coinAcceptorInit, coinDispenserInit, deviceMonitorInit, electronicJournalInit, electronicValueRWInit, fiscalPrinterInit, gateInit, gestureControlInit, getArrayOf, getBeltProperties, getBillAcceptorProperties, getBillDispenserProperties, getBiometricsProperties, getBumpBarProperties, getCashChangerProperties, getCashDrawerProperties, getCATProperties, getCheckScannerProperties, getCoinAcceptorProperties, getCoinDispenserProperties, getDeviceMonitorProperties, getElectronicJournalProperties, getElectronicValueRWProperties, getFiscalPrinterProperties, getGateProperties, getGestureControlProperties, getGraphicDisplayProperties, 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, checkProperties, 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
-
Device
The device implementation. See parent for further details.- Parameters:
id
- Device ID, interface to HardTotals device. Name of file representing the hard totals hardware in this implementation.- Throws:
jpos.JposException
- if id cannot be opened or has bad format.
-
-
Method Details
-
checkProperties
public void checkProperties(jpos.config.JposEntry entry, int index) throws jpos.JposExceptionChecks whether a JposEntry belongs to a predefined property value an if so, sets the corresponding driver value for device global properties or for a specific hard totals device. This is the first method called after creation of a Device instance. Therefore, all variables and properties set within this method can be used in all other methods except the constructor.- Parameters:
entry
- Entry to be checked, contains value to be setindex
- Index of the specific device.- Throws:
jpos.JposException
- if a property value is invalid
-
changeDefaults
Description copied from class:JposDevice
Change defaults of properties. Must be implemented within derived classed that support hard totals services.- Overrides:
changeDefaults
in classJposDevice
- Parameters:
props
- Property set for setting the property defaults
-
getHardTotalsProperties
Description copied from class:JposDevice
Returns device implementation of HardTotalsProperties.- Overrides:
getHardTotalsProperties
in classJposDevice
- Parameters:
index
- Device index, see constructor of JposCommonProperties.- Returns:
- Instance of HardTotalsProperties that matches the requirements of the corresponding device service.
-