type = Types.Bool,
flags = Flags.Design)
+ enable_dump = Attribute("enableDump",
+ "Enable dumping the remote executed ns-3 commands to a script "
+ "in order to later reproduce and debug the experiment",
+ type = Types.Bool,
+ default = False,
+ flags = Flags.Design)
+
build_mode = Attribute("buildMode",
"Mode used to build ns-3 with waf. One if: debug, release, oprimized ",
default = "optimized",
cls._register_attribute(sched_type)
cls._register_attribute(check_sum)
cls._register_attribute(ns_log)
+ cls._register_attribute(enable_dump)
cls._register_attribute(verbose)
cls._register_attribute(build_mode)
cls._register_attribute(ns3_version)
os.path.join(self.node.src_dir, "ns3wrapper", "ns3wrapper.py"),
overwrite = False)
+ # upload ns3 wrapper debug python script
+ ns3_wrapper_debug = os.path.join(os.path.dirname(__file__), "..", "..", "ns3",
+ "ns3wrapper_debug.py")
+
+ self.node.upload(ns3_wrapper_debug,
+ os.path.join(self.node.src_dir, "ns3wrapper", "ns3wrapper_debug.py"),
+ overwrite = False)
+
# upload ns3_server python script
ns3_server = os.path.join(os.path.dirname(__file__), "..", "..", "ns3",
"ns3server.py")
self._client.start()
- # Wait until the Simulation is actually started...
+ """
+ # XXX: IS THIS REALLY NEEDED??
+ # Wait until the Simulation is actually started...
+
is_running = False
for i in xrange(1000):
is_running = self.invoke(SIMULATOR_UUID, "isRunning")
msg = " Simulation did not start"
self.error(msg)
raise RuntimeError
+ """
self.set_started()
else:
if ns_log:
command.append("-L '%s'" % ns_log)
+ if self.get("enableDump"):
+ command.append("-D")
+
if self.get("verbose"):
command.append("-v")