Bug 953 - WiMAX channel scanning overflow default tip
authorFlavio Kubota <flaviokubota@gmail.com>
Sat Aug 07 21:15:14 2010 -0300 (21 months ago)
changeset 64917a1c0a99152d
parent 6490 a6bc1f7cd068
Bug 953 - WiMAX channel scanning overflow
examples/wimax/wimax-ipv4.cc
examples/wimax/wimax-multicast.cc
examples/wimax/wimax-simple.cc
src/devices/wimax/bs-link-manager.cc
src/devices/wimax/ss-link-manager.cc
src/devices/wimax/wimax-net-device.cc
src/devices/wimax/wimax-phy.cc
     1.1 --- a/examples/wimax/wimax-ipv4.cc	Fri Aug 06 21:55:17 2010 -0300
     1.2 +++ b/examples/wimax/wimax-ipv4.cc	Sat Aug 07 21:15:14 2010 -0300
     1.3 @@ -67,7 +67,7 @@
     1.4  int main (int argc, char *argv[])
     1.5  {
     1.6    // default values
     1.7 -  int nbSS = 4, duration = 2, schedType = 0;
     1.8 +  int nbSS = 4, duration = 7, schedType = 0;
     1.9    bool verbose = false;
    1.10    WimaxHelper::SchedulerType scheduler = WimaxHelper::SCHED_TYPE_SIMPLE;
    1.11    LogComponentEnable ("UdpClient", LOG_LEVEL_INFO);
    1.12 @@ -151,7 +151,7 @@
    1.13        // set server port to 100+(i*10)
    1.14        udpServer[i] = UdpServerHelper (100 + (i * 10));
    1.15        serverApps[i] = udpServer[i].Install (ssNodes.Get (i));
    1.16 -      serverApps[i].Start (Seconds (1));
    1.17 +      serverApps[i].Start (Seconds (6));
    1.18        serverApps[i].Stop (Seconds (duration));
    1.19  
    1.20        udpClient[i] = UdpClientHelper (SSinterfaces.GetAddress (i), 100 + (i * 10));
    1.21 @@ -160,7 +160,7 @@
    1.22        udpClient[i].SetAttribute ("PacketSize", UintegerValue (800));
    1.23  
    1.24        clientApps[i] = udpClient[i].Install (ssNodes.Get (i + (nbSS / 2)));
    1.25 -      clientApps[i].Start (Seconds (1));
    1.26 +      clientApps[i].Start (Seconds (6));
    1.27        clientApps[i].Stop (Seconds (duration));
    1.28      }
    1.29  
     2.1 --- a/examples/wimax/wimax-multicast.cc	Fri Aug 06 21:55:17 2010 -0300
     2.2 +++ b/examples/wimax/wimax-multicast.cc	Sat Aug 07 21:15:14 2010 -0300
     2.3 @@ -98,7 +98,7 @@
     2.4    Ptr<RandomRectanglePositionAllocator> SSPosAllocator[MAXSS];
     2.5  
     2.6    // default values
     2.7 -  int nbSS = 10, duration = 2, schedType = 0;
     2.8 +  int nbSS = 10, duration = 7, schedType = 0;
     2.9    WimaxHelper::SchedulerType scheduler = WimaxHelper::SCHED_TYPE_SIMPLE;
    2.10  
    2.11    CommandLine cmd;
    2.12 @@ -266,14 +266,14 @@
    2.13      {
    2.14        udpServer[i] = UdpServerHelper (multicast_port);
    2.15        serverApps[i] = udpServer[i].Install (ssNodes.Get (i));
    2.16 -      serverApps[i].Start (Seconds (1));
    2.17 +      serverApps[i].Start (Seconds (6));
    2.18        serverApps[i].Stop (Seconds (duration));
    2.19      }
    2.20  
    2.21    udpClient = UdpTraceClientHelper (multicastGroup, multicast_port, "");
    2.22  
    2.23    clientApps = udpClient.Install (Streamer_Node.Get (0));
    2.24 -  clientApps.Start (Seconds (1));
    2.25 +  clientApps.Start (Seconds (6));
    2.26    clientApps.Stop (Seconds (duration));
    2.27  
    2.28    IpcsClassifierRecord MulticastClassifier (Ipv4Address ("0.0.0.0"),
     3.1 --- a/examples/wimax/wimax-simple.cc	Fri Aug 06 21:55:17 2010 -0300
     3.2 +++ b/examples/wimax/wimax-simple.cc	Sat Aug 07 21:15:14 2010 -0300
     3.3 @@ -61,7 +61,7 @@
     3.4  {
     3.5    bool verbose = false;
     3.6  
     3.7 -  int duration = 2, schedType = 0;
     3.8 +  int duration = 7, schedType = 0;
     3.9    WimaxHelper::SchedulerType scheduler = WimaxHelper::SCHED_TYPE_SIMPLE;
    3.10  
    3.11    CommandLine cmd;
    3.12 @@ -140,7 +140,7 @@
    3.13    udpServer = UdpServerHelper (100);
    3.14  
    3.15    serverApps = udpServer.Install (ssNodes.Get (0));
    3.16 -  serverApps.Start (Seconds (1));
    3.17 +  serverApps.Start (Seconds (6));
    3.18    serverApps.Stop (Seconds (duration));
    3.19  
    3.20    udpClient = UdpClientHelper (SSinterfaces.GetAddress (0), 100);
    3.21 @@ -149,7 +149,7 @@
    3.22    udpClient.SetAttribute ("PacketSize", UintegerValue (1024));
    3.23  
    3.24    clientApps = udpClient.Install (ssNodes.Get (1));
    3.25 -  clientApps.Start (Seconds (1));
    3.26 +  clientApps.Start (Seconds (6));
    3.27    clientApps.Stop (Seconds (duration));
    3.28  
    3.29    Simulator::Stop (Seconds (duration + 0.1));
     4.1 --- a/src/devices/wimax/bs-link-manager.cc	Fri Aug 06 21:55:17 2010 -0300
     4.2 +++ b/src/devices/wimax/bs-link-manager.cc	Sat Aug 07 21:15:14 2010 -0300
     4.3 @@ -321,8 +321,11 @@
     4.4  uint64_t
     4.5  BSLinkManager::SelectDlChannel (void)
     4.6  {
     4.7 -  // temporarily set to 1 for quick scanning
     4.8 -  return m_bs->GetChannel (1);
     4.9 +  // Values according to WirelessMAN-OFDM RF profile for 10 MHz channelization
    4.10 +  // Section 12.3.3.1 from IEEE 802.16-2004 standard
    4.11 +  // profR10_3 :
    4.12 +  // channels: 5000 + n ⋅ 5 MHz, ∀n ∈ { 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167 }
    4.13 +  return m_bs->GetChannel (147);
    4.14  }
    4.15  
    4.16  bool
     5.1 --- a/src/devices/wimax/ss-link-manager.cc	Fri Aug 06 21:55:17 2010 -0300
     5.2 +++ b/src/devices/wimax/ss-link-manager.cc	Sat Aug 07 21:15:14 2010 -0300
     5.3 @@ -138,6 +138,12 @@
     5.4        m_dlChnlNr++;
     5.5      }
     5.6  
     5.7 +  // using max number of channel according to according to Section 8.5.1 of IEEE 802.16-2004 standard.
     5.8 +  if (m_dlChnlNr >= 200)
     5.9 +    {
    5.10 +      m_dlChnlNr = 0;
    5.11 +    }
    5.12 +
    5.13    uint64_t dlChannel = m_ss->GetChannel (m_dlChnlNr);
    5.14  
    5.15    m_ss->SetState (SubscriberStationNetDevice::SS_STATE_SCANNING);
     6.1 --- a/src/devices/wimax/wimax-net-device.cc	Fri Aug 06 21:55:17 2010 -0300
     6.2 +++ b/src/devices/wimax/wimax-net-device.cc	Sat Aug 07 21:15:14 2010 -0300
     6.3 @@ -581,13 +581,19 @@
     6.4  void
     6.5  WimaxNetDevice::InitializeChannels (void)
     6.6  {
     6.7 -  // initializing arbitrary vector of channels (or frequencies)
     6.8 -  uint64_t frequency = 2000;
     6.9  
    6.10 -  for (uint8_t i = 0; i < 20; i++)
    6.11 +  // initializing vector of channels (or frequencies)
    6.12 +  // Values according to WirelessMAN-OFDM RF profile for 10 MHz channelization
    6.13 +  // Section 12.3.3.1 from IEEE 802.16-2004 standard
    6.14 +  // profR10_3 :
    6.15 +  // channels: 5000 + n ⋅ 5 MHz, ∀n ∈ { 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167 }
    6.16 +  // from a range 5GHz to 6GHz, according to Section 8.5.1.
    6.17 +  uint64_t frequency = 5000;
    6.18 +
    6.19 +  for (uint8_t i = 0; i < 200; i++)
    6.20      {
    6.21        m_dlChannels.push_back (frequency);
    6.22 -      frequency += 40;
    6.23 +      frequency += 5;
    6.24      }
    6.25  }
    6.26  
     7.1 --- a/src/devices/wimax/wimax-phy.cc	Fri Aug 06 21:55:17 2010 -0300
     7.2 +++ b/src/devices/wimax/wimax-phy.cc	Sat Aug 07 21:15:14 2010 -0300
     7.3 @@ -60,7 +60,7 @@
     7.4  
     7.5      .AddAttribute ("Bandwidth",
     7.6                     "The channel bandwidth in Hz.",
     7.7 -                   UintegerValue (20000000),
     7.8 +                   UintegerValue (10000000),
     7.9                     MakeUintegerAccessor (&WimaxPhy::SetChannelBandwidth, &WimaxPhy::GetChannelBandwidth),
    7.10                     MakeUintegerChecker<uint32_t> (5000000, 30000000))
    7.11  
    7.12 @@ -73,7 +73,7 @@
    7.13      m_nrCarriers (0),
    7.14      m_frameDuration (Seconds (0.01)),
    7.15      m_frequency (5000000),
    7.16 -    m_channelBandwidth (20000000),
    7.17 +    m_channelBandwidth (10000000),
    7.18      m_psDuration (Seconds (0)),
    7.19      m_symbolDuration (Seconds (0)),
    7.20      m_psPerSymbol (0),