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
a2fe70ec
Commit
a2fe70ec
authored
3 years ago
by
Brutzman, Don
Browse files
Options
Downloads
Patches
Plain Diff
add main method for testing
parent
fc54891d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/edu/nps/moves/dis7/utilities/stream/PduPlayer.java
+23
-2
23 additions, 2 deletions
src/edu/nps/moves/dis7/utilities/stream/PduPlayer.java
with
23 additions
and
2 deletions
src/edu/nps/moves/dis7/utilities/stream/PduPlayer.java
+
23
−
2
View file @
a2fe70ec
...
...
@@ -59,7 +59,8 @@ public class PduPlayer {
* @param sendToNet to capture X3D interpolator values - if desired
* @throws IOException if something goes wrong processing files
*/
public
PduPlayer
(
String
ip
,
int
port
,
Path
disLogDirectory
,
boolean
sendToNet
)
throws
IOException
{
public
PduPlayer
(
String
ip
,
int
port
,
Path
disLogDirectory
,
boolean
sendToNet
)
throws
IOException
{
this
.
disLogDirectory
=
disLogDirectory
;
this
.
ip
=
ip
;
this
.
port
=
port
;
...
...
@@ -100,7 +101,7 @@ public class PduPlayer {
@SuppressWarnings
(
"StatementWithEmptyBody"
)
public
void
begin
()
{
try
{
System
.
out
.
println
(
"
Re
playing DIS logs."
);
System
.
out
.
println
(
"
PduPlayer begin()
playing DIS logs."
);
InetAddress
addr
=
null
;
DatagramPacket
datagramPacket
;
...
...
@@ -424,4 +425,24 @@ public class PduPlayer {
}
catch
(
InterruptedException
ex
)
{}
// @formatter:on
}
/** Test execution for debugging
* @param args command-line arguments (unused)
*/
public
static
void
main
(
String
[]
args
)
throws
IOException
// TODO fix exception handling
{
String
DEFAULT_OUTPUT_DIRECTORY
=
"pduLog"
;
/** Default multicast group address we send on.
* @see <a href="https://en.wikipedia.org/wiki/Multicast_address">https://en.wikipedia.org/wiki/Multicast_address</a> */
String
DEFAULT_MULTICAST_ADDRESS
=
"239.1.2.3"
;
/** @see <a href="https://en.wikipedia.org/wiki/Port_(computer_networking)">https://en.wikipedia.org/wiki/Port_(computer_networking)</a> */
int
DEFAULT_MULTICAST_PORT
=
3000
;
String
outputDirectory
=
DEFAULT_OUTPUT_DIRECTORY
;
String
multicastAddress
=
DEFAULT_MULTICAST_ADDRESS
;
int
multicastPort
=
DEFAULT_MULTICAST_PORT
;
boolean
sendToNet
=
true
;
PduPlayer
pduPlayer
=
new
PduPlayer
(
multicastAddress
,
multicastPort
,
Path
.
of
(
outputDirectory
),
sendToNet
);
pduPlayer
.
begin
();
}
}
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