diff --git a/src/edu/nps/moves/dis7/utilities/DisThreadedNetworkInterface.java b/src/edu/nps/moves/dis7/utilities/DisThreadedNetworkInterface.java index 2189710d48f51450f715d008e6a7181e9b2e4aba..5e147c0b430b46ef3377a7cb5278dafb8d514c64 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 6bf5fbb51c2c233d64a0846a463bdbcbe6066a1a..1ab366d85d305ab363791ba14af077b67492c998 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 1eb2dd1b7aff82923038c2eb7a07f0d3e52f73da..0000000000000000000000000000000000000000 --- 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 4cc057d22d66ea330443b87b57653e2d8dd33b85..53af82f29e14444521a2b0415221466cf9f14b39 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