Class KeylockProperties
java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
de.gmxhome.conrad.jpos.jpos_base.keylock.KeylockProperties
- All Implemented Interfaces:
JposBaseInterface
,KeylockInterface
- Direct Known Subclasses:
Keylock
Class containing the keylock specific properties, their default values and default implementations of
KeylockInterface.
For details about properties, methods and method parameters, see UPOS specification, chapter Keylock.
-
Field Summary
FieldsModifier and TypeFieldDescriptionint
UPOS property CapKeylockType.byte[]
UPOS property ElectronicKeyValue.byte[]
Default value of ElectronicKeyValue property.int
UPOS property KeyPosition.int
Default value of KeyPosition property.int
UPOS property PositionCount.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
initOnEnable(boolean enable)
Initialization of properties that must be initialized during deviceEnable.void
Initialization of properties that must be initialized during open.void
waitForKeylockChange(int keyPosition, int timeout)
Final part of WaitForKeylockChange method.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, 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
-
CapKeylockType
public int CapKeylockTypeUPOS property CapKeylockType. Default: KT_STANDARD. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
ElectronicKeyValueDef
public byte[] ElectronicKeyValueDefDefault value of ElectronicKeyValue property. Default: Zero-length byte array. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
KeyPositionDef
public int KeyPositionDefDefault value of KeyPosition property. Default: KP_ANY. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
PositionCount
public int PositionCountUPOS property PositionCount. Default: 0. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
KeyPosition
public int KeyPositionUPOS property KeyPosition. -
ElectronicKeyValue
public byte[] ElectronicKeyValueUPOS property ElectronicKeyValue.
-
-
Constructor Details
-
KeylockProperties
public KeylockProperties(int dev)Constructor. Sets ExclusiveUse to ExclusiveNo to match the Keylock device model.- Parameters:
dev
- Device index
-
-
Method Details
-
initOnOpen
public void initOnOpen()Description copied from class:JposCommonProperties
Initialization of properties that must be initialized during open.- Overrides:
initOnOpen
in classJposCommonProperties
-
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
-
waitForKeylockChange
public void waitForKeylockChange(int keyPosition, int timeout) throws jpos.JposExceptionDescription copied from interface:KeylockInterface
Final part of WaitForKeylockChange 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,
- keyPosition is between 0 and PositionCount,
- timeout is ≥ 0 or JPOS_FOREVER.
- Specified by:
waitForKeylockChange
in interfaceKeylockInterface
- Parameters:
keyPosition
- Requested keylock position.timeout
- Maximum number of milliseconds to wait for the keylock before returning control back to the application.- Throws:
jpos.JposException
- If an error occurs.
-