Package SampleSubsystemDevice
Class Device
java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.JposBaseDevice
de.gmxhome.conrad.jpos.jpos_base.JposDevice
SampleSubsystemDevice.Device
- All Implemented Interfaces:
Runnable
JposDevice based implementation of JavaPOS BumpBar and RemoteOrderDisplay device service implementations for the
sample device implemented in SampleSubsystemDevice.tcl.
Supported features for RemoteOrderDisplay part are:
- One clock per display unit.
- One buffer per display unit.
- No tone, no character set selection, only one (default) video mode.
- clock overlays text, text changes do not overwrite the clock as long as clock has not been stopped.
- text does not overwrite drawn lines. Drawn lines can only be removed by clearVideo, clearVideoRegion or resetVideo.
- A box around the clock can become part of the clock if it was drawn before starting the clock with the clock specific dimensions (height 1, width 5, 5 or eight, depending on clock type). In that case, the box remains part of the clock, even if it will be cleared by clearVideoRegion.
- If the simulator performs a clock update cycle between reading out the current time and restarting the clock at the new position in method controlClock with function CLK_MOVE, the time will not be updated.
Supported features for BumpBar are:
- No tone.
- Key Scan codes 1 - 8, can be customized via UPOS method SetKeyTranslation.
Here a full list of all device specific properties that can be changed via jpos.xml:
- BackgroundIntensity: Background intensity, must be 0 or ROD_ATTR_INTENSITY (8). Default: ROD_ATTR_INTENSITY.
- CharacterTimeout: Positive integer value, specifying the maximum delay between bytes that belong to the same frame. Default value: 50 milliseconds.
- ClientPort: Integer value between 0 and 65535 specifying the TCP port used for communication with the device simulator. Default: 0 (for random port number selected by operating system).
- CursorColor: Color and insensity of the cursor. Default: ROD_ATTR_FG_BLACK (0). Can be set to any value between 0 and 15.
- MinClaimTimeout: Minimum timeout in milliseconds used by method Claim to ensure correct working. Must be a positive value. If this value is too small, Claim might throw a JposException even if everything is OK if the specified timeout is less than or equal to MinClaimTimeout. Default: 100.
- Port: Operating system specific name of the TCP address to be used for communication with the device simulator. Names are of the form IPv4:port, where IPv4 is the IP address of the device and port its TCP port.
- RequestTimeout: Maximum time, in milliseconds, between sending a command to the simulator and getting the first byte of its response. Default: 1000.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic int
Extended error code that has not yet defined within the JavaPOS framework.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(BumpBarProperties props)
Change defaults of properties.void
Change defaults of properties.void
checkProperties(jpos.config.JposEntry entry)
Checks whether a JposEntry belongs to a predefined property value an if so, sets the corresponding driver valuegetBumpBarProperties(int index)
Returns device implementation of BumpBarProperties.getRemoteOrderDisplayProperties(int index)
Returns device implementation of RemoteOrderDisplayProperties.void
run()
Main thread, reads frames from simulator and generates the corresponding events (coordinates or power state for specific display unit)protected jpos.JposException
sendCommand(String command)
Method to perform any command, Keep in mind that commands normally generate no response.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, checkScannerInit, coinAcceptorInit, coinDispenserInit, deviceMonitorInit, electronicJournalInit, electronicValueRWInit, fiscalPrinterInit, gateInit, gestureControlInit, getArrayOf, getBeltProperties, getBillAcceptorProperties, getBillDispenserProperties, getBiometricsProperties, getCashChangerProperties, getCashDrawerProperties, getCATProperties, getCheckScannerProperties, getCoinAcceptorProperties, getCoinDispenserProperties, getDeviceMonitorProperties, getElectronicJournalProperties, getElectronicValueRWProperties, getFiscalPrinterProperties, getGateProperties, getGestureControlProperties, getGraphicDisplayProperties, getHardTotalsProperties, getImageScannerProperties, getIndividualRecognitionProperties, getItemDispenserProperties, getKeylockProperties, getLightsProperties, getLineDisplayProperties, getMICRProperties, getMotionSensorProperties, getMSRProperties, getPINPadProperties, getPointCardRWProperties, getPOSKeyboardProperties, getPOSPowerProperties, getPOSPrinterProperties, 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
-
Field Details
-
JPOS_EROD_NOUNITS
public static final int JPOS_EROD_NOUNITSExtended error code that has not yet defined within the JavaPOS framework. The value (200) must be replaced by JPOS_EROD_NOUNITS when this constant will be defined in future.- See Also:
- Constant Field Values
-
-
Constructor Details
-
Device
Constructor. ID is the network address of the remote order display controller. The controller is the instance that controls the communication between the application and up to 32 displays, it is some kind of hub or so. In case of the sample device, up to 5 displays of identical types are supported. Other examples might consist of a controller that controls several completely different devices, some might support touch events, some might support tone output, all might support completely different dimensions.- Parameters:
id
- Network address of the display controller.
-
-
Method Details
-
checkProperties
public void checkProperties(jpos.config.JposEntry entry) throws jpos.JposExceptionDescription copied from class:JposBaseDevice
Checks whether a JposEntry belongs to a predefined property value an if so, sets the corresponding driver value- Overrides:
checkProperties
in classJposBaseDevice
- Parameters:
entry
- Entry to be checked, contains value to be set- 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 remote order display 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 bump bar services.- Overrides:
changeDefaults
in classJposDevice
- Parameters:
props
- Property set for setting the property defaults
-
sendCommand
Method to perform any command, Keep in mind that commands normally generate no response.- Parameters:
command
- Command data to be sent, without final ETX.- Returns:
- JposException in error case, null if no error occurred.
-
run
public void run()Main thread, reads frames from simulator and generates the corresponding events (coordinates or power state for specific display unit) -
getBumpBarProperties
Description copied from class:JposDevice
Returns device implementation of BumpBarProperties.- Overrides:
getBumpBarProperties
in classJposDevice
- Parameters:
index
- Device index, see constructor of JposCommonProperties.- Returns:
- Instance of BumpBarProperties that matches the requirements of the corresponding device service.
-
getRemoteOrderDisplayProperties
Description copied from class:JposDevice
Returns device implementation of RemoteOrderDisplayProperties.- Overrides:
getRemoteOrderDisplayProperties
in classJposDevice
- Parameters:
index
- Device index, see constructor of JposCommonProperties.- Returns:
- Instance of RemoteOrderDisplayProperties that matches the requirements of the corresponding device service.
-