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
Data event implementation for Scale devices.
- See Also:
- Serialized Form
-
Field Summary
FieldsModifier and TypeFieldDescriptionlong
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 supportedFields 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
ConstructorsConstructorDescriptionScaleDataEvent(JposBase source, int weight, int tara, long price, long unitprice)
Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
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
-
Field Details
-
UnitPrice
public final long UnitPriceUnit price updated by DoPriceCalculation or 0 if not supported -
Price
public final long PricePrice set of readWeight or DoPriceCalculation. -
TareWeight
public final int TareWeightTara updated of ReadLifeWeightWithTare and DoPriceCalculation or 0 if CapTareWeight is false.
-
-
Constructor Details
-
ScaleDataEvent
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 classJposDataEvent
-