Contents | Package | Class | Tree | Deprecated | Index | Help | |||
PREV | NEXT | SHOW LISTS | HIDE LISTS |
java.lang.Object | +----mil.navy.nps.dis.SimulationManager
Its responsibilities include
A block diagram of the object:
+---------------------------+ | | | SimulationManager | | | | | | EntityList |------VRML Scene | Entity1 | | Entity2 | | Entityn | | | | NIU | +---------------------------+ | ----------------- WireThe NIU, an instance of a NetworkMonitor, reads PDUs from the wire. The SimulationManager occasionally pulls PDUs from the NIU. For each PDU, the simulation manager looks at the type.
If it's an ESPDU, the SimulationManger code looks at the EntityID triplet (site, application, ID) that uniquely identifies each entity, then passes it on to the correct entity. If it's an unrecognized EntityID, we may optionally instantiate a local entity to reflect it, and insert it into the scene. The Entity object in the list is responsible for communications with the VRML scene. ESPDU culling may be performed either here or at the entity level. It seems more logical to put it at the entity level, where there is a bit more information about update frequency and the like. On the other hand, it might make more sense to cull ESPDUs early, to cut down on PDU handling overhead. That's an implementation and optimization detail.
If it's a SimulationManagement PDU, it will be handled by a different block of code. SimulationManagement PDUs include Start Simulation PDU, Stop Simulation PDU, Create Entity PDU, EventReport PDU, Query PDU and Data PDU. Each of these will probably require some special handling, and perhaps some state changes in the SimulationManager object. Some of them will require that PDUs be sent in response.
Cardinality: there is one and only one instance of a SimulationManager per DIS application. I think the whole thing will operate through class (static) methods.
Constructor Summary | |
SimulationManager(int pPort)
|
|
SimulationManager(int pPort,
java.lang.String pMulticastGroup)
|
Method Summary | |
void | addEspduTransform(mil.navy.nps.javaViaScriptNode.EspduTransform pET)
|
void | addReadTransform(mil.navy.nps.javaViaScriptNode.EspduReadTransform pRT)
|
static void | debug(java.lang.String pDiagnostic)
|
void | run()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SimulationManager(int pPort)
public SimulationManager(int pPort, java.lang.String pMulticastGroup)
Method Detail |
protected static void debug(java.lang.String pDiagnostic)
public void addReadTransform(mil.navy.nps.javaViaScriptNode.EspduReadTransform pRT)
public void addEspduTransform(mil.navy.nps.javaViaScriptNode.EspduTransform pET)
public void run()
Contents | Package | Class | Tree | Deprecated | Index | Help | |||
PREV | NEXT | SHOW LISTS | HIDE LISTS |