Overview | Package | Class | Tree | Deprecated | Index | Help | |||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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)
Unicast constructor; listens on the given unicast port |
|
SimulationManager(int pPort,
java.lang.String pMulticastGroup)
Multicast constructor; listens on the given port and group |
Method Summary | |
void | addEspduTransform(mil.navy.nps.javaViaScriptNode.EspduTransform pET)
|
void | addReadTransform(mil.navy.nps.javaViaScriptNode.EspduReadTransform pRT)
Adds a readTransform node to the list of readTransforms being maintained. |
static void | debug(java.lang.String pDiagnostic)
Debugging output. |
void | run()
|
Methods inherited from class java.lang.Object | |
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()
Overview | Package | Class | Tree | Deprecated | Index | Help | |||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |