mirror of
https://gitlab.com/manzerbredes/esds.git
synced 2025-04-19 12:09:44 +00:00
Debug and improve tests
This commit is contained in:
parent
b3cbb52f00
commit
17bfda379b
25 changed files with 376 additions and 21 deletions
4
tests/breakpoints_auto_1n/callback.py
Executable file
4
tests/breakpoints_auto_1n/callback.py
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
def callback(simulator):
|
||||
simulator.log("Hello Callback!")
|
22
tests/breakpoints_auto_1n/platform.yaml
Normal file
22
tests/breakpoints_auto_1n/platform.yaml
Normal file
|
@ -0,0 +1,22 @@
|
|||
general:
|
||||
breakpoints_every: 3.3
|
||||
breakpoints_callback:
|
||||
file: "callback.py"
|
||||
callback: "callback"
|
||||
|
||||
nodes:
|
||||
count: 2
|
||||
implementations:
|
||||
- all node.py
|
||||
|
||||
interfaces:
|
||||
wlan0:
|
||||
type: "wireless"
|
||||
links:
|
||||
- all 2bps 0s all
|
||||
txperfs:
|
||||
- all 2bps 0s
|
||||
eth0:
|
||||
type: "wired"
|
||||
links:
|
||||
- all 2bps 0s all
|
|
@ -1,18 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# Load ESDS
|
||||
import esds
|
||||
import numpy as np
|
||||
|
||||
n=2
|
||||
B=np.full((2,2),n)
|
||||
L=np.full((2,2),0)
|
||||
s=esds.Simulator({"wlan0":{"bandwidth":B, "latency":L, "is_wired":False}, "eth0":{"bandwidth":B, "latency":L, "is_wired":True}})
|
||||
|
||||
s.create_node("node")
|
||||
s.create_node("node")
|
||||
|
||||
def callback(simulator):
|
||||
simulator.log("Hello Callback!")
|
||||
|
||||
s.run(breakpoints_every=3.3,breakpoint_callback=callback)
|
Loading…
Add table
Add a link
Reference in a new issue