diff --git a/examples/src/OpenDis7Examples/ExampleSimulationProgram.java b/examples/src/OpenDis7Examples/ExampleSimulationProgram.java index 237965eb4ab3d4a7a3b436fec2186f2a8bdb7100..b192753e43df9c28f58688b0a1a650a78b792acb 100644 --- a/examples/src/OpenDis7Examples/ExampleSimulationProgram.java +++ b/examples/src/OpenDis7Examples/ExampleSimulationProgram.java @@ -103,7 +103,7 @@ public class ExampleSimulationProgram // send the status PDUs for this loop and continue 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]"); // =============================== @@ -262,20 +262,20 @@ public class ExampleSimulationProgram */ public void sendCommentPdu(VariableRecordType commentType, // 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 * @param entityStatePdu the ESPDU to send, if any * @param firePdu the FirePDU to send, if any * @param commentType enumeration value describing purpose of the narrative comment * @param comments String array of narrative comments */ - public void sendAllPdus(EntityStatePdu entityStatePdu, + public void sendAllPdusForLoopTimestep(EntityStatePdu entityStatePdu, FirePdu firePdu, VariableRecordType commentType, // vararg... variable-length set of String comments can optionally follow @@ -299,7 +299,7 @@ public class ExampleSimulationProgram { if (commentType == null) 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); sendSinglePdu(commentPdu); if (isVerboseComments())