Commit 33eac66e authored by Antoine Kaufmann's avatar Antoine Kaufmann Committed by Antoine Kaufmann
Browse files

experiments: add wait flag to network simulators as well

Useful for running ns-3 only simulations.
parent fba7164d
...@@ -195,6 +195,7 @@ class NetSim(Simulator): ...@@ -195,6 +195,7 @@ class NetSim(Simulator):
self.hosts_direct: list[HostSim] = [] self.hosts_direct: list[HostSim] = []
self.net_listen: list[NetSim] = [] self.net_listen: list[NetSim] = []
self.net_connect: list[NetSim] = [] self.net_connect: list[NetSim] = []
self.wait = False
def full_name(self) -> str: def full_name(self) -> str:
return 'net.' + self.name return 'net.' + self.name
...@@ -229,6 +230,9 @@ class NetSim(Simulator): ...@@ -229,6 +230,9 @@ class NetSim(Simulator):
def sockets_wait(self, env: ExpEnv) -> tp.List[str]: def sockets_wait(self, env: ExpEnv) -> tp.List[str]:
return [s for (_, s) in self.listen_sockets(env)] return [s for (_, s) in self.listen_sockets(env)]
def wait_terminate(self) -> Bool:
return self.wait
# FIXME: Class hierarchy is broken here as an ugly hack # FIXME: Class hierarchy is broken here as an ugly hack
class MemDevSim(NICSim): class MemDevSim(NICSim):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment