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

public class BumpBarProperties extends JposCommonProperties implements BumpBarInterface
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.
  • Field Details

    • AutoToneDuration

      public int AutoToneDuration
      UPOS property AutoToneDuration.
    • AutoToneFrequency

      public int AutoToneFrequency
      UPOS property AutoToneFrequency.
    • CapTone

      public boolean CapTone
      UPOS property CapTone.
    • Keys

      public int Keys
      UPOS property Keys.
    • TimeoutDef

      public int TimeoutDef
      Default value of Timeout property. Default: 1000 (1 second). Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • Unit

      public final BumpBarProperties.UnitProperties[] Unit
      Unit specific properties, one per possible unit.
    • Timeout

      public int Timeout
      UPOS 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 class JposCommonProperties
    • 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 class JposCommonProperties
      Returns:
      Returns true in case of first enable.
    • newJposOutputRequest

      public JposOutputRequest newJposOutputRequest()
      Description copied from interface: JposBaseInterface
      Class factory for JposOutputRequests.
      Specified by:
      newJposOutputRequest in interface JposBaseInterface
      Overrides:
      newJposOutputRequest in class JposCommonProperties
      Returns:
      A new instance of JposOutputRequest or a derived class.
    • autoToneDuration

      public void autoToneDuration(int duration) throws jpos.JposException
      Description 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 interface BumpBarInterface
      Parameters:
      duration - New AutoToneDuration value
      Throws:
      jpos.JposException - If an error occurs
    • autoToneFrequency

      public void autoToneFrequency(int frequency) throws jpos.JposException
      Description 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 interface BumpBarInterface
      Parameters:
      frequency - New AutoToneFrequency value
      Throws:
      jpos.JposException - If an error occurs
    • currentUnitID

      public void currentUnitID(int unit) throws jpos.JposException
      Description 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 interface BumpBarInterface
      Parameters:
      unit - New CurrentUnitID value
      Throws:
      jpos.JposException - If an error occurs
    • timeout

      public void timeout(int milliseconds) throws jpos.JposException
      Description 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 interface BumpBarInterface
      Parameters:
      milliseconds - New Timeout value
      Throws:
      jpos.JposException - If an error occurs
    • setKeyTranslation

      public void setKeyTranslation(int units, int scanCode, int logicalKey) throws jpos.JposException
      Description 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 interface BumpBarInterface
      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.JposException
      Description 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 interface BumpBarInterface
      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

      public void bumpBarSound(BumpBarSound request) throws jpos.JposException
      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 interface BumpBarInterface
      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.