|
|
| 267 |
} |
267 |
} |
| 268 |
|
268 |
|
| 269 |
double |
269 |
double |
| 270 |
InterferenceHelper::CalculatePer (Ptr<const InterferenceHelper::Event> event, NiChanges *ni) const |
270 |
InterferenceHelper::CalculatePlcpPayloadPer (Ptr<const InterferenceHelper::Event> event, NiChanges *ni) const |
| 271 |
{ |
271 |
{ |
| 272 |
double psr = 1.0; /* Packet Success Rate */ |
272 |
double psr = 1.0; /* Packet Success Rate */ |
| 273 |
NiChanges::iterator j = ni->begin (); |
273 |
NiChanges::iterator j = ni->begin (); |
| 274 |
Time previous = (*j).GetTime (); |
274 |
Time previous = (*j).GetTime (); |
| 275 |
WifiMode payloadMode = event->GetPayloadMode (); |
275 |
WifiMode payloadMode = event->GetPayloadMode (); |
| 276 |
WifiPreamble preamble = event->GetPreambleType (); |
276 |
WifiPreamble preamble = event->GetPreambleType (); |
| 277 |
WifiMode MfHeaderMode ; |
|
|
| 278 |
if (preamble==WIFI_PREAMBLE_HT_MF) |
| 279 |
{ |
| 280 |
MfHeaderMode = WifiPhy::GetMFPlcpHeaderMode (payloadMode, preamble); //return L-SIG mode |
| 281 |
|
| 282 |
} |
| 283 |
WifiMode headerMode = WifiPhy::GetPlcpHeaderMode (payloadMode, preamble); |
| 284 |
Time plcpHeaderStart = (*j).GetTime () + WifiPhy::GetPlcpPreambleDuration (payloadMode, preamble); //packet start time+ preamble |
277 |
Time plcpHeaderStart = (*j).GetTime () + WifiPhy::GetPlcpPreambleDuration (payloadMode, preamble); //packet start time+ preamble |
| 285 |
Time plcpHsigHeaderStart = plcpHeaderStart + WifiPhy::GetPlcpHeaderDuration (payloadMode, preamble);//packet start time+ preamble+L SIG |
278 |
Time plcpHsigHeaderStart = plcpHeaderStart + WifiPhy::GetPlcpHeaderDuration (payloadMode, preamble);//packet start time+ preamble+L SIG |
| 286 |
Time plcpHtTrainingSymbolsStart = plcpHsigHeaderStart + WifiPhy::GetPlcpHtSigHeaderDuration (preamble);//packet start time+ preamble+L SIG+HT SIG |
279 |
Time plcpHtTrainingSymbolsStart = plcpHsigHeaderStart + WifiPhy::GetPlcpHtSigHeaderDuration (preamble);//packet start time+ preamble+L SIG+HT SIG |
|
|
| 309 |
{ |
302 |
{ |
| 310 |
//Case 2ai and 2aii: All formats |
303 |
//Case 2ai and 2aii: All formats |
| 311 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
304 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
|
|
305 |
noiseInterferenceW, |
| 306 |
payloadMode), |
| 307 |
current - plcpPayloadStart, |
| 308 |
payloadMode); |
| 309 |
|
| 310 |
} |
| 311 |
} |
| 312 |
//Case 3: previous is in HT-SIG: Non HT will not enter here since it didn't enter in the last two and they are all the same for non HT |
| 313 |
else if (previous >= plcpHsigHeaderStart) |
| 314 |
{ |
| 315 |
//Case 3a: cuurent after payload start |
| 316 |
if (current >= plcpPayloadStart) |
| 317 |
{ |
| 318 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
| 319 |
noiseInterferenceW, |
| 320 |
payloadMode), |
| 321 |
current - plcpPayloadStart, |
| 322 |
payloadMode); |
| 323 |
|
| 324 |
} |
| 325 |
|
| 326 |
} |
| 327 |
//Case 4: previous in L-SIG: GF will not reach here because it will execute the previous if and exit |
| 328 |
else if (previous >= plcpHeaderStart) |
| 329 |
{ |
| 330 |
//Case 4a: current after payload start |
| 331 |
if (current >= plcpPayloadStart) |
| 332 |
{ |
| 333 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
| 334 |
noiseInterferenceW, |
| 335 |
payloadMode), |
| 336 |
current - plcpPayloadStart, |
| 337 |
payloadMode); |
| 338 |
|
| 339 |
} |
| 340 |
} |
| 341 |
//Case 5: previous is in the preamble works for all cases |
| 342 |
else |
| 343 |
{ |
| 344 |
if (current >= plcpPayloadStart) |
| 345 |
{ |
| 346 |
//for all |
| 347 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
| 312 |
noiseInterferenceW, |
348 |
noiseInterferenceW, |
| 313 |
payloadMode), |
349 |
payloadMode), |
| 314 |
current - plcpPayloadStart, |
350 |
current - plcpPayloadStart, |
| 315 |
payloadMode); |
351 |
payloadMode); |
| 316 |
|
352 |
|
| 317 |
} |
353 |
} |
| 318 |
} |
354 |
} |
| 319 |
//Case 3: previous is in HT-SIG: Non HT will not enter here since it didn't enter in the last two and they are all the same for non HT |
355 |
|
| 320 |
else if (previous >=plcpHsigHeaderStart) |
356 |
noiseInterferenceW += (*j).GetDelta (); |
|
|
357 |
previous = (*j).GetTime (); |
| 358 |
j++; |
| 359 |
} |
| 360 |
|
| 361 |
double per = 1 - psr; |
| 362 |
return per; |
| 363 |
} |
| 364 |
|
| 365 |
double |
| 366 |
InterferenceHelper::CalculatePlcpHeaderPer (Ptr<const InterferenceHelper::Event> event, NiChanges *ni) const |
| 367 |
{ |
| 368 |
double psr = 1.0; /* Packet Success Rate */ |
| 369 |
NiChanges::iterator j = ni->begin (); |
| 370 |
Time previous = (*j).GetTime (); |
| 371 |
WifiMode payloadMode = event->GetPayloadMode (); |
| 372 |
WifiPreamble preamble = event->GetPreambleType (); |
| 373 |
WifiMode MfHeaderMode ; |
| 374 |
if (preamble == WIFI_PREAMBLE_HT_MF) |
| 375 |
{ |
| 376 |
MfHeaderMode = WifiPhy::GetMFPlcpHeaderMode (payloadMode, preamble); //return L-SIG mode |
| 377 |
} |
| 378 |
WifiMode headerMode = WifiPhy::GetPlcpHeaderMode (payloadMode, preamble); |
| 379 |
Time plcpHeaderStart = (*j).GetTime () + WifiPhy::GetPlcpPreambleDuration (payloadMode, preamble); // packet start time + preamble |
| 380 |
Time plcpHsigHeaderStart = plcpHeaderStart + WifiPhy::GetPlcpHeaderDuration (payloadMode, preamble); // packet start time + preamble+L SIG |
| 381 |
Time plcpHtTrainingSymbolsStart = plcpHsigHeaderStart + WifiPhy::GetPlcpHtSigHeaderDuration (preamble); // packet start time + preamble + L SIG + HT SIG |
| 382 |
Time plcpPayloadStart = plcpHtTrainingSymbolsStart + WifiPhy::GetPlcpHtTrainingSymbolDuration (preamble, event->GetTxVector()); // packet start time + preamble + L SIG + HT SIG + Training |
| 383 |
double noiseInterferenceW = (*j).GetDelta (); |
| 384 |
double powerW = event->GetRxPowerW (); |
| 385 |
j++; |
| 386 |
while (ni->end () != j) |
| 387 |
{ |
| 388 |
Time current = (*j).GetTime (); |
| 389 |
NS_ASSERT (current >= previous); |
| 390 |
//Case 1: previous is in HT-SIG: Non HT will not enter here since it didn't enter in the last two and they are all the same for non HT |
| 391 |
if (previous >= plcpHsigHeaderStart) |
| 321 |
{ |
392 |
{ |
| 322 |
//Case 3a: cuurent after payload start |
393 |
//Case 1a: cuurent after payload start |
| 323 |
if (current >=plcpPayloadStart) |
394 |
if (current >= plcpPayloadStart) |
| 324 |
{ |
395 |
{ |
| 325 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
396 |
|
| 326 |
noiseInterferenceW, |
|
|
| 327 |
payloadMode), |
| 328 |
current - plcpPayloadStart, |
| 329 |
payloadMode); |
| 330 |
|
397 |
|
| 331 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
398 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
| 332 |
noiseInterferenceW, |
399 |
noiseInterferenceW, |
| 333 |
headerMode), |
400 |
headerMode), |
| 334 |
plcpHtTrainingSymbolsStart - previous, |
401 |
plcpHtTrainingSymbolsStart - previous, |
| 335 |
headerMode); |
402 |
headerMode); |
| 336 |
} |
403 |
} |
| 337 |
//case 3b: current after HT training symbols start |
404 |
//case 1b: current after HT training symbols start |
| 338 |
else if (current >=plcpHtTrainingSymbolsStart) |
405 |
else if (current >=plcpHtTrainingSymbolsStart) |
| 339 |
{ |
406 |
{ |
| 340 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
407 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
| 341 |
noiseInterferenceW, |
408 |
noiseInterferenceW, |
| 342 |
headerMode), |
409 |
headerMode), |
| 343 |
plcpHtTrainingSymbolsStart - previous, |
410 |
plcpHtTrainingSymbolsStart - previous, |
| 344 |
headerMode); |
411 |
headerMode); |
| 345 |
|
412 |
|
| 346 |
} |
413 |
} |
| 347 |
//Case 3c: current is with previous in HT sig |
414 |
//Case 1c: current is with previous in HT sig |
| 348 |
else |
415 |
else |
| 349 |
{ |
416 |
{ |
| 350 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
417 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
| 351 |
noiseInterferenceW, |
418 |
noiseInterferenceW, |
| 352 |
headerMode), |
419 |
headerMode), |
| 353 |
current- previous, |
420 |
current - previous, |
| 354 |
headerMode); |
421 |
headerMode); |
| 355 |
|
422 |
|
| 356 |
} |
423 |
} |
| 357 |
} |
424 |
} |
| 358 |
//Case 4: previous in L-SIG: GF will not reach here because it will execute the previous if and exit |
425 |
// Case 2: previous in L-SIG: GF will not reach here because it will execute the previous if and exit |
| 359 |
else if (previous >= plcpHeaderStart) |
426 |
else if (previous >= plcpHeaderStart) |
| 360 |
{ |
427 |
{ |
| 361 |
//Case 4a: current after payload start |
428 |
// Case 2a: current after payload start |
| 362 |
if (current >=plcpPayloadStart) |
429 |
if (current >= plcpPayloadStart) |
| 363 |
{ |
430 |
{ |
| 364 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
431 |
// Case 2ai: Non HT format (No HT-SIG or Training Symbols) |
| 365 |
noiseInterferenceW, |
|
|
| 366 |
payloadMode), |
| 367 |
current - plcpPayloadStart, |
| 368 |
payloadMode); |
| 369 |
//Case 4ai: Non HT format (No HT-SIG or Training Symbols) |
| 370 |
if (preamble == WIFI_PREAMBLE_LONG || preamble == WIFI_PREAMBLE_SHORT) //plcpHtTrainingSymbolsStart==plcpHeaderStart) |
432 |
if (preamble == WIFI_PREAMBLE_LONG || preamble == WIFI_PREAMBLE_SHORT) //plcpHtTrainingSymbolsStart==plcpHeaderStart) |
| 371 |
{ |
433 |
{ |
| 372 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
434 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
| 373 |
noiseInterferenceW, |
435 |
noiseInterferenceW, |
| 374 |
headerMode), |
436 |
headerMode), |
| 375 |
plcpPayloadStart - previous, |
437 |
plcpPayloadStart - previous, |
| 376 |
headerMode); |
438 |
headerMode); |
| 377 |
} |
439 |
} |
| 378 |
|
440 |
else |
| 379 |
else{ |
441 |
{ |
| 380 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
442 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
| 381 |
noiseInterferenceW, |
443 |
noiseInterferenceW, |
| 382 |
headerMode), |
444 |
headerMode), |
|
|
| 389 |
MfHeaderMode); |
451 |
MfHeaderMode); |
| 390 |
} |
452 |
} |
| 391 |
} |
453 |
} |
| 392 |
//Case 4b: current in HT training symbol. non HT will not come here since it went in previous if or if the previous ifis not true this will be not true |
454 |
// Case 2b: current in HT training symbol. non HT will not come here since it went in previous if or if the previous ifis not true this will be not true |
| 393 |
else if (current >=plcpHtTrainingSymbolsStart) |
455 |
else if (current >= plcpHtTrainingSymbolsStart) |
| 394 |
{ |
456 |
{ |
| 395 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
457 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
| 396 |
noiseInterferenceW, |
458 |
noiseInterferenceW, |
|
|
| 403 |
plcpHsigHeaderStart - previous, |
465 |
plcpHsigHeaderStart - previous, |
| 404 |
MfHeaderMode); |
466 |
MfHeaderMode); |
| 405 |
} |
467 |
} |
| 406 |
//Case 4c: current in H sig.non HT will not come here since it went in previous if or if the previous ifis not true this will be not true |
468 |
// Case 2c: current in H sig. non HT will not come here since it went in previous if or if the previous ifis not true this will be not true |
| 407 |
else if (current >=plcpHsigHeaderStart) |
469 |
else if (current >= plcpHsigHeaderStart) |
| 408 |
{ |
470 |
{ |
| 409 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
471 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
| 410 |
noiseInterferenceW, |
472 |
noiseInterferenceW, |
|
|
| 418 |
MfHeaderMode); |
480 |
MfHeaderMode); |
| 419 |
|
481 |
|
| 420 |
} |
482 |
} |
| 421 |
//Case 4d: Current with prev in L SIG |
483 |
// Case 2d: Current with prev in L SIG |
| 422 |
else |
484 |
else |
| 423 |
{ |
485 |
{ |
| 424 |
//Case 4di: Non HT format (No HT-SIG or Training Symbols) |
486 |
// Case 4di: Non HT format (No HT-SIG or Training Symbols) |
| 425 |
if (preamble == WIFI_PREAMBLE_LONG || preamble == WIFI_PREAMBLE_SHORT) //plcpHtTrainingSymbolsStart==plcpHeaderStart) |
487 |
if (preamble == WIFI_PREAMBLE_LONG || preamble == WIFI_PREAMBLE_SHORT) //plcpHtTrainingSymbolsStart==plcpHeaderStart) |
| 426 |
{ |
488 |
{ |
| 427 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
489 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
| 428 |
noiseInterferenceW, |
490 |
noiseInterferenceW, |
| 429 |
headerMode), |
491 |
headerMode), |
| 430 |
current - previous, |
492 |
current - previous, |
| 431 |
headerMode); |
493 |
headerMode); |
| 432 |
} |
494 |
} |
| 433 |
else |
495 |
else |
| 434 |
{ |
496 |
{ |
| 435 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
497 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
| 436 |
noiseInterferenceW, |
498 |
noiseInterferenceW, |
| 437 |
MfHeaderMode), |
499 |
MfHeaderMode), |
| 438 |
current - previous, |
500 |
current - previous, |
| 439 |
MfHeaderMode); |
501 |
MfHeaderMode); |
| 440 |
} |
502 |
} |
| 441 |
} |
503 |
} |
| 442 |
} |
504 |
} |
| 443 |
//Case 5: previous is in the preamble works for all cases |
505 |
// Case 3: previous is in the preamble works for all cases |
| 444 |
else |
506 |
else |
| 445 |
{ |
507 |
{ |
| 446 |
if (current >= plcpPayloadStart) |
508 |
if (current >= plcpPayloadStart) |
| 447 |
{ |
509 |
{ |
| 448 |
//for all |
510 |
// Non HT format (No HT-SIG or Training Symbols) |
| 449 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
|
|
| 450 |
noiseInterferenceW, |
| 451 |
payloadMode), |
| 452 |
current - plcpPayloadStart, |
| 453 |
payloadMode); |
| 454 |
|
| 455 |
// Non HT format (No HT-SIG or Training Symbols) |
| 456 |
if (preamble == WIFI_PREAMBLE_LONG || preamble == WIFI_PREAMBLE_SHORT) |
511 |
if (preamble == WIFI_PREAMBLE_LONG || preamble == WIFI_PREAMBLE_SHORT) |
| 457 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
512 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
| 458 |
noiseInterferenceW, |
513 |
noiseInterferenceW, |
| 459 |
headerMode), |
514 |
headerMode), |
| 460 |
plcpPayloadStart - plcpHeaderStart, |
515 |
plcpPayloadStart - plcpHeaderStart, |
| 461 |
headerMode); |
516 |
headerMode); |
| 462 |
else |
517 |
else |
| 463 |
// Greenfield or Mixed format |
518 |
// Greenfield or Mixed format |
| 464 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
519 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
|
|
| 473 |
plcpHsigHeaderStart-plcpHeaderStart, |
528 |
plcpHsigHeaderStart-plcpHeaderStart, |
| 474 |
MfHeaderMode); |
529 |
MfHeaderMode); |
| 475 |
} |
530 |
} |
| 476 |
else if (current >=plcpHtTrainingSymbolsStart ) |
531 |
else if (current >= plcpHtTrainingSymbolsStart ) |
| 477 |
{ |
532 |
{ |
| 478 |
// Non HT format will not come here since it will execute prev if |
533 |
// Non HT format will not come here since it will execute prev if |
| 479 |
// Greenfield or Mixed format |
534 |
// Greenfield or Mixed format |
| 480 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
535 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
| 481 |
noiseInterferenceW, |
536 |
noiseInterferenceW, |
| 482 |
headerMode), |
537 |
headerMode), |
| 483 |
plcpHtTrainingSymbolsStart - plcpHsigHeaderStart, |
538 |
plcpHtTrainingSymbolsStart - plcpHsigHeaderStart, |
| 484 |
headerMode); |
539 |
headerMode); |
|
|
540 |
// Greenfield |
| 485 |
if (preamble == WIFI_PREAMBLE_HT_MF) |
541 |
if (preamble == WIFI_PREAMBLE_HT_MF) |
| 486 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
542 |
{ |
| 487 |
noiseInterferenceW, |
543 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
| 488 |
MfHeaderMode), |
544 |
noiseInterferenceW, |
| 489 |
plcpHsigHeaderStart-plcpHeaderStart, |
545 |
MfHeaderMode), |
| 490 |
MfHeaderMode); |
546 |
plcpHsigHeaderStart-plcpHeaderStart, |
|
|
547 |
MfHeaderMode); |
| 548 |
} |
| 491 |
} |
549 |
} |
| 492 |
//non HT will not come here |
550 |
// non HT will not come here |
| 493 |
else if (current >=plcpHsigHeaderStart) |
551 |
else if (current >= plcpHsigHeaderStart) |
| 494 |
{ |
552 |
{ |
| 495 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
553 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
| 496 |
noiseInterferenceW, |
554 |
noiseInterferenceW, |
|
|
| 513 |
{ |
571 |
{ |
| 514 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
572 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
| 515 |
noiseInterferenceW, |
573 |
noiseInterferenceW, |
| 516 |
headerMode), |
574 |
headerMode), |
| 517 |
current - plcpHeaderStart, |
575 |
current - plcpHeaderStart, |
| 518 |
headerMode); |
576 |
headerMode); |
| 519 |
} |
577 |
} |
| 520 |
else |
578 |
else |
| 521 |
{ |
579 |
{ |
| 522 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
580 |
psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, |
| 523 |
noiseInterferenceW, |
581 |
noiseInterferenceW, |
| 524 |
MfHeaderMode), |
582 |
MfHeaderMode), |
| 525 |
current - plcpHeaderStart, |
583 |
current - plcpHeaderStart, |
| 526 |
MfHeaderMode); |
584 |
MfHeaderMode); |
| 527 |
} |
585 |
} |
| 528 |
} |
586 |
} |
| 529 |
} |
587 |
} |
|
|
| 537 |
return per; |
595 |
return per; |
| 538 |
} |
596 |
} |
| 539 |
|
597 |
|
| 540 |
|
|
|
| 541 |
struct InterferenceHelper::SnrPer |
598 |
struct InterferenceHelper::SnrPer |
| 542 |
InterferenceHelper::CalculateSnrPer (Ptr<InterferenceHelper::Event> event) |
599 |
InterferenceHelper::CalculatePlcpPayloadSnrPer (Ptr<InterferenceHelper::Event> event) |
| 543 |
{ |
600 |
{ |
| 544 |
NiChanges ni; |
601 |
NiChanges ni; |
| 545 |
double noiseInterferenceW = CalculateNoiseInterferenceW (event, &ni); |
602 |
double noiseInterferenceW = CalculateNoiseInterferenceW (event, &ni); |
|
|
| 550 |
/* calculate the SNIR at the start of the packet and accumulate |
607 |
/* calculate the SNIR at the start of the packet and accumulate |
| 551 |
* all SNIR changes in the snir vector. |
608 |
* all SNIR changes in the snir vector. |
| 552 |
*/ |
609 |
*/ |
| 553 |
double per = CalculatePer (event, &ni); |
610 |
double per = CalculatePlcpPayloadPer (event, &ni); |
|
|
611 |
|
| 612 |
struct SnrPer snrPer; |
| 613 |
snrPer.snr = snr; |
| 614 |
snrPer.per = per; |
| 615 |
return snrPer; |
| 616 |
} |
| 617 |
|
| 618 |
struct InterferenceHelper::SnrPer |
| 619 |
InterferenceHelper::CalculatePlcpHeaderSnrPer (Ptr<InterferenceHelper::Event> event) |
| 620 |
{ |
| 621 |
NiChanges ni; |
| 622 |
double noiseInterferenceW = CalculateNoiseInterferenceW (event, &ni); |
| 623 |
double snr = CalculateSnr (event->GetRxPowerW (), |
| 624 |
noiseInterferenceW, |
| 625 |
WifiPhy::GetPlcpHeaderMode (event->GetPayloadMode (), event->GetPreambleType ())); |
| 626 |
|
| 627 |
/* calculate the SNIR at the start of the plcp header and accumulate |
| 628 |
* all SNIR changes in the snir vector. |
| 629 |
*/ |
| 630 |
double per = CalculatePlcpHeaderPer (event, &ni); |
| 554 |
|
631 |
|
| 555 |
struct SnrPer snrPer; |
632 |
struct SnrPer snrPer; |
| 556 |
snrPer.snr = snr; |
633 |
snrPer.snr = snr; |