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

rename for clarity, these are initial examples that demonstrate use of all DIS7 PDUs

parent c711a5cd
No related branches found
No related tags found
No related merge requests found
...@@ -7,10 +7,10 @@ import edu.nps.moves.dis7.*; ...@@ -7,10 +7,10 @@ import edu.nps.moves.dis7.*;
import edu.nps.moves.dis7.enumerations.*; import edu.nps.moves.dis7.enumerations.*;
import edu.nps.moves.dis7.util.*; import edu.nps.moves.dis7.util.*;
public class PduReceiver public class AllPduReceiver
{ {
public static final int DEFAULT_MULTICAST_PORT = PduSender.DEFAULT_MULTICAST_PORT; public static final int DEFAULT_MULTICAST_PORT = AllPduSender.DEFAULT_MULTICAST_PORT;
public static final String DEFAULT_MULTICAST_ADDRESS = PduSender.DEFAULT_MULTICAST_ADDRESS; public static final String DEFAULT_MULTICAST_ADDRESS = AllPduSender.DEFAULT_MULTICAST_ADDRESS;
public static final boolean USE_FAST_ESPDU = false; public static final boolean USE_FAST_ESPDU = false;
public static void main(String args[]) public static void main(String args[])
......
...@@ -15,7 +15,7 @@ import edu.nps.moves.dis7.enumerations.*; ...@@ -15,7 +15,7 @@ import edu.nps.moves.dis7.enumerations.*;
* @author DMcG * @author DMcG
* @version $Id:$ * @version $Id:$
*/ */
public class PduSender public class AllPduSender
{ {
/** Default multicast group address we send on. */ /** Default multicast group address we send on. */
public static final String DEFAULT_MULTICAST_ADDRESS = "239.1.2.3"; public static final String DEFAULT_MULTICAST_ADDRESS = "239.1.2.3";
...@@ -26,7 +26,7 @@ public class PduSender ...@@ -26,7 +26,7 @@ public class PduSender
private int port; private int port;
InetAddress multicastAddress; InetAddress multicastAddress;
public PduSender(int port, String multicast) { public AllPduSender(int port, String multicast) {
try try
{ {
this.port = port; this.port = port;
...@@ -428,14 +428,14 @@ public class PduSender ...@@ -428,14 +428,14 @@ public class PduSender
{ {
if (args.length == 2) if (args.length == 2)
{ {
PduSender sender = new PduSender(Integer.parseInt(args[0]), args[1]); AllPduSender sender = new AllPduSender(Integer.parseInt(args[0]), args[1]);
sender.run(); sender.run();
} }
else else
{ {
System.out.println("Usage: PduSender <port> <multicast group>"); System.out.println("Usage: PduSender <port> <multicast group>");
System.out.println("Default: PduSender " + DEFAULT_MULTICAST_PORT + " " + DEFAULT_MULTICAST_ADDRESS); System.out.println("Default: PduSender " + DEFAULT_MULTICAST_PORT + " " + DEFAULT_MULTICAST_ADDRESS);
PduSender sender = new PduSender(DEFAULT_MULTICAST_PORT, DEFAULT_MULTICAST_ADDRESS); AllPduSender sender = new AllPduSender(DEFAULT_MULTICAST_PORT, DEFAULT_MULTICAST_ADDRESS);
sender.run(); sender.run();
} }
} }
......
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