From: Alina Quereilhac Date: Thu, 29 Mar 2012 11:50:37 +0000 (+0200) Subject: Supporting version 3.13+ of ns for the ns-3 testbed. X-Git-Tag: nepi-3.0.0~163^2~30 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=5e69f995d7ea180486c6059fe449dac6b04cf23a;p=nepi.git Supporting version 3.13+ of ns for the ns-3 testbed. --- diff --git a/src/nepi/testbeds/ns3/execute.py b/src/nepi/testbeds/ns3/execute.py index 6faf6da1..5777f83c 100644 --- a/src/nepi/testbeds/ns3/execute.py +++ b/src/nepi/testbeds/ns3/execute.py @@ -155,7 +155,7 @@ class TestbedController(testbed_impl.TestbedController): TypeId = self.ns3.TypeId() typeid = TypeId.LookupByName(factory_id) - info = TypeId.AttributeInfo() + info = TypeId.AttributeInformation() if not typeid or not typeid.LookupAttributeByName(name, info): raise AttributeError("Invalid attribute %s for element type %d" % \ (name, guid)) @@ -219,7 +219,7 @@ class TestbedController(testbed_impl.TestbedController): def _schedule_event(self, condition, func, *args): """Schedules event on running experiment""" - def execute_event(condition, has_event_occurred, func, *args): + def execute_event(contextId, condition, has_event_occurred, func, *args): # exec func try: func(*args) @@ -291,7 +291,7 @@ class TestbedController(testbed_impl.TestbedController): factory_id = self._create[guid] TypeId = self.ns3.TypeId() typeid = TypeId.LookupByName(factory_id) - info = TypeId.AttributeInfo() + info = TypeId.AttributeInformation() if not typeid.LookupAttributeByName(name, info): raise RuntimeError("Attribute %s doesn't belong to element %s" \ % (name, factory_id)) @@ -336,7 +336,7 @@ class TestbedController(testbed_impl.TestbedController): TypeId = self.ns3.TypeId() typeid = TypeId.LookupByName(factory_id) for name, value in params.iteritems(): - info = self.ns3.TypeId.AttributeInfo() + info = self.ns3.TypeId.AttributeInformation() found = typeid.LookupAttributeByName(name, info) if found and \ (info.flags & TypeId.ATTR_CONSTRUCT == TypeId.ATTR_CONSTRUCT): diff --git a/src/nepi/testbeds/ns3/ns3_bindings_import.py b/src/nepi/testbeds/ns3/ns3_bindings_import.py index ae9e7007..3b154e44 100644 --- a/src/nepi/testbeds/ns3/ns3_bindings_import.py +++ b/src/nepi/testbeds/ns3/ns3_bindings_import.py @@ -13,7 +13,7 @@ from ns.nix_vector_routing import * from ns.olsr import * from ns.aodv import * from ns.dsdv import * -from ns.click import * +#from ns.click import * from ns.mobility import * from ns.wifi import * from ns.netanim import * @@ -28,6 +28,6 @@ from ns.mpi import * from ns.topology_read import * from ns.energy import * from ns.tools import * -from ns.visualizer import * +#from ns.visualizer import * from ns.point_to_point_layout import * from ns.fd_net_device import *