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

(-)a/examples/wireless/wifi-clear-channel-cmu.cc (-1 / +1 lines)
 Lines 204-210    Link Here 
204
204
205
          NS_LOG_DEBUG (modes[i]);
205
          NS_LOG_DEBUG (modes[i]);
206
          experiment = Experiment (modes[i]);
206
          experiment = Experiment (modes[i]);
207
          wifiPhy.Set ("EnergyDetectionThreshold", DoubleValue (-110.0) );
207
          wifiPhy.Set ("SignalDetectionThreshold", DoubleValue (-110.0) );
208
          wifiPhy.Set ("CcaMode1Threshold", DoubleValue (-110.0) );
208
          wifiPhy.Set ("CcaMode1Threshold", DoubleValue (-110.0) );
209
          wifiPhy.Set ("TxPowerStart", DoubleValue (15.0) );
209
          wifiPhy.Set ("TxPowerStart", DoubleValue (15.0) );
210
          wifiPhy.Set ("TxPowerEnd", DoubleValue (15.0) );
210
          wifiPhy.Set ("TxPowerEnd", DoubleValue (15.0) );
(-)a/examples/wireless/wifi-simple-interference.cc (-1 / +1 lines)
 Lines 201-207    Link Here 
201
  NetDeviceContainer devices = wifi.Install (wifiPhy, wifiMac, c.Get (0));
201
  NetDeviceContainer devices = wifi.Install (wifiPhy, wifiMac, c.Get (0));
202
  // This will disable these sending devices from detecting a signal
202
  // This will disable these sending devices from detecting a signal
203
  // so that they do not backoff
203
  // so that they do not backoff
204
  wifiPhy.Set ("EnergyDetectionThreshold", DoubleValue (0.0) );
204
  wifiPhy.Set ("SignalDetectionThreshold", DoubleValue (0.0) );
205
  wifiPhy.Set ("TxGain", DoubleValue (offset + Prss) );
205
  wifiPhy.Set ("TxGain", DoubleValue (offset + Prss) );
206
  devices.Add (wifi.Install (wifiPhy, wifiMac, c.Get (1)));
206
  devices.Add (wifi.Install (wifiPhy, wifiMac, c.Get (1)));
207
  wifiPhy.Set ("TxGain", DoubleValue (offset + Irss) );
207
  wifiPhy.Set ("TxGain", DoubleValue (offset + Irss) );
(-)a/examples/wireless/wifi-tcp.cc (-1 / +1 lines)
 Lines 101-107    Link Here 
101
  wifiPhy.Set ("RxGain", DoubleValue (0));
101
  wifiPhy.Set ("RxGain", DoubleValue (0));
102
  wifiPhy.Set ("RxNoiseFigure", DoubleValue (10));
102
  wifiPhy.Set ("RxNoiseFigure", DoubleValue (10));
103
  wifiPhy.Set ("CcaMode1Threshold", DoubleValue (-79));
103
  wifiPhy.Set ("CcaMode1Threshold", DoubleValue (-79));
104
  wifiPhy.Set ("EnergyDetectionThreshold", DoubleValue (-79 + 3));
104
  wifiPhy.Set ("SignalDetectionThreshold", DoubleValue (-79 + 3));
105
  wifiPhy.SetErrorRateModel ("ns3::YansErrorRateModel");
105
  wifiPhy.SetErrorRateModel ("ns3::YansErrorRateModel");
106
  wifiHelper.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
106
  wifiHelper.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
107
                                      "DataMode", StringValue (phyRate),
107
                                      "DataMode", StringValue (phyRate),
(-)a/src/aodv/test/aodv-regression.cc (+1 lines)
 Lines 162-167    Link Here 
162
  YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
162
  YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
163
  Ptr<YansWifiChannel> chan = wifiChannel.Create ();
163
  Ptr<YansWifiChannel> chan = wifiChannel.Create ();
164
  wifiPhy.SetChannel (chan);
164
  wifiPhy.SetChannel (chan);
165
  wifiPhy.Set ("SignalDetectionThreshold", DoubleValue (-92.0)); //this configuration should go away in future revision to the test
165
  wifiPhy.Set ("TxGain", DoubleValue (1.0)); //this configuration should go away in future revision to the test
166
  wifiPhy.Set ("TxGain", DoubleValue (1.0)); //this configuration should go away in future revision to the test
166
  wifiPhy.Set ("RxGain", DoubleValue (1.0)); //this configuration should go away in future revision to the test
167
  wifiPhy.Set ("RxGain", DoubleValue (1.0)); //this configuration should go away in future revision to the test
167
  // This test suite output was originally based on YansErrorRateModel
168
  // This test suite output was originally based on YansErrorRateModel
(-)a/src/aodv/test/bug-772.cc (+2 lines)
 Lines 134-139    Link Here 
134
  YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
134
  YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
135
  Ptr<YansWifiChannel> chan = wifiChannel.Create ();
135
  Ptr<YansWifiChannel> chan = wifiChannel.Create ();
136
  wifiPhy.SetChannel (chan);
136
  wifiPhy.SetChannel (chan);
137
  wifiPhy.Set ("SignalDetectionThreshold", DoubleValue (-92.0)); //this configuration should go away in future revision to the test
138
  wifiPhy.Set ("CcaMode1Threshold", DoubleValue (-91.0)); //this configuration should go away in future revision to the test
137
  wifiPhy.Set ("TxGain", DoubleValue (1.0)); //this configuration should go away in future revision to the test
139
  wifiPhy.Set ("TxGain", DoubleValue (1.0)); //this configuration should go away in future revision to the test
138
  wifiPhy.Set ("RxGain", DoubleValue (1.0)); //this configuration should go away in future revision to the test
140
  wifiPhy.Set ("RxGain", DoubleValue (1.0)); //this configuration should go away in future revision to the test
139
  WifiHelper wifi;
141
  WifiHelper wifi;
(-)a/src/mesh/test/dot11s/hwmp-proactive-regression.cc (+1 lines)
 Lines 113-118    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 ("CcaMode1Threshold", DoubleValue (-98.0)); //this configuration should go away in future revision to the test
116
  wifiPhy.Set ("TxGain", DoubleValue (1.0)); //this configuration should go away in future revision to the test
117
  wifiPhy.Set ("TxGain", DoubleValue (1.0)); //this configuration should go away in future revision to the test
117
  wifiPhy.Set ("RxGain", 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
118
  // 2. setup mesh
119
  // 2. setup mesh
(-)a/src/mesh/test/dot11s/hwmp-reactive-regression.cc (+3 lines)
 Lines 114-119    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 ("SignalDetectionThreshold", DoubleValue (-94.0)); //this configuration should go away in future revision to the test
118
  wifiPhy.Set ("CcaMode1Threshold", DoubleValue (-94.0)); //this configuration should go away in future revision to the test
119
  wifiPhy.Set ("SensitivityThreshold", DoubleValue (-109.0)); //this configuration should go away in future revision to the test
117
  wifiPhy.Set ("TxGain", DoubleValue (1.0)); //this configuration should go away in future revision to the test
120
  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
121
  wifiPhy.Set ("RxGain", DoubleValue (1.0)); //this configuration should go away in future revision to the test
119
122
(-)a/src/mesh/test/dot11s/hwmp-target-flags-regression.cc (+1 lines)
 Lines 140-145    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 ("CcaMode1Threshold", DoubleValue (-98.0)); //this configuration should go away in future revision to the test
143
  wifiPhy.Set ("TxGain", DoubleValue (1.0)); //this configuration should go away in future revision to the test
144
  wifiPhy.Set ("TxGain", DoubleValue (1.0)); //this configuration should go away in future revision to the test
144
  wifiPhy.Set ("RxGain", DoubleValue (1.0)); //this configuration should go away in future revision to the test
145
  wifiPhy.Set ("RxGain", DoubleValue (1.0)); //this configuration should go away in future revision to the test
145
  // 2. setup mesh
146
  // 2. setup mesh
(-)a/src/mesh/test/flame/flame-regression.cc (+1 lines)
 Lines 99-104    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 ("SignalDetectionThreshold", DoubleValue (-94.0)); //this configuration should go away in future revision to the test
102
  wifiPhy.Set ("TxGain", DoubleValue (1.0)); //this configuration should go away in future revision to the test
103
  wifiPhy.Set ("TxGain", DoubleValue (1.0)); //this configuration should go away in future revision to the test
103
  wifiPhy.Set ("RxGain", DoubleValue (1.0)); //this configuration should go away in future revision to the test
104
  wifiPhy.Set ("RxGain", DoubleValue (1.0)); //this configuration should go away in future revision to the test
104
  // 2. setup mesh
105
  // 2. setup mesh
(-)a/src/test/ns3wifi/wifi-interference-test-suite.cc (-1 / +1 lines)
 Lines 190-196    Link Here 
190
190
191
  // This will disable these sending devices from detecting a signal 
191
  // This will disable these sending devices from detecting a signal 
192
  // so that they do not backoff
192
  // so that they do not backoff
193
  wifiPhy.Set ("EnergyDetectionThreshold", DoubleValue (0.0) );
193
  wifiPhy.Set ("SignalDetectionThreshold", DoubleValue (0.0) );
194
  wifiPhy.Set ("TxGain", DoubleValue (offset + Prss) ); 
194
  wifiPhy.Set ("TxGain", DoubleValue (offset + Prss) ); 
195
  devices.Add (wifi.Install (wifiPhy, wifiMac, c.Get (1)));
195
  devices.Add (wifi.Install (wifiPhy, wifiMac, c.Get (1)));
196
  wifiPhy.Set ("TxGain", DoubleValue (offset + Irss) ); 
196
  wifiPhy.Set ("TxGain", DoubleValue (offset + Irss) ); 
(-)a/src/wave/test/ocb-test-suite.cc (-1 / +1 lines)
 Lines 331-337    Link Here 
331
  Simulator::Destroy ();
331
  Simulator::Destroy ();
332
  NS_TEST_ASSERT_MSG_LT (phyrx_time, macassoc_time, "In Sta mode with AP, you cannot associate until receive beacon or AssocResponse frame" );
332
  NS_TEST_ASSERT_MSG_LT (phyrx_time, macassoc_time, "In Sta mode with AP, you cannot associate until receive beacon or AssocResponse frame" );
333
  NS_TEST_ASSERT_MSG_LT (macassoc_time, phytx_time, "In Sta mode with AP,  you cannot send data packet until associate" );
333
  NS_TEST_ASSERT_MSG_LT (macassoc_time, phytx_time, "In Sta mode with AP,  you cannot send data packet until associate" );
334
  NS_TEST_ASSERT_MSG_GT ((phyrx_pos.x - macassoc_pos.x), 0.0, "");
334
  NS_TEST_ASSERT_MSG_GT_OR_EQ ((phyrx_pos.x - macassoc_pos.x), 0.0, "");
335
  //actually macassoc_pos.x - phytx_pos.x is greater than 0
335
  //actually macassoc_pos.x - phytx_pos.x is greater than 0
336
  //however associate switch to send is so fast with less than 100ms
336
  //however associate switch to send is so fast with less than 100ms
337
  //and in our mobility model that every 0.1s update position,
337
  //and in our mobility model that every 0.1s update position,
(-)a/src/wifi/examples/wifi-manager-example.cc (-1 / +1 lines)
 Lines 313-319    Link Here 
313
  wifi.SetStandard (serverSelectedStandard.m_standard);
313
  wifi.SetStandard (serverSelectedStandard.m_standard);
314
  YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
314
  YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
315
  wifiPhy.Set ("RxNoiseFigure", DoubleValue (0.0));
315
  wifiPhy.Set ("RxNoiseFigure", DoubleValue (0.0));
316
  wifiPhy.Set ("EnergyDetectionThreshold", DoubleValue (-110.0));
316
  wifiPhy.Set ("SignalDetectionThreshold", DoubleValue (-110.0));
317
  wifiPhy.Set ("CcaMode1Threshold", DoubleValue (-110.0));
317
  wifiPhy.Set ("CcaMode1Threshold", DoubleValue (-110.0));
318
318
319
  Ptr<YansWifiChannel> wifiChannel = CreateObject<YansWifiChannel> ();
319
  Ptr<YansWifiChannel> wifiChannel = CreateObject<YansWifiChannel> ();
(-)a/src/wifi/model/spectrum-wifi-phy.cc (+7 lines)
 Lines 174-179    Link Here 
174
  NS_LOG_DEBUG ("Signal power received (watts) before antenna gain: " << Integral (filteredSignal));
174
  NS_LOG_DEBUG ("Signal power received (watts) before antenna gain: " << Integral (filteredSignal));
175
  double rxPowerW = Integral (filteredSignal) * DbToRatio (GetRxGain ());
175
  double rxPowerW = Integral (filteredSignal) * DbToRatio (GetRxGain ());
176
  NS_LOG_DEBUG ("Signal power received after antenna gain: " << rxPowerW << " W (" << WToDbm (rxPowerW) << " dBm)");
176
  NS_LOG_DEBUG ("Signal power received after antenna gain: " << rxPowerW << " W (" << WToDbm (rxPowerW) << " dBm)");
177
  
178
  if (WToDbm (rxPowerW) < GetSensitivityThreshold ())
179
    {
180
      //ignore this signal
181
      NS_LOG_DEBUG ("Signal power received is below the sensitivity threshold -> ignore this signal!");
182
      return;
183
    }
177
184
178
  Ptr<WifiSpectrumSignalParameters> wifiRxParams = DynamicCast<WifiSpectrumSignalParameters> (rxParams);
185
  Ptr<WifiSpectrumSignalParameters> wifiRxParams = DynamicCast<WifiSpectrumSignalParameters> (rxParams);
179
186
(-)a/src/wifi/model/wifi-phy.cc (-13 / +59 lines)
 Lines 174-193    Link Here 
174
                   MakeUintegerAccessor (&WifiPhy::SetChannelNumber,
174
                   MakeUintegerAccessor (&WifiPhy::SetChannelNumber,
175
                                         &WifiPhy::GetChannelNumber),
175
                                         &WifiPhy::GetChannelNumber),
176
                   MakeUintegerChecker<uint8_t> (0, 196))
176
                   MakeUintegerChecker<uint8_t> (0, 196))
177
    .AddAttribute ("EnergyDetectionThreshold",
177
    .AddAttribute ("SignalDetectionThreshold",
178
                   "The energy of a received signal should be higher than "
178
                   "The energy of a received signal should be higher than "
179
                   "this threshold (dbm) to allow the PHY layer to detect the signal.",
179
                   "this threshold (dbm) to allow the PHY layer to detect the signal.",
180
                   DoubleValue (-96.0),
180
                   DoubleValue (-91.0),
181
                   MakeDoubleAccessor (&WifiPhy::SetEdThreshold,
181
                   MakeDoubleAccessor (&WifiPhy::SetSignalDetectionThreshold,
182
                                       &WifiPhy::GetEdThreshold),
182
                                       &WifiPhy::GetSignalDetectionThreshold),
183
                   MakeDoubleChecker<double> ())
183
                   MakeDoubleChecker<double> ())
184
    .AddAttribute ("CcaMode1Threshold",
184
    .AddAttribute ("CcaMode1Threshold",
185
                   "The energy of a received signal should be higher than "
185
                   "The energy of a received signal should be higher than "
186
                   "this threshold (dbm) to allow the PHY layer to declare CCA BUSY state.",
186
                   "this threshold (dbm) to allow the PHY layer to declare CCA BUSY state.",
187
                   DoubleValue (-99.0),
187
                   DoubleValue (-62.0),
188
                   MakeDoubleAccessor (&WifiPhy::SetCcaMode1Threshold,
188
                   MakeDoubleAccessor (&WifiPhy::SetCcaMode1Threshold,
189
                                       &WifiPhy::GetCcaMode1Threshold),
189
                                       &WifiPhy::GetCcaMode1Threshold),
190
                   MakeDoubleChecker<double> ())
190
                   MakeDoubleChecker<double> ())
191
    .AddAttribute ("SensitivityThreshold",
192
                   "The energy of a received signal should be higher than "
193
                   "this threshold (dbm) to allow the PHY layer to accept this signal.",
194
                   DoubleValue (-101.0),
195
                   MakeDoubleAccessor (&WifiPhy::SetSensitivityThreshold,
196
                                       &WifiPhy::GetSensitivityThreshold),
197
                   MakeDoubleChecker<double> ())
191
    .AddAttribute ("TxGain",
198
    .AddAttribute ("TxGain",
192
                   "Transmission gain (dB).",
199
                   "Transmission gain (dB).",
193
                   DoubleValue (0.0),
200
                   DoubleValue (0.0),
 Lines 469-490    Link Here 
469
}
476
}
470
477
471
void
478
void
472
WifiPhy::SetEdThreshold (double threshold)
479
WifiPhy::SetSignalDetectionThreshold (double threshold)
473
{
480
{
474
  NS_LOG_FUNCTION (this << threshold);
481
  NS_LOG_FUNCTION (this << threshold);
475
  m_edThresholdW = DbmToW (threshold);
482
  m_signalDetectionThresholdW = DbmToW (threshold);
476
}
483
}
477
484
478
double
485
double
479
WifiPhy::GetEdThresholdW (void) const
486
WifiPhy::GetSignalDetectionThresholdW (void) const
480
{
487
{
481
  return m_edThresholdW;
488
  return m_signalDetectionThresholdW;
482
}
489
}
483
490
484
double
491
double
485
WifiPhy::GetEdThreshold (void) const
492
WifiPhy::GetSignalDetectionThreshold (void) const
486
{
493
{
487
  return WToDbm (m_edThresholdW);
494
  return WToDbm (m_signalDetectionThresholdW);
488
}
495
}
489
496
490
void
497
void
 Lines 501-506    Link Here 
501
}
508
}
502
509
503
void
510
void
511
WifiPhy::SetSensitivityThreshold (double threshold)
512
{
513
  NS_LOG_FUNCTION (this << threshold);
514
  m_sensitivityThresholdW = DbmToW (threshold);
515
}
516
517
double
518
WifiPhy::GetSensitivityThreshold (void) const
519
{
520
  return WToDbm (m_sensitivityThresholdW);
521
}
522
523
void
504
WifiPhy::SetRxNoiseFigure (double noiseFigureDb)
524
WifiPhy::SetRxNoiseFigure (double noiseFigureDb)
505
{
525
{
506
  NS_LOG_FUNCTION (this << noiseFigureDb);
526
  NS_LOG_FUNCTION (this << noiseFigureDb);
 Lines 1278-1283    Link Here 
1278
  NS_ASSERT_MSG (channelwidth == 5 || channelwidth == 10 || channelwidth == 20 || channelwidth == 22 || channelwidth == 40 || channelwidth == 80 || channelwidth == 160, "wrong channel width value");
1298
  NS_ASSERT_MSG (channelwidth == 5 || channelwidth == 10 || channelwidth == 20 || channelwidth == 22 || channelwidth == 40 || channelwidth == 80 || channelwidth == 160, "wrong channel width value");
1279
  m_channelWidth = channelwidth;
1299
  m_channelWidth = channelwidth;
1280
  AddSupportedChannelWidth (channelwidth);
1300
  AddSupportedChannelWidth (channelwidth);
1301
  if (GetCcaMode1Threshold () == 0)
1302
    {
1303
      //todo: what if channel width has changed but we already set CCAMode1 threshold value?
1304
      switch (channelwidth)
1305
        {
1306
        case 5:
1307
          SetCcaMode1Threshold (-68);
1308
          break;
1309
        case 10:
1310
          SetCcaMode1Threshold (-65);
1311
          break;
1312
        case 20:
1313
        default:
1314
          SetCcaMode1Threshold (-62);
1315
          break;
1316
        //todo: other cases (DSSS, channel bonding, ...)
1317
        }
1318
    }
1281
}
1319
}
1282
1320
1283
uint8_t
1321
uint8_t
 Lines 2452-2457    Link Here 
2452
  //This function should be later split to check separately whether plcp preamble and plcp header can be successfully received.
2490
  //This function should be later split to check separately whether plcp preamble and plcp header can be successfully received.
2453
  //Note: plcp preamble reception is not yet modeled.
2491
  //Note: plcp preamble reception is not yet modeled.
2454
  NS_LOG_FUNCTION (this << packet << WToDbm (rxPowerW) << rxDuration);
2492
  NS_LOG_FUNCTION (this << packet << WToDbm (rxPowerW) << rxDuration);
2493
  
2494
  if (WToDbm (rxPowerW) < GetSensitivityThreshold ())
2495
    {
2496
      //ignore this signal
2497
      NS_LOG_DEBUG ("Signal power received is below the sensitivity threshold: ignore this signal!");
2498
      return;
2499
    }
2500
  
2455
  AmpduTag ampduTag;
2501
  AmpduTag ampduTag;
2456
  Time endRx = Simulator::Now () + rxDuration;
2502
  Time endRx = Simulator::Now () + rxDuration;
2457
2503
 Lines 2531-2537    Link Here 
2531
      break;
2577
      break;
2532
    case WifiPhy::CCA_BUSY:
2578
    case WifiPhy::CCA_BUSY:
2533
    case WifiPhy::IDLE:
2579
    case WifiPhy::IDLE:
2534
      if (rxPowerW > GetEdThresholdW ()) //checked here, no need to check in the payload reception (current implementation assumes constant rx power over the packet duration)
2580
      if (rxPowerW > GetSignalDetectionThresholdW ()) //checked here, no need to check in the payload reception (current implementation assumes constant rx power over the packet duration)
2535
        {
2581
        {
2536
          if (preamble == WIFI_PREAMBLE_NONE && (m_mpdusNum == 0 || m_plcpSuccess == false))
2582
          if (preamble == WIFI_PREAMBLE_NONE && (m_mpdusNum == 0 || m_plcpSuccess == false))
2537
            {
2583
            {
 Lines 2592-2598    Link Here 
2592
      else
2638
      else
2593
        {
2639
        {
2594
          NS_LOG_DEBUG ("drop packet because signal power too Small (" <<
2640
          NS_LOG_DEBUG ("drop packet because signal power too Small (" <<
2595
                        rxPowerW << "<" << GetEdThresholdW () << ")");
2641
                        rxPowerW << "<" << GetSignalDetectionThresholdW () << ")");
2596
          NotifyRxDrop (packet);
2642
          NotifyRxDrop (packet);
2597
          m_plcpSuccess = false;
2643
          m_plcpSuccess = false;
2598
          goto maybeCcaBusy;
2644
          goto maybeCcaBusy;
(-)a/src/wifi/model/wifi-phy.h (-10 / +26 lines)
 Lines 1344-1368    Link Here 
1344
  virtual int64_t AssignStreams (int64_t stream);
1344
  virtual int64_t AssignStreams (int64_t stream);
1345
1345
1346
  /**
1346
  /**
1347
   * Sets the energy detection threshold (dBm).
1347
   * Sets the signal detection threshold (dBm).
1348
   * The energy of a received signal should be higher than
1348
   * The energy of a received signal should be higher than
1349
   * this threshold (dbm) to allow the PHY layer to detect the signal.
1349
   * this threshold (dbm) to allow the PHY layer to detect the signal.
1350
   *
1350
   *
1351
   * \param threshold the energy detction threshold in dBm
1351
   * \param threshold the energy detction threshold in dBm
1352
   */
1352
   */
1353
  void SetEdThreshold (double threshold);
1353
  void SetSignalDetectionThreshold (double threshold);
1354
  /**
1354
  /**
1355
   * Return the energy detection threshold (dBm).
1355
   * Return the signal detection threshold (dBm).
1356
   *
1356
   *
1357
   * \return the energy detection threshold in dBm
1357
   * \return the signal detection threshold in dBm
1358
   */
1358
   */
1359
  double GetEdThreshold (void) const;
1359
  double GetSignalDetectionThreshold (void) const;
1360
  /**
1360
  /**
1361
   * Return the energy detection threshold.
1361
   * Return the signal detection threshold.
1362
   *
1362
   *
1363
   * \return the energy detection threshold.
1363
   * \return the signal detection threshold.
1364
   */
1364
   */
1365
  double GetEdThresholdW (void) const;
1365
  double GetSignalDetectionThresholdW (void) const;
1366
  /**
1366
  /**
1367
   * Sets the CCA threshold (dBm). The energy of a received signal
1367
   * Sets the CCA threshold (dBm). The energy of a received signal
1368
   * should be higher than this threshold to allow the PHY
1368
   * should be higher than this threshold to allow the PHY
 Lines 1378-1383    Link Here 
1378
   */
1378
   */
1379
  double GetCcaMode1Threshold (void) const;
1379
  double GetCcaMode1Threshold (void) const;
1380
  /**
1380
  /**
1381
   * Sets the sensitivity threshold (dBm). 
1382
   * The energy of a received signal should be higher than this 
1383
   * threshold to allow the PHY layer to accept the signal.
1384
   *
1385
   * \param threshold the sensitivity threshold in dBm
1386
   */
1387
  void SetSensitivityThreshold (double threshold);
1388
  /**
1389
   * Return the sensitivity threshold (dBm).
1390
   *
1391
   * \return the sensitivity threshold in dBm
1392
   */
1393
  double GetSensitivityThreshold (void) const;
1394
  /**
1381
   * Sets the RX loss (dB) in the Signal-to-Noise-Ratio due to non-idealities in the receiver.
1395
   * Sets the RX loss (dB) in the Signal-to-Noise-Ratio due to non-idealities in the receiver.
1382
   *
1396
   *
1383
   * \param noiseFigureDb noise figure in dB
1397
   * \param noiseFigureDb noise figure in dB
 Lines 1901-1908    Link Here 
1901
  bool m_frequencyChannelNumberInitialized; //!< Store initialization state
1915
  bool m_frequencyChannelNumberInitialized; //!< Store initialization state
1902
  uint8_t m_channelWidth;             //!< Channel width
1916
  uint8_t m_channelWidth;             //!< Channel width
1903
1917
1904
  double m_edThresholdW;          //!< Energy detection threshold in watts
1918
  double   m_ccaMode1ThresholdW;        //!< Clear channel assessment (CCA) threshold in watts
1905
  double   m_ccaMode1ThresholdW;  //!< Clear channel assessment (CCA) threshold in watts
1919
  double   m_signalDetectionThresholdW; //!< Signal detection threshold in watts
1920
  double   m_sensitivityThresholdW;     //!< Receiver sensitivity threshold in watts
1921
1906
  double   m_txGainDb;            //!< Transmission gain (dB)
1922
  double   m_txGainDb;            //!< Transmission gain (dB)
1907
  double   m_rxGainDb;            //!< Reception gain (dB)
1923
  double   m_rxGainDb;            //!< Reception gain (dB)
1908
  double   m_txPowerBaseDbm;      //!< Minimum transmission power (dBm)
1924
  double   m_txPowerBaseDbm;      //!< Minimum transmission power (dBm)

Return to bug 2460