Skip to content
Snippets Groups Projects
Commit 149da06f authored by Brutzman, Don's avatar Brutzman, Don
Browse files

refactor ChannelOpenDis7 as member object rather than superclass, improving reuse

parent e90466ee
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,6 @@ import edu.nps.moves.dis7.entities.swe.platform.surface._002Triton;
import edu.nps.moves.dis7.enumerations.*;
import edu.nps.moves.dis7.pdus.*;
import edu.nps.moves.dis7.utilities.PduFactory;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;
......@@ -20,9 +19,12 @@ import java.util.logging.Logger;
* Default program initialization includes PDU recording turned on by default.
* @see <a href="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/blob/master/examples/src/OpenDis7Examples/ExampleSimulationProgramLog.txt">ExampleSimulationProgramLog.txt</a>
*/
public class ExampleSimulationProgram extends ChannelOpenDis7
public class ExampleSimulationProgram // extends ChannelOpenDis7
{
/** seconds for real-time execution (not simulation time, which may or may not be the same) */
protected ChannelOpenDis7 channelOpenDis7;
protected PduFactory pduFactory;
/** seconds for real-time execution (not simulation time, which may or may not be .the same) */
double currentTimeStep = 1.0; // seconds
/** initial simulation time */
double initialTime = 0.0;
......@@ -34,23 +36,42 @@ public class ExampleSimulationProgram extends ChannelOpenDis7
/** EntityID settings for entity 2 */
protected EntityID entityID_2 = new EntityID();
/** ESPDU for entity 1 */
protected EntityStatePdu entityStatePdu_1 = pduFactory.makeEntityStatePdu();
protected EntityStatePdu entityStatePdu_1;
/** ESPDU for entity 2 */
protected EntityStatePdu entityStatePdu_2 = pduFactory.makeEntityStatePdu();
protected EntityStatePdu entityStatePdu_2;
/** FirePdu for entity 1 first weapon (if any) */
protected FirePdu firePdu_1a = pduFactory.makeFirePdu();
protected FirePdu firePdu_1a;
/** FirePdu for entity 1 second weapon (if any) */
protected FirePdu firePdu_1b = pduFactory.makeFirePdu();
protected FirePdu firePdu_1b;
/** MunitionDescriptor for these weapons */
protected MunitionDescriptor munitionDescriptor1 = new MunitionDescriptor();
protected MunitionDescriptor munitionDescriptor1;
/** this class instantiated as an object */
SimulationManager simulationManager = new SimulationManager();
/** Initialize channel setup for OpenDis7 and report a test PDU */
private void initializeChannelOpenDis7()
{
channelOpenDis7.setUpNetworkInterface();
channelOpenDis7.printlnTRACE ("opendis7.getNetworkAddress()=" + channelOpenDis7.getNetworkAddress() +
", getNetworkPort()=" + channelOpenDis7.getNetworkPort());
// channelOpenDis7.sendCommentPdu(VariableRecordType.OTHER, "ArrivalProcessOpenDis7 initialized");
}
/** Get ready, get set... initialize simulation entities
*/
public void initializeSimulationEntities()
{
initializeChannelOpenDis7();
pduFactory = channelOpenDis7.getPduFactory();
entityStatePdu_1 = pduFactory.makeEntityStatePdu();
entityStatePdu_2 = pduFactory.makeEntityStatePdu();
firePdu_1a = pduFactory.makeFirePdu();
firePdu_1b = pduFactory.makeFirePdu();
munitionDescriptor1 = new MunitionDescriptor();
// Your model setup: define participants. who's who in this zoo?
// Assuming you keep track of entity objects... here is some support for for Entity 1.
......@@ -78,8 +99,8 @@ public class ExampleSimulationProgram extends ChannelOpenDis7
// TODO simulation management PDUs for startup, planning to design special class support
// simulationManager.addEntity();
simulationManager.setDescriptor("ExampleSimulationProgram");
simulationManager.addHost(thisHostName);
simulationManager.setDisThreadedNetworkInterface(disNetworkInterface);
simulationManager.addHost(ChannelOpenDis7.getThisHostName());
simulationManager.setDisThreadedNetworkInterface(channelOpenDis7.getDisNetworkInterface());
}
/**
......@@ -106,7 +127,7 @@ public class ExampleSimulationProgram extends ChannelOpenDis7
// TODO reset Clock Time to today's date and timestamp to zero, providing consistent outputs for each simulation run
pduRecorder.setVerbose(true);
channelOpenDis7.getPduRecorder().setVerbose(true);
initializeSimulationEntities();
......@@ -162,7 +183,7 @@ public class ExampleSimulationProgram extends ChannelOpenDis7
System.out.println ("sending PDUs for simulation step " + simulationLoopCount + ", monitor loopback to confirm sent");
System.out.flush();
sendAllPdusForLoopTimestep(entityStatePdu_1, firePdu_1a, currentTimeStepComment, narrativeMessage1, narrativeMessage2, narrativeMessage3);
sendSinglePdu(entityStatePdu_2); // me too i.e. 2!
channelOpenDis7.sendSinglePdu(entityStatePdu_2); // me too i.e. 2!
System.out.println ("... [PDUs successfully sent for this loop]");
System.out.flush();
......@@ -178,7 +199,7 @@ public class ExampleSimulationProgram extends ChannelOpenDis7
// ===================================================================================================
narrativeMessage2 = "runSimulation() completed successfully"; // all done
sendCommentPdu(narrativeComment, narrativeMessage1, narrativeMessage2, narrativeMessage3);
channelOpenDis7.sendCommentPdu(narrativeComment, narrativeMessage1, narrativeMessage2, narrativeMessage3);
System.out.println ("... [final CommentPdu successfully sent for simulation]");
// TODO simulation management PDUs
......@@ -211,8 +232,11 @@ public class ExampleSimulationProgram extends ChannelOpenDis7
public ExampleSimulationProgram()
{
// additional constructor initialization goes here
if (channelOpenDis7 == null)
channelOpenDis7 = new ChannelOpenDis7();
pduFactory = channelOpenDis7.getPduFactory();
}
/**
* Utility Constructor that allows your example simulation program to override default network address and port
* @param address network address to use
......@@ -222,9 +246,9 @@ public class ExampleSimulationProgram extends ChannelOpenDis7
{
super();
setNetworkAddress(address);
channelOpenDis7.setNetworkAddress(address);
setNetworkPort(port);
channelOpenDis7.setNetworkPort(port);
}
/**
......@@ -242,11 +266,12 @@ public class ExampleSimulationProgram extends ChannelOpenDis7
String... comments)
{
if (entityStatePdu != null)
sendSinglePdu(entityStatePdu);
channelOpenDis7.sendSinglePdu(entityStatePdu);
if (firePdu != null)
sendSinglePdu(firePdu); // bang
sendCommentPdu(commentType, comments);
channelOpenDis7.sendSinglePdu(firePdu); // bang
channelOpenDis7.sendCommentPdu(commentType, comments); // empty comments are filtered
}
/**
......@@ -259,9 +284,9 @@ public class ExampleSimulationProgram extends ChannelOpenDis7
if (args.length == 2)
{
if ((args[0] != null) && !args[0].isEmpty())
thisProgram.setNetworkAddress(args[0]);
thisProgram.channelOpenDis7.setNetworkAddress(args[0]);
if ((args[1] != null) && !args[1].isEmpty())
thisProgram.setNetworkPort(Integer.parseInt(args[1]));
thisProgram.channelOpenDis7.setNetworkPort(Integer.parseInt(args[1]));
}
else if (args.length != 0)
{
......@@ -281,23 +306,25 @@ public class ExampleSimulationProgram extends ChannelOpenDis7
*/
public static void main(String[] args)
{
setTRACE_PREFIX("[" + ExampleSimulationProgram.class.getName() + "] ");
thisProgram = new ExampleSimulationProgram(); // create instance of self
thisProgram.channelOpenDis7.setTRACE_PREFIX("[" + ExampleSimulationProgram.class.getName() + "] ");
System.out.println(getTRACE_PREFIX() + "main() started...");
thisProgram.channelOpenDis7.printlnTRACE("main() started...");
thisProgram = new ExampleSimulationProgram(); // creates instance of self within static main() method
thisProgram.handleArgs (args); // process command-line invocation arguments
thisProgram.setUpNetworkInterface();
thisProgram.channelOpenDis7.setUpNetworkInterface();
// thisProgram.pduRecorder.setDescriptor (TRACE_PREFIX.replace("[","").replace("]","") + " pduRecorder");
thisProgram.runSimulationLoops(); // ... your simulation execution code goes in there ...
thisProgram.tearDownNetworkInterface(); // make sure no processes are left lingering
thisProgram.channelOpenDis7.tearDownNetworkInterface(); // make sure no processes are left lingering
System.out.println(getTRACE_PREFIX() + "complete."); // report successful completion
thisProgram.channelOpenDis7.printlnTRACE("complete."); // report successful completion
System.exit(0); // ensure all threads and sockets released
}
......
......@@ -6,8 +6,9 @@ Updating property file: C:\x-nps-gitlab\NetworkedGraphicsMV3500\examples\build\b
Compiling 1 source file to C:\x-nps-gitlab\NetworkedGraphicsMV3500\examples\build\classes
compile-single:
run-single:
[OpenDis7]thisHostName=IT160907-UWALPP
[OpenDis7Examples.ExampleSimulationProgram] main() started...
[OpenDis7Examples.ExampleSimulationProgram] thisHostName=IT160907-UWALPP
[OpenDis7]thisHostName=IT160907-UWALPP
[DisThreadedNetworkInterface] using network interface PANGP Virtual Ethernet Adapter
[DisThreadedNetworkInterface] datagramSocket.joinGroup address=239.1.2.3 port=3000 isConnected()=false createDatagramSocket() complete.
[DisThreadedNetworkInterface] createThreads() receiveThread.isAlive()=true
......@@ -20,20 +21,41 @@ Recorder log file open: C:\x-nps-gitlab\NetworkedGraphicsMV3500\examples\pduLog\
[DisThreadedNetworkInterface] createThreads() receiveThread.isAlive()=true
[DisThreadedNetworkInterface] createThreads() sendingThread.isAlive()=true
[PduRecorder PduRecorder] listening to IP address 239.1.2.3 on port 3000
[DisThreadedNetworkInterface] using network interface PANGP Virtual Ethernet Adapter
[DisThreadedNetworkInterface] datagramSocket.joinGroup address=239.1.2.3 port=3000 isConnected()=false createDatagramSocket() complete.
[DisThreadedNetworkInterface] createThreads() receiveThread.isAlive()=true
[DisThreadedNetworkInterface] createThreads() sendingThread.isAlive()=true
Network confirmation: address=239.1.2.3 port=3000
Beginning pdu save to directory ./pduLog
Recorder log file open: C:\x-nps-gitlab\NetworkedGraphicsMV3500\examples\pduLog\PduCaptureLog1.dislog
[DisThreadedNetworkInterface] using network interface PANGP Virtual Ethernet Adapter
[DisThreadedNetworkInterface] datagramSocket.joinGroup address=239.1.2.3 port=3000 isConnected()=false createDatagramSocket() complete.
[DisThreadedNetworkInterface] createThreads() receiveThread.isAlive()=true
[DisThreadedNetworkInterface] createThreads() sendingThread.isAlive()=true
[PduRecorder PduRecorder] listening to IP address 239.1.2.3 on port 3000
[OpenDis7]opendis7.getNetworkAddress()=239.1.2.3, getNetworkPort()=3000
... My simulation just did something, no really...
... [Pausing for 1.0 seconds]
sending PDUs for simulation step 1, monitor loopback to confirm sent
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 1] DisPduType 01 ENTITY_STATE Entity #1, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 1] DisPduType 01 ENTITY_STATE Entity #1, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 1] DisPduType 01 ENTITY_STATE Entity #1, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 1] DisPduType 01 ENTITY_STATE Entity #1, size 144 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 1] DisPduType 01 ENTITY_STATE Entity #1, size 144 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 1] DisPduType 01 ENTITY_STATE Entity #1, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 2] DisPduType 02 FIRE, size 96 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 2] DisPduType 02 FIRE, size 96 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 2] DisPduType 02 FIRE, size 96 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 2] DisPduType 02 FIRE, size 96 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 2] DisPduType 02 FIRE, size 96 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 3] DisPduType 22 COMMENT, size 104 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 3] DisPduType 22 COMMENT, size 104 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 3] DisPduType 22 COMMENT, size 104 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 3] DisPduType 22 COMMENT, size 104 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 3] DisPduType 22 COMMENT, size 104 bytes)
*** [CommentPdu narrative sent: APPLICATION_TIMESTEP] [MV3500 ExampleSimulationProgram, runSimulation() loop 1]
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 4] DisPduType 01 ENTITY_STATE Entity #2, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 4] DisPduType 01 ENTITY_STATE Entity #2, size 144 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 4] DisPduType 01 ENTITY_STATE Entity #2, size 144 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 4] DisPduType 01 ENTITY_STATE Entity #2, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 4] DisPduType 01 ENTITY_STATE Entity #2, size 144 bytes)
... [PDUs successfully sent for this loop]
......@@ -43,16 +65,24 @@ sending PDUs for simulation step 2, monitor loopback to confirm sent
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 5] DisPduType 01 ENTITY_STATE Entity #1, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 5] DisPduType 01 ENTITY_STATE Entity #1, size 144 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 5] DisPduType 01 ENTITY_STATE Entity #1, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 5] DisPduType 01 ENTITY_STATE Entity #1, size 144 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 5] DisPduType 01 ENTITY_STATE Entity #1, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 6] DisPduType 02 FIRE, size 96 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 6] DisPduType 02 FIRE, size 96 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 6] DisPduType 02 FIRE, size 96 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 6] DisPduType 02 FIRE, size 96 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 6] DisPduType 02 FIRE, size 96 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 7] DisPduType 22 COMMENT, size 104 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 7] DisPduType 22 COMMENT, size 104 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 7] DisPduType 22 COMMENT, size 104 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 7] DisPduType 22 COMMENT, size 104 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 7] DisPduType 22 COMMENT, size 104 bytes)
*** [CommentPdu narrative sent: APPLICATION_TIMESTEP] [MV3500 ExampleSimulationProgram, runSimulation() loop 2]
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 8] DisPduType 01 ENTITY_STATE Entity #2, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 8] DisPduType 01 ENTITY_STATE Entity #2, size 144 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 8] DisPduType 01 ENTITY_STATE Entity #2, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 8] DisPduType 01 ENTITY_STATE Entity #2, size 144 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 8] DisPduType 01 ENTITY_STATE Entity #2, size 144 bytes)
... [PDUs successfully sent for this loop]
... My simulation just did something, no really...
... [Pausing for 1.0 seconds]
......@@ -60,15 +90,23 @@ sending PDUs for simulation step 3, monitor loopback to confirm sent
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 9] DisPduType 01 ENTITY_STATE Entity #1, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 9] DisPduType 01 ENTITY_STATE Entity #1, size 144 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 9] DisPduType 01 ENTITY_STATE Entity #1, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 9] DisPduType 01 ENTITY_STATE Entity #1, size 144 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 9] DisPduType 01 ENTITY_STATE Entity #1, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 10] DisPduType 02 FIRE, size 96 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 10] DisPduType 02 FIRE, size 96 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 10] DisPduType 02 FIRE, size 96 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 10] DisPduType 02 FIRE, size 96 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 10] DisPduType 02 FIRE, size 96 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 11] DisPduType 22 COMMENT, size 104 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 11] DisPduType 22 COMMENT, size 104 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 11] DisPduType 22 COMMENT, size 104 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 11] DisPduType 22 COMMENT, size 104 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 11] DisPduType 22 COMMENT, size 104 bytes)
*** [CommentPdu narrative sent: APPLICATION_TIMESTEP] [MV3500 ExampleSimulationProgram, runSimulation() loop 3]
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 12] DisPduType 01 ENTITY_STATE Entity #2, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 12] DisPduType 01 ENTITY_STATE Entity #2, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 12] DisPduType 01 ENTITY_STATE Entity #2, size 144 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 12] DisPduType 01 ENTITY_STATE Entity #2, size 144 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 12] DisPduType 01 ENTITY_STATE Entity #2, size 144 bytes)
... [PDUs successfully sent for this loop]
... My simulation just did something, no really...
......@@ -77,15 +115,23 @@ sending PDUs for simulation step 4, monitor loopback to confirm sent
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 13] DisPduType 01 ENTITY_STATE Entity #1, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 13] DisPduType 01 ENTITY_STATE Entity #1, size 144 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 13] DisPduType 01 ENTITY_STATE Entity #1, size 144 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 13] DisPduType 01 ENTITY_STATE Entity #1, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 13] DisPduType 01 ENTITY_STATE Entity #1, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 14] DisPduType 02 FIRE, size 96 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 14] DisPduType 02 FIRE, size 96 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 14] DisPduType 02 FIRE, size 96 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 14] DisPduType 02 FIRE, size 96 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 14] DisPduType 02 FIRE, size 96 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 14] DisPduType 02 FIRE, size 96 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 15] DisPduType 22 COMMENT, size 104 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 15] DisPduType 22 COMMENT, size 104 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 15] DisPduType 22 COMMENT, size 104 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 15] DisPduType 22 COMMENT, size 104 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 15] DisPduType 22 COMMENT, size 104 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 15] DisPduType 22 COMMENT, size 104 bytes)
*** [CommentPdu narrative sent: APPLICATION_TIMESTEP] [MV3500 ExampleSimulationProgram, runSimulation() loop 4]
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 16] DisPduType 01 ENTITY_STATE Entity #2, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 16] DisPduType 01 ENTITY_STATE Entity #2, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 16] DisPduType 01 ENTITY_STATE Entity #2, size 144 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 16] DisPduType 01 ENTITY_STATE Entity #2, size 144 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 16] DisPduType 01 ENTITY_STATE Entity #2, size 144 bytes)
... [PDUs successfully sent for this loop]
... My simulation just did something, no really...
......@@ -93,21 +139,31 @@ sending PDUs for simulation step 4, monitor loopback to confirm sent
sending PDUs for simulation step 5, monitor loopback to confirm sent
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 17] DisPduType 01 ENTITY_STATE Entity #1, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 17] DisPduType 01 ENTITY_STATE Entity #1, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 17] DisPduType 01 ENTITY_STATE Entity #1, size 144 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 17] DisPduType 01 ENTITY_STATE Entity #1, size 144 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 17] DisPduType 01 ENTITY_STATE Entity #1, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 18] DisPduType 02 FIRE, size 96 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 18] DisPduType 02 FIRE, size 96 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 18] DisPduType 02 FIRE, size 96 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 18] DisPduType 02 FIRE, size 96 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 18] DisPduType 02 FIRE, size 96 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 19] DisPduType 22 COMMENT, size 104 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 19] DisPduType 22 COMMENT, size 104 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 19] DisPduType 22 COMMENT, size 104 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 19] DisPduType 22 COMMENT, size 104 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 19] DisPduType 22 COMMENT, size 104 bytes)
*** [CommentPdu narrative sent: APPLICATION_TIMESTEP] [MV3500 ExampleSimulationProgram, runSimulation() loop 5]
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 20] DisPduType 01 ENTITY_STATE Entity #2, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 20] DisPduType 01 ENTITY_STATE Entity #2, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 20] DisPduType 01 ENTITY_STATE Entity #2, size 144 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 20] DisPduType 01 ENTITY_STATE Entity #2, size 144 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 20] DisPduType 01 ENTITY_STATE Entity #2, size 144 bytes)
... [PDUs successfully sent for this loop]
... [loop termination condition met, simulationComplete=true]
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 21] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 21] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 21] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 21] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface PduRecorder] [receipt 21] DisPduType 22 COMMENT, size 120 bytes)
*** [CommentPdu narrative sent: COMPLETE_EVENT_REPORT] [MV3500 ExampleSimulationProgram, runSimulation() completed successfully]
... [final CommentPdu successfully sent for simulation]
......@@ -118,6 +174,6 @@ sending PDUs for simulation step 5, monitor loopback to confirm sent
*** killThread() status: receiveThread.isAlive()=false receiveThread.isInterrupted()=true
*** Thread close status: sendingThread.isAlive()=false receiveThread.isAlive()=false
PduRecorder.stop() closing recorder log file: C:\x-nps-gitlab\NetworkedGraphicsMV3500\examples\pduLog\PduCaptureLog.dislog
[OpenDis7Examples.ExampleSimulationProgram] complete.
PduRecorder.stop() closing recorder log file: C:\x-nps-gitlab\NetworkedGraphicsMV3500\examples\pduLog\PduCaptureLog1.dislog
[OpenDis7]complete.
BUILD SUCCESSFUL (total time: 10 seconds)
......@@ -8,7 +8,6 @@ package OpenDis7Examples;
import edu.nps.moves.dis7.entities.swe.platform.surface._001Poseidon;
import edu.nps.moves.dis7.enumerations.ForceID;
import edu.nps.moves.dis7.pdus.EntityID;
import edu.nps.moves.dis7.pdus.EntityStatePdu;
import edu.nps.moves.dis7.pdus.Pdu;
import edu.nps.moves.dis7.pdus.Vector3Double;
......@@ -29,7 +28,7 @@ import java.util.logging.Logger;
* @see <a href="https://gitlab.nps.edu/Savage/SavageTheses/-/tree/master/BrennenstuhlTobias">https://gitlab.nps.edu/Savage/SavageTheses/-/tree/master/BrennenstuhlTobias</a>
*/
public class ExampleTrackInterpolation extends ExampleSimulationProgram
{
{
// -------------------- Begin Variables for X3D autogenerated code
private X3dCreateInterpolators x3dInterpolators = new X3dCreateInterpolators();
private X3dCreateLineSet x3dLineSet = new X3dCreateLineSet();
......@@ -70,8 +69,8 @@ public class ExampleTrackInterpolation extends ExampleSimulationProgram
entityID_1.setSiteID(1).setApplicationID(2).setEntityID(3); // made-up example ID;
// TODO someday, use enumerations; is there a unique site triplet for MOVES Institute?
pduRecorder.setVerbose(false);
pduRecorder.hasVerboseOutput(); // debug check
channelOpenDis7.getPduRecorder().setVerbose(false);
channelOpenDis7.getPduRecorder().hasVerboseOutput(); // debug check
EntityStatePdu espdu_1 = pduFactory.makeEntityStatePdu();
espdu_1.setEntityID(entityID_1);
......@@ -96,9 +95,9 @@ public class ExampleTrackInterpolation extends ExampleSimulationProgram
pduTrack_1.addPdu(espdu_1); // initial location
// OK send initial PDUs prior to loop
if (pduRecorder.hasVerboseOutput())
if (channelOpenDis7.getPduRecorder().hasVerboseOutput())
System.out.println("sending PDUs for simulation step " + simulationLoopCount + ", monitor loopback to confirm sent");
sendSinglePdu(espdu_1);
channelOpenDis7.sendSinglePdu(espdu_1);
// sendCommentPdu(currentTimeStepComment, narrativeMessage1, narrativeMessage2, narrativeMessage3);
pduSentList.add(espdu_1);
reportPdu(simulationLoopCount, espdu_1.getEntityLocation(), directionEntity_1);
......@@ -152,16 +151,16 @@ public class ExampleTrackInterpolation extends ExampleSimulationProgram
if (false) // real-time operation or simulation speedup
{
Thread.sleep((long) (currentTimeStep * 1000)); // seconds * (1000 msec/sec) = milliseconds
System.out.println(getTRACE_PREFIX() + "Pausing for " + currentTimeStep + " seconds");
System.out.println(channelOpenDis7.getTRACE_PREFIX() + "Pausing for " + currentTimeStep + " seconds");
}
// OK now send the status PDUs for this loop, and then continue
if (pduRecorder.hasVerboseOutput())
if (channelOpenDis7.getPduRecorder().hasVerboseOutput())
System.out.println("sending PDUs for simulation step " + simulationLoopCount + ", monitor loopback to confirm sent");
sendSinglePdu(espdu_1);
sendCommentPdu(currentTimeStepComment, narrativeMessage1, narrativeMessage2, narrativeMessage3);
if (pduRecorder.hasVerboseOutput())
System.out.println(getTRACE_PREFIX() + "PDUs successfully sent for this loop");
channelOpenDis7.sendSinglePdu(espdu_1);
channelOpenDis7.sendCommentPdu(currentTimeStepComment, narrativeMessage1, narrativeMessage2, narrativeMessage3);
if (channelOpenDis7.getPduRecorder().hasVerboseOutput())
System.out.println(channelOpenDis7.getTRACE_PREFIX() + "PDUs successfully sent for this loop");
pduSentList.add(espdu_1);
pduTrack_1.addPdu(espdu_1);
Vector3Double location = espdu_1.getEntityLocation();
......@@ -171,15 +170,15 @@ public class ExampleTrackInterpolation extends ExampleSimulationProgram
// current loop now finished, check whether to terminate if simulation complete, otherwise continue
if (simulationComplete || (simulationLoopCount > 10000)) // for example; including fail-safe condition is good
{
System.out.println(getTRACE_PREFIX() + "loop termination condition met, simulationComplete=" + simulationComplete); // ", final loopCount=" + loopCount +
System.out.println(channelOpenDis7.getTRACE_PREFIX() + "loop termination condition met, simulationComplete=" + simulationComplete); // ", final loopCount=" + loopCount +
break;
}
} // end of simulation loop
// ===================================================================================================
System.out.println(getTRACE_PREFIX() + "all PDUs successfully sent for this loop (pduSentList.size()=" + pduSentList.size() + " total)");
System.out.println(channelOpenDis7.getTRACE_PREFIX() + "all PDUs successfully sent for this loop (pduSentList.size()=" + pduSentList.size() + " total)");
// track analysis
System.out.println(getTRACE_PREFIX() + "pduTrack_1 initialLocation=" + pduTrack_1.getInitialLocation() + ", latestLocation=" + pduTrack_1.getLatestLocation());
System.out.println(channelOpenDis7.getTRACE_PREFIX() + "pduTrack_1 initialLocation=" + pduTrack_1.getInitialLocation() + ", latestLocation=" + pduTrack_1.getLatestLocation());
pduTrack_1.sortPdus()
.createRawWaypoints();
......@@ -191,9 +190,9 @@ public class ExampleTrackInterpolation extends ExampleSimulationProgram
System.out.println("=================================");
narrativeMessage2 = "runSimulation() completed successfully"; // all done
sendCommentPdu(narrativeComment, narrativeMessage1, narrativeMessage2, narrativeMessage3);
if (pduRecorder.hasVerboseOutput())
System.out.println(getTRACE_PREFIX() + "final CommentPdu successfully sent for simulation");
channelOpenDis7.sendCommentPdu(narrativeComment, narrativeMessage1, narrativeMessage2, narrativeMessage3);
if (channelOpenDis7.getPduRecorder().hasVerboseOutput())
channelOpenDis7.printlnTRACE("final CommentPdu successfully sent for simulation");
// TODO simulation management PDUs
}
catch (InterruptedException iex) // handle any exception that your code might choose to provoke!
......@@ -233,27 +232,29 @@ public class ExampleTrackInterpolation extends ExampleSimulationProgram
*/
public static void main(String[] args)
{
setTRACE_PREFIX("[" + ExampleTrackInterpolation.class.getName() + "] ");
thisProgram = new ExampleTrackInterpolation(); // create instance of self
thisProgram.channelOpenDis7.setTRACE_PREFIX("[" + ExampleTrackInterpolation.class.getName() + "] ");
System.out.println(getTRACE_PREFIX() + "main() started...");
thisProgram.channelOpenDis7.printlnTRACE("main() started...");
thisProgram = new ExampleTrackInterpolation(); // creates instance of self within static main() method
thisProgram.handleArgs (args); // process command-line invocation arguments
thisProgram.setUpNetworkInterface();
thisProgram.channelOpenDis7.setUpNetworkInterface();
thisProgram.pduRecorder.setDescriptor (getTRACE_PREFIX().replace("[","").replace("]","") + " pduRecorder");
thisProgram.channelOpenDis7.getPduRecorder().setDescriptor (thisProgram.channelOpenDis7.getTRACE_PREFIX().replace("[","").replace("]","") + " pduRecorder");
thisProgram.pduRecorder.setVerbose(false);
thisProgram.setVerboseComments(false);
thisProgram.disNetworkInterface.setVerbose(false);
thisProgram.channelOpenDis7.getPduRecorder().setVerbose(false);
thisProgram.channelOpenDis7.setVerboseComments(false);
thisProgram.channelOpenDis7.getDisNetworkInterface().setVerbose(false);
thisProgram.runSimulationLoops(); // ... your simulation execution code goes in there ...
thisProgram.tearDownNetworkInterface(); // make sure no processes are left lingering
thisProgram.channelOpenDis7.tearDownNetworkInterface(); // make sure no processes are left lingering
System.out.println(getTRACE_PREFIX() + "complete."); // report successful completion
thisProgram.channelOpenDis7.printlnTRACE("complete."); // report successful completion
System.exit(0); // ensure all threads and sockets released
}
......
......@@ -6,8 +6,9 @@ Updating property file: C:\x-nps-gitlab\NetworkedGraphicsMV3500\examples\build\b
Compiling 1 source file to C:\x-nps-gitlab\NetworkedGraphicsMV3500\examples\build\classes
compile-single:
run-single:
[OpenDis7]thisHostName=IT160907-UWALPP
[OpenDis7Examples.ExampleTrackInterpolation] main() started...
[OpenDis7Examples.ExampleTrackInterpolation] thisHostName=IT160907-UWALPP
[OpenDis7]thisHostName=IT160907-UWALPP
[DisThreadedNetworkInterface] using network interface PANGP Virtual Ethernet Adapter
[DisThreadedNetworkInterface] datagramSocket.joinGroup address=239.1.2.3 port=3000 isConnected()=false createDatagramSocket() complete.
[DisThreadedNetworkInterface] createThreads() receiveThread.isAlive()=true
......@@ -20,51 +21,230 @@ Recorder log file open: C:\x-nps-gitlab\NetworkedGraphicsMV3500\examples\pduLog\
[DisThreadedNetworkInterface] createThreads() receiveThread.isAlive()=true
[DisThreadedNetworkInterface] createThreads() sendingThread.isAlive()=true
[PduRecorder PduRecorder] listening to IP address 239.1.2.3 on port 3000
[DisThreadedNetworkInterface] using network interface PANGP Virtual Ethernet Adapter
[DisThreadedNetworkInterface] datagramSocket.joinGroup address=239.1.2.3 port=3000 isConnected()=false createDatagramSocket() complete.
[DisThreadedNetworkInterface] createThreads() receiveThread.isAlive()=true
[DisThreadedNetworkInterface] createThreads() sendingThread.isAlive()=true
Network confirmation: address=239.1.2.3 port=3000
Beginning pdu save to directory ./pduLog
Recorder log file open: C:\x-nps-gitlab\NetworkedGraphicsMV3500\examples\pduLog\PduCaptureLog1.dislog
[DisThreadedNetworkInterface] using network interface PANGP Virtual Ethernet Adapter
[DisThreadedNetworkInterface] datagramSocket.joinGroup address=239.1.2.3 port=3000 isConnected()=false createDatagramSocket() complete.
[DisThreadedNetworkInterface] createThreads() receiveThread.isAlive()=true
[DisThreadedNetworkInterface] createThreads() sendingThread.isAlive()=true
[PduRecorder PduRecorder] listening to IP address 239.1.2.3 on port 3000
[OpenDis7]opendis7.getNetworkAddress()=239.1.2.3, getNetworkPort()=3000
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 1] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 1] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
0 Entity location=( 0.0, 0.0, 0.0) NORTH
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 2] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 2] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 3] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 3] DisPduType 22 COMMENT, size 120 bytes)
1 Entity location=( 0.0, 1.0, 0.0) NORTH
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 4] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 4] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 5] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 5] DisPduType 22 COMMENT, size 120 bytes)
2 Entity location=( 0.0, 2.0, 0.0) NORTH
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 6] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 6] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 7] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 7] DisPduType 22 COMMENT, size 120 bytes)
3 Entity location=( 0.0, 3.0, 0.0) NORTH
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 8] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 8] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 9] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 9] DisPduType 22 COMMENT, size 120 bytes)
4 Entity location=( 0.0, 4.0, 0.0) NORTH
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 10] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 10] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 11] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 11] DisPduType 22 COMMENT, size 120 bytes)
5 Entity location=( 0.0, 5.0, 0.0) NORTH
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 12] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 12] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 13] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 13] DisPduType 22 COMMENT, size 120 bytes)
6 Entity location=( 0.0, 6.0, 0.0) NORTH
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 14] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 14] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 15] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 15] DisPduType 22 COMMENT, size 120 bytes)
7 Entity location=( 0.0, 7.0, 0.0) NORTH
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 16] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 16] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 17] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 17] DisPduType 22 COMMENT, size 120 bytes)
8 Entity location=( 0.0, 8.0, 0.0) NORTH
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 18] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 18] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 19] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 19] DisPduType 22 COMMENT, size 120 bytes)
9 Entity location=( 0.0, 9.0, 0.0) NORTH
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 20] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 20] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 21] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 21] DisPduType 22 COMMENT, size 120 bytes)
10 Entity location=( 0.0, 10.0, 0.0) NORTH
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 22] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 22] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 23] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 23] DisPduType 22 COMMENT, size 120 bytes)
11 Entity location=( 1.0, 10.0, 0.0) EAST
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 24] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 24] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 25] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 25] DisPduType 22 COMMENT, size 120 bytes)
12 Entity location=( 2.0, 10.0, 0.0) EAST
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 26] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 26] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 27] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 27] DisPduType 22 COMMENT, size 120 bytes)
13 Entity location=( 3.0, 10.0, 0.0) EAST
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 28] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 28] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 29] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 29] DisPduType 22 COMMENT, size 120 bytes)
14 Entity location=( 4.0, 10.0, 0.0) EAST
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 30] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 30] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 31] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 31] DisPduType 22 COMMENT, size 120 bytes)
15 Entity location=( 5.0, 10.0, 0.0) EAST
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 32] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 32] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 33] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 33] DisPduType 22 COMMENT, size 120 bytes)
16 Entity location=( 6.0, 10.0, 0.0) EAST
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 34] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 34] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 35] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 35] DisPduType 22 COMMENT, size 120 bytes)
17 Entity location=( 7.0, 10.0, 0.0) EAST
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 36] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 36] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 37] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 37] DisPduType 22 COMMENT, size 120 bytes)
18 Entity location=( 8.0, 10.0, 0.0) EAST
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 38] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 38] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 39] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 39] DisPduType 22 COMMENT, size 120 bytes)
19 Entity location=( 9.0, 10.0, 0.0) EAST
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 40] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 40] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 41] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 41] DisPduType 22 COMMENT, size 120 bytes)
20 Entity location=(10.0, 10.0, 0.0) EAST
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 42] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 42] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 43] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 43] DisPduType 22 COMMENT, size 120 bytes)
21 Entity location=(10.0, 9.0, 0.0) SOUTH
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 44] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 44] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 45] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 45] DisPduType 22 COMMENT, size 120 bytes)
22 Entity location=(10.0, 8.0, 0.0) SOUTH
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 46] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 46] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 47] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 47] DisPduType 22 COMMENT, size 120 bytes)
23 Entity location=(10.0, 7.0, 0.0) SOUTH
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 48] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 48] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 49] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 49] DisPduType 22 COMMENT, size 120 bytes)
24 Entity location=(10.0, 6.0, 0.0) SOUTH
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 50] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 50] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 51] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 51] DisPduType 22 COMMENT, size 120 bytes)
25 Entity location=(10.0, 5.0, 0.0) SOUTH
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 52] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 52] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 53] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 53] DisPduType 22 COMMENT, size 120 bytes)
26 Entity location=(10.0, 4.0, 0.0) SOUTH
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 54] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 54] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 55] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 55] DisPduType 22 COMMENT, size 120 bytes)
27 Entity location=(10.0, 3.0, 0.0) SOUTH
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 56] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 56] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 57] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 57] DisPduType 22 COMMENT, size 120 bytes)
28 Entity location=(10.0, 2.0, 0.0) SOUTH
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 58] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 58] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 59] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 59] DisPduType 22 COMMENT, size 120 bytes)
29 Entity location=(10.0, 1.0, 0.0) SOUTH
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 60] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 60] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 61] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 61] DisPduType 22 COMMENT, size 120 bytes)
30 Entity location=(10.0, 0.0, 0.0) SOUTH
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 62] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 62] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 63] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 63] DisPduType 22 COMMENT, size 120 bytes)
31 Entity location=( 9.0, 0.0, 0.0) WEST
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 64] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 64] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 65] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 65] DisPduType 22 COMMENT, size 120 bytes)
32 Entity location=( 8.0, 0.0, 0.0) WEST
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 66] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 66] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 67] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 67] DisPduType 22 COMMENT, size 120 bytes)
33 Entity location=( 7.0, 0.0, 0.0) WEST
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 68] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 68] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 69] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 69] DisPduType 22 COMMENT, size 120 bytes)
34 Entity location=( 6.0, 0.0, 0.0) WEST
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 70] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 70] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 71] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 71] DisPduType 22 COMMENT, size 120 bytes)
35 Entity location=( 5.0, 0.0, 0.0) WEST
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 72] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 72] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 73] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 73] DisPduType 22 COMMENT, size 120 bytes)
36 Entity location=( 4.0, 0.0, 0.0) WEST
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 74] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 74] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 75] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 75] DisPduType 22 COMMENT, size 120 bytes)
37 Entity location=( 3.0, 0.0, 0.0) WEST
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 76] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 76] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 77] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 77] DisPduType 22 COMMENT, size 120 bytes)
38 Entity location=( 2.0, 0.0, 0.0) WEST
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 78] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 78] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 79] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 79] DisPduType 22 COMMENT, size 120 bytes)
39 Entity location=( 1.0, 0.0, 0.0) WEST
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 80] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 80] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 81] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 81] DisPduType 22 COMMENT, size 120 bytes)
40 Entity location=( 0.0, 0.0, 0.0) WEST
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 82] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 82] DisPduType 01 ENTITY_STATE track path, size 144 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 83] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 83] DisPduType 22 COMMENT, size 120 bytes)
41 Entity location=(-1.0, 0.0, 0.0) WEST
[OpenDis7Examples.ExampleTrackInterpolation] loop termination condition met, simulationComplete=true
[OpenDis7Examples.ExampleTrackInterpolation] all PDUs successfully sent for this loop (pduSentList.size()=42 total)
[OpenDis7Examples.ExampleTrackInterpolation] pduTrack_1 initialLocation=Vector3Double x:0.0 y:0.0 z:0.0, latestLocation=Vector3Double x:-1.0 y:0.0 z:0.0
[OpenDis7]loop termination condition met, simulationComplete=true
[OpenDis7]all PDUs successfully sent for this loop (pduSentList.size()=42 total)
[OpenDis7]pduTrack_1 initialLocation=Vector3Double x:0.0 y:0.0 z:0.0, latestLocation=Vector3Double x:-1.0 y:0.0 z:0.0
pduTrack_1 getEspduCount()=42
pduTrack_1 duration = 42.0 seconds = 0 ticks
=================================
......@@ -75,7 +255,7 @@ pduTrack_1 duration = 42.0 seconds = 0 ticks
<meta content='ExampleTrackInterpolation.x3d' name='title'/>
<meta content='Conversion of ESPDU track into X3D animation interpolators and LineSet.' name='description'/>
<meta content='1 January 2022' name='created'/>
<meta content='23 January 2022' name='modified'/>
<meta content='22 May 2022' name='modified'/>
<meta content='Don Brutzman' name='creator'/>
<meta content='https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/blob/master/examples/src/OpenDis7Examples/ExampleTrackInterpolation.x3d' name='identifier'/>
<meta content='PduTrack utility, opendis7-java Library https://github.com/open-dis/opendis7-java' name='generator'/>
......@@ -241,12 +421,14 @@ pduTrack_1 duration = 42.0 seconds = 0 ticks
</X3D>
=================================
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 84] DisPduType 22 COMMENT, size 120 bytes)
[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 84] DisPduType 22 COMMENT, size 120 bytes)
*** setKillSentinelAndInterrupts() killed=true sendingThread.isInterrupted()=true receiveThread.isInterrupted()=true
[DisThreadedNetworkInterface PduRecorder] close(): pdus2send.size()=0 baos.size()=0 dos.size()=0
*** killThread() status: sendingThread.isAlive()=false sendingThread.isInterrupted()=true
*** killThread() status: receiveThread.isAlive()=false receiveThread.isInterrupted()=true
*** Thread close status: sendingThread.isAlive()=false receiveThread.isAlive()=false
PduRecorder.stop() closing recorder log file: C:\x-nps-gitlab\NetworkedGraphicsMV3500\examples\pduLog\PduCaptureLog.dislog
[OpenDis7Examples.ExampleTrackInterpolation] complete.
PduRecorder.stop() closing recorder log file: C:\x-nps-gitlab\NetworkedGraphicsMV3500\examples\pduLog\PduCaptureLog1.dislog
[OpenDis7]complete.
BUILD SUCCESSFUL (total time: 12 seconds)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment