From 23ba9dca2bafc2b59bde3cb0577803961f37ff7b Mon Sep 17 00:00:00 2001 From: brutzman <brutzman@nps.edu> Date: Mon, 27 Dec 2021 08:20:40 -0800 Subject: [PATCH] add javadoc linking SelfTestLog.txt files --- .../DisThreadedNetworkInterface.java | 8 ++++++-- ...isThreadedNetworkInterfaceSelfTestLog.txt} | 0 .../dis7/utilities/stream/PduPlayer.java | 6 +++++- ...PlayerLog.txt => PduPlayerSelfTestLog.txt} | 0 .../dis7/utilities/stream/PduReceiver.java | 20 ------------------- .../dis7/utilities/stream/PduRecorder.java | 6 +++++- 6 files changed, 16 insertions(+), 24 deletions(-) rename src/edu/nps/moves/dis7/utilities/{DisThreadedNetworkInterfaceLog.txt => DisThreadedNetworkInterfaceSelfTestLog.txt} (100%) rename src/edu/nps/moves/dis7/utilities/stream/{PduPlayerLog.txt => PduPlayerSelfTestLog.txt} (100%) delete mode 100644 src/edu/nps/moves/dis7/utilities/stream/PduReceiver.java diff --git a/src/edu/nps/moves/dis7/utilities/DisThreadedNetworkInterface.java b/src/edu/nps/moves/dis7/utilities/DisThreadedNetworkInterface.java index 2189710d48..5e147c0b43 100644 --- a/src/edu/nps/moves/dis7/utilities/DisThreadedNetworkInterface.java +++ b/src/edu/nps/moves/dis7/utilities/DisThreadedNetworkInterface.java @@ -19,8 +19,12 @@ import java.util.logging.Level; import java.util.logging.Logger; /** - * This is a thread-safe, multicast DIS network interface class. + * This is a thread-safe, multicast DIS network interface class which greatly simplifies reading and writing of PDUs for applications. * + * Example <code>main()</code> self-test response shown in log file. + * @see <a href="https://github.com/open-dis/open-dis7-java/blob/master/src/edu/nps/moves/dis7/utilities/DisThreadedNetworkInterfaceSelfTestLog.txt">https://github.com/open-dis/open-dis7-java/blob/master/src/edu/nps/moves/dis7/utilities/DisThreadedNetworkInterfaceSelfTestLog.txt</a> + * + * @author Don Brutzman, brutzman@nps.edu * @author Mike Bailey, jmbailey@nps.edu * @since Jul 29, 2019 */ @@ -538,7 +542,7 @@ public class DisThreadedNetworkInterface } /** Tell sendingThread and receiveThread to stop. */ - public void setKillSentinelAndInterrupts() // TODO rename AndInterrupts + public void setKillSentinelAndInterrupts() { killed = true; // set loop sentinel for threads to finish diff --git a/src/edu/nps/moves/dis7/utilities/DisThreadedNetworkInterfaceLog.txt b/src/edu/nps/moves/dis7/utilities/DisThreadedNetworkInterfaceSelfTestLog.txt similarity index 100% rename from src/edu/nps/moves/dis7/utilities/DisThreadedNetworkInterfaceLog.txt rename to src/edu/nps/moves/dis7/utilities/DisThreadedNetworkInterfaceSelfTestLog.txt diff --git a/src/edu/nps/moves/dis7/utilities/stream/PduPlayer.java b/src/edu/nps/moves/dis7/utilities/stream/PduPlayer.java index 6bf5fbb51c..1ab366d85d 100644 --- a/src/edu/nps/moves/dis7/utilities/stream/PduPlayer.java +++ b/src/edu/nps/moves/dis7/utilities/stream/PduPlayer.java @@ -19,9 +19,13 @@ import java.util.Base64; import java.util.List; import java.util.regex.Pattern; -/** Utility to play back log files of recorded PDUs. These PDUs can then be resent +/** Utility to play back log files of recorded PDUs, found in ancestor <code>pduLogs</code> subdirectory. These PDUs can then be resent * over a multicast group address, or processed locally. * + * Example <code>main()</code> self-test response shown in log file. + * @see <a href="https://github.com/open-dis/open-dis7-java/blob/master/src/edu/nps/moves/dis7/utilities/stream/PduPlayerSelfTestLog.txt">https://github.com/open-dis/open-dis7-java/blob/master/src/edu/nps/moves/dis7/utilities/stream/PduPlayerSelfTestLog.txt</a> + * + * @author Don Brutzman, brutzman@nps.edu * @author Mike Bailey, jmbailey@nps.edu */ public class PduPlayer { diff --git a/src/edu/nps/moves/dis7/utilities/stream/PduPlayerLog.txt b/src/edu/nps/moves/dis7/utilities/stream/PduPlayerSelfTestLog.txt similarity index 100% rename from src/edu/nps/moves/dis7/utilities/stream/PduPlayerLog.txt rename to src/edu/nps/moves/dis7/utilities/stream/PduPlayerSelfTestLog.txt diff --git a/src/edu/nps/moves/dis7/utilities/stream/PduReceiver.java b/src/edu/nps/moves/dis7/utilities/stream/PduReceiver.java deleted file mode 100644 index 1eb2dd1b7a..0000000000 --- a/src/edu/nps/moves/dis7/utilities/stream/PduReceiver.java +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright (c) 2008-2021, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. - * This work is provided under a BSD open-source license, see project license.html and license.txt - */ -package edu.nps.moves.dis7.utilities.stream; - -/** An interface for capturing PDU raw data for file logging - * - * @author Mike Bailey, jmbailey@nps.edu - */ -public interface PduReceiver -{ - /** Receives a PDU and writes its raw contents to an output file for later - * playback and inspection. - * - * @param bufferByteArray the array containing raw PDU data - * @param len the length of the buffer - */ - void receivePdu(byte[] bufferByteArray, int len); -} diff --git a/src/edu/nps/moves/dis7/utilities/stream/PduRecorder.java b/src/edu/nps/moves/dis7/utilities/stream/PduRecorder.java index 4cc057d22d..53af82f29e 100644 --- a/src/edu/nps/moves/dis7/utilities/stream/PduRecorder.java +++ b/src/edu/nps/moves/dis7/utilities/stream/PduRecorder.java @@ -25,8 +25,12 @@ import java.util.logging.Level; import java.util.logging.Logger; import org.apache.commons.io.FilenameUtils; -/** Utility to save PDUs received over the network to disk +/** Utility to save PDUs received over the network to disk, greatly simplifying the capture of DIS streams by applications. * + * Example <code>main()</code> self-test response shown in log file. + * @see <a href="https://github.com/open-dis/open-dis7-java/blob/master/src/edu/nps/moves/dis7/utilities/stream/PduRecorderSelfTest.log.txt">https://github.com/open-dis/open-dis7-java/blob/master/src/edu/nps/moves/dis7/utilities/stream/PduRecorderSelfTest.log.txt</a> + * + * @author Don Brutzman, brutzman@nps.edu * @author Mike Bailey, jmbailey@nps.edu */ public class PduRecorder // implements PduReceiver -- GitLab