Package edu.tufts.hrilab.mtracs
Class MockKolverComponent
java.lang.Object
edu.tufts.hrilab.diarc.DiarcComponent
edu.tufts.hrilab.mtracs.MockKolverComponent
- All Implemented Interfaces:
KolverComponentInterface
-
Field Summary
FieldsFields inherited from class edu.tufts.hrilab.diarc.DiarcComponent
executionLoopCycleTime, log, shouldRunExecutionLoop -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanconfigureScrewdriverParam(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.booleanconfigureScrewdriverProgram(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.intintprotected voidinit()Perform any component initialization.booleanClears the current screwing status of the Kolver controller.booleanrunScrewdriverProgram(int programID) Starts a program on the Kolver screwdriver controller over MODBUS.booleanswitchProgram(int id) Switches the currently queued program on the Kolver controller over MODBUSMethods inherited from class edu.tufts.hrilab.diarc.DiarcComponent
additionalUsageInfo, createInstance, createInstance, createInstance, createInstance, executionLoop, getMyGroupConstraints, getMyGroups, getMyService, getMyServices, main, parseArgs, shutdown, shutdownComponent
-
Field Details
-
symbolIdMap
-
idCounter
-
-
Constructor Details
-
MockKolverComponent
public MockKolverComponent()
-
-
Method Details
-
init
protected void init()Description copied from class:DiarcComponentPerform 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:
initin classDiarcComponent
-
incrementId
public int incrementId()- Specified by:
incrementIdin interfaceKolverComponentInterface
-
configureScrewdriverParam
Sends the given information about one param in a screwdriving rundown program, and writes it to the Kolver controller over MODBUS.- Specified by:
configureScrewdriverParamin interfaceKolverComponentInterface- Returns:
- True if the screwdriver program was successfully configured, false if otherwise.
-
getScrewdriverProgramIdFromSymbol
- Specified by:
getScrewdriverProgramIdFromSymbolin interfaceKolverComponentInterface
-
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:
configureScrewdriverProgramin interfaceKolverComponentInterface- 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:
runScrewdriverProgramin interfaceKolverComponentInterface- 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:
switchProgramin interfaceKolverComponentInterface- 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:
resetScrewdriverin interfaceKolverComponentInterface- Returns:
- True if the reset succeeded, false if otherwise.
-