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 TypeFieldDescriptionlongPrice set of readWeight or DoPriceCalculation.intTara updated of ReadLifeWeightWithTare and DoPriceCalculation or 0 if CapTareWeight is false.longUnit price updated by DoPriceCalculation or 0 if not supportedFields inherited from class jpos.events.DataEvent
statusFields inherited from class jpos.events.JposEvent
sequenceNumberFields 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 TypeMethodDescriptionvoidSets the data properties stored within the JposDataEvent into the JposCommonProperties object.Methods inherited from class de.gmxhome.conrad.jpos.jpos_base.JposDataEvent
getPropertySet, toLogStringMethods inherited from class jpos.events.DataEvent
getStatusMethods inherited from class jpos.events.JposEvent
getSequenceNumber, getWhen, incrSequenceNumber, updateSequenceNumberMethods 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:JposDataEventSets the data properties stored within the JposDataEvent into the JposCommonProperties object. The corresponding properties must be defined within derived classes.- Overrides:
setDataPropertiesin classJposDataEvent
-