Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NetworkedGraphicsMV3500
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Savage
NetworkedGraphicsMV3500
Commits
f4978356
Commit
f4978356
authored
5 years ago
by
brutzman
Browse files
Options
Downloads
Patches
Plain Diff
corrected class name in output messages, provide full invocation instructions and log
parent
0adae1cd
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/src/OpenDis7Examples/PduListenerSaver.java
+8
-2
8 additions, 2 deletions
examples/src/OpenDis7Examples/PduListenerSaver.java
examples/src/OpenDis7Examples/PduListenerSaverLog.txt
+24
-0
24 additions, 0 deletions
examples/src/OpenDis7Examples/PduListenerSaverLog.txt
with
32 additions
and
2 deletions
examples/src/OpenDis7Examples/PduListenerSaver.java
+
8
−
2
View file @
f4978356
...
...
@@ -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,6 +57,7 @@ public class PduListenerSaver
recorder
.
startResume
();
mystate
state
=
mystate
.
RUNNING
;
System
.
out
.
println
(
"* recorder.startResume(), state=RUNNING"
);
Scanner
scan
=
new
Scanner
(
System
.
in
);
while
(
true
)
{
...
...
@@ -63,20 +66,23 @@ public class PduListenerSaver
if
(
line
.
equalsIgnoreCase
(
"p"
)
&&
state
==
mystate
.
RUNNING
)
{
recorder
.
stopPause
();
state
=
mystate
.
PAUSED
;
System
.
out
.
println
(
"* recorder.stopPause(), state=PAUSED"
);
}
else
if
(
line
.
equalsIgnoreCase
(
"r"
)
&&
state
==
mystate
.
PAUSED
)
{
recorder
.
startResume
();
state
=
mystate
.
RUNNING
;
System
.
out
.
println
(
"* recorder.startResume(), state=RUNNING"
);
}
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
());
}
}
}
This diff is collapsed.
Click to expand it.
examples/src/OpenDis7Examples/PduListenerSaverLog.txt
0 → 100644
+
24
−
0
View file @
f4978356
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
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\Pdusave1.dislog
BUILD SUCCESSFUL (total time: 1 minute 51 seconds)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment