Make one sharing matrix per wired interface

This commit is contained in:
Loic Guegan 2022-06-10 21:58:15 +02:00
parent 3fef2bbf4b
commit d2a5ea6f53
26 changed files with 50 additions and 45 deletions
tests/mobility_eth0_bandwidth_1s1r

View file

@ -26,7 +26,7 @@ import numpy as np
B=np.full((2,2),8)
L=np.full((2,2),0)
s=esds.Simulator({"wlan0":{"bandwidth":B, "latency":L},"eth0":{"bandwidth":B, "latency":L}})
s=esds.Simulator({"wlan0":{"bandwidth":B, "latency":L, "is_wired":False}, "eth0":{"bandwidth":B, "latency":L, "is_wired":True}})
s.create_node("sender")
s.create_node("receiver")
@ -35,6 +35,6 @@ def callback(simulator):
simulator.log("Network update!")
new_bw_wlan0=simulator.netmat["wlan0"]["bandwidth"]*2
new_bw_eth0=simulator.netmat["eth0"]["bandwidth"]*2
simulator.update_network({"wlan0":{"bandwidth":new_bw_wlan0, "latency":L},"eth0":{"bandwidth":new_bw_eth0, "latency":L}})
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/2,breakpoint_callback=callback)