diff options
| author | Loïc Guégan <manzerbredes@mailbox.org> | 2026-02-25 11:54:50 +0100 |
|---|---|---|
| committer | Loïc Guégan <manzerbredes@mailbox.org> | 2026-02-25 11:54:50 +0100 |
| commit | fc3232912367958de38109ca3e652a6897fa0997 (patch) | |
| tree | de0d1839e857c2b17c9afdeee83c8abc1b5ec840 | |
| parent | 897f208767c5a877939bf56b40df588f9a2c7cee (diff) | |
| -rw-r--r-- | esds/debug.py | 11 | ||||
| -rw-r--r-- | example/platform.yaml | 10 |
2 files changed, 11 insertions, 10 deletions
diff --git a/esds/debug.py b/esds/debug.py index 5423461..e376a77 100644 --- a/esds/debug.py +++ b/esds/debug.py @@ -37,7 +37,7 @@ class Debug: def get_network_interfaces(self): data=dict() for interface in self.simulator.netmat: - data[interface]={ + data[interface]={ "is_wired":self.simulator.netmat[interface]["is_wired"], "bandwidth": self.simulator.netmat[interface]["bandwidth"].tolist(), "latency": self.simulator.netmat[interface]["latency"].tolist(), @@ -46,7 +46,7 @@ class Debug: data[interface]["sharing"]=self.simulator.sharing[interface].tolist() return(data) - + def get_events_list(self): events=list() for event_numpy in self.simulator.events: @@ -72,7 +72,7 @@ class Debug: elif event_id == 4: final_content={ "node": content - } + } event={ "id": event_id, "ts": event_numpy[1], @@ -81,12 +81,13 @@ class Debug: } events.append(event) return(events) - + def get_nodes_infos(self): nodes_infos=list() for node in self.simulator.nodes: node_info = { - "turned_on": node["turned_on"] + "turned_on": node["turned_on"], + "interfaces": list(node["interfaces"].keys()) } nodes_infos.append(node_info) return(nodes_infos) diff --git a/example/platform.yaml b/example/platform.yaml index 7632e50..589ef62 100644 --- a/example/platform.yaml +++ b/example/platform.yaml @@ -3,14 +3,14 @@ general: # List of timestamps at which the simulator should break # and call the callback function (cf. the breakpoints_callback entry) breakpoints: [] - # Same as breakpoints but simulator will break every x second(s) + # Same as breakpoints but simulator will break every x second(s) breakpoints_every: 1000 # Define the callback to call when the simulator reach a breakpoint breakpoints_callback: file: "platform_callback.py" callback: "callback" # Turn on/off the debugging mode of esds - debug: off + debug: on # Debug output file (default is ./esds.debug) debug_file: "./esds.debug" # Should esds take into account interferences @@ -21,7 +21,7 @@ nodes: # Number of nodes to simulate count: 5 # List of files used as implementation for each node - # Example: + # Example: # - 0,1,2 sender.py # - 3-4 receiver.py # Note that @ will be replaced by the last node id example for 5 nodes: @@ -60,5 +60,5 @@ interfaces: eth0: type: "wired" nodes: all - links: - - all 5Mbps 10s all
\ No newline at end of file + links: + - all 5Mbps 10s all |
