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
8a6b9a4c
Commit
8a6b9a4c
authored
4 years ago
by
brutzman
Browse files
Options
Downloads
Patches
Plain Diff
improved naming, comments, diagnostics
parent
e9dd9f1f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/src/OpenDis7Examples/PduReaderPlayer.java
+14
-13
14 additions, 13 deletions
examples/src/OpenDis7Examples/PduReaderPlayer.java
with
14 additions
and
13 deletions
examples/src/OpenDis7Examples/PduReaderPlayer.java
+
14
−
13
View file @
8a6b9a4c
...
...
@@ -11,6 +11,7 @@ import java.util.Scanner;
/**
* PduSaver.java created on Aug 21, 2019
* Renamed PduReaderPlayer
* MOVES Institute Naval Postgraduate School, Monterey, CA, USA www.nps.edu
*
* @author Mike Bailey, jmbailey@nps.edu
...
...
@@ -18,9 +19,9 @@ import java.util.Scanner;
*/
public
class
PduReaderPlayer
{
private
final
static
String
DEFAULT_OUTPUTDIR
=
"pduLog"
;
p
rivate
final
static
String
MCAST_ADDR
=
"239.1.2.3"
;
p
rivate
final
static
int
DIS_PORT
=
3000
;
private
final
static
String
DEFAULT_OUTPUT
_
DIR
ECTORY
=
"pduLog"
;
p
ublic
static
final
String
DEFAULT_MULTICAST_ADDRESS
=
AllPduSender
.
DEFAULT_MULTICAST_ADDRESS
;
p
ublic
static
final
int
DEFAULT_MULTICAST_PORT
=
AllPduSender
.
DEFAULT_MULTICAST_PORT
;
private
enum
mystate
{
...
...
@@ -30,9 +31,9 @@ public class PduReaderPlayer
public
static
void
main
(
String
[]
args
)
{
String
out
Dir
=
DEFAULT_OUTPUTDIR
;
String
m
cast
=
M
CAST_ADDR
;
int
port
=
DIS
_PORT
;
String
out
putDirectory
=
DEFAULT_OUTPUT
_
DIR
ECTORY
;
String
m
ulticastAddress
=
DEFAULT_MULTI
CAST_ADDR
ESS
;
int
multicastPort
=
DEFAULT_MULTICAST
_PORT
;
System
.
out
.
println
(
"DisExamplesOpenDis7.PduReaderPlayer started..."
);
...
...
@@ -40,21 +41,21 @@ public class PduReaderPlayer
case
0
:
break
;
case
1
:
out
Dir
=
args
[
0
];
out
putDirectory
=
args
[
0
];
break
;
case
3
:
out
Dir
=
args
[
0
];
m
cast
=
args
[
1
];
p
ort
=
Integer
.
parseInt
(
args
[
2
]);
out
putDirectory
=
args
[
0
];
m
ulticastAddress
=
args
[
1
];
multicastP
ort
=
Integer
.
parseInt
(
args
[
2
]);
break
;
default
:
System
.
err
.
println
(
"Usage: PduReaderPlayer() or PduReaderPlayer(\"outputdir\") or PduReaderPlayer(\"outputdir\",\"multicast address\", ipPort"
);
System
.
exit
(
1
);
}
System
.
out
.
println
(
"Beginning
p
du
playback from
directory "
+
out
Dir
);
System
.
out
.
println
(
"Beginning
P
du
ReaderPlayer ("
+
multicastAddress
+
":"
+
multicastPort
+
") to
directory "
+
out
putDirectory
);
try
{
PduPlayer
player
=
new
PduPlayer
(
m
cast
,
p
ort
,
new
File
(
out
Dir
).
toPath
());
PduPlayer
player
=
new
PduPlayer
(
m
ulticastAddress
,
multicastP
ort
,
new
File
(
out
putDirectory
).
toPath
());
player
.
startResume
();
mystate
state
=
mystate
.
RUNNING
;
Scanner
scan
=
new
Scanner
(
System
.
in
);
...
...
@@ -75,7 +76,7 @@ public class PduReaderPlayer
break
;
}
}
System
.
out
.
println
(
"Ending pdu files playback for directory "
+
out
Dir
);
System
.
out
.
println
(
"Ending pdu files playback for directory "
+
out
putDirectory
);
System
.
out
.
println
(
"DisExamplesOpenDis7.PduReaderPlayer complete."
);
System
.
exit
(
0
);
// not sure why this is necessary with Netbeans...
}
...
...
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