|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.speckled.specksim.state.SimulatorState
public class SimulatorState
Encapsulates the interesting state of a simulation at a specific moment.
| Constructor Summary | |
|---|---|
SimulatorState(byte[] data)
Constructs a SimulatorState from encoded data |
|
SimulatorState(SpeckSim simulator)
Constructs a SimulatorState from the supplied simulator |
|
| Method Summary | |
|---|---|
byte[] |
encode()
Encodes the state of this state object to a byte array |
SerializableState |
getBroadcastDetails()
Gets details of active and completed broadcasts. |
SerializableState |
getEnvironmentState(java.lang.String name)
Gets the state object of a specific Environment object |
java.lang.Object |
getMovementModelState()
Gets the state of the movement model |
SpeckPosition[] |
getPositions()
Gets an array of the positions of all the specks in the simulator |
long |
getRealTime()
Gets the real-world time at which this SimulatorState
was extracted from the simulator. |
float |
getSimTime()
Gets the simulator time at which this SimulatorState was
extracted from the simulator |
SpeckState[] |
getSpecks()
Gets an array containing the states of all the Specks
in the simulator. |
Wall[] |
getWallVertices()
Gets the vertices of the walls in the simulator |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimulatorState(SpeckSim simulator)
SimulatorState from the supplied simulator
simulator - The simulator to sample
public SimulatorState(byte[] data)
throws java.io.IOException
SimulatorState from encoded data
data - The encoded data
java.io.IOException| Method Detail |
|---|
public byte[] encode()
public SpeckState[] getSpecks()
Specks
in the simulator. This array can assumed to be sorted into order
of ascending IDs
SpeckState objectspublic SpeckPosition[] getPositions()
SpeckPositionspublic Wall[] getWallVertices()
Wall objectspublic float getSimTime()
SimulatorState was
extracted from the simulator
public long getRealTime()
SimulatorState
was extracted from the simulator.
public SerializableState getBroadcastDetails()
public java.lang.Object getMovementModelState()
MovementModelpublic SerializableState getEnvironmentState(java.lang.String name)
Environment object
name - The name of the Environment object
Environment, or null
if there is no such state object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||