|
|
| 188 |
YansErrorRateModel::GetChunkSuccessRate (WifiMode mode, WifiTxVector txVector, double snr, uint32_t nbits) const |
188 |
YansErrorRateModel::GetChunkSuccessRate (WifiMode mode, WifiTxVector txVector, double snr, uint32_t nbits) const |
| 189 |
{ |
189 |
{ |
| 190 |
NS_LOG_FUNCTION (this << mode << txVector.GetMode () << snr << nbits); |
190 |
NS_LOG_FUNCTION (this << mode << txVector.GetMode () << snr << nbits); |
|
|
191 |
uint8_t nss = txVector.GetNss (); |
| 191 |
if (mode.GetModulationClass () == WIFI_MOD_CLASS_ERP_OFDM |
192 |
if (mode.GetModulationClass () == WIFI_MOD_CLASS_ERP_OFDM |
| 192 |
|| mode.GetModulationClass () == WIFI_MOD_CLASS_OFDM |
193 |
|| mode.GetModulationClass () == WIFI_MOD_CLASS_OFDM |
| 193 |
|| mode.GetModulationClass () == WIFI_MOD_CLASS_HT |
194 |
|| mode.GetModulationClass () == WIFI_MOD_CLASS_HT |
| 194 |
|| mode.GetModulationClass () == WIFI_MOD_CLASS_VHT) |
195 |
|| mode.GetModulationClass () == WIFI_MOD_CLASS_VHT) |
| 195 |
{ |
196 |
{ |
| 196 |
if (mode.GetConstellationSize (1) == 2) |
197 |
if (mode.GetConstellationSize (nss) == 2) |
| 197 |
{ |
198 |
{ |
| 198 |
if (mode.GetCodeRate (1) == WIFI_CODE_RATE_1_2) |
199 |
if (mode.GetCodeRate (nss) == WIFI_CODE_RATE_1_2) |
| 199 |
{ |
200 |
{ |
| 200 |
return GetFecBpskBer (snr, |
201 |
return GetFecBpskBer (snr, |
| 201 |
nbits, |
202 |
nbits, |
| 202 |
txVector.GetChannelWidth () * 1000000, //signal spread |
203 |
txVector.GetChannelWidth () * 1000000, //signal spread |
| 203 |
mode.GetPhyRate (txVector.GetChannelWidth (), txVector.IsShortGuardInterval (), 1), //phy rate |
204 |
mode.GetPhyRate (txVector), //phy rate |
| 204 |
10, //dFree |
205 |
10, //dFree |
| 205 |
11); //adFree |
206 |
11); //adFree |
| 206 |
} |
207 |
} |
|
Lines 209-227
YansErrorRateModel::GetChunkSuccessRate (WifiMode mode, WifiTxVector txVector, d
|
Link Here
|
|---|
|
| 209 |
return GetFecBpskBer (snr, |
210 |
return GetFecBpskBer (snr, |
| 210 |
nbits, |
211 |
nbits, |
| 211 |
txVector.GetChannelWidth () * 1000000, //signal spread |
212 |
txVector.GetChannelWidth () * 1000000, //signal spread |
| 212 |
mode.GetPhyRate (txVector.GetChannelWidth (), txVector.IsShortGuardInterval (), 1), //phy rate |
213 |
mode.GetPhyRate (txVector), //phy rate |
| 213 |
5, //dFree |
214 |
5, //dFree |
| 214 |
8); //adFree |
215 |
8); //adFree |
| 215 |
} |
216 |
} |
| 216 |
} |
217 |
} |
| 217 |
else if (mode.GetConstellationSize (1) == 4) |
218 |
else if (mode.GetConstellationSize (nss) == 4) |
| 218 |
{ |
219 |
{ |
| 219 |
if (mode.GetCodeRate (1) == WIFI_CODE_RATE_1_2) |
220 |
if (mode.GetCodeRate (nss) == WIFI_CODE_RATE_1_2) |
| 220 |
{ |
221 |
{ |
| 221 |
return GetFecQamBer (snr, |
222 |
return GetFecQamBer (snr, |
| 222 |
nbits, |
223 |
nbits, |
| 223 |
txVector.GetChannelWidth () * 1000000, //signal spread |
224 |
txVector.GetChannelWidth () * 1000000, //signal spread |
| 224 |
mode.GetPhyRate (txVector.GetChannelWidth (), txVector.IsShortGuardInterval (), 1), //phy rate |
225 |
mode.GetPhyRate (txVector), //phy rate |
| 225 |
4, //m |
226 |
4, //m |
| 226 |
10, //dFree |
227 |
10, //dFree |
| 227 |
11, //adFree |
228 |
11, //adFree |
|
Lines 232-252
YansErrorRateModel::GetChunkSuccessRate (WifiMode mode, WifiTxVector txVector, d
|
Link Here
|
|---|
|
| 232 |
return GetFecQamBer (snr, |
233 |
return GetFecQamBer (snr, |
| 233 |
nbits, |
234 |
nbits, |
| 234 |
txVector.GetChannelWidth () * 1000000, //signal spread |
235 |
txVector.GetChannelWidth () * 1000000, //signal spread |
| 235 |
mode.GetPhyRate (txVector.GetChannelWidth (), txVector.IsShortGuardInterval (), 1), //phy rate |
236 |
mode.GetPhyRate (txVector), //phy rate |
| 236 |
4, //m |
237 |
4, //m |
| 237 |
5, //dFree |
238 |
5, //dFree |
| 238 |
8, //adFree |
239 |
8, //adFree |
| 239 |
31); //adFreePlusOne |
240 |
31); //adFreePlusOne |
| 240 |
} |
241 |
} |
| 241 |
} |
242 |
} |
| 242 |
else if (mode.GetConstellationSize (1) == 16) |
243 |
else if (mode.GetConstellationSize (nss) == 16) |
| 243 |
{ |
244 |
{ |
| 244 |
if (mode.GetCodeRate (1) == WIFI_CODE_RATE_1_2) |
245 |
if (mode.GetCodeRate (nss) == WIFI_CODE_RATE_1_2) |
| 245 |
{ |
246 |
{ |
| 246 |
return GetFecQamBer (snr, |
247 |
return GetFecQamBer (snr, |
| 247 |
nbits, |
248 |
nbits, |
| 248 |
txVector.GetChannelWidth () * 1000000, //signal spread |
249 |
txVector.GetChannelWidth () * 1000000, //signal spread |
| 249 |
mode.GetPhyRate (txVector.GetChannelWidth (), txVector.IsShortGuardInterval (), 1), //phy rate |
250 |
mode.GetPhyRate (txVector), //phy rate |
| 250 |
16, //m |
251 |
16, //m |
| 251 |
10, //dFree |
252 |
10, //dFree |
| 252 |
11, //adFree |
253 |
11, //adFree |
|
Lines 257-289
YansErrorRateModel::GetChunkSuccessRate (WifiMode mode, WifiTxVector txVector, d
|
Link Here
|
|---|
|
| 257 |
return GetFecQamBer (snr, |
258 |
return GetFecQamBer (snr, |
| 258 |
nbits, |
259 |
nbits, |
| 259 |
txVector.GetChannelWidth () * 1000000, //signal spread |
260 |
txVector.GetChannelWidth () * 1000000, //signal spread |
| 260 |
mode.GetPhyRate (txVector.GetChannelWidth (), txVector.IsShortGuardInterval (), 1), //phy rate |
261 |
mode.GetPhyRate (txVector), //phy rate |
| 261 |
16, //m |
262 |
16, //m |
| 262 |
5, //dFree |
263 |
5, //dFree |
| 263 |
8, //adFree |
264 |
8, //adFree |
| 264 |
31); //adFreePlusOne |
265 |
31); //adFreePlusOne |
| 265 |
} |
266 |
} |
| 266 |
} |
267 |
} |
| 267 |
else if (mode.GetConstellationSize (1) == 64) |
268 |
else if (mode.GetConstellationSize (nss) == 64) |
| 268 |
{ |
269 |
{ |
| 269 |
if (mode.GetCodeRate (1) == WIFI_CODE_RATE_2_3) |
270 |
if (mode.GetCodeRate (nss) == WIFI_CODE_RATE_2_3) |
| 270 |
{ |
271 |
{ |
| 271 |
return GetFecQamBer (snr, |
272 |
return GetFecQamBer (snr, |
| 272 |
nbits, |
273 |
nbits, |
| 273 |
txVector.GetChannelWidth () * 1000000, //signal spread |
274 |
txVector.GetChannelWidth () * 1000000, //signal spread |
| 274 |
mode.GetPhyRate (txVector.GetChannelWidth (), txVector.IsShortGuardInterval (), 1), //phy rate |
275 |
mode.GetPhyRate (txVector), //phy rate |
| 275 |
64, //m |
276 |
64, //m |
| 276 |
6, //dFree |
277 |
6, //dFree |
| 277 |
1, //adFree |
278 |
1, //adFree |
| 278 |
16); //adFreePlusOne |
279 |
16); //adFreePlusOne |
| 279 |
} |
280 |
} |
| 280 |
if (mode.GetCodeRate (1) == WIFI_CODE_RATE_5_6) |
281 |
if (mode.GetCodeRate (nss) == WIFI_CODE_RATE_5_6) |
| 281 |
{ |
282 |
{ |
| 282 |
//Table B.32 in Pâl Frenger et al., "Multi-rate Convolutional Codes". |
283 |
//Table B.32 in Pâl Frenger et al., "Multi-rate Convolutional Codes". |
| 283 |
return GetFecQamBer (snr, |
284 |
return GetFecQamBer (snr, |
| 284 |
nbits, |
285 |
nbits, |
| 285 |
txVector.GetChannelWidth () * 1000000, //signal spread |
286 |
txVector.GetChannelWidth () * 1000000, //signal spread |
| 286 |
mode.GetPhyRate (txVector.GetChannelWidth (), txVector.IsShortGuardInterval (), 1), //phy rate |
287 |
mode.GetPhyRate (txVector), //phy rate |
| 287 |
64, //m |
288 |
64, //m |
| 288 |
4, //dFree |
289 |
4, //dFree |
| 289 |
14, //adFree |
290 |
14, //adFree |
|
Lines 294-314
YansErrorRateModel::GetChunkSuccessRate (WifiMode mode, WifiTxVector txVector, d
|
Link Here
|
|---|
|
| 294 |
return GetFecQamBer (snr, |
295 |
return GetFecQamBer (snr, |
| 295 |
nbits, |
296 |
nbits, |
| 296 |
txVector.GetChannelWidth () * 1000000, //signal spread |
297 |
txVector.GetChannelWidth () * 1000000, //signal spread |
| 297 |
mode.GetPhyRate (txVector.GetChannelWidth (), txVector.IsShortGuardInterval (), 1), //phy rate |
298 |
mode.GetPhyRate (txVector), //phy rate |
| 298 |
64, //m |
299 |
64, //m |
| 299 |
5, //dFree |
300 |
5, //dFree |
| 300 |
8, //adFree |
301 |
8, //adFree |
| 301 |
31); //adFreePlusOne |
302 |
31); //adFreePlusOne |
| 302 |
} |
303 |
} |
| 303 |
} |
304 |
} |
| 304 |
else if (mode.GetConstellationSize (1) == 256) |
305 |
else if (mode.GetConstellationSize (nss) == 256) |
| 305 |
{ |
306 |
{ |
| 306 |
if (mode.GetCodeRate (1) == WIFI_CODE_RATE_5_6) |
307 |
if (mode.GetCodeRate (nss) == WIFI_CODE_RATE_5_6) |
| 307 |
{ |
308 |
{ |
| 308 |
return GetFecQamBer (snr, |
309 |
return GetFecQamBer (snr, |
| 309 |
nbits, |
310 |
nbits, |
| 310 |
txVector.GetChannelWidth () * 1000000, // signal spread |
311 |
txVector.GetChannelWidth () * 1000000, // signal spread |
| 311 |
mode.GetPhyRate (txVector.GetChannelWidth (), txVector.IsShortGuardInterval (), 1), // phy rate |
312 |
mode.GetPhyRate (txVector), //phy rate |
| 312 |
256, // m |
313 |
256, // m |
| 313 |
4, // dFree |
314 |
4, // dFree |
| 314 |
14, // adFree |
315 |
14, // adFree |
|
Lines 320-326
YansErrorRateModel::GetChunkSuccessRate (WifiMode mode, WifiTxVector txVector, d
|
Link Here
|
|---|
|
| 320 |
return GetFecQamBer (snr, |
321 |
return GetFecQamBer (snr, |
| 321 |
nbits, |
322 |
nbits, |
| 322 |
txVector.GetChannelWidth () * 1000000, // signal spread |
323 |
txVector.GetChannelWidth () * 1000000, // signal spread |
| 323 |
mode.GetPhyRate (txVector.GetChannelWidth (), txVector.IsShortGuardInterval (), 1), // phy rate |
324 |
mode.GetPhyRate (txVector), //phy rate |
| 324 |
256, // m |
325 |
256, // m |
| 325 |
5, // dFree |
326 |
5, // dFree |
| 326 |
8, // adFree |
327 |
8, // adFree |