Class CashDrawerProperties
java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
de.gmxhome.conrad.jpos.jpos_base.cashdrawer.CashDrawerProperties
- All Implemented Interfaces:
CashDrawerInterface
,JposBaseInterface
- Direct Known Subclasses:
CashDrawer
Class containing the drawer specific properties, their default values and default implementations of
CashDrawerInterface.
For details about properties, methods and method parameters, see UPOS specification, chapter Cash Drawer.
-
Field Summary
FieldsModifier and TypeFieldDescriptionboolean
UPOS property CapStatus.boolean
UPOS property CapStatusMultiDrawerDetect.int
Volume for drawer beep.boolean
UPOS property DrawerOpened.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
checkProperties(jpos.config.JposEntry entry)
Checks jpos entries for service specific jpos property values and set corresponding service values.void
Initialization of properties that must be initialized during open.void
Final part of OpenDrawer method.void
Final part of WaitForDrawerClose method.Methods inherited from class de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
addProperties, asyncMode, attachWaiter, autoDisable, checkForDeprecation, checkHealth, claim, clearDataProperties, clearErrorProperties, clearInput, clearOutput, clearOutputErrorProperties, close, compareFirmwareVersion, dataEventEnabled, deviceEnabled, directIO, directIO, flagWhenIdle, freezeEvents, getClaimingInstance, handlePowerStateOnEnable, initOnClaim, initOnEnable, initOnFirstEnable, 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
-
CapStatus
public boolean CapStatusUPOS property CapStatus. Default: true. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapStatusMultiDrawerDetect
public boolean CapStatusMultiDrawerDetectUPOS property CapStatusMultiDrawerDetect. Default: true. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
DrawerOpened
public boolean DrawerOpenedUPOS property DrawerOpened. -
DrawerBeepVolume
public int DrawerBeepVolumeVolume for drawer beep. Valid values are from 0 to 127. Will be initialized with an Integer object only for CashDrawer devices within jpos.xml. The default is 127 (the maximum volume).
-
-
Constructor Details
-
CashDrawerProperties
public CashDrawerProperties(int dev)Constructor. Sets ExclusiveUse to ExclusiveAllowed to match the CashDrawer device model.- Parameters:
dev
- Device index
-
-
Method Details
-
checkProperties
public void checkProperties(jpos.config.JposEntry entry) throws jpos.JposExceptionDescription copied from class:JposCommonProperties
Checks jpos entries for service specific jpos property values and set corresponding service values.- Overrides:
checkProperties
in classJposCommonProperties
- Parameters:
entry
- JposEntry instance that contains all jpos properties for the device. Only service specific entries are of interest here, device specific entries should be processed by the corresponding checkProperties method of the device implementation derived from JposDevice.- Throws:
jpos.JposException
- a service related property is invalid or a mandatory service related property is missing.
-
initOnOpen
public void initOnOpen()Description copied from class:JposCommonProperties
Initialization of properties that must be initialized during open.- Overrides:
initOnOpen
in classJposCommonProperties
-
openDrawer
public void openDrawer() throws jpos.JposExceptionDescription copied from interface:CashDrawerInterface
Final part of OpenDrawer 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,
- Device has not been claimed by other instance.
- Specified by:
openDrawer
in interfaceCashDrawerInterface
- Throws:
jpos.JposException
- If an error occurs.
-
waitForDrawerClose
public void waitForDrawerClose() throws jpos.JposExceptionDescription copied from interface:CashDrawerInterface
Final part of WaitForDrawerClose method. Can be overwritten in derived class, if necessary. Since the CashDrawerService class performs beeping directly via the underlaying standardized sound system via javax.sound, the parameters beepTimeout, beepDuration, beepFrequency and beepDelay will not be forwarded to the final part.
This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- CapStatus is true,
- The parameters beepTimeout, beepDuration and beepDelay of the calling method are positive or FOREVER,
- The parameter beepFrequency is between 10 and 24000.
Keep also in mind that the beep duration should be at least 1/8 seconds (125 milliseconds) to ensure that it can be heard, values above 1/4 second (250 milliseconds) are recommended.- Specified by:
waitForDrawerClose
in interfaceCashDrawerInterface
- Throws:
jpos.JposException
- If an error occurs.
-