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 TypeMethodDescriptionboolean
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.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.int
int
protected void
init()
Perform any component initialization.boolean
Clears the current screwing status of the Kolver controller.boolean
runScrewdriverProgram
(int programID) Starts a program on the Kolver screwdriver controller over MODBUS.boolean
switchProgram
(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: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 classDiarcComponent
-
incrementId
public int incrementId()- Specified by:
incrementId
in 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:
configureScrewdriverParam
in interfaceKolverComponentInterface
- Returns:
- True if the screwdriver program was successfully configured, false if otherwise.
-
getScrewdriverProgramIdFromSymbol
- Specified by:
getScrewdriverProgramIdFromSymbol
in 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:
configureScrewdriverProgram
in 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:
runScrewdriverProgram
in 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:
switchProgram
in 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:
resetScrewdriver
in interfaceKolverComponentInterface
- Returns:
- True if the reset succeeded, false if otherwise.
-