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

javadoc

parent 2821ef32
No related branches found
No related tags found
No related merge requests found
...@@ -103,7 +103,7 @@ public class ExampleSimulationProgram ...@@ -103,7 +103,7 @@ public class ExampleSimulationProgram
// send the status PDUs for this loop and continue // send the status PDUs for this loop and continue
System.out.println ("sending PDUs for simulation step " + loopCount + ", monitor loopback to confirm sent"); System.out.println ("sending PDUs for simulation step " + loopCount + ", monitor loopback to confirm sent");
sendAllPdus(entityStatePdu, firePdu, timeStepComment, narrativeMessage1, narrativeMessage2, narrativeMessage3); sendAllPdusForLoopTimestep(entityStatePdu, firePdu, timeStepComment, narrativeMessage1, narrativeMessage2, narrativeMessage3);
System.out.println ("... [PDUs successfully sent for this loop]"); System.out.println ("... [PDUs successfully sent for this loop]");
// =============================== // ===============================
...@@ -262,20 +262,20 @@ public class ExampleSimulationProgram ...@@ -262,20 +262,20 @@ public class ExampleSimulationProgram
*/ */
public void sendCommentPdu(VariableRecordType commentType, public void sendCommentPdu(VariableRecordType commentType,
// vararg... variable-length set of String comments can optionally follow // vararg... variable-length set of String comments can optionally follow
String... comments) String... comments)
{ {
sendAllPdus (null, null, commentType, comments); sendAllPdusForLoopTimestep (null, null, commentType, comments);
} }
/** /**
* Send EntityState, Fire, Comment PDUs * Send EntityState, Fire, Comment PDUs that got updated for this loop, reflecting state of current simulation timestep.
* @see <a href="https://docs.oracle.com/javase/tutorial/java/javaOO/arguments.html">Passing Information to a Method or a Constructor</a> Arbitrary Number of Arguments * @see <a href="https://docs.oracle.com/javase/tutorial/java/javaOO/arguments.html">Passing Information to a Method or a Constructor</a> Arbitrary Number of Arguments
* @param entityStatePdu the ESPDU to send, if any * @param entityStatePdu the ESPDU to send, if any
* @param firePdu the FirePDU to send, if any * @param firePdu the FirePDU to send, if any
* @param commentType enumeration value describing purpose of the narrative comment * @param commentType enumeration value describing purpose of the narrative comment
* @param comments String array of narrative comments * @param comments String array of narrative comments
*/ */
public void sendAllPdus(EntityStatePdu entityStatePdu, public void sendAllPdusForLoopTimestep(EntityStatePdu entityStatePdu,
FirePdu firePdu, FirePdu firePdu,
VariableRecordType commentType, VariableRecordType commentType,
// vararg... variable-length set of String comments can optionally follow // vararg... variable-length set of String comments can optionally follow
...@@ -299,7 +299,7 @@ public class ExampleSimulationProgram ...@@ -299,7 +299,7 @@ public class ExampleSimulationProgram
{ {
if (commentType == null) if (commentType == null)
commentType = otherComment; // fallback value otherComment commentType = otherComment; // fallback value otherComment
// now build the commentPdu from these string inputs // now build the commentPdu from these string inputs, thus constructing a narrative entry
CommentPdu commentPdu = pduFactory.makeCommentPdu(commentType, newCommentsList.toArray(new String[0])); // comments); CommentPdu commentPdu = pduFactory.makeCommentPdu(commentType, newCommentsList.toArray(new String[0])); // comments);
sendSinglePdu(commentPdu); sendSinglePdu(commentPdu);
if (isVerboseComments()) if (isVerboseComments())
......
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