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, isConnected
Fields inherited from class edu.tufts.hrilab.diarc.DiarcComponent
executionLoopCycleTime, shouldRunExecutionLoop
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat
Gets the health of the space station as a float [0:100].boolean
Gets the broken state of a tube, true if broken.boolean
Gets the damaged state of a tube, true if damaged.float
Gets the health of a specific tube via name as a float [0:100].boolean
getSpaceStationTubeOff
(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 float
protected float
healthResponse
(Symbol tube) protected float
healthResponse
(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 boolean
tubeStateResponse
(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, unityReceiveMessage
Methods 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.
-