Class ScaleDataEvent

java.lang.Object
java.util.EventObject
jpos.events.JposEvent
jpos.events.DataEvent
de.gmxhome.conrad.jpos.jpos_base.JposDataEvent
de.gmxhome.conrad.jpos.jpos_base.scale.ScaleDataEvent
All Implemented Interfaces:
Serializable

public class ScaleDataEvent extends JposDataEvent
Data event implementation for Scale devices.
See Also:
Serialized Form
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    long
    Price set of readWeight or DoPriceCalculation.
    int
    Tara updated of ReadLifeWeightWithTare and DoPriceCalculation or 0 if CapTareWeight is false.
    long
    Unit price updated by DoPriceCalculation or 0 if not supported

    Fields inherited from class jpos.events.DataEvent

    status

    Fields inherited from class jpos.events.JposEvent

    sequenceNumber

    Fields inherited from class java.util.EventObject

    source
  • Constructor Summary

    Constructors
    Constructor
    Description
    ScaleDataEvent​(JposBase source, int weight, int tara, long price, long unitprice)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Sets the data properties stored within the JposDataEvent into the JposCommonProperties object.

    Methods inherited from class de.gmxhome.conrad.jpos.jpos_base.JposDataEvent

    getPropertySet, toLogString

    Methods inherited from class jpos.events.DataEvent

    getStatus

    Methods inherited from class jpos.events.JposEvent

    getSequenceNumber, getWhen, incrSequenceNumber, updateSequenceNumber

    Methods inherited from class java.util.EventObject

    getSource, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • UnitPrice

      public final long UnitPrice
      Unit price updated by DoPriceCalculation or 0 if not supported
    • Price

      public final long Price
      Price set of readWeight or DoPriceCalculation.
    • TareWeight

      public final int TareWeight
      Tara updated of ReadLifeWeightWithTare and DoPriceCalculation or 0 if CapTareWeight is false.
  • Constructor Details

    • ScaleDataEvent

      public ScaleDataEvent(JposBase source, int weight, int tara, long price, long unitprice)
      Constructor. Parameters passed to base class unchanged.
      Parameters:
      source - Source, for services implemented with this framework, the (scale.)ScaleService object.
      weight - Status, in case of Scale the weight, see UPOS specification.
      tara - Tare weight used during last scale operation. In negative, properties ScaleLifeWeight, TareWeight and UnitPrice will not be updated.
      price - Computed price of last scale operation.
      unitprice - Unit price used during last scale operation. If negative, property UnitPrice will not be updated.
  • Method Details

    • setDataProperties

      public void setDataProperties()
      Description copied from class: JposDataEvent
      Sets the data properties stored within the JposDataEvent into the JposCommonProperties object. The corresponding properties must be defined within derived classes.
      Overrides:
      setDataProperties in class JposDataEvent