Fixes ns-3/DCE
authorAlina Quereilhac <alina.quereilhac@inria.fr>
Mon, 26 May 2014 09:26:07 +0000 (11:26 +0200)
committerAlina Quereilhac <alina.quereilhac@inria.fr>
Mon, 26 May 2014 09:26:07 +0000 (11:26 +0200)
38 files changed:
src/nepi/resources/linux/ns3/ns3client.py
src/nepi/resources/linux/ns3/ns3dceapplication.py
src/nepi/resources/linux/ns3/ns3simulation.py
src/nepi/resources/ns3/classes/aarf_wifi_manager.py
src/nepi/resources/ns3/classes/aarfcd_wifi_manager.py
src/nepi/resources/ns3/classes/amrr_wifi_manager.py
src/nepi/resources/ns3/classes/arf_wifi_manager.py
src/nepi/resources/ns3/classes/binary_error_model.py [new file with mode: 0644]
src/nepi/resources/ns3/classes/binary_error_sixlow_model.py [new file with mode: 0644]
src/nepi/resources/ns3/classes/cara_wifi_manager.py
src/nepi/resources/ns3/classes/constant_rate_wifi_manager.py
src/nepi/resources/ns3/classes/error_channel_sixlow.py [new file with mode: 0644]
src/nepi/resources/ns3/classes/friis_propagation_loss_model.py
src/nepi/resources/ns3/classes/ideal_wifi_manager.py
src/nepi/resources/ns3/classes/itu_r1411los_propagation_loss_model.py [new file with mode: 0644]
src/nepi/resources/ns3/classes/itu_r1411nlos_over_rooftop_propagation_loss_model.py [new file with mode: 0644]
src/nepi/resources/ns3/classes/kun2600mhz_propagation_loss_model.py [new file with mode: 0644]
src/nepi/resources/ns3/classes/lte_enb_net_device.py
src/nepi/resources/ns3/classes/lte_ue_net_device.py [new file with mode: 0644]
src/nepi/resources/ns3/classes/minstrel_wifi_manager.py
src/nepi/resources/ns3/classes/ocb_wifi_mac.py [new file with mode: 0644]
src/nepi/resources/ns3/classes/okumura_hata_propagation_loss_model.py [new file with mode: 0644]
src/nepi/resources/ns3/classes/onoe_wifi_manager.py
src/nepi/resources/ns3/classes/ping6.py
src/nepi/resources/ns3/classes/rraa_wifi_manager.py
src/nepi/resources/ns3/classes/six_low_pan_net_device.py [new file with mode: 0644]
src/nepi/resources/ns3/classes/udp_trace_client.py
src/nepi/resources/ns3/classes/wifi_net_device.py
src/nepi/resources/ns3/classes/yans_wifi_channel.py
src/nepi/resources/ns3/ns3base.py
src/nepi/resources/ns3/ns3ccndceapplication.py [new file with mode: 0644]
src/nepi/resources/ns3/ns3dceapplication.py
src/nepi/resources/ns3/ns3netdevice.py
src/nepi/resources/ns3/ns3queue.py
src/nepi/resources/ns3/ns3server.py
src/nepi/resources/ns3/resource_manager_generator.py
test/resources/linux/ns3/ns3dceapplication.py
test/resources/linux/ns3/ns3simulation.py

index 882c1f3..2d98a1b 100644 (file)
@@ -70,11 +70,12 @@ class LinuxNS3Client(NS3Client):
                     "socket_addr": self.simulation.remote_socket,
                     }
 
-            (reply, err), proc = self.simulation.node.execute(command)
+            (reply, err), proc = self.simulation.node.execute(command) 
 
             if (err and proc.poll()) or reply.strip() == "":
-                msg = " Couldn't connect to remote socket %s" % (
-                        self.simulation.remote_socket)
+                msg = (" Couldn't connect to remote socket %s - REPLY: %s "
+                      "- ERROR: %s ") % (
+                        self.simulation.remote_socket, reply, err)
                 self.simulation.error(msg, reply, err)
                 raise RuntimeError(msg)
                    
index ca32b6f..8d197b9 100644 (file)
@@ -45,34 +45,9 @@ class NS3LinuxDceApplication(NS3BaseDceApplication):
                 "Space-separated list of packages required to run the application",
                 flags = Flags.Design)
 
-        files = Attribute("files", 
-                "Semi-colon separated list of 'key=value' pairs to set as "
-                "DCE files (AddFile). The key should be a path to a local file "
-                "and the key is the path to be set in DCE for that file" ,
-                flags = Flags.Design)
-
-        stdinfile = Attribute("stdinFile", 
-                "File to set as StdinFile. The value shoudl be either an empty "
-                "or a path to a local file ",
-                flags = Flags.Design)
-
-        starttime = Attribute("StartTime",
-            "Time at which the application will start",
-            default = "+0.0ns",  
-            flags = Flags.Reserved | Flags.Construct)
-
-        stoptime = Attribute("StopTime",
-            "Time at which the application will stop",
-            default = "+0.0ns",  
-            flags = Flags.Reserved | Flags.Construct)
-
         cls._register_attribute(sources)
         cls._register_attribute(build)
         cls._register_attribute(depends)
-        cls._register_attribute(files)
-        cls._register_attribute(stoptime)
-        cls._register_attribute(starttime)
-        cls._register_attribute(stdinfile)
 
     def _instantiate_object(self):
         command = []
@@ -91,29 +66,6 @@ class NS3LinuxDceApplication(NS3BaseDceApplication):
             if scmd:
                 command.append(scmd)
                 
-        # Upload files to the remote machine. These files will 
-        # be added to the DceApplication by invoking dce.AddFile()
-        files = self.get("files") or ""
-        if files:
-            upfiles = []
-            for files in map(str.strip, files.split(";")):
-                localpath, dcepath = env.split("=")
-                upfiles.append(localpath)
-
-            if upfiles:
-                fcmd = self.siumlation.upload_files(files = upfiles)
-                if fcmd:
-                    command.append(fcmd)
-
-        # Upload files to the remote machine. These files will 
-        # be added to the DceApplication by invoking dce.AddFile()
-        stdinfile = self.get("stdinFile")
-        if stdinfile and stdinfile != "":
-            stdincmd = self.siumlation.upload_files(files = stdinfile)
-            if stdincmd:
-                command.append(stdincmd)
-
-
         # Upload instructions to build the binary
         build = self.get("build")
         if build:
index 9e1ee51..e026bb8 100644 (file)
@@ -32,6 +32,9 @@ import os
 import time
 import threading
 
+## TODO: Clean up DCE part. All that is DCE specific should go
+##       in the linux ns3dceapplication.py
+
 @clsinit_copy
 class LinuxNS3Simulation(LinuxApplication, NS3Simulation):
     _rtype = "LinuxNS3Simulation"
index d737f3a..d78d93d 100644 (file)
@@ -110,7 +110,7 @@ class NS3AarfWifiManager(NS3BaseWifiRemoteStationManager):
         cls._register_attribute(attr_maxslrc)
 
         attr_rtsctsthreshold = Attribute("RtsCtsThreshold",
-            "If  the size of the data packet + LLC header + MAC header + FCS trailer is bigger than this value, we use an RTS/CTS handshake before sending the data, as per IEEE Std. 802.11-2007, Section 9.2.6. This value will not have any effect on some rate control algorithms.",
+            "If  the size of the data packet + LLC header + MAC header + FCS trailer is bigger than this value, we use an RTS/CTS handshake before sending the data, as per IEEE Std. 802.11-2012, Section 9.3.5. This value will not have any effect on some rate control algorithms.",
             type = Types.Integer,
             default = "2346",  
             allowed = None,
@@ -120,7 +120,7 @@ class NS3AarfWifiManager(NS3BaseWifiRemoteStationManager):
         cls._register_attribute(attr_rtsctsthreshold)
 
         attr_fragmentationthreshold = Attribute("FragmentationThreshold",
-            "If the size of the data packet + LLC header + MAC header + FCS trailer is biggerthan this value, we fragment it such that the size of the fragments are equal or smaller than this value, as per IEEE Std. 802.11-2007, Section 9.4. This value will not have any effect on some rate control algorithms.",
+            "If the size of the data packet + LLC header + MAC header + FCS trailer is biggerthan this value, we fragment it such that the size of the fragments are equal or smaller than this value, as per IEEE Std. 802.11-2012, Section 9.5. This value will not have any effect on some rate control algorithms.",
             type = Types.Integer,
             default = "2346",  
             allowed = None,
index 625662f..57aa02f 100644 (file)
@@ -150,7 +150,7 @@ class NS3AarfcdWifiManager(NS3BaseWifiRemoteStationManager):
         cls._register_attribute(attr_maxslrc)
 
         attr_rtsctsthreshold = Attribute("RtsCtsThreshold",
-            "If  the size of the data packet + LLC header + MAC header + FCS trailer is bigger than this value, we use an RTS/CTS handshake before sending the data, as per IEEE Std. 802.11-2007, Section 9.2.6. This value will not have any effect on some rate control algorithms.",
+            "If  the size of the data packet + LLC header + MAC header + FCS trailer is bigger than this value, we use an RTS/CTS handshake before sending the data, as per IEEE Std. 802.11-2012, Section 9.3.5. This value will not have any effect on some rate control algorithms.",
             type = Types.Integer,
             default = "2346",  
             allowed = None,
@@ -160,7 +160,7 @@ class NS3AarfcdWifiManager(NS3BaseWifiRemoteStationManager):
         cls._register_attribute(attr_rtsctsthreshold)
 
         attr_fragmentationthreshold = Attribute("FragmentationThreshold",
-            "If the size of the data packet + LLC header + MAC header + FCS trailer is biggerthan this value, we fragment it such that the size of the fragments are equal or smaller than this value, as per IEEE Std. 802.11-2007, Section 9.4. This value will not have any effect on some rate control algorithms.",
+            "If the size of the data packet + LLC header + MAC header + FCS trailer is biggerthan this value, we fragment it such that the size of the fragments are equal or smaller than this value, as per IEEE Std. 802.11-2012, Section 9.5. This value will not have any effect on some rate control algorithms.",
             type = Types.Integer,
             default = "2346",  
             allowed = None,
index dfb13f4..99c1f9a 100644 (file)
@@ -110,7 +110,7 @@ class NS3AmrrWifiManager(NS3BaseWifiRemoteStationManager):
         cls._register_attribute(attr_maxslrc)
 
         attr_rtsctsthreshold = Attribute("RtsCtsThreshold",
-            "If  the size of the data packet + LLC header + MAC header + FCS trailer is bigger than this value, we use an RTS/CTS handshake before sending the data, as per IEEE Std. 802.11-2007, Section 9.2.6. This value will not have any effect on some rate control algorithms.",
+            "If  the size of the data packet + LLC header + MAC header + FCS trailer is bigger than this value, we use an RTS/CTS handshake before sending the data, as per IEEE Std. 802.11-2012, Section 9.3.5. This value will not have any effect on some rate control algorithms.",
             type = Types.Integer,
             default = "2346",  
             allowed = None,
@@ -120,7 +120,7 @@ class NS3AmrrWifiManager(NS3BaseWifiRemoteStationManager):
         cls._register_attribute(attr_rtsctsthreshold)
 
         attr_fragmentationthreshold = Attribute("FragmentationThreshold",
-            "If the size of the data packet + LLC header + MAC header + FCS trailer is biggerthan this value, we fragment it such that the size of the fragments are equal or smaller than this value, as per IEEE Std. 802.11-2007, Section 9.4. This value will not have any effect on some rate control algorithms.",
+            "If the size of the data packet + LLC header + MAC header + FCS trailer is biggerthan this value, we fragment it such that the size of the fragments are equal or smaller than this value, as per IEEE Std. 802.11-2012, Section 9.5. This value will not have any effect on some rate control algorithms.",
             type = Types.Integer,
             default = "2346",  
             allowed = None,
index 9714846..577d091 100644 (file)
@@ -80,7 +80,7 @@ class NS3ArfWifiManager(NS3BaseWifiRemoteStationManager):
         cls._register_attribute(attr_maxslrc)
 
         attr_rtsctsthreshold = Attribute("RtsCtsThreshold",
-            "If  the size of the data packet + LLC header + MAC header + FCS trailer is bigger than this value, we use an RTS/CTS handshake before sending the data, as per IEEE Std. 802.11-2007, Section 9.2.6. This value will not have any effect on some rate control algorithms.",
+            "If  the size of the data packet + LLC header + MAC header + FCS trailer is bigger than this value, we use an RTS/CTS handshake before sending the data, as per IEEE Std. 802.11-2012, Section 9.3.5. This value will not have any effect on some rate control algorithms.",
             type = Types.Integer,
             default = "2346",  
             allowed = None,
@@ -90,7 +90,7 @@ class NS3ArfWifiManager(NS3BaseWifiRemoteStationManager):
         cls._register_attribute(attr_rtsctsthreshold)
 
         attr_fragmentationthreshold = Attribute("FragmentationThreshold",
-            "If the size of the data packet + LLC header + MAC header + FCS trailer is biggerthan this value, we fragment it such that the size of the fragments are equal or smaller than this value, as per IEEE Std. 802.11-2007, Section 9.4. This value will not have any effect on some rate control algorithms.",
+            "If the size of the data packet + LLC header + MAC header + FCS trailer is biggerthan this value, we fragment it such that the size of the fragments are equal or smaller than this value, as per IEEE Std. 802.11-2012, Section 9.5. This value will not have any effect on some rate control algorithms.",
             type = Types.Integer,
             default = "2346",  
             allowed = None,
diff --git a/src/nepi/resources/ns3/classes/binary_error_model.py b/src/nepi/resources/ns3/classes/binary_error_model.py
new file mode 100644 (file)
index 0000000..9b6b2b8
--- /dev/null
@@ -0,0 +1,50 @@
+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState, reschedule_delay
+from nepi.resources.ns3.ns3errormodel import NS3BaseErrorModel 
+
+@clsinit_copy
+class NS3BinaryErrorModel(NS3BaseErrorModel):
+    _rtype = "ns3::BinaryErrorModel"
+
+    @classmethod
+    def _register_attributes(cls):
+        
+        attr_isenabled = Attribute("IsEnabled",
+            "Whether this ErrorModel is enabled or not.",
+            type = Types.Bool,
+            default = "True",  
+            allowed = None,
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_isenabled)
+
+
+
+    @classmethod
+    def _register_traces(cls):
+        pass
+
+    def __init__(self, ec, guid):
+        super(NS3BinaryErrorModel, self).__init__(ec, guid)
+        self._home = "ns3-binary-error-model-%s" % self.guid
diff --git a/src/nepi/resources/ns3/classes/binary_error_sixlow_model.py b/src/nepi/resources/ns3/classes/binary_error_sixlow_model.py
new file mode 100644 (file)
index 0000000..ba3f241
--- /dev/null
@@ -0,0 +1,50 @@
+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState, reschedule_delay
+from nepi.resources.ns3.ns3errormodel import NS3BaseErrorModel 
+
+@clsinit_copy
+class NS3BinaryErrorSixlowModel(NS3BaseErrorModel):
+    _rtype = "ns3::BinaryErrorSixlowModel"
+
+    @classmethod
+    def _register_attributes(cls):
+        
+        attr_isenabled = Attribute("IsEnabled",
+            "Whether this ErrorModel is enabled or not.",
+            type = Types.Bool,
+            default = "True",  
+            allowed = None,
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_isenabled)
+
+
+
+    @classmethod
+    def _register_traces(cls):
+        pass
+
+    def __init__(self, ec, guid):
+        super(NS3BinaryErrorSixlowModel, self).__init__(ec, guid)
+        self._home = "ns3-binary-error-sixlow-model-%s" % self.guid
index 8f336f1..35df255 100644 (file)
@@ -100,7 +100,7 @@ class NS3CaraWifiManager(NS3BaseWifiRemoteStationManager):
         cls._register_attribute(attr_maxslrc)
 
         attr_rtsctsthreshold = Attribute("RtsCtsThreshold",
-            "If  the size of the data packet + LLC header + MAC header + FCS trailer is bigger than this value, we use an RTS/CTS handshake before sending the data, as per IEEE Std. 802.11-2007, Section 9.2.6. This value will not have any effect on some rate control algorithms.",
+            "If  the size of the data packet + LLC header + MAC header + FCS trailer is bigger than this value, we use an RTS/CTS handshake before sending the data, as per IEEE Std. 802.11-2012, Section 9.3.5. This value will not have any effect on some rate control algorithms.",
             type = Types.Integer,
             default = "2346",  
             allowed = None,
@@ -110,7 +110,7 @@ class NS3CaraWifiManager(NS3BaseWifiRemoteStationManager):
         cls._register_attribute(attr_rtsctsthreshold)
 
         attr_fragmentationthreshold = Attribute("FragmentationThreshold",
-            "If the size of the data packet + LLC header + MAC header + FCS trailer is biggerthan this value, we fragment it such that the size of the fragments are equal or smaller than this value, as per IEEE Std. 802.11-2007, Section 9.4. This value will not have any effect on some rate control algorithms.",
+            "If the size of the data packet + LLC header + MAC header + FCS trailer is biggerthan this value, we fragment it such that the size of the fragments are equal or smaller than this value, as per IEEE Std. 802.11-2012, Section 9.5. This value will not have any effect on some rate control algorithms.",
             type = Types.Integer,
             default = "2346",  
             allowed = None,
index decba32..7d81a74 100644 (file)
@@ -80,7 +80,7 @@ class NS3ConstantRateWifiManager(NS3BaseWifiRemoteStationManager):
         cls._register_attribute(attr_maxslrc)
 
         attr_rtsctsthreshold = Attribute("RtsCtsThreshold",
-            "If  the size of the data packet + LLC header + MAC header + FCS trailer is bigger than this value, we use an RTS/CTS handshake before sending the data, as per IEEE Std. 802.11-2007, Section 9.2.6. This value will not have any effect on some rate control algorithms.",
+            "If  the size of the data packet + LLC header + MAC header + FCS trailer is bigger than this value, we use an RTS/CTS handshake before sending the data, as per IEEE Std. 802.11-2012, Section 9.3.5. This value will not have any effect on some rate control algorithms.",
             type = Types.Integer,
             default = "2346",  
             allowed = None,
@@ -90,7 +90,7 @@ class NS3ConstantRateWifiManager(NS3BaseWifiRemoteStationManager):
         cls._register_attribute(attr_rtsctsthreshold)
 
         attr_fragmentationthreshold = Attribute("FragmentationThreshold",
-            "If the size of the data packet + LLC header + MAC header + FCS trailer is biggerthan this value, we fragment it such that the size of the fragments are equal or smaller than this value, as per IEEE Std. 802.11-2007, Section 9.4. This value will not have any effect on some rate control algorithms.",
+            "If the size of the data packet + LLC header + MAC header + FCS trailer is biggerthan this value, we fragment it such that the size of the fragments are equal or smaller than this value, as per IEEE Std. 802.11-2012, Section 9.5. This value will not have any effect on some rate control algorithms.",
             type = Types.Integer,
             default = "2346",  
             allowed = None,
diff --git a/src/nepi/resources/ns3/classes/error_channel_sixlow.py b/src/nepi/resources/ns3/classes/error_channel_sixlow.py
new file mode 100644 (file)
index 0000000..3e67915
--- /dev/null
@@ -0,0 +1,50 @@
+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState, reschedule_delay
+from nepi.resources.ns3.ns3channel import NS3BaseChannel 
+
+@clsinit_copy
+class NS3ErrorChannelSixlow(NS3BaseChannel):
+    _rtype = "ns3::ErrorChannelSixlow"
+
+    @classmethod
+    def _register_attributes(cls):
+        
+        attr_id = Attribute("Id",
+            "The id (unique integer) of this Channel.",
+            type = Types.Integer,
+            default = "0",  
+            allowed = None,
+            range = None,    
+            flags = Flags.Reserved | Flags.NoWrite)
+
+        cls._register_attribute(attr_id)
+
+
+
+    @classmethod
+    def _register_traces(cls):
+        pass
+
+    def __init__(self, ec, guid):
+        super(NS3ErrorChannelSixlow, self).__init__(ec, guid)
+        self._home = "ns3-error-channel-sixlow-%s" % self.guid
index 54d2d4f..f8bedb4 100644 (file)
@@ -49,15 +49,15 @@ class NS3FriisPropagationLossModel(NS3BasePropagationLossModel):
 
         cls._register_attribute(attr_systemloss)
 
-        attr_mindistance = Attribute("MinDistance",
-            "The distance under which the propagation model refuses to give results (m)",
+        attr_minloss = Attribute("MinLoss",
+            "The minimum value (dB) of the total loss, used at short ranges. Note: ",
             type = Types.Double,
-            default = "0.5",  
+            default = "0",  
             allowed = None,
             range = None,    
             flags = Flags.Reserved | Flags.Construct)
 
-        cls._register_attribute(attr_mindistance)
+        cls._register_attribute(attr_minloss)
 
 
 
index e384184..93b19b7 100644 (file)
@@ -70,7 +70,7 @@ class NS3IdealWifiManager(NS3BaseWifiRemoteStationManager):
         cls._register_attribute(attr_maxslrc)
 
         attr_rtsctsthreshold = Attribute("RtsCtsThreshold",
-            "If  the size of the data packet + LLC header + MAC header + FCS trailer is bigger than this value, we use an RTS/CTS handshake before sending the data, as per IEEE Std. 802.11-2007, Section 9.2.6. This value will not have any effect on some rate control algorithms.",
+            "If  the size of the data packet + LLC header + MAC header + FCS trailer is bigger than this value, we use an RTS/CTS handshake before sending the data, as per IEEE Std. 802.11-2012, Section 9.3.5. This value will not have any effect on some rate control algorithms.",
             type = Types.Integer,
             default = "2346",  
             allowed = None,
@@ -80,7 +80,7 @@ class NS3IdealWifiManager(NS3BaseWifiRemoteStationManager):
         cls._register_attribute(attr_rtsctsthreshold)
 
         attr_fragmentationthreshold = Attribute("FragmentationThreshold",
-            "If the size of the data packet + LLC header + MAC header + FCS trailer is biggerthan this value, we fragment it such that the size of the fragments are equal or smaller than this value, as per IEEE Std. 802.11-2007, Section 9.4. This value will not have any effect on some rate control algorithms.",
+            "If the size of the data packet + LLC header + MAC header + FCS trailer is biggerthan this value, we fragment it such that the size of the fragments are equal or smaller than this value, as per IEEE Std. 802.11-2012, Section 9.5. This value will not have any effect on some rate control algorithms.",
             type = Types.Integer,
             default = "2346",  
             allowed = None,
diff --git a/src/nepi/resources/ns3/classes/itu_r1411los_propagation_loss_model.py b/src/nepi/resources/ns3/classes/itu_r1411los_propagation_loss_model.py
new file mode 100644 (file)
index 0000000..ffac653
--- /dev/null
@@ -0,0 +1,39 @@
+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState, reschedule_delay
+from nepi.resources.ns3.ns3propagationlossmodel import NS3BasePropagationLossModel 
+
+@clsinit_copy
+class NS3ItuR1411LosPropagationLossModel(NS3BasePropagationLossModel):
+    _rtype = "ns3::ItuR1411LosPropagationLossModel"
+
+    @classmethod
+    def _register_attributes(cls):
+        pass
+
+    @classmethod
+    def _register_traces(cls):
+        pass
+
+    def __init__(self, ec, guid):
+        super(NS3ItuR1411LosPropagationLossModel, self).__init__(ec, guid)
+        self._home = "ns3-itu-r1411los-propagation-loss-model-%s" % self.guid
diff --git a/src/nepi/resources/ns3/classes/itu_r1411nlos_over_rooftop_propagation_loss_model.py b/src/nepi/resources/ns3/classes/itu_r1411nlos_over_rooftop_propagation_loss_model.py
new file mode 100644 (file)
index 0000000..8496fcd
--- /dev/null
@@ -0,0 +1,110 @@
+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState, reschedule_delay
+from nepi.resources.ns3.ns3propagationlossmodel import NS3BasePropagationLossModel 
+
+@clsinit_copy
+class NS3ItuR1411NlosOverRooftopPropagationLossModel(NS3BasePropagationLossModel):
+    _rtype = "ns3::ItuR1411NlosOverRooftopPropagationLossModel"
+
+    @classmethod
+    def _register_attributes(cls):
+        
+        attr_environment = Attribute("Environment",
+            "Environment Scenario",
+            type = Types.Enumerate,
+            default = "Urban",  
+            allowed = ["Urban","SubUrban","OpenAreas"],
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_environment)
+
+        attr_citysize = Attribute("CitySize",
+            "Dimension of the city",
+            type = Types.Enumerate,
+            default = "Large",  
+            allowed = ["Small","Medium","Large"],
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_citysize)
+
+        attr_rooftoplevel = Attribute("RooftopLevel",
+            "The height of the rooftop level in meters",
+            type = Types.Double,
+            default = "20",  
+            allowed = None,
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_rooftoplevel)
+
+        attr_streetsorientation = Attribute("StreetsOrientation",
+            "The orientation of streets in degrees [0,90] with respect to the direction of propagation",
+            type = Types.Double,
+            default = "45",  
+            allowed = None,
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_streetsorientation)
+
+        attr_streetswidth = Attribute("StreetsWidth",
+            "The width of streets",
+            type = Types.Double,
+            default = "20",  
+            allowed = None,
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_streetswidth)
+
+        attr_buildingsextend = Attribute("BuildingsExtend",
+            "The distance over which the buildings extend",
+            type = Types.Double,
+            default = "80",  
+            allowed = None,
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_buildingsextend)
+
+        attr_buildingseparation = Attribute("BuildingSeparation",
+            "The separation between buildings",
+            type = Types.Double,
+            default = "50",  
+            allowed = None,
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_buildingseparation)
+
+
+
+    @classmethod
+    def _register_traces(cls):
+        pass
+
+    def __init__(self, ec, guid):
+        super(NS3ItuR1411NlosOverRooftopPropagationLossModel, self).__init__(ec, guid)
+        self._home = "ns3-itu-r1411nlos-over-rooftop-propagation-loss-model-%s" % self.guid
diff --git a/src/nepi/resources/ns3/classes/kun2600mhz_propagation_loss_model.py b/src/nepi/resources/ns3/classes/kun2600mhz_propagation_loss_model.py
new file mode 100644 (file)
index 0000000..925f3cd
--- /dev/null
@@ -0,0 +1,39 @@
+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState, reschedule_delay
+from nepi.resources.ns3.ns3propagationlossmodel import NS3BasePropagationLossModel 
+
+@clsinit_copy
+class NS3Kun2600MhzPropagationLossModel(NS3BasePropagationLossModel):
+    _rtype = "ns3::Kun2600MhzPropagationLossModel"
+
+    @classmethod
+    def _register_attributes(cls):
+        pass
+
+    @classmethod
+    def _register_traces(cls):
+        pass
+
+    def __init__(self, ec, guid):
+        super(NS3Kun2600MhzPropagationLossModel, self).__init__(ec, guid)
+        self._home = "ns3-kun2600mhz-propagation-loss-model-%s" % self.guid
index f1ac832..0184c10 100644 (file)
@@ -79,6 +79,26 @@ class NS3LteEnbNetDevice(NS3BaseNetDevice):
 
         cls._register_attribute(attr_ulearfcn)
 
+        attr_csgid = Attribute("CsgId",
+            "The Closed Subscriber Group (CSG) identity that this eNodeB belongs to",
+            type = Types.Integer,
+            default = "0",  
+            allowed = None,
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_csgid)
+
+        attr_csgindication = Attribute("CsgIndication",
+            "If true, only UEs which are members of the CSG (i.e. same CSG ID) can gain access to the eNodeB, therefore enforcing closed access mode. Otherwise, the eNodeB operates as a non-CSG cell and implements open access mode.",
+            type = Types.Bool,
+            default = "False",  
+            allowed = None,
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_csgindication)
+
         attr_mtu = Attribute("Mtu",
             "The MAC-level Maximum Transmission Unit",
             type = Types.Integer,
diff --git a/src/nepi/resources/ns3/classes/lte_ue_net_device.py b/src/nepi/resources/ns3/classes/lte_ue_net_device.py
new file mode 100644 (file)
index 0000000..ba6ed70
--- /dev/null
@@ -0,0 +1,80 @@
+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState, reschedule_delay
+from nepi.resources.ns3.ns3netdevice import NS3BaseNetDevice 
+
+@clsinit_copy
+class NS3LteUeNetDevice(NS3BaseNetDevice):
+    _rtype = "ns3::LteUeNetDevice"
+
+    @classmethod
+    def _register_attributes(cls):
+        
+        attr_imsi = Attribute("Imsi",
+            "International Mobile Subscriber Identity assigned to this UE",
+            type = Types.Integer,
+            default = "0",  
+            allowed = None,
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_imsi)
+
+        attr_dlearfcn = Attribute("DlEarfcn",
+            "Downlink E-UTRA Absolute Radio Frequency Channel Number (EARFCN) as per 3GPP 36.101 Section 5.7.3. ",
+            type = Types.Integer,
+            default = "100",  
+            allowed = None,
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_dlearfcn)
+
+        attr_csgid = Attribute("CsgId",
+            "The Closed Subscriber Group (CSG) identity that this UE is associated with, i.e., giving the UE access to cells which belong to this particular CSG. This restriction only applies to initial cell selection and EPC-enabled simulation. This does not revoke the UE\'s access to non-CSG cells. ",
+            type = Types.Integer,
+            default = "0",  
+            allowed = None,
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_csgid)
+
+        attr_mtu = Attribute("Mtu",
+            "The MAC-level Maximum Transmission Unit",
+            type = Types.Integer,
+            default = "30000",  
+            allowed = None,
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_mtu)
+
+
+
+    @classmethod
+    def _register_traces(cls):
+        pass
+
+    def __init__(self, ec, guid):
+        super(NS3LteUeNetDevice, self).__init__(ec, guid)
+        self._home = "ns3-lte-ue-net-device-%s" % self.guid
index 3818645..2ebdc02 100644 (file)
@@ -110,7 +110,7 @@ class NS3MinstrelWifiManager(NS3BaseWifiRemoteStationManager):
         cls._register_attribute(attr_maxslrc)
 
         attr_rtsctsthreshold = Attribute("RtsCtsThreshold",
-            "If  the size of the data packet + LLC header + MAC header + FCS trailer is bigger than this value, we use an RTS/CTS handshake before sending the data, as per IEEE Std. 802.11-2007, Section 9.2.6. This value will not have any effect on some rate control algorithms.",
+            "If  the size of the data packet + LLC header + MAC header + FCS trailer is bigger than this value, we use an RTS/CTS handshake before sending the data, as per IEEE Std. 802.11-2012, Section 9.3.5. This value will not have any effect on some rate control algorithms.",
             type = Types.Integer,
             default = "2346",  
             allowed = None,
@@ -120,7 +120,7 @@ class NS3MinstrelWifiManager(NS3BaseWifiRemoteStationManager):
         cls._register_attribute(attr_rtsctsthreshold)
 
         attr_fragmentationthreshold = Attribute("FragmentationThreshold",
-            "If the size of the data packet + LLC header + MAC header + FCS trailer is biggerthan this value, we fragment it such that the size of the fragments are equal or smaller than this value, as per IEEE Std. 802.11-2007, Section 9.4. This value will not have any effect on some rate control algorithms.",
+            "If the size of the data packet + LLC header + MAC header + FCS trailer is biggerthan this value, we fragment it such that the size of the fragments are equal or smaller than this value, as per IEEE Std. 802.11-2012, Section 9.5. This value will not have any effect on some rate control algorithms.",
             type = Types.Integer,
             default = "2346",  
             allowed = None,
diff --git a/src/nepi/resources/ns3/classes/ocb_wifi_mac.py b/src/nepi/resources/ns3/classes/ocb_wifi_mac.py
new file mode 100644 (file)
index 0000000..cdb1ebc
--- /dev/null
@@ -0,0 +1,209 @@
+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState, reschedule_delay
+from nepi.resources.ns3.ns3wifimac import NS3BaseWifiMac 
+
+@clsinit_copy
+class NS3OcbWifiMac(NS3BaseWifiMac):
+    _rtype = "ns3::OcbWifiMac"
+
+    @classmethod
+    def _register_attributes(cls):
+        
+        attr_qossupported = Attribute("QosSupported",
+            "This Boolean attribute is set to enable 802.11e/WMM-style QoS support at this STA",
+            type = Types.Bool,
+            default = "False",  
+            allowed = None,
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_qossupported)
+
+        attr_htsupported = Attribute("HtSupported",
+            "This Boolean attribute is set to enable 802.11n support at this STA",
+            type = Types.Bool,
+            default = "False",  
+            allowed = None,
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_htsupported)
+
+        attr_ctstoselfsupported = Attribute("CtsToSelfSupported",
+            "Use CTS to Self when using a rate that is not in the basic set rate",
+            type = Types.Bool,
+            default = "False",  
+            allowed = None,
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_ctstoselfsupported)
+
+        attr_ctstimeout = Attribute("CtsTimeout",
+            "When this timeout expires, the RTS/CTS handshake has failed.",
+            type = Types.String,
+            default = "+75000.0ns",  
+            allowed = None,
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_ctstimeout)
+
+        attr_acktimeout = Attribute("AckTimeout",
+            "When this timeout expires, the DATA/ACK handshake has failed.",
+            type = Types.String,
+            default = "+75000.0ns",  
+            allowed = None,
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_acktimeout)
+
+        attr_basicblockacktimeout = Attribute("BasicBlockAckTimeout",
+            "When this timeout expires, the BASIC_BLOCK_ACK_REQ/BASIC_BLOCK_ACK handshake has failed.",
+            type = Types.String,
+            default = "+281000.0ns",  
+            allowed = None,
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_basicblockacktimeout)
+
+        attr_compressedblockacktimeout = Attribute("CompressedBlockAckTimeout",
+            "When this timeout expires, the COMPRESSED_BLOCK_ACK_REQ/COMPRESSED_BLOCK_ACK handshake has failed.",
+            type = Types.String,
+            default = "+107000.0ns",  
+            allowed = None,
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_compressedblockacktimeout)
+
+        attr_sifs = Attribute("Sifs",
+            "The value of the SIFS constant.",
+            type = Types.String,
+            default = "+16000.0ns",  
+            allowed = None,
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_sifs)
+
+        attr_eifsnodifs = Attribute("EifsNoDifs",
+            "The value of EIFS-DIFS",
+            type = Types.String,
+            default = "+60000.0ns",  
+            allowed = None,
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_eifsnodifs)
+
+        attr_slot = Attribute("Slot",
+            "The duration of a Slot.",
+            type = Types.String,
+            default = "+9000.0ns",  
+            allowed = None,
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_slot)
+
+        attr_pifs = Attribute("Pifs",
+            "The value of the PIFS constant.",
+            type = Types.String,
+            default = "+25000.0ns",  
+            allowed = None,
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_pifs)
+
+        attr_rifs = Attribute("Rifs",
+            "The value of the RIFS constant.",
+            type = Types.String,
+            default = "+2000.0ns",  
+            allowed = None,
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_rifs)
+
+        attr_maxpropagationdelay = Attribute("MaxPropagationDelay",
+            "The maximum propagation delay. Unused for now.",
+            type = Types.String,
+            default = "+3333.0ns",  
+            allowed = None,
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_maxpropagationdelay)
+
+        attr_ssid = Attribute("Ssid",
+            "The ssid we want to belong to.",
+            type = Types.String,
+            default = "default",  
+            allowed = None,
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_ssid)
+
+
+
+    @classmethod
+    def _register_traces(cls):
+        
+        txokheader = Trace("TxOkHeader", "The header of successfully transmitted packet")
+
+        cls._register_trace(txokheader)
+
+        txerrheader = Trace("TxErrHeader", "The header of unsuccessfully transmitted packet")
+
+        cls._register_trace(txerrheader)
+
+        mactx = Trace("MacTx", "A packet has been received from higher layers and is being processed in preparation for queueing for transmission.")
+
+        cls._register_trace(mactx)
+
+        mactxdrop = Trace("MacTxDrop", "A packet has been dropped in the MAC layer before being queued for transmission.")
+
+        cls._register_trace(mactxdrop)
+
+        macpromiscrx = Trace("MacPromiscRx", "A packet has been received by this device, has been passed up from the physical layer and is being forwarded up the local protocol stack.  This is a promiscuous trace,")
+
+        cls._register_trace(macpromiscrx)
+
+        macrx = Trace("MacRx", "A packet has been received by this device, has been passed up from the physical layer and is being forwarded up the local protocol stack.  This is a non-promiscuous trace,")
+
+        cls._register_trace(macrx)
+
+        macrxdrop = Trace("MacRxDrop", "A packet has been dropped in the MAC layer after it has been passed up from the physical layer.")
+
+        cls._register_trace(macrxdrop)
+
+
+
+    def __init__(self, ec, guid):
+        super(NS3OcbWifiMac, self).__init__(ec, guid)
+        self._home = "ns3-ocb-wifi-mac-%s" % self.guid
diff --git a/src/nepi/resources/ns3/classes/okumura_hata_propagation_loss_model.py b/src/nepi/resources/ns3/classes/okumura_hata_propagation_loss_model.py
new file mode 100644 (file)
index 0000000..ec26777
--- /dev/null
@@ -0,0 +1,70 @@
+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState, reschedule_delay
+from nepi.resources.ns3.ns3propagationlossmodel import NS3BasePropagationLossModel 
+
+@clsinit_copy
+class NS3OkumuraHataPropagationLossModel(NS3BasePropagationLossModel):
+    _rtype = "ns3::OkumuraHataPropagationLossModel"
+
+    @classmethod
+    def _register_attributes(cls):
+        
+        attr_frequency = Attribute("Frequency",
+            "The propagation frequency in Hz",
+            type = Types.Double,
+            default = "2.16e+09",  
+            allowed = None,
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_frequency)
+
+        attr_environment = Attribute("Environment",
+            "Environment Scenario",
+            type = Types.Enumerate,
+            default = "Urban",  
+            allowed = ["Urban","SubUrban","OpenAreas"],
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_environment)
+
+        attr_citysize = Attribute("CitySize",
+            "Dimension of the city",
+            type = Types.Enumerate,
+            default = "Large",  
+            allowed = ["Small","Medium","Large"],
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_citysize)
+
+
+
+    @classmethod
+    def _register_traces(cls):
+        pass
+
+    def __init__(self, ec, guid):
+        super(NS3OkumuraHataPropagationLossModel, self).__init__(ec, guid)
+        self._home = "ns3-okumura-hata-propagation-loss-model-%s" % self.guid
index 606b3e8..f01a090 100644 (file)
@@ -90,7 +90,7 @@ class NS3OnoeWifiManager(NS3BaseWifiRemoteStationManager):
         cls._register_attribute(attr_maxslrc)
 
         attr_rtsctsthreshold = Attribute("RtsCtsThreshold",
-            "If  the size of the data packet + LLC header + MAC header + FCS trailer is bigger than this value, we use an RTS/CTS handshake before sending the data, as per IEEE Std. 802.11-2007, Section 9.2.6. This value will not have any effect on some rate control algorithms.",
+            "If  the size of the data packet + LLC header + MAC header + FCS trailer is bigger than this value, we use an RTS/CTS handshake before sending the data, as per IEEE Std. 802.11-2012, Section 9.3.5. This value will not have any effect on some rate control algorithms.",
             type = Types.Integer,
             default = "2346",  
             allowed = None,
@@ -100,7 +100,7 @@ class NS3OnoeWifiManager(NS3BaseWifiRemoteStationManager):
         cls._register_attribute(attr_rtsctsthreshold)
 
         attr_fragmentationthreshold = Attribute("FragmentationThreshold",
-            "If the size of the data packet + LLC header + MAC header + FCS trailer is biggerthan this value, we fragment it such that the size of the fragments are equal or smaller than this value, as per IEEE Std. 802.11-2007, Section 9.4. This value will not have any effect on some rate control algorithms.",
+            "If the size of the data packet + LLC header + MAC header + FCS trailer is biggerthan this value, we fragment it such that the size of the fragments are equal or smaller than this value, as per IEEE Std. 802.11-2012, Section 9.5. This value will not have any effect on some rate control algorithms.",
             type = Types.Integer,
             default = "2346",  
             allowed = None,
index 7986532..c1af643 100644 (file)
@@ -52,7 +52,7 @@ class NS3Ping6(NS3BaseApplication):
         attr_remoteipv6 = Attribute("RemoteIpv6",
             "The Ipv6Address of the outbound packets",
             type = Types.String,
-            default = "0000:0000:0000:0000:0000:0000:0000:0000",  
+            default = "::",  
             allowed = None,
             range = None,    
             flags = Flags.Reserved | Flags.Construct)
@@ -62,7 +62,7 @@ class NS3Ping6(NS3BaseApplication):
         attr_localipv6 = Attribute("LocalIpv6",
             "Local Ipv6Address of the sender",
             type = Types.String,
-            default = "0000:0000:0000:0000:0000:0000:0000:0000",  
+            default = "::",  
             allowed = None,
             range = None,    
             flags = Flags.Reserved | Flags.Construct)
index 1553b8a..bfae106 100644 (file)
@@ -300,7 +300,7 @@ class NS3RraaWifiManager(NS3BaseWifiRemoteStationManager):
         cls._register_attribute(attr_maxslrc)
 
         attr_rtsctsthreshold = Attribute("RtsCtsThreshold",
-            "If  the size of the data packet + LLC header + MAC header + FCS trailer is bigger than this value, we use an RTS/CTS handshake before sending the data, as per IEEE Std. 802.11-2007, Section 9.2.6. This value will not have any effect on some rate control algorithms.",
+            "If  the size of the data packet + LLC header + MAC header + FCS trailer is bigger than this value, we use an RTS/CTS handshake before sending the data, as per IEEE Std. 802.11-2012, Section 9.3.5. This value will not have any effect on some rate control algorithms.",
             type = Types.Integer,
             default = "2346",  
             allowed = None,
@@ -310,7 +310,7 @@ class NS3RraaWifiManager(NS3BaseWifiRemoteStationManager):
         cls._register_attribute(attr_rtsctsthreshold)
 
         attr_fragmentationthreshold = Attribute("FragmentationThreshold",
-            "If the size of the data packet + LLC header + MAC header + FCS trailer is biggerthan this value, we fragment it such that the size of the fragments are equal or smaller than this value, as per IEEE Std. 802.11-2007, Section 9.4. This value will not have any effect on some rate control algorithms.",
+            "If the size of the data packet + LLC header + MAC header + FCS trailer is biggerthan this value, we fragment it such that the size of the fragments are equal or smaller than this value, as per IEEE Std. 802.11-2012, Section 9.5. This value will not have any effect on some rate control algorithms.",
             type = Types.Integer,
             default = "2346",  
             allowed = None,
diff --git a/src/nepi/resources/ns3/classes/six_low_pan_net_device.py b/src/nepi/resources/ns3/classes/six_low_pan_net_device.py
new file mode 100644 (file)
index 0000000..842e20e
--- /dev/null
@@ -0,0 +1,123 @@
+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState, reschedule_delay
+from nepi.resources.ns3.ns3netdevice import NS3BaseNetDevice 
+
+@clsinit_copy
+class NS3SixLowPanNetDevice(NS3BaseNetDevice):
+    _rtype = "ns3::SixLowPanNetDevice"
+
+    @classmethod
+    def _register_attributes(cls):
+        
+        attr_rfc6282 = Attribute("Rfc6282",
+            "Use RFC6282 (IPHC) if true, RFC4944 (HC1) otherwise.",
+            type = Types.Bool,
+            default = "True",  
+            allowed = None,
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_rfc6282)
+
+        attr_omitudpchecksum = Attribute("OmitUdpChecksum",
+            "Omit the UDP checksum in IPHC compression.",
+            type = Types.Bool,
+            default = "True",  
+            allowed = None,
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_omitudpchecksum)
+
+        attr_fragmentreassemblylistsize = Attribute("FragmentReassemblyListSize",
+            "The maximum size of the reassembly buffer (in packets). Zero meaning infinite.",
+            type = Types.Integer,
+            default = "0",  
+            allowed = None,
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_fragmentreassemblylistsize)
+
+        attr_fragmentexpirationtimeout = Attribute("FragmentExpirationTimeout",
+            "When this timeout expires, the fragments will be cleared from the buffer.",
+            type = Types.String,
+            default = "+60000000000.0ns",  
+            allowed = None,
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_fragmentexpirationtimeout)
+
+        attr_compressionthreshold = Attribute("CompressionThreshold",
+            "The minimum MAC layer payload size.",
+            type = Types.Integer,
+            default = "0",  
+            allowed = None,
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_compressionthreshold)
+
+        attr_forceethertype = Attribute("ForceEtherType",
+            "Force a specific EtherType in L2 frames.",
+            type = Types.Bool,
+            default = "False",  
+            allowed = None,
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_forceethertype)
+
+        attr_ethertype = Attribute("EtherType",
+            "The specific EtherType to be used in L2 frames.",
+            type = Types.Integer,
+            default = "65535",  
+            allowed = None,
+            range = None,    
+            flags = Flags.Reserved | Flags.Construct)
+
+        cls._register_attribute(attr_ethertype)
+
+
+
+    @classmethod
+    def _register_traces(cls):
+        
+        tx = Trace("Tx", "Send - packet (including 6LoWPAN header), SixLoWPanNetDevice Ptr, interface index.")
+
+        cls._register_trace(tx)
+
+        rx = Trace("Rx", "Receive - packet (including 6LoWPAN header), SixLoWPanNetDevice Ptr, interface index.")
+
+        cls._register_trace(rx)
+
+        drop = Trace("Drop", "Drop - DropReason, packet (including 6LoWPAN header), SixLoWPanNetDevice Ptr, interface index.")
+
+        cls._register_trace(drop)
+
+
+
+    def __init__(self, ec, guid):
+        super(NS3SixLowPanNetDevice, self).__init__(ec, guid)
+        self._home = "ns3-six-low-pan-net-device-%s" % self.guid
index 6263666..26bc7b5 100644 (file)
@@ -50,7 +50,7 @@ class NS3UdpTraceClient(NS3BaseApplication):
         cls._register_attribute(attr_remoteport)
 
         attr_maxpacketsize = Attribute("MaxPacketSize",
-            "The maximum size of a packet.",
+            "The maximum size of a packet (including the SeqTsHeader, 12 bytes).",
             type = Types.Integer,
             default = "1024",  
             allowed = None,
index f4f7345..92dd859 100644 (file)
@@ -20,10 +20,10 @@ from nepi.execution.attribute import Attribute, Flags, Types
 from nepi.execution.trace import Trace, TraceAttr
 from nepi.execution.resource import ResourceManager, clsinit_copy, \
         ResourceState, reschedule_delay
-from nepi.resources.ns3.ns3netdevice import NS3BaseNetDevice 
+from nepi.resources.ns3.ns3wifinetdevice import NS3BaseWifiNetDevice 
 
 @clsinit_copy
-class NS3WifiNetDevice(NS3BaseNetDevice):
+class NS3WifiNetDevice(NS3BaseWifiNetDevice):
     _rtype = "ns3::WifiNetDevice"
 
     @classmethod
index 325c29b..314d391 100644 (file)
@@ -20,10 +20,10 @@ from nepi.execution.attribute import Attribute, Flags, Types
 from nepi.execution.trace import Trace, TraceAttr
 from nepi.execution.resource import ResourceManager, clsinit_copy, \
         ResourceState, reschedule_delay
-from nepi.resources.ns3.ns3channel import NS3BaseChannel 
+from nepi.resources.ns3.ns3wifichannel import NS3BaseWifiChannel 
 
 @clsinit_copy
-class NS3YansWifiChannel(NS3BaseChannel):
+class NS3YansWifiChannel(NS3BaseWifiChannel):
     _rtype = "ns3::YansWifiChannel"
 
     @classmethod
index 8a06e4b..00bdbfb 100644 (file)
@@ -99,7 +99,7 @@ class NS3Base(ResourceManager):
     def _wait_rms(self):
         """ Returns True if dependent RMs are not yer READY, False otherwise"""
         for rm in self._rms_to_wait:
-            if rm and rm.state < ResourceState.READY:
+            if rm.state < ResourceState.READY:
                 return True
         return False
 
diff --git a/src/nepi/resources/ns3/ns3ccndceapplication.py b/src/nepi/resources/ns3/ns3ccndceapplication.py
new file mode 100644 (file)
index 0000000..232ac71
--- /dev/null
@@ -0,0 +1,120 @@
+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy, ResourceState, reschedule_delay
+from nepi.resources.ns3.ns3dceapplication import NS3BaseDceApplication
+
+import os
+
+@clsinit_copy
+class NS3BaseCCNDceApplication(NS3BaseDceApplication):
+    _rtype = "abstract::ns3::CCNDceApplication"
+
+    @classmethod
+    def _register_attributes(cls):
+        files = Attribute("files", 
+                "Semi-colon separated list of 'key=value' pairs to set as "
+                "DCE files (AddFile). The key should be a path to a local file "
+                "and the key is the path to be set in DCE for that file" ,
+                flags = Flags.Design)
+
+        stdinfile = Attribute("stdinFile", 
+                "File to set as StdinFile. The value shoudl be either an empty "
+                "or a path to a local file ",
+                flags = Flags.Design)
+
+        cls._register_attribute(files)
+        cls._register_attribute(stdinfile)
+
+    def _instantiate_object(self):
+        pass
+
+    def _connect_object(self):
+        node = self.node
+        if node.uuid not in self.connected:
+            self._connected.add(node.uuid)
+
+            # Preventing concurrent access to the DceApplicationHelper
+            # from different DceApplication RMs
+            with self.simulation.dce_application_lock:
+                self.simulation.invoke(
+                        self.simulation.ccn_client_helper_uuid, 
+                        "ResetArguments") 
+
+                self.simulation.invoke(
+                        self.simulation.ccn_client_helper_uuid, 
+                        "ResetEnvironment") 
+
+                self.simulation.invoke(
+                        self.simulation.ccn_client_helper_uuid, 
+                        "SetBinary", self.get("binary")) 
+
+                self.simulation.invoke(
+                        self.simulation.ccn_client_helper_uuid, 
+                        "SetStackSize", self.get("stackSize")) 
+
+                arguments = self.get("arguments")
+                if arguments:
+                    for arg in map(str.strip, arguments.split(";")):
+                        self.simulation.invoke(
+                                self.simulation.ccn_client_helper_uuid, 
+                            "AddArgument", arg)
+
+                environment = self.get("environment")
+                if environment:
+                    for env in map(str.strip, environment.split(";")):
+                        key, val = env.split("=")
+                        self.simulation.invoke(
+                                self.simulation.ccn_client_helper_uuid, 
+                            "AddEnvironment", key, val)
+
+                if self.has_attribute("files"):
+                    files = self.get("files")
+                    if files:
+                        for files in map(str.strip, files.split(";")):
+                            remotepath, dcepath = files.split("=")
+                            localpath = "${SHARE}/" + os.path.basename(remotepath)
+                            self.simulation.invoke(
+                                    self.simulation.ccn_client_helper_uuid, 
+                                "AddFile", localpath, dcepath)
+
+                if self.has_attribute("stdinFile"):
+                    stdinfile = self.get("stdinFile")
+                    if stdinfile:
+                        if stdinfile != "":
+                            stdinfile = "${SHARE}/" + os.path.basename(stdinfile)
+        
+                        self.simulation.invoke(
+                                self.simulation.ccn_client_helper_uuid, 
+                                "SetStdinFile", stdinfile)
+
+                apps_uuid = self.simulation.invoke(
+                        self.simulation.ccn_client_helper_uuid, 
+                        "InstallInNode", self.node.uuid)
+
+            self._uuid = self.simulation.invoke(apps_uuid, "Get", 0)
+
+            if self.has_changed("StartTime"):
+                self.simulation.ns3_set(self.uuid, "StartTime", self.get("StartTime"))
+
+            if self.has_changed("StopTime"):
+                self.simulation.ns3_set(self.uuid, "StopTime", self.get("StopTime"))
+
+
index acaf0e6..7d26fbd 100644 (file)
@@ -48,10 +48,22 @@ class NS3BaseDceApplication(NS3BaseApplication):
                 "DCE environment variables.",
                 flags = Flags.Design)
 
+        starttime = Attribute("StartTime",
+            "Time at which the application will start",
+            default = "+0.0ns",  
+            flags = Flags.Reserved | Flags.Construct)
+
+        stoptime = Attribute("StopTime",
+            "Time at which the application will stop",
+            default = "+0.0ns",  
+            flags = Flags.Reserved | Flags.Construct)
+
         cls._register_attribute(binary)
         cls._register_attribute(stack_size)
         cls._register_attribute(arguments)
         cls._register_attribute(environment)
+        cls._register_attribute(stoptime)
+        cls._register_attribute(starttime)
 
     @property
     def node(self):
@@ -95,37 +107,20 @@ class NS3BaseDceApplication(NS3BaseApplication):
                         self.simulation.dce_application_helper_uuid, 
                         "SetStackSize", self.get("stackSize")) 
 
-                arguments = self.get("arguments") or ""
-                for arg in map(str.strip, arguments.split(";")):
-                    self.simulation.invoke(
-                            self.simulation.dce_application_helper_uuid, 
-                        "AddArgument", arg)
-
-                environment = self.get("environment") or ""
-                for env in map(str.strip, environment.split(";")):
-                    key, val = env.split("=")
-                    self.simulation.invoke(
-                            self.simulation.dce_application_helper_uuid, 
-                        "AddEnvironment", key, val)
-
-                if self.has_attribute("files"):
-                    files = self.get("files") or ""
-                    for files in map(str.strip, files.split(";")):
-                        remotepath, dcepath = env.split("=")
-                        localpath = "${SHARE}/" + os.path.basename(remotepath)
+                arguments = self.get("arguments")
+                if arguments:
+                    for arg in map(str.strip, arguments.split(";")):
                         self.simulation.invoke(
                                 self.simulation.dce_application_helper_uuid, 
-                            "AddFile", localpath, dcepath)
-
-                if self.has_attribute("stdinFile"):
-                    stdinfile = self.get("stdinFile")
-                    if stdinfile:
-                        if stdinfile != "":
-                            stdinfile = "${SHARE}/" + os.path.basename(stdinfile)
-        
+                            "AddArgument", arg)
+
+                environment = self.get("environment")
+                if environment:
+                    for env in map(str.strip, environment.split(";")):
+                        key, val = env.split("=")
                         self.simulation.invoke(
                                 self.simulation.dce_application_helper_uuid, 
-                                "SetStdinFile", stdinfile)
+                            "AddEnvironment", key, val)
 
                 apps_uuid = self.simulation.invoke(
                         self.simulation.dce_application_helper_uuid, 
index f136dd8..d401e67 100644 (file)
@@ -224,8 +224,7 @@ class NS3BaseNetDevice(NS3Base):
             self.simulation.invoke(self.uuid, "Attach", channel.uuid)
             self._connected.add(channel.uuid)
         
-        queue = self.queue
         # Verify that the device has a queue. If no queue is added a segfault 
         # error occurs
-        if queue and queue.uuid not in self.connected:
-            self._connected.add(queue.uuid)
+        queue = self.queue
+
index d7ec2b7..735349f 100644 (file)
@@ -51,4 +51,5 @@ class NS3BaseQueue(NS3Base):
         if device.uuid not in self.connected:
             self.simulation.invoke(device.uuid, "SetQueue", self.uuid)
             self._connected.add(device.uuid)
+            device._connected.add(self.uuid)
 
index f761b86..a9f4353 100644 (file)
@@ -68,6 +68,8 @@ def handle_message(ns3_wrapper, msg_type, args, kwargs):
         ns3_wrapper.logger.debug("CREATE %s %s" % (clazzname, str(args)))
 
         uuid = ns3_wrapper.create(clazzname, *args)
+        
+        #ns3_wrapper.logger.debug("%s = CREATE " % str(uuid))
         return uuid
 
     if msg_type == NS3WrapperMessage.FACTORY:
@@ -76,6 +78,8 @@ def handle_message(ns3_wrapper, msg_type, args, kwargs):
         ns3_wrapper.logger.debug("FACTORY %s %s" % (type_name, str(kwargs)))
 
         uuid = ns3_wrapper.factory(type_name, **kwargs)
+        
+        #ns3_wrapper.logger.debug("%s = FACTORY " % str(uuid))
         return uuid
 
     if msg_type == NS3WrapperMessage.INVOKE:
index 5eae3c8..016cfa7 100644 (file)
 #
 # Author: Alina Quereilhac <alina.quereilhac@inria.fr>
 
+# 
+# Instructions. Run with:
+#
+#  PYTHONPATH=$PYTHONPATH:~/repos/nepi/src python src/nepi/resources/ns3/resource_manager_generator.py
+#
+
 # Force the load of ns3 libraries
 from nepi.resources.ns3.ns3wrapper import load_ns3_module
 
@@ -24,11 +30,6 @@ import os
 import re
 
 adapted_types = ["ns3::Node",
-        "ns3::Application", 
-        #"ns3::DceApplication", 
-        "ns3::NetDevice",
-        "ns3::Channel",
-        "ns3::Queue",
         "ns3::Icmpv4L4Protocol",
         "ns3::ArpL3Protocol",
         "ns3::Ipv4L3Protocol",
@@ -41,7 +42,12 @@ adapted_types = ["ns3::Node",
         "ns3::WifiPhy",
         "ns3::WifiMac",
         "ns3::ErrorModel",
-        "ns3::ErrorRateModel"]
+        "ns3::ErrorRateModel",
+        "ns3::Application", 
+        #"ns3::DceApplication", 
+        "ns3::NetDevice",
+        "ns3::Channel",
+        "ns3::Queue"]
 
 base_types = ["ns3::IpL4Protocol"]
 
index a4901ae..e75e8a5 100644 (file)
@@ -133,8 +133,8 @@ def add_wifi_channel(ec):
 
 class LinuxNS3DceApplicationTest(unittest.TestCase):
     def setUp(self):
-        #self.fedora_host = "nepi2.pl.sophia.inria.fr"
-        self.fedora_host = "planetlabpc1.upf.edu"
+        self.fedora_host = "nepi2.pl.sophia.inria.fr"
+        #self.fedora_host = "planetlabpc1.upf.edu"
         self.fedora_user = "inria_nepi"
         self.fedora_identity = "%s/.ssh/id_rsa_planetlab" % (os.environ['HOME'])
 
@@ -179,7 +179,7 @@ class LinuxNS3DceApplicationTest(unittest.TestCase):
                 "cd iputils-s20101006/ && "
                 "sed -i 's/CFLAGS=/CFLAGS+=/g' Makefile && "
                 "make CFLAGS=-fPIC LDFLAGS=-pie ping && "
-                "cp ping ${BIN_DCE} ")
+                "cp ping ${BIN_DCE} && cd - ")
         ec.set (ping, "binary", "ping")
         ec.set (ping, "stackSize", 1<<20)
         ec.set (ping, "arguments", "-c 10;-s 1000;10.0.0.2")
@@ -244,24 +244,23 @@ class LinuxNS3DceApplicationTest(unittest.TestCase):
         ec.register_connection(chan, p2p2)
 
         ### create applications
-        ccnd1 = ec.register_resource("ns3::LinuxDceApplication")
+        ccnd1 = ec.register_resource("ns3::LinuxCCNDceApplication")
         ec.set(ccnd1, "depends", "libpcap0.8-dev openjdk-6-jdk ant1.8 autoconf "
             "libssl-dev libexpat-dev libpcap-dev libecryptfs0 libxml2-utils auto"
             "make gawk gcc g++ git-core pkg-config libpcre3-dev openjdk-6-jre-lib")
         ec.set (ccnd1, "sources", "http://www.ccnx.org/releases/ccnx-0.7.2.tar.gz")
-        ec.set (ccnd1, "build", "tar xvjf ${SRC}/iputils-s20101006.tar.bz2 && "
-                "tar zxf ${SRC}/ccnx-0.7.2.tar.gz && "
+        ec.set (ccnd1, "build", "tar zxf ${SRC}/ccnx-0.7.2.tar.gz && "
                 "cd ccnx-0.7.2 && "
-                " INSTALL_BASE=${BIN_DCE} ./configure && "
+                " INSTALL_BASE=${BIN_DCE}/.. ./configure && "
                 " make MORE_LDLIBS=-pie && "
-                " make install ")
+                " make install && cd -")
         ec.set (ccnd1, "binary", "ccndstart")
         ec.set (ccnd1, "stackSize", 1<<20)
         ec.set (ccnd1, "StartTime", "1s")
         ec.set (ccnd1, "StopTime", "20s")
         ec.register_connection(ccnd1, nsnode1)
 
-        ccnkill1 = ec.register_resource("ns3::LinuxDceApplication")
+        ccnkill1 = ec.register_resource("ns3::LinuxCCNDceApplication")
         ec.set (ccnkill1, "binary", "ccnsmoketest")
         ec.set (ccnkill1, "arguments", "kill")
         ec.set (ccnkill1, "stdinFile", "")
@@ -274,7 +273,7 @@ class LinuxNS3DceApplicationTest(unittest.TestCase):
             os.path.dirname(os.path.realpath(__file__)),
             "repoFile1")
 
-        ccnr = ec.register_resource("ns3::LinuxDceApplication")
+        ccnr = ec.register_resource("ns3::LinuxCCNDceApplication")
         ec.set (ccnr, "binary", "ccnr")
         ec.set (ccnr, "environment", "CCNR_DIRECTORY=/REPO/")
         ec.set (ccnr, "files", "%s=/REPO/repoFile1" % repofile) 
@@ -283,7 +282,7 @@ class LinuxNS3DceApplicationTest(unittest.TestCase):
         ec.set (ccnr, "StopTime", "120s")
         ec.register_connection(ccnr, nsnode1)
 
-        ccndc1 = ec.register_resource("ns3::LinuxDceApplication")
+        ccndc1 = ec.register_resource("ns3::LinuxCCNDceApplication")
         ec.set (ccndc1, "binary", "ccndc")
         ec.set (ccndc1, "arguments", "-v;add;ccnx:/;udp;10.0.0.2")
         ec.set (ccndc1, "stackSize", 1<<20)
@@ -291,14 +290,14 @@ class LinuxNS3DceApplicationTest(unittest.TestCase):
         ec.set (ccndc1, "StopTime", "120s")
         ec.register_connection(ccndc1, nsnode1)
 
-        ccnd2 = ec.register_resource("ns3::LinuxDceApplication")
+        ccnd2 = ec.register_resource("ns3::LinuxCCNDceApplication")
         ec.set (ccnd2, "binary", "ccndstart")
         ec.set (ccnd2, "stackSize", 1<<20)
         ec.set (ccnd2, "StartTime", "1s")
         ec.set (ccnd2, "StopTime", "120s")
         ec.register_connection(ccnd2, nsnode2)
 
-        ccndc2 = ec.register_resource("ns3::LinuxDceApplication")
+        ccndc2 = ec.register_resource("ns3::LinuxCCNDceApplication")
         ec.set (ccndc2, "binary", "ccndc")
         ec.set (ccndc2, "arguments", "-v;add;ccnx:/;udp;10.0.0.1")
         ec.set (ccndc2, "stackSize", 1<<20)
@@ -306,7 +305,7 @@ class LinuxNS3DceApplicationTest(unittest.TestCase):
         ec.set (ccndc2, "StopTime", "120s")
         ec.register_connection(ccndc2, nsnode2)
 
-        ccnpeek = ec.register_resource("ns3::LinuxDceApplication")
+        ccnpeek = ec.register_resource("ns3::LinuxCCNDceApplication")
         ec.set (ccnpeek, "binary", "ccnpeek")
         ec.set (ccnpeek, "arguments", "ccnx:/test/bunny.ts")
         ec.set (ccnpeek, "stdinFile", "")
@@ -315,7 +314,7 @@ class LinuxNS3DceApplicationTest(unittest.TestCase):
         ec.set (ccnpeek, "StopTime", "120s")
         ec.register_connection(ccnpeek, nsnode2)
 
-        ccncat = ec.register_resource("ns3::LinuxDceApplication")
+        ccncat = ec.register_resource("ns3::LinuxCCNDceApplication")
         ec.set (ccncat, "binary", "ccncat")
         ec.set (ccncat, "arguments", "ccnx:/test/bunny.ts")
         ec.set (ccncat, "stdinFile", "")
@@ -324,7 +323,7 @@ class LinuxNS3DceApplicationTest(unittest.TestCase):
         ec.set (ccncat, "StopTime", "120s")
         ec.register_connection(ccncat, nsnode2)
 
-        ccnkill2 = ec.register_resource("ns3::LinuxDceApplication")
+        ccnkill2 = ec.register_resource("ns3::LinuxCCNDceApplication")
         ec.set (ccnkill2, "binary", "ccnsmoketest")
         ec.set (ccnkill2, "arguments", "kill")
         ec.set (ccnkill2, "stdinFile", "")
@@ -335,7 +334,7 @@ class LinuxNS3DceApplicationTest(unittest.TestCase):
 
         ec.deploy()
 
-        ec.wait_finished([ping])
+        ec.wait_finished([ccncat, ccnkill1, ccnkill2])
 
         print ec.trace(ccncat, "cmdline")
         """
@@ -344,7 +343,7 @@ class LinuxNS3DceApplicationTest(unittest.TestCase):
         self.assertTrue(cmdline.find(expected) > -1, cmdline)
         """
 
-        print ec.trace(cccat, "status")
+        print ec.trace(ccncat, "status")
         """
         expected = "Start Time: NS3 Time:          1s ("
         status = ec.trace(ping, "status")
@@ -364,7 +363,5 @@ class LinuxNS3DceApplicationTest(unittest.TestCase):
 
         ec.shutdown()
 
-
-
 if __name__ == '__main__':
     unittest.main()
index 8114685..d46e586 100644 (file)
@@ -285,6 +285,7 @@ class LinuxNS3SimulationTest(unittest.TestCase):
         sources = os.path.join(os.path.dirname(os.path.realpath(__file__)), 
                 "ns-3.18-user.tar.gz")
         ec.set(simu, "sources", sources)
+        ec.set(simu, "pybindgenVersion", "834")
         ec.register_connection(simu, node)
 
         nsnode1 = add_ns3_node(ec, simu)