Class MockUnitySpaceStationComponent
java.lang.Object
edu.tufts.hrilab.diarc.DiarcComponent
edu.tufts.hrilab.unity.space_station.MockUnitySpaceStationComponent
- All Implemented Interfaces:
UnitySpaceStationInterface
public class MockUnitySpaceStationComponent
extends DiarcComponent
implements UnitySpaceStationInterface
-
Field Summary
Fields inherited from class edu.tufts.hrilab.diarc.DiarcComponent
executionLoopCycleTime, log, shouldRunExecutionLoop -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<org.apache.commons.cli.Option>Override this method to define command line options available in sub-class.protected voidThis is where any code that needs to be called repeatedly in a dedicated thread should live.floatGets the health of the space station as a float [0:100].booleanGets the broken state of a tube, true if broken.booleanGets the damaged state of a tube, true if damaged.floatGets the health of a specific tube via name as a float [0:100].booleangetSpaceStationTubeOff(Symbol tube) Gets the off state of a tube, true if off.Gets a list of broken tubes, optionally limited to the area.Gets a list of damaged tubes, optionally limited to the area.Gets a list of off tubes, optionally limited to a area.protected voidinit()Perform any component initialization.protected voidparseArgs(org.apache.commons.cli.CommandLine cmdLine) Override this method to parse command line args in the sub-class.booleanrepairMockTube(Symbol tube) voidturnTubeOff(Symbol tube) voidturnTubeOn(Symbol tube) Methods inherited from class edu.tufts.hrilab.diarc.DiarcComponent
attachShutdownHook, createInstance, createInstance, createInstance, getMyGroupConstraints, getMyGroups, getMyService, getMyServices, main, postRegistrationInit, shutdown, shutdownComponent
-
Constructor Details
-
MockUnitySpaceStationComponent
public MockUnitySpaceStationComponent()
-
-
Method Details
-
additionalUsageInfo
Description copied from class:DiarcComponentOverride this method to define command line options available in sub-class. This should be paired with a parseArgs implementation.- Overrides:
additionalUsageInfoin classDiarcComponent- Returns:
-
parseArgs
protected void parseArgs(org.apache.commons.cli.CommandLine cmdLine) Description copied from class:DiarcComponentOverride this method to parse command line args in the sub-class. Called directly after construction to pass runtime values that will override default values. This should parse all the options that additionalUsageInfo provides.- Overrides:
parseArgsin classDiarcComponent
-
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
-
executionLoop
protected void executionLoop()Description copied from class:DiarcComponentThis is where any code that needs to be called repeatedly in a dedicated thread should live. It is not called by default and you must set shouldRunExecutionLoop to true in your constructor.- Overrides:
executionLoopin classDiarcComponent
-
getSpaceStationHealth
public float getSpaceStationHealth()Description copied from interface:UnitySpaceStationInterfaceGets the health of the space station as a float [0:100].- Specified by:
getSpaceStationHealthin interfaceUnitySpaceStationInterface
-
getSpaceStationTubesDamaged
Description copied from interface:UnitySpaceStationInterfaceGets a list of damaged tubes, optionally limited to the area.- Specified by:
getSpaceStationTubesDamagedin interfaceUnitySpaceStationInterface
-
getSpaceStationTubesDamaged
- Specified by:
getSpaceStationTubesDamagedin interfaceUnitySpaceStationInterface
-
getSpaceStationTubesBroken
Description copied from interface:UnitySpaceStationInterfaceGets a list of broken tubes, optionally limited to the area.- Specified by:
getSpaceStationTubesBrokenin interfaceUnitySpaceStationInterface
-
getSpaceStationTubesBroken
- Specified by:
getSpaceStationTubesBrokenin interfaceUnitySpaceStationInterface
-
getSpaceStationTubesOff
Description copied from interface:UnitySpaceStationInterfaceGets a list of off tubes, optionally limited to a area.- Specified by:
getSpaceStationTubesOffin interfaceUnitySpaceStationInterface
-
getSpaceStationTubesOff
- Specified by:
getSpaceStationTubesOffin interfaceUnitySpaceStationInterface
-
getSpaceStationTubeHealth
Description copied from interface:UnitySpaceStationInterfaceGets the health of a specific tube via name as a float [0:100].- Specified by:
getSpaceStationTubeHealthin interfaceUnitySpaceStationInterface
-
getSpaceStationTubeDamaged
Description copied from interface:UnitySpaceStationInterfaceGets the damaged state of a tube, true if damaged.- Specified by:
getSpaceStationTubeDamagedin interfaceUnitySpaceStationInterface
-
getSpaceStationTubeBroken
Description copied from interface:UnitySpaceStationInterfaceGets the broken state of a tube, true if broken.- Specified by:
getSpaceStationTubeBrokenin interfaceUnitySpaceStationInterface
-
getSpaceStationTubeOff
Description copied from interface:UnitySpaceStationInterfaceGets the off state of a tube, true if off.- Specified by:
getSpaceStationTubeOffin interfaceUnitySpaceStationInterface
-
repairMockTube
-
turnTubeOn
-
turnTubeOff
-