Class BumpBarProperties
java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
de.gmxhome.conrad.jpos.jpos_base.bumpbar.BumpBarProperties
- All Implemented Interfaces:
BumpBarInterface
,JposBaseInterface
Class containing the bump bar specific properties, their default values and default implementations of
BumpBarInterface.
For details about properties, methods and method parameters, see UPOS specification, chapter Bump Bar.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
helper class, contains property values per bump bar unit. -
Field Summary
FieldsModifier and TypeFieldDescriptionint
UPOS property AutoToneDuration.int
UPOS property AutoToneFrequency.boolean
UPOS property CapTone.int
UPOS property Keys.int
UPOS property Timeout.int
Default value of Timeout property.Unit specific properties, one per possible unit.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
autoToneDuration(int duration)
Final part of setting AutoToneDuration.void
autoToneFrequency(int frequency)
Final part of setting AutoToneFrequency.bumpBarSound(int units, int frequency, int duration, int numberOfCycles, int interSoundWait)
Validation part of BumpBarSound method.void
bumpBarSound(BumpBarSound request)
Final part of BumpBarSound method.void
copyIn()
Retrieves all properties from the property set this object belongs to.void
copyOut()
Copies all properties to the property set belonging to this object.void
currentUnitID(int unit)
Final part of setting CurrentUnitID.boolean
Initialize properties that must be initialized whenever the device will be enabled the first time-void
Initialization of properties that must be initialized during open.Class factory for JposOutputRequests.void
setKeyTranslation(int units, int scanCode, int logicalKey)
Final part of logical key value assignment.void
timeout(int milliseconds)
Final part of setting Timeout.int
unitsToFirstIndex(int units)
Returns the lowest index of a unit specified by the given bitmask.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, initOnEnable, 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, open, powerNotify, release, removeFromPropertySetList, resetStatistics, retrieveStatistics, retryInput, retryOutput, unitDataCount, updateFirmware, updateFirmware, updateStatistics
-
Field Details
-
AutoToneDuration
public int AutoToneDurationUPOS property AutoToneDuration. -
AutoToneFrequency
public int AutoToneFrequencyUPOS property AutoToneFrequency. -
CapTone
public boolean CapToneUPOS property CapTone. -
Keys
public int KeysUPOS property Keys. -
TimeoutDef
public int TimeoutDefDefault value of Timeout property. Default: 1000 (1 second). Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
Unit
Unit specific properties, one per possible unit. -
Timeout
public int TimeoutUPOS property Timeout.
-
-
Constructor Details
-
BumpBarProperties
protected BumpBarProperties(int dev)Constructor.- Parameters:
dev
- Device index
-
-
Method Details
-
copyOut
public void copyOut()Copies all properties to the property set belonging to this object. -
copyIn
public void copyIn()Retrieves all properties from the property set this object belongs to. -
unitsToFirstIndex
public int unitsToFirstIndex(int units)Returns the lowest index of a unit specified by the given bitmask.- Parameters:
units
- A bitmask specifying one or more bump bar units.- Returns:
- The lowest index where (units & (1 << index)) != 0.
-
initOnOpen
public void initOnOpen()Description copied from class:JposCommonProperties
Initialization of properties that must be initialized during open.- Overrides:
initOnOpen
in classJposCommonProperties
-
initOnFirstEnable
public boolean initOnFirstEnable()Description copied from class:JposCommonProperties
Initialize properties that must be initialized whenever the device will be enabled the first time-- Overrides:
initOnFirstEnable
in classJposCommonProperties
- Returns:
- Returns true in case of first enable.
-
newJposOutputRequest
Description copied from interface:JposBaseInterface
Class factory for JposOutputRequests.- Specified by:
newJposOutputRequest
in interfaceJposBaseInterface
- Overrides:
newJposOutputRequest
in classJposCommonProperties
- Returns:
- A new instance of JposOutputRequest or a derived class.
-
autoToneDuration
public void autoToneDuration(int duration) throws jpos.JposExceptionDescription copied from interface:BumpBarInterface
Final part of setting AutoToneDuration. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- The unit specified by CurrentUnitID is online,
- The new property value is positive.
- Specified by:
autoToneDuration
in interfaceBumpBarInterface
- Parameters:
duration
- New AutoToneDuration value- Throws:
jpos.JposException
- If an error occurs
-
autoToneFrequency
public void autoToneFrequency(int frequency) throws jpos.JposExceptionDescription copied from interface:BumpBarInterface
Final part of setting AutoToneFrequency. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- The unit specified by CurrentUnitID is online,
- The new property value is positive.
- Specified by:
autoToneFrequency
in interfaceBumpBarInterface
- Parameters:
frequency
- New AutoToneFrequency value- Throws:
jpos.JposException
- If an error occurs
-
currentUnitID
public void currentUnitID(int unit) throws jpos.JposExceptionDescription copied from interface:BumpBarInterface
Final part of setting CurrentUnitID. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- The new property value is one of UID_x, where 1 ≤ x ≤ 32.
- Specified by:
currentUnitID
in interfaceBumpBarInterface
- Parameters:
unit
- New CurrentUnitID value- Throws:
jpos.JposException
- If an error occurs
-
timeout
public void timeout(int milliseconds) throws jpos.JposExceptionDescription copied from interface:BumpBarInterface
Final part of setting Timeout. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device has been opened,
- The new property value is positive,
- internal property AllowAlwaysSetProperties is true or milliseconds equals the previous value of Timeout.
- Specified by:
timeout
in interfaceBumpBarInterface
- Parameters:
milliseconds
- New Timeout value- Throws:
jpos.JposException
- If an error occurs
-
setKeyTranslation
public void setKeyTranslation(int units, int scanCode, int logicalKey) throws jpos.JposExceptionDescription copied from interface:BumpBarInterface
Final part of logical key value assignment. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- At least one unit has been selected (units != 0),
- The device units specified by units are online,
- Both, scanCode and logicalKey, are within the range from 0 to 255.
- Specified by:
setKeyTranslation
in interfaceBumpBarInterface
- Parameters:
units
- Bitwise mask indicating which bump bar unit(s) to set key translation for.scanCode
- The bump bar generated key scan code. Valid values 0-255.logicalKey
- The translated logical key value. Valid values 0-255.- Throws:
jpos.JposException
- If an error occurs
-
bumpBarSound
public BumpBarSound bumpBarSound(int units, int frequency, int duration, int numberOfCycles, int interSoundWait) throws jpos.JposExceptionDescription copied from interface:BumpBarInterface
Validation part of BumpBarSound method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- At least one unit has been selected (units != 0),
- All units specified by units are online,
- For all specified units is CapTone true,
- interSoundWait is a positive value,
- numberOfCycles is FOREVER or a positive non-zero value,
- If AsyncMode is false, numberOfCycles is not FOREVER.
- Specified by:
bumpBarSound
in interfaceBumpBarInterface
- Parameters:
units
- Bitwise mask indicating which bump bar unit(s) to operate on.frequency
- Tone frequency in Hertz.duration
- Tone duration in milliseconds.numberOfCycles
- Number of cycles the tone shall be performed.interSoundWait
- Milliseconds to wait before playing the tone again.- Returns:
- BumpBarSound object for use in final part.
- Throws:
jpos.JposException
- For details, see UPOS method BumpBarSound.
-
bumpBarSound
Description copied from interface:BumpBarInterface
Final part of BumpBarSound method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a BumpBarSound object. This method will be called when the corresponding operation shall be performed, either synchronously or asynchronously. All plausibility checks have been made before, only runtime errors can occur.
In case of asynchronous processing, the following additional checks have been made before invocation:- All display units specified by request.getUnits() are still online.
- Specified by:
bumpBarSound
in interfaceBumpBarInterface
- Parameters:
request
- Output request object returned by validation method that contains all parameters to be used by BumpBarSound.- Throws:
jpos.JposException
- For details, see UPOS method BumpBarSound.
-