Class ScaleService

java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.JposBase
de.gmxhome.conrad.jpos.jpos_base.scale.ScaleService
All Implemented Interfaces:
jpos.loader.JposServiceInstance, jpos.services.BaseService, jpos.services.ScaleService110, jpos.services.ScaleService111, jpos.services.ScaleService112, jpos.services.ScaleService113, jpos.services.ScaleService114, jpos.services.ScaleService115, jpos.services.ScaleService116, jpos.services.ScaleService12, jpos.services.ScaleService13, jpos.services.ScaleService14, jpos.services.ScaleService15, jpos.services.ScaleService16, jpos.services.ScaleService17, jpos.services.ScaleService18, jpos.services.ScaleService19

public class ScaleService extends JposBase implements jpos.services.ScaleService116
Scale service implementation. For more details about getter, setter and method implementations, see JposBase.
  • Field Details

    • ScaleInterface

      public ScaleInterface ScaleInterface
      Instance of a class implementing the ScaleInterface for scale specific setter and method calls bound to the property set. Almost always the same object as Data.
  • Constructor Details

    • ScaleService

      public ScaleService(ScaleProperties props, JposDevice device)
      Constructor. Stores given property set and device implementation object.
      Parameters:
      props - Property set.
      device - Device implementation object.
  • Method Details

    • getCapDisplay

      public boolean getCapDisplay() throws jpos.JposException
      Specified by:
      getCapDisplay in interface jpos.services.ScaleService12
      Throws:
      jpos.JposException
    • getCapDisplayText

      public boolean getCapDisplayText() throws jpos.JposException
      Specified by:
      getCapDisplayText in interface jpos.services.ScaleService13
      Throws:
      jpos.JposException
    • getCapFreezeValue

      public boolean getCapFreezeValue() throws jpos.JposException
      Specified by:
      getCapFreezeValue in interface jpos.services.ScaleService114
      Throws:
      jpos.JposException
    • getCapPriceCalculating

      public boolean getCapPriceCalculating() throws jpos.JposException
      Specified by:
      getCapPriceCalculating in interface jpos.services.ScaleService13
      Throws:
      jpos.JposException
    • getCapReadLiveWeightWithTare

      public boolean getCapReadLiveWeightWithTare() throws jpos.JposException
      Specified by:
      getCapReadLiveWeightWithTare in interface jpos.services.ScaleService114
      Throws:
      jpos.JposException
    • getCapSetPriceCalculationMode

      public boolean getCapSetPriceCalculationMode() throws jpos.JposException
      Specified by:
      getCapSetPriceCalculationMode in interface jpos.services.ScaleService114
      Throws:
      jpos.JposException
    • getCapSetUnitPriceWithWeightUnit

      public boolean getCapSetUnitPriceWithWeightUnit() throws jpos.JposException
      Specified by:
      getCapSetUnitPriceWithWeightUnit in interface jpos.services.ScaleService114
      Throws:
      jpos.JposException
    • getCapSpecialTare

      public boolean getCapSpecialTare() throws jpos.JposException
      Specified by:
      getCapSpecialTare in interface jpos.services.ScaleService114
      Throws:
      jpos.JposException
    • getCapStatusUpdate

      public boolean getCapStatusUpdate() throws jpos.JposException
      Specified by:
      getCapStatusUpdate in interface jpos.services.ScaleService19
      Throws:
      jpos.JposException
    • getCapTarePriority

      public boolean getCapTarePriority() throws jpos.JposException
      Specified by:
      getCapTarePriority in interface jpos.services.ScaleService114
      Throws:
      jpos.JposException
    • getCapTareWeight

      public boolean getCapTareWeight() throws jpos.JposException
      Specified by:
      getCapTareWeight in interface jpos.services.ScaleService13
      Throws:
      jpos.JposException
    • getCapZeroScale

      public boolean getCapZeroScale() throws jpos.JposException
      Specified by:
      getCapZeroScale in interface jpos.services.ScaleService13
      Throws:
      jpos.JposException
    • getMaxDisplayTextChars

      public int getMaxDisplayTextChars() throws jpos.JposException
      Specified by:
      getMaxDisplayTextChars in interface jpos.services.ScaleService13
      Throws:
      jpos.JposException
    • getMaximumWeight

      public int getMaximumWeight() throws jpos.JposException
      Specified by:
      getMaximumWeight in interface jpos.services.ScaleService12
      Throws:
      jpos.JposException
    • getMinimumWeight

      public int getMinimumWeight() throws jpos.JposException
      Specified by:
      getMinimumWeight in interface jpos.services.ScaleService114
      Throws:
      jpos.JposException
    • getSalesPrice

      public long getSalesPrice() throws jpos.JposException
      Specified by:
      getSalesPrice in interface jpos.services.ScaleService13
      Throws:
      jpos.JposException
    • getScaleLiveWeight

      public int getScaleLiveWeight() throws jpos.JposException
      Specified by:
      getScaleLiveWeight in interface jpos.services.ScaleService19
      Throws:
      jpos.JposException
    • getStatusNotify

      public int getStatusNotify() throws jpos.JposException
      Specified by:
      getStatusNotify in interface jpos.services.ScaleService19
      Throws:
      jpos.JposException
    • setStatusNotify

      public void setStatusNotify(int i) throws jpos.JposException
      Specified by:
      setStatusNotify in interface jpos.services.ScaleService19
      Throws:
      jpos.JposException
    • getTareWeight

      public int getTareWeight() throws jpos.JposException
      Specified by:
      getTareWeight in interface jpos.services.ScaleService13
      Throws:
      jpos.JposException
    • setTareWeight

      public void setTareWeight(int i) throws jpos.JposException
      Specified by:
      setTareWeight in interface jpos.services.ScaleService13
      Throws:
      jpos.JposException
    • getUnitPrice

      public long getUnitPrice() throws jpos.JposException
      Specified by:
      getUnitPrice in interface jpos.services.ScaleService13
      Throws:
      jpos.JposException
    • setUnitPrice

      public void setUnitPrice(long l) throws jpos.JposException
      Specified by:
      setUnitPrice in interface jpos.services.ScaleService13
      Throws:
      jpos.JposException
    • getWeightUnit

      public int getWeightUnit() throws jpos.JposException
      Specified by:
      getWeightUnit in interface jpos.services.ScaleService12
      Throws:
      jpos.JposException
    • getZeroValid

      public boolean getZeroValid() throws jpos.JposException
      Specified by:
      getZeroValid in interface jpos.services.ScaleService113
      Throws:
      jpos.JposException
    • setZeroValid

      public void setZeroValid(boolean b) throws jpos.JposException
      Specified by:
      setZeroValid in interface jpos.services.ScaleService113
      Throws:
      jpos.JposException
    • displayText

      public void displayText(String data) throws jpos.JposException
      Specified by:
      displayText in interface jpos.services.ScaleService13
      Throws:
      jpos.JposException
    • doPriceCalculating

      public void doPriceCalculating(int[] weightData, int[] tare, long[] unitPrice, long[] unitPriceX, int[] weightUnitX, int[] weightNumeratorX, int[] weightDenominatorX, long[] price, int timeout) throws jpos.JposException
      Specified by:
      doPriceCalculating in interface jpos.services.ScaleService114
      Throws:
      jpos.JposException
    • freezeValue

      public void freezeValue(int item, boolean freeze) throws jpos.JposException
      Specified by:
      freezeValue in interface jpos.services.ScaleService114
      Throws:
      jpos.JposException
    • readLiveWeightWithTare

      public void readLiveWeightWithTare(int[] weightData, int[] tare, int timeout) throws jpos.JposException
      Specified by:
      readLiveWeightWithTare in interface jpos.services.ScaleService114
      Throws:
      jpos.JposException
    • readWeight

      public void readWeight(int[] weightData, int timeout) throws jpos.JposException
      Specified by:
      readWeight in interface jpos.services.ScaleService12
      Throws:
      jpos.JposException
    • setPriceCalculationMode

      public void setPriceCalculationMode(int mode) throws jpos.JposException
      Specified by:
      setPriceCalculationMode in interface jpos.services.ScaleService114
      Throws:
      jpos.JposException
    • setSpecialTare

      public void setSpecialTare(int mode, int data) throws jpos.JposException
      Specified by:
      setSpecialTare in interface jpos.services.ScaleService114
      Throws:
      jpos.JposException
    • setTarePriority

      public void setTarePriority(int priority) throws jpos.JposException
      Same as set setTarePrioity. Will be called from setTarePrioity. Reason for this method is that setTarePrioity exists only due to a spelling error.
      Parameters:
      priority - Tare priority, see UPOS specification
      Throws:
      jpos.JposException - If an error occurs
    • setTarePrioity

      public void setTarePrioity(int priority) throws jpos.JposException
      Specified by:
      setTarePrioity in interface jpos.services.ScaleService114
      Throws:
      jpos.JposException
    • setUnitPriceWithWeightUnit

      public void setUnitPriceWithWeightUnit(long unitPrice, int weightUnit, int weightNumerator, int weightDenominator) throws jpos.JposException
      Specified by:
      setUnitPriceWithWeightUnit in interface jpos.services.ScaleService114
      Throws:
      jpos.JposException
    • zeroScale

      public void zeroScale() throws jpos.JposException
      Specified by:
      zeroScale in interface jpos.services.ScaleService13
      Throws:
      jpos.JposException