Class CartridgeAgitator
java.lang.Object
com.tccc.kos.ext.freestyle.service.cartridgeagitation.CartridgeAgitator
- All Implemented Interfaces:
ConfigAware<CartridgeAgitatorConfig>
,HandleAware
,StateAware<CartridgeAgitatorSubNode.CartridgeAgitatorState>
,InsertionHolderListener
,InsertionListener
,PumpListener
,PumpLockListener
@ApiController(base="@path",
title="Cartridge agitator",
desc="Services for a particular cartridge agitator.")
public class CartridgeAgitator
extends Object
implements ConfigAware<CartridgeAgitatorConfig>, StateAware<CartridgeAgitatorSubNode.CartridgeAgitatorState>, PumpLockListener, 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 TypeMethodDescriptiongetState()
boolean
isHomed()
Return true if the agitator is properly homed.boolean
Perform any pending agitation immediately, ignoring door state or block state.void
onConfigChanged
(BeanChanges changes) void
onContainerInsertStart
(Container container, Holder[] holders) void
onContainerRemove
(Container container, Holder[] holders) void
onPumpLock
(NozzlePipeline pipeline, Pump<?> pump) void
onPumpUnlock
(NozzlePipeline pipeline, Pump<?> pump) void
Pause the agitator for the specified reason.void
Resume the agitator by removing the pause reason.void
setConfig
(CartridgeAgitatorConfig config) startAgitation
(int rpm, int duration) Run agitation for the specified for the specified duration.void
stopAgitation
(boolean home) Stop any running agitation without waiting for it to stop.void
stopAgitation
(boolean home, boolean wait) Stop any running agitation.Perform a test agitation.void
Wait 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, wait
Methods inherited from interface com.tccc.kos.commons.core.service.config.ConfigAware
onConfigSet
Methods 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
Perform any pending agitation immediately, ignoring door state or block state. -
startAgitation
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
Perform a test agitation. -
onConfigChanged
- Specified by:
onConfigChanged
in interfaceConfigAware<CartridgeAgitatorConfig>
-
getState
- Specified by:
getState
in interfaceStateAware<CartridgeAgitatorSubNode.CartridgeAgitatorState>
-
onPumpLock
- Specified by:
onPumpLock
in interfacePumpLockListener
-
onPumpUnlock
- Specified by:
onPumpUnlock
in interfacePumpLockListener
-
onContainerInsertStart
- Specified by:
onContainerInsertStart
in interfaceInsertionHolderListener
-
onContainerRemove
- Specified by:
onContainerRemove
in interfaceInsertionHolderListener
-
getConfig
- Specified by:
getConfig
in interfaceConfigAware<CartridgeAgitatorConfig>
-
setConfig
- Specified by:
setConfig
in interfaceConfigAware<CartridgeAgitatorConfig>
-
getHandle
- Specified by:
getHandle
in interfaceHandleAware
-
getListeners
-
isHomeSensor
public boolean isHomeSensor()
-