Class NozzleMetricsTotalVolumeAction
java.lang.Object
com.tccc.kos.ext.dispense.service.nozzle.metrics.NozzleMetricsAction
com.tccc.kos.ext.dispense.service.nozzle.metrics.NozzleMetricsTotalVolumeAction
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 Summary
ConstructorsConstructorDescriptionNozzleMetricsTotalVolumeAction
(double volume) Create a new action that will trigger a callback at the specified volume. -
Method Summary
Modifier and TypeMethodDescriptiondouble
Get the trigger volume.abstract void
reachedTotalVolume
(NozzleMetrics metrics) Called when the volume threshold is reached.void
setVolume
(double volume) Set the trigger volume.
-
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
Called when the volume threshold is reached.- Parameters:
metrics
- the metrics
-