From fd9370ff3b29669b7bae25634dc8a7b4e083727e Mon Sep 17 00:00:00 2001 From: rojas <rojas@N619> Date: Tue, 27 Aug 2024 11:03:19 -0700 Subject: [PATCH] Merge origin/master Conflicts: examples/nbproject/project.properties --- assignments/nbproject/project.properties | 270 +++---- assignments/nbproject/project.xml | 1 - .../SchnitzlerUnicastNetworking.java | 1 + .../Schnitzler/SchnitzlerClient.java | 13 +- .../Schnitzler/SchnitzlerServer.java | 8 + .../Williams/ExampleSimulationProgram.java | 345 +++++++++ .../homework3/Williams/README.md | 15 + .../homework3/Williams/package-info.java | 10 + build.xml | 660 +++++++++--------- c_app.ViskitDefaultMV3500.xml | 110 ++- c_app.ViskitDefaultProject.xml | 132 ++-- 11 files changed, 974 insertions(+), 591 deletions(-) create mode 100644 assignments/src/MV3500Cohort2024JulySeptember/homework3/Williams/ExampleSimulationProgram.java create mode 100644 assignments/src/MV3500Cohort2024JulySeptember/homework3/Williams/README.md create mode 100644 assignments/src/MV3500Cohort2024JulySeptember/homework3/Williams/package-info.java diff --git a/assignments/nbproject/project.properties b/assignments/nbproject/project.properties index acc52782ce..8bf756cc93 100644 --- a/assignments/nbproject/project.properties +++ b/assignments/nbproject/project.properties @@ -1,135 +1,135 @@ -annotation.processing.enabled=true -annotation.processing.enabled.in.editor=false -annotation.processing.processors.list= -annotation.processing.run.all.processors=true -annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output -application.desc=Student assignments performed as part of NPS course Networked Graphics MV3500. This course is an introduction to network communications in simulation applications. Topics include an introduction to the TCP/IP protocol stack; TCP/IP socket communications, including TCP, UDP, and multicast; and protocol design issues, with emphasis on Distributed Interactive Simulation (DIS) Protocol and High Level Architecture (HLA). Course emphasis is on creation and testing of network programming network code and web-browser applications. -application.homepage=https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/tree/master/assignments -application.splash=../..\\NetworkedGraphicsMV3500\\documentation\\images\\OpenDisSurferDude.png -application.title=NPS Networked Graphics MV3500 assignments -application.vendor=Don Brutzman -auxiliary.org-netbeans-spi-editor-hints-projects.perProjectHintSettingsFile=nbproject/cfg_hints.xml -build.classes.dir=${build.dir}/classes -build.classes.excludes=**/*.java,**/*.form -# This directory is removed when the project is cleaned: -build.dir=build -build.generated.dir=${build.dir}/generated -build.generated.sources.dir=${build.dir}/generated-sources -# Only compile against the classpath explicitly listed here: -build.sysclasspath=ignore -build.test.classes.dir=${build.dir}/test/classes -build.test.results.dir=${build.dir}/test/results -# Uncomment to specify the preferred debugger connection transport: -#debug.transport=dt_socket -debug.classpath=\ - ${run.classpath} -debug.modulepath=\ - ${run.modulepath} -debug.test.classpath=\ - ${run.test.classpath} -debug.test.modulepath=\ - ${run.test.modulepath} -# Files in build.classes.dir which should be excluded from distribution jar -# Avoid compilation or inclusion of student project depending on mutex libraries only available in JDK8 -# https://stackoverflow.com/questions/27906896/exclude-package-from-build-but-not-from-view-in-netbeans-8 -excludes=**/MV3500Cohort2019JulySeptember/projects/BrennenstuhlKnobelochMcCann/** -dist.archive.excludes=**/MV3500Cohort2019JulySeptember/projects/BrennenstuhlKnobelochMcCann/** - -# This directory is removed when the project is cleaned: -dist.dir=dist -dist.jar=${dist.dir}/Networked_Graphics_MV3500_assignments.jar -dist.javadoc.dir=${dist.dir}/javadoc -endorsed.classpath= -file.reference.dis-enums-1.3.jar=../lib/dis-enums-1.3.jar -file.reference.opendis7-full.jar=../lib/opendis7-full.jar -file.reference.open-dis_4.16.jar=../lib/open-dis_4.16.jar -file.reference.simkit-doc.zip=../lib/simkit-doc.zip -file.reference.simkit-src.zip=../lib/simkit-src.zip -file.reference.simkit.jar=../lib/simkit.jar -#file.reference.opendis7-enumerations-classes.jar=../lib/opendis7-enumerations-classes.jar -#file.reference.opendis7-pdus-classes.jar=../lib/opendis7-pdus-classes.jar -includes=** -jar.archive.disabled=${jnlp.enabled} -jar.compress=false -jar.index=${jnlp.enabled} -javac.classpath=\ - ${file.reference.opendis7-full.jar}:\ - ${file.reference.dis-enums-1.3.jar}:\ - ${file.reference.open-dis_4.16.jar}:\ - ${file.reference.simkit-doc.zip}:\ - ${file.reference.simkit-src.zip}:\ - ${file.reference.simkit.jar} -# ${file.reference.opendis7-enumerations-classes.jar}:\ -# ${file.reference.opendis7-pdus-classes.jar}:\ - -# Space-separated list of extra javac options -javac.compilerargs=-Xlint:deprecation -Xlint:unchecked -javac.deprecation=false -javac.external.vm=true -javac.modulepath= -javac.processormodulepath= -javac.processorpath=\ - ${javac.classpath} -javac.source=22 -javac.target=22 -javac.test.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -javac.test.modulepath=\ - ${javac.modulepath} -javac.test.processorpath=\ - ${javac.test.classpath} -javadoc.additionalparam=-header "NPS Networked Graphics MV3500 Assignments" -javadoc.author=true -javadoc.encoding=${source.encoding} -javadoc.html5=false -javadoc.noindex=false -javadoc.nonavbar=false -javadoc.notree=false -javadoc.private=false -#javadoc.reference.opendis7-enumerations-classes.jar=../lib/opendis7-enumerations-javadoc.jar -javadoc.splitindex=true -javadoc.use=true -javadoc.version=false -javadoc.windowtitle=MV3500 Assignments -jlink.launcher=false -jlink.launcher.name=Networked_Graphics_MV3500_assignments -jnlp.codebase.type=no.codebase -jnlp.descriptor=application -jnlp.enabled=false -jnlp.mixed.code=default -jnlp.offline-allowed=false -jnlp.signed=false -jnlp.signing= -jnlp.signing.alias= -jnlp.signing.keystore= -# Optional override of default Application-Library-Allowable-Codebase attribute identifying the locations where your signed RIA is expected to be found. -manifest.custom.application.library.allowable.codebase= -# Optional override of default Caller-Allowable-Codebase attribute identifying the domains from which JavaScript code can make calls to your RIA without security prompts. -manifest.custom.caller.allowable.codebase= -# Optional override of default Codebase manifest attribute, use to prevent RIAs from being repurposed -manifest.custom.codebase= -# Optional override of default Permissions manifest attribute (supported values: sandbox, all-permissions) -manifest.custom.permissions= -meta.inf.dir=${src.dir}/META-INF -mkdist.disabled=false -platform.active=JDK_22 -project.licensePath=../license.txt -run.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -# Space-separated list of JVM arguments used when running the project. -# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. -# To set system properties for unit tests define test-sys-prop.name=value: -run.jvmargs= -run.modulepath=\ - ${javac.modulepath} -run.test.classpath=\ - ${javac.test.classpath}:\ - ${build.test.classes.dir} -run.test.modulepath=\ - ${javac.test.modulepath} -source.encoding=UTF-8 -#source.reference.opendis7-enumerations-classes.jar=../lib/opendis7-enumerations-source.jar -src.dir=src -test.src.dir=test +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +application.desc=Student assignments performed as part of NPS course Networked Graphics MV3500. This course is an introduction to network communications in simulation applications. Topics include an introduction to the TCP/IP protocol stack; TCP/IP socket communications, including TCP, UDP, and multicast; and protocol design issues, with emphasis on Distributed Interactive Simulation (DIS) Protocol and High Level Architecture (HLA). Course emphasis is on creation and testing of network programming network code and web-browser applications. +application.homepage=https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/tree/master/assignments +application.splash=../..\\NetworkedGraphicsMV3500\\documentation\\images\\OpenDisSurferDude.png +application.title=NPS Networked Graphics MV3500 assignments +application.vendor=Don Brutzman +auxiliary.org-netbeans-spi-editor-hints-projects.perProjectHintSettingsFile=nbproject/cfg_hints.xml +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.modulepath=\ + ${run.modulepath} +debug.test.classpath=\ + ${run.test.classpath} +debug.test.modulepath=\ + ${run.test.modulepath} +# Files in build.classes.dir which should be excluded from distribution jar +# Avoid compilation or inclusion of student project depending on mutex libraries only available in JDK8 +# https://stackoverflow.com/questions/27906896/exclude-package-from-build-but-not-from-view-in-netbeans-8 +excludes=**/MV3500Cohort2019JulySeptember/projects/BrennenstuhlKnobelochMcCann/** +dist.archive.excludes=**/MV3500Cohort2019JulySeptember/projects/BrennenstuhlKnobelochMcCann/** + +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Networked_Graphics_MV3500_assignments.jar +dist.javadoc.dir=${dist.dir}/javadoc +endorsed.classpath= +file.reference.dis-enums-1.3.jar=../lib/dis-enums-1.3.jar +file.reference.opendis7-full.jar=../lib/opendis7-full.jar +file.reference.open-dis_4.16.jar=../lib/open-dis_4.16.jar +file.reference.simkit-doc.zip=../lib/simkit-doc.zip +file.reference.simkit-src.zip=../lib/simkit-src.zip +file.reference.simkit.jar=../lib/simkit.jar +#file.reference.opendis7-enumerations-classes.jar=../lib/opendis7-enumerations-classes.jar +#file.reference.opendis7-pdus-classes.jar=../lib/opendis7-pdus-classes.jar +includes=** +jar.archive.disabled=${jnlp.enabled} +jar.compress=false +jar.index=${jnlp.enabled} +javac.classpath=\ + ${file.reference.opendis7-full.jar}:\ + ${file.reference.dis-enums-1.3.jar}:\ + ${file.reference.open-dis_4.16.jar}:\ + ${file.reference.simkit-doc.zip}:\ + ${file.reference.simkit-src.zip}:\ + ${file.reference.simkit.jar} +# ${file.reference.opendis7-enumerations-classes.jar}:\ +# ${file.reference.opendis7-pdus-classes.jar}:\ + +# Space-separated list of extra javac options +javac.compilerargs=-Xlint:deprecation -Xlint:unchecked +javac.deprecation=false +javac.external.vm=true +javac.modulepath= +javac.processormodulepath= +javac.processorpath=\ + ${javac.classpath} +javac.source=22 +javac.target=22 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.modulepath=\ + ${javac.modulepath} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam=-header "NPS Networked Graphics MV3500 Assignments" +javadoc.author=true +javadoc.encoding=${source.encoding} +javadoc.html5=false +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +#javadoc.reference.opendis7-enumerations-classes.jar=../lib/opendis7-enumerations-javadoc.jar +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle=MV3500 Assignments +jlink.launcher=false +jlink.launcher.name=Networked_Graphics_MV3500_assignments +jnlp.codebase.type=no.codebase +jnlp.descriptor=application +jnlp.enabled=false +jnlp.mixed.code=default +jnlp.offline-allowed=false +jnlp.signed=false +jnlp.signing= +jnlp.signing.alias= +jnlp.signing.keystore= +# Optional override of default Application-Library-Allowable-Codebase attribute identifying the locations where your signed RIA is expected to be found. +manifest.custom.application.library.allowable.codebase= +# Optional override of default Caller-Allowable-Codebase attribute identifying the domains from which JavaScript code can make calls to your RIA without security prompts. +manifest.custom.caller.allowable.codebase= +# Optional override of default Codebase manifest attribute, use to prevent RIAs from being repurposed +manifest.custom.codebase= +# Optional override of default Permissions manifest attribute (supported values: sandbox, all-permissions) +manifest.custom.permissions= +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=JDK_22 +project.licensePath=../license.txt +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.modulepath=\ + ${javac.modulepath} +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +run.test.modulepath=\ + ${javac.test.modulepath} +source.encoding=UTF-8 +#source.reference.opendis7-enumerations-classes.jar=../lib/opendis7-enumerations-source.jar +src.dir=src +test.src.dir=test diff --git a/assignments/nbproject/project.xml b/assignments/nbproject/project.xml index f4711c4a46..ec9c9401e0 100644 --- a/assignments/nbproject/project.xml +++ b/assignments/nbproject/project.xml @@ -4,7 +4,6 @@ <configuration> <data xmlns="http://www.netbeans.org/ns/j2se-project/3"> <name>Networked Graphics MV3500 assignments</name> - <explicit-platform explicit-source-supported="true"/> <source-roots> <root id="src.dir"/> </source-roots> diff --git a/assignments/src/MV3500Cohort2024JulySeptember/homework1/Schnitzler/SchnitzlerUnicastNetworking.java b/assignments/src/MV3500Cohort2024JulySeptember/homework1/Schnitzler/SchnitzlerUnicastNetworking.java index 7bdf6b2663..52405cbcb2 100644 --- a/assignments/src/MV3500Cohort2024JulySeptember/homework1/Schnitzler/SchnitzlerUnicastNetworking.java +++ b/assignments/src/MV3500Cohort2024JulySeptember/homework1/Schnitzler/SchnitzlerUnicastNetworking.java @@ -21,6 +21,7 @@ public class SchnitzlerUnicastNetworking { } /** + * Program invocation, execution starts here * @param args the command line arguments */ public static void main(String[] args) { diff --git a/assignments/src/MV3500Cohort2024JulySeptember/homework2/Schnitzler/SchnitzlerClient.java b/assignments/src/MV3500Cohort2024JulySeptember/homework2/Schnitzler/SchnitzlerClient.java index d1d3b1c85d..7e97435c1d 100644 --- a/assignments/src/MV3500Cohort2024JulySeptember/homework2/Schnitzler/SchnitzlerClient.java +++ b/assignments/src/MV3500Cohort2024JulySeptember/homework2/Schnitzler/SchnitzlerClient.java @@ -13,11 +13,22 @@ import java.util.Scanner; * @author simonschnitzler */ public class SchnitzlerClient { + + /** Default constructor */ + public SchnitzlerClient(){ + // default constructor + } + + /** IPv6 String constant for localhost address, similarly IPv4 127.0.0.1 + * @see <a href="https://en.wikipedia.org/wiki/localhost" target="_blank">https://en.wikipedia.org/wiki/localhost</a> + * @see <a href="https://en.wikipedia.org/wiki/IPv6_address" target="_blank">https://en.wikipedia.org/wiki/IPv6_address</a> + */ public final static String LOCALHOST = "0:0:0:0:0:0:0:1"; //Local host /** + * Program invocation, execution starts here * @param args the command line arguments - * @throws java.lang.Exception + * @throws java.lang.Exception if connection failed */ public static void main(String[] args) throws Exception { Socket socket = new Socket(LOCALHOST, 2317); diff --git a/assignments/src/MV3500Cohort2024JulySeptember/homework2/Schnitzler/SchnitzlerServer.java b/assignments/src/MV3500Cohort2024JulySeptember/homework2/Schnitzler/SchnitzlerServer.java index 47cc363f2d..9b1e5afc7b 100644 --- a/assignments/src/MV3500Cohort2024JulySeptember/homework2/Schnitzler/SchnitzlerServer.java +++ b/assignments/src/MV3500Cohort2024JulySeptember/homework2/Schnitzler/SchnitzlerServer.java @@ -16,10 +16,18 @@ import java.util.Set; * @author simonschnitzler */ public class SchnitzlerServer { + + /** Default constructor */ + public SchnitzlerServer(){ + // default constructor + } + // the set clientWriters contains form all sockets the active PrintStream private static Set<PrintWriter> clientWriters = new HashSet<>(); /** + * Program invocation, execution starts here + * * @param args the command line arguments */ public static void main(String[] args) { diff --git a/assignments/src/MV3500Cohort2024JulySeptember/homework3/Williams/ExampleSimulationProgram.java b/assignments/src/MV3500Cohort2024JulySeptember/homework3/Williams/ExampleSimulationProgram.java new file mode 100644 index 0000000000..a428dd2d01 --- /dev/null +++ b/assignments/src/MV3500Cohort2024JulySeptember/homework3/Williams/ExampleSimulationProgram.java @@ -0,0 +1,345 @@ +/** + * Copyright (c) 2008-2024, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD open-source license, see project license.html or license.txt + * + * This main class is my submission for HW 3. + * + * @author ethanjwilliams + */ +package MV3500Cohort2024JulySeptember.homework3.Williams; + + +import edu.nps.moves.dis7.entities.swe.platform.surface._001Poseidon; +import edu.nps.moves.dis7.entities.swe.platform.surface._002Triton; +import edu.nps.moves.dis7.enumerations.*; +import edu.nps.moves.dis7.pdus.*; +import edu.nps.moves.dis7.utilities.DisChannel; +import edu.nps.moves.dis7.utilities.PduFactory; +import java.time.LocalDateTime; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * The purpose of this inheritable class is to provide an easily modifiable + * example simulation program that includes DIS-capable entities performing + * tasks of interest, and then reporting activity via PDUs to the network. + * Default program initialization includes PDU recording turned on by default. + * + * Homework 3 Networking choices: + * This simulation uses UDP multicast for efficient distribution of PDUs to + * multiple participants, which is suitable for large-scale simulations where + * state updates need to reach all networked participants. UDP is chosen over + * TCP due to its lower latency, which is essential for real-time simulations. + * + * @see <a href="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/blob/master/examples/src/OpenDis7Examples/ExampleSimulationProgramLog.txt" target="_blank">ExampleSimulationProgramLog.txt</a> + * @see <a href="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/blob/master/examples/src/OpenDis7Examples/ExampleSimulationProgramPduCaptureLog.dislog" target="_blank">ExampleSimulationProgramPduCaptureLog.dislog</a> + * @see <a href="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/blob/master/examples/src/OpenDis7Examples/ExampleSimulationProgramFlowDiagram.pdf" target="_blank">ExampleSimulationProgramFlowDiagram.pdf</a> + * @see <a href="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/blob/master/examples/src/OpenDis7Examples/ExampleSimulationProgramWireshark.png" target="_blank">ExampleSimulationProgramWireshark.png</a> + * @see <a href="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/blob/master/examples/src/OpenDis7Examples/ExampleSimulationProgramSequenceDiagram.png" target="_blank">ExampleSimulationProgramSequenceDiagram.png</a> + */ +public class ExampleSimulationProgram +{ + /* **************************** infrastructure code, modification is seldom needed ************************* */ + + private String descriptor = this.getClass().getSimpleName(); + /** DIS channel defined by network address/port combination includes multiple utility capabilities */ + protected DisChannel disChannel; + /** Factory object used to create new PDU instances */ + protected PduFactory pduFactory; + + /** seconds per loop for real-time or simulation execution */ + private double simulationTimeStepDuration = 1.0; // seconds TODO encapsulate + /** initial simulation time in seconds */ + double simulationTimeInitial = 0.0; + /** current simulation time in seconds */ + double simulationTimeSeconds = simulationTimeInitial; + /** Maximum number of simulation loops */ + int MAX_LOOP_COUNT = 4; + + String narrativeMessage1 = new String(); + String narrativeMessage2 = new String(); + String narrativeMessage3 = new String(); + + /** EntityID settings for entity 1 */ + protected EntityID entityID_1 = new EntityID(); + /** EntityID settings for entity 2 */ + protected EntityID entityID_2 = new EntityID(); + /** ESPDU for entity 1 */ + protected EntityStatePdu entityStatePdu_1; + /** ESPDU for entity 2 */ + protected EntityStatePdu entityStatePdu_2; + /** FirePdu for entity 1 first weapon (if any) */ + protected FirePdu firePdu_1a; + /** FirePdu for entity 1 second weapon (if any) */ + protected FirePdu firePdu_1b; + /** MunitionDescriptor for these weapons */ + protected MunitionDescriptor munitionDescriptor1; + + /** + * Constructor to create an instance of this class. + * Design goal: additional built-in initialization conveniences can go here + * to keep your efforts focused on the runSimulation() method. + */ + public ExampleSimulationProgram() + { + initialize(); + } + /** + * Constructor to create an instance of this class. + * @param newDescriptor describes this program, useful for logging and debugging + */ + public ExampleSimulationProgram(String newDescriptor) + { + descriptor = newDescriptor; + initialize(); + } + /** + * Utility Constructor that allows your example simulation program to override default network address and port + * @param address network address to use + * @param port corresponding network port to use + */ + public ExampleSimulationProgram(String address, int port) + { + disChannel.setNetworkAddress(address); + disChannel.setNetworkPort(port); + disChannel.setVerboseComments(true); + disChannel.setVerboseDisNetworkInterface(true); + disChannel.setVerbosePduRecorder(true); + initialize(); + } + + /** Initialize channel setup for OpenDis7 and report a test PDU + * @see initializeDisChannel + * @see initializeSimulationEntities */ + private void initialize() + { + initializeDisChannel(); + initializeSimulationEntities(); + + disChannel.join(); + + String timeStepMessage = "Simulation timestep duration " + getSimulationTimeStepDuration() + " seconds"; + disChannel.sendCommentPdu(simulationTimeSeconds, DisChannel.COMMENTPDU_SIMULATION_TIMESTEP, timeStepMessage); + } + + /** Initialize channel setup for OpenDis7 and report a test PDU */ + private void initializeDisChannel() + { + if (disChannel == null) + disChannel = new DisChannel(); + else + { + disChannel.printlnTRACE ("*** warning, duplicate invocation of initializeDisChannel() ignored"); + return; + } + pduFactory = disChannel.getPduFactory(); + disChannel.setDescriptor(this.getClass().getSimpleName()); + disChannel.setUpNetworkInterface(); + disChannel.printlnTRACE ("just checking: disChannel.getNetworkAddress()=" + disChannel.getNetworkAddress() + + ", getNetworkPort()=" + disChannel.getNetworkPort()); + disChannel.getDisNetworkInterface().setVerbose(true); + disChannel.printlnTRACE ("just checking: hasVerboseSending()=" + disChannel.getDisNetworkInterface().hasVerboseSending() + + ", hasVerboseReceipt()=" + disChannel.getDisNetworkInterface().hasVerboseReceipt()); + disChannel.getPduRecorder().setVerbose(true); + } + + /** Initialize simulation entities. + */ + public void initializeSimulationEntities() + { + if (pduFactory == null) + pduFactory = disChannel.getPduFactory(); + entityStatePdu_1 = pduFactory.makeEntityStatePdu(); + entityStatePdu_2 = pduFactory.makeEntityStatePdu(); + firePdu_1a = pduFactory.makeFirePdu(); + firePdu_1b = pduFactory.makeFirePdu(); + munitionDescriptor1 = new MunitionDescriptor(); + + // Define participants + entityID_1.setSiteID(1).setApplicationID(2).setEntityID(3); + disChannel.addEntity(entityID_1); + + entityID_2.setSiteID(1).setApplicationID(2).setEntityID(4); + disChannel.addEntity(entityID_2); + + entityStatePdu_1.setEntityID(entityID_1); + entityStatePdu_1.setForceId(ForceID.FRIENDLY); + entityStatePdu_1.setEntityType(new _001Poseidon()); + entityStatePdu_1.setMarking("Entity #53"); + + entityStatePdu_2.setEntityID(entityID_2); + entityStatePdu_2.setForceId(ForceID.OPPOSING); + entityStatePdu_2.setEntityType(new _002Triton()); + entityStatePdu_2.setMarking("Entity #2"); + + munitionDescriptor1.setQuantity(1); + firePdu_1a.setDescriptor(munitionDescriptor1).setRange(1000.0f); + } + + /** + * This runSimulationLoops() method is customizable for running new simulations. + */ + @SuppressWarnings("SleepWhileInLoop") + public void runSimulationLoops () + { + try + { + final int SIMULATION_MAX_LOOP_COUNT = 10; + int simulationLoopCount = 0; + boolean simulationComplete = false; + + String timeMessage = "Simulation time " + simulationTimeSeconds + " at LocalDateTime " + LocalDateTime.now(); + disChannel.sendCommentPdu(simulationTimeSeconds, DisChannel.COMMENTPDU_TIME, timeMessage); + + while (simulationLoopCount < SIMULATION_MAX_LOOP_COUNT) + { + simulationLoopCount++; + + entityStatePdu_1.getEntityLocation().setX(entityStatePdu_1.getEntityLocation().getX() + 1.0); + + System.out.println ("... My simulation just did something..."); + System.out.flush(); + + narrativeMessage1 = "MV3500 ExampleSimulationProgram"; + narrativeMessage2 = "runSimulation() loop " + simulationLoopCount; + + if (simulationLoopCount > MAX_LOOP_COUNT) + { + simulationComplete = true; + } + + Thread.sleep((long)(getSimulationTimeStepDuration() * 1000)); + System.out.println ("... [Pausing for " + getSimulationTimeStepDuration() + " seconds]"); + + sendAllPdusForLoopTimestep(simulationTimeSeconds, + entityStatePdu_1, + firePdu_1a, + DisChannel.COMMENTPDU_APPLICATION_STATUS, + narrativeMessage1, narrativeMessage2); + disChannel.sendSinglePdu(simulationTimeSeconds, entityStatePdu_2); + + System.out.println ("... [PDUs of interest successfully sent for this loop]"); + System.out.flush(); + + if (simulationComplete || (simulationLoopCount > 10000)) + { + System.out.println ("... [loop termination condition met, simulationComplete=" + simulationComplete + "]"); + System.out.flush(); + break; + } + simulationTimeSeconds += getSimulationTimeStepDuration(); + } + + narrativeMessage2 = "runSimulation() completed successfully"; + disChannel.sendCommentPdu(DisChannel.COMMENTPDU_NARRATIVE, narrativeMessage1, narrativeMessage2, narrativeMessage3); + System.out.println ("... [final=completion CommentPdu successfully sent for simulation]"); + + disChannel.leave(); + } + catch (InterruptedException iex) + { + Logger.getLogger(ExampleSimulationProgram.class.getSimpleName()).log(Level.SEVERE, null, iex); + } + } + + /** + * Send EntityState, Fire, Comment PDUs for this loop. + * @param simTimeSeconds simulation time in seconds + * @param entityStatePdu the ESPDU to send + * @param firePdu the FirePDU to send + * @param commentType enumeration value describing purpose of the narrative comment PDU + * @param comments String array of narrative comments + */ + public void sendAllPdusForLoopTimestep(double simTimeSeconds, + EntityStatePdu entityStatePdu, + FirePdu firePdu, + VariableRecordType commentType, + String... comments) + { + if (entityStatePdu != null) + disChannel.sendSinglePdu(simTimeSeconds, entityStatePdu); + + if (firePdu != null) + disChannel.sendSinglePdu(simTimeSeconds, firePdu); + + disChannel.sendCommentPdu(simTimeSeconds, commentType, comments); + } + + /** + * Initial execution via main() method: handle args array of command-line initialization (CLI) arguments here + * @param args command-line parameters: network address and port + */ + protected void handleArguments (String[] args) + { + if (args.length == 2) + { + if ((args[0] != null) && !args[0].isEmpty()) + thisProgram.disChannel.setNetworkAddress(args[0]); + if ((args[1] != null) && !args[1].isEmpty()) + thisProgram.disChannel.setNetworkPort(Integer.parseInt(args[1])); + } + else if (args.length != 0) + { + System.err.println("Usage: " + thisProgram.getClass().getSimpleName() + " [address port]"); + System.exit(-1); + } + } + + /** + * Get simple descriptor for this network interface, used in trace statements + * @return simple descriptor name + */ + public String getDescriptor() { + return descriptor; + } + + /** + * Set new simple descriptor for this network interface, used in trace statements + * @param newDescriptor simple descriptor name for this interface + */ + public void setDescriptor(String newDescriptor) { + if (newDescriptor == null) + newDescriptor = ""; + this.descriptor = newDescriptor; + } + + /** + * parameter accessor method + * @return the simulationTimeStepDuration in seconds + */ + public double getSimulationTimeStepDuration() { + return simulationTimeStepDuration; + } + + /** + * parameter accessor method + * @param timeStepDurationSeconds the simulationTimeStepDuration in seconds to set + */ + public void setSimulationTimeStepDuration(double timeStepDurationSeconds) { + this.simulationTimeStepDuration = timeStepDurationSeconds; + } + + /** Locally instantiable copy of program, can be subclassed. */ + protected static ExampleSimulationProgram thisProgram; + + /** + * Main method is first executed when a program instance is loaded. + * @param args command-line parameters: network address and port. + */ + public static void main(String[] args) + { + thisProgram = new ExampleSimulationProgram("test constructor"); + + thisProgram.disChannel.printlnTRACE("main() started..."); + + thisProgram.handleArguments(args); + + thisProgram.runSimulationLoops(); + + thisProgram.disChannel.tearDownNetworkInterface(); + + thisProgram.disChannel.printlnTRACE("complete."); + + System.exit(0); + } +} \ No newline at end of file diff --git a/assignments/src/MV3500Cohort2024JulySeptember/homework3/Williams/README.md b/assignments/src/MV3500Cohort2024JulySeptember/homework3/Williams/README.md new file mode 100644 index 0000000000..c0275ad9b1 --- /dev/null +++ b/assignments/src/MV3500Cohort2024JulySeptember/homework3/Williams/README.md @@ -0,0 +1,15 @@ +For Homework 3, I modified the OpenDIS ExampleSimulationProgram to enhance its functionality +by experimenting with entity enumeration values and adjusting the network communication setup. +Specifically, I changed the entities in the simulation to a Swedish Poseidon-class surface vessel +(Entity 1) and a Triton-class surface vessel (Entity 2) from the dis entities list. +I assigned Entity 1 to the friendly force and Entity 2 to the enemy force to simulate an adversarial scenario, +and I configured a FirePDU for Entity 1 with custom munition settings. On the networking side, I configured the +program to use UDP multicast for distribution of the PDUs across +multiple participants in a simulation environment. This choice was driven by the need for +low-latency communication in large-scale simulations, where UDP's minimal overhead is +advantageous, and multicast ensures that updates reach all participants simultaneously. I also +enabled verbose logging to facilitate debugging. Additionally, I adjusted +the simulation loop to increment Entity 1’s position in each iteration, simulating movement, and set +the loop to run for a maximum of 10 iterations, with the ability to terminate early if certain +conditions are met. In my opinion, these changes improve the program’s ability to simulate realistic +scenarios while maintaining efficient and responsive network communication. \ No newline at end of file diff --git a/assignments/src/MV3500Cohort2024JulySeptember/homework3/Williams/package-info.java b/assignments/src/MV3500Cohort2024JulySeptember/homework3/Williams/package-info.java new file mode 100644 index 0000000000..77f86efe62 --- /dev/null +++ b/assignments/src/MV3500Cohort2024JulySeptember/homework3/Williams/package-info.java @@ -0,0 +1,10 @@ +/** + * Final project assignments supporting the NPS MOVES MV3500 Networked Graphics course. + * + * @see <a href="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/tree/master/assignments" target="_blank">networkedGraphicsMV3500 assignments</a> + * @see java.lang.Package + * @see <a href="https://stackoverflow.com/questions/22095487/why-is-package-info-java-useful" target="_blank">StackOverflow: why-is-package-info-java-useful</a> + * @see <a href="https://stackoverflow.com/questions/624422/how-do-i-document-packages-in-java" target="_blank">StackOverflow: how-do-i-document-packages-in-java</a> + */ + +package MV3500Cohort2024JulySeptember.homework3.Williams; diff --git a/build.xml b/build.xml index e79a8818f1..3e8559d124 100644 --- a/build.xml +++ b/build.xml @@ -1,330 +1,332 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Copyright (c) 1995-2023 held by the author(s). All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - * Neither the names of the Naval Postgraduate School (NPS) - Modeling Virtual Environments and Simulation (MOVES) Institute - (https://www.nps.edu and https://www.MovesInstitute.org) - nor the names of its contributors may be used to endorse or - promote products derived from this software without specific - prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. ---> - -<!-- - Document : build.xml - Created on : 1 November 2017 - Author : Don Brutzman and Don McGregor - Description: Ant build.xml file for Networked Graphics MV3500 ---> -<project name="MV3500 Networked Graphics" default="all" basedir="."> - <description>Build targets for NPS Networked Graphics MV3500</description> - - <!-- TODO add targets for project maintenance, testing and deployment - - <property name="specificationsDirectory" location="specifications"/> - <import file="specifications/build.xml"/> --> - <property file="build.properties"/> - - <target name="versions" description="show tool versions and environment values"> - <echo>ant -version</echo> - <exec executable="ant" dir="." vmlauncher="false"> - <arg value="-version"/> - </exec> - <echo>java -version</echo> - <exec executable="java" dir="." vmlauncher="false"> - <arg value="-version"/> - </exec> - <echo></echo> - <!-- Ant environment variables https://ant.apache.org/manual/Tasks/property.html --> - <echo> ANT_HOME=${env.ANT_HOME}</echo> - <echo> JAVA_HOME=${env.JAVA_HOME}</echo> - <echo>CLASSPATH=${env.CLASSPATH}</echo> - <!--<echo>USER =${env.USER}</echo> --> - <!-- https://stackoverflow.com/questions/949678/ant-is-using-wrong-java-version --> - <!--echo>javac source/target $java.source=${java.source}</ --> - <echo>Java/JVM version $ant.java.version=${ant.java.version}</echo> - <echo>Java/JVM detail version $java.version=${java.version}</echo> - <echo>Ant version $ant.version=${ant.version}</echo> - <echo>Configuration settings: https://savage.nps.edu/Savage/developers.html</echo> - <!-- TODO Netbeans version --> - <!-- TODO Netbeans project version --> - <!-- DEBUG: to show all environment and local properties, add - <echoproperties/> --> - <echo message="==========================================="/> - </target> - - <target name="all" depends="versions"> - <ant dir="examples" target="clean"/> - <ant dir="examples" target="jar"/> - <ant dir="assignments" target="clean"/> - <ant dir="assignments" target="jar"/> - <antcall target="javadoc.all"/> - </target> - - <target name="clean.all.pduLogs" description="clean autogenerated PDU capture logs"> - <ant dir="assignments" target="clean.all.pduLogs"/> - <ant dir="examples" target="clean.all.pduLogs"/> - </target> - - <target name="javadoc.all"> - <ant dir="assignments" target="javadoc.custom" useNativeBaseDir="true"/> - <ant dir="examples" target="javadoc.custom" useNativeBaseDir="true"/> - </target> - - <target name="view.gitlab.nps.edu.MV3500" description="view MV3500 gitlab site in web browser (via Netbeans only)"> - <echo message="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500"/> - <nbbrowse url="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500"/> - <!-- TODO implementation-independent approach if possible. other Ant approaches have to be customized for each OS --> - </target> - - <target name="view.gitlab.nps.edu.MV3500.assignments" description="view MV3500 gitlab examples in web browser (via Netbeans only)"> - <echo message="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/tree/master/assignments"/> - <nbbrowse url="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/tree/master/assignments"/> - </target> - - <target name="view.gitlab.nps.edu.MV3500.examples" description="view MV3500 gitlab examples in web browser (via Netbeans only)"> - <echo message="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/tree/master/examples"/> - <nbbrowse url="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/tree/master/examples"/> - <!-- TODO implementation-independent approach if possible. other Ant approaches have to be customized for each OS --> - </target> - - <target name="view.gitlab.nps.edu.MV3500.issues" description="view online issues in web browser (Netbeans only)"> - <echo message="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/issues" /> - <nbbrowse url="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/issues" /> - <!-- TODO implementation-independent approach if possible, but note that other Ant approaches usually have to be customized for each OS. --> - <echo message="... for issue visibility, be sure to login" /> - </target> - - <target name="view.gitlab.nps.edu.MV3500.specifications.README" description="view MV3500 gitlab examples in web browser (via Netbeans only)"> - <echo message="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/tree/master/specifications/README.md"/> - <nbbrowse url="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/tree/master/specifications/README.md"/> - </target> - - <target name="view.open-dis.github.com" description="view github open-dis site in web browser (via Netbeans only)"> - <echo message="https://github.com/open-dis"/> - <nbbrowse url="https://github.com/open-dis"/> - </target> - - <target name="view.open-dis.github.com.opendis7-java" description="view github open-dis open-dis-java current build in web browser (via Netbeans only)"> - <echo message="https://github.com/open-dis/opendis7-java"/> - <nbbrowse url="https://github.com/open-dis/opendis7-java"/> - </target> - - <target name="view.open-dis.github.com.opendis7-source-generator" description="view github open-dis opendis7-source-generator project in web browser (via Netbeans only)"> - <echo message="https://github.com/open-dis"/> - <nbbrowse url="https://github.com/open-dis"/> - </target> - - <target name="update.opendis7.jar.from.local" description="update opendis7-java jar files from locally built project into lib directory"> - - <property name="opendis7-java.relative" value="../../x3d-github/opendis7-java/dist"/> - <echo message="Copy ${opendis7-java.relative}/opendis7-full.jar to project lib/ subdirectory..."/> - <!-- https://ant.apache.org/manual/Tasks/fail.html --> - <fail message="opendis7-full.jar not found"> - <condition> - <not> - <resourcecount count="1"> - <fileset id="fs" dir="${opendis7-java.relative}" includes="opendis7-full.jar"/><!-- comma separated --> - </resourcecount> - </not> - </condition> - </fail> - <!-- clean out prior versions --> - <delete file="lib/opendis7-pdus-classes.jar" verbose="false" failonerror="false"/> - <delete file="lib/opendis7-pdus-javadoc.jar" verbose="false" failonerror="false"/> - <delete file="lib/opendis7-pdus-source.jar" verbose="false" failonerror="false"/> - <delete file="lib/opendis7-enumerations-classes.jar" verbose="false" failonerror="false"/> - <delete file="lib/opendis7-enumerations-javadoc.jar" verbose="false" failonerror="false"/> - <delete file="lib/opendis7-enumerations-source.jar" verbose="false" failonerror="false"/> - - <!-- replace latest version --> - <delete file="lib/opendis7-full.jar" verbose="true" failonerror="false"/> - <copy file="${opendis7-java.relative}/opendis7-full.jar" todir="lib" force="true" verbose="true" failonerror="true"/> - - <!-- - <delete file="assignments/dist/lib/opendis7-full.jar" verbose="true" failonerror="false"/> - <delete file="examples/dist/lib/opendis7-full.jar" verbose="true" failonerror="false"/> - <copy file="${opendis7-java.relative}/opendis7-full.jar" todir="assignments/dist/lib" force="true" verbose="true" failonerror="true"/> - <copy file="${opendis7-java.relative}/opendis7-full.jar" todir="examples/dist/lib" force="true" verbose="true" failonerror="true"/> - - <copy file="${opendis7-java.relative}/opendis7-enumerations-classes.jar" todir="lib" force="true" verbose="true" failonerror="true"/> - <copy file="${opendis7-java.relative}/opendis7-enumerations-source.jar" todir="lib" force="true" verbose="true" failonerror="true"/> - <copy file="${opendis7-java.relative}/opendis7-enumerations-javadoc.jar" todir="lib" force="true" verbose="true" failonerror="true"/> - - <fail message="opendis7-pdus-classes.jar not found"> - <condition> - <not> - <resourcecount count="1"> - <fileset id="fs" dir="${opendis7-java.relative}" includes="opendis7-pdus-classes.jar"/> - </resourcecount> - </not> - </condition> - </fail> - - - <copy file="${opendis7-java.relative}/opendis7-pdus-classes.jar" todir="lib" force="true" verbose="true" failonerror="true"/> - <copy file="${opendis7-java.relative}/opendis7-pdus-javadoc.jar" todir="lib" force="true" verbose="true" failonerror="true"/> - <copy file="${opendis7-java.relative}/opendis7-pdus-source.jar" todir="lib" force="true" verbose="true" failonerror="true"/> - --> - <!-- <delete file="lib/opendis7-classes.jar" verbose="true" failonerror="false"/> prior name --> - <!-- <delete file="lib/opendis7-javadoc.jar" verbose="true" failonerror="false"/> prior name --> - <!-- <delete file="lib/opendis7-source.jar" verbose="true" failonerror="false"/> prior name --> - - </target> - - <property name="gitlab.nps.edu.MV3500.lib" value="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/tree/master/lib"/> - - <target name="update.opendis7.jar.from.gitlab" description="Update local opendis7 .jar files in project lib directory"> - <echo message="Update local opendis7 .jar files in project lib directory using"/> - <echo message=" ${gitlab.nps.edu.MV3500.lib}"/> - <nbbrowse url= "${gitlab.nps.edu.MV3500.lib}"/> - <get src="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/raw/master/lib/opendis7-full.jar" - dest="lib" verbose="true" usetimestamp="true"/> - <!-- - <get src="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/raw/master/lib/opendis7-pdus-classes.jar" - dest="lib" verbose="true" usetimestamp="true"/> - <get src="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/raw/master/lib/opendis7-enumerations-classes.jar" - dest="lib" verbose="true" usetimestamp="true"/> - <get src="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/raw/master/lib/opendis7-pdus-source.jar" - dest="lib" verbose="true" usetimestamp="true"/> - <get src="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/raw/master/lib/opendis7-enumerations-source.jar" - dest="lib" verbose="true" usetimestamp="true"/> - <get src="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/raw/master/lib/opendis7-pdus-javadoc.jar" - dest="lib" verbose="true" usetimestamp="true"/> - <get src="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/raw/master/lib/opendis7-enumerations-javadoc.jar" - dest="lib" verbose="true" usetimestamp="true"/> - --> - </target> - - <target name="update.opendis7.jar.from.maven" description="update opendis7.jar in project lib directory"> - <echo message="TODO retrieve from Maven published repository once available"/> - </target> - - <property name="gitlab.nps.edu.MV3302.lib" value="https://gitlab.nps.edu/abuss/MV3302ClassCode/-/tree/master/lib/Simkit"/> - - <target name="update.simkit.jar.from.gitlab" description="Update local opendis7 .jar files in project lib directory"> - <echo message="Update local simkit .jar files in project lib directory using"/> - <echo message="TODO not yet updating correctly..."/> - <echo message=" ${gitlab.nps.edu.MV3302.lib}"/> - <nbbrowse url= "${gitlab.nps.edu.MV3302.lib}"/> - <get src="https://gitlab.nps.edu/abuss/MV3302ClassCode/-/raw/master/lib/Simkit/simkit.jar" - dest="lib" verbose="true" usetimestamp="true"/> - <get src="https://gitlab.nps.edu/abuss/MV3302ClassCode/-/raw/master/lib/Simkit/simkit-src.zip" - dest="lib" verbose="true" usetimestamp="true"/> - <get src="https://gitlab.nps.edu/abuss/MV3302ClassCode/-/raw/master/lib/Simkit/simkit-doc.zip" - dest="lib" verbose="true" usetimestamp="true"/> - </target> - - <!-- Viskit properties --> - <target name="platformInitialize" depends="platformType"/> - <target name="platformType"> - <condition property="isWin" > - <os family="windows"/> - </condition> - <condition property="isMac" > - <os family="mac"/> - </condition> - <!-- Based on Apache Ant user-manual example --> - <condition property="isUnix"> - <and> - <os family="unix"/> - - <not> - <equals arg1="${os.name}" arg2="Mac OS X"/> - </not> - - </and> - </condition> - </target> - <target name="initWin" if="isWin"> - <property name="run.args" value="${win.run.args}"/> - </target> - <target name="initUnix" if="isUnix"> - <property name="run.args" value="${unix.run.args}"/> - </target> - <target name="initMac" if="isMac"> - <property name="run.args" value="${mac.run.args}"/> - </target> - <target name="initializeAll" depends="platformInitialize,initWin,initUnix,initMac"/> - - <target name="set.classpath" depends="initializeAll"> - <path id="runtime.classpath"> - <fileset dir="${viskit.lib.dir}"> - <include name="**/*.jar"/> - </fileset> - <pathelement path="${extra.classpath}"/> - </path> - <!--<echo message="runtime.classpath=${toString:runtime.classpath}"/>--> - </target> - - <target name="run.viskit" depends="set.classpath" description="Start the Visual Simikit (viskit) DES Authoring Tool on any O/S"> - <splash imageurl="file:${basedir}/${splash.image}" - useproxy="true" - showduration="5000"/> - <java classname="${main.class}" - classpathref="runtime.classpath" - dir="${viskit.dir}" - fork="true"> - <jvmarg line="${run.args}"/> - <arg value="${assy.file}"/> - </java> - </target> - - <target name="clean.all.viskit.logs" description="clean autogenerated PDU capture and Viskit generated logs"> - <delete dir="${viskit.dir}/logs"/> - <delete dir="${viskit.dir}/pduLog"/> - </target> - - <target name="reset.viskit.MV3500" description="initialize user preferences for Viskit MV3500"> - <echo message="Warning: under development"/> - <echo message="Reset MV3500 user's Viskit configuration files in ${dot.viskit.dir}"/> - <delete includeemptydirs="yes" dir="${dot.viskit.dir}"/> - <!-- repopulute with defaults - <mkdir dir="${dot.viskit.dir}"/> --> - <copy verbose="true" tofile="${dot.viskit.dir}/c_app.xml" file="c_app.ViskitDefaultMV3500.xml"/> - <copy todir ="${dot.viskit.dir}" file="${c_gui.xml}"/> - </target> - - <target name="reset.viskit.DefaultProject" description="initialize user preferences for Viskit DefaultProject"> - <echo message="Warning: under development"/> - <echo message="Reset MV3500 user's Viskit configuration files in ${dot.viskit.dir}"/> - <delete includeemptydirs="yes" dir="${dot.viskit.dir}"/> - <!-- repopulute with defaults - <mkdir dir="${dot.viskit.dir}"/> --> - <copy verbose="true" tofile="${dot.viskit.dir}/c_app.xml" file="c_app.ViskitDefaultProject.xml"/> - <copy todir ="${dot.viskit.dir}" file="${c_gui.xml}"/> - </target> - - <target name="reset.viskit" description="clear an out of synch configuration and metadata directory - only when necessary"> - <echo message="Reset user's Viskit configuration files in ${dot.viskit.dir}"/> - <delete includeemptydirs="yes" dir="${dot.viskit.dir}"/> - <!-- repopulute with defaults - <mkdir dir="${dot.viskit.dir}"/> --> - <copy todir="${dot.viskit.dir}" file="${c_app.xml}"/> - <copy todir="${dot.viskit.dir}" file="${c_gui.xml}"/> - </target> - +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (c) 1995-2023 held by the author(s). All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the names of the Naval Postgraduate School (NPS) + Modeling Virtual Environments and Simulation (MOVES) Institute + (https://www.nps.edu and https://www.MovesInstitute.org) + nor the names of its contributors may be used to endorse or + promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +--> + +<!-- + Document : build.xml + Created on : 1 November 2017 + Author : Don Brutzman and Don McGregor + Description: Ant build.xml file for Networked Graphics MV3500 +--> +<project name="MV3500 Networked Graphics" default="all" basedir="."> + <description>Build targets for NPS Networked Graphics MV3500</description> + + <!-- TODO add targets for project maintenance, testing and deployment + + <property name="specificationsDirectory" location="specifications"/> + <import file="specifications/build.xml"/> --> + <property file="build.properties"/> + + <target name="versions" description="show tool versions and environment values"> + <echo>ant -version</echo> + <exec executable="ant" dir="." vmlauncher="false"> + <arg value="-version"/> + </exec> + <echo>java -version</echo> + <exec executable="java" dir="." vmlauncher="false"> + <arg value="-version"/> + </exec> + <echo></echo> + <!-- Ant environment variables https://ant.apache.org/manual/Tasks/property.html --> + <echo> ANT_HOME=${env.ANT_HOME}</echo> + <echo> JAVA_HOME=${env.JAVA_HOME}</echo> + <echo>CLASSPATH=${env.CLASSPATH}</echo> + <!--<echo>USER =${env.USER}</echo> --> + <!-- https://stackoverflow.com/questions/949678/ant-is-using-wrong-java-version --> + <!--echo>javac source/target $java.source=${java.source}</ --> + <echo>Java/JVM version $ant.java.version=${ant.java.version}</echo> + <echo>Java/JVM detail version $java.version=${java.version}</echo> + <echo>Ant version $ant.version=${ant.version}</echo> + <echo>Configuration settings: https://savage.nps.edu/Savage/developers.html</echo> + <!-- TODO Netbeans version --> + <!-- TODO Netbeans project version --> + <!-- DEBUG: to show all environment and local properties, add + <echoproperties/> --> + <echo message="==========================================="/> + </target> + + <target name="all" depends="versions"> + <ant dir="examples" target="clean"/> + <ant dir="examples" target="jar"/> + <ant dir="assignments" target="clean"/> + <ant dir="assignments" target="jar"/> + <antcall target="javadoc.all"/> + </target> + + <target name="clean.all.pduLogs" description="clean autogenerated PDU capture logs"> + <ant dir="assignments" target="clean.all.pduLogs"/> + <ant dir="examples" target="clean.all.pduLogs"/> + </target> + + <target name="javadoc.custom.all"> + <ant dir="assignments" target="javadoc.custom" useNativeBaseDir="true"/> + <ant dir="examples" target="javadoc.custom" useNativeBaseDir="true"/> + </target> + + <target name="view.gitlab.nps.edu.MV3500" description="view MV3500 gitlab site in web browser (via Netbeans only)"> + <echo message="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500"/> + <nbbrowse url="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500"/> + <!-- TODO implementation-independent approach if possible. other Ant approaches have to be customized for each OS --> + </target> + + <target name="view.gitlab.nps.edu.MV3500.assignments" description="view MV3500 gitlab examples in web browser (via Netbeans only)"> + <echo message="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/tree/master/assignments"/> + <nbbrowse url="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/tree/master/assignments"/> + </target> + + <target name="view.gitlab.nps.edu.MV3500.examples" description="view MV3500 gitlab examples in web browser (via Netbeans only)"> + <echo message="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/tree/master/examples"/> + <nbbrowse url="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/tree/master/examples"/> + <!-- TODO implementation-independent approach if possible. other Ant approaches have to be customized for each OS --> + </target> + + <target name="view.gitlab.nps.edu.MV3500.issues" description="view online issues in web browser (Netbeans only)"> + <echo message="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/issues" /> + <nbbrowse url="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/issues" /> + <!-- TODO implementation-independent approach if possible, but note that other Ant approaches usually have to be customized for each OS. --> + <echo message="... for issue visibility, be sure to login" /> + </target> + + <target name="view.gitlab.nps.edu.MV3500.specifications.README" description="view MV3500 gitlab examples in web browser (via Netbeans only)"> + <echo message="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/tree/master/specifications/README.md"/> + <nbbrowse url="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/tree/master/specifications/README.md"/> + </target> + + <target name="view.open-dis.github.com" description="view github open-dis site in web browser (via Netbeans only)"> + <echo message="https://github.com/open-dis"/> + <nbbrowse url="https://github.com/open-dis"/> + </target> + + <target name="view.open-dis.github.com.opendis7-java" description="view github open-dis open-dis-java current build in web browser (via Netbeans only)"> + <echo message="https://github.com/open-dis/opendis7-java"/> + <nbbrowse url="https://github.com/open-dis/opendis7-java"/> + </target> + + <target name="view.open-dis.github.com.opendis7-source-generator" description="view github open-dis opendis7-source-generator project in web browser (via Netbeans only)"> + <echo message="https://github.com/open-dis"/> + <nbbrowse url="https://github.com/open-dis"/> + </target> + + <target name="update.opendis7.jar.from.local" description="update opendis7-java jar files from locally built project into lib directory"> + + <property name="opendis7-java.relative" value="../../x3d-github/opendis7-java/dist"/> + <echo message="Copy ${opendis7-java.relative}/opendis7-full.jar to project lib/ subdirectory..."/> + <!-- https://ant.apache.org/manual/Tasks/fail.html --> + <fail message="opendis7-full.jar not found"> + <condition> + <not> + <resourcecount count="1"> + <fileset id="fs" dir="${opendis7-java.relative}" includes="opendis7-full.jar"/><!-- comma separated --> + </resourcecount> + </not> + </condition> + </fail> + <!-- clean out prior versions --> + <delete file="lib/opendis7-pdus-classes.jar" verbose="false" failonerror="false"/> + <delete file="lib/opendis7-pdus-javadoc.jar" verbose="false" failonerror="false"/> + <delete file="lib/opendis7-pdus-source.jar" verbose="false" failonerror="false"/> + <delete file="lib/opendis7-enumerations-classes.jar" verbose="false" failonerror="false"/> + <delete file="lib/opendis7-enumerations-javadoc.jar" verbose="false" failonerror="false"/> + <delete file="lib/opendis7-enumerations-source.jar" verbose="false" failonerror="false"/> + + <!-- replace latest version --> + <delete file="lib/opendis7-full.jar" verbose="true" failonerror="false"/> + <copy file="${opendis7-java.relative}/opendis7-full.jar" todir="lib" force="true" verbose="true" failonerror="true"/> + + <!-- + <delete file="assignments/dist/lib/opendis7-full.jar" verbose="true" failonerror="false"/> + <delete file="examples/dist/lib/opendis7-full.jar" verbose="true" failonerror="false"/> + <copy file="${opendis7-java.relative}/opendis7-full.jar" todir="assignments/dist/lib" force="true" verbose="true" failonerror="true"/> + <copy file="${opendis7-java.relative}/opendis7-full.jar" todir="examples/dist/lib" force="true" verbose="true" failonerror="true"/> + + <copy file="${opendis7-java.relative}/opendis7-enumerations-classes.jar" todir="lib" force="true" verbose="true" failonerror="true"/> + <copy file="${opendis7-java.relative}/opendis7-enumerations-source.jar" todir="lib" force="true" verbose="true" failonerror="true"/> + <copy file="${opendis7-java.relative}/opendis7-enumerations-javadoc.jar" todir="lib" force="true" verbose="true" failonerror="true"/> + + <fail message="opendis7-pdus-classes.jar not found"> + <condition> + <not> + <resourcecount count="1"> + <fileset id="fs" dir="${opendis7-java.relative}" includes="opendis7-pdus-classes.jar"/> + </resourcecount> + </not> + </condition> + </fail> + + + <copy file="${opendis7-java.relative}/opendis7-pdus-classes.jar" todir="lib" force="true" verbose="true" failonerror="true"/> + <copy file="${opendis7-java.relative}/opendis7-pdus-javadoc.jar" todir="lib" force="true" verbose="true" failonerror="true"/> + <copy file="${opendis7-java.relative}/opendis7-pdus-source.jar" todir="lib" force="true" verbose="true" failonerror="true"/> + --> + <!-- <delete file="lib/opendis7-classes.jar" verbose="true" failonerror="false"/> prior name --> + <!-- <delete file="lib/opendis7-javadoc.jar" verbose="true" failonerror="false"/> prior name --> + <!-- <delete file="lib/opendis7-source.jar" verbose="true" failonerror="false"/> prior name --> + + </target> + + <property name="gitlab.nps.edu.MV3500.lib" value="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/tree/master/lib"/> + + <target name="update.opendis7.jar.from.gitlab" description="Update local opendis7 .jar files in project lib directory"> + <echo message="Update local opendis7 .jar files in project lib directory using"/> + <echo message=" ${gitlab.nps.edu.MV3500.lib}"/> + <nbbrowse url= "${gitlab.nps.edu.MV3500.lib}"/> + <get src="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/raw/master/lib/opendis7-full.jar" + dest="lib" verbose="true" usetimestamp="true"/> + <!-- + <get src="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/raw/master/lib/opendis7-pdus-classes.jar" + dest="lib" verbose="true" usetimestamp="true"/> + <get src="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/raw/master/lib/opendis7-enumerations-classes.jar" + dest="lib" verbose="true" usetimestamp="true"/> + <get src="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/raw/master/lib/opendis7-pdus-source.jar" + dest="lib" verbose="true" usetimestamp="true"/> + <get src="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/raw/master/lib/opendis7-enumerations-source.jar" + dest="lib" verbose="true" usetimestamp="true"/> + <get src="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/raw/master/lib/opendis7-pdus-javadoc.jar" + dest="lib" verbose="true" usetimestamp="true"/> + <get src="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/raw/master/lib/opendis7-enumerations-javadoc.jar" + dest="lib" verbose="true" usetimestamp="true"/> + --> + </target> + + <target name="update.opendis7.jar.from.maven" description="update opendis7.jar in project lib directory"> + <echo message="TODO retrieve from Maven published repository once available"/> + </target> + + <property name="gitlab.nps.edu.MV3302.lib" value="https://gitlab.nps.edu/abuss/MV3302ClassCode/-/tree/master/lib/Simkit"/> + + <target name="update.simkit.jar.from.gitlab" description="Update local opendis7 .jar files in project lib directory"> + <echo message="Update local simkit .jar files in project lib directory using"/> + <echo message="TODO not yet updating correctly..."/> + <echo message=" ${gitlab.nps.edu.MV3302.lib}"/> + <nbbrowse url= "${gitlab.nps.edu.MV3302.lib}"/> + <get src="https://gitlab.nps.edu/abuss/MV3302ClassCode/-/raw/master/lib/Simkit/simkit.jar" + dest="lib" verbose="true" usetimestamp="true"/> + <get src="https://gitlab.nps.edu/abuss/MV3302ClassCode/-/raw/master/lib/Simkit/simkit-src.zip" + dest="lib" verbose="true" usetimestamp="true"/> + <get src="https://gitlab.nps.edu/abuss/MV3302ClassCode/-/raw/master/lib/Simkit/simkit-doc.zip" + dest="lib" verbose="true" usetimestamp="true"/> + </target> + + <!-- Viskit properties --> + <target name="platformInitialize" depends="platformType"/> + <target name="platformType"> + <condition property="isWin" > + <os family="windows"/> + </condition> + <condition property="isMac" > + <os family="mac"/> + </condition> + <!-- Based on Apache Ant user-manual example --> + <condition property="isUnix"> + <and> + <os family="unix"/> + + <not> + <equals arg1="${os.name}" arg2="Mac OS X"/> + </not> + + </and> + </condition> + </target> + <target name="initWin" if="isWin"> + <property name="run.args" value="${win.run.args}"/> + </target> + <target name="initUnix" if="isUnix"> + <property name="run.args" value="${unix.run.args}"/> + </target> + <target name="initMac" if="isMac"> + <property name="run.args" value="${mac.run.args}"/> + </target> + <target name="initializeAll" depends="platformInitialize,initWin,initUnix,initMac"/> + + <target name="set.classpath" depends="initializeAll"> + <path id="runtime.classpath"> + <fileset dir="${viskit.lib.dir}"> + <include name="**/*.jar"/> + </fileset> + <pathelement path="${extra.classpath}"/> + </path> + <!--<echo message="runtime.classpath=${toString:runtime.classpath}"/>--> + </target> + + <target name="run.viskit" depends="set.classpath" description="Start the Visual Simikit (viskit) DES Authoring Tool on any O/S"> + <splash imageurl="file:${basedir}/${splash.image}" + useproxy="true" + showduration="5000"/> + <java classname="${main.class}" + classpathref="runtime.classpath" + dir="${viskit.dir}" + fork="true"> + <jvmarg line="${run.args}"/> + <arg value="${assy.file}"/> + </java> + </target> + + <target name="clean.all.viskit.logs" description="clean autogenerated PDU capture and Viskit generated logs"> + <delete dir="${viskit.dir}/logs"/> + <delete dir="${viskit.dir}/pduLog"/> + </target> + + <target name="reset.viskit.MV3500" description="initialize user preferences for Viskit MV3500"> + <echo message="Warning: under development"/> + <echo message="Reset MV3500 user's Viskit configuration files in ${dot.viskit.dir}"/> + <delete includeemptydirs="yes" dir="${dot.viskit.dir}"/> + <!-- repopulute with defaults --> + <mkdir dir="${dot.viskit.dir}"/> + <copy verbose="true" tofile="${dot.viskit.dir}/c_app.xml" file="c_app.ViskitDefaultMV3500.xml"/> + <copy todir ="${dot.viskit.dir}" file="${c_gui.xml}"/> + </target> + + <target name="reset.viskit.DefaultViskitProject" description="initialize user preferences for the bundled DefaultViskitProject"> + <!-- TODO watch for that project to get renamed --> + <echo message="Warning: under development"/> + <echo message="Reset MV3500 user's Viskit configuration files in ${dot.viskit.dir}"/> + <delete includeemptydirs="yes" dir="${dot.viskit.dir}"/> + <!-- repopulute with defaults --> + <mkdir dir="${dot.viskit.dir}"/> + <copy verbose="true" tofile="${dot.viskit.dir}/c_app.xml" file="c_app.ViskitDefaultProject.xml"/> + <copy todir ="${dot.viskit.dir}" file="${c_gui.xml}"/> + </target> + + <target name="reset.viskit" description="clear an out of synch configuration and metadata directory - only when necessary"> + <echo message="Reset user's Viskit configuration files in ${dot.viskit.dir}"/> + <delete includeemptydirs="yes" dir="${dot.viskit.dir}"/> + <mkdir dir="${dot.viskit.dir}"/> + <!-- repopulute with defaults --> + <!-- ${c_app.xml} and ${c_gui.xml} are properties in the build.properties definitions --> + <copy todir="${dot.viskit.dir}" file="${c_app.xml}" verbose="true"/> + <copy todir="${dot.viskit.dir}" file="${c_gui.xml}" verbose="true"/> + </target> + </project> \ No newline at end of file diff --git a/c_app.ViskitDefaultMV3500.xml b/c_app.ViskitDefaultMV3500.xml index c53d3de308..787151ea9f 100644 --- a/c_app.ViskitDefaultMV3500.xml +++ b/c_app.ViskitDefaultMV3500.xml @@ -1,57 +1,53 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- Viskit application configuration file c_app.xml --> -<!-- Programming note: values in this file are retrieved by keys such as 'app.beanshell.warning' --> -<!-- Programming note: the root element name is ignored when assembling keys --> -<ViskitConfig> - <app> - <beanshell> - <warning>true</warning> - </beanshell> - <mainframe> - <size h="680" w="930" /> - </mainframe> - <projecthome> - <!-- These two attributes MUST always be at least zero-length Strings --> - <!-- DefaultProject is included in this template for convenience - <path dir= "./viskit/MyViskitProjects" />--> - <path dir="C:/x3d-nps-gitlab/NetworkedGraphicsMV3500/examples/src" /> - <name value="ViskitOpenDis7Examples" /> - </projecthome> - <tabs> - <EventGraphEditor visible="true" /> - <AssemblyEditor visible="true" /> - <AssemblyRun visible="true" /> - <DesignOfExperiments visible="false" /> - <ClusterRun visible="false" /> - <AnalystReport visible="false" /> - </tabs> - <debug>false</debug> - </app> - <history> - <ProjectEditor> - <Recent> - <!-- - <Project value="./examples/src/ViskitOpenDis7Examples" /> - <Project value="./viskit/MyViskitProjects/DefaultProject" /> - --> - <Project value="C:/x3d-nps-gitlab/NetworkedGraphicsMV3500/viskit/MyViskitProjects/DefaultProject" /> - <Project value="C:/x3d-nps-gitlab/NetworkedGraphicsMV3500/examples/src/ViskitOpenDis7Examples"/> - </Recent> - </ProjectEditor> - <Cluster> - <Account last="true" password="" port="4444" server="wipeout.hpr.nps.edu" username="" /> - </Cluster> - <AssemblyEditor> - <Recent> - <AssemblyFile value="C:/x3d-nps-gitlab/NetworkedGraphicsMV3500/examples/src/ViskitOpenDis7Examples/Assemblies/dis7/ArrivalProcessOpenDis7Assembly.xml"/> - <AssemblyFile value="C:/x3d-nps-gitlab/NetworkedGraphicsMV3500/examples/src/ViskitOpenDis7Examples/Assemblies/dis7/SimpleServerDis7Assembly.xml"/> - </Recent> - </AssemblyEditor> - <EventGraphEditor> - <Recent> - <EventGraphFile value="C:/x3d-nps-gitlab/NetworkedGraphicsMV3500/examples/src/ViskitOpenDis7Examples/EventGraphs/dis7/ArrivalProcessOpenDis7.xml"/> - </Recent> - </EventGraphEditor> - </history> -</ViskitConfig> - +<?xml version="1.0" encoding="UTF-8"?> +<!-- Viskit application configuration file c_app.xml --> +<!-- Programming note: values in this file are retrieved by keys such as 'app.beanshell.warning' --> +<!-- Programming note: the root element name is ignored when assembling keys --> +<ViskitConfig> + <app> + <beanshell> + <warning>true</warning> + </beanshell> + <mainframe> + <size h="680" w="930" /> + </mainframe> + <projecthome> + <!-- These two attributes MUST always be at least zero-length Strings --> + <!-- DefaultProject is included in this template for convenience --> + <path dir="../examples/src"/> + <name value="ViskitOpenDis7Examples"/> + </projecthome> + <tabs> + <EventGraphEditor visible="true" /> + <AssemblyEditor visible="true" /> + <AssemblyRun visible="true" /> + <DesignOfExperiments visible="false" /> + <ClusterRun visible="false" /> + <AnalystReport visible="false" /> + </tabs> + <debug>false</debug> + </app> + <history> + <ProjectEditor> + <Recent> + <!-- MV3500 includes the following two projects --> + <Project value="../viskit/MyViskitProjects/DefaultProject" /> + <Project value="../examples/src/ViskitOpenDis7Examples"/> + </Recent> + </ProjectEditor> + <Cluster> + <Account last="true" password="" port="4444" server="wipeout.hpr.nps.edu" username="" /> + </Cluster> + <AssemblyEditor> + <Recent> + <AssemblyFile value="../examples/src/ViskitOpenDis7Examples/Assemblies/dis7/ArrivalProcessOpenDis7Assembly.xml"/> + <AssemblyFile value="../examples/src/ViskitOpenDis7Examples/Assemblies/dis7/SimpleServerDis7Assembly.xml"/> + </Recent> + </AssemblyEditor> + <EventGraphEditor> + <Recent> + <EventGraphFile value="../examples/src/ViskitOpenDis7Examples/EventGraphs/dis7/ArrivalProcessOpenDis7.xml"/> + </Recent> + </EventGraphEditor> + </history> +</ViskitConfig> + diff --git a/c_app.ViskitDefaultProject.xml b/c_app.ViskitDefaultProject.xml index 7cfee312ce..1e8bb99daa 100644 --- a/c_app.ViskitDefaultProject.xml +++ b/c_app.ViskitDefaultProject.xml @@ -1,68 +1,64 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- Viskit application configuration file c_app.xml --> -<!-- Programming note: values in this file are retrieved by keys such as 'app.beanshell.warning' --> -<!-- Programming note: the root element name is ignored when assembling keys --> -<ViskitConfig> - <app> - <beanshell> - <warning>true</warning> - </beanshell> - <mainframe> - <size h="680" w="930" /> - </mainframe> - <projecthome> - <!-- These two attributes MUST always be at least zero-length Strings --> - <!-- DefaultProject is included in this template for convenience - <path dir= "./viskit/MyViskitProjects" />--> - <path dir="C:/x3d-nps-gitlab/NetworkedGraphicsMV3500/viskit/MyViskitProjects" /> - <name value="DefaultProject" /> - </projecthome> - <tabs> - <EventGraphEditor visible="true" /> - <AssemblyEditor visible="true" /> - <AssemblyRun visible="true" /> - <DesignOfExperiments visible="false" /> - <ClusterRun visible="false" /> - <AnalystReport visible="false" /> - </tabs> - <debug>false</debug> - </app> - <history> - <ProjectEditor> - <Recent> - <!-- - <Project value="./examples/src/ViskitOpenDis7Examples" /> - <Project value="./viskit/MyViskitProjects/DefaultProject" /> - <Project value="C:/x3d-nps-gitlab/NetworkedGraphicsMV3500/viskit/MyViskitProjects/DefaultProject" /> - --> - <Project value="C:/x3d-nps-gitlab/NetworkedGraphicsMV3500/viskit/MyViskitProjects/DefaultProject" /> - <Project value="C:/x3d-nps-gitlab/NetworkedGraphicsMV3500/examples/src/ViskitOpenDis7Examples"/> - </Recent> - </ProjectEditor> - <Cluster> - <Account last="true" password="" port="4444" server="wipeout.hpr.nps.edu" username="" /> - </Cluster> - <AssemblyEditor> - <Recent> - <AssemblyFile value="C:/x3d-nps-gitlab/NetworkedGraphicsMV3500/viskit/MyViskitProjects/DefaultProject/Assemblies/examples/ArrayTesterAssembly.xml" /> - <AssemblyFile value="C:/x3d-nps-gitlab/NetworkedGraphicsMV3500/viskit/MyViskitProjects/DefaultProject/Assemblies/examples/InventoryModelAssembly.xml" /> - <AssemblyFile value="C:/x3d-nps-gitlab/NetworkedGraphicsMV3500/viskit/MyViskitProjects/DefaultProject/Assemblies/examples/ServerAssembly3.xml" /> - <AssemblyFile value="C:/x3d-nps-gitlab/NetworkedGraphicsMV3500/viskit/MyViskitProjects/DefaultProject/Assemblies/examples/ServerWithRenegesAssembly.xml" /> - <AssemblyFile value="C:/x3d-nps-gitlab/NetworkedGraphicsMV3500/viskit/MyViskitProjects/DefaultProject/Assemblies/examples/TestServerGenericAssembly.xml" /> - </Recent> - </AssemblyEditor> - <EventGraphEditor> - <Recent> - <EventGraphFile value="C:/x3d-nps-gitlab/NetworkedGraphicsMV3500/viskit/MyViskitProjects/DefaultProject/EventGraphs/examples/ArrayTester.xml" /> - <EventGraphFile value="C:/x3d-nps-gitlab/NetworkedGraphicsMV3500/viskit/MyViskitProjects/DefaultProject/EventGraphs/examples/ArrivalProcess.xml" /> - <EventGraphFile value="C:/x3d-nps-gitlab/NetworkedGraphicsMV3500/viskit/MyViskitProjects/DefaultProject/EventGraphs/examples/InventoryModel.xml" /> - <EventGraphFile value="C:/x3d-nps-gitlab/NetworkedGraphicsMV3500/viskit/MyViskitProjects/DefaultProject/EventGraphs/examples/SimpleServer.xml" /> - <EventGraphFile value="C:/x3d-nps-gitlab/NetworkedGraphicsMV3500/viskit/MyViskitProjects/DefaultProject/EventGraphs/examples/Creator.xml" /> - <EventGraphFile value="C:/x3d-nps-gitlab/NetworkedGraphicsMV3500/viskit/MyViskitProjects/DefaultProject/EventGraphs/examples/ServerWithReneges.xml" /> - <EventGraphFile value="C:/x3d-nps-gitlab/NetworkedGraphicsMV3500/viskit/MyViskitProjects/DefaultProject/EventGraphs/examples/EntityCreator.xml" /> - <EventGraphFile value="C:/x3d-nps-gitlab/NetworkedGraphicsMV3500/viskit/MyViskitProjects/DefaultProject/EventGraphs/examples/ServerGeneric.xml" /> - </Recent> - </EventGraphEditor> - </history> -</ViskitConfig> - +<?xml version="1.0" encoding="UTF-8"?> +<!-- Viskit application configuration file c_app.xml --> +<!-- Programming note: values in this file are retrieved by keys such as 'app.beanshell.warning' --> +<!-- Programming note: the root element name is ignored when assembling keys --> +<ViskitConfig> + <app> + <beanshell> + <warning>true</warning> + </beanshell> + <mainframe> + <size h="680" w="930" /> + </mainframe> + <projecthome> + <!-- These two attributes MUST always be at least zero-length Strings --> + <!-- DefaultProject is included in this template for convenience --> + <!-- TODO keep an eye out for possible rename, e.g. DefaultViskitProject --> + <path dir="./MyViskitProjects" /> + <name value="DefaultProject" /> + </projecthome> + <tabs> + <EventGraphEditor visible="true" /> + <AssemblyEditor visible="true" /> + <AssemblyRun visible="true" /> + <DesignOfExperiments visible="false" /> + <ClusterRun visible="false" /> + <AnalystReport visible="false" /> + </tabs> + <debug>false</debug> + </app> + <history> + <ProjectEditor> + <Recent> + <!-- MV3500 includes the following two projects --> + <Project value="./MyViskitProjects/DefaultProject" /> + <Project value="../examples/src/ViskitOpenDis7Examples"/> + </Recent> + </ProjectEditor> + <Cluster> + <Account last="true" password="" port="4444" server="wipeout.hpr.nps.edu" username="" /> + </Cluster> + <AssemblyEditor> + <Recent> + <AssemblyFile value="./MyViskitProjects/DefaultProject/Assemblies/examples/ArrayTesterAssembly.xml" /> + <AssemblyFile value="./MyViskitProjects/DefaultProject/Assemblies/examples/InventoryModelAssembly.xml" /> + <AssemblyFile value="./MyViskitProjects/DefaultProject/Assemblies/examples/ServerAssembly3.xml" /> + <AssemblyFile value="./MyViskitProjects/DefaultProject/Assemblies/examples/ServerWithRenegesAssembly.xml" /> + <AssemblyFile value="./MyViskitProjects/DefaultProject/Assemblies/examples/TestServerGenericAssembly.xml" /> + </Recent> + </AssemblyEditor> + <EventGraphEditor> + <Recent> + <EventGraphFile value="./MyViskitProjects/DefaultProject/EventGraphs/examples/ArrayTester.xml" /> + <EventGraphFile value="./MyViskitProjects/DefaultProject/EventGraphs/examples/ArrivalProcess.xml" /> + <EventGraphFile value="./MyViskitProjects/DefaultProject/EventGraphs/examples/InventoryModel.xml" /> + <EventGraphFile value="./MyViskitProjects/DefaultProject/EventGraphs/examples/SimpleServer.xml" /> + <EventGraphFile value="./MyViskitProjects/DefaultProject/EventGraphs/examples/Creator.xml" /> + <EventGraphFile value="./MyViskitProjects/DefaultProject/EventGraphs/examples/ServerWithReneges.xml" /> + <EventGraphFile value="./MyViskitProjects/DefaultProject/EventGraphs/examples/EntityCreator.xml" /> + <EventGraphFile value="./MyViskitProjects/DefaultProject/EventGraphs/examples/ServerGeneric.xml" /> + </Recent> + </EventGraphEditor> + </history> +</ViskitConfig> + -- GitLab