ChannelNumber attribute added to YansWifiPhy. Now it is possible to setup wifi channel using WifiPhyHelper::Set() method.
authorPavel Boyko <boyko@iitp.ru>
Fri Nov 13 14:51:59 2009 +0300 (2 months ago)
changeset 5511d77201fa5ee2
parent 5510 ff4cb6dfdad5
child 5512 28bccc88b34c
ChannelNumber attribute added to YansWifiPhy. Now it is possible to setup wifi channel using WifiPhyHelper::Set() method.
src/devices/wifi/yans-wifi-phy.cc
     1.1 --- a/src/devices/wifi/yans-wifi-phy.cc	Fri Nov 13 13:23:08 2009 +0300
     1.2 +++ b/src/devices/wifi/yans-wifi-phy.cc	Fri Nov 13 14:51:59 2009 +0300
     1.3 @@ -114,12 +114,20 @@
     1.4                     TimeValue (MicroSeconds (250)),
     1.5                     MakeTimeAccessor (&YansWifiPhy::m_channelSwitchDelay), 
     1.6                     MakeTimeChecker ())
     1.7 +    .AddAttribute ("ChannelNumber",
     1.8 +                   "Channel center frequency = Channel starting frequency + 5 MHz * (nch - 1)",
     1.9 +                   UintegerValue (1),
    1.10 +                   MakeUintegerAccessor (&YansWifiPhy::SetChannelNumber, 
    1.11 +                                         &YansWifiPhy::GetChannelNumber),
    1.12 +                   MakeUintegerChecker<uint16_t> ())
    1.13 +
    1.14      ;
    1.15    return tid;
    1.16  }
    1.17  
    1.18  YansWifiPhy::YansWifiPhy ()
    1.19 -  :  m_endSyncEvent (),
    1.20 +  :  m_channelNumber (1),
    1.21 +     m_endSyncEvent (),
    1.22       m_random (0.0, 1.0),
    1.23       m_channelStartingFrequency (0)
    1.24  {
    1.25 @@ -304,7 +312,6 @@
    1.26  {
    1.27    m_channel = channel;
    1.28    m_channel->Add (this);
    1.29 -  m_channelNumber = 1;      // always start on channel starting frequency (channel 1)
    1.30  }
    1.31  
    1.32  void