diff --git a/examples/DisDemo/build.run.log.txt b/examples/DisDemo/build.run.log.txt index 9268b0ef6980e2509b0b9b8da9fb24369c62c329..32cd48707c44e54d042b5b23bd356bf77d1b2708 100644 --- a/examples/DisDemo/build.run.log.txt +++ b/examples/DisDemo/build.run.log.txt @@ -8,7 +8,8 @@ warning: [options] system modules path not set in conjunction with -source 11 1 warning compile: run: -Sending 20 ESPDU packets on broadcast address=[/192.168.1.255] port 3000 +Sending 20 ESPDU packets at 1000 msec (1.0 second) intervals on + broadcast address=[/172.20.209.165, /172.16.0.255] port 3000 Current position: 0.0, 1.0, 0.0 ... sent 1 Current position: 0.0, 2.0, 0.0 @@ -50,4 +51,3 @@ Current position: 0.0, 19.0, 0.0 Current position: 0.0, 20.0, 0.0 ... sent 20 BUILD SUCCESSFUL (total time: 21 seconds) - diff --git a/examples/DisDemo/src/disdemo/DisDemo.java b/examples/DisDemo/src/disdemo/DisDemo.java index 07bf1bbfb565508eedd6dcbaa790f598c600cc7f..52ca24b82ae358e41070cb906cb067b7421bbcad 100644 --- a/examples/DisDemo/src/disdemo/DisDemo.java +++ b/examples/DisDemo/src/disdemo/DisDemo.java @@ -31,6 +31,7 @@ public class DisDemo { int NUMBER_OF_SENDS = 20; int PORT = 3000; + int INTERVAL_MSEC = 1000; // 1 second // Create a new coordinate system at the give latitude, longitude, and altitude RangeCoordinates rangeCoordinates = new RangeCoordinates(31.435, 45.223, 17.0); @@ -78,7 +79,10 @@ public class DisDemo { DatagramPacket packet; // Do some movement for a while - System.out.println ("Sending " + NUMBER_OF_SENDS + " ESPDU packets on broadcast address=" + allBcasts + " port " + PORT); + System.out.println ("Sending " + NUMBER_OF_SENDS + " ESPDU packets at " + + INTERVAL_MSEC + " msec (" + INTERVAL_MSEC/1000.0 + + " second) intervals on"); + System.out.println (" broadcast address=" + allBcasts + " port " + PORT); for(int index = 1; index <= NUMBER_OF_SENDS; index++) { mover.step(); @@ -102,7 +106,7 @@ public class DisDemo { socket.send(packet); } - Thread.sleep(1000); + Thread.sleep(INTERVAL_MSEC); System.out.println("... sent " + index); } }