Class VPump
java.lang.Object
com.tccc.kos.ext.dispense.Pump<T>
com.tccc.kos.ext.freestyle.FreestylePump<T>
com.tccc.kos.ext.freestyle.hardware.can.subnode.pump.AbstractCANPump<CANPumpConfig>
com.tccc.kos.ext.freestyle.hardware.can.subnode.pump.VPump
- All Implemented Interfaces:
com.tccc.kos.commons.core.service.config.ConfigAware<CANPumpConfig>
,com.tccc.kos.commons.core.service.handle.HandleAware
,com.tccc.kos.commons.util.Abortable
,com.tccc.kos.commons.util.Cancelable
,com.tccc.kos.commons.util.Terminable
,com.tccc.kos.ext.dispense.PourAvailability
Represents a virtual DEKA pump node. This is used as a bridge between
the DEKA control algorithm and a real pump or valve.
- Version:
- Mar-12-18
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.tccc.kos.ext.dispense.PourAvailability
com.tccc.kos.ext.dispense.PourAvailability.Type
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
bind
(VPumpBinding binding) Bind a physical device to this virtual pump.double
Return the ratio of the overall pour assigned to this pump.double
Return the captured requested rate.getType()
boolean
void
setCurrentRate
(double rate) Tell the vpump the current rate of pour.void
setFixedRate
(boolean fixedRate) Set whether this vpump reports itself as a fixed rate or variable rate pump.Methods inherited from class com.tccc.kos.ext.freestyle.hardware.can.subnode.pump.AbstractCANPump
isAborted, toString, tpour, vpour
Methods inherited from class com.tccc.kos.ext.freestyle.FreestylePump
setFixedRatePump
Methods inherited from class com.tccc.kos.ext.dispense.Pump
abort, cancel, getBeverageAvailabilityLock, getBeverageLocks, getBoard, getCategory, getConfig, getEffectiveIngredientId, getHandle, getHolder, getIngredientAvailabilityLock, getIngredientId, getIngredientLocks, getIntent, getLastChangedTime, getLastStartTime, getNominalRate, getNozzle, getPour, getPrevIngredientId, getUnavailableReasons, isBeveragePour, isIngredientPour, isInserted, postStop, pour, preStart, record, recordRate, setConfig, setLastStartTime, setPour, setPrevIngredientId, setUnavailableReasons, sinceLastStarted
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.tccc.kos.commons.core.service.config.ConfigAware
onConfigChanged, onConfigSet
Methods inherited from interface com.tccc.kos.commons.core.service.handle.HandleAware
addHandleChild, getName, getPath
Methods inherited from interface com.tccc.kos.ext.dispense.PourAvailability
getAvailbilityLock
-
Field Details
-
TYPE
- See Also:
-
-
Constructor Details
-
VPump
Create a pump with the specified CANOpen subNodeId.- Parameters:
board
- the board the sub-node is associated withinfo
- info about the pumpsubNodeId
- the CAN bus sub-node for this pump
-
-
Method Details
-
getType
- Specified by:
getType
in classcom.tccc.kos.ext.dispense.Pump<CANPumpConfig>
-
bind
Bind a physical device to this virtual pump.- Parameters:
binding
- the binding to the physical device
-
setCurrentRate
Tell the vpump the current rate of pour.- Parameters:
rate
- the rate in ml/sec- Throws:
IOException
-
setFixedRate
public void setFixedRate(boolean fixedRate) Set whether this vpump reports itself as a fixed rate or variable rate pump. If this is a valve, this should report as fixed rate for example.- Parameters:
fixedRate
- true if fixed rate, false if variable
-
getPourRatio
Return the ratio of the overall pour assigned to this pump. This is returned as a value in the range of 0 to 1.0. For a recipe pour this will be the ratio defined in the recipe. For a non-recipe pour, this will always return 1.0.- Returns:
- assigned ratio of the pour
- Throws:
IOException
-
isFixedRatePump
public boolean isFixedRatePump()- Overrides:
isFixedRatePump
in classFreestylePump<CANPumpConfig>
-
getRequestedRate
public double getRequestedRate()Return the captured requested rate.
-