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

Scanner rename to terminalKeyboardScanner for clarity; PduReaderPlayer output packets not seen

parent e5538979
No related branches found
No related tags found
No related merge requests found
......@@ -65,13 +65,14 @@ public class PduListenerSaver
System.out.println("Beginning PduListenerSaver (" + multicastAddress + ":" + multicastPort + ") to directory " + outputDirectory);
try {
PduRecorder recorder = new PduRecorder(outputDirectory, multicastAddress, multicastPort); // assumes save
mystate state = mystate.RUNNING;
Scanner scannerTerminalKeyboard = new Scanner(System.in);
Scanner terminalKeyboardScanner = new Scanner(System.in);
PduRecorder recorder = new PduRecorder(outputDirectory, multicastAddress, multicastPort); // assumes save on quit
while (true) {
while (true) // monitor user input via keyboard
{
System.out.println("Type p/enter to pause, r/enter to resume, q/enter to quit");
String line = scannerTerminalKeyboard.nextLine();
String line = terminalKeyboardScanner.nextLine();
if (line.equalsIgnoreCase("p") && state == mystate.RUNNING) {
recorder.stopPause();
state = mystate.PAUSED;
......
......@@ -69,14 +69,16 @@ public class PduReaderPlayer
System.out.println("Beginning PduReaderPlayer (" + multicastAddress + ":" + multicastPort + ") to directory " + outputDirectory);
try {
mystate state = mystate.RUNNING;
Scanner terminalKeyboardScanner = new Scanner(System.in);
PduPlayer pduPlayer = new PduPlayer(multicastAddress, multicastPort, Path.of(outputDirectory), sendToNet);
pduPlayer.startResume();
mystate state = mystate.RUNNING;
Scanner scannerTerminalKeyboard = new Scanner(System.in);
while (true) {
while (true) // monitor user input via keyboard
{
System.out.println("Type p/enter to pause, r/enter to resume, q/enter to quit");
String line = scannerTerminalKeyboard.nextLine();
String line = terminalKeyboardScanner.nextLine();
if (line.equalsIgnoreCase("p") && state == mystate.RUNNING) {
pduPlayer.stopPause();
state = mystate.PAUSED;
......
Invocation instructions:
0. check for existence of recorded files in directory, e.g. examples/pduLog/Pdusave.dislog
1. first running AllPduReceiver can confirm that DIS replay actually occurs.
0. check for existence of recorded files in directory, e.g. examples/pduLog/PduCaptureLog.dislog
1. first launching AllPduReceiver or Wireshark can confirm that DIS replay actually occurs.
2. run or debug PduReaderPlayer.java
3. Type p/enter to pause, r/enter to resume, q/enter to quit
......@@ -9,16 +9,22 @@ Program response:
===================================================
DisExamplesOpenDis7.PduReaderPlayer started...
Beginning pdu playback from directory pduLog
Replaying DIS logs.
Replaying C:\x-nps-gitlab\NetworkedGraphicsMV3500\examples\pduLog\Pdusave.dislog
Beginning of DIS capture file, Pdusave.dislog.
ant -f C:\\x-nps-gitlab\\NetworkedGraphicsMV3500\\examples -Dnb.internal.action.name=run run
init:
Deleting: C:\x-nps-gitlab\NetworkedGraphicsMV3500\examples\build\built-jar.properties
deps-jar:
Updating property file: C:\x-nps-gitlab\NetworkedGraphicsMV3500\examples\build\built-jar.properties
compile:
run:
OpenDis7Examples.PduReaderPlayer started...
Beginning PduReaderPlayer (239.1.2.3:3000) to directory pduLog
Type p/enter to pause, r/enter to resume, q/enter to quit
72
End of replay from Pdusave.dislog
End of DIS capture file, Pdusave.dislog.
Replaying DIS logs.
Replaying C:\x-nps-gitlab\NetworkedGraphicsMV3500\examples\pduLog\PduCaptureLog.dislog
ENCODING_PLAINTEXT
Total PDUs: 72
End of replay from PduCaptureLog.dislog
q
Ending pdu files playback for directory pduLog
DisExamplesOpenDis7.PduReaderPlayer complete.
BUILD SUCCESSFUL (total time: 20 seconds)
\ No newline at end of file
OpenDis7Examples.PduReaderPlayer complete.
BUILD SUCCESSFUL (total time: 15 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