OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2009 University of Washington | 2 * Copyright (c) 2009 University of Washington |
3 * | 3 * |
4 * This program is free software; you can redistribute it and/or modify | 4 * This program is free software; you can redistribute it and/or modify |
5 * it under the terms of the GNU General Public License version 2 as | 5 * it under the terms of the GNU General Public License version 2 as |
6 * published by the Free Software Foundation; | 6 * published by the Free Software Foundation; |
7 * | 7 * |
8 * This program is distributed in the hope that it will be useful, | 8 * This program is distributed in the hope that it will be useful, |
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 // The below set of helpers will help us to put together the wifi NICs we want | 141 // The below set of helpers will help us to put together the wifi NICs we want |
142 WifiHelper wifi; | 142 WifiHelper wifi; |
143 wifi.SetStandard (WIFI_PHY_STANDARD_80211b); | 143 wifi.SetStandard (WIFI_PHY_STANDARD_80211b); |
144 ·· | 144 ·· |
145 YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default (); | 145 YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default (); |
146 // This is one parameter that matters when using FixedRssLossModel | 146 // This is one parameter that matters when using FixedRssLossModel |
147 // set it to zero; otherwise, gain will be added | 147 // set it to zero; otherwise, gain will be added |
148 wifiPhy.Set ("RxGain", DoubleValue (0) );· | 148 wifiPhy.Set ("RxGain", DoubleValue (0) );· |
149 wifiPhy.Set ("CcaMode1Threshold", DoubleValue (0.0) ); | 149 wifiPhy.Set ("CcaMode1Threshold", DoubleValue (0.0) ); |
150 ·· | 150 ·· |
151 // ns-3 support RadioTap and Prism tracing extensions for 802.11b | 151 // ns-3 supports RadioTap and Prism tracing extensions for 802.11b |
152 wifiPhy.SetPcapFormat (YansWifiPhyHelper::PCAP_FORMAT_80211_RADIOTAP);· | 152 const uint32_t DLT_IEEE802_11_RADIO = 127; |
| 153 wifiPhy.SetPcapDataLinkType (DLT_IEEE802_11_RADIO);· |
153 ·· | 154 ·· |
154 YansWifiChannelHelper wifiChannel ; | 155 YansWifiChannelHelper wifiChannel ; |
155 wifiChannel.SetPropagationDelay ("ns3::ConstantSpeedPropagationDelayModel"); | 156 wifiChannel.SetPropagationDelay ("ns3::ConstantSpeedPropagationDelayModel"); |
156 wifiChannel.AddPropagationLoss ("ns3::LogDistancePropagationLossModel"); | 157 wifiChannel.AddPropagationLoss ("ns3::LogDistancePropagationLossModel"); |
157 wifiPhy.SetChannel (wifiChannel.Create ()); | 158 wifiPhy.SetChannel (wifiChannel.Create ()); |
158 ·· | 159 ·· |
159 // Add a non-QoS upper mac, and disable rate control | 160 // Add a non-QoS upper mac, and disable rate control |
160 NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default (); | 161 NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default (); |
161 wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager", | 162 wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager", |
162 "DataMode",StringValue(phyMode), | 163 "DataMode",StringValue(phyMode), |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 }; | 272 }; |
272 | 273 |
273 WifiInterferenceTestSuite::WifiInterferenceTestSuite () | 274 WifiInterferenceTestSuite::WifiInterferenceTestSuite () |
274 : TestSuite ("ns3-wifi-interference", UNIT) | 275 : TestSuite ("ns3-wifi-interference", UNIT) |
275 { | 276 { |
276 AddTestCase (new WifiInterferenceTestCase); | 277 AddTestCase (new WifiInterferenceTestCase); |
277 } | 278 } |
278 | 279 |
279 WifiInterferenceTestSuite wifiInterferenceTestSuite; | 280 WifiInterferenceTestSuite wifiInterferenceTestSuite; |
280 | 281 |
OLD | NEW |