### DEBUG
self.logger.debug("FACTORY %s( %s )" % (type_name, str(kwargs)))
+ ### DUMP
self.debuger.dump_factory(uuid, type_name, kwargs)
- ########
factory = self.ns3.ObjectFactory()
factory.SetTypeId(type_name)
### DEBUG
self.logger.debug("RET FACTORY ( uuid %s ) %s = %s( %s )" % (
str(uuid), str(obj), type_name, str(kwargs)))
- ########
return uuid
### DEBUG
self.logger.debug("CREATE %s( %s )" % (clazzname, str(args)))
+ ### DUMP
self.debuger.dump_create(uuid, clazzname, args)
- ########
clazz = getattr(self.ns3, clazzname)
### DEBUG
self.logger.debug("RET CREATE ( uuid %s ) %s = %s( %s )" % (str(uuid),
str(obj), clazzname, str(args)))
- ########
return uuid
elif operation == "isAppRunning":
result = self._is_app_running(uuid)
else:
- newuuid = self.make_uuid()
-
- ### DEBUG
- self.debuger.dump_invoke(newuuid, uuid, operation, args, kwargs)
- ########
if operation == "addStaticRoute":
result = self._add_static_route(uuid, *args)
+
+ ### DUMP
+ self.debuger.dump_invoke(result, uuid, operation, args, kwargs)
elif operation == "retrieveObject":
result = self._retrieve_object(uuid, *args, **kwargs)
+
+ ### DUMP
+ self.debuger.dump_invoke(result, uuid, operation, args, kwargs)
else:
+ newuuid = self.make_uuid()
+
+ ### DUMP
+ self.debuger.dump_invoke(newuuid, uuid, operation, args, kwargs)
+
if uuid.startswith(SINGLETON):
obj = self._singleton(uuid)
else:
### DEBUG
self.logger.debug("SET %s %s %s" % (uuid, name, str(value)))
+ ### DUMP
self.debuger.dump_set(uuid, name, value)
- ########
obj = self.get_object(uuid)
type_name = obj.GetInstanceTypeId().GetName()
### DEBUG
self.logger.debug("RET SET %s = %s -> set(%s, %s)" % (str(value), uuid, name,
str(value)))
- ########
return value
### DEBUG
self.logger.debug("GET %s %s" % (uuid, name))
+ ### DUMP
self.debuger.dump_get(uuid, name)
- ########
obj = self.get_object(uuid)
type_name = obj.GetInstanceTypeId().GetName()
### DEBUG
self.logger.debug("RET GET %s = %s -> get(%s)" % (str(result), uuid, name))
- ########
return result
def start(self):
- ### DEBUG
+ ### DUMP
self.debuger.dump_start()
- ########
# Launch the simulator thread and Start the
# simulator in that thread
### DEBUG
self.logger.debug("START")
- ########
def stop(self, time = None):
- ### DEBUG
+ ### DUMP
self.debuger.dump_stop(time=time)
- ########
if time is None:
self.ns3.Simulator.Stop()
### DEBUG
self.logger.debug("STOP time=%s" % str(time))
- ########
def shutdown(self):
- ### DEBUG
+ ### DUMP
self.debuger.dump_shutdown()
- ########
while not self.ns3.Simulator.IsFinished():
#self.logger.debug("Waiting for simulation to finish")
### DEBUG
self.logger.debug("SHUTDOWN")
- ########
def _simulator_run(self, condition):
# Run simulation