mirror of
https://gitlab.com/manzerbredes/esds.git
synced 2025-06-06 13:27:39 +00:00
Make one sharing matrix per wired interface
This commit is contained in:
parent
3fef2bbf4b
commit
d2a5ea6f53
26 changed files with 50 additions and 45 deletions
|
@ -29,7 +29,7 @@ import numpy as np
|
|||
|
||||
B=np.full((3,3),8)
|
||||
L=np.full((3,3),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("sender")
|
||||
|
@ -39,6 +39,6 @@ def callback(simulator):
|
|||
simulator.log("Network update!")
|
||||
new_lat_wlan0=simulator.netmat["wlan0"]["latency"]+1/2
|
||||
new_lat_eth0=simulator.netmat["eth0"]["latency"]+1/2
|
||||
simulator.update_network({"wlan0":{"bandwidth":B, "latency":new_lat_wlan0},"eth0":{"bandwidth":B, "latency":new_lat_eth0}})
|
||||
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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue