From 1769a4622ab19c96dea8eea39a934a9ea6593444 Mon Sep 17 00:00:00 2001
From: git <tdnorbra@nps.edu>
Date: Tue, 13 Aug 2024 23:45:15 -0700
Subject: [PATCH] [Terry N.] use disChannel

---
 .../moves/cot/dis/CoTMsgParserDisRunner.java  | 24 ++++++-------------
 1 file changed, 7 insertions(+), 17 deletions(-)

diff --git a/CoTreceiver/src/main/java/edu/nps/moves/cot/dis/CoTMsgParserDisRunner.java b/CoTreceiver/src/main/java/edu/nps/moves/cot/dis/CoTMsgParserDisRunner.java
index 6249368..98327f5 100644
--- a/CoTreceiver/src/main/java/edu/nps/moves/cot/dis/CoTMsgParserDisRunner.java
+++ b/CoTreceiver/src/main/java/edu/nps/moves/cot/dis/CoTMsgParserDisRunner.java
@@ -136,10 +136,6 @@ public class CoTMsgParserDisRunner extends CoTparser
         this();
         disChannel.setNetworkAddress            (address);
         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
@@ -154,8 +150,8 @@ public class CoTMsgParserDisRunner extends CoTparser
         
         getDisChannel().join(); // TODO further functionality expected
         
-        String timeStepMessage = "Simulation timestep duration " + getSimulationTimeStepDuration() + " seconds";
-        getDisChannel().sendCommentPdu(simulationTimeSeconds, DisChannel.COMMENTPDU_SIMULATION_TIMESTEP, timeStepMessage);
+//        String timeStepMessage = "Simulation timestep duration " + getSimulationTimeStepDuration() + " seconds";
+//        getDisChannel().sendCommentPdu(simulationTimeSeconds, DisChannel.COMMENTPDU_SIMULATION_TIMESTEP, timeStepMessage);
         // additional constructor initialization can go here
     }
     
@@ -173,7 +169,10 @@ public class CoTMsgParserDisRunner extends CoTparser
         getDisChannel().setDescriptor(descriptor); // ExampleSimulationProgram might be a superclass
         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)
     }
     
@@ -387,15 +386,6 @@ public class CoTMsgParserDisRunner extends CoTparser
         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
      * @param args command-line parameters: network address and port
@@ -532,7 +522,7 @@ public class CoTMsgParserDisRunner extends CoTparser
             Logger.getLogger(CoTMsgParserDisRunner.class.getName()).log(Level.SEVERE, null, ex);
         }
         
-        sendSinglePdu(entityStatePdu_1);
+        getDisChannel().sendSinglePdu(entityStatePdu_1);
     }
 
     /**
-- 
GitLab