Skip to content
Snippets Groups Projects
Commit 1769a462 authored by Terry D. Norbraten's avatar Terry D. Norbraten
Browse files

[Terry N.] use disChannel

parent 36cfc850
No related branches found
No related tags found
No related merge requests found
...@@ -136,10 +136,6 @@ public class CoTMsgParserDisRunner extends CoTparser ...@@ -136,10 +136,6 @@ public class CoTMsgParserDisRunner extends CoTparser
this(); this();
disChannel.setNetworkAddress (address); disChannel.setNetworkAddress (address);
disChannel.setNetworkPort (port); disChannel.setNetworkPort (port);
disChannel.setVerboseComments (false); // TODO rename library method to disambiguate CommentPDU
// TODO still seems really chatty... add silent mode?
disChannel.setVerboseDisNetworkInterface(false); // Default false
disChannel.setVerbosePduRecorder (false); // default false
} }
/** Initialize channel setup for OpenDis7 and report a test PDU /** Initialize channel setup for OpenDis7 and report a test PDU
...@@ -154,8 +150,8 @@ public class CoTMsgParserDisRunner extends CoTparser ...@@ -154,8 +150,8 @@ public class CoTMsgParserDisRunner extends CoTparser
getDisChannel().join(); // TODO further functionality expected getDisChannel().join(); // TODO further functionality expected
String timeStepMessage = "Simulation timestep duration " + getSimulationTimeStepDuration() + " seconds"; // String timeStepMessage = "Simulation timestep duration " + getSimulationTimeStepDuration() + " seconds";
getDisChannel().sendCommentPdu(simulationTimeSeconds, DisChannel.COMMENTPDU_SIMULATION_TIMESTEP, timeStepMessage); // getDisChannel().sendCommentPdu(simulationTimeSeconds, DisChannel.COMMENTPDU_SIMULATION_TIMESTEP, timeStepMessage);
// additional constructor initialization can go here // additional constructor initialization can go here
} }
...@@ -173,7 +169,10 @@ public class CoTMsgParserDisRunner extends CoTparser ...@@ -173,7 +169,10 @@ public class CoTMsgParserDisRunner extends CoTparser
getDisChannel().setDescriptor(descriptor); // ExampleSimulationProgram might be a superclass getDisChannel().setDescriptor(descriptor); // ExampleSimulationProgram might be a superclass
getDisChannel().setUpNetworkInterface(); getDisChannel().setUpNetworkInterface();
getDisChannel().getPduRecorder().setVerbose(true); getDisChannel().setVerboseComments (false); // TODO rename library method to disambiguate CommentPDU
// TODO still seems really chatty... add silent mode?
getDisChannel().setVerboseDisNetworkInterface(false); // Default false
getDisChannel().getPduRecorder().setVerbose (true);
// TODO confirm whether recorder is explicitly started by programmer (or not) // TODO confirm whether recorder is explicitly started by programmer (or not)
} }
...@@ -387,15 +386,6 @@ public class CoTMsgParserDisRunner extends CoTparser ...@@ -387,15 +386,6 @@ public class CoTMsgParserDisRunner extends CoTparser
getDisChannel().sendCommentPdu(simTimeSeconds, commentType, comments); // empty comments are filtered getDisChannel().sendCommentPdu(simTimeSeconds, commentType, comments); // empty comments are filtered
} }
/**
* Send a single Protocol Data Unit (PDU) of any type
* @param pdu the pdu to send
*/
public void sendSinglePdu(Pdu pdu)
{
getDisChannel().sendSinglePdu(pdu);
}
/** /**
* Initial execution via main() method: handle args array of command-line initialization (CLI) arguments here * Initial execution via main() method: handle args array of command-line initialization (CLI) arguments here
* @param args command-line parameters: network address and port * @param args command-line parameters: network address and port
...@@ -532,7 +522,7 @@ public class CoTMsgParserDisRunner extends CoTparser ...@@ -532,7 +522,7 @@ public class CoTMsgParserDisRunner extends CoTparser
Logger.getLogger(CoTMsgParserDisRunner.class.getName()).log(Level.SEVERE, null, ex); Logger.getLogger(CoTMsgParserDisRunner.class.getName()).log(Level.SEVERE, null, ex);
} }
sendSinglePdu(entityStatePdu_1); getDisChannel().sendSinglePdu(entityStatePdu_1);
} }
/** /**
......
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