diff --git a/examples/src/OpenDis7Examples/PduListenerSaver.java b/examples/src/OpenDis7Examples/PduListenerSaver.java index 88be82c203c1ab9e3a70a53c5cee01b4c3378a30..63c382bb2b19d0031a39b4649f26243ad2f50d6b 100644 --- a/examples/src/OpenDis7Examples/PduListenerSaver.java +++ b/examples/src/OpenDis7Examples/PduListenerSaver.java @@ -17,7 +17,7 @@ import java.util.Scanner; */ public class PduListenerSaver { - private final static String DEFAULT_OUTPUTDIR = "./pduLog"; + private final static String DEFAULT_OUTPUTDIR = "pduLog"; private final static String MCAST_ADDR = "239.1.2.3"; private final static int DIS_PORT = 3000; @@ -32,6 +32,8 @@ public class PduListenerSaver String outDir = DEFAULT_OUTPUTDIR; String mcast = MCAST_ADDR; int port = DIS_PORT; + + System.out.println("DisExamplesOpenDis7.PduListenerSaver started..."); switch (args.length) { case 0: @@ -55,28 +57,33 @@ public class PduListenerSaver recorder.startResume(); mystate state = mystate.RUNNING; + System.out.println("* recorder.startResume(), state=RUNNING, recording in progress..."); Scanner scan = new Scanner(System.in); while (true) { - System.out.println("Type p/enter to pause, r/enter to resume, q/enter to quit"); + System.out.println("Warning: you must quit when complete, otherwise recorded PDUs are lost!"); + System.out.println("Type p/enter to pause, r/enter to resume, q/enter to stop recording, save and quit"); String line = scan.nextLine(); if (line.equalsIgnoreCase("p") && state == mystate.RUNNING) { recorder.stopPause(); state = mystate.PAUSED; + System.out.println("* recorder.stopPause(), state=PAUSED, recording paused..."); } else if (line.equalsIgnoreCase("r") && state == mystate.PAUSED) { recorder.startResume(); state = mystate.RUNNING; + System.out.println("* recorder.startResume(), state=RUNNING, recording in progress..."); } else if (line.equalsIgnoreCase("q")) { recorder.end(); + System.out.println("* recorder.end(), recording complete."); break; } } System.out.println("Ending pdu save to "+recorder.getLogFile()); } catch (IOException ex) { - System.err.println("Exception: " + ex.getClass().getSimpleName() + ": " + ex.getLocalizedMessage()); + System.err.println("*** Exception: " + ex.getClass().getSimpleName() + ": " + ex.getLocalizedMessage()); } } } diff --git a/examples/src/OpenDis7Examples/PduListenerSaverLog.txt b/examples/src/OpenDis7Examples/PduListenerSaverLog.txt new file mode 100644 index 0000000000000000000000000000000000000000..81a25d029e4b071344000167aa16232be6576ce6 --- /dev/null +++ b/examples/src/OpenDis7Examples/PduListenerSaverLog.txt @@ -0,0 +1,25 @@ +Invocation instructions: + +1. run or debug PduListenerSaver.java +2. send PDUs from another program such as AllPduSender.java (used here) +3. also running AllPduReceiver can confirm that DIS replay actually occurs. +4. Type p/enter to pause, r/enter to resume, q/enter to quit +5. if Pdusave.dislog file(s) already exist, your recording will be added. +6. note existence of recorded files in directory, e.g. examples/pduLog/Pdusave.dislog +7. rename/cut/paste your recording file to keep track of your results. + +Program response: + +=================================================== + +DisExamplesOpenDis7.PduListenerSaver started... +Beginning pdu save to directory pduLog +* recorder.startResume(), state=RUNNING +Warning: you must quit when complete, otherwise recorded PDUs are lost! +Type p/enter to pause, r/enter to resume, q/enter to quit +q + +Recorder log file closed +* recorder.end(), recording complete. +Ending pdu save to C:\x-nps-gitlab\NetworkedGraphicsMV3500\examples\pduLog\Pdusave2.dislog +BUILD SUCCESSFUL (total time: 33 seconds) diff --git a/presentations/09_HLA_HighLevelArchitecture.pptx b/presentations/09_HLA_HighLevelArchitecture.pptx index ee69369518d4f2ad450bb2d51d390361196c7066..f11a791bd79df548179e9c057cc902576d02c65d 100644 Binary files a/presentations/09_HLA_HighLevelArchitecture.pptx and b/presentations/09_HLA_HighLevelArchitecture.pptx differ