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 classhelper class, contains property values per bump bar unit. -
Field Summary
FieldsModifier and TypeFieldDescriptionintUPOS property AutoToneDuration.intUPOS property AutoToneFrequency.booleanUPOS property CapTone.intUPOS property Keys.intUPOS property Timeout.intDefault 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 TypeMethodDescriptionvoidautoToneDuration(int duration)Final part of setting AutoToneDuration.voidautoToneFrequency(int frequency)Final part of setting AutoToneFrequency.bumpBarSound(int units, int frequency, int duration, int numberOfCycles, int interSoundWait)Validation part of BumpBarSound method.voidbumpBarSound(BumpBarSound request)Final part of BumpBarSound method.voidcopyIn()Retrieves all properties from the property set this object belongs to.voidcopyOut()Copies all properties to the property set belonging to this object.voidcurrentUnitID(int unit)Final part of setting CurrentUnitID.booleanInitialize properties that must be initialized whenever the device will be enabled the first time-voidInitialization of properties that must be initialized during open.Class factory for JposOutputRequests.voidsetKeyTranslation(int units, int scanCode, int logicalKey)Final part of logical key value assignment.voidtimeout(int milliseconds)Final part of setting Timeout.intunitsToFirstIndex(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, waitWaiterMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:JposCommonPropertiesInitialization of properties that must be initialized during open.- Overrides:
initOnOpenin classJposCommonProperties
-
initOnFirstEnable
public boolean initOnFirstEnable()Description copied from class:JposCommonPropertiesInitialize properties that must be initialized whenever the device will be enabled the first time-- Overrides:
initOnFirstEnablein classJposCommonProperties- Returns:
- Returns true in case of first enable.
-
newJposOutputRequest
Description copied from interface:JposBaseInterfaceClass factory for JposOutputRequests.- Specified by:
newJposOutputRequestin interfaceJposBaseInterface- Overrides:
newJposOutputRequestin classJposCommonProperties- Returns:
- A new instance of JposOutputRequest or a derived class.
-
autoToneDuration
public void autoToneDuration(int duration) throws jpos.JposExceptionDescription copied from interface:BumpBarInterfaceFinal 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:
autoToneDurationin 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:BumpBarInterfaceFinal 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:
autoToneFrequencyin 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:BumpBarInterfaceFinal 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:
currentUnitIDin 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:BumpBarInterfaceFinal 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:
timeoutin 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:BumpBarInterfaceFinal 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:
setKeyTranslationin 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:BumpBarInterfaceValidation 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:
bumpBarSoundin 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:BumpBarInterfaceFinal 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:
bumpBarSoundin 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.
-