Skip to content
Snippets Groups Projects
Commit a79acc3f authored by rojas's avatar rojas
Browse files

Merge origin/master

Conflicts:
	examples/nbproject/project.properties
parents da1f7e1c 1645026d
No related branches found
No related tags found
No related merge requests found
Showing
with 483 additions and 185 deletions
......@@ -64,3 +64,10 @@
/assignments/src/MV3500Cohort2022MayJune/projects/Royer/TwoCranesBerth/nbproject/private/
/assignments/src/MV3500Cohort2022MayJune/projects/Royer/TwoCranesBerth/nbproject/build-impl.xml~
/assignments/src/MV3500Cohort2022MayJune/projects/Royer/TwoCranesBerth/pduLog/
/examples/src/ViskitOpenDis7Examples/AnalystReports/
/examples/src/ViskitOpenDis7Examples/build/
/viskit/MyViskitProjects/DefaultProject/build/
/viskit/MyViskitProjects/DefaultProject/AnalystReports/
/viskit/logs
/viskit/pduLog/
No preview for this file type
No preview for this file type
# Networked Graphics MV3500 Course Assignments using Netbeans
# Networked Graphics MV3500 Course Assignments using NetBeans
## Initialization and Refresh
To submit homework via Netbeans to the gitlab server you will first need to
clone a copy of the course repository at
To submit homework via NetBeans to the gitlab server you will first need to
use Git to clone a copy of the course repository at
* https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500
Use Netbeans to upload/update your homework assignments as follows:
Use NetBeans to upload/update your homework assignments as follows:
1. *context menu:* **Git > Remote > Pull from Upstream** to first always ensure you update your repository
1. *Making sure:* Did you perform step one and pull git to refresh your local version?!
1. Select file of interest in Netbeans tab for Files
1. Select file of interest in NetBeans tab for Files
1. *context menu:* **Refactor/Rename** and take spaces out of file name (gets wacky on various operating systems, email etc.)
1. Ensure Java classes and source files start with your last name
1. *context menu:* **Run file**(s) to test
......@@ -21,7 +21,7 @@ Use Netbeans to upload/update your homework assignments as follows:
## Adding and Editing Your Files
All MV3500 cohorts have source code collected under a common Netbeans project.
All MV3500 cohorts have source code collected under a common NetBeans project.
1. Find your current cohort src subdirectories, for example
* [assignments / src / MV3500Cohort2024JulySeptember](src/MV3500Cohort2024JulySeptember) (we are here!)
......@@ -54,7 +54,7 @@ After committing and pushing, you can now verify that your files are been shared
## References
* [Netbeans](http://www.netbeans.org) and [Using Git Support](https://netbeans.apache.org/kb/docs/ide/git.html) with [tutorial video, version 8.2](https://www.youtube.com/watch?v=rs3QSq5hNf4)
* [NetBeans](http://www.netbeans.org) and [Using Git Support](https://netbeans.apache.org/kb/docs/ide/git.html) with [tutorial video, version 8.2](https://www.youtube.com/watch?v=rs3QSq5hNf4)
* [GitLab Flavored Markdown (GFM)](https://docs.gitlab.com/ee/user/markdown.html) and [Markdown Cheatsheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Here-Cheatsheet)
* UML [Sequence diagram](https://en.wikipedia.org/wiki/Sequence_diagram) on Wikipedia
* [Wireshark](https://www.wireshark.org) network protocol analyzer
......@@ -130,9 +130,9 @@ POSSIBILITY OF SUCH DAMAGE.
</target>
<!-- ensure backwards compatibility of produced jar to specified version of Java, though project itself may be higher -->
<property name="java.source" value="17"/><!-- LTS -->
<property name="java.target" value="17"/><!-- LTS -->
<property name="java.release" value="17"/><!-- LTS --><!-- simpler, less verbose than -source -target -->
<!-- <property name="java.source" value="21"/>LTS -->
<!-- <property name="java.target" value="21"/>LTS -->
<!-- <property name="java.release" value="21"/>LTS --><!-- simpler, less verbose than -source -target -->
<property name="dist.javadoc.dir" value="dist/javadoc"/>
<property name="javadoc.additionalparam" value=""/>
......@@ -144,7 +144,7 @@ POSSIBILITY OF SUCH DAMAGE.
<property name="javadoc.nonavbar" value="false"/>
<property name="javadoc.notree" value="false"/>
<property name="javadoc.private" value="false"/>
<property name="javadoc.source" value="${java.source}"/>
<!--<property name="javadoc.source" value="${java.source}"/>-->
<property name="javadoc.splitindex" value="true"/>
<property name="javadoc.breakiterator" value="true"/>
<property name="javadoc.use" value="true"/><!-- Create class and package usage pages -->
......@@ -171,13 +171,13 @@ POSSIBILITY OF SUCH DAMAGE.
notree="${javadoc.notree}"
Overview="src/overview.html"
Private="${javadoc.private}"
source="${java.source}"
Splitindex="${javadoc.splitindex}"
Use="${javadoc.use}"
useexternalfile="yes"
verbose="true"
version="${javadoc.version}"
windowtitle="${javadoc.windowtitle}">
<!-- source="${java.source}" -->
<classpath>
<pathelement location="../lib/opendis7-full.jar"/>
<pathelement location="../lib/open-dis_4.16.jar"/>
......
......@@ -113,7 +113,7 @@ manifest.custom.codebase=
manifest.custom.permissions=
meta.inf.dir=${src.dir}/META-INF
mkdist.disabled=false
platform.active=default_platform
platform.active=JDK_22
project.licensePath=../license.txt
run.classpath=\
${javac.classpath}:\
......
......@@ -4,6 +4,7 @@
<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>
......
......@@ -8,11 +8,16 @@ import java.net.Socket;
import java.util.Scanner;
/**
*
* This client attempts to connect to a desired server. If the client is unable
* to connect then it exits the program. Enter 'quit' to the command line at any
* time to exit.
* @author tbavlsik
*/
public class BavlsikClient {
/**
* Localhost address.
*/
public final static String LOCALHOST = "0:0:0:0:0:0:0:1"; //Local host
/**
......
......@@ -5,7 +5,7 @@
<h1> Course Resources </h1>
<p>
<!-- Note that javadoc throws an incorrect error regarding title attribute, but resulting HTML works as expected -->
<a href="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/blob/master/assignments/README.md" target="_blank" title="Open-Dis Surfer Dude, Thanks Don McGregor!"><img src="OpenDisSurferDude.png" alt="Open-Dis Surfer Dude, Thanks Don McGregor!" style="float:right"/></a>
<a href="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/blob/master/assignments/README.md" target="_blank"><img src="OpenDisSurferDude.png" alt="Open-Dis Surfer Dude, Thanks Don McGregor!" style="float:right"/></a>
<a href="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/tree/master/assignments" target="_blank">Assignments</a>,
<a href="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/tree/master/examples" target="_blank">examples</a>, and
<a href="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/tree/master/presentations" target="_blank">presentations</a>
......
# Created 23 AUG 2024
product.shortname=viskit
viskit.dir=${product.shortname}
viskit.lib.dir=${viskit.dir}/lib
opendis.jar=lib/opendis7-full.jar
extra.classpath=${opendis.jar}
main.class=viskit.EventGraphAssemblyComboMain
#assy.file=${basedir}/examples/src/ViskitOpenDis7Examples/Assemblies/dis7/ArrivalProcessOpenDis7Assembly.xml
#assy.file=${basedir}/examples/src/ViskitOpenDis7Examples/Assemblies/dis7/SimpleServerDis7Assembly.xml
# Viskit run arguments
common.run.args=-Xmx256m \
-Dswing.aatext=true
win.run.args=${common.run.args}
run.arg1=-Dawt.useSystemAAFontSettings=gasp
unix.run.args=${common.run.args} ${run.arg1}
run.arg2=-Dapple.awt.graphics.UseQuartz=true \
-Dapple.laf.useScreenMenuBar=true \
-Dapple.awt.brushMetalLook=true \
-Xdock:name=${product.shortname} \
--add-exports java.desktop/com.apple.eawt=ALL-UNNAMED
mac.run.args=${common.run.args} ${run.arg2}
# property used to identify Viskit config files
dot.viskit.dir=${user.home}/.${product.shortname}
c_app.xml=${viskit.dir}/configuration/c_app.xml
c_gui.xml=${viskit.dir}/configuration/c_gui.xml
splash.image=${viskit.dir}/configuration/ViskitSplash2.png
<?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:
......@@ -41,11 +41,12 @@ POSSIBILITY OF SUCH DAMAGE.
-->
<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>
......@@ -74,7 +75,7 @@ POSSIBILITY OF SUCH DAMAGE.
<echoproperties/> -->
<echo message="==========================================="/>
</target>
<target name="all" depends="versions">
<ant dir="examples" target="clean"/>
<ant dir="examples" target="jar"/>
......@@ -82,64 +83,63 @@ POSSIBILITY OF SUCH DAMAGE.
<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="examples" target="view.opendis7.javadoc"/>
<ant dir="assignments" target="javadoc.custom"/>
<ant dir="examples" target="javadoc.custom"/>
<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 -->
......@@ -159,21 +159,21 @@ POSSIBILITY OF SUCH DAMAGE.
<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>
......@@ -183,8 +183,8 @@ POSSIBILITY OF SUCH DAMAGE.
</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"/>
......@@ -192,7 +192,7 @@ POSSIBILITY OF SUCH DAMAGE.
<!-- <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"/>
......@@ -218,11 +218,11 @@ POSSIBILITY OF SUCH DAMAGE.
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">
......@@ -237,5 +237,94 @@ POSSIBILITY OF SUCH DAMAGE.
<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>
</project>
\ No newline at end of file
<?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= "./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>
......@@ -134,9 +134,9 @@ POSSIBILITY OF SUCH DAMAGE.
</target>
<!-- ensure backwards compatibility of produced jar to specified version of Java, though project itself may be higher -->
<property name="java.source" value="17"/><!-- LTS -->
<property name="java.target" value="17"/><!-- LTS -->
<property name="java.release" value="17"/><!-- LTS --><!-- simpler, less verbose than -source -target -->
<!-- <property name="java.source" value="21"/>LTS -->
<!-- <property name="java.target" value="21"/>LTS -->
<!-- <property name="java.release" value="21"/>LTS --><!-- simpler, less verbose than -source -target -->
<property name="dist.javadoc.dir" value="dist/javadoc"/>
<property name="javadoc.additionalparam" value=""/>
......@@ -148,7 +148,7 @@ POSSIBILITY OF SUCH DAMAGE.
<property name="javadoc.nonavbar" value="false"/>
<property name="javadoc.notree" value="false"/>
<property name="javadoc.private" value="false"/>
<property name="javadoc.source" value="${java.source}"/>
<!--<property name="javadoc.source" value="${java.source}"/>-->
<property name="javadoc.splitindex" value="true"/>
<property name="javadoc.breakiterator" value="true"/>
<property name="javadoc.use" value="true"/><!-- Create class and package usage pages -->
......@@ -176,13 +176,13 @@ POSSIBILITY OF SUCH DAMAGE.
notree="${javadoc.notree}"
Overview="src/overview.html"
Private="${javadoc.private}"
source="${java.source}"
Splitindex="${javadoc.splitindex}"
Use="${javadoc.use}"
useexternalfile="yes"
verbose="true"
version="${javadoc.version}"
windowtitle="${javadoc.windowtitle}">
<!-- source="${java.source}" -->
<classpath>
<pathelement location="../lib/opendis7-full.jar"/>
<pathelement location="../lib/open-dis_4.16.jar"/>
......@@ -207,5 +207,20 @@ POSSIBILITY OF SUCH DAMAGE.
<nbbrowse url="https://savage.nps.edu/opendis7-java/javadoc" />
<!-- TODO implementation-independent approach if possible, but note that other Ant approaches usually have to be customized for each OS. -->
</target>
<target name="run.opendis.helper" depends="jar" description="Test run our OpenDisHelper">
<java classpath="${viskit.proj.lib.dir}/${dist.name}.jar" classname="${opendis.helper}" fork="true">
<classpath path="${file.reference.simkit.jar}"/>
<classpath path="${file.reference.opendis7-full.jar}"/>
</java>
</target>
<target name="-post-jar">
<copy todir="${viskit.proj.lib.dir}">
<fileset dir="${dist.dir}">
<include name="${dist.name}.jar"/>
</fileset>
</copy>
</target>
</project>
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=Example programs provided 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/examples
application.splash=..\\..\\NetworkedGraphicsMV3500\\documentation\\images\\OpenDisSurferDude.png
application.title=NPS Networked Graphics MV3500 examples
application.vendor=Don Brutzman
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
dist.archive.excludes=
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=${dist.dir}/Networked_Graphics_MV3500_examples.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
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.compress=false
javac.classpath=\
${file.reference.opendis7-full.jar}:\
${file.reference.open-dis_4.16.jar}:\
${file.reference.dis-enums-1.3.jar}:\
${file.reference.simkit.jar}:\
${file.reference.simkit-doc.zip}:\
${file.reference.simkit-src.zip}
# ${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 Examples"
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 Examples
jlink.launcher=false
jlink.launcher.name=Networked_Graphics_MV3500_examples
main.class=TcpExamples.TcpExample1Telnet
manifest.file=manifest.mf
meta.inf.dir=${src.dir}/META-INF
mkdist.disabled=false
platform.active=JDK_22
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
src.src.dir=otherProjects\\DisDemo\\src
src.src2.dir=otherProjects\\DisShooting\\src
src.src3.dir=otherProjects\\WebSocketGateway\\src
#src.src4.dir=otherProjects\\BasicServletDemo\\src
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=Example programs provided 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/examples
application.splash=..\\..\\NetworkedGraphicsMV3500\\documentation\\images\\OpenDisSurferDude.png
application.title=NPS Networked Graphics MV3500 examples
application.vendor=Don Brutzman
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
dist.archive.excludes=
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.name=Networked_Graphics_MV3500_examples
dist.jar=${dist.dir}/${dist.name}.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
project.licensePath=../license.txt
viskit.proj.dir=ViskitOpenDis7Examples
viskit.proj.lib.dir=src/${viskit.proj.dir}/lib
opendis.helper=SimkitOpenDis7Examples.run.OpenDisHelper
excludes=ViskitOpenDis7Examples/
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=**/*.java
jar.compress=false
javac.classpath=\
${file.reference.opendis7-full.jar}:\
${file.reference.open-dis_4.16.jar}:\
${file.reference.dis-enums-1.3.jar}:\
${file.reference.simkit.jar}:\
${file.reference.simkit-doc.zip}:\
${file.reference.simkit-src.zip}
# ${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 Examples"
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 Examples
jlink.launcher=false
jlink.launcher.name=Networked_Graphics_MV3500_examples
main.class=TcpExamples.TcpExample1Telnet
manifest.file=manifest.mf
meta.inf.dir=${src.dir}/META-INF
mkdist.disabled=false
platform.active=default_platform
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
src.src.dir=otherProjects\\DisDemo\\src
src.src2.dir=otherProjects\\DisShooting\\src
src.src3.dir=otherProjects\\WebSocketGateway\\src
#src.src4.dir=otherProjects\\BasicServletDemo\\src
......@@ -4,6 +4,7 @@
<configuration>
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
<name>Networked Graphics MV3500 examples</name>
<explicit-platform explicit-source-supported="true"/>
<source-roots>
<root id="src.dir"/>
<root id="src.src.dir"/>
......
......@@ -52,7 +52,7 @@ public class AllPduReceiver
}
else
{
System.out.println("Usage: AllPduReceiver <multicast group> <port>");
System.out.println("Usage: AllPduReceiver <multicast group address> <port>");
System.out.println("Default: AllPduReceiver " + DEFAULT_MULTICAST_ADDRESS + " " + DEFAULT_MULTICAST_PORT);
multicastSocket = new MulticastSocket(DEFAULT_MULTICAST_PORT);
multicastInetAddress = InetAddress.getByName(DEFAULT_MULTICAST_ADDRESS);
......
......@@ -541,13 +541,13 @@ public class AllPduSender
if (args.length == 2)
{
System.out.println("Usage: AllPduSender <multicast group> <port>");
System.out.println("Usage: AllPduSender <multicast group address> <port>");
System.out.println("Actual: AllPduSender " + multicastInetAddress.getHostAddress() + " " + port);
allPduSender = new AllPduSender(args[0], Integer.parseInt(args[1]));
}
else
{
System.out.println("Usage: AllPduSender <multicast group> <port>");
System.out.println("Usage: AllPduSender <multicast group address> <port>");
System.out.println("Default: AllPduSender " + DEFAULT_MULTICAST_ADDRESS + " " + DEFAULT_MULTICAST_PORT);
allPduSender = new AllPduSender(DEFAULT_MULTICAST_ADDRESS, DEFAULT_MULTICAST_PORT);
}
......
......@@ -20,7 +20,8 @@ import simkit.random.RandomVariate;
*/
public class ArrivalProcessOpenDis7 extends SimEntityBase {
private final DisChannel disChannel = new DisChannel();
/** Not a sim parameter */
private final DisChannel disChannel;
/**
* Generates interarrival times
......@@ -31,16 +32,6 @@ public class ArrivalProcessOpenDis7 extends SimEntityBase {
* State variable that counts the number of Arrival events
*/
protected int numberArrivals;
/** Initialize channel setup for OpenDis7 and report a test PDU */
private void initializeDisChannel()
{
disChannel.setUpNetworkInterface();
disChannel.printlnTRACE ("disChannel.getNetworkAddress()=" + disChannel.getNetworkAddress() +
", getNetworkPort()=" + disChannel.getNetworkPort());
disChannel.sendCommentPdu(VariableRecordType.OTHER, "ArrivalProcessOpenDis7 initialized");
}
/**
* Instantiate an ArrivalProcess with the given interarrivalTimeGenerator
......@@ -49,8 +40,8 @@ public class ArrivalProcessOpenDis7 extends SimEntityBase {
* times
*/
public ArrivalProcessOpenDis7(RandomVariate interarrivalTimeGenerator) {
this();
this.interarrivalTimeGenerator = interarrivalTimeGenerator;
initializeDisChannel();
}
/**
......@@ -59,7 +50,7 @@ public class ArrivalProcessOpenDis7 extends SimEntityBase {
* explicit call to its setter method.
*/
public ArrivalProcessOpenDis7() {
initializeDisChannel();
disChannel = new DisChannel();
}
/**
......@@ -69,6 +60,7 @@ public class ArrivalProcessOpenDis7 extends SimEntityBase {
public void reset() {
super.reset();
numberArrivals = 0;
initializeDisChannel();
}
/**
......@@ -129,4 +121,14 @@ public class ArrivalProcessOpenDis7 extends SimEntityBase {
public DisChannel getDisChannel() {
return disChannel;
}
/** Initialize channel setup for OpenDis7 and report a test PDU */
private void initializeDisChannel()
{
disChannel.setUpNetworkInterface();
disChannel.printlnTRACE ("disChannel.getNetworkAddress()=" + disChannel.getNetworkAddress() +
", getNetworkPort()=" + disChannel.getNetworkPort());
disChannel.sendCommentPdu(VariableRecordType.OTHER, getClass().getName() + " initialized");
}
}
# Simkit DIS Examples
# MV3500 Simkit Viskit DIS Examples
[This directory](https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/tree/master/examples/src/SimkitOpenDis7Examples) includes simple Simkit programs which are getting modified to
utilize opendis7-java libraries for PDU output.
<!-- TODO rename directory SimkitViskitOpenDis7Examples -->
<!-- https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/tree/master/examples/src/SimkitOpenDis7Examples/README.md -->
*Simkit* is a powerful tool for modeling and simulation that can be networked
with other applications by integrating use of the
Distributed Interactive Simulation (DIS) protocol.
This directory includes simple Simkit programs which are getting modified to
utilize [opendis7-java](https://savage.nps.edu/opendis7-java) libraries for PDU output.
*Viskit* is a visual editor for authoring Simkit event graphs and simulation assemblies.
Models are authored visually and saved as XML, which in turn generates Simkit Java code.
This tool is newly restored and we are now building examples that integrate
DIS capabilities with Simkit.
## Design Goals
* Integrate code to share state changes from Simkit entities as DIS PDU messages.
* Establish reference examples with corresponding output logs for test confirmation.
* Build interoperability examples for distributed simulation using Simkit, DIS and X3D.
* Build interoperability examples for distributed simulation using Simkit, Viskit, DIS and X3D.
* Continue evolution of [Viskit tool](https://gitlab.nps.edu/Savage/viskit) and integrated builds.
## Example Programs
......@@ -39,10 +51,12 @@ c. Two Crane Berths
* Buss, Arnold, [Component Based Simulation Modeling with Simkit](documentation/BussComponentBasedSimulationModelingSimkitWintersim2002.pdf), Proceedings of the 2002 Winter Simulation Conference.
* [Discrete Event Simulation Modeling](documentation/Discrete Event Simulation Modeling.pdf) manual for Simkit
* https://github.com/ahbuss/Simkit
* [Github: Simkit](https://github.com/ahbuss/Simkit)
* https://gitlab.nps.edu/abuss/MV3302ClassCode
* [MV3302: Introduction to Discrete Event Simulation Modeling (SP22_1_AB)](https://cle.nps.edu/portal/site/7c6b3539-58e4-4640-9551-ab03f8629e3c) in NPS Sakai
* [MV3302 > Resources > Handouts](https://cle.nps.edu/portal/site/7c6b3539-58e4-4640-9551-ab03f8629e3c/tool/7f0dea2b-fa42-4bed-8c38-c67ce9f56582?panel=Main)
* [Simkit Quick Reference](documentation/SimkitQuickReference.docx)
* [Viskit demo video](https://savage.nps.edu/videos/Viskit-demo-2023MAR4.mp4) and [info](https://savage.nps.edu/videos/Viskit-demo-info-2023MAR4.mp4)
## TODO
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment