View | Details | Raw Unified | Return to bug 2460
Collapse All | Expand All

(-)a/CHANGES.html (+4 lines)
 Lines 65-70   us a note on ns-developers mailing list.</p> Link Here 
65
    RandomRectanglePositionAllocator, RandomDiscPositionAllocator,
65
    RandomRectanglePositionAllocator, RandomDiscPositionAllocator,
66
    UniformDiscPositionAllocator.
66
    UniformDiscPositionAllocator.
67
  </li>
67
  </li>
68
  <li>
69
    The WifiPhy attribute "CcaMode1Threshold" has been renamed to "CcaEdThreshold", 
70
    and the WifiPhy attribute "EnergyDetectionThreshold" has been replaced by a new attribute called "RxSensitivity"
71
  </li>
68
</ul>
72
</ul>
69
<h2>Changes to build system:</h2>
73
<h2>Changes to build system:</h2>
70
<ul>
74
<ul>
(-)a/examples/energy/energy-model-example.cc (-9 / +1 lines)
 Lines 131-141   main (int argc, char *argv[]) Link Here 
131
  double interval = 1;          // seconds
131
  double interval = 1;          // seconds
132
  double startTime = 0.0;       // seconds
132
  double startTime = 0.0;       // seconds
133
  double distanceToRx = 100.0;  // meters
133
  double distanceToRx = 100.0;  // meters
134
  /*
135
   * This is a magic number used to set the transmit power, based on other
136
   * configuration.
137
   */
138
  double offset = 81;
139
134
140
  CommandLine cmd;
135
  CommandLine cmd;
141
  cmd.AddValue ("phyMode", "Wifi Phy mode", phyMode);
136
  cmd.AddValue ("phyMode", "Wifi Phy mode", phyMode);
 Lines 177-191   main (int argc, char *argv[]) Link Here 
177
  /** Wifi PHY **/
172
  /** Wifi PHY **/
178
  /***************************************************************************/
173
  /***************************************************************************/
179
  YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
174
  YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
180
  wifiPhy.Set ("RxGain", DoubleValue (-10));
181
  wifiPhy.Set ("TxGain", DoubleValue (offset + Prss));
182
  wifiPhy.Set ("CcaMode1Threshold", DoubleValue (0.0));
183
  /***************************************************************************/
184
175
185
  /** wifi channel **/
176
  /** wifi channel **/
186
  YansWifiChannelHelper wifiChannel;
177
  YansWifiChannelHelper wifiChannel;
187
  wifiChannel.SetPropagationDelay ("ns3::ConstantSpeedPropagationDelayModel");
178
  wifiChannel.SetPropagationDelay ("ns3::ConstantSpeedPropagationDelayModel");
188
  wifiChannel.AddPropagationLoss ("ns3::FriisPropagationLossModel");
179
  wifiChannel.AddPropagationLoss ("ns3::FriisPropagationLossModel");
180
  
189
  // create wifi channel
181
  // create wifi channel
190
  Ptr<YansWifiChannel> wifiChannelPtr = wifiChannel.Create ();
182
  Ptr<YansWifiChannel> wifiChannelPtr = wifiChannel.Create ();
191
  wifiPhy.SetChannel (wifiChannelPtr);
183
  wifiPhy.SetChannel (wifiChannelPtr);
(-)a/examples/energy/energy-model-with-harvesting-example.cc (-9 / +1 lines)
 Lines 169-179   main (int argc, char *argv[]) Link Here 
169
  double interval = 1;          // seconds
169
  double interval = 1;          // seconds
170
  double startTime = 0.0;       // seconds
170
  double startTime = 0.0;       // seconds
171
  double distanceToRx = 100.0;  // meters
171
  double distanceToRx = 100.0;  // meters
172
  /*
173
   * This is a magic number used to set the transmit power, based on other
174
   * configuration.
175
   */
176
  double offset = 81;
177
  
172
  
178
  // Energy Harvester variables
173
  // Energy Harvester variables
179
  double harvestingUpdateInterval = 1;  // seconds
174
  double harvestingUpdateInterval = 1;  // seconds
 Lines 218-232   main (int argc, char *argv[]) Link Here 
218
  /** Wifi PHY **/
213
  /** Wifi PHY **/
219
  /***************************************************************************/
214
  /***************************************************************************/
220
  YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
215
  YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
221
  wifiPhy.Set ("RxGain", DoubleValue (-10));
222
  wifiPhy.Set ("TxGain", DoubleValue (offset + Prss));
223
  wifiPhy.Set ("CcaMode1Threshold", DoubleValue (0.0));
224
  /***************************************************************************/
225
216
226
  /** wifi channel **/
217
  /** wifi channel **/
227
  YansWifiChannelHelper wifiChannel;
218
  YansWifiChannelHelper wifiChannel;
228
  wifiChannel.SetPropagationDelay ("ns3::ConstantSpeedPropagationDelayModel");
219
  wifiChannel.SetPropagationDelay ("ns3::ConstantSpeedPropagationDelayModel");
229
  wifiChannel.AddPropagationLoss ("ns3::FriisPropagationLossModel");
220
  wifiChannel.AddPropagationLoss ("ns3::FriisPropagationLossModel");
221
230
  // create wifi channel
222
  // create wifi channel
231
  Ptr<YansWifiChannel> wifiChannelPtr = wifiChannel.Create ();
223
  Ptr<YansWifiChannel> wifiChannelPtr = wifiChannel.Create ();
232
  wifiPhy.SetChannel (wifiChannelPtr);
224
  wifiPhy.SetChannel (wifiChannelPtr);
(-)a/examples/wireless/wifi-clear-channel-cmu.cc (-2 lines)
 Lines 208-215   int main (int argc, char *argv[]) Link Here 
208
208
209
          NS_LOG_DEBUG (modes[i]);
209
          NS_LOG_DEBUG (modes[i]);
210
          experiment = Experiment (modes[i]);
210
          experiment = Experiment (modes[i]);
211
          wifiPhy.Set ("EnergyDetectionThreshold", DoubleValue (-110.0) );
212
          wifiPhy.Set ("CcaMode1Threshold", DoubleValue (-110.0) );
213
          wifiPhy.Set ("TxPowerStart", DoubleValue (15.0) );
211
          wifiPhy.Set ("TxPowerStart", DoubleValue (15.0) );
214
          wifiPhy.Set ("TxPowerEnd", DoubleValue (15.0) );
212
          wifiPhy.Set ("TxPowerEnd", DoubleValue (15.0) );
215
          wifiPhy.Set ("RxGain", DoubleValue (0) );
213
          wifiPhy.Set ("RxGain", DoubleValue (0) );
(-)a/examples/wireless/wifi-simple-interference.cc (-4 lines)
 Lines 178-186   int main (int argc, char *argv[]) Link Here 
178
  wifi.SetStandard (WIFI_PHY_STANDARD_80211b);
178
  wifi.SetStandard (WIFI_PHY_STANDARD_80211b);
179
179
180
  YansWifiPhyHelper wifiPhy =  YansWifiPhyHelper::Default ();
180
  YansWifiPhyHelper wifiPhy =  YansWifiPhyHelper::Default ();
181
  // set it to zero; otherwise, gain will be added
182
  wifiPhy.Set ("RxGain", DoubleValue (0) );
183
  wifiPhy.Set ("CcaMode1Threshold", DoubleValue (0.0) );
184
181
185
  // ns-3 supports RadioTap and Prism tracing extensions for 802.11b
182
  // ns-3 supports RadioTap and Prism tracing extensions for 802.11b
186
  wifiPhy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO);
183
  wifiPhy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO);
 Lines 200-206   int main (int argc, char *argv[]) Link Here 
200
  NetDeviceContainer devices = wifi.Install (wifiPhy, wifiMac, c.Get (0));
197
  NetDeviceContainer devices = wifi.Install (wifiPhy, wifiMac, c.Get (0));
201
  // This will disable these sending devices from detecting a signal
198
  // This will disable these sending devices from detecting a signal
202
  // so that they do not backoff
199
  // so that they do not backoff
203
  wifiPhy.Set ("EnergyDetectionThreshold", DoubleValue (0.0) );
204
  wifiPhy.Set ("TxGain", DoubleValue (offset + Prss) );
200
  wifiPhy.Set ("TxGain", DoubleValue (offset + Prss) );
205
  devices.Add (wifi.Install (wifiPhy, wifiMac, c.Get (1)));
201
  devices.Add (wifi.Install (wifiPhy, wifiMac, c.Get (1)));
206
  wifiPhy.Set ("TxGain", DoubleValue (offset + Irss) );
202
  wifiPhy.Set ("TxGain", DoubleValue (offset + Irss) );
(-)a/examples/wireless/wifi-spectrum-per-example.cc (-3 lines)
 Lines 183-191   int main (int argc, char *argv[]) Link Here 
183
        }
183
        }
184
      else if (wifiType == "ns3::SpectrumWifiPhy")
184
      else if (wifiType == "ns3::SpectrumWifiPhy")
185
        {
185
        {
186
          //Bug 2460: CcaMode1Threshold default should be set to -62 dBm when using Spectrum
187
          Config::SetDefault ("ns3::WifiPhy::CcaMode1Threshold", DoubleValue (-62.0));
188
189
          Ptr<MultiModelSpectrumChannel> spectrumChannel
186
          Ptr<MultiModelSpectrumChannel> spectrumChannel
190
            = CreateObject<MultiModelSpectrumChannel> ();
187
            = CreateObject<MultiModelSpectrumChannel> ();
191
          Ptr<FriisPropagationLossModel> lossModel
188
          Ptr<FriisPropagationLossModel> lossModel
(-)a/examples/wireless/wifi-spectrum-per-interference.cc (-3 lines)
 Lines 212-220   int main (int argc, char *argv[]) Link Here 
212
        }
212
        }
213
      else if (wifiType == "ns3::SpectrumWifiPhy")
213
      else if (wifiType == "ns3::SpectrumWifiPhy")
214
        {
214
        {
215
          //Bug 2460: CcaMode1Threshold default should be set to -62 dBm when using Spectrum
216
          Config::SetDefault ("ns3::WifiPhy::CcaMode1Threshold", DoubleValue (-62.0));
217
218
          spectrumChannel
215
          spectrumChannel
219
            = CreateObject<MultiModelSpectrumChannel> ();
216
            = CreateObject<MultiModelSpectrumChannel> ();
220
          Ptr<FriisPropagationLossModel> lossModel
217
          Ptr<FriisPropagationLossModel> lossModel
(-)a/examples/wireless/wifi-spectrum-saturation-example.cc (-3 lines)
 Lines 178-186   int main (int argc, char *argv[]) Link Here 
178
        }
178
        }
179
      else if (wifiType == "ns3::SpectrumWifiPhy")
179
      else if (wifiType == "ns3::SpectrumWifiPhy")
180
        {
180
        {
181
          //Bug 2460: CcaMode1Threshold default should be set to -62 dBm when using Spectrum
182
          Config::SetDefault ("ns3::WifiPhy::CcaMode1Threshold", DoubleValue (-62.0));
183
184
          Ptr<MultiModelSpectrumChannel> spectrumChannel
181
          Ptr<MultiModelSpectrumChannel> spectrumChannel
185
            = CreateObject<MultiModelSpectrumChannel> ();
182
            = CreateObject<MultiModelSpectrumChannel> ();
186
          Ptr<FriisPropagationLossModel> lossModel
183
          Ptr<FriisPropagationLossModel> lossModel
(-)a/examples/wireless/wifi-tcp.cc (-8 lines)
 Lines 119-132   main (int argc, char *argv[]) Link Here 
119
  /* Setup Physical Layer */
119
  /* Setup Physical Layer */
120
  YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
120
  YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
121
  wifiPhy.SetChannel (wifiChannel.Create ());
121
  wifiPhy.SetChannel (wifiChannel.Create ());
122
  wifiPhy.Set ("TxPowerStart", DoubleValue (10.0));
123
  wifiPhy.Set ("TxPowerEnd", DoubleValue (10.0));
124
  wifiPhy.Set ("TxPowerLevels", UintegerValue (1));
125
  wifiPhy.Set ("TxGain", DoubleValue (0));
126
  wifiPhy.Set ("RxGain", DoubleValue (0));
127
  wifiPhy.Set ("RxNoiseFigure", DoubleValue (10));
128
  wifiPhy.Set ("CcaMode1Threshold", DoubleValue (-79));
129
  wifiPhy.Set ("EnergyDetectionThreshold", DoubleValue (-79 + 3));
130
  wifiPhy.SetErrorRateModel ("ns3::YansErrorRateModel");
122
  wifiPhy.SetErrorRateModel ("ns3::YansErrorRateModel");
131
  wifiHelper.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
123
  wifiHelper.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
132
                                      "DataMode", StringValue (phyRate),
124
                                      "DataMode", StringValue (phyRate),
(-)a/src/aodv/test/aodv-regression.cc (-2 / +1 lines)
 Lines 168-175   ChainRegressionTest::CreateDevices () Link Here 
168
  YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
168
  YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
169
  Ptr<YansWifiChannel> chan = wifiChannel.Create ();
169
  Ptr<YansWifiChannel> chan = wifiChannel.Create ();
170
  wifiPhy.SetChannel (chan);
170
  wifiPhy.SetChannel (chan);
171
  wifiPhy.Set ("TxGain", DoubleValue (1.0)); //this configuration should go away in future revision to the test
171
172
  wifiPhy.Set ("RxGain", DoubleValue (1.0)); //this configuration should go away in future revision to the test
173
  // This test suite output was originally based on YansErrorRateModel
172
  // This test suite output was originally based on YansErrorRateModel
174
  wifiPhy.SetErrorRateModel ("ns3::YansErrorRateModel");
173
  wifiPhy.SetErrorRateModel ("ns3::YansErrorRateModel");
175
  WifiHelper wifi;
174
  WifiHelper wifi;
(-)a/src/mesh/test/dot11s/hwmp-proactive-regression.cc (-2 / +1 lines)
 Lines 113-120   HwmpProactiveRegressionTest::CreateDevices () Link Here 
113
  YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
113
  YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
114
  Ptr<YansWifiChannel> chan = wifiChannel.Create ();
114
  Ptr<YansWifiChannel> chan = wifiChannel.Create ();
115
  wifiPhy.SetChannel (chan);
115
  wifiPhy.SetChannel (chan);
116
  wifiPhy.Set ("TxGain", DoubleValue (1.0)); //this configuration should go away in future revision to the test
116
117
  wifiPhy.Set ("RxGain", DoubleValue (1.0)); //this configuration should go away in future revision to the test
118
  // 2. setup mesh
117
  // 2. setup mesh
119
  MeshHelper mesh = MeshHelper::Default ();
118
  MeshHelper mesh = MeshHelper::Default ();
120
  mesh.SetStackInstaller ("ns3::Dot11sStack", "Root", Mac48AddressValue (Mac48Address ("00:00:00:00:00:0d")));
119
  mesh.SetStackInstaller ("ns3::Dot11sStack", "Root", Mac48AddressValue (Mac48Address ("00:00:00:00:00:0d")));
(-)a/src/mesh/test/dot11s/hwmp-reactive-regression.cc (-2 lines)
 Lines 114-121   HwmpReactiveRegressionTest::CreateDevices () Link Here 
114
  YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
114
  YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
115
  Ptr<YansWifiChannel> chan = wifiChannel.Create ();
115
  Ptr<YansWifiChannel> chan = wifiChannel.Create ();
116
  wifiPhy.SetChannel (chan);
116
  wifiPhy.SetChannel (chan);
117
  wifiPhy.Set ("TxGain", DoubleValue (1.0)); //this configuration should go away in future revision to the test
118
  wifiPhy.Set ("RxGain", DoubleValue (1.0)); //this configuration should go away in future revision to the test
119
117
120
  // 2. setup mesh
118
  // 2. setup mesh
121
  MeshHelper mesh = MeshHelper::Default ();
119
  MeshHelper mesh = MeshHelper::Default ();
(-)a/src/mesh/test/dot11s/hwmp-simplest-regression.cc (-2 / +1 lines)
 Lines 122-129   HwmpSimplestRegressionTest::CreateDevices () Link Here 
122
  YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
122
  YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
123
  Ptr<YansWifiChannel> chan = wifiChannel.Create ();
123
  Ptr<YansWifiChannel> chan = wifiChannel.Create ();
124
  wifiPhy.SetChannel (chan);
124
  wifiPhy.SetChannel (chan);
125
  wifiPhy.Set ("TxGain", DoubleValue (1.0)); //this configuration should go away in future revision to the test
125
126
  wifiPhy.Set ("RxGain", DoubleValue (1.0)); //this configuration should go away in future revision to the test
127
  // 2. setup mesh
126
  // 2. setup mesh
128
  MeshHelper mesh = MeshHelper::Default ();
127
  MeshHelper mesh = MeshHelper::Default ();
129
  mesh.SetStackInstaller ("ns3::Dot11sStack");
128
  mesh.SetStackInstaller ("ns3::Dot11sStack");
(-)a/src/mesh/test/dot11s/hwmp-target-flags-regression.cc (-2 / +1 lines)
 Lines 140-147   HwmpDoRfRegressionTest::CreateDevices () Link Here 
140
  YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
140
  YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
141
  Ptr<YansWifiChannel> chan = wifiChannel.Create ();
141
  Ptr<YansWifiChannel> chan = wifiChannel.Create ();
142
  wifiPhy.SetChannel (chan);
142
  wifiPhy.SetChannel (chan);
143
  wifiPhy.Set ("TxGain", DoubleValue (1.0)); //this configuration should go away in future revision to the test
143
144
  wifiPhy.Set ("RxGain", DoubleValue (1.0)); //this configuration should go away in future revision to the test
145
  // 2. setup mesh
144
  // 2. setup mesh
146
  MeshHelper mesh = MeshHelper::Default ();
145
  MeshHelper mesh = MeshHelper::Default ();
147
  mesh.SetStackInstaller ("ns3::Dot11sStack");
146
  mesh.SetStackInstaller ("ns3::Dot11sStack");
(-)a/src/mesh/test/flame/flame-regression.cc (-2 / +1 lines)
 Lines 99-106   FlameRegressionTest::CreateDevices () Link Here 
99
  YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
99
  YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
100
  Ptr<YansWifiChannel> chan = wifiChannel.Create ();
100
  Ptr<YansWifiChannel> chan = wifiChannel.Create ();
101
  wifiPhy.SetChannel (chan);
101
  wifiPhy.SetChannel (chan);
102
  wifiPhy.Set ("TxGain", DoubleValue (1.0)); //this configuration should go away in future revision to the test
102
103
  wifiPhy.Set ("RxGain", DoubleValue (1.0)); //this configuration should go away in future revision to the test
104
  // 2. setup mesh
103
  // 2. setup mesh
105
  MeshHelper mesh = MeshHelper::Default ();
104
  MeshHelper mesh = MeshHelper::Default ();
106
  mesh.SetStackInstaller ("ns3::FlameStack");
105
  mesh.SetStackInstaller ("ns3::FlameStack");
(-)a/src/test/ns3wifi/wifi-interference-test-suite.cc (-5 lines)
 Lines 137-146   WifiInterferenceTestCase::WifiSimpleInterference (std::string phyMode,double Prs Link Here 
137
  wifi.SetStandard (wifiStandard);
137
  wifi.SetStandard (wifiStandard);
138
138
139
  YansWifiPhyHelper wifiPhy =  YansWifiPhyHelper::Default ();
139
  YansWifiPhyHelper wifiPhy =  YansWifiPhyHelper::Default ();
140
  // This is one parameter that matters when using FixedRssLossModel
141
  // set it to zero; otherwise, gain will be added
142
  wifiPhy.Set ("RxGain", DoubleValue (0) ); 
143
  wifiPhy.Set ("CcaMode1Threshold", DoubleValue (0.0) );
144
140
145
  // ns-3 supports RadioTap and Prism tracing extensions for 802.11b
141
  // ns-3 supports RadioTap and Prism tracing extensions for 802.11b
146
  wifiPhy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO); 
142
  wifiPhy.SetPcapDataLinkType (WifiPhyHelper::DLT_IEEE802_11_RADIO); 
 Lines 172-178   WifiInterferenceTestCase::WifiSimpleInterference (std::string phyMode,double Prs Link Here 
172
168
173
  // This will disable these sending devices from detecting a signal 
169
  // This will disable these sending devices from detecting a signal 
174
  // so that they do not backoff
170
  // so that they do not backoff
175
  wifiPhy.Set ("EnergyDetectionThreshold", DoubleValue (0.0) );
176
  wifiPhy.Set ("TxGain", DoubleValue (offset + Prss) ); 
171
  wifiPhy.Set ("TxGain", DoubleValue (offset + Prss) ); 
177
  devices.Add (wifi.Install (wifiPhy, wifiMac, c.Get (1)));
172
  devices.Add (wifi.Install (wifiPhy, wifiMac, c.Get (1)));
178
  wifiPhy.Set ("TxGain", DoubleValue (offset + Irss) ); 
173
  wifiPhy.Set ("TxGain", DoubleValue (offset + Irss) ); 
(-)a/src/wifi/doc/source/wifi-design.rst (-23 / +13 lines)
 Lines 284-291   The PHY layer can be in one of six states: Link Here 
284
#. SLEEP: the PHY is in a power save mode and cannot send nor receive frames.
284
#. SLEEP: the PHY is in a power save mode and cannot send nor receive frames.
285
285
286
Packet reception works as follows.  The ``YansWifiPhy`` attribute 
286
Packet reception works as follows.  The ``YansWifiPhy`` attribute 
287
CcaMode1Threshold 
287
CcaEdThreshold corresponds to what the standard calls the "ED threshold" for CCA Mode 1.
288
corresponds to what the standard calls the "ED threshold" for CCA Mode 1.  
289
In section 16.4.8.5:  "CCA Mode 1: Energy above threshold. CCA shall report 
288
In section 16.4.8.5:  "CCA Mode 1: Energy above threshold. CCA shall report 
290
a busy medium upon detection of any energy above the ED threshold."  
289
a busy medium upon detection of any energy above the ED threshold."  
291
290
 Lines 295-317   However, the model doesn't support this, because there are no 'foreign' Link Here 
295
signals in the YansWifi model-- everything is a Wi-Fi signal.
294
signals in the YansWifi model-- everything is a Wi-Fi signal.
296
295
297
In the standard, there is also what is called the "minimum modulation
296
In the standard, there is also what is called the "minimum modulation
298
and coding rate sensitivity" in section 18.3.10.6 CCA requirements. This is 
297
and coding rate sensitivity" in section 18.3.10.6 CCA requirements. 
299
the -82 dBm requirement for 20 MHz channels.  This is analogous to the 
298
This is analogous to the RxSensitivity attribute in ``YansWifiPhy``.
300
EnergyDetectionThreshold attribute in ``YansWifiPhy``.  CCA busy state is 
299
CCA busy state is not raised in this model when this threshold is exceeded
301
not raised in this model when this threshold is exceeded but instead RX 
300
but instead RX state is immediately reached, since it is assumed that PLCP
302
state is immediately reached, since it is assumed that PLCP sync always 
301
sync always succeeds in this model. Even if the PLCP header reception fails, the 
303
succeeds in this model.  Even if the PLCP header reception fails, the 
304
channel state is still held in RX until YansWifiPhy::EndReceive().
302
channel state is still held in RX until YansWifiPhy::EndReceive().
305
303
306
In ns-3, the values of these attributes are set to small default values 
304
In ns-3, the values of these attributes are -101 dBm for RxSensitivity
307
(-96 dBm for EnergyDetectionThreshold and -99 dBm for CcaMode1Threshold).  
305
and -62 dBm for CcaEdThreshold.  
308
So, if a signal comes in at > -96 dBm and the state is IDLE or CCA BUSY, 
306
So, if a signal comes in at > -101 dBm and the state is IDLE or CCA BUSY, 
309
this model will lock onto it for the signal duration and raise RX state.  
307
this model will lock onto it for the signal duration and raise RX state.
310
If it comes in at <= -96 dBm but >= -99 dBm, it will definitely raise 
311
CCA BUSY but not RX state.  If it comes in < -99 dBm, it gets added to 
312
the interference tracker and, by itself, it will not raise CCA BUSY, but 
313
maybe a later signal will contribute more power so that the threshold 
314
of -99 dBm is reached at a later time.
315
308
316
The energy of the signal intended to be received is 
309
The energy of the signal intended to be received is 
317
calculated from the transmission power and adjusted based on the Tx gain
310
calculated from the transmission power and adjusted based on the Tx gain
 Lines 443-454   add their received power to the noise, in the same way that Link Here 
443
unintended Wi-Fi signals (perhaps from a different SSID or arriving
436
unintended Wi-Fi signals (perhaps from a different SSID or arriving
444
late from a hidden node) are added to the noise.
437
late from a hidden node) are added to the noise.
445
438
446
Third, the default value for CcaMode1Threshold attribute is -62 dBm
439
Unlike YansWifiPhy, where there are no foreign signals, CCA BUSY state
447
rather than the value of -99 dBm used for YansWifiPhy.  This is because,
440
will be raised for foreign signals that are higher than CcaEdThreshold
448
unlike YansWifiPhy, where there are no foreign signals, CCA BUSY state
441
(see section 16.4.8.5 in the 802.11-2012 standard for definition of CCA Mode 1).  
449
will be raised for foreign signals that are higher than this 'energy
450
detection' threshold (see section 16.4.8.5 in the 802.11-2012 standard
451
for definition of CCA Mode 1).  
452
442
453
To support the Spectrum channel, the ``YansWifiPhy`` transmit and receive methods
443
To support the Spectrum channel, the ``YansWifiPhy`` transmit and receive methods
454
were adapted to use the Spectrum channel API.  This required developing
444
were adapted to use the Spectrum channel API.  This required developing
(-)a/src/wifi/examples/wifi-manager-example.cc (-3 lines)
 Lines 336-344   int main (int argc, char *argv[]) Link Here 
336
  WifiHelper wifi;
336
  WifiHelper wifi;
337
  wifi.SetStandard (serverSelectedStandard.m_standard);
337
  wifi.SetStandard (serverSelectedStandard.m_standard);
338
  YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
338
  YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
339
  wifiPhy.Set ("RxNoiseFigure", DoubleValue (0.0));
340
  wifiPhy.Set ("EnergyDetectionThreshold", DoubleValue (-110.0));
341
  wifiPhy.Set ("CcaMode1Threshold", DoubleValue (-110.0));
342
339
343
  Ptr<YansWifiChannel> wifiChannel = CreateObject<YansWifiChannel> ();
340
  Ptr<YansWifiChannel> wifiChannel = CreateObject<YansWifiChannel> ();
344
  Ptr<ConstantSpeedPropagationDelayModel> delayModel = CreateObject<ConstantSpeedPropagationDelayModel> ();
341
  Ptr<ConstantSpeedPropagationDelayModel> delayModel = CreateObject<ConstantSpeedPropagationDelayModel> ();
(-)a/src/wifi/model/spectrum-wifi-phy.cc (+8 lines)
 Lines 242-247   SpectrumWifiPhy::StartRx (Ptr<SpectrumSignalParameters> rxParams) Link Here 
242
242
243
  // Log the signal arrival to the trace source
243
  // Log the signal arrival to the trace source
244
  m_signalCb (wifiRxParams ? true : false, senderNodeId, WToDbm (rxPowerW), rxDuration);
244
  m_signalCb (wifiRxParams ? true : false, senderNodeId, WToDbm (rxPowerW), rxDuration);
245
246
  // Do no further processing if signal is too weak
247
  // Current implementation assumes constant rx power over the packet duration
248
  if (WToDbm (rxPowerW) < GetRxSensitivity ())
249
    {
250
      NS_LOG_INFO ("Received signal too weak to process: " << WToDbm (rxPowerW) << " dBm");
251
      return;
252
    }
245
  if (wifiRxParams == 0)
253
  if (wifiRxParams == 0)
246
    {
254
    {
247
      NS_LOG_INFO ("Received non Wi-Fi signal");
255
      NS_LOG_INFO ("Received non Wi-Fi signal");
(-)a/src/wifi/model/wifi-phy-state-helper.cc (+1 lines)
 Lines 517-522   WifiPhyStateHelper::SwitchMaybeToCcaBusy (Time duration) Link Here 
517
    {
517
    {
518
      m_startCcaBusy = now;
518
      m_startCcaBusy = now;
519
    }
519
    }
520
  m_stateLogger (now, duration, WifiPhyState::CCA_BUSY);
520
  m_endCcaBusy = std::max (m_endCcaBusy, now + duration);
521
  m_endCcaBusy = std::max (m_endCcaBusy, now + duration);
521
}
522
}
522
523
(-)a/src/wifi/model/wifi-phy.cc (-79 / +84 lines)
 Lines 182-195   WifiPhy::GetTypeId (void) Link Here 
182
                   "The energy of a received signal should be higher than "
182
                   "The energy of a received signal should be higher than "
183
                   "this threshold (dbm) to allow the PHY layer to detect the signal.",
183
                   "this threshold (dbm) to allow the PHY layer to detect the signal.",
184
                   DoubleValue (-96.0),
184
                   DoubleValue (-96.0),
185
                   MakeDoubleAccessor (&WifiPhy::SetEdThreshold),
185
                   MakeDoubleAccessor (&WifiPhy::m_edThreshold),
186
                   MakeDoubleChecker<double> ())
186
                   MakeDoubleChecker<double> (),
187
    .AddAttribute ("CcaMode1Threshold",
187
                   TypeId::DEPRECATED, "Replaced by RxSensitivity, this attribute has no effect.")
188
    .AddAttribute ("RxSensitivity",
188
                   "The energy of a received signal should be higher than "
189
                   "The energy of a received signal should be higher than "
189
                   "this threshold (dbm) to allow the PHY layer to declare CCA BUSY state.",
190
                   "this threshold (dBm) for the PHY to detect the signal.",
190
                   DoubleValue (-99.0),
191
                   DoubleValue (-101.0),
191
                   MakeDoubleAccessor (&WifiPhy::SetCcaMode1Threshold,
192
                   MakeDoubleAccessor (&WifiPhy::SetRxSensitivity,
192
                                       &WifiPhy::GetCcaMode1Threshold),
193
                                       &WifiPhy::GetRxSensitivity),
194
                   MakeDoubleChecker<double> ())
195
    .AddAttribute ("CcaEdThreshold",
196
                   "The energy of a non Wi-Fi received signal should be higher than "
197
                   "this threshold (dbm) to allow the PHY layer to declare CCA BUSY state. "
198
                   "This check is performed on the 20 MHz primary channel only.",
199
                   DoubleValue (-62.0),
200
                   MakeDoubleAccessor (&WifiPhy::SetCcaEdThreshold,
201
                                       &WifiPhy::GetCcaEdThreshold),
193
                   MakeDoubleChecker<double> ())
202
                   MakeDoubleChecker<double> ())
194
    .AddAttribute ("TxGain",
203
    .AddAttribute ("TxGain",
195
                   "Transmission gain (dB).",
204
                   "Transmission gain (dB).",
 Lines 404-409   WifiPhy::DoInitialize (void) Link Here 
404
  InitializeFrequencyChannelNumber ();
413
  InitializeFrequencyChannelNumber ();
405
}
414
}
406
415
416
Ptr<WifiPhyStateHelper>
417
WifiPhy::GetState (void) const
418
{
419
  return m_state;
420
}
421
407
void
422
void
408
WifiPhy::SetReceiveOkCallback (RxOkCallback callback)
423
WifiPhy::SetReceiveOkCallback (RxOkCallback callback)
409
{
424
{
 Lines 463-491   WifiPhy::InitializeFrequencyChannelNumber (void) Link Here 
463
}
478
}
464
479
465
void
480
void
466
WifiPhy::SetEdThreshold (double threshold)
481
WifiPhy::SetRxSensitivity (double threshold)
467
{
482
{
468
  NS_LOG_FUNCTION (this << threshold);
483
  NS_LOG_FUNCTION (this << threshold);
469
  m_edThresholdW = DbmToW (threshold);
484
  m_rxSensitivityW = DbmToW (threshold);
470
}
485
}
471
486
472
double
487
double
473
WifiPhy::GetEdThreshold (void) const
488
WifiPhy::GetRxSensitivity (void) const
474
{
489
{
475
  return WToDbm (m_edThresholdW);
490
  return WToDbm (m_rxSensitivityW);
476
}
491
}
477
492
478
void
493
void
479
WifiPhy::SetCcaMode1Threshold (double threshold)
494
WifiPhy::SetCcaEdThreshold (double threshold)
480
{
495
{
481
  NS_LOG_FUNCTION (this << threshold);
496
  NS_LOG_FUNCTION (this << threshold);
482
  m_ccaMode1ThresholdW = DbmToW (threshold);
497
  m_ccaEdThresholdW = DbmToW (threshold);
483
}
498
}
484
499
485
double
500
double
486
WifiPhy::GetCcaMode1Threshold (void) const
501
WifiPhy::GetCcaEdThreshold (void) const
487
{
502
{
488
  return WToDbm (m_ccaMode1ThresholdW);
503
  return WToDbm (m_ccaEdThresholdW);
489
}
504
}
490
505
491
void
506
void
 Lines 1627-1633   WifiPhy::ResumeFromSleep (void) Link Here 
1627
    case WifiPhyState::SLEEP:
1642
    case WifiPhyState::SLEEP:
1628
      {
1643
      {
1629
        NS_LOG_DEBUG ("resuming from sleep mode");
1644
        NS_LOG_DEBUG ("resuming from sleep mode");
1630
        Time delayUntilCcaEnd = m_interference.GetEnergyDuration (m_ccaMode1ThresholdW);
1645
        Time delayUntilCcaEnd = m_interference.GetEnergyDuration (m_ccaEdThresholdW);
1631
        m_state->SwitchFromSleep (delayUntilCcaEnd);
1646
        m_state->SwitchFromSleep (delayUntilCcaEnd);
1632
        break;
1647
        break;
1633
      }
1648
      }
 Lines 1658-1664   WifiPhy::ResumeFromOff (void) Link Here 
1658
    case WifiPhyState::OFF:
1673
    case WifiPhyState::OFF:
1659
      {
1674
      {
1660
        NS_LOG_DEBUG ("resuming from off mode");
1675
        NS_LOG_DEBUG ("resuming from off mode");
1661
        Time delayUntilCcaEnd = m_interference.GetEnergyDuration (DbmToW (GetCcaMode1Threshold ()));
1676
        Time delayUntilCcaEnd = m_interference.GetEnergyDuration (DbmToW (GetCcaEdThreshold ()));
1662
        m_state->SwitchFromOff (delayUntilCcaEnd);
1677
        m_state->SwitchFromOff (delayUntilCcaEnd);
1663
        break;
1678
        break;
1664
      }
1679
      }
 Lines 2526-2532   WifiPhy::MaybeCcaBusyDuration () Link Here 
2526
  //In this model, CCA becomes busy when the aggregation of all signals as
2541
  //In this model, CCA becomes busy when the aggregation of all signals as
2527
  //tracked by the InterferenceHelper class is higher than the CcaBusyThreshold
2542
  //tracked by the InterferenceHelper class is higher than the CcaBusyThreshold
2528
2543
2529
  Time delayUntilCcaEnd = m_interference.GetEnergyDuration (DbmToW (GetCcaMode1Threshold ()));
2544
  Time delayUntilCcaEnd = m_interference.GetEnergyDuration (DbmToW (GetCcaEdThreshold ()));
2530
  if (!delayUntilCcaEnd.IsZero ())
2545
  if (!delayUntilCcaEnd.IsZero ())
2531
    {
2546
    {
2532
      m_state->SwitchMaybeToCcaBusy (delayUntilCcaEnd);
2547
      m_state->SwitchMaybeToCcaBusy (delayUntilCcaEnd);
 Lines 3622-3628   WifiPhy::SwitchMaybeToCcaBusy (void) Link Here 
3622
  //In this model, CCA becomes busy when the aggregation of all signals as
3637
  //In this model, CCA becomes busy when the aggregation of all signals as
3623
  //tracked by the InterferenceHelper class is higher than the CcaBusyThreshold
3638
  //tracked by the InterferenceHelper class is higher than the CcaBusyThreshold
3624
3639
3625
  Time delayUntilCcaEnd = m_interference.GetEnergyDuration (DbmToW (GetCcaMode1Threshold ()));
3640
  Time delayUntilCcaEnd = m_interference.GetEnergyDuration (DbmToW (GetCcaEdThreshold ()));
3626
  if (!delayUntilCcaEnd.IsZero ())
3641
  if (!delayUntilCcaEnd.IsZero ())
3627
    {
3642
    {
3628
      NS_LOG_DEBUG ("Calling SwitchMaybeToCcaBusy for " << delayUntilCcaEnd.As (Time::S));
3643
      NS_LOG_DEBUG ("Calling SwitchMaybeToCcaBusy for " << delayUntilCcaEnd.As (Time::S));
 Lines 3652-3727   void Link Here 
3652
WifiPhy::StartRx (Ptr<Packet> packet, WifiTxVector txVector, MpduType mpdutype, double rxPowerW, Time rxDuration, Ptr<Event> event)
3667
WifiPhy::StartRx (Ptr<Packet> packet, WifiTxVector txVector, MpduType mpdutype, double rxPowerW, Time rxDuration, Ptr<Event> event)
3653
{
3668
{
3654
  NS_LOG_FUNCTION (this << packet << txVector << +mpdutype << rxPowerW << rxDuration);
3669
  NS_LOG_FUNCTION (this << packet << txVector << +mpdutype << rxPowerW << rxDuration);
3655
  if (rxPowerW > m_edThresholdW) //checked here, no need to check in the payload reception (current implementation assumes constant rx power over the packet duration)
3670
3671
  AmpduTag ampduTag;
3672
  WifiPreamble preamble = txVector.GetPreambleType ();
3673
  if (preamble == WIFI_PREAMBLE_NONE && (m_mpdusNum == 0 || m_plcpSuccess == false))
3656
    {
3674
    {
3657
      AmpduTag ampduTag;
3675
      m_plcpSuccess = false;
3658
      WifiPreamble preamble = txVector.GetPreambleType ();
3676
      m_mpdusNum = 0;
3659
      if (preamble == WIFI_PREAMBLE_NONE && (m_mpdusNum == 0 || m_plcpSuccess == false))
3677
      NS_LOG_DEBUG ("drop packet because no PLCP preamble/header has been received");
3660
        {
3678
      NotifyRxDrop (packet);
3661
          m_plcpSuccess = false;
3679
      MaybeCcaBusyDuration ();
3662
          m_mpdusNum = 0;
3680
      return;
3663
          NS_LOG_DEBUG ("drop packet because no PLCP preamble/header has been received");
3681
    }
3664
          NotifyRxDrop (packet);
3682
  else if (preamble != WIFI_PREAMBLE_NONE && packet->PeekPacketTag (ampduTag) && m_mpdusNum == 0)
3665
          MaybeCcaBusyDuration ();
3683
    {
3666
          return;
3684
      //received the first MPDU in an MPDU
3667
        }
3685
      m_mpdusNum = ampduTag.GetRemainingNbOfMpdus ();
3668
      else if (preamble != WIFI_PREAMBLE_NONE && packet->PeekPacketTag (ampduTag) && m_mpdusNum == 0)
3686
      m_rxMpduReferenceNumber++;
3669
        {
3687
    }
3670
          //received the first MPDU in an MPDU
3688
  else if (preamble == WIFI_PREAMBLE_NONE && packet->PeekPacketTag (ampduTag) && m_mpdusNum > 0)
3671
          m_mpdusNum = ampduTag.GetRemainingNbOfMpdus ();
3689
    {
3672
          m_rxMpduReferenceNumber++;
3690
      //received the other MPDUs that are part of the A-MPDU
3673
        }
3691
      if (ampduTag.GetRemainingNbOfMpdus () < (m_mpdusNum - 1))
3674
      else if (preamble == WIFI_PREAMBLE_NONE && packet->PeekPacketTag (ampduTag) && m_mpdusNum > 0)
3675
        {
3676
          //received the other MPDUs that are part of the A-MPDU
3677
          if (ampduTag.GetRemainingNbOfMpdus () < (m_mpdusNum - 1))
3678
            {
3679
              NS_LOG_DEBUG ("Missing MPDU from the A-MPDU " << m_mpdusNum - ampduTag.GetRemainingNbOfMpdus ());
3680
              m_mpdusNum = ampduTag.GetRemainingNbOfMpdus ();
3681
            }
3682
          else
3683
            {
3684
              m_mpdusNum--;
3685
            }
3686
        }
3687
      else if (preamble != WIFI_PREAMBLE_NONE && packet->PeekPacketTag (ampduTag) && m_mpdusNum > 0)
3688
        {
3692
        {
3689
          NS_LOG_DEBUG ("New A-MPDU started while " << m_mpdusNum << " MPDUs from previous are lost");
3693
          NS_LOG_DEBUG ("Missing MPDU from the A-MPDU " << m_mpdusNum - ampduTag.GetRemainingNbOfMpdus ());
3690
          m_mpdusNum = ampduTag.GetRemainingNbOfMpdus ();
3694
          m_mpdusNum = ampduTag.GetRemainingNbOfMpdus ();
3691
        }
3695
        }
3692
      else if (preamble != WIFI_PREAMBLE_NONE && m_mpdusNum > 0 )
3696
      else
3693
        {
3697
        {
3694
          NS_LOG_DEBUG ("Didn't receive the last MPDUs from an A-MPDU " << m_mpdusNum);
3698
          m_mpdusNum--;
3695
          m_mpdusNum = 0;
3696
        }
3699
        }
3700
    }
3701
  else if (preamble != WIFI_PREAMBLE_NONE && packet->PeekPacketTag (ampduTag) && m_mpdusNum > 0)
3702
    {
3703
      NS_LOG_DEBUG ("New A-MPDU started while " << m_mpdusNum << " MPDUs from previous are lost");
3704
      m_mpdusNum = ampduTag.GetRemainingNbOfMpdus ();
3705
    }
3706
  else if (preamble != WIFI_PREAMBLE_NONE && m_mpdusNum > 0 )
3707
    {
3708
      NS_LOG_DEBUG ("Didn't receive the last MPDUs from an A-MPDU " << m_mpdusNum);
3709
      m_mpdusNum = 0;
3710
    }
3697
3711
3698
      NS_LOG_DEBUG ("sync to signal (power=" << rxPowerW << "W)");
3712
  NS_LOG_DEBUG ("sync to signal (power=" << rxPowerW << "W)");
3699
      m_currentEvent = event;
3713
  m_currentEvent = event;
3700
      m_state->SwitchToRx (rxDuration);
3714
  m_state->SwitchToRx (rxDuration);
3701
      NS_ASSERT (m_endPlcpRxEvent.IsExpired ());
3715
  NS_ASSERT (m_endPlcpRxEvent.IsExpired ());
3702
      NotifyRxBegin (packet);
3716
  NotifyRxBegin (packet);
3703
      m_interference.NotifyRxStart ();
3717
  m_interference.NotifyRxStart ();
3704
3705
      if (preamble != WIFI_PREAMBLE_NONE)
3706
        {
3707
          NS_ASSERT (m_endPlcpRxEvent.IsExpired ());
3708
          Time preambleAndHeaderDuration = CalculatePlcpPreambleAndHeaderDuration (txVector);
3709
          m_endPlcpRxEvent = Simulator::Schedule (preambleAndHeaderDuration, &WifiPhy::StartReceivePacket, this,
3710
                                                  packet, txVector, mpdutype, event);
3711
        }
3712
3718
3713
      NS_ASSERT (m_endRxEvent.IsExpired ());
3719
  if (preamble != WIFI_PREAMBLE_NONE)
3714
      m_endRxEvent = Simulator::Schedule (rxDuration, &WifiPhy::EndReceive, this,
3715
                                          packet, preamble, mpdutype, event);
3716
    }
3717
  else
3718
    {
3720
    {
3719
      NS_LOG_DEBUG ("drop packet because signal power too Small (" <<
3721
      NS_ASSERT (m_endPlcpRxEvent.IsExpired ());
3720
                    rxPowerW << "<" << m_edThresholdW << ")");
3722
      Time preambleAndHeaderDuration = CalculatePlcpPreambleAndHeaderDuration (txVector);
3721
      NotifyRxDrop (packet);
3723
      m_endPlcpRxEvent = Simulator::Schedule (preambleAndHeaderDuration, &WifiPhy::StartReceivePacket, this,
3722
      m_plcpSuccess = false;
3724
                                              packet, txVector, mpdutype, event);
3723
      MaybeCcaBusyDuration ();
3724
    }
3725
    }
3726
3727
  NS_ASSERT (m_endRxEvent.IsExpired ());
3728
  m_endRxEvent = Simulator::Schedule (rxDuration, &WifiPhy::EndReceive, this,
3729
                                      packet, preamble, mpdutype, event);
3725
}
3730
}
3726
3731
3727
int64_t
3732
int64_t
(-)a/src/wifi/model/wifi-phy.h (-12 / +21 lines)
 Lines 23-28    Link Here 
23
#define WIFI_PHY_H
23
#define WIFI_PHY_H
24
24
25
#include "ns3/event-id.h"
25
#include "ns3/event-id.h"
26
#include "ns3/deprecated.h"
26
#include "wifi-mpdu-type.h"
27
#include "wifi-mpdu-type.h"
27
#include "wifi-phy-standard.h"
28
#include "wifi-phy-standard.h"
28
#include "interference-helper.h"
29
#include "interference-helper.h"
 Lines 72-77   public: Link Here 
72
73
73
  WifiPhy ();
74
  WifiPhy ();
74
  virtual ~WifiPhy ();
75
  virtual ~WifiPhy ();
76
  
77
  /**
78
   * Return the WifiPhyStateHelper of this PHY
79
   *
80
   * \return the WifiPhyStateHelper of this PHY
81
   */
82
  Ptr<WifiPhyStateHelper> GetState (void) const;
75
83
76
  /**
84
  /**
77
   * \param callback the callback to invoke
85
   * \param callback the callback to invoke
 Lines 1184-1202   public: Link Here 
1184
  virtual int64_t AssignStreams (int64_t stream);
1192
  virtual int64_t AssignStreams (int64_t stream);
1185
1193
1186
  /**
1194
  /**
1187
   * Sets the energy detection threshold (dBm).
1195
   * Sets the receive sensitivity threshold (dBm).
1188
   * The energy of a received signal should be higher than
1196
   * The energy of a received signal should be higher than
1189
   * this threshold (dbm) to allow the PHY layer to detect the signal.
1197
   * this threshold to allow the PHY layer to detect the signal.
1190
   *
1198
   *
1191
   * \param threshold the energy detection threshold in dBm
1199
   * \param threshold the receive sensitivity threshold in dBm
1192
   */
1200
   */
1193
  void SetEdThreshold (double threshold);
1201
  void SetRxSensitivity (double threshold);
1194
  /**
1202
  /**
1195
   * Return the energy detection threshold (dBm).
1203
   * Return the receive sensitivity threshold (dBm).
1196
   *
1204
   *
1197
   * \return the energy detection threshold in dBm
1205
   * \return the receive sensitivity threshold in dBm
1198
   */
1206
   */
1199
  double GetEdThreshold (void) const;
1207
  double GetRxSensitivity (void) const;
1200
  /**
1208
  /**
1201
   * Sets the CCA threshold (dBm). The energy of a received signal
1209
   * Sets the CCA threshold (dBm). The energy of a received signal
1202
   * should be higher than this threshold to allow the PHY
1210
   * should be higher than this threshold to allow the PHY
 Lines 1204-1216   public: Link Here 
1204
   *
1212
   *
1205
   * \param threshold the CCA threshold in dBm
1213
   * \param threshold the CCA threshold in dBm
1206
   */
1214
   */
1207
  void SetCcaMode1Threshold (double threshold);
1215
  void SetCcaEdThreshold (double threshold);
1208
  /**
1216
  /**
1209
   * Return the CCA threshold (dBm).
1217
   * Return the CCA threshold (dBm).
1210
   *
1218
   *
1211
   * \return the CCA threshold in dBm
1219
   * \return the CCA threshold in dBm
1212
   */
1220
   */
1213
  double GetCcaMode1Threshold (void) const;
1221
  double GetCcaEdThreshold (void) const;
1214
  /**
1222
  /**
1215
   * Sets the RX loss (dB) in the Signal-to-Noise-Ratio due to non-idealities in the receiver.
1223
   * Sets the RX loss (dB) in the Signal-to-Noise-Ratio due to non-idealities in the receiver.
1216
   *
1224
   *
 Lines 1480-1486   protected: Link Here 
1480
   * Check if Phy state should move to CCA busy state based on current
1488
   * Check if Phy state should move to CCA busy state based on current
1481
   * state of interference tracker.  In this model, CCA becomes busy when
1489
   * state of interference tracker.  In this model, CCA becomes busy when
1482
   * the aggregation of all signals as tracked by the InterferenceHelper
1490
   * the aggregation of all signals as tracked by the InterferenceHelper
1483
   * class is higher than the CcaMode1Threshold
1491
   * class is higher than the CcaEdThreshold
1484
   */
1492
   */
1485
  void SwitchMaybeToCcaBusy (void);
1493
  void SwitchMaybeToCcaBusy (void);
1486
1494
 Lines 1742-1749   private: Link Here 
1742
  bool m_frequencyChannelNumberInitialized; //!< Store initialization state
1750
  bool m_frequencyChannelNumberInitialized; //!< Store initialization state
1743
  uint16_t m_channelWidth;                  //!< Channel width
1751
  uint16_t m_channelWidth;                  //!< Channel width
1744
1752
1745
  double   m_edThresholdW;        //!< Energy detection threshold in watts
1753
  double   m_edThreshold;         //!< CCA threshold in dB (DEPRECATED)
1746
  double   m_ccaMode1ThresholdW;  //!< Clear channel assessment (CCA) threshold in watts
1754
  double   m_rxSensitivityW;      //!< Receive sensitivity threshold in watts
1755
  double   m_ccaEdThresholdW;     //!< Clear channel assessment (CCA) threshold in watts
1747
  double   m_txGainDb;            //!< Transmission gain (dB)
1756
  double   m_txGainDb;            //!< Transmission gain (dB)
1748
  double   m_rxGainDb;            //!< Reception gain (dB)
1757
  double   m_rxGainDb;            //!< Reception gain (dB)
1749
  double   m_txPowerBaseDbm;      //!< Minimum transmission power (dBm)
1758
  double   m_txPowerBaseDbm;      //!< Minimum transmission power (dBm)
(-)a/src/wifi/model/yans-wifi-channel.cc (+7 lines)
 Lines 125-130   void Link Here 
125
YansWifiChannel::Receive (Ptr<YansWifiPhy> phy, Ptr<Packet> packet, double rxPowerDbm, Time duration)
125
YansWifiChannel::Receive (Ptr<YansWifiPhy> phy, Ptr<Packet> packet, double rxPowerDbm, Time duration)
126
{
126
{
127
  NS_LOG_FUNCTION (phy << packet << rxPowerDbm << duration.GetSeconds ());
127
  NS_LOG_FUNCTION (phy << packet << rxPowerDbm << duration.GetSeconds ());
128
  // Do no further processing if signal is too weak
129
  // Current implementation assumes constant rx power over the packet duration
130
  if ((rxPowerDbm + phy->GetRxGain ()) < phy->GetRxSensitivity ())
131
    {
132
      NS_LOG_INFO ("Received signal too weak to process: " << rxPowerDbm << " dBm");
133
      return;
134
    }
128
  phy->StartReceivePreambleAndHeader (packet, DbmToW (rxPowerDbm + phy->GetRxGain ()), duration);
135
  phy->StartReceivePreambleAndHeader (packet, DbmToW (rxPowerDbm + phy->GetRxGain ()), duration);
129
}
136
}
130
137
(-)a/src/wifi/test/spectrum-wifi-phy-test.cc (-2 lines)
 Lines 167-174   SpectrumWifiPhyBasicTest::DoSetup (void) Link Here 
167
  m_phy->SetFrequency (FREQUENCY);
167
  m_phy->SetFrequency (FREQUENCY);
168
  m_phy->SetReceiveOkCallback (MakeCallback (&SpectrumWifiPhyBasicTest::SpectrumWifiPhyRxSuccess, this));
168
  m_phy->SetReceiveOkCallback (MakeCallback (&SpectrumWifiPhyBasicTest::SpectrumWifiPhyRxSuccess, this));
169
  m_phy->SetReceiveErrorCallback (MakeCallback (&SpectrumWifiPhyBasicTest::SpectrumWifiPhyRxFailure, this));
169
  m_phy->SetReceiveErrorCallback (MakeCallback (&SpectrumWifiPhyBasicTest::SpectrumWifiPhyRxFailure, this));
170
  //Bug 2460: CcaMode1Threshold default should be set to -62 dBm when using Spectrum
171
  m_phy->SetCcaMode1Threshold (-62.0);
172
}
170
}
173
171
174
// Test that the expected number of packet receptions occur.
172
// Test that the expected number of packet receptions occur.
(-)a/src/wifi/test/wifi-phy-thresholds-test.cc (+425 lines)
Line 0    Link Here 
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
 * Copyright (c) 2018
4
 *
5
 * This program is free software; you can redistribute it and/or modify
6
 * it under the terms of the GNU General Public License version 2 as
7
 * published by the Free Software Foundation;
8
 *
9
 * This program is distributed in the hope that it will be useful,
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 * GNU General Public License for more details.
13
 *
14
 * You should have received a copy of the GNU General Public License
15
 * along with this program; if not, write to the Free Software
16
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17
 *
18
 * Author: Sébastien Deronne <sebastien.deronne@gmail.com>
19
 */
20
21
#include "ns3/log.h"
22
#include "ns3/test.h"
23
#include "ns3/spectrum-wifi-helper.h"
24
#include "ns3/wifi-spectrum-value-helper.h"
25
#include "ns3/spectrum-wifi-phy.h"
26
#include "ns3/nist-error-rate-model.h"
27
#include "ns3/wifi-mac-header.h"
28
#include "ns3/wifi-mac-trailer.h"
29
#include "ns3/wifi-phy-tag.h"
30
#include "ns3/wifi-spectrum-signal-parameters.h"
31
#include "ns3/wifi-utils.h"
32
33
using namespace ns3;
34
35
NS_LOG_COMPONENT_DEFINE ("WifiPhyThresholdsTest");
36
37
static const uint8_t CHANNEL_NUMBER = 36;
38
static const uint32_t FREQUENCY = 5180; //MHz
39
static const uint16_t CHANNEL_WIDTH = 20; //MHz
40
41
/**
42
 * \ingroup wifi-test
43
 * \ingroup tests
44
 *
45
 * \brief Wifi Phy Threshold Test base class
46
 */
47
class WifiPhyThresholdsTest : public TestCase
48
{
49
public:
50
  WifiPhyThresholdsTest (std::string test_name);
51
  virtual ~WifiPhyThresholdsTest ();
52
53
protected:
54
  /**
55
   * Make wifi signal function
56
   * \param txPowerWatts the transmit power in watts
57
   * \returns Ptr<SpectrumSignalParameters>
58
   */
59
  virtual Ptr<SpectrumSignalParameters> MakeWifiSignal (double txPowerWatts);
60
  /**
61
   * Make foreign signal function
62
   * \param txPowerWatts the transmit power in watts
63
   * \returns Ptr<SpectrumSignalParameters>
64
   */
65
  virtual Ptr<SpectrumSignalParameters> MakeForeignSignal (double txPowerWatts);
66
  /**
67
   * Send signal function
68
   * \param txPowerWatts the transmit power in watts
69
   * \param wifiSignal whether the signal is a wifi signal or not
70
   */
71
  virtual void SendSignal (double txPowerWatts, bool wifiSignal);
72
  /**
73
   * PHY receive success callback function
74
   * \param p the packet
75
   * \param snr the SNR
76
   * \param txVector the transmit vector
77
   */
78
  virtual void RxSuccess (Ptr<Packet> p, double snr, WifiTxVector txVector);
79
  /**
80
   * PHY receive failure callback function
81
   */
82
  virtual void RxFailure (void);
83
  /**
84
   * PHY dropped packet callback function
85
   * \param p the packet
86
   */
87
  virtual void RxDropped (Ptr<const Packet> p);
88
  /**
89
   * PHY state changed callback function
90
   * \param start the start time of the new state
91
   * \param duration the duration of the new state
92
   * \param newState the new state
93
   */
94
  virtual void PhyStateChanged (Time start, Time duration, WifiPhyState newState);
95
96
  Ptr<SpectrumWifiPhy> m_phy; ///< PHY object
97
  uint32_t m_rxSuccess;       ///< count number of successfully received packets
98
  uint32_t m_rxFailure;       ///< count number of unsuccessfully received packets
99
  uint32_t m_rxDropped;       ///< count number of dropped packets
100
  uint32_t m_stateChanged;    ///< count number of PHY state change
101
  uint32_t m_rxStateCount;    ///< count number of PHY state change to RX state
102
  uint32_t m_idleStateCount;    ///< count number of PHY state change to IDLE state
103
  uint32_t m_ccabusyStateCount; ///< count number of PHY state change to CCA_BUSY state
104
105
private:
106
  virtual void DoSetup (void);
107
};
108
109
WifiPhyThresholdsTest::WifiPhyThresholdsTest (std::string test_name)
110
  : TestCase (test_name),
111
    m_rxSuccess (0),
112
    m_rxFailure (0),
113
    m_rxDropped (0),
114
    m_stateChanged (0),
115
    m_rxStateCount (0),
116
    m_idleStateCount (0),
117
    m_ccabusyStateCount (0)
118
{
119
}
120
121
WifiPhyThresholdsTest::~WifiPhyThresholdsTest ()
122
{
123
}
124
125
Ptr<SpectrumSignalParameters>
126
WifiPhyThresholdsTest::MakeWifiSignal (double txPowerWatts)
127
{
128
  WifiTxVector txVector = WifiTxVector (WifiPhy::GetOfdmRate6Mbps (), 0, WIFI_PREAMBLE_LONG, false, 1, 1, 0, 20, false, false);
129
  MpduType mpdutype = NORMAL_MPDU;
130
131
  Ptr<Packet> pkt = Create<Packet> (1000);
132
  WifiMacHeader hdr;
133
  WifiMacTrailer trailer;
134
135
  hdr.SetType (WIFI_MAC_QOSDATA);
136
  hdr.SetQosTid (0);
137
  uint32_t size = pkt->GetSize () + hdr.GetSize () + trailer.GetSerializedSize ();
138
  Time txDuration = m_phy->CalculateTxDuration (size, txVector, m_phy->GetFrequency (), mpdutype, 0);
139
  hdr.SetDuration (txDuration);
140
141
  pkt->AddHeader (hdr);
142
  pkt->AddTrailer (trailer);
143
  WifiPhyTag tag (txVector, mpdutype, 1);
144
  pkt->AddPacketTag (tag);
145
  Ptr<SpectrumValue> txPowerSpectrum = WifiSpectrumValueHelper::CreateHeOfdmTxPowerSpectralDensity (FREQUENCY, CHANNEL_WIDTH, txPowerWatts, CHANNEL_WIDTH);
146
  Ptr<WifiSpectrumSignalParameters> txParams = Create<WifiSpectrumSignalParameters> ();
147
  txParams->psd = txPowerSpectrum;
148
  txParams->txPhy = 0;
149
  txParams->duration = txDuration;
150
  txParams->packet = pkt;
151
  return txParams;
152
}
153
154
Ptr<SpectrumSignalParameters>
155
WifiPhyThresholdsTest::MakeForeignSignal (double txPowerWatts)
156
{
157
  Ptr<SpectrumValue> txPowerSpectrum = WifiSpectrumValueHelper::CreateHeOfdmTxPowerSpectralDensity (FREQUENCY, CHANNEL_WIDTH, txPowerWatts, CHANNEL_WIDTH);
158
  Ptr<SpectrumSignalParameters> txParams = Create<SpectrumSignalParameters> ();
159
  txParams->psd = txPowerSpectrum;
160
  txParams->txPhy = 0;
161
  txParams->duration = Seconds (0.5);
162
  return txParams;
163
}
164
165
void
166
WifiPhyThresholdsTest::SendSignal (double txPowerWatts, bool wifiSignal)
167
{
168
  if (wifiSignal)
169
    {
170
      m_phy->StartRx (MakeWifiSignal (txPowerWatts));
171
    }
172
  else
173
    {
174
      m_phy->StartRx (MakeForeignSignal (txPowerWatts));
175
    }
176
}
177
178
void
179
WifiPhyThresholdsTest::RxSuccess (Ptr<Packet> p, double snr, WifiTxVector txVector)
180
{
181
  NS_LOG_FUNCTION (this << p << snr << txVector);
182
  m_rxSuccess++;
183
}
184
185
void
186
WifiPhyThresholdsTest::RxFailure (void)
187
{
188
  NS_LOG_FUNCTION (this);
189
  m_rxFailure++;
190
}
191
192
void
193
WifiPhyThresholdsTest::RxDropped (Ptr<const Packet> p)
194
{
195
  NS_LOG_FUNCTION (this << p);
196
  m_rxDropped++;
197
}
198
199
void
200
WifiPhyThresholdsTest::PhyStateChanged (Time start, Time duration, WifiPhyState newState)
201
{
202
  NS_LOG_FUNCTION (this << start << duration << newState);
203
  m_stateChanged++;
204
  if (newState == WifiPhyState::IDLE)
205
    {
206
      m_idleStateCount++;
207
    }
208
  else if (newState == WifiPhyState::RX)
209
    {
210
      m_rxStateCount++;
211
    }
212
  else if (newState == WifiPhyState::CCA_BUSY)
213
    {
214
      m_ccabusyStateCount++;
215
    }
216
}
217
218
void
219
WifiPhyThresholdsTest::DoSetup (void)
220
{
221
  m_phy = CreateObject<SpectrumWifiPhy> ();
222
  m_phy->ConfigureStandard (WIFI_PHY_STANDARD_80211ax_5GHZ);
223
  Ptr<ErrorRateModel> error = CreateObject<NistErrorRateModel> ();
224
  m_phy->SetErrorRateModel (error);
225
  m_phy->SetChannelNumber (CHANNEL_NUMBER);
226
  m_phy->SetFrequency (FREQUENCY);
227
  m_phy->SetReceiveOkCallback (MakeCallback (&WifiPhyThresholdsTest::RxSuccess, this));
228
  m_phy->SetReceiveErrorCallback (MakeCallback (&WifiPhyThresholdsTest::RxFailure, this));
229
  m_phy->TraceConnectWithoutContext ("PhyRxDrop", MakeCallback (&WifiPhyThresholdsTest::RxDropped, this));
230
  m_phy->GetState ()->TraceConnectWithoutContext ("State", MakeCallback (&WifiPhyThresholdsTest::PhyStateChanged, this));
231
}
232
233
/**
234
 * \ingroup wifi-test
235
 * \ingroup tests
236
 *
237
 * \brief Wifi Phy Threshold Weak Wifi Signal Test
238
 *
239
 * This test makes sure PHY ignores a Wi-Fi signal
240
 * if its received power lower than RxSensitivity.
241
 */
242
class WifiPhyThresholdsWeakWifiSignalTest : public WifiPhyThresholdsTest
243
{
244
public:
245
  WifiPhyThresholdsWeakWifiSignalTest ();
246
  virtual ~WifiPhyThresholdsWeakWifiSignalTest ();
247
  virtual void DoRun (void);
248
};
249
250
WifiPhyThresholdsWeakWifiSignalTest::WifiPhyThresholdsWeakWifiSignalTest ()
251
  : WifiPhyThresholdsTest ("WifiPhy reception thresholds: test weak wifi signal reception")
252
{
253
}
254
255
WifiPhyThresholdsWeakWifiSignalTest::~WifiPhyThresholdsWeakWifiSignalTest ()
256
{
257
}
258
259
void
260
WifiPhyThresholdsWeakWifiSignalTest::DoRun (void)
261
{
262
  WifiHelper::EnableLogComponents ();
263
264
  double txPowerWatts = DbmToW (-110);
265
266
  Simulator::Schedule (Seconds (1), &WifiPhyThresholdsWeakWifiSignalTest::SendSignal, this, txPowerWatts, true);
267
268
  Simulator::Run ();
269
  Simulator::Destroy ();
270
271
  NS_TEST_ASSERT_MSG_EQ (m_rxDropped + m_rxSuccess + m_rxFailure, 0, "Reception should not have been triggered if packet is weaker than RxSensitivity threshold");
272
  NS_TEST_ASSERT_MSG_EQ (m_stateChanged, 0, "State should stay idle if reception involves a signal weaker than RxSensitivity threshold");
273
}
274
275
/**
276
 * \ingroup wifi-test
277
 * \ingroup tests
278
 *
279
 * \brief Wifi Phy Threshold Weak Foreign Signal Test
280
 *
281
 * This test makes sure PHY keeps the state as IDLE if reception involves
282
 * a foreign signal with a received power lower than CcaEdThreshold.
283
 */
284
class WifiPhyThresholdsWeakForeignSignalTest : public WifiPhyThresholdsTest
285
{
286
public:
287
  WifiPhyThresholdsWeakForeignSignalTest ();
288
  virtual ~WifiPhyThresholdsWeakForeignSignalTest ();
289
  virtual void DoRun (void);
290
};
291
292
WifiPhyThresholdsWeakForeignSignalTest::WifiPhyThresholdsWeakForeignSignalTest ()
293
  : WifiPhyThresholdsTest ("WifiPhy reception thresholds: test weak foreign signal reception")
294
{
295
}
296
297
WifiPhyThresholdsWeakForeignSignalTest::~WifiPhyThresholdsWeakForeignSignalTest ()
298
{
299
}
300
301
void
302
WifiPhyThresholdsWeakForeignSignalTest::DoRun (void)
303
{
304
  WifiHelper::EnableLogComponents ();
305
306
  double txPowerWatts = DbmToW (-90);
307
308
  Simulator::Schedule (Seconds (1), &WifiPhyThresholdsWeakForeignSignalTest::SendSignal, this, txPowerWatts, false);
309
310
  Simulator::Run ();
311
  Simulator::Destroy ();
312
313
  NS_TEST_ASSERT_MSG_EQ (m_rxDropped + m_rxSuccess + m_rxFailure, 0, "Reception of non-wifi packet should not be triggered");
314
  NS_TEST_ASSERT_MSG_EQ (m_stateChanged, 0, "State should stay idle if reception involves a signal weaker than RxSensitivity threshold");
315
}
316
317
/**
318
 * \ingroup wifi-test
319
 * \ingroup tests
320
 *
321
 * \brief Wifi Phy Threshold Strong Wifi Signal Test
322
 *
323
 * This test makes sure PHY processes a Wi-Fi signal
324
 * with a received power higher than RxSensitivity.
325
 */
326
class WifiPhyThresholdsStrongWifiSignalTest : public WifiPhyThresholdsTest
327
{
328
public:
329
  WifiPhyThresholdsStrongWifiSignalTest ();
330
  virtual ~WifiPhyThresholdsStrongWifiSignalTest ();
331
  virtual void DoRun (void);
332
};
333
334
WifiPhyThresholdsStrongWifiSignalTest::WifiPhyThresholdsStrongWifiSignalTest ()
335
  : WifiPhyThresholdsTest ("WifiPhy reception thresholds: test strong wifi signal reception")
336
{
337
}
338
339
WifiPhyThresholdsStrongWifiSignalTest::~WifiPhyThresholdsStrongWifiSignalTest ()
340
{
341
}
342
343
void
344
WifiPhyThresholdsStrongWifiSignalTest::DoRun (void)
345
{
346
  WifiHelper::EnableLogComponents ();
347
348
  double txPowerWatts = DbmToW (-60);
349
350
  Simulator::Schedule (Seconds (1), &WifiPhyThresholdsStrongWifiSignalTest::SendSignal, this, txPowerWatts, true);
351
352
  Simulator::Run ();
353
  Simulator::Destroy ();
354
355
  NS_TEST_ASSERT_MSG_EQ (m_rxDropped + m_rxFailure, 0, "Packet reception should have been successfull");
356
  NS_TEST_ASSERT_MSG_EQ (m_rxSuccess, 1, "Packet should have been successfully received");
357
  NS_TEST_ASSERT_MSG_EQ (m_stateChanged, 2, "State should have moved to RX then back to IDLE");
358
  NS_TEST_ASSERT_MSG_EQ (m_rxStateCount, 1, "State should have moved to RX once");
359
  NS_TEST_ASSERT_MSG_EQ (m_idleStateCount, 1, "State should have moved to IDLE once");
360
}
361
362
/**
363
 * \ingroup wifi-test
364
 * \ingroup tests
365
 *
366
 * \brief Wifi Phy Threshold Strong Foreign Signal Test
367
 *
368
 * This test makes sure PHY declare the state as CCA_BUSY if reception involves
369
 * a foreign signal with a received power higher than CcaEdThreshold.
370
 */
371
class WifiPhyThresholdsStrongForeignSignalTest : public WifiPhyThresholdsTest
372
{
373
public:
374
  WifiPhyThresholdsStrongForeignSignalTest ();
375
  virtual ~WifiPhyThresholdsStrongForeignSignalTest ();
376
  virtual void DoRun (void);
377
};
378
379
WifiPhyThresholdsStrongForeignSignalTest::WifiPhyThresholdsStrongForeignSignalTest ()
380
  : WifiPhyThresholdsTest ("WifiPhy reception thresholds: test weak foreign signal reception")
381
{
382
}
383
384
WifiPhyThresholdsStrongForeignSignalTest::~WifiPhyThresholdsStrongForeignSignalTest ()
385
{
386
}
387
388
void
389
WifiPhyThresholdsStrongForeignSignalTest::DoRun (void)
390
{
391
  WifiHelper::EnableLogComponents ();
392
393
  double txPowerWatts = DbmToW (-60);
394
395
  Simulator::Schedule (Seconds (1), &WifiPhyThresholdsStrongForeignSignalTest::SendSignal, this, txPowerWatts, false);
396
397
  Simulator::Run ();
398
  Simulator::Destroy ();
399
400
  NS_TEST_ASSERT_MSG_EQ (m_rxDropped + m_rxSuccess + m_rxFailure, 0, "Reception of non-wifi packet should not be triggered");
401
  NS_TEST_ASSERT_MSG_EQ (m_ccabusyStateCount, 1, "State should have moved to CCA-BUSY");
402
}
403
404
/**
405
 * \ingroup wifi-test
406
 * \ingroup tests
407
 *
408
 * \brief Wifi Phy Thresholds Test Suite
409
 */
410
class WifiPhyThresholdsTestSuite : public TestSuite
411
{
412
public:
413
  WifiPhyThresholdsTestSuite ();
414
};
415
416
WifiPhyThresholdsTestSuite::WifiPhyThresholdsTestSuite ()
417
  : TestSuite ("wifi-phy-thresholds", UNIT)
418
{
419
  AddTestCase (new WifiPhyThresholdsWeakWifiSignalTest, TestCase::QUICK);
420
  AddTestCase (new WifiPhyThresholdsWeakForeignSignalTest, TestCase::QUICK);
421
  AddTestCase (new WifiPhyThresholdsStrongWifiSignalTest, TestCase::QUICK);
422
  AddTestCase (new WifiPhyThresholdsStrongForeignSignalTest, TestCase::QUICK);
423
}
424
425
static WifiPhyThresholdsTestSuite wifiPhyThresholdsTestSuite; ///< the test suite
(-)a/src/wifi/test/wifi-test.cc (-1 lines)
 Lines 1269-1275   void Link Here 
1269
Bug2483TestCase::DoRun (void)
1269
Bug2483TestCase::DoRun (void)
1270
{
1270
{
1271
  Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue ("500")); // so as to force RTS/CTS for data frames
1271
  Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue ("500")); // so as to force RTS/CTS for data frames
1272
  Config::SetDefault ("ns3::WifiPhy::CcaMode1Threshold", DoubleValue (-62.0));
1273
1272
1274
  uint16_t channelWidth = 40; // at least 40 MHz expected here
1273
  uint16_t channelWidth = 40; // at least 40 MHz expected here
1275
1274
(-)a/src/wifi/wscript (+1 lines)
 Lines 109-114   def build(bld): Link Here 
109
        'test/wifi-aggregation-test.cc',
109
        'test/wifi-aggregation-test.cc',
110
        'test/wifi-error-rate-models-test.cc',
110
        'test/wifi-error-rate-models-test.cc',
111
        'test/wifi-transmit-mask-test.cc',
111
        'test/wifi-transmit-mask-test.cc',
112
        'test/wifi-phy-thresholds-test.cc',
112
        ]
113
        ]
113
114
114
    headers = bld(features='ns3header')
115
    headers = bld(features='ns3header')

Return to bug 2460