Class UnitySpaceStation
java.lang.Object
edu.tufts.hrilab.diarc.DiarcComponent
edu.tufts.hrilab.unity.UnityAgent
edu.tufts.hrilab.unity.space_station.UnitySpaceStation
-
Field Summary
Fields inherited from class edu.tufts.hrilab.unity.UnityAgent
agent, isConnectedFields inherited from class edu.tufts.hrilab.diarc.DiarcComponent
executionLoopCycleTime, shouldRunExecutionLoop -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatGets 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 floatprotected floathealthResponse(Symbol tube) protected floathealthResponse(Message msg) Sends a health or tubeHealth message to Unity and awaits the response.tubesResponse(Message msg) Sends a tubesDamaged, tubesBroken or tubesOff message to Unity and awaits the response.tubesResponse(String action) tubesResponse(String action, Symbol area) protected booleantubeStateResponse(String action, Symbol tube) Sends a tubeDamaged, tubeBroken or tubeOff message requesting the state of a specific tube.Methods inherited from class edu.tufts.hrilab.unity.UnityAgent
additionalUsageInfo, connected, getResponse, listen, listen, parseArgs, route, sendMessage, unityReceiveMessageMethods inherited from class edu.tufts.hrilab.diarc.DiarcComponent
createInstance, createInstance, createInstance, createInstance, executionLoop, getMyGroupConstraints, getMyGroups, getMyService, getMyServices, init, main, shutdown, shutdownComponent
-
Constructor Details
-
UnitySpaceStation
public UnitySpaceStation()
-
-
Method Details
-
healthResponse
Sends a health or tubeHealth message to Unity and awaits the response. Value is index 0 in response message response : ["100"] -
healthResponse
protected float healthResponse() -
healthResponse
-
tubesResponse
Sends a tubesDamaged, tubesBroken or tubesOff message to Unity and awaits the response. Response is list of strings containing all matching tubes -
tubesResponse
-
tubesResponse
-
tubeStateResponse
Sends a tubeDamaged, tubeBroken or tubeOff message requesting the state of a specific tube. Response is in form ["name", "true"] where index 0 is the name of the requested state and index 1 is the stringified boolean of the state. -
getSpaceStationHealth
public float getSpaceStationHealth()Gets the health of the space station as a float [0:100]. -
getSpaceStationTubesDamaged
Gets a list of damaged tubes, optionally limited to the area. -
getSpaceStationTubesDamaged
-
getSpaceStationTubesBroken
Gets a list of broken tubes, optionally limited to the area. -
getSpaceStationTubesBroken
-
getSpaceStationTubesOff
Gets a list of off tubes, optionally limited to a area. -
getSpaceStationTubesOff
-
getSpaceStationTubeHealth
Gets the health of a specific tube via name as a float [0:100]. -
getSpaceStationTubeDamaged
Gets the damaged state of a tube, true if damaged. -
getSpaceStationTubeBroken
Gets the broken state of a tube, true if broken. -
getSpaceStationTubeOff
Gets the off state of a tube, true if off.
-