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

    Constructors
    Constructor
    Description
    CartridgeAgitator(String name, CartridgeAgitatorSubNode subNode, boolean homeSensor)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    com.tccc.kos.commons.core.service.handle.Handle
     
    com.tccc.kos.commons.util.ListenerList<CartridgeAgitatorListener>
     
     
    boolean
    Return true if the agitator is properly homed.
    boolean
     
    com.tccc.kos.commons.util.concurrent.future.FutureWork
    Perform any pending agitation immediately, ignoring door state or block state.
    void
    onConfigChanged(com.tccc.kos.commons.core.service.config.BeanChanges changes)
     
    void
    onContainerInsertStart(com.tccc.kos.ext.dispense.Container container, com.tccc.kos.ext.dispense.Holder[] holders)
     
    void
    onContainerRemove(com.tccc.kos.ext.dispense.Container container, com.tccc.kos.ext.dispense.Holder[] holders)
     
    void
    onPumpLock(com.tccc.kos.ext.dispense.service.nozzle.NozzlePipeline pipeline, com.tccc.kos.ext.dispense.Pump<?> pump)
     
    void
    onPumpUnlock(com.tccc.kos.ext.dispense.service.nozzle.NozzlePipeline pipeline, com.tccc.kos.ext.dispense.Pump<?> pump)
     
    void
    pause(Object reason, boolean home)
    Pause the agitator for the specified reason.
    void
    resume(Object reason)
    Resume the agitator by removing the pause reason.
    void
     
    com.tccc.kos.commons.util.concurrent.future.FutureWork
    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.
    com.tccc.kos.commons.util.concurrent.future.FutureWork
    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

  • Method Details

    • pause

      public void pause(Object reason, boolean home)
      Pause the agitator for the specified reason.
      Parameters:
      reason - the pause reason
      home - if true, home when pausing
    • resume

      public void resume(Object reason)
      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 setting
      duration - 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 agitator
      wait - 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:
      onConfigChanged in interface com.tccc.kos.commons.core.service.config.ConfigAware<CartridgeAgitatorConfig>
    • getState

      Specified by:
      getState in interface com.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:
      onPumpLock in interface com.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:
      onPumpUnlock in interface com.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:
      onContainerInsertStart in interface com.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:
      onContainerRemove in interface com.tccc.kos.ext.dispense.service.insertion.InsertionHolderListener
    • getConfig

      public CartridgeAgitatorConfig getConfig()
      Specified by:
      getConfig in interface com.tccc.kos.commons.core.service.config.ConfigAware<CartridgeAgitatorConfig>
    • setConfig

      public void setConfig(CartridgeAgitatorConfig config)
      Specified by:
      setConfig in interface com.tccc.kos.commons.core.service.config.ConfigAware<CartridgeAgitatorConfig>
    • getHandle

      public com.tccc.kos.commons.core.service.handle.Handle getHandle()
      Specified by:
      getHandle in interface com.tccc.kos.commons.core.service.handle.HandleAware
    • getListeners

      public com.tccc.kos.commons.util.ListenerList<CartridgeAgitatorListener> getListeners()
    • isHomeSensor

      public boolean isHomeSensor()