Class MockKolverComponent

java.lang.Object
edu.tufts.hrilab.diarc.DiarcComponent
edu.tufts.hrilab.mtracs.MockKolverComponent
All Implemented Interfaces:
KolverComponentInterface

public class MockKolverComponent extends DiarcComponent implements KolverComponentInterface
  • Field Details

  • Constructor Details

    • MockKolverComponent

      public MockKolverComponent()
  • Method Details

    • init

      protected void init()
      Description copied from class: DiarcComponent
      Perform any component initialization. This should not be used for setting local fields to default values as was the case in DIARC. This method is called after the constructor, and after parseArgs. Setting default values should be done in field declaration or in the constructor.
      Overrides:
      init in class DiarcComponent
    • incrementId

      public int incrementId()
      Specified by:
      incrementId in interface KolverComponentInterface
    • configureScrewdriverParam

      public boolean configureScrewdriverParam(Term screwType, Symbol val)
      Sends the given information about one param in a screwdriving rundown program, and writes it to the Kolver controller over MODBUS.
      Specified by:
      configureScrewdriverParam in interface KolverComponentInterface
      Returns:
      True if the screwdriver program was successfully configured, false if otherwise.
    • getScrewdriverProgramIdFromSymbol

      public int getScrewdriverProgramIdFromSymbol(Symbol s)
      Specified by:
      getScrewdriverProgramIdFromSymbol in interface KolverComponentInterface
    • configureScrewdriverProgram

      public boolean configureScrewdriverProgram(Symbol screwType, Symbol torqueTarget, Symbol torqueMax, Symbol angleMax)
      Sends the given information about a screwdriving rundown program, and writes it to the Kolver controller over MODBUS.
      Specified by:
      configureScrewdriverProgram in interface KolverComponentInterface
      Returns:
      True if the screwdriver program was successfully configured, false if otherwise.
    • runScrewdriverProgram

      public boolean runScrewdriverProgram(int programID)
      Starts a program on the Kolver screwdriver controller over MODBUS.
      Specified by:
      runScrewdriverProgram in interface KolverComponentInterface
      Returns:
      True if the screwdriver program succeeded, false if otherwise.
    • switchProgram

      public boolean switchProgram(int id)
      Switches the currently queued program on the Kolver controller over MODBUS
      Specified by:
      switchProgram in interface KolverComponentInterface
      Parameters:
      id - The program id to switch to as an int.
      Returns:
      True if the program switch succeeded, false if otherwise.
    • resetScrewdriver

      public boolean resetScrewdriver()
      Clears the current screwing status of the Kolver controller. Used to ensure results don't bleed over between rundowns.
      Specified by:
      resetScrewdriver in interface KolverComponentInterface
      Returns:
      True if the reset succeeded, false if otherwise.