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
17b48a93
Commit
17b48a93
authored
5 years ago
by
Terry D. Norbraten
Browse files
Options
Downloads
Patches
Plain Diff
refactors
parent
9b8d5063
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
+76
-76
76 additions, 76 deletions
test/edu/nps/moves/dis7/AllPduRoundTripTest.java
with
76 additions
and
76 deletions
test/edu/nps/moves/dis7/AllPduRoundTripTest.java
+
76
−
76
View file @
17b48a93
...
@@ -34,7 +34,7 @@ import static org.junit.jupiter.api.Assertions.*;
...
@@ -34,7 +34,7 @@ import static org.junit.jupiter.api.Assertions.*;
public
class
AllPduRoundTripTest
public
class
AllPduRoundTripTest
{
{
private
PduFactory
fact
;
private
PduFactory
pduFactory
;
@BeforeAll
@BeforeAll
public
static
void
beforeAllTests
()
public
static
void
beforeAllTests
()
...
@@ -70,80 +70,80 @@ public class AllPduRoundTripTest
...
@@ -70,80 +70,80 @@ public class AllPduRoundTripTest
catch
(
InterruptedException
ex2
)
{
catch
(
InterruptedException
ex2
)
{
}
}
fact
=
new
PduFactory
(
Country
.
PHILIPPINES_PHL
,
(
byte
)
11
,
(
byte
)
22
,
(
short
)
33
,
true
);
pduFactory
=
new
PduFactory
(
Country
.
PHILIPPINES_PHL
,
(
byte
)
11
,
(
byte
)
22
,
(
short
)
33
,
true
);
sendOne
(
fact
.
makeAcknowledgePdu
());
sendOne
Pdu
(
pduFactory
.
makeAcknowledgePdu
());
sendOne
(
fact
.
makeAcknowledgeReliablePdu
());
sendOne
Pdu
(
pduFactory
.
makeAcknowledgeReliablePdu
());
sendOne
(
fact
.
makeActionRequestPdu
());
sendOne
Pdu
(
pduFactory
.
makeActionRequestPdu
());
sendOne
(
fact
.
makeActionRequestReliablePdu
());
sendOne
Pdu
(
pduFactory
.
makeActionRequestReliablePdu
());
sendOne
(
fact
.
makeActionResponsePdu
());
sendOne
Pdu
(
pduFactory
.
makeActionResponsePdu
());
sendOne
(
fact
.
makeActionResponseReliablePdu
());
sendOne
Pdu
(
pduFactory
.
makeActionResponseReliablePdu
());
sendOne
(
fact
.
makeAggregateStatePdu
());
sendOne
Pdu
(
pduFactory
.
makeAggregateStatePdu
());
sendOne
(
fact
.
makeAppearancePdu
());
sendOne
Pdu
(
pduFactory
.
makeAppearancePdu
());
sendOne
(
fact
.
makeArealObjectStatePdu
());
sendOne
Pdu
(
pduFactory
.
makeArealObjectStatePdu
());
sendOne
(
fact
.
makeArticulatedPartsPdu
());
sendOne
Pdu
(
pduFactory
.
makeArticulatedPartsPdu
());
sendOne
(
fact
.
makeAttributePdu
());
sendOne
Pdu
(
pduFactory
.
makeAttributePdu
());
sendOne
(
fact
.
makeCollisionElasticPdu
());
sendOne
Pdu
(
pduFactory
.
makeCollisionElasticPdu
());
sendOne
(
fact
.
makeCollisionPdu
());
sendOne
Pdu
(
pduFactory
.
makeCollisionPdu
());
sendOne
(
fact
.
makeCommentPdu
());
sendOne
Pdu
(
pduFactory
.
makeCommentPdu
());
sendOne
(
fact
.
makeCommentReliablePdu
());
sendOne
Pdu
(
pduFactory
.
makeCommentReliablePdu
());
sendOne
(
fact
.
makeCreateEntityPdu
());
sendOne
Pdu
(
pduFactory
.
makeCreateEntityPdu
());
sendOne
(
fact
.
makeCreateEntityReliablePdu
());
sendOne
Pdu
(
pduFactory
.
makeCreateEntityReliablePdu
());
sendOne
(
fact
.
makeDataPdu
());
sendOne
Pdu
(
pduFactory
.
makeDataPdu
());
sendOne
(
fact
.
makeDataQueryPdu
());
sendOne
Pdu
(
pduFactory
.
makeDataQueryPdu
());
sendOne
(
fact
.
makeDataQueryReliablePdu
());
sendOne
Pdu
(
pduFactory
.
makeDataQueryReliablePdu
());
sendOne
(
fact
.
makeDataReliablePdu
());
sendOne
Pdu
(
pduFactory
.
makeDataReliablePdu
());
sendOne
(
fact
.
makeDesignatorPdu
());
sendOne
Pdu
(
pduFactory
.
makeDesignatorPdu
());
sendOne
(
fact
.
makeDetonationPdu
());
sendOne
Pdu
(
pduFactory
.
makeDetonationPdu
());
sendOne
(
fact
.
makeDirectedEnergyFirePdu
());
sendOne
Pdu
(
pduFactory
.
makeDirectedEnergyFirePdu
());
sendOne
(
fact
.
makeElectronicEmissionsPdu
());
sendOne
Pdu
(
pduFactory
.
makeElectronicEmissionsPdu
());
sendOne
(
fact
.
makeEntityDamageStatusPdu
());
sendOne
Pdu
(
pduFactory
.
makeEntityDamageStatusPdu
());
sendOne
(
fact
.
makeEntityStatePdu
());
sendOne
Pdu
(
pduFactory
.
makeEntityStatePdu
());
sendOne
(
fact
.
makeEntityStateUpdatePdu
());
sendOne
Pdu
(
pduFactory
.
makeEntityStateUpdatePdu
());
sendOne
(
fact
.
makeEnvironmentalProcessPdu
());
sendOne
Pdu
(
pduFactory
.
makeEnvironmentalProcessPdu
());
sendOne
(
fact
.
makeEventReportPdu
());
sendOne
Pdu
(
pduFactory
.
makeEventReportPdu
());
sendOne
(
fact
.
makeEventReportReliablePdu
());
sendOne
Pdu
(
pduFactory
.
makeEventReportReliablePdu
());
sendOne
(
fact
.
makeFirePdu
());
sendOne
Pdu
(
pduFactory
.
makeFirePdu
());
sendOne
(
fact
.
makeGriddedDataPdu
());
sendOne
Pdu
(
pduFactory
.
makeGriddedDataPdu
());
sendOne
(
fact
.
makeIffPdu
());
sendOne
Pdu
(
pduFactory
.
makeIffPdu
());
sendOne
(
fact
.
makeInformationOperationsReportPdu
());
sendOne
Pdu
(
pduFactory
.
makeInformationOperationsReportPdu
());
sendOne
(
fact
.
makeInformationOperationsActionPdu
());
sendOne
Pdu
(
pduFactory
.
makeInformationOperationsActionPdu
());
sendOne
(
fact
.
makeIntercomControlPdu
());
sendOne
Pdu
(
pduFactory
.
makeIntercomControlPdu
());
sendOne
(
fact
.
makeIntercomSignalPdu
());
sendOne
Pdu
(
pduFactory
.
makeIntercomSignalPdu
());
sendOne
(
fact
.
makeIsGroupOfPdu
());
sendOne
Pdu
(
pduFactory
.
makeIsGroupOfPdu
());
sendOne
(
fact
.
makeIsPartOfPdu
());
sendOne
Pdu
(
pduFactory
.
makeIsPartOfPdu
());
sendOne
(
fact
.
makeLEDetonationPdu
());
sendOne
Pdu
(
pduFactory
.
makeLEDetonationPdu
());
sendOne
(
fact
.
makeLEFirePdu
());
sendOne
Pdu
(
pduFactory
.
makeLEFirePdu
());
sendOne
(
fact
.
makeLinearObjectStatePdu
());
sendOne
Pdu
(
pduFactory
.
makeLinearObjectStatePdu
());
sendOne
(
fact
.
makeMinefieldDataPdu
());
sendOne
Pdu
(
pduFactory
.
makeMinefieldDataPdu
());
sendOne
(
fact
.
makeMinefieldQueryPdu
());
sendOne
Pdu
(
pduFactory
.
makeMinefieldQueryPdu
());
sendOne
(
fact
.
makeMinefieldResponseNackPdu
());
sendOne
Pdu
(
pduFactory
.
makeMinefieldResponseNackPdu
());
sendOne
(
fact
.
makeMinefieldStatePdu
());
sendOne
Pdu
(
pduFactory
.
makeMinefieldStatePdu
());
sendOne
(
fact
.
makePointObjectStatePdu
());
sendOne
Pdu
(
pduFactory
.
makePointObjectStatePdu
());
sendOne
(
fact
.
makeReceiverPdu
());
sendOne
Pdu
(
pduFactory
.
makeReceiverPdu
());
sendOne
(
fact
.
makeRecordQueryReliablePdu
());
sendOne
Pdu
(
pduFactory
.
makeRecordQueryReliablePdu
());
sendOne
(
fact
.
makeRecordReliablePdu
());
sendOne
Pdu
(
pduFactory
.
makeRecordReliablePdu
());
sendOne
(
fact
.
makeRemoveEntityPdu
());
sendOne
Pdu
(
pduFactory
.
makeRemoveEntityPdu
());
sendOne
(
fact
.
makeRemoveEntityReliablePdu
());
sendOne
Pdu
(
pduFactory
.
makeRemoveEntityReliablePdu
());
sendOne
(
fact
.
makeRepairCompletePdu
());
sendOne
Pdu
(
pduFactory
.
makeRepairCompletePdu
());
sendOne
(
fact
.
makeRepairResponsePdu
());
sendOne
Pdu
(
pduFactory
.
makeRepairResponsePdu
());
sendOne
(
fact
.
makeResupplyCancelPdu
());
sendOne
Pdu
(
pduFactory
.
makeResupplyCancelPdu
());
sendOne
(
fact
.
makeResupplyOfferPdu
());
sendOne
Pdu
(
pduFactory
.
makeResupplyOfferPdu
());
sendOne
(
fact
.
makeResupplyReceivedPdu
());
sendOne
Pdu
(
pduFactory
.
makeResupplyReceivedPdu
());
sendOne
(
fact
.
makeSeesPdu
());
sendOne
Pdu
(
pduFactory
.
makeSeesPdu
());
sendOne
(
fact
.
makeServiceRequestPdu
());
sendOne
Pdu
(
pduFactory
.
makeServiceRequestPdu
());
sendOne
(
fact
.
makeSetDataPdu
());
sendOne
Pdu
(
pduFactory
.
makeSetDataPdu
());
sendOne
(
fact
.
makeSetDataReliablePdu
());
sendOne
Pdu
(
pduFactory
.
makeSetDataReliablePdu
());
sendOne
(
fact
.
makeSetRecordReliablePdu
());
sendOne
Pdu
(
pduFactory
.
makeSetRecordReliablePdu
());
sendOne
(
fact
.
makeSignalPdu
());
sendOne
Pdu
(
pduFactory
.
makeSignalPdu
());
sendOne
(
fact
.
makeStartResumePdu
());
sendOne
Pdu
(
pduFactory
.
makeStartResumePdu
());
sendOne
(
fact
.
makeStartResumeReliablePdu
());
sendOne
Pdu
(
pduFactory
.
makeStartResumeReliablePdu
());
sendOne
(
fact
.
makeStopFreezePdu
());
sendOne
Pdu
(
pduFactory
.
makeStopFreezePdu
());
sendOne
(
fact
.
makeStopFreezeReliablePdu
());
sendOne
Pdu
(
pduFactory
.
makeStopFreezeReliablePdu
());
sendOne
(
fact
.
makeTransferOwnershipPdu
());
sendOne
Pdu
(
pduFactory
.
makeTransferOwnershipPdu
());
sendOne
(
fact
.
makeTransmitterPdu
());
sendOne
Pdu
(
pduFactory
.
makeTransmitterPdu
());
sendOne
(
fact
.
makeTspiPdu
());
sendOne
Pdu
(
pduFactory
.
makeTspiPdu
());
sendOne
(
fact
.
makeUnderwaterAcousticPdu
());
sendOne
Pdu
(
pduFactory
.
makeUnderwaterAcousticPdu
());
//sleep(100L); // go sender/receiver go! is this enough time to receive?
//sleep(100L); // go sender/receiver go! is this enough time to receive?
// try {
// try {
...
@@ -200,7 +200,7 @@ public class AllPduRoundTripTest
...
@@ -200,7 +200,7 @@ public class AllPduRoundTripTest
disnetworking
.
kill
();
disnetworking
.
kill
();
}
}
private
void
sendOne
(
Pdu
pdu
)
private
void
sendOne
Pdu
(
Pdu
pdu
)
{
{
pduSentMap
.
put
(
pdu
.
getPduType
(),
pdu
);
pduSentMap
.
put
(
pdu
.
getPduType
(),
pdu
);
if
(
pdu
.
getPduType
()
==
DISPDUType
.
OTHER
)
if
(
pdu
.
getPduType
()
==
DISPDUType
.
OTHER
)
...
@@ -237,7 +237,7 @@ public class AllPduRoundTripTest
...
@@ -237,7 +237,7 @@ public class AllPduRoundTripTest
player
.
sendToNet
(
false
);
player
.
sendToNet
(
false
);
player
.
addRawListener
(
ba
->
{
player
.
addRawListener
(
ba
->
{
if
(
ba
!=
null
)
{
if
(
ba
!=
null
)
{
Pdu
pdu
=
fact
.
createPdu
(
ba
);
Pdu
pdu
=
pduFactory
.
createPdu
(
ba
);
pduReadMap
.
put
(
pdu
.
getPduType
(),
pdu
);
pduReadMap
.
put
(
pdu
.
getPduType
(),
pdu
);
}
}
else
{
else
{
...
...
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