Class ReadWeight

All Implemented Interfaces:
Runnable
Direct Known Subclasses:
ReadLiveWeightWithTare

public class ReadWeight extends JposInputRequest
Input request executor for Scale method ReadWeight.
  • Field Details

    • WeightData

      public int WeightData
      Weight from scale after successful invocation.
    • SalesPrice

      public long SalesPrice
      Value for scale property SalesPrice, see UPOS specification. Sales price from scale.
  • Constructor Details

    • ReadWeight

      public ReadWeight(JposCommonProperties props, int weightData, int timeout)
      Constructor. Stores given parameters for later use.
      Parameters:
      props - Property set of device service.
      weightData - Preset for returned value for the weight measured by the scale.
      timeout - The number of milliseconds to wait for a settled weight before failing the method.
  • Method Details

    • getTimeout

      public int getTimeout()
      Scale method ReadWeight parameter timeout, see UPOS specification.
      Returns:
      timeout for operation. FOREVER for unlimited wait.
    • invoke

      public void invoke() throws jpos.JposException
      Description copied from class: JposOutputRequest
      Invokes the command. Must be implemented in derived class. Calls finished() to wake up potentially waiting threads.
      Overrides:
      invoke in class JposOutputRequest
      Throws:
      jpos.JposException - JposException thrown by the command to be executed.