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
894c95df
Commit
894c95df
authored
4 years ago
by
terry-norbraten
Browse files
Options
Downloads
Patches
Plain Diff
pdu dup checking
parent
f5a8323c
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
test/edu/nps/moves/dis7/AllPduRoundTripTest.java
+19
-18
19 additions, 18 deletions
test/edu/nps/moves/dis7/AllPduRoundTripTest.java
test/edu/nps/moves/dis7/SignalPdusTest.java
+1
-1
1 addition, 1 deletion
test/edu/nps/moves/dis7/SignalPdusTest.java
with
20 additions
and
19 deletions
test/edu/nps/moves/dis7/AllPduRoundTripTest.java
+
19
−
18
View file @
894c95df
...
...
@@ -144,7 +144,7 @@ public class AllPduRoundTripTest
pdusSent
.
forEach
(
p
->
{
disnetworking
.
send
(
p
);
sleep
(
1
l
);
// give receiver time to process
sleep
(
5
l
);
// give receiver time to process
});
shutDownSenderRecorder
();
...
...
@@ -169,23 +169,24 @@ public class AllPduRoundTripTest
assertNull
(
ex
,
"Exception should be null if successful creation of all objects"
);
}
private
void
setupSenderRecorder
()
throws
Exception
{
recorder
=
new
PduRecorder
();
// default mcaddr, port, logfile dir
disnetworking
=
recorder
.
getDisThreadedNetIF
();
// When the DisThreadedNetIF receives a pdu, a call is made to the
// everyTypeListeners which makes a lamba call back here to capture received
// pdus
lis
=
new
DisThreadedNetIF
.
PduListener
()
{
@Override
public
void
incomingPdu
(
Pdu
pdu
)
{
pdusReceived
.
add
(
pdu
);
}
};
disnetworking
.
addListener
(
lis
);
System
.
out
.
println
(
"Recorder log at "
+
recorder
.
getLogFile
());
}
private
void
setupSenderRecorder
()
throws
Exception
{
recorder
=
new
PduRecorder
();
// default mcaddr, port, logfile dir
disnetworking
=
recorder
.
getDisThreadedNetIF
();
// When the DisThreadedNetIF receives a pdu, a call is made to the
// everyTypeListeners which makes a lamba call back here to capture received
// pdus
lis
=
new
DisThreadedNetIF
.
PduListener
()
{
@Override
public
void
incomingPdu
(
Pdu
pdu
)
{
if
(!
pdusReceived
.
contains
(
pdu
))
{
pdusReceived
.
add
(
pdu
);
}
}
};
disnetworking
.
addListener
(
lis
);
System
.
out
.
println
(
"Recorder log at "
+
recorder
.
getLogFile
());
}
/** Will shutdown the common send/receive network interface */
private
void
shutDownSenderRecorder
()
throws
Exception
...
...
This diff is collapsed.
Click to expand it.
test/edu/nps/moves/dis7/SignalPdusTest.java
+
1
−
1
View file @
894c95df
...
...
@@ -82,7 +82,7 @@ public class SignalPdusTest {
sentPdus
.
forEach
(
p
->
{
netif
.
send
(
p
);
sleep
(
10
l
);
// give receiver time to process
sleep
(
5
l
);
// give receiver time to process
});
}
...
...
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