Skip to content
Snippets Groups Projects
Commit d7951b8d authored by brutzman's avatar brutzman
Browse files

Merge origin/master

parents 44bc9267 8958ae7f
No related branches found
No related tags found
No related merge requests found
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=4354eb7d
nbproject/build-impl.xml.script.CRC32=de4433b1
nbproject/build-impl.xml.stylesheet.CRC32=3a2fa800@1.91.1.48
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=5eaf4250
nbproject/build-impl.xml.script.CRC32=013963da
nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48
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 course Networked Graphics MV3500
application.homepage=https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/tree/master/assignments
application.title=Networked Graphics MV3500 assignments
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_assignments.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.open-dis_4.16.jar=../lib/open-dis_4.16.jar
includes=**
jar.compress=false
javac.classpath=\
${file.reference.open-dis_4.16.jar}:\
${file.reference.dis-enums-1.3.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
javac.external.vm=true
javac.modulepath=
javac.processormodulepath=
javac.processorpath=\
${javac.classpath}
javac.source=1.8
javac.target=1.8
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}
javac.test.modulepath=\
${javac.modulepath}
javac.test.processorpath=\
${javac.test.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=${source.encoding}
javadoc.html5=false
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
jlink.launcher=false
jlink.launcher.name=Networked_Graphics_MV3500_assignments
main.class=MV3500Cohort2019JulySeptember.homework2.Yurkovich.Yurkovich_Server
meta.inf.dir=${src.dir}/META-INF
mkdist.disabled=true
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
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 course Networked Graphics MV3500
application.homepage=https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/tree/master/assignments
application.title=Networked Graphics MV3500 assignments
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_assignments.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
file.reference.commons-io-2.6.jar=../lib/commons-io-2.6.jar
file.reference.dis-enums-1.3.jar=../lib/dis-enums-1.3.jar
file.reference.guava-28.0-jre.jar=../lib/guava-28.0-jre.jar
file.reference.open-dis7-entities-all.jar=../lib/open-dis7-entities-all.jar
file.reference.open-dis7-java.jar=../lib/open-dis7-java.jar
file.reference.open-dis_4.16.jar=../lib/open-dis_4.16.jar
includes=**
jar.compress=false
javac.classpath=\
${file.reference.open-dis7-java.jar}:\
${file.reference.open-dis7-entities-all.jar}:\
${file.reference.open-dis_4.16.jar}:\
${file.reference.dis-enums-1.3.jar}:\
${file.reference.commons-io-2.6.jar}:\
${file.reference.guava-28.0-jre.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
javac.external.vm=true
javac.modulepath=
javac.processormodulepath=
javac.processorpath=\
${javac.classpath}
javac.source=1.8
javac.target=1.8
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}
javac.test.modulepath=\
${javac.modulepath}
javac.test.processorpath=\
${javac.test.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=${source.encoding}
javadoc.html5=false
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
jlink.launcher=false
jlink.launcher.name=Networked_Graphics_MV3500_assignments
main.class=MV3500Cohort2019JulySeptember.homework2.Yurkovich.Yurkovich_Server
meta.inf.dir=${src.dir}/META-INF
mkdist.disabled=true
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
src.dir=src
test.src.dir=test
package MV3500Cohort2019JulySeptember.homework4.Boron;
import edu.nps.moves.dis7.*;
import edu.nps.moves.dis7.enumerations.DISPDUType;
import edu.nps.moves.dis7.enumerations.ForceID;
/**
* Creates structure of an entity PDU and transfers it to BoronPduSender to be sent out
* @author jonathanboron
*/
public class BoronEntityStatePduCreator {
/**
* Zero-argument constructor
*/
public BoronEntityStatePduCreator(){}
/**
* Creates and returns a new Entity State PDU
* @param s is a 16 bit ID
* @param fid is a force ID enumeration
* @param l is a double array containing position x,y,z coordinates
* @param v is a float array containing x,y,z velocity values
* @param o is a float array containing phi, psi, and theta orientation values
* @returns a new EntityStatePdu with minimal information
*/
public EntityStatePdu newPDU(short s, ForceID fid, double [] l, float[] v, float[] o)
{
//Create new entity state PDU and set ID and Force ID
EntityStatePdu newPdu = new EntityStatePdu();
EntityID id = new EntityID();
id.setSiteID(s);
newPdu.setEntityID(id);
newPdu.setForceId(fid);
//Set physical parameters (location, velocity, orientation)
Vector3Double location = new Vector3Double();
location.setX(l[0]);
location.setY(l[1]);
location.setZ(l[2]);
newPdu.setEntityLocation(location);
Vector3Float velocity = new Vector3Float();
velocity.setX(v[0]);
velocity.setY(v[1]);
velocity.setZ(v[2]);
newPdu.setEntityLinearVelocity(velocity);
EulerAngles orientation = new EulerAngles();
orientation.setPhi(o[0]);
orientation.setPsi(o[1]);
orientation.setTheta(o[2]);
newPdu.setEntityOrientation(orientation);
return newPdu;
}
}
package MV3500Cohort2019JulySeptember.homework4.Boron;
import java.net.*;
import java.io.*;
import edu.nps.moves.dis7.*;
import edu.nps.moves.dis7.enumerations.*;
import edu.nps.moves.dis7.util.*;
public class BoronPduReceiver
{
public static final int DEFAULT_MULTICAST_PORT = BoronPduSender.DEFAULT_MULTICAST_PORT;
public static final String DEFAULT_MULTICAST_ADDRESS = BoronPduSender.DEFAULT_MULTICAST_ADDRESS;
public static final boolean USE_FAST_ESPDU = false;
public static void main(String args[])
{
PduFactory factory;
MulticastSocket socket;
InetAddress address;
DatagramPacket packet;
try {
System.out.println("DisExamplesOpenDis7.AllPduReceiver started...");
if (args.length == 2) {
socket = new MulticastSocket(Integer.parseInt(args[0]));
address = InetAddress.getByName(args[1]);
}
else {
System.out.println("Usage: AllPduReceiver <port> <multicast group>");
System.out.println("Default: AllPduReceiver " + DEFAULT_MULTICAST_PORT + " " + DEFAULT_MULTICAST_ADDRESS);
socket = new MulticastSocket(DEFAULT_MULTICAST_PORT);
address = InetAddress.getByName(DEFAULT_MULTICAST_ADDRESS);
}
socket.joinGroup(address);
factory = new PduFactory();
while (true) // Loop infinitely, receiving datagrams
{
byte buffer[] = new byte[1500]; // typical MTU size
packet = new DatagramPacket(buffer, buffer.length); // reset
socket.receive(packet);
Pdu pdu = factory.createPdu(packet.getData());
if (pdu != null) {
DISPDUType currentPduType = pdu.getPduType(); //short currentPduType = pdu.getPduType();
String currentPduTypeName = pdu.getClass().getName();
DISProtocolFamily currentProtocolFamilyID = pdu.getProtocolFamily(); //short currentProtocolFamilyID = pdu.getProtocolFamily();
String currentPduFamilyName = pdu.getClass().getSuperclass().getSimpleName();
StringBuilder message = new StringBuilder();
message.append("received DIS PDU ");
if (currentPduType.getValue() < 10)
message.append(" ");
message.append(currentPduType.getValue());
String currentPduTypePadded = String.format("%-34s", currentPduType); // - indicates right padding of whitespace
message.append(" " ).append(currentPduTypePadded);
String currentPduTypeNamePadded = String.format("%-49s", currentPduTypeName); // - indicates right padding of whitespace
message.append(" of type ").append(currentPduTypeNamePadded); // package.class name
message.append(" (protocolFamily ").append(currentProtocolFamilyID);
// message.append(" ").append(currentPduFamilyName); // class name is also available
message.append(")");
System.out.println(message.toString());
}
else
System.out.println("received packet but pdu is null, packet.getData().length=" + packet.getData().length + ", error...");
}
}
catch (IOException e) {
System.out.println("Problem with DisExamplesOpenDis7.AllPduReceiver, see exception trace:");
System.out.println(e);
}
finally {
System.out.println("DisExamplesOpenDis7.AllPduReceiver complete.");
}
}
}
package MV3500Cohort2019JulySeptember.homework4.Boron;
import java.io.*;
import java.net.*;
import java.util.*;
import edu.nps.moves.dis7.*;
import edu.nps.moves.dis7.enumerations.*;
/**
* This is an example that sends many/most types of PDUs. Useful for testing standards
* compliance or getting a full set of PDUs. It also writes the generated PDUs to an XML file.
* Adapted from OpenDIS library example package edu.nps.moves.examples
*
* @author DMcG
* @version $Id:$
*/
public class BoronPduSender
{
/** Default multicast group address we send on. */
public static final String DEFAULT_MULTICAST_ADDRESS = "239.1.2.3";
/** Default multicast port used, matches Wireshark DIS capture default */
public static final int DEFAULT_MULTICAST_PORT = 3000;
private int port;
InetAddress multicastAddress;
public BoronPduSender(int port, String multicast) {
try
{
this.port = port;
multicastAddress = InetAddress.getByName(multicast);
if (!multicastAddress.isMulticastAddress())
{
System.out.println("Not a multicast address: " + multicast);
}
}
catch (UnknownHostException e) {
System.out.println("Unable to open socket: " + e);
}
}
public void run(Pdu aPdu)
{
System.out.println("DisExamplesOpenDis7.AllPduSender started...");
System.out.println("Generate PDUs and note issues, if any...");
// Send the PDUs we created
try
{
InetAddress localMulticastAddress = InetAddress.getByName(DEFAULT_MULTICAST_ADDRESS);
MulticastSocket socket = new MulticastSocket(DEFAULT_MULTICAST_PORT);
socket.joinGroup(localMulticastAddress);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(baos);
byte[] buffer;
//Pdu aPdu = generatedPdusList.get(idx);
aPdu.marshal(dos);
buffer = baos.toByteArray();
DatagramPacket packet = new DatagramPacket(buffer, buffer.length, localMulticastAddress, DEFAULT_MULTICAST_PORT);
socket.send(packet);
try
{
Thread.sleep(100L);
} catch (InterruptedException ex) {
}
String currentPduTypeValuePadded = String.format("%2s", aPdu.getPduType().getValue());
String currentPduTypePadded = String.format("%-34s", aPdu.getPduType()); // - indicates right padding of whitespace
System.out.print ("Sent DIS PDU " + currentPduTypeValuePadded + " " + currentPduTypePadded );
System.out.println(" of type " + aPdu.getClass().getName());
}
catch (IOException e)
{
System.out.println(e);
}
// write the PDUs out to an XML file.
//PduContainer container = new PduContainer();
//container.setPdus(generatedPdus);
//container.marshallToXml("examplePdus.xml");
}
public static void main(String args[])
{
BoronEntityStatePduCreator espduCreator = new BoronEntityStatePduCreator();
Random rand = new Random();
List<Pdu> generatedPdusList = new ArrayList<>();
for (int i = 0; i < 3; i++)
{
//For demonstration purposes, ID is a random short. A larger program would
//have a more elaborate ID assignment system to prevent duplication.
short id = (short)rand.nextInt(10000);
//Generate random x,y,z coordinates between 0 and 10
double[] l = new double[]
{
rand.nextInt(10) + rand.nextDouble(),
rand.nextInt(10) + rand.nextDouble(),
rand.nextInt(10) + rand.nextDouble()
};
//Generate random velocity
float[] v = new float[]
{
rand.nextFloat(),
rand.nextFloat(),
rand.nextFloat()
};
//Generate random orientation
float[] o = new float[]
{
rand.nextFloat(),
rand.nextFloat(),
rand.nextFloat()
};
//Add entity PDUs to the list to send out
generatedPdusList.add(espduCreator.newPDU(id, ForceID.FRIENDLY, l, v, o));
}
System.out.println("Send the " + generatedPdusList.size() + " PDUs we created...");
//Send the PDUs
if (args.length == 2)
{
BoronPduSender sender = new BoronPduSender(Integer.parseInt(args[0]), args[1]);
for (int i = 0; i < generatedPdusList.size(); i++)
{
Pdu aPdu = generatedPdusList.get(0);
sender.run(aPdu);
generatedPdusList.remove(0);
}
}
else
{
System.out.println("Usage: AllPduSender <port> <multicast group>");
System.out.println("Default: AllPduSender " + DEFAULT_MULTICAST_PORT + " " + DEFAULT_MULTICAST_ADDRESS);
BoronPduSender sender = new BoronPduSender(DEFAULT_MULTICAST_PORT, DEFAULT_MULTICAST_ADDRESS);
for (int i = 0; i < generatedPdusList.size(); i++)
{
Pdu aPdu = generatedPdusList.get(0);
sender.run(aPdu);
generatedPdusList.remove(0);
}
}
System.out.println("DisExamplesOpenDis7.AllPduSender complete.");
}
}
!Begin!Beginning of DIS capture file, Pdusave.dislog.
AAAAAAAAAAA=,BwABAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/AAAAAAAABAAAAAAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUGR1U2VuZGVyAAAAAAAA
AAAAAAYnFzQ=,BwACAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAw5/E8=,BwADAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
AAAAABKCawU=,BwAEAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAABiMUWQ=,BwAFAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
AAAAAB6asAg=,BwAGAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
AAAAACSXtxQ=,BwAHAwAA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AAAAAAA==
AAAAAXOOj50=,BwA+CgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
AAAAAXmm8+A=,BwA/CgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAX+h584=,BwBACgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
AAAAAYXHvNI=,BwBBCgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
AAAAAYvN+fw=,BwBCAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
AAAAAZHltOI=,BwBDAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAZfoBJ0=,BwBEAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
AAAAAZ4pFTg=,BwBFAgAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAaRMhhA=,BwBGDQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
AAAAAapH1Hk=,BwBHDQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
AAAAAbBCcZM=,BwBIAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD6QAAAAA=
!End!End of DIS capture file, Pdusave.dislog.
......@@ -44,19 +44,19 @@ public class TcpExample3Server {
while (true) {
// block until connected to a client
try (Socket clientConnection = serverSocket.accept()) {
try (Socket clientConnectionSocket = serverSocket.accept()) {
// Now hook everything up (i.e. set up the streams), Java style:
os = clientConnection.getOutputStream();
os = clientConnectionSocket.getOutputStream();
ps = new PrintStream(os);
ps.println("This message was produced by the server."); // this gets sent back to client!
// Print some information locally about the Socket connection.
// This includes the port and IP numbers on both sides (the socket pair).
localAddress = clientConnection.getLocalAddress();
remoteAddress = clientConnection.getInetAddress();
localPort = clientConnection.getLocalPort();
remotePort = clientConnection.getPort();
localAddress = clientConnectionSocket.getLocalAddress();
remoteAddress = clientConnectionSocket.getInetAddress();
localPort = clientConnectionSocket.getLocalPort();
remotePort = clientConnectionSocket.getPort();
// My socket pair connection looks like this, to localhost:
// Socket pair: (( /0:0:0:0:0:0:0:1, 2317 ), ( /0:0:0:0:0:0:0:1, 54876 ))
......
......@@ -20,7 +20,7 @@ public class MulticastReceiver {
/** Time to live: how many router-decrement levels can be crossed */
public static final int TTL = 10;
final private static boolean infiniteReadLoop = false;
final private static boolean infiniteReadLoop = true;
public static void main(String[] args)
{
......
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