Skip to content
Snippets Groups Projects
Commit 675cf4f3 authored by Brutzman, Don's avatar Brutzman, Don
Browse files

finally got things to work... some cleanup required

parent 82ff727d
No related branches found
No related tags found
No related merge requests found
...@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment