diff --git a/assignments/src/MV3500Cohort2021JulySeptember/homework2/Robinson/Robinson Event Graph assign2.png b/assignments/src/MV3500Cohort2021JulySeptember/homework2/Robinson/Robinson Event Graph assign2.png new file mode 100644 index 0000000000000000000000000000000000000000..20f0510dc8268a7c487181677da6123c73fbd535 Binary files /dev/null and b/assignments/src/MV3500Cohort2021JulySeptember/homework2/Robinson/Robinson Event Graph assign2.png differ diff --git a/assignments/src/MV3500Cohort2021JulySeptember/homework2/Robinson/RobinsonTCP3exClient.java b/assignments/src/MV3500Cohort2021JulySeptember/homework2/Robinson/RobinsonTCP3exClient.java new file mode 100644 index 0000000000000000000000000000000000000000..1b3ac0dc4e031a94c2d175c549f271d145225c15 --- /dev/null +++ b/assignments/src/MV3500Cohort2021JulySeptember/homework2/Robinson/RobinsonTCP3exClient.java @@ -0,0 +1,89 @@ +package MV3500Cohort2021JulySeptember.homework2.Robinson; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.Reader; +import java.net.Socket; + +/** + * + * @author mrobi + */ +public class RobinsonTCP3exClient { + + public final static String LOCALHOST = "0:0:0:0:0:0:0:1"; + + /** + * Program invocation, execution starts here + * @param args command-line arguments + */ + public static void main(String[] args) throws InterruptedException { + + // Local variables/fields + Socket socket = null; + InputStream is; + Reader isr; + BufferedReader br; + String serverMessage; + int clientLoopCount = 0; + int totalLoops = 25; + + try { + while (clientLoopCount < totalLoops) + { + clientLoopCount++; // increment at beginning of loop for reliability + System.out.println(RobinsonTCP3exClient.class.getName() + " creating socket..."); + + // We request an IP to connect to ("localhost") and + // port number at that IP (2317). This establishes + // a connection to that IP in the form of a Socket + // object; the server uses a ServerSocket to wait for + // connections. + socket = new Socket(LOCALHOST, 2317); // locohost? + + // Now hook everything up (i.e. set up the streams), Java style: + is = socket.getInputStream(); + isr = new InputStreamReader(is); + br = new BufferedReader(isr); + + // Read a single line written by the server. We'd + // do things a bit differently if there were many lines to be read + // from the server instead of one only. + serverMessage = br.readLine(); + System.out.println("====================RobinsonHW2=============================="); + + System.out.print ("Client loop " + clientLoopCount + ": "); + System.out.println("now we're talking!"); + System.out.println("The message the server sent was: '" + serverMessage + "'"); + // socket gets closed, either automatically/silently by this code (or possibly by the server) + + Thread.sleep(500l); // slow things down, for example 500l (long) = 500 msec (1/2 second) + + } // end while(true) // infinite loops are dangerous, be sure to kill this process! + } + catch (IOException e) + { + System.err.println("Problem with " + RobinsonTCP3exClient.class.getName() + " networking:"); // describe what is happening + System.err.println("Error: " + e); + + // Provide more helpful information to user if exception occurs due to running twice at one time + if (e instanceof java.net.BindException) { + System.err.println("*** Be sure to stop any other running instances of programs using this port!"); + } + } + finally // occurs after any other activity when shutting down + { + try { + if (socket != null) + socket.close(); + } catch (IOException e) {} + + // program exit: tell somebody about that happening. Likely cause: server drops connection. + System.out.println(); + System.out.println(RobinsonTCP3exClient.class.getName() + " exit"); + } + } +} + diff --git a/assignments/src/MV3500Cohort2021JulySeptember/homework2/Robinson/RobinsonTCP3exServer.java b/assignments/src/MV3500Cohort2021JulySeptember/homework2/Robinson/RobinsonTCP3exServer.java new file mode 100644 index 0000000000000000000000000000000000000000..442d862e57d46770929ef78b3be0e9b5bf436811 --- /dev/null +++ b/assignments/src/MV3500Cohort2021JulySeptember/homework2/Robinson/RobinsonTCP3exServer.java @@ -0,0 +1,86 @@ +package MV3500Cohort2021JulySeptember.homework2.Robinson; + +import java.io.IOException; +import java.io.OutputStream; +import java.io.PrintStream; +import java.net.InetAddress; +import java.net.ServerSocket; +import java.net.Socket; + +/** + * + * @author mrobi + */ +public class RobinsonTCP3exServer { + + public static void main(String[] args) { + try { + + // ServerSocket waits for a connection from a client. + // Notice that it is outside the loop; ServerSocket + // needs to be made only once. + System.out.println(RobinsonTCP3exServer.class.getName() + " has started..."); // it helps debugging to put this on console first + + ServerSocket serverSocket = new ServerSocket(2317); + OutputStream os; + PrintStream ps; + InetAddress localAddress, remoteAddress; + int localPort, remotePort; + int serverLoopCount = 0; + + // Server is up and waiting (i.e. "blocked" or paused) + // Loop, infinitely, waiting for client connections. + // Stop the program somewhere else. + while (true) { + + // block until connected to a client + try (Socket clientConnectionSocket = serverSocket.accept()) + { + serverLoopCount++; // increment at beginning of loop for reliability + + // Now hook everything up (i.e. set up the streams), Java style: + os = clientConnectionSocket.getOutputStream(); + ps = new PrintStream(os); + ps.println("This is response " + serverLoopCount + " produced by the Robinson server."); // this gets sent back to client! + + // Print some information locally about the Socket connection. + // This includes the port and IP numbers on both sides (the socket pair). + localAddress = clientConnectionSocket.getLocalAddress(); + remoteAddress = clientConnectionSocket.getInetAddress(); + localPort = clientConnectionSocket.getLocalPort(); + remotePort = clientConnectionSocket.getPort(); + + System.out.print ("Robinson Server loop " + serverLoopCount + ": "); + + // My socket pair connection looks like this, to localhost: + // Socket pair: (( /0:0:0:0:0:0:0:1, 2317 ), ( /0:0:0:0:0:0:0:1, 54876 )) + // Socket pair: (( /0:0:0:0:0:0:0:1, 2317 ), ( /0:0:0:0:0:0:0:1, 54881 )) + + // Why is the first IP/port the same, while the second set has different ports? + System.out.println(RobinsonTCP3exServer.class.getName() + " socket pair showing host name, address, port:"); + System.out.println(" (( " + + localAddress.getHostName() + "=" + localAddress.getHostAddress() + ", " + localPort + " ), ( " + + remoteAddress.getHostName() + "=" + remoteAddress.getHostAddress() + ", " + remotePort + " ))"); + + if ( localAddress.getHostName().equals( localAddress.getHostAddress()) || + remoteAddress.getHostName().equals(remoteAddress.getHostAddress())) + System.out.println(" note HostName matches address if host has no DNS name"); + + // Notice the use of flush() and try w/ resources. Without + // the try w/ resources the Socket object may stay open for + // a while after the client has stopped needing this + // connection. try w/ resources explicitly ends the connection. + ps.flush(); + // like it or not, you're outta here! + } + } + } catch (IOException e) { + System.err.println("Problem with " + RobinsonTCP3exServer.class.getName() + " networking: " + e); + + // Provide more helpful information to user if exception occurs due to running twice at one time + if (e instanceof java.net.BindException) { + System.err.println("*** Be sure to stop any other running instances of programs using this port!"); + } + } + } +} diff --git a/assignments/src/MV3500Cohort2021JulySeptember/homework3/Fisher/ExampleSimulationProgramFisher.java b/assignments/src/MV3500Cohort2021JulySeptember/homework3/Fisher/ExampleSimulationProgramFisher.java index 203500b18d10c72f973fbfbc2427da75f7442abf..fb4b1ee95a7077e6883f835467d4b4efd3fd94ed 100644 --- a/assignments/src/MV3500Cohort2021JulySeptember/homework3/Fisher/ExampleSimulationProgramFisher.java +++ b/assignments/src/MV3500Cohort2021JulySeptember/homework3/Fisher/ExampleSimulationProgramFisher.java @@ -34,6 +34,13 @@ import java.util.logging.Logger; */ public class ExampleSimulationProgramFisher { + + private boolean verboseComments = true; + static final String NETWORK_ADDRESS_DEFAULT = "239.1.2.3"; + static final int NETWORK_PORT_DEFAULT = 3000; + static String networkAddress = NETWORK_ADDRESS_DEFAULT; + static int networkPort = NETWORK_PORT_DEFAULT; + String DEFAULT_OUTPUT_DIRECTORY = "./pduLog"; /** * This runSimulation() method is for you, a * programmer-modifiable method for defining and running a new simulation of interest. @@ -170,7 +177,7 @@ public class ExampleSimulationProgramFisher } /* **************************** infrastructure code, modification is seldom needed ************************* */ - private boolean verboseComments = true; + //private boolean verboseComments = true; String narrativeMessage1 = new String(); String narrativeMessage2 = new String(); String narrativeMessage3 = new String(); @@ -194,11 +201,12 @@ public class ExampleSimulationProgramFisher DisThreadedNetworkInterface.PduListener pduListener; Pdu receivedPdu; - static final String NETWORK_ADDRESS_DEFAULT = "239.1.2.3"; - static final int NETWORK_PORT_DEFAULT = 3000; - static String networkAddress = NETWORK_ADDRESS_DEFAULT; - static int networkPort = NETWORK_PORT_DEFAULT; - + //static final String NETWORK_ADDRESS_DEFAULT = "239.1.2.3"; + //static final int NETWORK_PORT_DEFAULT = 3000; + //static String networkAddress = NETWORK_ADDRESS_DEFAULT; + //static int networkPort = NETWORK_PORT_DEFAULT; + // String DEFAULT_OUTPUT_DIRECTORY = "./pduLog"; + /** * Constructor design goal: additional built-in initialization conveniences can go here * to keep student efforts focused on the runSimulation() method. @@ -403,9 +411,10 @@ public class ExampleSimulationProgramFisher System.out.println("Beginning pdu save to directory " + outputDirectory); PduRecorder pduRecorder = new PduRecorder(outputDirectory, networkAddress, networkPort); // assumes save + // thisProgram.runSimulation (); // ... your simulation execution code goes in there ... - //pduRecorder.end(); + pduRecorder.stop(); thisProgram.tearDownNetworkInterface(); // make sure no processes are left lingering diff --git a/assignments/src/MV3500Cohort2021JulySeptember/homework3/Frank/FrankAssisgmentThreeSimulationWireShark.pdf b/assignments/src/MV3500Cohort2021JulySeptember/homework3/Frank/FrankAssisgmentThreeSimulationWireShark.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d1521da6db4dfd68f0304ba45b50b3826990a6ea Binary files /dev/null and b/assignments/src/MV3500Cohort2021JulySeptember/homework3/Frank/FrankAssisgmentThreeSimulationWireShark.pdf differ diff --git a/assignments/src/MV3500Cohort2021JulySeptember/homework3/Frank/PduCaptureLog9.dislog b/assignments/src/MV3500Cohort2021JulySeptember/homework3/Frank/PduCaptureLog9.dislog new file mode 100644 index 0000000000000000000000000000000000000000..8f9a5d932bf28f4510ce9946aadb85463d544538 --- /dev/null +++ b/assignments/src/MV3500Cohort2021JulySeptember/homework3/Frank/PduCaptureLog9.dislog @@ -0,0 +1,19 @@ +# Start, ENCODING_PLAINTEXT, 20210903_081736, DIS capture file, .\pduLog\PduCaptureLog9.dislog +[0,0,0,0,0,0,0,0],[7,1,1,1,74,-12,49,-59,0,-112,40,0,0,1,0,13,0,25,0,0,1,1,0,-31,1,1,1,0,0,0,0,-31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-63,68,-88,22,93,-11,3,30,-63,80,-101,96,51,-37,-21,-34,65,76,-38,101,8,67,-70,62,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] # DisPduType 01 ENTITY_STATE +[0,0,0,0,6,70,51,-28],[7,1,2,2,74,-12,87,13,0,96,40,0,0,2,0,3,0,0,0,2,0,3,0,0,0,2,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] # DisPduType 02 FIRE +[0,0,0,0,12,-24,92,104],[7,1,22,5,75,28,-50,-5,0,32,40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,-81,-46,0,0,1,8,77,86,51,53,48,48,32,70,114,97,110,107,65,115,115,105,103,110,109,101,110,116,51,83,105,109,117,108,97,116,105,111,110,0,0,0,0,0,0,0,0,0,-81,-46,0,0,0,-80,114,117,110,83,105,109,117,108,97,116,105,111,110,40,41,32,108,111,111,112,32,49,0,0] # DisPduType 22 COMMENT +[0,0,0,0,-118,-23,-42,120],[7,1,1,1,74,-12,49,-59,0,-112,40,0,0,1,0,13,0,25,0,0,1,1,0,-31,1,1,1,0,0,0,0,-31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-63,68,-88,31,-35,-11,3,30,-63,80,-101,114,-13,-37,-21,-34,65,76,-38,101,8,67,-70,62,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] # DisPduType 01 ENTITY_STATE +[0,0,0,0,-111,89,-4,64],[7,1,2,2,74,-12,87,13,0,96,40,0,0,2,0,3,0,0,0,2,0,3,0,0,0,2,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] # DisPduType 02 FIRE +[0,0,0,0,-105,-51,-31,4],[7,1,22,5,75,71,71,-115,0,32,40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,-81,-46,0,0,1,8,77,86,51,53,48,48,32,70,114,97,110,107,65,115,115,105,103,110,109,101,110,116,51,83,105,109,117,108,97,116,105,111,110,0,0,0,0,0,0,0,0,0,-81,-46,0,0,0,-80,114,117,110,83,105,109,117,108,97,116,105,111,110,40,41,32,108,111,111,112,32,50,0,0] # DisPduType 22 COMMENT +[0,0,0,1,22,32,-73,-4],[7,1,1,1,74,-12,49,-59,0,-112,40,0,0,1,0,13,0,25,0,0,1,1,0,-31,1,1,1,0,0,0,0,-31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-63,68,-88,41,93,-11,3,30,-63,80,-101,-123,-77,-37,-21,-34,65,76,-38,101,8,67,-70,62,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] # DisPduType 01 ENTITY_STATE +[0,0,0,1,28,-103,18,40],[7,1,2,2,74,-12,87,13,0,96,40,0,0,2,0,3,0,0,0,2,0,3,0,0,0,2,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] # DisPduType 02 FIRE +[0,0,0,1,35,22,-49,60],[7,1,22,5,75,113,-50,25,0,32,40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,-81,-46,0,0,1,8,77,86,51,53,48,48,32,70,114,97,110,107,65,115,115,105,103,110,109,101,110,116,51,83,105,109,117,108,97,116,105,111,110,0,0,0,0,0,0,0,0,0,-81,-46,0,0,0,-80,114,117,110,83,105,109,117,108,97,116,105,111,110,40,41,32,108,111,111,112,32,51,0,0] # DisPduType 22 COMMENT +[0,0,0,1,41,-121,33,40],[7,1,62,10,74,-12,87,13,0,32,40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,3,-87,-128,0,0,1,-72,77,49,32,65,98,114,97,109,115,32,65,99,113,117,105,114,101,115,32,84,97,114,103,101,116,32,45,32,84,54,50,32,119,105,116,104,32,105,110,32,102,105,114,105,110,103,32,100,105,115,116,97,110,99,101,0] # DisPduType 62 COMMENT_RELIABLE +[0,0,0,1,-89,-38,-69,112],[7,1,1,1,74,-12,49,-59,0,-112,40,0,0,1,0,13,0,25,0,0,1,1,0,-31,1,1,1,0,0,0,0,-31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-63,68,-88,50,-35,-11,3,30,-63,80,-101,-104,115,-37,-21,-34,65,76,-38,101,8,67,-70,62,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] # DisPduType 01 ENTITY_STATE +[0,0,0,1,-82,51,97,-104],[7,1,2,2,74,-12,87,13,0,96,40,0,0,2,0,3,0,0,0,2,0,3,0,0,0,2,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] # DisPduType 02 FIRE +[0,0,0,1,-76,-84,14,-8],[7,1,22,5,75,-98,71,77,0,32,40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,-81,-46,0,0,1,8,77,86,51,53,48,48,32,70,114,97,110,107,65,115,115,105,103,110,109,101,110,116,51,83,105,109,117,108,97,116,105,111,110,0,0,0,0,0,0,0,0,0,-81,-46,0,0,0,-80,114,117,110,83,105,109,117,108,97,116,105,111,110,40,41,32,108,111,111,112,32,52,0,0] # DisPduType 22 COMMENT +[0,0,0,2,50,-55,-62,108],[7,1,1,1,74,-12,49,-59,0,-112,40,0,0,1,0,13,0,25,0,0,1,1,0,-31,1,1,1,0,0,0,0,-31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-63,68,-88,60,93,-11,3,30,-63,80,-101,-85,51,-37,-21,-34,65,76,-38,101,8,67,-70,62,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] # DisPduType 01 ENTITY_STATE +[0,0,0,2,57,58,-37,-12],[7,1,2,2,74,-12,87,13,0,96,40,0,0,2,0,3,0,0,0,2,0,3,0,0,0,2,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] # DisPduType 02 FIRE +[0,0,0,2,63,-78,116,-60],[7,1,22,5,75,-56,-65,-33,0,32,40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,-81,-46,0,0,1,8,77,86,51,53,48,48,32,70,114,97,110,107,65,115,115,105,103,110,109,101,110,116,51,83,105,109,117,108,97,116,105,111,110,0,0,0,0,0,0,0,0,0,-81,-46,0,0,0,-80,114,117,110,83,105,109,117,108,97,116,105,111,110,40,41,32,108,111,111,112,32,53,0,0] # DisPduType 22 COMMENT +[0,0,0,2,70,54,59,40],[7,1,22,5,75,-54,-69,-39,0,32,40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,9,90,-90,0,0,1,8,77,86,51,53,48,48,32,70,114,97,110,107,65,115,115,105,103,110,109,101,110,116,51,83,105,109,117,108,97,116,105,111,110,0,0,0,0,0,0,0,0,9,90,-90,0,0,1,48,114,117,110,83,105,109,117,108,97,116,105,111,110,40,41,32,99,111,109,112,108,101,116,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,0] # DisPduType 22 COMMENT +# Finish, ENCODING_PLAINTEXT, 20210903_081746, DIS capture file, .\pduLog\PduCaptureLog9.dislog diff --git a/assignments/src/MV3500Cohort2021JulySeptember/homework3/Lentz/assignment_3_walkthrough.ipynb b/assignments/src/MV3500Cohort2021JulySeptember/homework3/Lentz/assignment_3_walkthrough.ipynb index b917e4dd644af15a01475fa8105317cd9d707edf..abcf668fe4aef7f6f49f7c7960466290a9def6e5 100644 --- a/assignments/src/MV3500Cohort2021JulySeptember/homework3/Lentz/assignment_3_walkthrough.ipynb +++ b/assignments/src/MV3500Cohort2021JulySeptember/homework3/Lentz/assignment_3_walkthrough.ipynb @@ -703,7 +703,7 @@ "# next we \n", "def send(lat, lon, alt):\n", " pdu = EntityStatePdu()\n", - " pdu.entityID.entityID = 42\n", + " pdu.entityID.entityID = 1.2.225.85.11.5\n", " pdu.entityID.siteID = 17\n", " pdu.entityID.applicationID = 23\n", "\n", diff --git a/assignments/src/MV3500Cohort2021JulySeptember/homework4/Frank/CPT Justin J.docx b/assignments/src/MV3500Cohort2021JulySeptember/homework4/Frank/CPT Justin J.docx new file mode 100644 index 0000000000000000000000000000000000000000..d9ed9fb5cb775c5b7f36fc3a7b07910b80c15b89 Binary files /dev/null and b/assignments/src/MV3500Cohort2021JulySeptember/homework4/Frank/CPT Justin J.docx differ diff --git a/assignments/src/MV3500Cohort2021JulySeptember/homework4/Lentz/.gitkeep b/assignments/src/MV3500Cohort2021JulySeptember/homework4/Lentz/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/assignments/src/MV3500Cohort2021JulySeptember/homework4/Lentz/Rick_Lentz_A4_MV3500.pdf b/assignments/src/MV3500Cohort2021JulySeptember/homework4/Lentz/Rick_Lentz_A4_MV3500.pdf new file mode 100644 index 0000000000000000000000000000000000000000..bc1d32ae9bd2c9a707d330831f2d454455dfca1e Binary files /dev/null and b/assignments/src/MV3500Cohort2021JulySeptember/homework4/Lentz/Rick_Lentz_A4_MV3500.pdf differ diff --git a/assignments/src/MV3500Cohort2021JulySeptember/projects/Fisher/.gitkeep b/assignments/src/MV3500Cohort2021JulySeptember/projects/Fisher/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/assignments/src/MV3500Cohort2021JulySeptember/projects/Fisher/MV3500ProjectFisher.java b/assignments/src/MV3500Cohort2021JulySeptember/projects/Fisher/MV3500ProjectFisher.java new file mode 100644 index 0000000000000000000000000000000000000000..ccb55e6530dad4afd4b2b6675c2ce49b5ae7f93a --- /dev/null +++ b/assignments/src/MV3500Cohort2021JulySeptember/projects/Fisher/MV3500ProjectFisher.java @@ -0,0 +1,453 @@ +/** + * Copyright (c) 2008-2021, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD open-source license, see project license.html and license.txt + * + * This Program is a modified version of ExampleSimulationProgramFisher in order to see the + * verbose plain text pdu log. I was unable to figure out the issue in my original code, + * so I just copied the example and pasted my additions into this file. + * + * @author adfis + */ +package MV3500Cohort2021JulySeptember.projects.Fisher; + +import edu.nps.moves.dis7.enumerations.*; // match any +import edu.nps.moves.dis7.pdus.*; // match any of the PDU classes, easier than listing individually +import edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface; +import edu.nps.moves.dis7.utilities.PduFactory; +import edu.nps.moves.dis7.utilities.stream.PduRecorder; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** The purpose of this program is to provide an easily modifiable example simulation program + * that includes DIS-capable entities doing tasks and reporting them to the network. + * Default settings include PDU recording turned on by default. + */ +public class MV3500ProjectFisher +{ + private boolean verboseComments = true; + static final String NETWORK_ADDRESS_DEFAULT = "239.1.2.3"; + static final int NETWORK_PORT_DEFAULT = 3000; + static String networkAddress = NETWORK_ADDRESS_DEFAULT; + static int networkPort = NETWORK_PORT_DEFAULT; + String DEFAULT_OUTPUT_DIRECTORY = "./src./MV3500Cohort2021JulySeptember./projects./Fisher./pdulogs"; + + /** + * This runSimulationLoops() method is for you, a + * programmer-modifiable method for defining and running a new simulation of interest. + * Welcome! Other parts of this program handle bookkeeping and plumbing tasks so that + * you can focus on your model entities and activities. + * Expandable support includes DIS EntityStatePdu, FirePdu and CommentPdu all available for + * modification and sending in a simulation loop. + * Continuous improvement efforts seek to make this program as easy and straightforward + * as possible for DIS simulationists to use and adapt. + * All of the other methods are setup, teardown and configuration that you may find + * interesting, even helpful, but don't really have to worry about. + */ + @SuppressWarnings("SleepWhileInLoop") // yes we do that + public void runSimulationLoops () + { + try + { + /** seconds for real-time execution (not simulation time, which may or may not be the same) */ + final double SIMULATION_LOOP_DURATION_SECONDS = 1.0; + final int SIMULATION_MAX_LOOP_COUNT = 10; // be deliberate out out there! also avoid infinite loops. + int simulationLoopCount = 0; // variable, initialized at 0 + boolean simulationComplete = false; // sentinel variable as termination condition,, are we done yet? + + // TODO reset clock to zero each time for consistent outputs + + // 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. + + // create PDU objects and set their values. + EntityID entityID_1 = new EntityID(); + entityID_1.setEntityID(1); // made-up example ID; + // create PDU objects and set their values. + EntityID entityID_2 = new EntityID(); + entityID_2.setEntityID(2); + // TODO someday, use enumerations; is there a unique site triplet for MOVES Institute? + EntityType entityType_1 = new EntityType(); + entityType_1.setCountry(Country.UNITED_STATES_OF_AMERICA_USA); // 225 = USA + entityType_1.setEntityKind(EntityKind.PLATFORM); + entityType_1.setCategory(6); //Small wheeled utility vehicle + entityType_1.setSubCategory(30); // JLTV + entityType_1.setSpecific(37); // Up armored with M240 + EntityStatePdu entityStatePdu_1 = pduFactory.makeEntityStatePdu(); + Vector3Float pEntityLinearVelocity = new Vector3Float(); + pEntityLinearVelocity.setX(1); + pEntityLinearVelocity.setY(0); + pEntityLinearVelocity.setZ(0); + entityStatePdu_1.setEntityLinearVelocity(pEntityLinearVelocity); + entityStatePdu_1.setEntityID(entityID_1); + entityStatePdu_1.getEntityLocation().setX(0).setY(0).setZ(0); + entityStatePdu_1.setForceId(ForceID.FRIENDLY); + entityStatePdu_1.setEntityType(entityType_1); + + EntityType entityType_2 = new EntityType(); + entityType_2.setCountry(Country.AFGHANISTAN_AFG); + entityType_2.setEntityKind(EntityKind.LIFE_FORM); + entityType_2.setCategory(1); // civilian male with cellphone + entityType_2.setSubCategory(171); // personal electronic + entityType_2.setSubCategory(1); // cell phone + + EntityStatePdu entityStatePdu_2 = pduFactory.makeEntityStatePdu(); + entityStatePdu_2.setEntityID(entityID_2); + entityStatePdu_2.getEntityLocation().setX(10).setY(0).setZ(100); + entityStatePdu_2.setForceId(ForceID.OPPOSING); + entityStatePdu_2.setEntityType(entityType_2); + + + FirePdu firePdu_1a = pduFactory.makeFirePdu(); // for entity 1 first weapon (if any) + // should we customize this munition? what is it for your simulation? + EntityType fireType = new EntityType(); + MunitionDescriptor fireDescriptor = new MunitionDescriptor(); + fireType.setCountry(Country.UNITED_STATES_OF_AMERICA_USA); + fireType.setEntityKind(EntityKind.PLATFORM); + fireType.setCategory(11); //US Army + fireType.setSubCategory(35); //Machine gun + fireType.setSpecific(59); //M240 + firePdu_1a.setFiringEntityID(entityID_1); + firePdu_1a.setTargetEntityID(entityID_2); + firePdu_1a.setRange(1000.0f); // range 1000m + fireDescriptor.setMunitionType(fireType); + fireDescriptor.setRate(200); //rate 200 rounds per minute + Vector3Float pVelocity = new Vector3Float(); + pVelocity.setX(0.0f); + pVelocity.setY(0.0f); + pVelocity.setZ(100.0f); + firePdu_1a.setVelocity(pVelocity); + firePdu_1a.setDescriptor(fireDescriptor); + + // TODO simulation management PDUs for startup, planning to design special class support + MunitionDescriptor pDescriotor = new MunitionDescriptor(); + pDescriotor.setWarhead(MunitionDescriptorWarhead.HE_FRAGMENTATION); //High explosive frag + pDescriotor.setQuantity(2); + pDescriotor.setFuse(MunitionDescriptorFuse.COMMAND_ELECTRONIC_REMOTELY_SET); //command detonated + DetonationPdu detonationPdu = pduFactory.makeDetonationPdu(); + detonationPdu.setDescriptor(pDescriotor); + detonationPdu.getLocationInWorldCoordinates().setX(10).setY(0).setZ(0); + detonationPdu.setExplodingEntityID(entityID_1).setSourceEntityID(entityID_2).setTargetEntityID(entityID_1); + detonationPdu.setDetonationResult(DetonationResult.ENTITY_PROXIMATE_DETONATION); + + + + // loop the simulation while allowed, programmer can set additional conditions to break out and finish + while (simulationLoopCount < SIMULATION_MAX_LOOP_COUNT) // are we done yet? + { + simulationLoopCount++; // good practice: increment loop counter as first action in that loop + + // ============================================================================================= + // * your own simulation code starts here! * + // ============================================================================================= + + // are there any other variables to modify at the beginning of your loop? + + // compute a track, update an ESPDU, whatever it is that your model is doing... + + // Where is my entity? Insert changes in position; this sample only changes X position. + entityStatePdu_1.getEntityLocation().setX(entityStatePdu_1.getEntityLocation().getX() + 1.0); // 1m per timestep + + // decide whether to fire, and then update the firePdu. Hmmm, you might want a target to shoort at! + + // etc. etc. your code goes here for your simulation of interest + + // something happens between my simulation entities, la de da de da... + System.out.println ("Entity 1 is moving a 1m per timestep in the x direction"); + + + // make your reports: narrative code for CommentPdu here (set all to empty strings to avoid sending) + narrativeMessage1 = "Entity 1 (friendly) on the move on route 1"; + //narrativeMessage2 = "runSimulation() loop " + simulationLoopCount; + //narrativeMessage3 = "this is working!"; // intentionally blank for testing + + // your loop termination condition goes here + if (simulationLoopCount > 11) // for example + { + simulationComplete = true; + } + // ============================================================================================= + // * your own simulation code is finished here! * + // ============================================================================================= + + // staying synchronized with timestep: wait duration for elapsed time in this loop + // Thread.sleep needs a (long) parameter for milliseconds, which are clumsy to use sometimes + Thread.sleep((long)(SIMULATION_LOOP_DURATION_SECONDS * 1000)); // seconds * (1000 msec/sec) = milliseconds + System.out.println ("... [Pausing for " + SIMULATION_LOOP_DURATION_SECONDS + " seconds]"); + + // OK now send the status PDUs for this loop, and then continue + System.out.println ("sending PDUs for simulation step " + simulationLoopCount + ", monitor loopback to confirm sent"); + //sendAllPdusForLoopTimestep(entityStatePdu_1, timeStepComment, narrativeMessage1); + sendSinglePdu(entityStatePdu_1); // me too i.e. 2! + System.out.println ("... [PDUs successfully sent for this loop]"); + + int contactCounter = 0; + if (entityStatePdu_1.getEntityLocation().getX() == 10) + { + sendSinglePdu(detonationPdu); + sendCommentPdu(otherComment, "IED detonated near Entity 1"); + while (contactCounter < 4) + { + contactCounter++; + sendSinglePdu(entityStatePdu_2); + sendSinglePdu(firePdu_1a); + sendCommentPdu(otherComment, "Entity 2 is hit"); + } + } + + // =============================== + // loop now finished, check whether to terminate if simulation complete, otherwise continue + if (simulationComplete || (simulationLoopCount > 10000)) // for example; including fail-safe condition is good + { + //sendSinglePdu(detonationPdu); + System.out.println ("... [Termination condition met, simulationComplete=" + simulationComplete + "]"); // ", final loopCount=" + loopCount + + break; + } + } // end of simulation loop + + narrativeMessage2 = "runSimulation() completed successfully"; // all done + sendCommentPdu(otherComment, "Entity has been neutralized. Simulation over."); + //sendCommentPdu(narrativeComment, narrativeMessage1, narrativeMessage2, narrativeMessage3); + System.out.println ("... [final CommentPdu successfully sent for simulation]"); + // TODO simulation management PDUs + } + catch (InterruptedException iex) // handle any exception that your code might choose to provoke! + { + Logger.getLogger(MV3500ProjectFisher.class.getName()).log(Level.SEVERE, null, iex); + } + } + /* **************************** infrastructure code, modification is seldom needed ************************* */ + + String narrativeMessage1 = new String(); + String narrativeMessage2 = new String(); + String narrativeMessage3 = new String(); + + /* VariableRecordType enumerations have potential use with CommentPdu logs */ + /* TODO contrast to EntityType */ + VariableRecordType descriptionComment = VariableRecordType.DESCRIPTION; + VariableRecordType narrativeComment = VariableRecordType.COMPLETE_EVENT_REPORT; + VariableRecordType statusComment = VariableRecordType.APPLICATION_STATUS; + VariableRecordType timeStepComment = VariableRecordType.APPLICATION_TIMESTEP; + VariableRecordType otherComment = VariableRecordType.OTHER; + + /** + * Output prefix to identify this class, helps with logging + */ + private final static String TRACE_PREFIX = "[" + MV3500ProjectFisher.class.getName() + "] "; + + // class variables + PduFactory pduFactory = new PduFactory(); + DisThreadedNetworkInterface disNetworkInterface; + DisThreadedNetworkInterface.PduListener pduListener; + Pdu receivedPdu; + PduRecorder pduRecorder; + + /** + * Constructor design goal: additional built-in initialization conveniences can go here + * to keep student efforts focused on the runSimulation() method. + */ + public MV3500ProjectFisher() + { + // Constructor is under consideration. Constructor is not currently needed. + } + + /** + * Utility Constructor that allows your example simulation program to override default network address and port + * @param address network address to use + * @param port corresponding network port to use + */ + public MV3500ProjectFisher(String address, int port) + { + setNetworkAddress(address); + + setNetworkPort(port); + } + + /** + * @return the networkAddress + */ + public String getNetworkAddress() + { + return networkAddress; + } + + /** + * @param newNetworkAddress the networkAddress to set + */ + public final void setNetworkAddress(String newNetworkAddress) + { + MV3500ProjectFisher.networkAddress = newNetworkAddress; + } + + /** + * @return the networkPort + */ + public int getNetworkPort() + { + return networkPort; + } + + /** + * @param newNetworkPort the networkPort to set + */ + public final void setNetworkPort(int newNetworkPort) + { + MV3500ProjectFisher.networkPort = newNetworkPort; + } + + /** + * Initialize network interface, choosing best available network interface + */ + public void setUpNetworkInterface() + { + disNetworkInterface = new DisThreadedNetworkInterface(getNetworkAddress(), getNetworkPort()); + disNetworkInterface.setDescriptor ("MV3500ProjectFisher pdu looping"); + + System.out.println("Network confirmation:" + + " address=" + disNetworkInterface.getAddress()+ // disNetworkInterface.getMulticastGroup() + + " port=" + disNetworkInterface.getPort()); // + disNetworkInterface.getDisPort()); + pduListener = (Pdu newPdu) -> { + receivedPdu = newPdu; + } /** Callback handler for listener */ ; + disNetworkInterface.addListener(pduListener); + + String outputDirectory = DEFAULT_OUTPUT_DIRECTORY; + System.out.println("Beginning pdu save to directory " + outputDirectory); + pduRecorder = new PduRecorder(outputDirectory, getNetworkAddress(), getNetworkPort()); // assumes save + pduRecorder.setDescriptor ("MV3500ProjectFisher pduRecorder"); + pduRecorder.start(); // begin running + } + + /** All done, release network resources */ + public void tearDownNetworkInterface() + { + pduRecorder.stop(); + + disNetworkInterface.removeListener(pduListener); + + disNetworkInterface.close(); +// disNetworkInterface.kill(); // renamed as close(), deprecated +// disNetworkInterface = null; // making sure no possibility of zombie process remaining... + } + + /** + * Send a single Protocol Data Unit (PDU) of any type + * @param pdu the pdu to send + */ + private void sendSinglePdu(Pdu pdu) + { + try + { + disNetworkInterface.send(pdu); + Thread.sleep(100); // TODO consider refactoring the wait logic and moving externally + } + catch (InterruptedException ex) + { + System.err.println(this.getClass().getName() + " Error sending PDU: " + ex.getLocalizedMessage()); + System.exit(1); + } + } + + /** + * Send Comment PDU + * @see <a href="https://docs.oracle.com/javase/tutorial/java/javaOO/arguments.html">Passing Information to a Method or a Constructor</a> Arbitrary Number of Arguments + * @param commentType enumeration value describing purpose of the narrative comment + * @param comments String array of narrative comments + */ + public void sendCommentPdu(VariableRecordType commentType, + // vararg... variable-length set of String comments can optionally follow + String... comments) + { + sendAllPdusForLoopTimestep (null, commentType, comments); + } + + /** + * Send EntityState, Fire, Comment PDUs that got updated for this loop, reflecting state of current simulation timestep. + * @see <a href="https://docs.oracle.com/javase/tutorial/java/javaOO/arguments.html">Passing Information to a Method or a Constructor</a> Arbitrary Number of Arguments + * @param entityStatePdu the ESPDU to send, if any + * @param commentType enumeration value describing purpose of the narrative comment + * @param comments String array of narrative comments + */ + public void sendAllPdusForLoopTimestep(EntityStatePdu entityStatePdu, VariableRecordType commentType, + // vararg... variable-length set of String comments can optionally follow + String... comments) + { + if (entityStatePdu != null) + sendSinglePdu(entityStatePdu); + + //if (firePdu != null) + // sendSinglePdu(firePdu); // bang + + if ((comments != null) && (comments.length > 0)) + { + ArrayList<String> newCommentsList = new ArrayList<>(); + for (String comment : comments) + { + if (!comment.isEmpty()) + { + newCommentsList.add(comment); // OK found something to send + } + } + if (!newCommentsList.isEmpty()) + { + if (commentType == null) + commentType = otherComment; // fallback value otherComment + // now build the commentPdu from these string inputs, thus constructing a narrative entry + CommentPdu commentPdu = pduFactory.makeCommentPdu(commentType, newCommentsList.toArray(new String[0])); // comments); + sendSinglePdu(commentPdu); + if (isVerboseComments()) + System.out.println("*** [Narrative comment sent: " + commentType.name() + "] " + newCommentsList.toString()); + } + } + } + + /** + * Main method is first executed when a program instance is loaded. + * @see <a href="https://docs.oracle.com/javase/tutorial/getStarted/application/index.html">Java Tutorials: A Closer Look at the "Hello World!" Application</a> + * @param args command-line arguments are an array of optional String parameters that are passed from execution environment during invocation + */ + public static void main(String[] args) + { + System.out.println(TRACE_PREFIX + "started..."); + + MV3500ProjectFisher thisProgram = new MV3500ProjectFisher(); // creates instance + + // initial execution: can handle args array of initialization arguments here + if (args.length == 2) + { + if ((args[0] != null) && !args[0].isEmpty()) + thisProgram.setNetworkAddress(args[0]); + + if ((args[1] != null) && !args[1].isEmpty()) + thisProgram.setNetworkPort(Integer.parseInt(args[1])); + } + else if (args.length != 0) + { + System.err.println("Usage: " + thisProgram.getClass().getName() + " [address port]"); + System.exit(-1); + } + // OK here we go... + + thisProgram.setUpNetworkInterface(); + + thisProgram.runSimulationLoops (); // ... your simulation execution code goes in there ... + + thisProgram.tearDownNetworkInterface(); // make sure no processes are left lingering + + System.out.println(TRACE_PREFIX + "complete."); // report successful completion + } + + /** + * @return whether verboseComments mode is enabled + */ + public boolean isVerboseComments() { + return verboseComments; + } + + /** + * @param newVerboseComments whether verboseComments mode is enabled + */ + public void setVerboseComments(boolean newVerboseComments) { + this.verboseComments = newVerboseComments; + } +} diff --git a/assignments/src/MV3500Cohort2021JulySeptember/projects/Fisher/README b/assignments/src/MV3500Cohort2021JulySeptember/projects/Fisher/README new file mode 100644 index 0000000000000000000000000000000000000000..fb73844fe4364e1d9683fc82736fa61da66c53f2 --- /dev/null +++ b/assignments/src/MV3500Cohort2021JulySeptember/projects/Fisher/README @@ -0,0 +1,9 @@ +The program I have designed is branching off of Homework 3 to expand the scenario a bit and add some more +PDUs to be utilized. + +My scenario starts with a US vehicle (JLTV) starting at (0,0,0) and moving on a straight line route to (10,0,0). +While on the route, the unit is struck by a command detonated IED by a civilain male with a cell phone at +coordinates (10,0,100). Upon being struck, the friendly unit fires at the enemy with an M240 machine gun with a +range of 1100m firing at the rapid rate (200 rounds per minute). + +After a few seconds of firing, the threat has been neutralized and the simulation ends. diff --git a/assignments/src/MV3500Cohort2021JulySeptember/projects/Lentz/.gitkeep b/assignments/src/MV3500Cohort2021JulySeptember/projects/Lentz/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/assignments/src/MV3500Cohort2021JulySeptember/projects/Lentz/README.md b/assignments/src/MV3500Cohort2021JulySeptember/projects/Lentz/README.md new file mode 100644 index 0000000000000000000000000000000000000000..78e86d6a7993a2bd4e80d86a043e7f6bb7345abb --- /dev/null +++ b/assignments/src/MV3500Cohort2021JulySeptember/projects/Lentz/README.md @@ -0,0 +1,4 @@ +## Final Course Project + +Final project deliverables: +* TBD diff --git a/examples/src/OpenDis7Examples/ExampleSimulationProgram.java b/examples/src/OpenDis7Examples/ExampleSimulationProgram.java index c96bbe1852b3789d374d84785ed506d279ea3f83..d26ee14e6dd40caf8cff30a3f95e33a32270fac4 100644 --- a/examples/src/OpenDis7Examples/ExampleSimulationProgram.java +++ b/examples/src/OpenDis7Examples/ExampleSimulationProgram.java @@ -72,7 +72,7 @@ public class ExampleSimulationProgram entityStatePdu_2.setForceId(ForceID.OPPOSING); FirePdu firePdu_1a = pduFactory.makeFirePdu(); // for entity 1 first weapon (if any) - FirePdu firePdu_1b = pduFactory.makeFirePdu(); // for entity 1 second weapon (if any) +// FirePdu firePdu_1b = pduFactory.makeFirePdu(); // for entity 1 second weapon (if any) // should we customize this munition? what is it for your simulation? // TODO simulation management PDUs for startup, planning to design special class support @@ -250,7 +250,7 @@ public class ExampleSimulationProgram System.out.println("Beginning pdu save to directory " + outputDirectory); pduRecorder = new PduRecorder(outputDirectory, getNetworkAddress(), getNetworkPort()); // assumes save pduRecorder.setDescriptor ("ExampleSimulationProgram pduRecorder"); -// pduRecorder.setVerbose(true); // TODO + pduRecorder.setVerbose(true); pduRecorder.start(); // begin running } diff --git a/examples/src/OpenDis7Examples/ExampleSimulationProgramLog.txt b/examples/src/OpenDis7Examples/ExampleSimulationProgramLog.txt index 696e044db49d32c1a9d2128e949f1228f7f8b3f4..f8fa99bedaeddae23ff02ccbffc524b31206f44d 100644 --- a/examples/src/OpenDis7Examples/ExampleSimulationProgramLog.txt +++ b/examples/src/OpenDis7Examples/ExampleSimulationProgramLog.txt @@ -7,12 +7,12 @@ Compiling 1 source file to C:\x-nps-gitlab\NetworkedGraphicsMV3500\examples\buil compile-single: run-single: [OpenDis7Examples.ExampleSimulationProgram] started... -[DisThreadedNetworkInterface] using network interface Intel(R) Centrino(R) Ultimate-N 6300 AGN +[DisThreadedNetworkInterface] using network interface PANGP Virtual Ethernet Adapter [DisThreadedNetworkInterface] datagramSocket.joinGroup address=239.1.2.3 port=3000 start() complete 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\PduCaptureLog42.dislog -[DisThreadedNetworkInterface] using network interface Intel(R) Centrino(R) Ultimate-N 6300 AGN +Recorder log file open: C:\x-nps-gitlab\NetworkedGraphicsMV3500\examples\pduLog\PduCaptureLog3.dislog +[DisThreadedNetworkInterface] using network interface PANGP Virtual Ethernet Adapter [DisThreadedNetworkInterface] datagramSocket.joinGroup address=239.1.2.3 port=3000 start() complete [PduRecorder ExampleSimulationProgram pduRecorder] listening to IP address 239.1.2.3 on port 3000 ... My simulation just did something, no really... @@ -25,74 +25,89 @@ sending PDUs for simulation step 1, monitor loopback to confirm sent [DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 2] DisPduType 02 FIRE, size 96 bytes) [DisThreadedNetworkInterface ExampleSimulationProgram pduRecorder] [receipt 2] DisPduType 02 FIRE, size 96 bytes) [DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 3] DisPduType 22 COMMENT, size 104 bytes) -[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 3] DisPduType 22 COMMENT, size 104 bytes) [DisThreadedNetworkInterface ExampleSimulationProgram pduRecorder] [receipt 3] DisPduType 22 COMMENT, size 104 bytes) +[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 3] DisPduType 22 COMMENT, size 104 bytes) *** [Narrative comment sent: APPLICATION_TIMESTEP] [MV3500 ExampleSimulationProgram, runSimulation() loop 1] +[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 4] DisPduType 01 ENTITY_STATE, size 144 bytes) +[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 4] DisPduType 01 ENTITY_STATE, size 144 bytes) +[DisThreadedNetworkInterface ExampleSimulationProgram pduRecorder] [receipt 4] DisPduType 01 ENTITY_STATE, size 144 bytes) ... [PDUs successfully sent for this loop] ... My simulation just did something, no really... ... [Pausing for 1.0 seconds] sending PDUs for simulation step 2, monitor loopback to confirm sent -[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 4] DisPduType 01 ENTITY_STATE, size 144 bytes) -[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 4] DisPduType 01 ENTITY_STATE, size 144 bytes) -[DisThreadedNetworkInterface ExampleSimulationProgram pduRecorder] [receipt 4] DisPduType 01 ENTITY_STATE, size 144 bytes) -[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 5] DisPduType 02 FIRE, size 96 bytes) -[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 5] DisPduType 02 FIRE, size 96 bytes) -[DisThreadedNetworkInterface ExampleSimulationProgram pduRecorder] [receipt 5] DisPduType 02 FIRE, size 96 bytes) -[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 6] DisPduType 22 COMMENT, size 104 bytes) -[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 6] DisPduType 22 COMMENT, size 104 bytes) -[DisThreadedNetworkInterface ExampleSimulationProgram pduRecorder] [receipt 6] DisPduType 22 COMMENT, size 104 bytes) +[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 5] DisPduType 01 ENTITY_STATE, size 144 bytes) +[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 5] DisPduType 01 ENTITY_STATE, size 144 bytes) +[DisThreadedNetworkInterface ExampleSimulationProgram pduRecorder] [receipt 5] DisPduType 01 ENTITY_STATE, 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 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 pduRecorder] [receipt 7] DisPduType 22 COMMENT, size 104 bytes) *** [Narrative comment sent: APPLICATION_TIMESTEP] [MV3500 ExampleSimulationProgram, runSimulation() loop 2] +[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 8] DisPduType 01 ENTITY_STATE, size 144 bytes) +[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 8] DisPduType 01 ENTITY_STATE, size 144 bytes) +[DisThreadedNetworkInterface ExampleSimulationProgram pduRecorder] [receipt 8] DisPduType 01 ENTITY_STATE, size 144 bytes) ... [PDUs successfully sent for this loop] ... My simulation just did something, no really... ... [Pausing for 1.0 seconds] sending PDUs for simulation step 3, monitor loopback to confirm sent -[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 7] DisPduType 01 ENTITY_STATE, size 144 bytes) -[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 7] DisPduType 01 ENTITY_STATE, size 144 bytes) -[DisThreadedNetworkInterface ExampleSimulationProgram pduRecorder] [receipt 7] DisPduType 01 ENTITY_STATE, size 144 bytes) -[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 8] DisPduType 02 FIRE, size 96 bytes) -[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 8] DisPduType 02 FIRE, size 96 bytes) -[DisThreadedNetworkInterface ExampleSimulationProgram pduRecorder] [receipt 8] DisPduType 02 FIRE, size 96 bytes) -[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 9] DisPduType 22 COMMENT, size 104 bytes) -[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 9] DisPduType 22 COMMENT, size 104 bytes) -[DisThreadedNetworkInterface ExampleSimulationProgram pduRecorder] [receipt 9] DisPduType 22 COMMENT, size 104 bytes) +[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 9] DisPduType 01 ENTITY_STATE, size 144 bytes) +[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 9] DisPduType 01 ENTITY_STATE, size 144 bytes) +[DisThreadedNetworkInterface ExampleSimulationProgram pduRecorder] [receipt 9] DisPduType 01 ENTITY_STATE, 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 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 ExampleSimulationProgram pduRecorder] [receipt 11] DisPduType 22 COMMENT, size 104 bytes) *** [Narrative comment sent: APPLICATION_TIMESTEP] [MV3500 ExampleSimulationProgram, runSimulation() loop 3] +[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 12] DisPduType 01 ENTITY_STATE, size 144 bytes) +[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 12] DisPduType 01 ENTITY_STATE, size 144 bytes) +[DisThreadedNetworkInterface ExampleSimulationProgram pduRecorder] [receipt 12] DisPduType 01 ENTITY_STATE, size 144 bytes) ... [PDUs successfully sent for this loop] ... My simulation just did something, no really... ... [Pausing for 1.0 seconds] sending PDUs for simulation step 4, monitor loopback to confirm sent -[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 10] DisPduType 01 ENTITY_STATE, size 144 bytes) -[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 10] DisPduType 01 ENTITY_STATE, size 144 bytes) -[DisThreadedNetworkInterface ExampleSimulationProgram pduRecorder] [receipt 10] DisPduType 01 ENTITY_STATE, size 144 bytes) -[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 11] DisPduType 02 FIRE, size 96 bytes) -[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 11] DisPduType 02 FIRE, size 96 bytes) -[DisThreadedNetworkInterface ExampleSimulationProgram pduRecorder] [receipt 11] DisPduType 02 FIRE, size 96 bytes) -[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 12] DisPduType 22 COMMENT, size 104 bytes) -[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 12] DisPduType 22 COMMENT, size 104 bytes) -[DisThreadedNetworkInterface ExampleSimulationProgram pduRecorder] [receipt 12] DisPduType 22 COMMENT, size 104 bytes) -*** [Narrative comment sent: APPLICATION_TIMESTEP] [MV3500 ExampleSimulationProgram, runSimulation() loop 4] -... [PDUs successfully sent for this loop] -... My simulation just did something, no really... -... [Pausing for 1.0 seconds] -sending PDUs for simulation step 5, monitor loopback to confirm sent [DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 13] DisPduType 01 ENTITY_STATE, size 144 bytes) [DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 13] DisPduType 01 ENTITY_STATE, size 144 bytes) [DisThreadedNetworkInterface ExampleSimulationProgram pduRecorder] [receipt 13] DisPduType 01 ENTITY_STATE, size 144 bytes) [DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 14] DisPduType 02 FIRE, size 96 bytes) [DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 14] DisPduType 02 FIRE, size 96 bytes) [DisThreadedNetworkInterface ExampleSimulationProgram pduRecorder] [receipt 14] DisPduType 02 FIRE, size 96 bytes) -[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 15] DisPduType 22 COMMENT, size 104 bytes) [DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 15] DisPduType 22 COMMENT, size 104 bytes) +[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 15] DisPduType 22 COMMENT, size 104 bytes) [DisThreadedNetworkInterface ExampleSimulationProgram pduRecorder] [receipt 15] DisPduType 22 COMMENT, size 104 bytes) +*** [Narrative comment sent: APPLICATION_TIMESTEP] [MV3500 ExampleSimulationProgram, runSimulation() loop 4] +[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 16] DisPduType 01 ENTITY_STATE, size 144 bytes) +[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 16] DisPduType 01 ENTITY_STATE, size 144 bytes) +[DisThreadedNetworkInterface ExampleSimulationProgram pduRecorder] [receipt 16] DisPduType 01 ENTITY_STATE, size 144 bytes) +... [PDUs successfully sent for this loop] +... My simulation just did something, no really... +... [Pausing for 1.0 seconds] +sending PDUs for simulation step 5, monitor loopback to confirm sent +[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 17] DisPduType 01 ENTITY_STATE, size 144 bytes) +[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 17] DisPduType 01 ENTITY_STATE, size 144 bytes) +[DisThreadedNetworkInterface ExampleSimulationProgram pduRecorder] [receipt 17] DisPduType 01 ENTITY_STATE, size 144 bytes) +[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 18] DisPduType 02 FIRE, size 96 bytes) +[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 18] DisPduType 02 FIRE, size 96 bytes) +[DisThreadedNetworkInterface ExampleSimulationProgram pduRecorder] [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 pduRecorder] [receipt 19] DisPduType 22 COMMENT, size 104 bytes) *** [Narrative comment sent: APPLICATION_TIMESTEP] [MV3500 ExampleSimulationProgram, runSimulation() loop 5] +[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 20] DisPduType 01 ENTITY_STATE, size 144 bytes) +[DisThreadedNetworkInterface ExampleSimulationProgram pduRecorder] [receipt 20] DisPduType 01 ENTITY_STATE, size 144 bytes) +[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 20] DisPduType 01 ENTITY_STATE, size 144 bytes) ... [PDUs successfully sent for this loop] ... [Termination condition met, simulationComplete=true] -[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [sending 16] DisPduType 22 COMMENT, size 120 bytes) -[DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] [receipt 16] DisPduType 22 COMMENT, size 120 bytes) -[DisThreadedNetworkInterface ExampleSimulationProgram pduRecorder] [receipt 16] DisPduType 22 COMMENT, size 120 bytes) +[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 pduRecorder] [receipt 21] DisPduType 22 COMMENT, size 120 bytes) *** [Narrative comment sent: COMPLETE_EVENT_REPORT] [MV3500 ExampleSimulationProgram, runSimulation() completed successfully] ... [final CommentPdu successfully sent for simulation] -Closing recorder log file: C:\x-nps-gitlab\NetworkedGraphicsMV3500\examples\pduLog\PduCaptureLog42.dislog +Closing recorder log file: C:\x-nps-gitlab\NetworkedGraphicsMV3500\examples\pduLog\PduCaptureLog3.dislog [DisThreadedNetworkInterface ExampleSimulationProgram pdu looping] datagramSocket.leaveGroup address=239.1.2.3 port=3000 stop() complete [OpenDis7Examples.ExampleSimulationProgram] complete. BUILD SUCCESSFUL (total time: 11 seconds) diff --git a/examples/src/OpenDis7Examples/SimulationManager.java b/examples/src/OpenDis7Examples/SimulationManager.java new file mode 100644 index 0000000000000000000000000000000000000000..6a8b33dab5f46a096237af464a7af9c87643cb99 --- /dev/null +++ b/examples/src/OpenDis7Examples/SimulationManager.java @@ -0,0 +1,300 @@ +/* + * Copyright (c) 2008-2021, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD open-source license, see project license.html and license.txt + */ +package OpenDis7Examples; + +import java.util.ArrayList; + +/** + * Manage overall simulation choreography for a DIS exercise. + * TODO once operation is working satisfactorily, this class will be moved into the open-dis7-java distribution utilities. + * @see <a href="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/blob/master/specifications/README.md" target="_blank">Networked Graphics MV3500, Specification Documents, IEEE and SISO</a> + * @see <a href="https://ieeexplore.ieee.org/document/6387564" target="_blank">1278.1-2012. IEEE Standard for Distributed Interactive Simulation (DIS) - Application Protocols</a> + * @see <a href="https://ieeexplore.ieee.org/document/587529" target="_blank">1278.3-1996. IEEE Recommended Practice for Distributed Interactive Simulation - Exercise Management and Feedback</a> + * @author brutzman + */ +public class SimulationManager +{ + private ArrayList<RecordType> entityRecordList = new ArrayList<>(); + private ArrayList<RecordType> hostRecordList = new ArrayList<>(); + private ArrayList<RecordType> applicationRecordList = new ArrayList<>(); + + /** + * Start the simulation according to specifications + */ + public void SimulationStart() + { + // TODO + } + /** + * Pause the simulation according to specifications + */ + public void SimulationPause() + { + // TODO + } + /** + * Resume the simulation according to specifications + */ + public void SimulationResume() + { + // TODO + } + /** + * Stop the simulation according to specifications + */ + public void SimulationStop() + { + // TODO + } + + /** + * Simple simulation record type + */ + public class RecordType + { + private int id = -1; + private String name = new String(); + private String description = new String(); + private String reference = new String(); + + /** + * Constructor for new record + * @param id identifying number + * @param name common name + * @param description longer description + * @param reference formal reference for this record, if any + */ + public RecordType (int id, String name, String description, String reference) + { + this.id = id; + this.name = name; + this.description = description; + this.reference = reference; + } + /** + * Utility constructor for new record, description and reference remain blank + * @param id identifying number + * @param name common name + */ + public RecordType (int id, String name) + { + this.id = id; + this.name = name; + this.description = ""; + this.reference = ""; + } + + /** + * Simple representation of record + * @return id,name,"description" + */ + @Override + public String toString() + { + return "id" + "," + name + ",\"" + description + "\""; + } + + /** + * @return the id + */ + public int getId() { + return id; + } + + /** + * @param newID the id to set + */ + public void setId(int newID) { + this.id = newID; + } + + /** + * @return the name + */ + public String getName() { + return name; + } + + /** + * @param newName the name to set + */ + public void setName(String newName) { + this.name = newName; + } + + /** + * @return the description + */ + public String getDescription() { + return description; + } + + /** + * @param newDescription the description to set + */ + public void setDescription(String newDescription) { + this.description = newDescription; + } + + /** + * @return the reference + */ + public String getReference() { + return reference; + } + + /** + * @param newReference the reference to set + */ + public void setReference(String newReference) { + this.reference = newReference; + } + } + + /** + * Get a single entityRecord from list + * @param index which record to retrieve + * @return the record matching this index + */ + public RecordType getEntityRecordByIndex(int index) + { + if (entityRecordList.isEmpty()) + { + System.err.println ("*** getEntityRecordByIndex list is empty, unable to get index=" + index); + return null; + } + else if (entityRecordList.size() <= index) + { + System.err.println ("*** getEntityRecordByIndex list has size=" + entityRecordList.size() + ", unable to get index=" + index); + return null; + } + else if (index < 0) + { + System.err.println ("*** getEntityRecordByIndex cannot retrieve illegal index=" + index); + return null; + } + else return entityRecordList.get(index); + } + + /** + * Get a single hostRecord from list + * @param index which record to retrieve + * @return the record matching this index + */ + public RecordType getHostRecordByIndex(int index) + { + if (hostRecordList.isEmpty()) + { + System.err.println ("*** getHostRecordByIndex list is empty, unable to get index=" + index); + return null; + } + else if (hostRecordList.size() <= index) + { + System.err.println ("*** getHostRecordByIndex list has size=" + hostRecordList.size() + ", unable to get index=" + index); + return null; + } + else if (index < 0) + { + System.err.println ("*** getHostRecordByIndex cannot retrieve illegal index=" + index); + return null; + } + else return hostRecordList.get(index); + } + + /** + * Get a single applicationRecord from list + * @param index which record to retrieve + * @return the record matching this index + */ + public RecordType getApplicationRecordByIndex(int index) + { + if (applicationRecordList.isEmpty()) + { + System.err.println ("*** getApplicationRecordByIndex list is empty, unable to get index=" + index); + return null; + } + else if (applicationRecordList.size() <= index) + { + System.err.println ("*** getApplicationRecordByIndex list has size=" + applicationRecordList.size() + ", unable to get index=" + index); + return null; + } + else if (index < 0) + { + System.err.println ("*** getApplicationRecordByIndex cannot retrieve illegal index=" + index); + return null; + } + else return applicationRecordList.get(index); + } + + /** + * Get a single entityRecord from list matching ID + * @param valueOfInterest id for record to retrieve + * @return the record matching this ID + */ + public RecordType getEntityRecordByID(int valueOfInterest) + { + for (RecordType entity : entityRecordList) + { + if (entity.getId() == valueOfInterest) + return entity; + } + System.err.println ("*** getEntityRecordByID cannot find id=" + valueOfInterest); + return null; + } + /** + * Get a single hostRecord from list matching ID + * @param valueOfInterest id for record to retrieve + * @return the record matching this ID + */ + public RecordType getHostRecordByID(int valueOfInterest) + { + for (RecordType host : hostRecordList) + { + if (host.getId() == valueOfInterest) + return host; + } + System.err.println ("*** getHostRecordByID cannot find id=" + valueOfInterest); + return null; + } + /** + * Get a single applicationRecord from list matching ID + * @param valueOfInterest id for record to retrieve + * @return the record matching this ID + */ + public RecordType getApplicationRecordByID(int valueOfInterest) + { + for (RecordType application : applicationRecordList) + { + if (application.getId() == valueOfInterest) + return application; + } + System.err.println ("*** getApplicationRecordByID cannot find id=" + valueOfInterest); + return null; + } + + /** + * Provide entire entityRecordList + * @return the entityRecordList + */ + public ArrayList<RecordType> getEntityRecordList() { + return entityRecordList; + } + + /** + * Provide entire hostRecordList + * @return the hostRecordList + */ + public ArrayList<RecordType> getHostRecordList() { + return hostRecordList; + } + + /** + * Provide entire applicationRecordList + * @return the applicationRecordList + */ + public ArrayList<RecordType> getApplicationRecordList() { + return applicationRecordList; + } +} diff --git a/lib/open-dis7-enumerations-classes.jar b/lib/open-dis7-enumerations-classes.jar index a079fa4622560cc1e2334f0d12eff267b0a9d9f1..1c4756d186a53521f0094fa1f1af1f26a32538c5 100644 Binary files a/lib/open-dis7-enumerations-classes.jar and b/lib/open-dis7-enumerations-classes.jar differ diff --git a/lib/open-dis7-enumerations-javadoc.jar b/lib/open-dis7-enumerations-javadoc.jar index d02879e023f7a9a3cea3057e50fd9569e019dacd..7cb04ed9bfef503c543fff57eed77f66aa1422e8 100644 Binary files a/lib/open-dis7-enumerations-javadoc.jar and b/lib/open-dis7-enumerations-javadoc.jar differ diff --git a/lib/open-dis7-enumerations-source.jar b/lib/open-dis7-enumerations-source.jar index e2ce6f6356ec04c573bea6930bb405a40b2297e4..0b7c2f3e69563782d3d4642f0a81f71dafeb672f 100644 Binary files a/lib/open-dis7-enumerations-source.jar and b/lib/open-dis7-enumerations-source.jar differ diff --git a/lib/open-dis7-pdus-classes.jar b/lib/open-dis7-pdus-classes.jar index 4983833874ab26c74582d3176876ecc2fa2e0abe..2762d23fa8b64fabb1398f82b6bf42bacee213ce 100644 Binary files a/lib/open-dis7-pdus-classes.jar and b/lib/open-dis7-pdus-classes.jar differ diff --git a/lib/open-dis7-pdus-javadoc.jar b/lib/open-dis7-pdus-javadoc.jar index 9fafd0ae3d4808af56c1dfb93bcc5f54ff0a4310..087e29b5e72b456473e7cd2160d9392b1c49dad8 100644 Binary files a/lib/open-dis7-pdus-javadoc.jar and b/lib/open-dis7-pdus-javadoc.jar differ diff --git a/lib/open-dis7-pdus-source.jar b/lib/open-dis7-pdus-source.jar index 4886c13dd484d3ab4f97c6ab9ca3d4740ccdc70c..6bd2637105a95e3f8a9fa6be0704cc2b8a9f1a6a 100644 Binary files a/lib/open-dis7-pdus-source.jar and b/lib/open-dis7-pdus-source.jar differ diff --git a/specifications/README.md b/specifications/README.md index 87dd1bee9c6505e61f30d2af649a9f56cde5dc80..529a5728d81d2103bf2f3ba163f609189e2ae51a 100644 --- a/specifications/README.md +++ b/specifications/README.md @@ -1,6 +1,9 @@ # Specification Documents, IEEE and SISO # Distributed Interactive Simulation (DIS) Protocol +<!-- To properly view Markdown, go the the online web page: + https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/blob/master/specifications/README.md --> + *Distributed Interactive Simulation (DIS) is an [Institute of Electrical and Electronics Engineers (IEEE)](https://www.ieee.org) standard for conducting real-time platform-level wargaming across multiple host computers and is used worldwide, @@ -12,7 +15,7 @@ space exploration and medicine.* ## Working-Group Resources -**DIS/RPR FOM Product Support Group** <img src="SisoLogo.jpg" width="314" align="right"/> +**DIS/RPR FOM Product Support Group** <a href="https://www.sisostds.org/StandardsActivities/SupportGroups/DISRPRFOMPSG.aspx" target="_blank"><img src="SisoLogo.jpg" width="314" align="right"/></a> * "The Distributed Interactive Simulation / Real-time Platform Reference Federation Object Model (DIS / RPR FOM) Product Support Group (PSG) is a permanent support group chartered by the SISO Standards Activity Committee to support multiple DIS-related products." * [Distributed Interactive Simulation / Real-time Platform Reference Federation Object Model (DIS / RPR FOM) Product Support Group (PSG)](https://www.sisostds.org/StandardsActivities/SupportGroups/DISRPRFOMPSG.aspx) @@ -29,7 +32,7 @@ Specification download links follow. For free access, IEEE standards must be do An IEEEExplore account is required to access or purchase these standards documents. Meanwhile, NPS personnel can obtain the following standards without charge when accessing via nps.edu networks. -**1278.1-2012. IEEE Standard for Distributed Interactive Simulation (DIS) - Application Protocols** <img src="IeeeLogo.jpg" width="120" align="right"/> +**1278.1-2012. IEEE Standard for Distributed Interactive Simulation (DIS) - Application Protocols** <a href="https://ieeexplore.ieee.org/document/6387564" target="_blank"><img src="IeeeLogo.jpg" width="120" align="right"/></a> * https://ieeexplore.ieee.org/document/6387564 * *Abstract.* Data messages, known as Protocol Data Units (PDUs), that are exchanged on a network among simulation applications are defined. These PDUs are for interactions that take place within specified domains called protocol families, which include Entity Information/ Interaction, Warfare, Logistics, Simulation Management, Distributed Emission Regeneration, Radio Communications, Entity Management, Minefield, Synthetic Environment, Simulation Management with Reliability, Information Operations, Live Entity Information/Interaction, and Non-Real-Time protocol. @@ -39,7 +42,7 @@ Data messages, known as Protocol Data Units (PDUs), that are exchanged on a netw --- -**1278.2-2015. IEEE Standard for Distributed Interactive Simulation (DIS) - Communication Services and Profiles** <img src="IeeeLogo.jpg" width="120" align="right"/> +**1278.2-2015. IEEE Standard for Distributed Interactive Simulation (DIS) - Communication Services and Profiles** <a href="https://ieeexplore.ieee.org/document/7459689" target="_blank"><img src="IeeeLogo.jpg" width="120" align="right"/></a> * https://ieeexplore.ieee.org/document/7459689 * *Abstract.* Communication services to support information exchange between simulation applications participating in the distributed interactive simulation (DIS) environment are defined. These communication services describe a connectionless information transfer that supports real-time, as well as non-real-time, exchange. Several communication profiles specifying communication services are provided. @@ -52,7 +55,7 @@ The purpose of this standard is to establish requirements for communication subs --- -**1278.3-1996. IEEE Recommended Practice for Distributed Interactive Simulation - Exercise Management and Feedback** <img src="IeeeLogo.jpg" width="120" align="right"/> +**1278.3-1996. IEEE Recommended Practice for Distributed Interactive Simulation - Exercise Management and Feedback** <a href="https://ieeexplore.ieee.org/document/587529" target="_blank"><img src="IeeeLogo.jpg" width="120" align="right"/></a> * https://ieeexplore.ieee.org/document/587529 * *Abstract.* Guidelines are established for exercise management and feedback in distributed interactive simulation (DIS) exercises. Guidance is provided to sponsors, providers and supporters of DIS-compliant systems and exercises as well as to developers of DIS exercise management and feedback stations. The activities of the organizations involved in a DIS exercise and the top-level processes used to accomplish those activities are addressed. The functional requirements of the exercise management and feedback process are also addressed. This standard is one of a series of standards developed for DIS to assure interoperability between dissimilar simulations for currently installed and future simulations developed by different organizations. @@ -60,7 +63,7 @@ Guidelines are established for exercise management and feedback in distributed i --- -**4. 1278.4-1997. IEEE Recommended Practice for Distributed Interactive Simulation - Verification, Validation, and Accreditation** <img src="IeeeLogo.jpg" width="120" align="right"/> +**4. 1278.4-1997. IEEE Recommended Practice for Distributed Interactive Simulation - Verification, Validation, and Accreditation** <a href="https://ieeexplore.ieee.org/document/8685803" target="_blank"><img src="IeeeLogo.jpg" width="120" align="right"/></a> * https://ieeexplore.ieee.org/document/8685803 * *Abstract.* Guidelines are established for the verification, validation, and accreditation (VV&A) of distributed interactive simulation (DIS) exercises. How-to procedures for planning and conducting DIS exercise VV&A are provided. Intended for use in conjunction with IEEE Std 1278.3-1996, this recommended practice presents data flow and connectivity for all proposed verification and validation activities and provides rationale and justification for each step. VV&A guidance is provided to exercise users/sponsors and developers. @@ -69,7 +72,7 @@ Guidelines are established for the verification, validation, and accreditation ( --- -**5. SISO-REF-010-2020: Reference for Enumerations for Simulation Interoperability** <img src="SisoLogo.jpg" width="314" align="right"/> +**5. SISO-REF-010-2020: Reference for Enumerations for Simulation Interoperability** <a href="https://www.sisostds.org/ProductsPublications/ReferenceDocuments.aspx" target="_blank"><img src="SisoLogo.jpg" width="314" align="right"/></a> * https://www.sisostds.org/ProductsPublications/ReferenceDocuments.aspx (scroll down to bottom of page) * *Abstract.* SISO-REF-010 specifies numerical values and associated definitions for fields that are identified as enumerations in SISO Standards Products and SISO-sponsored standards published by IEEE for High Level Architecture (HLA) and Distributed Interactive Simulation (DIS). Enumerations for simulations may be applied in other architectures, such as the Test and Training Enabling Architecture (TENA). @@ -78,3 +81,11 @@ SISO-REF-010 specifies numerical values and associated definitions for fields th [Operations Manual (OPMAN)](https://www.sisostds.org/DigitalLibrary.aspx?Command=Core_Download&EntryId=47284) --- + +**6. SISO-STD-001-2015: Standard for Guidance, Rationale, and Interoperability Modalities (GRIM) for the Real-time Platform Reference Federation Object Model (RPR FOM)** <a href="https://www.sisostds.org/ProductsPublications/ReferenceDocuments.aspx" target="_blank"><img src="SisoLogo.jpg" width="314" align="right"/></a> +* https://www.sisostds.org/ProductsPublications/Standards/SISOStandards.aspx (scroll down near bottom of page) +* *Abstract.* +SISO-STD-001-2015 encapsulates guidance in the use of the RPR FOM. It provides descriptions of FOM classes and data types and the relationship between Distributed Interactive Simulation (DIS) and the High Level Architecture (HLA)-based RPR FOM, as well as rules for accomplishing specific distributed simulation tasks. +* Version 2.0 (10 Aug 2015) + +---