Class NozzleMetricsTotalVolumeAction

java.lang.Object
com.tccc.kos.ext.dispense.service.nozzle.metrics.NozzleMetricsAction
com.tccc.kos.ext.dispense.service.nozzle.metrics.NozzleMetricsTotalVolumeAction

public abstract class NozzleMetricsTotalVolumeAction extends NozzleMetricsAction
Action that triggers a single callback when the metrics total reaches the specified volume. Calling reset() or setVolume() will cause the triggered flag to be cleared and allow the callback to be triggered again. As these calls don't change the total volume in the associated metrics object, the next pour update will trigger the callback. Resetting the metric will clear all the pour data as well as trigger all actions to be reset.
Version:
2024-01-29
  • Constructor Details

    • NozzleMetricsTotalVolumeAction

      public NozzleMetricsTotalVolumeAction(double volume)
      Create a new action that will trigger a callback at the specified volume.
      Parameters:
      volume - the total volume to trigger at
  • Method Details

    • getVolume

      public double getVolume()
      Get the trigger volume.
      Returns:
      the trigger volume
    • setVolume

      public void setVolume(double volume)
      Set the trigger volume. This will reset the trigger if it has already triggered.
      Parameters:
      volume - the new trigger volume
    • reachedTotalVolume

      public abstract void reachedTotalVolume(NozzleMetrics metrics)
      Called when the volume threshold is reached.
      Parameters:
      metrics - the metrics