OLD | NEW |
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2005,2006 INRIA | 3 * Copyright (c) 2005,2006 INRIA |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 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· | 6 * it under the terms of the GNU General Public License version 2 as· |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 pd = CalculatePd (ber, dFree + 1); | 164 pd = CalculatePd (ber, dFree + 1); |
165 pmu += adFreePlusOne * pd; | 165 pmu += adFreePlusOne * pd; |
166 pmu = std::min (pmu, 1.0); | 166 pmu = std::min (pmu, 1.0); |
167 double pms = pow (1 - pmu, nbits); | 167 double pms = pow (1 - pmu, nbits); |
168 return pms; | 168 return pms; |
169 } | 169 } |
170 | 170 |
171 double· | 171 double· |
172 YansErrorRateModel::GetChunkSuccessRate (WifiMode mode, double snr, uint32_t nbi
ts) const | 172 YansErrorRateModel::GetChunkSuccessRate (WifiMode mode, double snr, uint32_t nbi
ts) const |
173 { | 173 { |
174 if (mode.GetModulationClass () == WIFI_MOD_CLASS_OFDM) | 174 if (mode.GetModulationClass () == WIFI_MOD_CLASS_ERP_OFDM || |
| 175 mode.GetModulationClass () == WIFI_MOD_CLASS_OFDM) |
175 { | 176 { |
176 if (mode.GetConstellationSize () == 2) | 177 if (mode.GetConstellationSize () == 2) |
177 { | 178 { |
178 if (mode.GetCodeRate () == WIFI_CODE_RATE_1_2) | 179 if (mode.GetCodeRate () == WIFI_CODE_RATE_1_2) |
179 { | 180 { |
180 return GetFecBpskBer (snr, | 181 return GetFecBpskBer (snr, |
181 nbits, | 182 nbits, |
182 mode.GetBandwidth (), // signal spread | 183 mode.GetBandwidth (), // signal spread |
183 mode.GetPhyRate (), // phy rate | 184 mode.GetPhyRate (), // phy rate |
184 10, // dFree | 185 10, // dFree |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 case 5500000: | 290 case 5500000: |
290 return DsssErrorRateModel::GetDsssDqpskCck5_5SuccessRate (snr, nbits); | 291 return DsssErrorRateModel::GetDsssDqpskCck5_5SuccessRate (snr, nbits); |
291 case 11000000: | 292 case 11000000: |
292 return DsssErrorRateModel::GetDsssDqpskCck11SuccessRate (snr, nbits); | 293 return DsssErrorRateModel::GetDsssDqpskCck11SuccessRate (snr, nbits); |
293 } | 294 } |
294 } | 295 } |
295 return 0; | 296 return 0; |
296 } | 297 } |
297 | 298 |
298 } // namespace ns3 | 299 } // namespace ns3 |
OLD | NEW |