Package edu.tufts.hrilab.mtracs
Class MockPLCComponent
java.lang.Object
edu.tufts.hrilab.diarc.DiarcComponent
edu.tufts.hrilab.mtracs.MockPLCComponent
- All Implemented Interfaces:
PLCComponentInterface
MockPLCComponent represents a PLC unit, specifically equipped with a program that allows it to drive
a conveyor belt.
-
Field Summary
Fields inherited from class edu.tufts.hrilab.diarc.DiarcComponent
executionLoopCycleTime, log, shouldRunExecutionLoop
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Moves the conveyor belt thatthis
PLCComponent is connected to forward.boolean
Moves the conveyor belt thatthis
PLCComponent is connected to backwards.Methods inherited from class edu.tufts.hrilab.diarc.DiarcComponent
additionalUsageInfo, createInstance, createInstance, createInstance, createInstance, executionLoop, getMyGroupConstraints, getMyGroups, getMyService, getMyServices, init, main, parseArgs, shutdown, shutdownComponent
-
Constructor Details
-
MockPLCComponent
public MockPLCComponent()
-
-
Method Details
-
conveyorForward
public boolean conveyorForward()Moves the conveyor belt thatthis
PLCComponent is connected to forward.- Specified by:
conveyorForward
in interfacePLCComponentInterface
- Returns:
- True if this move was executed successfully, false if otherwise.
-
conveyorReverse
public boolean conveyorReverse()Moves the conveyor belt thatthis
PLCComponent is connected to backwards.- Specified by:
conveyorReverse
in interfacePLCComponentInterface
- Returns:
- True if this move was executed successfully, false if otherwise.
-