Class CartridgeAgitator
java.lang.Object
com.tccc.kos.ext.freestyle.service.cartridgeagitation.CartridgeAgitator
- All Implemented Interfaces:
com.tccc.kos.commons.core.service.config.ConfigAware<CartridgeAgitatorConfig>,com.tccc.kos.commons.core.service.handle.HandleAware,com.tccc.kos.commons.core.service.state.StateAware<CartridgeAgitatorSubNode.CartridgeAgitatorState>,com.tccc.kos.ext.dispense.service.insertion.InsertionHolderListener,com.tccc.kos.ext.dispense.service.insertion.InsertionListener,com.tccc.kos.ext.dispense.service.pumpevent.PumpListener,com.tccc.kos.ext.dispense.service.pumpevent.PumpLockListener
@ApiController(base="@path",
title="Cartridge agitator",
desc="Services for a particular cartridge agitator.")
public class CartridgeAgitator
extends Object
implements com.tccc.kos.commons.core.service.config.ConfigAware<CartridgeAgitatorConfig>, com.tccc.kos.commons.core.service.state.StateAware<CartridgeAgitatorSubNode.CartridgeAgitatorState>, com.tccc.kos.ext.dispense.service.pumpevent.PumpLockListener, com.tccc.kos.ext.dispense.service.insertion.InsertionHolderListener
Agitator for a cartridge shelf or tower.
- Version:
- 2024-09-30
-
Constructor Summary
ConstructorsConstructorDescriptionCartridgeAgitator(String name, CartridgeAgitatorSubNode subNode, boolean homeSensor) -
Method Summary
Modifier and TypeMethodDescriptioncom.tccc.kos.commons.core.service.handle.Handlecom.tccc.kos.commons.util.ListenerList<CartridgeAgitatorListener>getState()booleanisHomed()Return true if the agitator is properly homed.booleancom.tccc.kos.commons.util.concurrent.future.FutureWorkPerform any pending agitation immediately, ignoring door state or block state.voidonConfigChanged(com.tccc.kos.commons.core.service.config.BeanChanges changes) voidonContainerInsertStart(com.tccc.kos.ext.dispense.Container container, com.tccc.kos.ext.dispense.Holder[] holders) voidonContainerRemove(com.tccc.kos.ext.dispense.Container container, com.tccc.kos.ext.dispense.Holder[] holders) voidonPumpLock(com.tccc.kos.ext.dispense.service.nozzle.NozzlePipeline pipeline, com.tccc.kos.ext.dispense.Pump<?> pump) voidonPumpUnlock(com.tccc.kos.ext.dispense.service.nozzle.NozzlePipeline pipeline, com.tccc.kos.ext.dispense.Pump<?> pump) voidPause the agitator for the specified reason.voidResume the agitator by removing the pause reason.voidsetConfig(CartridgeAgitatorConfig config) com.tccc.kos.commons.util.concurrent.future.FutureWorkstartAgitation(int rpm, int duration) Run agitation for the specified for the specified duration.voidstopAgitation(boolean home) Stop any running agitation without waiting for it to stop.voidstopAgitation(boolean home, boolean wait) Stop any running agitation.com.tccc.kos.commons.util.concurrent.future.FutureWorkPerform a test agitation.voidWait until the agitator is stopped using internal timeout to make sure this doesn't block indefinitely.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.tccc.kos.commons.core.service.config.ConfigAware
onConfigSetMethods inherited from interface com.tccc.kos.commons.core.service.handle.HandleAware
addHandleChild, getName, getPath
-
Constructor Details
-
CartridgeAgitator
-
-
Method Details
-
pause
Pause the agitator for the specified reason.- Parameters:
reason- the pause reasonhome- if true, home when pausing
-
resume
Resume the agitator by removing the pause reason. The callback will be used to actually trigger the start. -
manualStartPendingAgitation
public com.tccc.kos.commons.util.concurrent.future.FutureWork manualStartPendingAgitation()Perform any pending agitation immediately, ignoring door state or block state. -
startAgitation
public com.tccc.kos.commons.util.concurrent.future.FutureWork startAgitation(int rpm, int duration) Run agitation for the specified for the specified duration.- Parameters:
rpm- the rpm settingduration- the duration in seconds
-
stopAgitation
public void stopAgitation(boolean home) Stop any running agitation without waiting for it to stop.- Parameters:
home- if true, home the agitator
-
stopAgitation
public void stopAgitation(boolean home, boolean wait) Stop any running agitation.- Parameters:
home- if true, home the agitatorwait- if true, wait for agitation to actually stop
-
isHomed
public boolean isHomed()Return true if the agitator is properly homed.- Returns:
- true if properly homed
-
waitForStop
public void waitForStop()Wait until the agitator is stopped using internal timeout to make sure this doesn't block indefinitely. -
testAgitation
@ApiEndpoint(POST="/test", desc="Run an agitation test.") public com.tccc.kos.commons.util.concurrent.future.FutureWork testAgitation()Perform a test agitation. -
onConfigChanged
public void onConfigChanged(com.tccc.kos.commons.core.service.config.BeanChanges changes) - Specified by:
onConfigChangedin interfacecom.tccc.kos.commons.core.service.config.ConfigAware<CartridgeAgitatorConfig>
-
getState
- Specified by:
getStatein interfacecom.tccc.kos.commons.core.service.state.StateAware<CartridgeAgitatorSubNode.CartridgeAgitatorState>
-
onPumpLock
public void onPumpLock(com.tccc.kos.ext.dispense.service.nozzle.NozzlePipeline pipeline, com.tccc.kos.ext.dispense.Pump<?> pump) - Specified by:
onPumpLockin interfacecom.tccc.kos.ext.dispense.service.pumpevent.PumpLockListener
-
onPumpUnlock
public void onPumpUnlock(com.tccc.kos.ext.dispense.service.nozzle.NozzlePipeline pipeline, com.tccc.kos.ext.dispense.Pump<?> pump) - Specified by:
onPumpUnlockin interfacecom.tccc.kos.ext.dispense.service.pumpevent.PumpLockListener
-
onContainerInsertStart
public void onContainerInsertStart(com.tccc.kos.ext.dispense.Container container, com.tccc.kos.ext.dispense.Holder[] holders) - Specified by:
onContainerInsertStartin interfacecom.tccc.kos.ext.dispense.service.insertion.InsertionHolderListener
-
onContainerRemove
public void onContainerRemove(com.tccc.kos.ext.dispense.Container container, com.tccc.kos.ext.dispense.Holder[] holders) - Specified by:
onContainerRemovein interfacecom.tccc.kos.ext.dispense.service.insertion.InsertionHolderListener
-
getConfig
- Specified by:
getConfigin interfacecom.tccc.kos.commons.core.service.config.ConfigAware<CartridgeAgitatorConfig>
-
setConfig
- Specified by:
setConfigin interfacecom.tccc.kos.commons.core.service.config.ConfigAware<CartridgeAgitatorConfig>
-
getHandle
public com.tccc.kos.commons.core.service.handle.Handle getHandle()- Specified by:
getHandlein interfacecom.tccc.kos.commons.core.service.handle.HandleAware
-
getListeners
-
isHomeSensor
public boolean isHomeSensor()
-