Supporting version 3.13+ of ns for the ns-3 testbed.
authorAlina Quereilhac <alina.quereilhac@inria.fr>
Thu, 29 Mar 2012 11:50:37 +0000 (13:50 +0200)
committerAlina Quereilhac <alina.quereilhac@inria.fr>
Thu, 29 Mar 2012 11:50:37 +0000 (13:50 +0200)
src/nepi/testbeds/ns3/execute.py
src/nepi/testbeds/ns3/ns3_bindings_import.py

index 6faf6da..5777f83 100644 (file)
@@ -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):
index ae9e700..3b154e4 100644 (file)
@@ -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 *