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

Merge origin/master

parents d64f8ef6 24bd3ee3
No related branches found
No related tags found
No related merge requests found
...@@ -4,13 +4,12 @@ import java.io.*; ...@@ -4,13 +4,12 @@ import java.io.*;
import java.net.*; import java.net.*;
/** /**
* This client program establishes a socket connection to the {@link TcpExamples.TcpExample4DispatchServer}, * This client program establishes a socket connection to the ,
* then checks how long it takes to read the single line it expects as a server response. * then checks how long it takes to read the single line it expects as a server response.
* The modification I have added is it checks for a password from the server. And it matches it says success and disconnects * The modification I have added is it checks for a password from the server. And it matches it says success and disconnects
* No fancy footwork here, it is pretty simple and similar to {@link TcpExamples.TcpExample3Client}. * No fancy footwork here, it is pretty simple and similar to TcpExamples.TcpExample3Client}.
* borrowed code from class
* *
* @see TcpExample4DispatchServer
* @see TcpExample4HandlerThread
* *
* @see <a href="../../../src/TcpExamples/TcpExample4TerminalLog.txt" target="blank">TcpExample4TerminalLog.txt</a> * @see <a href="../../../src/TcpExamples/TcpExample4TerminalLog.txt" target="blank">TcpExample4TerminalLog.txt</a>
* @see <a href="../../../src/TcpExamples/TcpExample4SequenceDiagram.png" target="blank">TcpExample4SequenceDiagram.png</a> * @see <a href="../../../src/TcpExamples/TcpExample4SequenceDiagram.png" target="blank">TcpExample4SequenceDiagram.png</a>
...@@ -19,7 +18,7 @@ import java.net.*; ...@@ -19,7 +18,7 @@ import java.net.*;
* @author Don McGregor * @author Don McGregor
* @author Don Brutzman * @author Don Brutzman
* @author MV3500 class * @author MV3500 class
* @MarkMM * @author MarkMM
*/ */
public class Matiski2Client public class Matiski2Client
{ {
......
...@@ -5,18 +5,16 @@ import java.net.*; ...@@ -5,18 +5,16 @@ import java.net.*;
/** /**
* <p> * <p>
* This utility class supports the {@link TcpExamples.TcpExample4DispatchServer} program, * This utility class supports the TcpExamples.TcpExample4DispatchServer program,
* handling all programming logic needed for a new socket connection * handling all programming logic needed for a new socket connection
* to run in a thread of its own. This is the server * to run in a thread of its own. This is the server
* portion as well, so we artificially invent what happens * portion as well, so we artificially invent what happens
* if the server can't respond to a connection for several seconds. * if the server can't respond to a connection for several seconds.
* </p> * </p>
* <p> * <p>
* Warning: do not run this class! It is created and used automatically by {@link TcpExamples.TcpExample4DispatchServer} at run time. * Warning: do not run this class! It is created and used automatically by TcpExamples.TcpExample4DispatchServer} at run time.
* </p> * </p>
* * see examples
* @see TcpExample4Client
* @see TcpExample4DispatchServer
* *
* @see <a href="../../../src/TcpExamples/TcpExample4TerminalLog.txt" target="blank">TcpExample4TerminalLog.txt</a> * @see <a href="../../../src/TcpExamples/TcpExample4TerminalLog.txt" target="blank">TcpExample4TerminalLog.txt</a>
* @see <a href="../../../src/TcpExamples/TcpExample4SequenceDiagram.png" target="blank">TcpExample4SequenceDiagram.png</a> * @see <a href="../../../src/TcpExamples/TcpExample4SequenceDiagram.png" target="blank">TcpExample4SequenceDiagram.png</a>
...@@ -25,6 +23,7 @@ import java.net.*; ...@@ -25,6 +23,7 @@ import java.net.*;
* @author Don McGregor * @author Don McGregor
* @author Don Brutzman * @author Don Brutzman
* @author MV3500 class * @author MV3500 class
* borrowed heavily from above authors
*/ */
public class Matiski2HandlerThread extends Thread public class Matiski2HandlerThread extends Thread
{ {
......
...@@ -9,8 +9,6 @@ import java.net.*; ...@@ -9,8 +9,6 @@ import java.net.*;
* This advanced technique is often used in high=performance high=capacity server programs. * This advanced technique is often used in high=performance high=capacity server programs.
* *
* *
* @see TcpExample4Client
* @see Matiski2HandlerThread
* *
* @see <a href="../../../src/TcpExamples/TcpExample4TerminalLog.txt" target="blank">TcpExample4TerminalLog.txt</a> * @see <a href="../../../src/TcpExamples/TcpExample4TerminalLog.txt" target="blank">TcpExample4TerminalLog.txt</a>
* @see <a href="../../../src/TcpExamples/TcpExample4SequenceDiagram.png" target="blank">TcpExample4SequenceDiagram.png</a> * @see <a href="../../../src/TcpExamples/TcpExample4SequenceDiagram.png" target="blank">TcpExample4SequenceDiagram.png</a>
...@@ -19,6 +17,7 @@ import java.net.*; ...@@ -19,6 +17,7 @@ import java.net.*;
* @author Don McGregor * @author Don McGregor
* @author Don Brutzman * @author Don Brutzman
* @author MV3500 class * @author MV3500 class
* borrowed heavily from above authors
*/ */
public class Matiski2Server public class Matiski2Server
{ {
......
For Homework 3, I modified the OpenDIS ExampleSimulationProgram to enhance its functionality For Homework 3, I modified the OpenDIS ExampleSimulationProgram to enhance its functionality
by experimenting with entity enumeration values and adjusting the network communication setup. 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 On the networking side, I configured the program to use UDP multicast for distribution of the PDUs across
(Entity 1) and a Triton-class surface vessel (Entity 2) from the dis entities list. multiple participants in the simulation. I did this to attempt to create the
I assigned Entity 1 to the friendly force and Entity 2 to the enemy force to simulate an adversarial scenario, low-latency communication needed in large-scale simulations, where UDP's minimal overhead is
and I configured a FirePDU for Entity 1 with custom munition settings. On the networking side, I configured the advantageous, and multicast ensures that updates reach all clients at the same time. I also
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 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 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 the loop to run for a maximum of 10 iterations.
conditions are met. In my opinion, these changes improve the program’s ability to simulate realistic \ No newline at end of file
scenarios while maintaining efficient and responsive network communication.
\ No newline at end of file
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