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
675cf4f3
Commit
675cf4f3
authored
5 years ago
by
Brutzman, Don
Browse files
Options
Downloads
Patches
Plain Diff
finally got things to work... some cleanup required
parent
82ff727d
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
test/edu/nps/moves/dis7/AllPduRoundTripTest.java
+16
-3
16 additions, 3 deletions
test/edu/nps/moves/dis7/AllPduRoundTripTest.java
with
16 additions
and
3 deletions
test/edu/nps/moves/dis7/AllPduRoundTripTest.java
+
16
−
3
View file @
675cf4f3
...
@@ -63,10 +63,15 @@ public class AllPduRoundTripTest
...
@@ -63,10 +63,15 @@ public class AllPduRoundTripTest
try
{
try
{
setupReceiver
();
setupReceiver
();
setupRecorder
();
setupRecorder
();
try
{
Thread
.
sleep
(
250L
);
// these have to be fully setup before continuing
}
catch
(
InterruptedException
ex2
)
{
}
fact
=
new
PduFactory
(
Country
.
PHILIPPINES_PHL
,
(
byte
)
11
,
(
byte
)
22
,
(
short
)
33
,
true
);
fact
=
new
PduFactory
(
Country
.
PHILIPPINES_PHL
,
(
byte
)
11
,
(
byte
)
22
,
(
short
)
33
,
true
);
sendOne
(
fact
.
makeAcknowledgePdu
());
sendOne
(
fact
.
makeAcknowledgePdu
());
// TODO never received ??!!
sendOne
(
fact
.
makeAcknowledgeReliablePdu
());
sendOne
(
fact
.
makeAcknowledgeReliablePdu
());
sendOne
(
fact
.
makeActionRequestPdu
());
sendOne
(
fact
.
makeActionRequestPdu
());
sendOne
(
fact
.
makeActionRequestReliablePdu
());
sendOne
(
fact
.
makeActionRequestReliablePdu
());
...
@@ -139,8 +144,13 @@ public class AllPduRoundTripTest
...
@@ -139,8 +144,13 @@ public class AllPduRoundTripTest
sendOne
(
fact
.
makeTspiPdu
());
sendOne
(
fact
.
makeTspiPdu
());
sendOne
(
fact
.
makeUnderwaterAcousticPdu
());
sendOne
(
fact
.
makeUnderwaterAcousticPdu
());
sleep
(
1000L
);
// go sender/receiver go! is this enough time to receive?
//sleep(100L); // go sender/receiver go! is this enough time to receive?
try
{
Thread
.
sleep
(
250L
);
// TODO shouldn't this kind of delay timing be in a DIS sender class?
}
catch
(
InterruptedException
ex2
)
{
}
// TODO is there a more reliable way to determine whether receiver is complete?
// TODO is there a more reliable way to determine whether receiver is complete?
shutDownReceiver
();
// TODO hopefully this finishes reading the pending buffer before shutting down
shutDownReceiver
();
// TODO hopefully this finishes reading the pending buffer before shutting down
...
@@ -193,7 +203,10 @@ public class AllPduRoundTripTest
...
@@ -193,7 +203,10 @@ public class AllPduRoundTripTest
private
void
sendOne
(
Pdu
pdu
)
private
void
sendOne
(
Pdu
pdu
)
{
{
pduSentMap
.
put
(
pdu
.
getPduType
(),
pdu
);
pduSentMap
.
put
(
pdu
.
getPduType
(),
pdu
);
if
(
pdu
.
getPduType
()
==
DISPDUType
.
OTHER
)
System
.
out
.
println
(
"*** Note: DISPDUType.OTHER not supported"
);
disnetworking
.
send
(
pdu
);
disnetworking
.
send
(
pdu
);
sleep
(
100L
);
// TODO debugging
}
}
private
void
setupRecorder
()
throws
Exception
private
void
setupRecorder
()
throws
Exception
...
...
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