java.lang.Object
com.tccc.kos.core.service.hardware.Board
com.tccc.kos.ext.dispense.PumpBoard
com.tccc.kos.ext.freestyle.hardware.can.board.CANBoard<T>
All Implemented Interfaces:
ConfigAware<T>, HandleAware, AssemblyAware, BoardIdentifier, PumpOpLimitAware, PourAvailability
Direct Known Subclasses:
AbstractMicroBoard, FlexMacroBoard, KSMBoard, MacKSMBoard, MacroBoard, RCGPBoard

public class CANBoard<T extends CANBoardConfig> extends PumpBoard implements ConfigAware<T>
This represents a single board on the CAN bus. The various CAN related endpoints use these beans to map hardware addresses to these logical boards which enables us to talk to them an bind pumps to logical positions on these boards.
Version:
May-18-17
  • Field Details

    • CRITICAL_DATA_EEPROM_ADDR

      public static final int CRITICAL_DATA_EEPROM_ADDR
      See Also:
  • Constructor Details

    • CANBoard

      public CANBoard()
      Dummy constructor for codeGen
    • CANBoard

      public CANBoard(Assembly assembly, String name, String type, int instanceId, PumpInfoResolver resolver)
      Create a new board with the specified type which is used to match the board bean with the physical board found during CAN bus enumeration and discovery.
      Parameters:
      assembly - assembly the board is part of
      name - name of the board
      type - the board type
      instanceId - used to identify a given board in multi-board configs
      resolver - resolve pump info
  • Method Details

    • resolve

      public PumpInfo resolve(PumpInfo info)
      Resolve pump info.
    • getType

      public String getType()
      Specified by:
      getType in interface BoardIdentifier
    • getNodeId

      public int getNodeId()
      Get the CANOpen nodeId of this board.
      Returns:
      the nodeId for this board
    • onLink

      public void onLink(HardwareLink link)
      Overrides:
      onLink in class Board
    • onUnlink

      public void onUnlink(HardwareLink link)
      Overrides:
      onUnlink in class Board
    • addListener

      public void addListener(CANBoardActivateListener listener)
      Add an activation listener to the list.
      Parameters:
      listener - the listener to add
    • EnableFoldbackRateErr

      public void EnableFoldbackRateErr(boolean foldBack_enable, boolean rateError_enable, double minConcentration) throws IOException
      Enable/Disable Fold-back/Rate Error
      Parameters:
      foldBack_enable - True: foldback enabled False: foldback disabled
      rateError_enable - True: rate err enabled False: rate err disabled
      minConcentration - Minimum concentration (Ex.0.332)
      Throws:
      IOException
    • configureZone

      public void configureZone() throws IOException
      Fold-back/Rate Error Zone Setting
      Throws:
      IOException
    • configureFoldbackRateErr

      public void configureFoldbackRateErr() throws IOException
      Fold-back/Rate Error threshold for each zone
      Throws:
      IOException
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getTroubleService

      public TroubleService getTroubleService()
    • getInstanceId

      public String getInstanceId()
      Specified by:
      getInstanceId in interface BoardIdentifier
    • getConfig

      public T getConfig()
      Specified by:
      getConfig in interface ConfigAware<T extends CANBoardConfig>
    • setConfig

      public void setConfig(T config)
      Specified by:
      setConfig in interface ConfigAware<T extends CANBoardConfig>
    • getDiagnosticsLock

      public Object getDiagnosticsLock()
    • getCriticalDataReady

      public ReadyIndicator getCriticalDataReady()
    • getSourceWeight

      public double getSourceWeight()
    • setSourceWeight

      public void setSourceWeight(double sourceWeight)