dependency on itpp library removed
authoriamine@localhost.localdomain
Wed, 20 Jan 2010 10:29:57 +0100
changeset 4630 1259d4ecc5b9
parent 4629 98a8a34c52b5
child 4631 bae86486a5e0
dependency on itpp library removed valgrind error fixed
src/devices/wimax/bvec.h
src/devices/wimax/service-flow.cc
src/devices/wimax/simple-ofdm-wimax-phy.cc
src/devices/wimax/simple-ofdm-wimax-phy.h
src/devices/wimax/wimax-channel.h
src/devices/wimax/wscript
src/helper/wscript
src/wscript
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/devices/wimax/bvec.h	Wed Jan 20 10:29:57 2010 +0100
@@ -0,0 +1,28 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ *  Copyright (c) 2007,2008, 2009 INRIA, UDcast
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
+ *                              <amine.ismail@udcast.com>
+ */
+#ifndef BVEC_H_
+#define BVEC_H_
+#include <vector>
+
+namespace ns3 {
+typedef std::vector<bool> bvec;
+}
+#endif /* BVEC_H_ */
--- a/src/devices/wimax/service-flow.cc	Wed Jan 20 09:37:41 2010 +0100
+++ b/src/devices/wimax/service-flow.cc	Wed Jan 20 10:29:57 2010 +0100
@@ -66,6 +66,7 @@
 
 ServiceFlow::ServiceFlow (Tlv tlv)
 {
+  InitValues ();
   m_connection = 0;
   m_isEnabled = 0;
   m_record = new ServiceFlowRecord ();
--- a/src/devices/wimax/simple-ofdm-wimax-phy.cc	Wed Jan 20 09:37:41 2010 +0100
+++ b/src/devices/wimax/simple-ofdm-wimax-phy.cc	Wed Jan 20 10:29:57 2010 +0100
@@ -229,8 +229,6 @@
   CreateFecBlocks (buffer, modulationType);
 
   NS_ASSERT_MSG (GetState () != PHY_STATE_TX, "Error while sending burst: The PHY state is not TX");
-  //SetState (PHY_STATE_TX);
-
   StartSendFecBlock (true, modulationType, direction, symbolIndex);
 }
 
@@ -357,7 +355,7 @@
           NotifyRxBegin (fecBlock);
           if (isFirstBlock)
             {
-              m_receivedFecBlocks->clear ();//temp, shall not be needed
+              m_receivedFecBlocks->clear ();
               SetBlockParameters (burstSize, modulationType);
               m_blockTime = GetBlockTransmissionTime (modulationType);
             }
@@ -379,7 +377,7 @@
     case PHY_STATE_TX:
       if (IsDuplex () && frequency == GetRxFrequency ())
         {
-          // XXX kill dead code ?
+
         }
       break;
   }
@@ -407,7 +405,6 @@
   //all blocks received, concatenate them to re-create the burst
   if ((uint32_t) recblocks * m_blockSize == burstSize * 8 + m_paddingBits)
     {
-      //m_traceRx (modulationType, recblocks, m_blockSize);
       if (m_nbErroneousBlock == 0)
         {
           Simulator::Schedule (Seconds (0),
@@ -455,8 +452,6 @@
               temp[l] = (bool) ((((uint8_t) pstart[i]) >> (7 - l)) & 0x01);
               buffer.at (j * 8 + l) = temp[l];
             }
-
-          //buffer.insert (j * 8 + 8 - temp.size (), temp);
           j++;
         }
       free (pstart);
@@ -531,13 +526,11 @@
 
       if (j == 1 && m_paddingBits > 0) //last block can be smaller than block size
         {
-          //fecBlock.insert (0, buffer (i, buffer.size () - 1));
           fecBlock = bvec (buffer.begin () + i, buffer.end ());
           fecBlock.resize (m_blockSize, 0);
         }
       else
         {
-          //fecBlock.insert (0, buffer (i, (i + m_blockSize) - 1));
           fecBlock = bvec (buffer.begin () + i, buffer.begin () + i + m_blockSize);
         }
 
@@ -891,10 +884,6 @@
 
 void SimpleOfdmWimaxPhy::DoSetPhyParameters (void)
 {
-  //SetNrCarriers (192);
-
-  //m_fecBlockSize = 320;
-
   /*Calculations as per section 8.3.2.
    Currently assuming license-exempt 5 GHz band. For channel bandwidth 20 MHz (Table B.28, page 812) and frame duration 10 ms
    (Table 232, page 460) i.e, 100 frames per second, sampling frequency is 23040000, symbol (OFDM symbol) duration is
--- a/src/devices/wimax/simple-ofdm-wimax-phy.h	Wed Jan 20 09:37:41 2010 +0100
+++ b/src/devices/wimax/simple-ofdm-wimax-phy.h	Wed Jan 20 10:29:57 2010 +0100
@@ -28,9 +28,6 @@
 #include "ns3/nstime.h"
 #include "ns3/event-id.h"
 #include "wimax-phy.h"
-
-#include <itpp/itcomm.h>
-#include <itpp/itbase.h>
 #include "bvec.h"
 #include "ns3/snr-to-block-error-rate-manager.h"
 #include "wimax-connection.h"
--- a/src/devices/wimax/wimax-channel.h	Wed Jan 20 09:37:41 2010 +0100
+++ b/src/devices/wimax/wimax-channel.h	Wed Jan 20 10:29:57 2010 +0100
@@ -24,7 +24,6 @@
 #include <list>
 #include "ns3/channel.h"
 #include "wimax-connection.h"
-#include <itpp/itcomm.h>
 #include "ns3/log.h"
 
 namespace ns3
--- a/src/devices/wimax/wscript	Wed Jan 20 09:37:41 2010 +0100
+++ b/src/devices/wimax/wscript	Wed Jan 20 10:29:57 2010 +0100
@@ -1,19 +1,7 @@
 ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
-
-def configure(conf):
-    conf.env['ENABLE_ITPP'] = conf.check(lib='itpp', uselib='ITPP', define_name='HAVE_ITPP', mandatory=False)
-    conf.env['ENABLE_BLAS'] = conf.check(lib='blas', uselib='BLAS', define_name='HAVE_BLAS')
-    conf.report_optional_feature("WiMAX", "WiMAX",
-                                conf.env['ENABLE_ITPP'],
-                                "library itpp not found (Mandatory to build the WiMAX module)")
-    conf.env['ENABLE_WiMAX'] = conf.env['ENABLE_ITPP']
 def build(bld):
-    env = bld.env	
-    module = bld.create_ns3_module('wimax', ['node'])
-    headers = bld.new_task_gen('ns3header')
-    headers.module = 'wimax'
-    if env['ENABLE_WiMAX']:
-        module.source = [
+    obj = bld.create_ns3_module('wimax', ['node'])
+    obj.source = [
             'cid.cc',
             'cid-factory.cc',
             'wimax-net-device.cc',
@@ -70,7 +58,10 @@
 		    'phy-test.cc',
 		    'qos-test.cc'
 		            ]
-        headers.source = [
+		            
+    headers = bld.new_task_gen('ns3header')
+    headers.module = 'wimax'
+    headers.source = [
             'wimax-channel.h',
             'wimax-net-device.h',
             'bs-net-device.h',
@@ -117,4 +108,3 @@
 		    'ipcs-classifier.h',
 		    'bvec.h'
 		            ]
-        module.uselib = 'ITPP'
--- a/src/helper/wscript	Wed Jan 20 09:37:41 2010 +0100
+++ b/src/helper/wscript	Wed Jan 20 10:29:57 2010 +0100
@@ -48,6 +48,7 @@
         'point-to-point-star-helper.cc',
         'csma-star-helper.cc',
         'udp-client-server-helper.cc',
+        'wimax-helper.cc',
         ]
 
     headers = bld.new_task_gen('ns3header')
@@ -99,6 +100,7 @@
         'point-to-point-star-helper.h',
         'csma-star-helper.h',
         'udp-client-server-helper.h',
+        'wimax-helper.h',
         ]
 
     env = bld.env_of_name('default')
@@ -116,13 +118,6 @@
         headers.source.extend([
                 'tap-bridge-helper.h',
                 ])
-    if  env['ENABLE_WiMAX']:
-        helper.source.extend([
-                'wimax-helper.cc',
-                ])
-        headers.source.extend([
-                'wimax-helper.h',
-                ])
 
 
 def configure(conf):
--- a/src/wscript	Wed Jan 20 09:37:41 2010 +0100
+++ b/src/wscript	Wed Jan 20 10:29:57 2010 +0100
@@ -73,7 +73,6 @@
     conf.sub_config('contrib')
     conf.sub_config('internet-stack')
     conf.sub_config('helper')
-    conf.sub_config('devices/wimax')
 
     blddir = os.path.abspath(os.path.join(conf.blddir, conf.env.variant()))
     conf.env.append_value('NS3_MODULE_PATH', blddir)