diff --git a/esds/simulator.py b/esds/simulator.py index 4217e1d..219c1d9 100644 --- a/esds/simulator.py +++ b/esds/simulator.py @@ -7,7 +7,7 @@ class Simulator: Flow-Level Discrete Event Simulator for Cyber-Physical Systems The general format for an event is (type,timestamp,event,priority) Event types: - - 0 send (0,timestamp,(src,dst,interface,data,datasize,duration,datasize_remaining), 2) + - 0 send (0,timestamp,(src,dst,interface,data,datasize,duration,datasize_remaining,start_timestamp), 2) - 1 timeout (1,timestamp,node_id,3) - 2 breakpoint_manual (3,timestamp,0,1) - 3 breakpoint_auto (4,timestamp,0,1) diff --git a/tests/simple_log_5n/node.py b/tests/api_log_5n/node.py similarity index 100% rename from tests/simple_log_5n/node.py rename to tests/api_log_5n/node.py diff --git a/tests/simple_log_5n/out b/tests/api_log_5n/out similarity index 100% rename from tests/simple_log_5n/out rename to tests/api_log_5n/out diff --git a/tests/simple_log_5n/simulator.py b/tests/api_log_5n/simulator.py similarity index 100% rename from tests/simple_log_5n/simulator.py rename to tests/api_log_5n/simulator.py diff --git a/tests/api_read_clock_2n/node.py b/tests/api_read_clock_2n/node.py new file mode 100644 index 0000000..765c3f9 --- /dev/null +++ b/tests/api_read_clock_2n/node.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python + +def execute(api): + api.log("Clock is {}s".format(api.read("clock"))) # Ensure clock is 0s for both node + api.wait(5698.1256) + api.log("Clock is {}s".format(api.read("clock"))) # Ensure clock is 5698.1256s for both node + api.log("Clock is {}s".format(api.read("clock"))) # Ensure clock did not change in between for both node diff --git a/tests/simple_read_clock_2n/out b/tests/api_read_clock_2n/out similarity index 100% rename from tests/simple_read_clock_2n/out rename to tests/api_read_clock_2n/out diff --git a/tests/simple_read_clock_2n/simulator.py b/tests/api_read_clock_2n/simulator.py similarity index 100% rename from tests/simple_read_clock_2n/simulator.py rename to tests/api_read_clock_2n/simulator.py diff --git a/tests/simple_read_eth0_ncom_2s1r/out b/tests/api_read_eth0_ncom_2s1r/out similarity index 100% rename from tests/simple_read_eth0_ncom_2s1r/out rename to tests/api_read_eth0_ncom_2s1r/out diff --git a/tests/api_read_eth0_ncom_2s1r/receiver.py b/tests/api_read_eth0_ncom_2s1r/receiver.py new file mode 100644 index 0000000..286af70 --- /dev/null +++ b/tests/api_read_eth0_ncom_2s1r/receiver.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python + +def execute(api): + api.log("eth0 is {}".format(api.read("ncom_eth0"))) # Ensure no commmunications at t=0s + api.wait(624) + api.log("eth0 is {}".format(api.read("ncom_eth0"))) # Ensure still no commmunications at t=624s + api.wait(624) + # Now we are at 624*2=1248 (first sender start a communication) + api.wait(1) # Let the communication starts (otherwise value will be 0 (see api_read_order_ncom_1s2r)) + api.log("eth0 is {}".format(api.read("ncom_eth0"))) # Should print 1 + # Now second sender start a communication + api.wait(1) # Let the second communication starts + api.log("eth0 is {}".format(api.read("ncom_eth0"))) # Should print 2 diff --git a/tests/simple_read_eth0_ncom_2s1r/sender.py b/tests/api_read_eth0_ncom_2s1r/sender.py similarity index 55% rename from tests/simple_read_eth0_ncom_2s1r/sender.py rename to tests/api_read_eth0_ncom_2s1r/sender.py index 7c9259a..e80db44 100644 --- a/tests/simple_read_eth0_ncom_2s1r/sender.py +++ b/tests/api_read_eth0_ncom_2s1r/sender.py @@ -1,9 +1,9 @@ #!/usr/bin/env python def execute(api): - api.wait(1248) + api.wait(1248) # All communications start at t=1248s if api.node_id==0: api.send("eth0","hello",50,2) else: - api.wait(1) + api.wait(1) # Second sender start 1s after the first api.send("eth0","hello",50,2) diff --git a/tests/simple_read_eth0_ncom_2s1r/simulator.py b/tests/api_read_eth0_ncom_2s1r/simulator.py similarity index 100% rename from tests/simple_read_eth0_ncom_2s1r/simulator.py rename to tests/api_read_eth0_ncom_2s1r/simulator.py diff --git a/tests/api_read_order_ncom_1s2r/out b/tests/api_read_order_ncom_1s2r/out new file mode 100644 index 0000000..9172791 --- /dev/null +++ b/tests/api_read_order_ncom_1s2r/out @@ -0,0 +1,6 @@ +[t=0.000,src=n0] wlan0 is 0 +[t=0.000,src=n2] wlan0 is 0 +[t=0.000,src=n1] Send 1 bytes on wlan0 +[t=1.000,src=n0] Receive 1 bytes on wlan0 +[t=1.000,src=n2] Receive 1 bytes on wlan0 +[t=1.000,src=esds] Simulation ends diff --git a/tests/api_read_order_ncom_1s2r/receiver.py b/tests/api_read_order_ncom_1s2r/receiver.py new file mode 100644 index 0000000..7bcf70e --- /dev/null +++ b/tests/api_read_order_ncom_1s2r/receiver.py @@ -0,0 +1,4 @@ +#!/usr/bin/env python + +def execute(api): + api.log("wlan0 is {}".format(api.read("ncom_wlan0"))) # Ensure no commmunications at t=0s diff --git a/tests/api_read_order_ncom_1s2r/sender.py b/tests/api_read_order_ncom_1s2r/sender.py new file mode 100644 index 0000000..b13bab3 --- /dev/null +++ b/tests/api_read_order_ncom_1s2r/sender.py @@ -0,0 +1,4 @@ +#!/usr/bin/env python + +def execute(api): + api.send("wlan0","hello",1,None) diff --git a/tests/api_read_order_ncom_1s2r/simulator.py b/tests/api_read_order_ncom_1s2r/simulator.py new file mode 100755 index 0000000..5c3418c --- /dev/null +++ b/tests/api_read_order_ncom_1s2r/simulator.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python + +# Load ESDS +import esds +import numpy as np + +B=np.full((3,3),8) +L=np.full((3,3),0) +s=esds.Simulator({"wlan0":{"bandwidth":B, "latency":L, "is_wired":False}, "eth0":{"bandwidth":B, "latency":L, "is_wired":True}}) + +# Order at which receivers and senders are instanciated should not matter on the result +# both receivers should have ncom_wlan0 equals to 0 (since non-blocking calls are processed before the blocking one, it should be the case) +s.create_node("receiver") +s.create_node("sender") +s.create_node("receiver") + +s.run(interferences=False) diff --git a/tests/simple_read_wlan0_ncom_2s1r/out b/tests/api_read_wlan0_ncom_2s1r/out similarity index 100% rename from tests/simple_read_wlan0_ncom_2s1r/out rename to tests/api_read_wlan0_ncom_2s1r/out diff --git a/tests/api_read_wlan0_ncom_2s1r/receiver.py b/tests/api_read_wlan0_ncom_2s1r/receiver.py new file mode 100644 index 0000000..1e133ec --- /dev/null +++ b/tests/api_read_wlan0_ncom_2s1r/receiver.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python + +def execute(api): + api.log("wlan0 is {}".format(api.read("ncom_wlan0"))) # Ensure no commmunications at t=0s + api.wait(624) + api.log("wlan0 is {}".format(api.read("ncom_wlan0"))) # Ensure still no commmunications at t=624s + api.wait(624) + # Now we are at 624*2=1248 (first sender start a communication) + api.wait(1) # Let the communication starts (otherwise value will be 0 (see api_read_order_ncom_1s2r)) + api.log("wlan0 is {}".format(api.read("ncom_wlan0"))) # Should print 1 + # Now second sender start a communication + api.wait(1) # Let the second communication starts + api.log("wlan0 is {}".format(api.read("ncom_wlan0"))) # Should print 2 diff --git a/tests/simple_read_wlan0_ncom_2s1r/sender.py b/tests/api_read_wlan0_ncom_2s1r/sender.py similarity index 57% rename from tests/simple_read_wlan0_ncom_2s1r/sender.py rename to tests/api_read_wlan0_ncom_2s1r/sender.py index b89e5e2..aa8e227 100644 --- a/tests/simple_read_wlan0_ncom_2s1r/sender.py +++ b/tests/api_read_wlan0_ncom_2s1r/sender.py @@ -1,9 +1,9 @@ #!/usr/bin/env python def execute(api): - api.wait(1248) + api.wait(1248) # All communications start at t=1248s if api.node_id==0: api.send("wlan0","hello",50,None) else: - api.wait(1) + api.wait(1) # Second sender start 1s after the first api.send("wlan0","hello",50,None) diff --git a/tests/simple_read_wlan0_ncom_2s1r/simulator.py b/tests/api_read_wlan0_ncom_2s1r/simulator.py similarity index 100% rename from tests/simple_read_wlan0_ncom_2s1r/simulator.py rename to tests/api_read_wlan0_ncom_2s1r/simulator.py diff --git a/tests/simple_receivet0_eth0_1s1r/out b/tests/api_receivet0_eth0_1s1r/out similarity index 100% rename from tests/simple_receivet0_eth0_1s1r/out rename to tests/api_receivet0_eth0_1s1r/out diff --git a/tests/simple_receivet0_eth0_1s1r/receiver.py b/tests/api_receivet0_eth0_1s1r/receiver.py similarity index 65% rename from tests/simple_receivet0_eth0_1s1r/receiver.py rename to tests/api_receivet0_eth0_1s1r/receiver.py index bbb7ff7..e57c460 100644 --- a/tests/simple_receivet0_eth0_1s1r/receiver.py +++ b/tests/api_receivet0_eth0_1s1r/receiver.py @@ -7,8 +7,8 @@ def receivet(node,timeout): node.log(msg) def execute(api): - # Should not works + # Should not works since communication start at t=0s receivet(api,0) api.wait(1) - # Should works - receivet(api,0) + # Now communication started + receivet(api,0) # Should work (no timeout error) diff --git a/tests/simple_receivet0_eth0_1s1r/sender.py b/tests/api_receivet0_eth0_1s1r/sender.py similarity index 100% rename from tests/simple_receivet0_eth0_1s1r/sender.py rename to tests/api_receivet0_eth0_1s1r/sender.py diff --git a/tests/simple_send_eth0_1s1r/simulator.py b/tests/api_receivet0_eth0_1s1r/simulator.py similarity index 100% rename from tests/simple_send_eth0_1s1r/simulator.py rename to tests/api_receivet0_eth0_1s1r/simulator.py diff --git a/tests/simple_receivet0_eth0_1s1r/yoctosim.debug b/tests/api_receivet0_eth0_1s1r/yoctosim.debug similarity index 100% rename from tests/simple_receivet0_eth0_1s1r/yoctosim.debug rename to tests/api_receivet0_eth0_1s1r/yoctosim.debug diff --git a/tests/simple_receivet_eth0_1s1r/out b/tests/api_receivet_eth0_1s1r/out similarity index 100% rename from tests/simple_receivet_eth0_1s1r/out rename to tests/api_receivet_eth0_1s1r/out diff --git a/tests/simple_receivet_eth0_1s1r/receiver.py b/tests/api_receivet_eth0_1s1r/receiver.py similarity index 100% rename from tests/simple_receivet_eth0_1s1r/receiver.py rename to tests/api_receivet_eth0_1s1r/receiver.py diff --git a/tests/simple_receivet_eth0_1s1r/sender.py b/tests/api_receivet_eth0_1s1r/sender.py similarity index 100% rename from tests/simple_receivet_eth0_1s1r/sender.py rename to tests/api_receivet_eth0_1s1r/sender.py diff --git a/tests/simple_sendt_eth0_1s1r/simulator.py b/tests/api_receivet_eth0_1s1r/simulator.py similarity index 100% rename from tests/simple_sendt_eth0_1s1r/simulator.py rename to tests/api_receivet_eth0_1s1r/simulator.py diff --git a/tests/simple_receivet_eth0_1s1r/yoctosim.debug b/tests/api_receivet_eth0_1s1r/yoctosim.debug similarity index 100% rename from tests/simple_receivet_eth0_1s1r/yoctosim.debug rename to tests/api_receivet_eth0_1s1r/yoctosim.debug diff --git a/tests/simple_send0_eth0_1s1r/out b/tests/api_send0_eth0_1s1r/out similarity index 100% rename from tests/simple_send0_eth0_1s1r/out rename to tests/api_send0_eth0_1s1r/out diff --git a/tests/simple_send0_eth0_1s1r/receiver.py b/tests/api_send0_eth0_1s1r/receiver.py similarity index 100% rename from tests/simple_send0_eth0_1s1r/receiver.py rename to tests/api_send0_eth0_1s1r/receiver.py diff --git a/tests/simple_send0_eth0_1s1r/sender.py b/tests/api_send0_eth0_1s1r/sender.py similarity index 100% rename from tests/simple_send0_eth0_1s1r/sender.py rename to tests/api_send0_eth0_1s1r/sender.py diff --git a/tests/simple_receivet_eth0_1s1r/simulator.py b/tests/api_send0_eth0_1s1r/simulator.py similarity index 94% rename from tests/simple_receivet_eth0_1s1r/simulator.py rename to tests/api_send0_eth0_1s1r/simulator.py index 7c3e389..ae5bbea 100755 --- a/tests/simple_receivet_eth0_1s1r/simulator.py +++ b/tests/api_send0_eth0_1s1r/simulator.py @@ -11,4 +11,4 @@ s=esds.Simulator({"wlan0":{"bandwidth":B, "latency":L, "is_wired":False}, "eth0" s.create_node("sender") s.create_node("receiver") -s.run(debug=True) +s.run() diff --git a/tests/simple_send_4interfaces_1s2r/out b/tests/api_send_4interfaces_1s2r/out similarity index 100% rename from tests/simple_send_4interfaces_1s2r/out rename to tests/api_send_4interfaces_1s2r/out diff --git a/tests/simple_send_4interfaces_1s2r/receiver.py b/tests/api_send_4interfaces_1s2r/receiver.py similarity index 100% rename from tests/simple_send_4interfaces_1s2r/receiver.py rename to tests/api_send_4interfaces_1s2r/receiver.py diff --git a/tests/simple_send_4interfaces_1s2r/sender.py b/tests/api_send_4interfaces_1s2r/sender.py similarity index 100% rename from tests/simple_send_4interfaces_1s2r/sender.py rename to tests/api_send_4interfaces_1s2r/sender.py diff --git a/tests/simple_send_4interfaces_1s2r/simulator.py b/tests/api_send_4interfaces_1s2r/simulator.py similarity index 100% rename from tests/simple_send_4interfaces_1s2r/simulator.py rename to tests/api_send_4interfaces_1s2r/simulator.py diff --git a/tests/simple_send_eth0_1s1r/out b/tests/api_send_eth0_1s1r/out similarity index 100% rename from tests/simple_send_eth0_1s1r/out rename to tests/api_send_eth0_1s1r/out diff --git a/tests/simple_send_eth0_1s1r/receiver.py b/tests/api_send_eth0_1s1r/receiver.py similarity index 100% rename from tests/simple_send_eth0_1s1r/receiver.py rename to tests/api_send_eth0_1s1r/receiver.py diff --git a/tests/simple_send_eth0_1s1r/sender.py b/tests/api_send_eth0_1s1r/sender.py similarity index 100% rename from tests/simple_send_eth0_1s1r/sender.py rename to tests/api_send_eth0_1s1r/sender.py diff --git a/tests/simple_receivet0_eth0_1s1r/simulator.py b/tests/api_send_eth0_1s1r/simulator.py similarity index 94% rename from tests/simple_receivet0_eth0_1s1r/simulator.py rename to tests/api_send_eth0_1s1r/simulator.py index 7c3e389..ae5bbea 100755 --- a/tests/simple_receivet0_eth0_1s1r/simulator.py +++ b/tests/api_send_eth0_1s1r/simulator.py @@ -11,4 +11,4 @@ s=esds.Simulator({"wlan0":{"bandwidth":B, "latency":L, "is_wired":False}, "eth0" s.create_node("sender") s.create_node("receiver") -s.run(debug=True) +s.run() diff --git a/tests/simple_send_eth0_2s1r/out b/tests/api_send_eth0_2s1r/out similarity index 100% rename from tests/simple_send_eth0_2s1r/out rename to tests/api_send_eth0_2s1r/out diff --git a/tests/simple_send_eth0_2s1r/receiver.py b/tests/api_send_eth0_2s1r/receiver.py similarity index 100% rename from tests/simple_send_eth0_2s1r/receiver.py rename to tests/api_send_eth0_2s1r/receiver.py diff --git a/tests/simple_send_eth0_2s1r/sender.py b/tests/api_send_eth0_2s1r/sender.py similarity index 100% rename from tests/simple_send_eth0_2s1r/sender.py rename to tests/api_send_eth0_2s1r/sender.py diff --git a/tests/simple_send_eth0_2s1r/simulator.py b/tests/api_send_eth0_2s1r/simulator.py similarity index 100% rename from tests/simple_send_eth0_2s1r/simulator.py rename to tests/api_send_eth0_2s1r/simulator.py diff --git a/tests/simple_send_eth0_3s1r/out b/tests/api_send_eth0_3s1r/out similarity index 100% rename from tests/simple_send_eth0_3s1r/out rename to tests/api_send_eth0_3s1r/out diff --git a/tests/simple_send_eth0_3s1r/receiver.py b/tests/api_send_eth0_3s1r/receiver.py similarity index 100% rename from tests/simple_send_eth0_3s1r/receiver.py rename to tests/api_send_eth0_3s1r/receiver.py diff --git a/tests/simple_send_eth0_3s1r/sender.py b/tests/api_send_eth0_3s1r/sender.py similarity index 100% rename from tests/simple_send_eth0_3s1r/sender.py rename to tests/api_send_eth0_3s1r/sender.py diff --git a/tests/simple_send_eth0_3s1r/simulator.py b/tests/api_send_eth0_3s1r/simulator.py similarity index 100% rename from tests/simple_send_eth0_3s1r/simulator.py rename to tests/api_send_eth0_3s1r/simulator.py diff --git a/tests/simple_send_wlan0_1s2r/out b/tests/api_send_wlan0_1s2r/out similarity index 100% rename from tests/simple_send_wlan0_1s2r/out rename to tests/api_send_wlan0_1s2r/out diff --git a/tests/simple_send_wlan0_1s2r/receiver.py b/tests/api_send_wlan0_1s2r/receiver.py similarity index 100% rename from tests/simple_send_wlan0_1s2r/receiver.py rename to tests/api_send_wlan0_1s2r/receiver.py diff --git a/tests/simple_send_wlan0_1s2r/sender.py b/tests/api_send_wlan0_1s2r/sender.py similarity index 100% rename from tests/simple_send_wlan0_1s2r/sender.py rename to tests/api_send_wlan0_1s2r/sender.py diff --git a/tests/simple_send_wlan0_1s2r/simulator.py b/tests/api_send_wlan0_1s2r/simulator.py similarity index 100% rename from tests/simple_send_wlan0_1s2r/simulator.py rename to tests/api_send_wlan0_1s2r/simulator.py diff --git a/tests/simple_send_wlan0_2s1r/out b/tests/api_send_wlan0_2s1r/out similarity index 100% rename from tests/simple_send_wlan0_2s1r/out rename to tests/api_send_wlan0_2s1r/out diff --git a/tests/simple_send_wlan0_2s1r/receiver.py b/tests/api_send_wlan0_2s1r/receiver.py similarity index 100% rename from tests/simple_send_wlan0_2s1r/receiver.py rename to tests/api_send_wlan0_2s1r/receiver.py diff --git a/tests/simple_send_wlan0_2s1r/sender.py b/tests/api_send_wlan0_2s1r/sender.py similarity index 100% rename from tests/simple_send_wlan0_2s1r/sender.py rename to tests/api_send_wlan0_2s1r/sender.py diff --git a/tests/simple_send_wlan0_2s1r/simulator.py b/tests/api_send_wlan0_2s1r/simulator.py similarity index 100% rename from tests/simple_send_wlan0_2s1r/simulator.py rename to tests/api_send_wlan0_2s1r/simulator.py diff --git a/tests/simple_sendt_eth0_1s1r/out b/tests/api_sendt_eth0_1s1r/out similarity index 100% rename from tests/simple_sendt_eth0_1s1r/out rename to tests/api_sendt_eth0_1s1r/out diff --git a/tests/simple_sendt_eth0_1s1r/receiver.py b/tests/api_sendt_eth0_1s1r/receiver.py similarity index 100% rename from tests/simple_sendt_eth0_1s1r/receiver.py rename to tests/api_sendt_eth0_1s1r/receiver.py diff --git a/tests/simple_sendt_eth0_1s1r/sender.py b/tests/api_sendt_eth0_1s1r/sender.py similarity index 100% rename from tests/simple_sendt_eth0_1s1r/sender.py rename to tests/api_sendt_eth0_1s1r/sender.py diff --git a/tests/simple_send0_eth0_1s1r/simulator.py b/tests/api_sendt_eth0_1s1r/simulator.py similarity index 94% rename from tests/simple_send0_eth0_1s1r/simulator.py rename to tests/api_sendt_eth0_1s1r/simulator.py index 7c3e389..ae5bbea 100755 --- a/tests/simple_send0_eth0_1s1r/simulator.py +++ b/tests/api_sendt_eth0_1s1r/simulator.py @@ -11,4 +11,4 @@ s=esds.Simulator({"wlan0":{"bandwidth":B, "latency":L, "is_wired":False}, "eth0" s.create_node("sender") s.create_node("receiver") -s.run(debug=True) +s.run() diff --git a/tests/simple_sendt_wlan0_1s2r/out b/tests/api_sendt_wlan0_1s2r/out similarity index 100% rename from tests/simple_sendt_wlan0_1s2r/out rename to tests/api_sendt_wlan0_1s2r/out diff --git a/tests/simple_sendt_wlan0_1s2r/receiver.py b/tests/api_sendt_wlan0_1s2r/receiver.py similarity index 100% rename from tests/simple_sendt_wlan0_1s2r/receiver.py rename to tests/api_sendt_wlan0_1s2r/receiver.py diff --git a/tests/simple_sendt_wlan0_1s2r/sender.py b/tests/api_sendt_wlan0_1s2r/sender.py similarity index 100% rename from tests/simple_sendt_wlan0_1s2r/sender.py rename to tests/api_sendt_wlan0_1s2r/sender.py diff --git a/tests/simple_sendt_wlan0_1s2r/simulator.py b/tests/api_sendt_wlan0_1s2r/simulator.py similarity index 100% rename from tests/simple_sendt_wlan0_1s2r/simulator.py rename to tests/api_sendt_wlan0_1s2r/simulator.py diff --git a/tests/simple_wait_2n/node.py b/tests/api_wait_2n/node.py similarity index 100% rename from tests/simple_wait_2n/node.py rename to tests/api_wait_2n/node.py diff --git a/tests/simple_wait_2n/out b/tests/api_wait_2n/out similarity index 100% rename from tests/simple_wait_2n/out rename to tests/api_wait_2n/out diff --git a/tests/simple_wait_2n/simulator.py b/tests/api_wait_2n/simulator.py similarity index 100% rename from tests/simple_wait_2n/simulator.py rename to tests/api_wait_2n/simulator.py diff --git a/tests/simple_wait_end_3n/node.py b/tests/api_wait_end_3n/node.py similarity index 100% rename from tests/simple_wait_end_3n/node.py rename to tests/api_wait_end_3n/node.py diff --git a/tests/simple_wait_end_3n/out b/tests/api_wait_end_3n/out similarity index 100% rename from tests/simple_wait_end_3n/out rename to tests/api_wait_end_3n/out diff --git a/tests/simple_wait_end_3n/simulator.py b/tests/api_wait_end_3n/simulator.py similarity index 100% rename from tests/simple_wait_end_3n/simulator.py rename to tests/api_wait_end_3n/simulator.py diff --git a/tests/simple_breakpoints_auto_1n/node.py b/tests/breakpoints_auto_1n/node.py similarity index 100% rename from tests/simple_breakpoints_auto_1n/node.py rename to tests/breakpoints_auto_1n/node.py diff --git a/tests/simple_breakpoints_auto_1n/out b/tests/breakpoints_auto_1n/out similarity index 100% rename from tests/simple_breakpoints_auto_1n/out rename to tests/breakpoints_auto_1n/out diff --git a/tests/simple_breakpoints_auto_1n/simulator.py b/tests/breakpoints_auto_1n/simulator.py similarity index 100% rename from tests/simple_breakpoints_auto_1n/simulator.py rename to tests/breakpoints_auto_1n/simulator.py diff --git a/tests/simple_breakpoints_manual_1n/node.py b/tests/breakpoints_manual_1n/node.py similarity index 100% rename from tests/simple_breakpoints_manual_1n/node.py rename to tests/breakpoints_manual_1n/node.py diff --git a/tests/simple_breakpoints_manual_1n/out b/tests/breakpoints_manual_1n/out similarity index 100% rename from tests/simple_breakpoints_manual_1n/out rename to tests/breakpoints_manual_1n/out diff --git a/tests/simple_breakpoints_manual_1n/simulator.py b/tests/breakpoints_manual_1n/simulator.py similarity index 100% rename from tests/simple_breakpoints_manual_1n/simulator.py rename to tests/breakpoints_manual_1n/simulator.py diff --git a/tests/simple_breakpoints_manual_no_callback_1n/node.py b/tests/breakpoints_manual_no_callback_1n/node.py similarity index 100% rename from tests/simple_breakpoints_manual_no_callback_1n/node.py rename to tests/breakpoints_manual_no_callback_1n/node.py diff --git a/tests/simple_breakpoints_manual_no_callback_1n/out b/tests/breakpoints_manual_no_callback_1n/out similarity index 100% rename from tests/simple_breakpoints_manual_no_callback_1n/out rename to tests/breakpoints_manual_no_callback_1n/out diff --git a/tests/simple_breakpoints_manual_no_callback_1n/simulator.py b/tests/breakpoints_manual_no_callback_1n/simulator.py similarity index 100% rename from tests/simple_breakpoints_manual_no_callback_1n/simulator.py rename to tests/breakpoints_manual_no_callback_1n/simulator.py diff --git a/tests/mobility_eth0_bandwidth_2s1r/simulator.py b/tests/mobility_eth0_bandwidth_2s1r/simulator.py index ed58854..e1e6636 100755 --- a/tests/mobility_eth0_bandwidth_2s1r/simulator.py +++ b/tests/mobility_eth0_bandwidth_2s1r/simulator.py @@ -38,4 +38,4 @@ def callback(simulator): new_bw_eth0=simulator.netmat["eth0"]["bandwidth"]*2 simulator.update_network({"wlan0":{"bandwidth":new_bw_wlan0, "latency":L, "is_wired":False}, "eth0":{"bandwidth":new_bw_eth0, "latency":L, "is_wired":True}}) -s.run(breakpoints_every=1,breakpoint_callback=callback,debug=True) +s.run(breakpoints_every=1,breakpoint_callback=callback) diff --git a/tests/mobility_eth0_latency_2s1r/simulator.py b/tests/mobility_eth0_latency_2s1r/simulator.py index 05dfee8..cb4a8bb 100755 --- a/tests/mobility_eth0_latency_2s1r/simulator.py +++ b/tests/mobility_eth0_latency_2s1r/simulator.py @@ -39,4 +39,4 @@ def callback(simulator): new_lat_eth0=simulator.netmat["eth0"]["latency"]+1/2 simulator.update_network({"wlan0":{"bandwidth":B, "latency":new_lat_wlan0, "is_wired":False},"eth0":{"bandwidth":B, "latency":new_lat_eth0, "is_wired":True}}) -s.run(breakpoints_every=1,breakpoint_callback=callback,debug=True) +s.run(breakpoints_every=1,breakpoint_callback=callback) diff --git a/tests/simple_read_clock_2n/node.py b/tests/simple_read_clock_2n/node.py deleted file mode 100644 index 79a0b78..0000000 --- a/tests/simple_read_clock_2n/node.py +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env python - -def execute(api): - api.log("Clock is {}s".format(api.read("clock"))) - api.wait(5698.1256) - api.log("Clock is {}s".format(api.read("clock"))) - api.log("Clock is {}s".format(api.read("clock"))) diff --git a/tests/simple_read_eth0_ncom_2s1r/receiver.py b/tests/simple_read_eth0_ncom_2s1r/receiver.py deleted file mode 100644 index e2d317b..0000000 --- a/tests/simple_read_eth0_ncom_2s1r/receiver.py +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env python - -def execute(api): - api.log("eth0 is {}".format(api.read("ncom_eth0"))) - api.wait(624) - api.log("eth0 is {}".format(api.read("ncom_eth0"))) - api.wait(624) - # Now we are at 624*2=1248 (first sender start a communication) - api.wait(1) # Let the communication starts - api.log("eth0 is {}".format(api.read("ncom_eth0"))) # Should print 1 - api.wait(1) # Now second sender start a communication - api.log("eth0 is {}".format(api.read("ncom_eth0"))) # Should print 2 diff --git a/tests/simple_read_wlan0_ncom_2s1r/receiver.py b/tests/simple_read_wlan0_ncom_2s1r/receiver.py deleted file mode 100644 index d41304e..0000000 --- a/tests/simple_read_wlan0_ncom_2s1r/receiver.py +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env python - -def execute(api): - api.log("wlan0 is {}".format(api.read("ncom_wlan0"))) - api.wait(624) - api.log("wlan0 is {}".format(api.read("ncom_wlan0"))) - api.wait(624) - # Now we are at 624*2=1248 (first sender start a communication) - api.wait(1) # Let the communication starts - api.log("wlan0 is {}".format(api.read("ncom_wlan0"))) # Should print 1 - api.wait(1) # Second sender start a communication - api.log("wlan0 is {}".format(api.read("ncom_wlan0"))) # Should print 2