Class ItemDispenserProperties

java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
de.gmxhome.conrad.jpos.jpos_base.itemdispenser.ItemDispenserProperties
All Implemented Interfaces:
ItemDispenserInterface, JposBaseInterface

public class ItemDispenserProperties extends JposCommonProperties implements ItemDispenserInterface
Class containing the item dispenser specific properties, their default values and default implementations of ItemDispenserInterface. For details about properties, methods and method parameters, see UPOS specification, chapter Item Dispenser.
  • Field Details

    • DispenserStatus

      public int DispenserStatus
      UPOS property DispenserStatus. Must be overwritten by derived objects within the initOnEnable method.
    • CapEmptySensor

      public boolean CapEmptySensor
      UPOS property CapEmptySensor. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapIndividualSlotStatus

      public boolean CapIndividualSlotStatus
      UPOS property CapIndividualSlotStatus. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapJamSensor

      public boolean CapJamSensor
      UPOS property CapJamSensor. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapNearEmptySensor

      public boolean CapNearEmptySensor
      UPOS property CapNearEmptySensor. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • MaxSlots

      public int MaxSlots
      UPOS property MaxSlots. Default: 1. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
  • Constructor Details

    • ItemDispenserProperties

      protected ItemDispenserProperties(int dev)
      Constructor.
      Parameters:
      dev - Device index
  • Method Details

    • adjustItemCount

      public void adjustItemCount(int itemCount, int slotNumber) throws jpos.JposException
      Description copied from interface: ItemDispenserInterface
      Final part of AdjustItemCount 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,
      • itemCount is a positive value,
      • slotNumber is between 1 and MaxSlots.
      Specified by:
      adjustItemCount in interface ItemDispenserInterface
      Parameters:
      itemCount - Number of items currently in the specified slot.
      slotNumber - Slot number.
      Throws:
      jpos.JposException - If an error occurs.
    • dispenseItem

      public void dispenseItem(int[] numItem, int slotNumber) throws jpos.JposException
      Description copied from interface: ItemDispenserInterface
      Final part of DispenseItem 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,
      • numItem is not null and has length 1,
      • slotNumber is between 1 and MaxSlots.
      Specified by:
      dispenseItem in interface ItemDispenserInterface
      Parameters:
      numItem - Number of items to be dispensed from given slot.
      slotNumber - Slot number to be used to dispense item(s).
      Throws:
      jpos.JposException - If an error occurs.
    • readItemCount

      public void readItemCount(int[] itemCount, int slotNumber) throws jpos.JposException
      Description copied from interface: ItemDispenserInterface
      Final part of ReadItemCount 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,
      • itemCount is not null and has length 1,
      • itemCount[0] > 0,
      • slotNumber is between 1 and MaxSlots.
      Specified by:
      readItemCount in interface ItemDispenserInterface
      Parameters:
      itemCount - Target for item count of the specified slot.
      slotNumber - Slot number to be used to read slot specific item count.
      Throws:
      jpos.JposException - If an error occurs.