Class MicroCalibrationService

java.lang.Object
com.tccc.kos.commons.util.ready.ReadyBean
com.tccc.kos.commons.core.service.AbstractService
com.tccc.kos.ext.freestyle.service.micro.calibration.MicroCalibrationService
All Implemented Interfaces:
com.tccc.kos.commons.core.context.CtxEventListener, com.tccc.kos.commons.core.service.handle.ContextHandleAware, com.tccc.kos.commons.core.service.handle.HandleAware, com.tccc.kos.commons.util.ready.Ready, com.tccc.kos.commons.util.ready.ReadyListener

public class MicroCalibrationService extends com.tccc.kos.commons.core.service.AbstractService
Service for managing micro pump calibration data.
Version:
2024-10-09
  • Method Summary

    Modifier and Type
    Method
    Description
    getBoardReport(com.tccc.kos.core.service.hardware.Board board)
    Return calibration report for a board.
    Return calibration report for the specified pump.
    void
    setPumpCal(MicroPump pump, double val)
     
    void
    setPumpCalBaseline(MicroPump pump, double val)
    Set the baseline calibration value for the pump.
    void
    setPumpCalRunning(MicroPump pump, double val)
     
    void
    Set the calibration value for the specified pump using the code on the pump.
    void
    By default the service uses CriticalData to store calibration data so that it survives across board swaps.

    Methods inherited from class com.tccc.kos.commons.core.service.AbstractService

    getHandle, getHandlePrefix

    Methods inherited from class com.tccc.kos.commons.util.ready.ReadyBean

    getReady, onBeanReady, onDependenciesReady

    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.context.CtxEventListener

    onCtxAutowiringCompleted, onCtxDestroyed, onCtxPhaseCompleted

    Methods inherited from interface com.tccc.kos.commons.core.service.handle.HandleAware

    addHandleChild, getName, getPath

    Methods inherited from interface com.tccc.kos.commons.util.ready.Ready

    isReady, setReady

    Methods inherited from interface com.tccc.kos.commons.util.ready.ReadyListener

    onDependenciesGroupReady
  • Method Details

    • setStorageMgr

      public void setStorageMgr(MicroCalibrationStorageMgr storageMgr)
      By default the service uses CriticalData to store calibration data so that it survives across board swaps. However, if critical data is not available, the storage manager can be replaced to use some other form of persistence for micro pump calibration data. This must be called from the system app before the assembly is installed to ensure that the previous storage manager isn't used when hardware first links.
    • setPumpCalWithCode

      public void setPumpCalWithCode(MicroPump pump, String code)
      Set the calibration value for the specified pump using the code on the pump. This will set both the baseline and running calibration value for the pump.
      Parameters:
      pump - the pump to set
      code - the calibration code from the pump sticker
    • setPumpCalBaseline

      public void setPumpCalBaseline(MicroPump pump, double val) throws IOException
      Set the baseline calibration value for the pump.
      Throws:
      IOException
    • setPumpCalRunning

      public void setPumpCalRunning(MicroPump pump, double val) throws IOException
      Throws:
      IOException
    • setPumpCal

      public void setPumpCal(MicroPump pump, double val)
    • getBoardReport

      public MicroCalibrationReport getBoardReport(com.tccc.kos.core.service.hardware.Board board)
      Return calibration report for a board.
    • getPumpReport

      public MicroCalibrationReport.PumpReport getPumpReport(MicroPump pump)
      Return calibration report for the specified pump.