20#include "ns3/ap-wifi-mac.h"
21#include "ns3/boolean.h"
22#include "ns3/constant-position-mobility-model.h"
23#include "ns3/ctrl-headers.h"
24#include "ns3/double.h"
25#include "ns3/he-configuration.h"
26#include "ns3/he-phy.h"
27#include "ns3/he-ppdu.h"
28#include "ns3/interference-helper.h"
30#include "ns3/mobility-helper.h"
31#include "ns3/multi-model-spectrum-channel.h"
32#include "ns3/nist-error-rate-model.h"
34#include "ns3/non-communicating-net-device.h"
35#include "ns3/pointer.h"
36#include "ns3/rng-seed-manager.h"
37#include "ns3/simulator.h"
38#include "ns3/spectrum-wifi-helper.h"
39#include "ns3/spectrum-wifi-phy.h"
40#include "ns3/sta-wifi-mac.h"
41#include "ns3/string.h"
43#include "ns3/threshold-preamble-detection-model.h"
45#include "ns3/waveform-generator.h"
46#include "ns3/wifi-mac-header.h"
47#include "ns3/wifi-net-device.h"
48#include "ns3/wifi-phy-listener.h"
49#include "ns3/wifi-psdu.h"
50#include "ns3/wifi-spectrum-phy-interface.h"
51#include "ns3/wifi-spectrum-signal-parameters.h"
52#include "ns3/wifi-spectrum-value-helper.h"
53#include "ns3/wifi-utils.h"
213 TypeId(
"ns3::OfdmaSpectrumWifiPhy")
215 .SetGroupName(
"Wifi")
216 .AddTraceSource(
"TxPpduUid",
217 "UID of the PPDU to be transmitted",
219 "ns3::OfdmaSpectrumWifiPhy::TxPpduUidCallback");
269std::map<std::pair<uint64_t, WifiPreamble>,
Ptr<Event>>&
308 void DoRun()
override;
320 std::vector<bool> statusPerMpdu);
331 std::vector<bool> statusPerMpdu);
342 std::vector<bool> statusPerMpdu);
398 void SendMuPpdu(uint16_t rxStaId1, uint16_t rxStaId2);
452 m_countRxSuccessSta1(0),
453 m_countRxSuccessSta2(0),
454 m_countRxSuccessSta3(0),
455 m_countRxFailureSta1(0),
456 m_countRxFailureSta2(0),
457 m_countRxFailureSta3(0),
458 m_countRxBytesSta1(0),
459 m_countRxBytesSta2(0),
460 m_countRxBytesSta3(0),
525 txVector.
SetRu(ru1, rxStaId1);
527 txVector.
SetNss(1, rxStaId1);
530 txVector.
SetRu(ru2, rxStaId2);
532 txVector.
SetNss(1, rxStaId2);
541 psdus.insert(std::make_pair(rxStaId1, psdu1));
550 psdus.insert(std::make_pair(rxStaId2, psdu2));
635 "The number of successfully received packets by STA 1 is not correct!");
638 "The number of unsuccessfuly received packets by STA 1 is not correct!");
641 "The number of bytes received by STA 1 is not correct!");
651 "The number of successfully received packets by STA 2 is not correct!");
654 "The number of unsuccessfuly received packets by STA 2 is not correct!");
657 "The number of bytes received by STA 2 is not correct!");
667 "The number of successfully received packets by STA 3 is not correct!");
670 "The number of unsuccessfuly received packets by STA 3 is not correct!");
673 "The number of bytes received by STA 3 is not correct!");
690 phy->GetAttribute(
"State", ptr);
692 currentState = state->GetState();
696 "PHY State " << currentState <<
" does not match expected state "
706 spectrumChannel->AddPropagationLossModel(lossModel);
708 CreateObject<ConstantSpeedPropagationDelayModel>();
709 spectrumChannel->SetPropagationDelayModel(delayModel);
713 m_phyAp = CreateObject<SpectrumWifiPhy>();
724 apNode->AggregateObject(apMobility);
725 apNode->AddDevice(apDev);
727 Ptr<Node> sta1Node = CreateObject<Node>();
729 m_phySta1 = CreateObject<OfdmaSpectrumWifiPhy>(1);
743 sta1Node->AggregateObject(sta1Mobility);
744 sta1Node->AddDevice(sta1Dev);
746 Ptr<Node> sta2Node = CreateObject<Node>();
748 m_phySta2 = CreateObject<OfdmaSpectrumWifiPhy>(2);
762 sta2Node->AggregateObject(sta2Mobility);
763 sta2Node->AddDevice(sta2Dev);
765 Ptr<Node> sta3Node = CreateObject<Node>();
767 m_phySta3 = CreateObject<OfdmaSpectrumWifiPhy>(3);
781 sta3Node->AggregateObject(sta3Mobility);
782 sta3Node->AddDevice(sta3Dev);
784 Ptr<Node> interfererNode = CreateObject<Node>();
790 interfererNode->AddDevice(interfererDev);
813 int64_t streamNumber = 0;
857 WifiPhyState::CCA_BUSY);
910 WifiPhyState::CCA_BUSY);
960 bands.push_back(bandInfo);
963 Ptr<SpectrumValue> interferencePsdRu1 = Create<SpectrumValue>(SpectrumInterferenceRu1);
964 double interferencePower = 0.1;
965 *interferencePsdRu1 = interferencePower / ((
m_channelWidth / 2) * 20e6);
990 WifiPhyState::CCA_BUSY);
995 WifiPhyState::CCA_BUSY);
1000 WifiPhyState::CCA_BUSY);
1005 WifiPhyState::CCA_BUSY);
1030 bands.push_back(bandInfo);
1033 Ptr<SpectrumValue> interferencePsdRu2 = Create<SpectrumValue>(SpectrumInterferenceRu2);
1034 *interferencePsdRu2 = interferencePower / ((
m_channelWidth / 2) * 20e6);
1059 WifiPhyState::CCA_BUSY);
1064 (
m_channelWidth >= 40) ? WifiPhyState::IDLE : WifiPhyState::CCA_BUSY);
1069 (
m_channelWidth >= 40) ? WifiPhyState::IDLE : WifiPhyState::CCA_BUSY);
1074 (
m_channelWidth >= 40) ? WifiPhyState::IDLE : WifiPhyState::CCA_BUSY);
1099 bands.push_back(bandInfo);
1102 Ptr<SpectrumValue> interferencePsdAll = Create<SpectrumValue>(SpectrumInterferenceAll);
1103 *interferencePsdAll = interferencePower / (
m_channelWidth * 20e6);
1128 WifiPhyState::CCA_BUSY);
1133 WifiPhyState::CCA_BUSY);
1138 WifiPhyState::CCA_BUSY);
1143 WifiPhyState::CCA_BUSY);
1199 void DoRun()
override;
1211 const std::vector<bool> statusPerMpdu);
1223 std::vector<bool> statusPerMpdu);
1271 const std::vector<bool>& puncturedSubchannels);
1327 :
TestCase(
"DL-OFDMA PHY puncturing test"),
1328 m_countRxSuccessSta1(0),
1329 m_countRxSuccessSta2(0),
1330 m_countRxFailureSta1(0),
1331 m_countRxFailureSta2(0),
1332 m_countRxBytesSta1(0),
1333 m_countRxBytesSta2(0),
1336 m_indexSubchannel(0),
1356 const std::vector<bool>& puncturedSubchannels)
1372 puncturedSubchannels.empty()
1376 txVector.
SetRu(ru1, rxStaId1);
1378 txVector.
SetNss(1, rxStaId1);
1380 ruType = puncturedSubchannels.empty()
1386 txVector.
SetRu(ru2, rxStaId2);
1388 txVector.
SetNss(1, rxStaId2);
1390 std::vector<uint8_t> ruAlloc;
1391 if (puncturedSubchannels.empty())
1393 std::fill_n(std::back_inserter(ruAlloc), 4, 200);
1397 ruAlloc.push_back(puncturedSubchannels.at(1) ? 192 : 200);
1398 ruAlloc.push_back(puncturedSubchannels.at(1) ? 113 : 200);
1399 ruAlloc.push_back(puncturedSubchannels.at(2) ? 113
1400 : (puncturedSubchannels.at(3) ? 192 : 200));
1401 ruAlloc.push_back(puncturedSubchannels.at(2) ? 192
1402 : (puncturedSubchannels.at(3) ? 113 : 200));
1415 psdus.insert(std::make_pair(rxStaId1, psdu1));
1424 psdus.insert(std::make_pair(rxStaId2, psdu2));
1426 if (!puncturedSubchannels.empty())
1494 "The number of successfully received packets by STA 1 is not correct!");
1497 "The number of unsuccessfuly received packets by STA 1 is not correct!");
1500 "The number of bytes received by STA 1 is not correct!");
1510 "The number of successfully received packets by STA 2 is not correct!");
1513 "The number of unsuccessfuly received packets by STA 2 is not correct!");
1516 "The number of bytes received by STA 2 is not correct!");
1532 phy->GetAttribute(
"State", ptr);
1534 currentState = state->GetState();
1538 "PHY State " << currentState <<
" does not match expected state "
1548 spectrumChannel->AddPropagationLossModel(lossModel);
1550 CreateObject<ConstantSpeedPropagationDelayModel>();
1551 spectrumChannel->SetPropagationDelayModel(delayModel);
1553 Ptr<Node> apNode = CreateObject<Node>();
1555 m_phyAp = CreateObject<SpectrumWifiPhy>();
1566 apNode->AggregateObject(apMobility);
1567 apNode->AddDevice(apDev);
1569 Ptr<Node> sta1Node = CreateObject<Node>();
1571 m_phySta1 = CreateObject<OfdmaSpectrumWifiPhy>(1);
1585 sta1Node->AggregateObject(sta1Mobility);
1586 sta1Node->AddDevice(sta1Dev);
1588 Ptr<Node> sta2Node = CreateObject<Node>();
1590 m_phySta2 = CreateObject<OfdmaSpectrumWifiPhy>(2);
1604 sta2Node->AggregateObject(sta2Mobility);
1605 sta2Node->AddDevice(sta2Dev);
1607 Ptr<Node> interfererNode = CreateObject<Node>();
1613 interfererNode->AddDevice(interfererDev);
1634 int64_t streamNumber = 0;
1658 bandInfo.
fl = bandInfo.
fc - (5 * 1e6);
1659 bandInfo.
fh = bandInfo.
fc + (5 * 1e6);
1661 bands.push_back(bandInfo);
1665 double interferencePower = 0.1;
1666 *interferencePsd = interferencePower / 10e6;
1681 std::vector<bool>{});
1699 WifiPhyState::IDLE);
1704 WifiPhyState::IDLE);
1746 std::vector<bool> puncturedSubchannels;
1751 puncturedSubchannels.push_back(
true);
1755 puncturedSubchannels.push_back(
false);
1763 puncturedSubchannels);
1781 WifiPhyState::IDLE);
1786 WifiPhyState::IDLE);
1813 for (
auto index : {1, 2, 3})
1836 void DoRun()
override;
1877 void CheckUid(uint16_t staId, uint64_t expectedUid);
1889 :
TestCase(
"UL-OFDMA PPDU UID attribution test"),
1890 m_ppduUidAp(UINT64_MAX),
1891 m_ppduUidSta1(UINT64_MAX),
1892 m_ppduUidSta2(UINT64_MAX)
1906 spectrumChannel->AddPropagationLossModel(lossModel);
1908 CreateObject<ConstantSpeedPropagationDelayModel>();
1909 spectrumChannel->SetPropagationDelayModel(delayModel);
1911 Ptr<Node> apNode = CreateObject<Node>();
1913 m_phyAp = CreateObject<OfdmaSpectrumWifiPhy>(0);
1933 apNode->AggregateObject(apMobility);
1934 apNode->AddDevice(apDev);
1936 apDev->SetHeConfiguration(CreateObject<HeConfiguration>());
1938 Ptr<Node> sta1Node = CreateObject<Node>();
1940 m_phySta1 = CreateObject<OfdmaSpectrumWifiPhy>(1);
1955 sta1Node->AggregateObject(sta1Mobility);
1956 sta1Node->AddDevice(sta1Dev);
1958 Ptr<Node> sta2Node = CreateObject<Node>();
1960 m_phySta2 = CreateObject<OfdmaSpectrumWifiPhy>(2);
1975 sta2Node->AggregateObject(sta2Mobility);
1976 sta2Node->AddDevice(sta2Dev);
2014 "UID " << uid <<
" does not match expected one " << expectedUid <<
" for "
2061 uint16_t rxStaId1 = 1;
2063 txVector.
SetRu(ru1, rxStaId1);
2065 txVector.
SetNss(1, rxStaId1);
2067 uint16_t rxStaId2 = 2;
2069 txVector.
SetRu(ru2, rxStaId2);
2071 txVector.
SetNss(1, rxStaId2);
2082 psdus.insert(std::make_pair(rxStaId1, psdu1));
2091 psdus.insert(std::make_pair(rxStaId2, psdu2));
2115 uint16_t rxStaId1 = 1;
2117 txVector1.
SetRu(ru1, rxStaId1);
2119 txVector1.
SetNss(1, rxStaId1);
2120 trigVector.
SetRu(ru1, rxStaId1);
2122 trigVector.
SetNss(1, rxStaId1);
2131 psdus1.insert(std::make_pair(rxStaId1, psdu1));
2133 uint16_t rxStaId2 = 2;
2135 txVector2.
SetRu(ru2, rxStaId2);
2137 txVector2.
SetNss(1, rxStaId2);
2138 trigVector.
SetRu(ru2, rxStaId2);
2140 trigVector.
SetNss(1, rxStaId2);
2149 psdus2.insert(std::make_pair(rxStaId2, psdu2));
2159 Time txDuration = std::max(txDuration1, txDuration2);
2169 hePhyAp->SetTrigVector(trigVector, txDuration);
2197 psdus.insert(std::make_pair(
SU_STA_ID, psdu));
2220 int64_t streamNumber = 0;
2270 void DoRun()
override;
2281 void RxHeTbPpdu(uint64_t uid, uint16_t staId,
double txPowerWatts,
size_t payloadSize);
2330 :
TestCase(
"UL-OFDMA multiple RX events test"),
2331 m_totalBytesDropped(0),
2332 m_trigVector(
HePhy::GetHeMcs7(),
2371 for (
const auto& uid : uids)
2374 auto it = events.find(pair);
2375 bool found = (it != events.end());
2378 "HE TB PPDU with UID " << uid <<
" has not been received!");
2386 expectedBytesDropped,
2387 "The number of dropped bytes is not correct!");
2393 double txPowerWatts,
2409 txVector.
SetRu(ru, staId);
2411 txVector.
SetNss(1, staId);
2422 psdus.insert(std::make_pair(staId, psdu));
2434 Time nonOfdmaDuration =
m_phy->
GetHePhy()->CalculateNonHeDurationForHeTb(txVector);
2437 uint16_t channelWidth = ruWidth < 20 ? 20 : ruWidth;
2444 rxParams->psd = rxPsd;
2445 rxParams->txPhy =
nullptr;
2446 rxParams->duration = nonOfdmaDuration;
2447 rxParams->ppdu = ppdu;
2450 std::tie(length, ppduDuration) =
2456 ppdu->ResetTxVector();
2460 Ptr<HePpdu> ppduOfdma = DynamicCast<HePpdu>(ppdu->Copy());
2462 const auto band =
m_phy->
GetHePhy()->GetRuBandForRx(txVector, staId);
2470 rxParamsOfdma->psd = rxPsd;
2471 rxParamsOfdma->txPhy =
nullptr;
2472 rxParamsOfdma->duration = ppduDuration - nonOfdmaDuration;
2473 rxParamsOfdma->ppdu = ppduOfdma;
2502 m_phy = CreateObject<OfdmaSpectrumWifiPhy>(0);
2505 auto mac = CreateObjectWithAttributes<ApWifiMac>(
2508 mac->SetAttribute(
"BeaconGeneration",
BooleanValue(
false));
2522 CreateObject<ThresholdPreambleDetectionModel>();
2523 preambleDetectionModel->SetAttribute(
"Threshold",
DoubleValue(4));
2524 preambleDetectionModel->SetAttribute(
"MinimumRssi",
DoubleValue(-82));
2527 heConfiguration->SetMaxTbPpduDelay(
NanoSeconds(400));
2528 dev->SetHeConfiguration(heConfiguration);
2530 node->AddDevice(dev);
2545 int64_t streamNumber = 0;
2548 double txPowerWatts = 0.01;
2552 std::vector<uint64_t> uids{0};
2580 std::vector<uint64_t> uids{1, 2};
2624 std::vector<uint64_t> uids{3, 4};
2668 std::vector<uint64_t> uids{5, 6};
2703 std::vector<uint64_t>{uids[0]});
2716 std::vector<uint64_t> uids{7, 8};
2751 std::vector<uint64_t>{uids[0]});
2764 std::vector<uint64_t> uids{9};
2842 const std::vector<Time>& )
override
2958 void DoRun()
override;
2969 uint8_t bssColor)
const;
2988 std::size_t payloadSize,
3000 void SendHeSuPpdu(uint16_t txStaId, std::size_t payloadSize, uint64_t uid, uint8_t bssColor);
3060 double expectedRxPower);
3069 double expectedRxPower);
3100 Time expectedLastNotification,
3101 bool expectedSuccess);
3118 std::vector<bool> statusPerMpdu);
3155 bool scheduleTxSta1 =
true,
3157 WifiPhyState expectedStateBeforeEnd = WifiPhyState::RX,
3170 double rxPowerNonOfdmaRu1,
3171 double rxPowerNonOfdmaRu2,
3172 double rxPowerOfdmaRu1,
3173 double rxPowerOfdmaRu2);
3186 std::shared_ptr<OfdmaTestPhyListener>
3205 m_countRxSuccessFromSta1(0),
3206 m_countRxSuccessFromSta2(0),
3207 m_countRxFailureFromSta1(0),
3208 m_countRxFailureFromSta2(0),
3209 m_countRxBytesFromSta1(0),
3210 m_countRxBytesFromSta2(0),
3219 std::size_t payloadSize,
3244 std::ostringstream addr;
3245 addr <<
"00:00:00:00:00:0" << txStaId;
3249 psdus.insert(std::make_pair(
SU_STA_ID, psdu));
3256 else if (txStaId == 2)
3260 else if (txStaId == 3)
3264 else if (txStaId == 0)
3268 phy->SetPpduUid(uid);
3269 phy->Send(psdus, txVector);
3275 uint8_t bssColor)
const
3312 bool primary80MHz =
true;
3315 primary80MHz =
false;
3319 txVector.
SetRu(ru, txStaId);
3321 txVector.
SetNss(1, txStaId);
3331 channelWidth = (channelWidth == 160 ? 20 : channelWidth * 2);
3348 if (channelWidth == 20)
3352 else if (channelWidth == 40)
3356 else if (channelWidth == 80)
3360 else if (channelWidth == 160)
3369 uint16_t aid1 = (error ==
AID ? 3 : 1);
3370 uint16_t aid2 = (error ==
AID ? 4 : 2);
3373 txVector.
SetRu(ru1, aid1);
3375 txVector.
SetNss(1, aid1);
3377 HeRu::RuSpec ru2(ruType, (channelWidth == 160 ? 1 : 2), (channelWidth != 160));
3378 txVector.
SetRu(ru2, aid2);
3380 txVector.
SetNss(1, aid2);
3399 std::size_t payloadSize,
3404 NS_LOG_FUNCTION(
this << txStaId << index << payloadSize << uid << +bssColor << (incrementUid));
3418 std::ostringstream addr;
3419 addr <<
"00:00:00:00:00:0" << txStaId;
3423 psdus.insert(std::make_pair(txStaId, psdu));
3430 else if (txStaId == 2)
3434 else if (txStaId == 3)
3440 phy->CalculateTxDuration(psdu->GetSize(), txVector, phy->GetPhyBand(), txStaId);
3444 phy->SetPpduUid(uid);
3445 phy->Send(psdus, txVector);
3474 NS_LOG_FUNCTION(
this << *psdu << psdu->GetAddr2() << rxSignalInfo << txVector);
3475 if (psdu->GetAddr2() ==
Mac48Address(
"00:00:00:00:00:01"))
3480 else if (psdu->GetAddr2() ==
Mac48Address(
"00:00:00:00:00:02"))
3491 if (psdu->GetAddr2() ==
Mac48Address(
"00:00:00:00:00:01"))
3495 else if (psdu->GetAddr2() ==
Mac48Address(
"00:00:00:00:00:02"))
3508 "The number of successfully received packets from STA 1 is not correct!");
3512 "The number of unsuccessfuly received packets from STA 1 is not correct!");
3515 "The number of bytes received from STA 1 is not correct!");
3525 "The number of successfully received packets from STA 2 is not correct!");
3529 "The number of unsuccessfuly received packets from STA 2 is not correct!");
3532 "The number of bytes received from STA 2 is not correct!");
3538 double expectedRxPower)
3542 auto rxPower =
event->GetRxPowerW(band);
3548 "RX power " << rxPower <<
" over (" << band
3549 <<
") does not match expected power " << expectedRxPower
3556 double expectedRxPower)
3565 if (expectedRxPower > 0.0)
3568 phy->GetEnergyDuration(expectedRxPower - step, band).IsStrictlyPositive(),
3570 "At least " << expectedRxPower <<
" W expected for OFDMA part over (" << band <<
") at "
3573 phy->GetEnergyDuration(expectedRxPower + step, band).IsStrictlyPositive(),
3575 "At most " << expectedRxPower <<
" W expected for OFDMA part over (" << band <<
") at "
3581 phy->GetEnergyDuration(expectedRxPower + step, band).IsStrictlyPositive(),
3583 "At most " << expectedRxPower <<
" W expected for OFDMA part over (" << band <<
") at "
3593 "m_currentEvent for AP was not cleared");
3596 "m_currentEvent for STA 1 was not cleared");
3599 "m_currentEvent for STA 2 was not cleared");
3616 phy->GetAttribute(
"State", ptr);
3618 currentState = state->GetState();
3622 "PHY State " << currentState <<
" does not match expected state "
3628 Time expectedLastNotification)
3631 expectedNotifications,
3632 "Number of RX start notifications "
3634 <<
" does not match expected count " << expectedNotifications
3637 expectedLastNotification,
3638 "Last time RX start notification has been received "
3640 <<
" does not match expected time " << expectedLastNotification
3646 Time expectedLastNotification,
3647 bool expectedSuccess)
3650 expectedNotifications,
3651 "Number of RX end notifications "
3653 <<
" does not match expected count " << expectedNotifications
3656 expectedLastNotification,
3657 "Last time RX end notification has been received "
3659 <<
" does not match expected time " << expectedLastNotification
3663 "Last time RX end notification indicated a "
3665 <<
" but expected a " << (expectedSuccess ?
"success" :
"failure")
3690 heConfiguration->SetAttribute(
"BssColor",
UintegerValue(bssColor));
3697 phy->SetAttribute(
"PowerDensityLimit",
DoubleValue(psdLimit));
3706 spectrumChannel->AddPropagationLossModel(lossModel);
3708 CreateObject<ConstantSpeedPropagationDelayModel>();
3709 spectrumChannel->SetPropagationDelayModel(delayModel);
3712 CreateObject<ThresholdPreambleDetectionModel>();
3713 preambleDetectionModel->SetAttribute(
3717 preambleDetectionModel->SetAttribute(
"Threshold",
DoubleValue(-100));
3719 Ptr<Node> apNode = CreateObject<Node>();
3722 auto apMac = CreateObjectWithAttributes<ApWifiMac>(
3725 apMac->SetAttribute(
"BeaconGeneration",
BooleanValue(
false));
3726 apDev->SetMac(apMac);
3727 m_phyAp = CreateObject<OfdmaSpectrumWifiPhy>(0);
3729 apDev->SetHeConfiguration(heConfiguration);
3745 apMac->SetWifiPhys({
m_phyAp});
3746 apNode->AggregateObject(apMobility);
3747 apNode->AddDevice(apDev);
3749 Ptr<Node> sta1Node = CreateObject<Node>();
3752 sta1Dev->SetHeConfiguration(CreateObject<HeConfiguration>());
3753 m_phySta1 = CreateObject<OfdmaSpectrumWifiPhy>(1);
3765 sta1Node->AggregateObject(sta1Mobility);
3766 sta1Node->AddDevice(sta1Dev);
3768 Ptr<Node> sta2Node = CreateObject<Node>();
3771 sta2Dev->SetHeConfiguration(CreateObject<HeConfiguration>());
3772 m_phySta2 = CreateObject<OfdmaSpectrumWifiPhy>(2);
3784 sta2Node->AggregateObject(sta2Mobility);
3785 sta2Node->AddDevice(sta2Dev);
3787 Ptr<Node> sta3Node = CreateObject<Node>();
3790 sta3Dev->SetHeConfiguration(CreateObject<HeConfiguration>());
3791 m_phySta3 = CreateObject<OfdmaSpectrumWifiPhy>(3);
3803 sta3Node->AggregateObject(sta3Mobility);
3804 sta3Node->AddDevice(sta3Dev);
3806 Ptr<Node> interfererNode = CreateObject<Node>();
3812 interfererNode->AddDevice(interfererDev);
3816 for (
auto& phy : phys)
3819 phy->SetAttribute(
"TxPowerStart",
DoubleValue(16.0));
3820 phy->SetAttribute(
"TxPowerEnd",
DoubleValue(16.0));
3821 phy->SetAttribute(
"PowerDensityLimit",
DoubleValue(100.0));
3824 phy->SetAttribute(
"TxMaskInnerBandMinimumRejection",
DoubleValue(-100.0));
3825 phy->SetAttribute(
"TxMaskOuterBandMinimumRejection",
DoubleValue(-100.0));
3826 phy->SetAttribute(
"TxMaskOuterBandMaximumRejection",
DoubleValue(-100.0));
3861 bool scheduleTxSta1,
3862 Time ulTimeDifference,
3866 static uint64_t uid = 0;
3916 expectedStateBeforeEnd);
3921 expectedStateAtEnd);
3924 if (expectedSuccessFromSta1 + expectedFailuresFromSta1 + expectedSuccessFromSta2 +
3925 expectedFailuresFromSta2 >
3929 const bool isSuccess = (expectedSuccessFromSta1 > 0) || (expectedSuccessFromSta2 > 0);
3959 expectedSuccessFromSta1,
3960 expectedFailuresFromSta1,
3961 expectedBytesFromSta1);
3966 expectedSuccessFromSta2,
3967 expectedFailuresFromSta2,
3968 expectedBytesFromSta2);
3978 double rxPowerNonOfdmaRu1,
3979 double rxPowerNonOfdmaRu2,
3980 double rxPowerOfdmaRu1,
3981 double rxPowerOfdmaRu2)
3987 Time nonOfdmaDuration = hePhy->CalculateNonHeDurationForHeTb(txVectorSta2);
3988 NS_ASSERT(nonOfdmaDuration == hePhy->CalculateNonHeDurationForHeTb(txVectorSta1));
3990 std::vector<double> rxPowerNonOfdma{rxPowerNonOfdmaRu1, rxPowerNonOfdmaRu2};
3991 std::vector<WifiSpectrumBandInfo> nonOfdmaBand{hePhy->GetNonOfdmaBand(txVectorSta1, 1),
3992 hePhy->GetNonOfdmaBand(txVectorSta2, 2)};
3993 std::vector<double> rxPowerOfdma{rxPowerOfdmaRu1, rxPowerOfdmaRu2};
3994 std::vector<WifiSpectrumBandInfo> ofdmaBand{hePhy->GetRuBandForRx(txVectorSta1, 1),
3995 hePhy->GetRuBandForRx(txVectorSta2, 2)};
3997 for (uint8_t i = 0; i < 2; ++i)
4004 delay + detectionDuration +
4010 rxPowerNonOfdma[i]);
4016 rxPowerNonOfdma[i]);
4040 delay + detectionDuration +
4046 rxPowerNonOfdma[i]);
4052 rxPowerNonOfdma[i]);
4070 if (rxPowerOfdmaRu1 != 0.0)
4077 double rxPowerNonOfdmaSta1Only =
4079 ? rxPowerNonOfdma[0]
4080 : rxPowerNonOfdma[0] / 2;
4083 delay + detectionDuration +
4089 rxPowerNonOfdmaSta1Only);
4095 rxPowerNonOfdmaSta1Only);
4119 int64_t streamNumber = 0;
4157 "Reception of solicited HE TB PPDUs");
4176 "Reception of solicited HE TB PPDUs with delay (< 400ns) between the two signals");
4195 "Dropping of unsolicited HE TB PPDUs");
4207 WifiPhyState::CCA_BUSY);
4215 "Dropping of HE TB PPDUs with channel width differing from TRIGVECTOR");
4227 WifiPhyState::CCA_BUSY,
4236 "Dropping of HE TB PPDUs with UL Length differing from TRIGVECTOR");
4248 WifiPhyState::CCA_BUSY,
4257 "Dropping of HE TB PPDUs with AIDs differing from TRIGVECTOR");
4269 WifiPhyState::CCA_BUSY,
4280 "Reception of solicited HE TB PPDUs with interference on RU 1 during PSDU reception");
4287 bands.push_back(bandInfo);
4290 Ptr<SpectrumValue> interferencePsdRu1 = Create<SpectrumValue>(SpectrumInterferenceRu1);
4291 double interferencePower = 0.1;
4292 *interferencePsdRu1 = interferencePower / ((
m_channelWidth / 2) * 20e6);
4302 WifiPhyState::CCA_BUSY,
4319 "Reception of solicited HE TB PPDUs with interference on RU 2 during PSDU reception");
4325 bands.push_back(bandInfo);
4328 Ptr<SpectrumValue> interferencePsdRu2 = Create<SpectrumValue>(SpectrumInterferenceRu2);
4329 *interferencePsdRu2 = interferencePower / ((
m_channelWidth / 2) * 20e6);
4339 ? WifiPhyState::IDLE
4340 : WifiPhyState::CCA_BUSY,
4357 "Reception of solicited HE TB PPDUs with interference on the full band "
4358 "during PSDU reception");
4364 bands.push_back(bandInfo);
4367 Ptr<SpectrumValue> interferencePsdAll = Create<SpectrumValue>(SpectrumInterferenceAll);
4368 *interferencePsdAll = interferencePower / (
m_channelWidth * 20e6);
4378 WifiPhyState::CCA_BUSY,
4396 "Reception of solicited HE TB PPDUs with another HE TB PPDU arriving on RU "
4397 "1 during PSDU reception");
4430 WifiPhyState::CCA_BUSY,
4448 "Reception of solicited HE TB PPDUs with another HE TB PPDU arriving on RU "
4449 "2 during PSDU reception");
4480 ? WifiPhyState::IDLE
4481 : WifiPhyState::CCA_BUSY,
4499 "Reception of solicited HE TB PPDUs with an HE SU PPDU arriving during the 400 ns window");
4526 "Reception of solicited HE TB PPDU only on RU 2");
4534 ? WifiPhyState::IDLE
4535 : WifiPhyState::CCA_BUSY);
4556 "Measure power for reception of HE TB PPDU only on RU 2");
4585 "Measure power for reception of HE TB PPDU only on RU 2 with PSD limitation");
4598 double rxPowerOfdma = rxPower;
4636 "Measure power for reception of HE TB PPDU on both RUs");
4659 "Reception of an HE TB PPDU from another BSS");
4687 "Reception of solicited HE TB PPDUs with delay (< 400ns) between the two signals and "
4688 "reception of an HE TB PPDU from another BSS between the ends of the two HE TB PPDUs");
4701 WifiPhyState::CCA_BUSY,
4760 void DoRun()
override;
4771 std::size_t payloadSize,
4845 std::vector<bool> statusPerMpdu);
4868 :
TestCase(
"PHY padding exclusion test"),
4869 m_countRxSuccessFromSta1(0),
4870 m_countRxSuccessFromSta2(0),
4871 m_countRxFailureFromSta1(0),
4872 m_countRxFailureFromSta2(0),
4873 m_countRxBytesFromSta1(0),
4874 m_countRxBytesFromSta2(0)
4881 std::size_t payloadSize,
4899 txVector.
SetRu(ru, txStaId);
4901 txVector.
SetNss(1, txStaId);
4908 std::ostringstream addr;
4909 addr <<
"00:00:00:00:00:0" << txStaId;
4913 psdus.insert(std::make_pair(txStaId, psdu));
4920 else if (txStaId == 2)
4929 phy->Send(psdus, txVector);
4957 NS_LOG_FUNCTION(
this << *psdu << psdu->GetAddr2() << rxSignalInfo << txVector);
4958 if (psdu->GetAddr2() ==
Mac48Address(
"00:00:00:00:00:01"))
4963 else if (psdu->GetAddr2() ==
Mac48Address(
"00:00:00:00:00:02"))
4974 if (psdu->GetAddr2() ==
Mac48Address(
"00:00:00:00:00:01"))
4978 else if (psdu->GetAddr2() ==
Mac48Address(
"00:00:00:00:00:02"))
4991 "The number of successfully received packets from STA 1 is not correct!");
4995 "The number of unsuccessfuly received packets from STA 1 is not correct!");
4998 "The number of bytes received from STA 1 is not correct!");
5008 "The number of successfully received packets from STA 2 is not correct!");
5012 "The number of unsuccessfuly received packets from STA 2 is not correct!");
5015 "The number of bytes received from STA 2 is not correct!");
5023 "m_currentEvent for AP was not cleared");
5026 "m_currentEvent for STA 1 was not cleared");
5029 "m_currentEvent for STA 2 was not cleared");
5043 WifiPhyState currentState = phy->GetState()->GetState();
5047 "PHY State " << currentState <<
" does not match expected state "
5070 int64_t streamNumber = 0;
5075 spectrumChannel->AddPropagationLossModel(lossModel);
5077 CreateObject<ConstantSpeedPropagationDelayModel>();
5078 spectrumChannel->SetPropagationDelayModel(delayModel);
5080 Ptr<Node> apNode = CreateObject<Node>();
5082 auto apMac = CreateObjectWithAttributes<ApWifiMac>(
5085 apMac->SetAttribute(
"BeaconGeneration",
BooleanValue(
false));
5086 apDev->SetMac(apMac);
5087 m_phyAp = CreateObject<OfdmaSpectrumWifiPhy>(0);
5089 apDev->SetHeConfiguration(heConfiguration);
5112 apDev->SetHeConfiguration(CreateObject<HeConfiguration>());
5113 apMac->SetWifiPhys({
m_phyAp});
5114 apNode->AggregateObject(apMobility);
5115 apNode->AddDevice(apDev);
5117 Ptr<Node> sta1Node = CreateObject<Node>();
5119 m_phySta1 = CreateObject<OfdmaSpectrumWifiPhy>(1);
5134 sta1Dev->SetHeConfiguration(CreateObject<HeConfiguration>());
5135 sta1Node->AggregateObject(sta1Mobility);
5136 sta1Node->AddDevice(sta1Dev);
5138 Ptr<Node> sta2Node = CreateObject<Node>();
5140 m_phySta2 = CreateObject<OfdmaSpectrumWifiPhy>(2);
5155 sta2Dev->SetHeConfiguration(CreateObject<HeConfiguration>());
5156 sta2Node->AggregateObject(sta2Mobility);
5157 sta2Node->AddDevice(sta2Dev);
5159 Ptr<Node> interfererNode = CreateObject<Node>();
5165 interfererNode->AddDevice(interfererDev);
5202 std::tie(length, ppduDuration) =
5206 hePhyAp->SetTrigVector(trigVector, ppduDuration);
5213 Time ppduWithPaddingDuration =
5214 expectedPpduDuration + 10 *
NanoSeconds(12800 + 1600 );
5225 ppduWithPaddingDuration);
5232 ppduWithPaddingDuration);
5238 ppduWithPaddingDuration);
5250 WifiPhyState::IDLE);
5268 ppduWithPaddingDuration);
5275 ppduWithPaddingDuration);
5281 ppduWithPaddingDuration);
5289 bands.push_back(bandInfo);
5292 Ptr<SpectrumValue> interferencePsdRu1 = Create<SpectrumValue>(SpectrumInterferenceRu1);
5293 double interferencePower = 0.1;
5313 WifiPhyState::CCA_BUSY);
5345 void DoRun()
override;
5352 void SendMuBar(std::vector<uint16_t> staIds);
5368 void RunOne(
bool setupBa);
5388 std::vector<bool> statusPerMpdu);
5413 :
TestCase(
"UL-OFDMA power control test"),
5419 m_requestedRssiSta1(0),
5420 m_requestedRssiSta2(0),
5446 NS_ASSERT(!staIds.empty() && staIds.size() <= 2);
5450 muBar.
SetType(TriggerFrameType::MU_BAR_TRIGGER);
5459 std::size_t index = 1;
5460 int8_t ulTargetRssi = -40;
5461 for (
const auto& staId : staIds)
5474 else if (staId == 2)
5514 bar->AddHeader(muBar);
5517 if (staIds.size() == 1)
5519 uint16_t aidSta1 = DynamicCast<StaWifiMac>(
m_sta1Dev->
GetMac())->GetAssociationId();
5520 if (staIds.front() == aidSta1)
5544 uint16_t staId = staIds.front();
5549 psdu->SetDuration(nav);
5550 psdus.insert(std::make_pair(
SU_STA_ID, psdu));
5562 double rssi = rxSignalInfo.
rssi;
5572 "The obtained RSSI from STA 1 at AP is different from the expected one ("
5573 << rssi <<
" vs " <<
m_rssiSta1 <<
", with tolerance of " <<
m_tol <<
")");
5581 "The obtained RSSI from STA 2 at AP is different from the expected one ("
5582 << rssi <<
" vs " <<
m_rssiSta2 <<
", with tolerance of " <<
m_tol <<
")");
5601 Ptr<Node> apNode = CreateObject<Node>();
5607 spectrumChannel->AddPropagationLossModel(lossModel);
5609 CreateObject<ConstantSpeedPropagationDelayModel>();
5610 spectrumChannel->SetPropagationDelayModel(delayModel);
5615 spectrumPhy.
Set(
"ChannelSettings",
StringValue(
"{0, 0, BAND_5GHZ, 0}"));
5619 wifi.SetRemoteStationManager(
"ns3::ConstantRateWifiManager",
5626 mac.SetType(
"ns3::StaWifiMac");
5628 wifi.AssignStreams(staDevs, 0);
5629 m_sta1Dev = DynamicCast<WifiNetDevice>(staDevs.
Get(0));
5631 m_sta2Dev = DynamicCast<WifiNetDevice>(staDevs.
Get(1));
5637 mac.SetType(
"ns3::ApWifiMac",
5642 m_apDev = DynamicCast<WifiNetDevice>(wifi.Install(spectrumPhy, mac, apNode).Get(0));
5651 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
5653 positionAlloc->Add(Vector(0.0, 0.0, 0.0));
5654 positionAlloc->Add(Vector(1.0, 0.0, 0.0));
5656 Vector(2.0, 0.0, 0.0));
5657 mobility.SetPositionAllocator(positionAlloc);
5659 mobility.Install(apNode);
5660 mobility.Install(staNodes);
5662 lossModel->SetDefaultLoss(50.0);
5687 int64_t streamNumber = 0;
5693 phySta1->AssignStreams(streamNumber);
5694 phySta2->AssignStreams(streamNumber);
5727 apMac->SetAttribute(
"BeaconGeneration",
BooleanValue(
false));
5736 std::vector<uint16_t> staIds{1};
5742 std::vector<uint16_t> staIds{2};
5751 std::vector<uint16_t> staIds{1, 2};
SpectrumWifiPhy used for testing OFDMA.
void SetTriggerFrameUid(uint64_t uid)
Since we assume trigger frame was previously received from AP, this is used to set its UID.
Ptr< const HePhy > GetHePhy() const
void(* TxPpduUidCallback)(uint64_t uid)
TracedCallback signature for UID of transmitted PPDU.
void SetPpduUid(uint64_t uid)
Set the global PPDU UID counter.
~OfdmaSpectrumWifiPhy() override
static TypeId GetTypeId()
Get the type ID.
std::map< std::pair< uint64_t, WifiPreamble >, Ptr< Event > > & GetCurrentPreambleEvents()
Ptr< OfdmaTestHePhy > m_ofdmTestHePhy
Pointer to HE PHY instance used for OFDMA test.
Ptr< Event > GetCurrentEvent()
void StartTx(Ptr< const WifiPpdu > ppdu) override
void DoDispose() override
Destructor implementation.
OfdmaSpectrumWifiPhy(uint16_t staId)
Constructor.
Time GetEnergyDuration(double energyW, WifiSpectrumBandInfo band)
Wrapper to InterferenceHelper method.
TracedCallback< uint64_t > m_phyTxPpduUidTrace
Callback providing UID of the PPDU that is about to be transmitted.
void DoInitialize() override
Initialize() implementation.
HE PHY slightly modified so as to return a given STA-ID in case of DL MU for OfdmaSpectrumWifiPhy.
OfdmaTestHePhy(uint16_t staId)
Constructor.
~OfdmaTestHePhy() override
void SetGlobalPpduUid(uint64_t uid)
Set the global PPDU UID counter.
uint16_t GetStaId(const Ptr< const WifiPpdu > ppdu) const override
Return the STA ID that has been assigned to the station this PHY belongs to.
uint16_t m_staId
ID of the STA to which this PHY belongs to.
PHY listener for OFDMA tests.
OfdmaTestPhyListener()=default
void NotifyRxEndError() override
We have received the last bit of a packet for which NotifyRxStart was invoked first and,...
void NotifyTxStart(Time duration, double txPowerDbm) override
bool m_lastRxSuccess
flag whether last RX has been successful
void NotifyRxStart(Time duration) override
Time GetLastRxStartNotification() const
Return the time at which the last RX start notification has been received.
void NotifySwitchingStart(Time duration) override
void NotifyWakeup() override
Notify listeners that we woke up.
uint32_t m_notifyRxStart
count number of RX start notifications
void Reset()
Reset function.
Time m_lastRxEnd
last time a RX end notification has been received
Time m_lastRxStart
last time a RX start notification has been received
Time GetLastRxEndNotification() const
Return the time at which the last RX end notification has been received.
void NotifyCcaBusyStart(Time duration, WifiChannelListType channelType, const std::vector< Time > &) override
uint32_t m_notifyRxEnd
count number of RX end notifications
bool IsLastRxSuccess() const
Return whether last RX has been successful.
void NotifySleep() override
Notify listeners that we went to sleep.
uint32_t GetNumRxEndNotifications() const
Return the number of RX end notifications that has been received since the last reset.
void NotifyRxEndOk() override
We have received the last bit of a packet for which NotifyRxStart was invoked first and,...
uint32_t GetNumRxStartNotifications() const
Return the number of RX start notifications that has been received since the last reset.
void NotifyOff() override
Notify listeners that we went to switch off.
void NotifyOn() override
Notify listeners that we went to switch on.
DL-OFDMA PHY puncturing test.
void DoTeardown() override
Implementation to do any local setup required for this TestCase.
uint32_t m_countRxBytesSta1
count RX bytes for STA 1
uint32_t m_countRxBytesSta2
count RX bytes for STA 2
Ptr< SpectrumWifiPhy > m_phyAp
PHY of AP.
void DoRun() override
Implementation to actually run this TestCase.
TestDlOfdmaPhyPuncturing()
Time m_expectedPpduDuration20Mhz
expected duration to send MU PPDU on 20 MHz RU
void CheckResultsSta1(uint32_t expectedRxSuccess, uint32_t expectedRxFailure, uint32_t expectedRxBytes)
Check the results for STA 1.
void ResetResults()
Reset the results.
uint32_t m_countRxSuccessSta2
count RX success for STA 2
void RunOne()
Run one function.
Ptr< OfdmaSpectrumWifiPhy > m_phySta1
PHY of STA 1.
void RxFailureSta1(Ptr< const WifiPsdu > psdu)
Receive failure function for STA 1.
uint32_t m_countRxFailureSta2
count RX failure for STA 2
void DoSetup() override
Implementation to do any local setup required for this TestCase.
void SendMuPpdu(uint16_t rxStaId1, uint16_t rxStaId2, const std::vector< bool > &puncturedSubchannels)
Send MU-PPDU function.
uint16_t m_frequency
frequency in MHz
uint16_t m_channelWidth
channel width in MHz
uint32_t m_countRxFailureSta1
count RX failure for STA 1
Time m_expectedPpduDuration40Mhz
expected duration to send MU PPDU on 40 MHz RU
void CheckResultsSta2(uint32_t expectedRxSuccess, uint32_t expectedRxFailure, uint32_t expectedRxBytes)
Check the results for STA 2.
void DoCheckPhyState(Ptr< OfdmaSpectrumWifiPhy > phy, WifiPhyState expectedState)
Check the PHY state now.
void RxFailureSta2(Ptr< const WifiPsdu > psdu)
Receive failure function for STA 2.
Ptr< WaveformGenerator > m_phyInterferer
PHY of interferer.
void StopInterference()
Stop interference function.
void CheckPhyState(Ptr< OfdmaSpectrumWifiPhy > phy, WifiPhyState expectedState)
Schedule now to check the PHY state.
uint8_t m_indexSubchannel
Index of the subchannel (starting from 0) that should contain an interference and be punctured during...
uint32_t m_countRxSuccessSta1
count RX success for STA 1
Ptr< OfdmaSpectrumWifiPhy > m_phySta2
PHY of STA 2.
void RxSuccessSta1(Ptr< const WifiPsdu > psdu, RxSignalInfo rxSignalInfo, WifiTxVector txVector, const std::vector< bool > statusPerMpdu)
Receive success function for STA 1.
void RxSuccessSta2(Ptr< const WifiPsdu > psdu, RxSignalInfo rxSignalInfo, WifiTxVector txVector, std::vector< bool > statusPerMpdu)
Receive success function for STA 2.
void GenerateInterference(Ptr< SpectrumValue > interferencePsd, Time duration)
Generate interference function.
uint16_t m_frequency
frequency in MHz
void DoSetup() override
Implementation to do any local setup required for this TestCase.
uint16_t m_channelWidth
channel width in MHz
uint32_t m_countRxFailureSta2
count RX failure for STA 2
void RxFailureSta2(Ptr< const WifiPsdu > psdu)
Receive failure function for STA 2.
void RunOne()
Run one function.
uint32_t m_countRxBytesSta2
count RX bytes for STA 2
void DoTeardown() override
Implementation to do any local setup required for this TestCase.
Time m_expectedPpduDuration
expected duration to send MU PPDU
void GenerateInterference(Ptr< SpectrumValue > interferencePsd, Time duration)
Generate interference function.
Ptr< WaveformGenerator > m_phyInterferer
PHY of interferer.
uint32_t m_countRxFailureSta3
count RX failure for STA 3
uint32_t m_countRxBytesSta1
count RX bytes for STA 1
TestDlOfdmaPhyTransmission()
Ptr< OfdmaSpectrumWifiPhy > m_phySta2
PHY of STA 2.
void RxSuccessSta2(Ptr< const WifiPsdu > psdu, RxSignalInfo rxSignalInfo, WifiTxVector txVector, std::vector< bool > statusPerMpdu)
Receive success function for STA 2.
void DoRun() override
Implementation to actually run this TestCase.
Ptr< SpectrumWifiPhy > m_phyAp
PHY of AP.
Ptr< OfdmaSpectrumWifiPhy > m_phySta1
PHY of STA 1.
void CheckResultsSta2(uint32_t expectedRxSuccess, uint32_t expectedRxFailure, uint32_t expectedRxBytes)
Check the results for STA 2.
void CheckPhyState(Ptr< OfdmaSpectrumWifiPhy > phy, WifiPhyState expectedState)
Schedule now to check the PHY state.
uint32_t m_countRxSuccessSta2
count RX success for STA 2
uint32_t m_countRxFailureSta1
count RX failure for STA 1
void RxSuccessSta1(Ptr< const WifiPsdu > psdu, RxSignalInfo rxSignalInfo, WifiTxVector txVector, std::vector< bool > statusPerMpdu)
Receive success function for STA 1.
void CheckResultsSta1(uint32_t expectedRxSuccess, uint32_t expectedRxFailure, uint32_t expectedRxBytes)
Check the results for STA 1.
Ptr< OfdmaSpectrumWifiPhy > m_phySta3
PHY of STA 3.
void RxSuccessSta3(Ptr< const WifiPsdu > psdu, RxSignalInfo rxSignalInfo, WifiTxVector txVector, std::vector< bool > statusPerMpdu)
Receive success function for STA 3.
uint32_t m_countRxSuccessSta3
count RX success for STA 3
void DoCheckPhyState(Ptr< OfdmaSpectrumWifiPhy > phy, WifiPhyState expectedState)
Check the PHY state now.
uint32_t m_countRxBytesSta3
count RX bytes for STA 3
void RxFailureSta3(Ptr< const WifiPsdu > psdu)
Receive failure function for STA 3.
void StopInterference()
Stop interference function.
void ResetResults()
Reset the results.
void RxFailureSta1(Ptr< const WifiPsdu > psdu)
Receive failure function for STA 1.
uint32_t m_countRxSuccessSta1
count RX success for STA 1
void CheckResultsSta3(uint32_t expectedRxSuccess, uint32_t expectedRxFailure, uint32_t expectedRxBytes)
Check the results for STA 3.
~TestDlOfdmaPhyTransmission() override
void SendMuPpdu(uint16_t rxStaId1, uint16_t rxStaId2)
Send MU-PPDU function.
UL-OFDMA multiple RX events test.
WifiTxVector m_trigVector
TRIGVECTOR.
Ptr< OfdmaSpectrumWifiPhy > m_phy
Phy.
void Reset()
Reset function.
~TestMultipleHeTbPreambles() override
void RxHeTbPpduOfdmaPart(Ptr< WifiSpectrumSignalParameters > rxParamsOfdma)
Receive OFDMA part of HE TB PPDU function.
void CheckHeTbPreambles(size_t nEvents, std::vector< uint64_t > uids)
Check the received HE TB preambles.
void RxHeTbPpdu(uint64_t uid, uint16_t staId, double txPowerWatts, size_t payloadSize)
Receive HE TB PPDU function.
TestMultipleHeTbPreambles()
uint64_t m_totalBytesDropped
total number of dropped bytes
void CheckBytesDropped(size_t expectedBytesDropped)
Check the number of bytes dropped.
void DoTeardown() override
Implementation to do any local setup required for this TestCase.
void DoRun() override
Implementation to actually run this TestCase.
void RxDropped(Ptr< const Packet > p, WifiPhyRxfailureReason reason)
RX dropped function.
void DoRxHeTbPpduOfdmaPart(Ptr< WifiSpectrumSignalParameters > rxParamsOfdma)
Receive OFDMA part of HE TB PPDU function.
void DoSetup() override
Implementation to do any local setup required for this TestCase.
PHY padding exclusion test.
void DoSetup() override
Implementation to do any local setup required for this TestCase.
void CheckRxFromSta1(uint32_t expectedSuccess, uint32_t expectedFailures, uint32_t expectedBytes)
Check the received PSDUs from STA1.
Ptr< OfdmaSpectrumWifiPhy > m_phySta2
PHY of STA 2.
void VerifyEventsCleared()
Verify all events are cleared at end of TX or RX.
TestPhyPaddingExclusion()
void DoCheckPhyState(Ptr< OfdmaSpectrumWifiPhy > phy, WifiPhyState expectedState)
Check the PHY state.
void DoTeardown() override
Implementation to do any local setup required for this TestCase.
~TestPhyPaddingExclusion() override
void GenerateInterference(Ptr< SpectrumValue > interferencePsd, Time duration)
Generate interference function.
Ptr< WaveformGenerator > m_phyInterferer
PHY of interferer.
uint32_t m_countRxSuccessFromSta2
count RX success from STA 2
void DoRun() override
Implementation to actually run this TestCase.
void RxFailure(Ptr< const WifiPsdu > psdu)
Receive failure function.
uint32_t m_countRxBytesFromSta1
count RX bytes from STA 1
Ptr< OfdmaSpectrumWifiPhy > m_phyAp
PHY of AP.
Ptr< OfdmaSpectrumWifiPhy > m_phySta1
PHY of STA 1.
void SendHeTbPpdu(uint16_t txStaId, std::size_t index, std::size_t payloadSize, Time txDuration)
Send HE TB PPDU function.
void RxSuccess(Ptr< const WifiPsdu > psdu, RxSignalInfo rxSignalInfo, WifiTxVector txVector, std::vector< bool > statusPerMpdu)
Receive success function.
void SetTrigVector(Time ppduDuration)
Set TRIGVECTOR for HE TB PPDU.
void Reset()
Reset function.
uint32_t m_countRxFailureFromSta1
count RX failure from STA 1
uint32_t m_countRxSuccessFromSta1
count RX success from STA 1
void StopInterference()
Stop interference function.
void RunOne()
Run one function.
void CheckRxFromSta2(uint32_t expectedSuccess, uint32_t expectedFailures, uint32_t expectedBytes)
Check the received PSDUs from STA2.
uint32_t m_countRxFailureFromSta2
count RX failure from STA 2
uint32_t m_countRxBytesFromSta2
count RX bytes from STA 2
void CheckPhyState(Ptr< OfdmaSpectrumWifiPhy > phy, WifiPhyState expectedState)
Check the PHY state.
void ScheduleTest(Time delay, bool solicited, WifiPhyState expectedStateAtEnd, uint32_t expectedSuccessFromSta1, uint32_t expectedFailuresFromSta1, uint32_t expectedBytesFromSta1, uint32_t expectedSuccessFromSta2, uint32_t expectedFailuresFromSta2, uint32_t expectedBytesFromSta2, bool scheduleTxSta1=true, Time ulTimeDifference=Seconds(0), WifiPhyState expectedStateBeforeEnd=WifiPhyState::RX, TrigVectorInfo error=NONE)
Schedule test to perform.
std::shared_ptr< OfdmaTestPhyListener > m_apPhyStateListener
listener for AP PHY state transitions
void GenerateInterference(Ptr< SpectrumValue > interferencePsd, Time duration)
Generate interference function.
WifiTxVector GetTxVectorForHeTbPpdu(uint16_t txStaId, std::size_t index, uint8_t bssColor) const
Get TXVECTOR for HE TB PPDU.
uint32_t m_countRxFailureFromSta1
count RX failure from STA 1
void DoCheckPhyState(Ptr< OfdmaSpectrumWifiPhy > phy, WifiPhyState expectedState)
Check the PHY state.
uint32_t m_countRxBytesFromSta1
count RX bytes from STA 1
uint16_t m_frequency
frequency in MHz
void RxFailure(Ptr< const WifiPsdu > psdu)
Receive failure function.
void CheckApRxStart(uint32_t expectedNotifications, Time expectedLastNotification)
Check the the number of RX start notifications at the AP as well as the last time a RX start has been...
TrigVectorInfo
Erroneous info included in a TRIGVECTOR.
void SchedulePowerMeasurementChecks(Time delay, double rxPowerNonOfdmaRu1, double rxPowerNonOfdmaRu2, double rxPowerOfdmaRu1, double rxPowerOfdmaRu2)
Schedule power measurement related checks.
void SetBssColor(Ptr< WifiPhy > phy, uint8_t bssColor)
Set the BSS color.
Ptr< OfdmaSpectrumWifiPhy > m_phySta2
PHY of STA 2.
void LogScenario(std::string log) const
Log scenario description.
void CheckRxFromSta2(uint32_t expectedSuccess, uint32_t expectedFailures, uint32_t expectedBytes)
Check the received PSDUs from STA2.
void SendHeTbPpdu(uint16_t txStaId, std::size_t index, std::size_t payloadSize, uint64_t uid, uint8_t bssColor, bool incrementUid)
Send HE TB PPDU function.
void SetPsdLimit(Ptr< WifiPhy > phy, double psdLimit)
Set the PSD limit.
void DoRun() override
Implementation to actually run this TestCase.
void DoSetup() override
Implementation to do any local setup required for this TestCase.
void StopInterference()
Stop interference function.
uint32_t m_countRxBytesFromSta2
count RX bytes from STA 2
void CheckNonOfdmaRxPower(Ptr< OfdmaSpectrumWifiPhy > phy, WifiSpectrumBandInfo band, double expectedRxPower)
Check the received power for the non-OFDMA of the HE TB PPDUs over the given band.
void Reset()
Reset function.
void DoTeardown() override
Implementation to do any local setup required for this TestCase.
void CheckPhyState(Ptr< OfdmaSpectrumWifiPhy > phy, WifiPhyState expectedState)
Check the PHY state.
Ptr< OfdmaSpectrumWifiPhy > m_phySta1
PHY of STA 1.
void RxSuccess(Ptr< const WifiPsdu > psdu, RxSignalInfo rxSignalInfo, WifiTxVector txVector, std::vector< bool > statusPerMpdu)
Receive success function.
~TestUlOfdmaPhyTransmission() override
TestUlOfdmaPhyTransmission()
void CheckRxFromSta1(uint32_t expectedSuccess, uint32_t expectedFailures, uint32_t expectedBytes)
Check the received PSDUs from STA1.
void RunOne()
Run one function.
uint32_t m_countRxSuccessFromSta2
count RX success from STA 2
Ptr< WaveformGenerator > m_phyInterferer
PHY of interferer.
void CheckApRxEnd(uint32_t expectedNotifications, Time expectedLastNotification, bool expectedSuccess)
Check the the number of RX end notifications at the AP as well as the last time a RX end has been not...
Ptr< OfdmaSpectrumWifiPhy > m_phySta3
PHY of STA 3.
void CheckOfdmaRxPower(Ptr< OfdmaSpectrumWifiPhy > phy, WifiSpectrumBandInfo band, double expectedRxPower)
Check the received power for the OFDMA part of the HE TB PPDUs over the given band.
uint16_t m_channelWidth
channel width in MHz
void SendHeSuPpdu(uint16_t txStaId, std::size_t payloadSize, uint64_t uid, uint8_t bssColor)
Send HE SU PPDU function.
uint32_t m_countRxFailureFromSta2
count RX failure from STA 2
void VerifyEventsCleared()
Verify all events are cleared at end of TX or RX.
void SetTrigVector(uint8_t bssColor, TrigVectorInfo error)
Set TRIGVECTOR for HE TB PPDU.
Time m_expectedPpduDuration
expected duration to send MU PPDU
uint32_t m_countRxSuccessFromSta1
count RX success from STA 1
Ptr< OfdmaSpectrumWifiPhy > m_phyAp
PHY of AP.
UL-OFDMA power control test.
double m_requestedRssiSta1
requested RSSI (in dBm) from STA 1 at AP for HE TB PPDUs
double m_txPowerStart
minimum transmission power (in dBm) for STAs
void DoRun() override
Implementation to actually run this TestCase.
double m_rssiSta2
expected RSSI (in dBm) from STA 2 at AP for HE TB PPDUs
Ptr< WifiNetDevice > m_sta2Dev
network device of STA 2
double m_txPowerEnd
maximum transmission power (in dBm) for STAs
void SetupBa(Address destination)
Send a QoS Data packet to the destination station in order to set up a block Ack session (so that the...
Ptr< WifiNetDevice > m_sta1Dev
network device of STA 1
double m_tol
tolerance (in dB) between received and expected RSSIs
Ptr< WifiNetDevice > m_apDev
network device of AP
void DoTeardown() override
Implementation to do any local setup required for this TestCase.
uint8_t m_bssColor
BSS color.
void ReceiveOkCallbackAtAp(Ptr< const WifiPsdu > psdu, RxSignalInfo rxSignalInfo, WifiTxVector txVector, std::vector< bool > statusPerMpdu)
Receive OK callback function at AP.
void ReplaceReceiveOkCallbackOfAp()
Replace the AP's callback on its PHY's ReceiveOkCallback by the ReceiveOkCallbackAtAp method.
double m_rssiSta1
expected RSSI (in dBm) from STA 1 at AP for HE TB PPDUs
uint8_t m_txPowerLevels
number of transmission power levels for STAs
double m_requestedRssiSta2
requested RSSI (in dBm) from STA 2 at AP for HE TB PPDUs
TestUlOfdmaPowerControl()
double m_txPowerAp
transmit power (in dBm) of AP
void RunOne(bool setupBa)
Run one simulation with an optional BA session set up phase.
void DoSetup() override
Implementation to do any local setup required for this TestCase.
Ptr< SpectrumWifiPhy > m_phyAp
PHY of AP.
~TestUlOfdmaPowerControl() override
void SendMuBar(std::vector< uint16_t > staIds)
Send a MU BAR through the AP to the STAs listed in the provided vector.
UL-OFDMA PPDU UID attribution test.
~TestUlOfdmaPpduUid() override
void TxPpduSta1(uint64_t uid)
Transmitted PPDU information function for STA 1.
void ResetPpduUid()
Reset the global PPDU UID counter in WifiPhy.
void CheckUid(uint16_t staId, uint64_t expectedUid)
Check the UID of the transmitted PPDU.
void TxPpduAp(uint64_t uid)
Transmitted PPDU information function for AP.
void TxPpduSta2(uint64_t uid)
Transmitted PPDU information function for STA 2.
Ptr< OfdmaSpectrumWifiPhy > m_phySta2
PHY of STA 2.
uint64_t m_ppduUidAp
UID of PPDU transmitted by AP.
uint64_t m_ppduUidSta1
UID of PPDU transmitted by STA1.
uint64_t m_ppduUidSta2
UID of PPDU transmitted by STA2.
void DoRun() override
Implementation to actually run this TestCase.
void DoTeardown() override
Implementation to do any local setup required for this TestCase.
void SendMuPpdu()
Send MU-PPDU toward both STAs.
Ptr< OfdmaSpectrumWifiPhy > m_phySta1
PHY of STA 1.
void DoSetup() override
Implementation to do any local setup required for this TestCase.
void SendTbPpdu()
Send TB-PPDU from both STAs.
Ptr< OfdmaSpectrumWifiPhy > m_phyAp
PHY of AP.
void SendSuPpdu(uint16_t txStaId)
Send SU-PPDU function.
wifi PHY OFDMA Test Suite
a polymophic address class
AttributeValue implementation for Boolean.
User Info field of Trigger frames.
void SetAid12(uint16_t aid)
Set the AID12 subfield, which carries the 12 LSBs of the AID of the station for which this User Info ...
void SetUlFecCodingType(bool ldpc)
Set the UL FEC Coding Type subfield, which indicates whether BCC or LDPC is used.
void SetUlMcs(uint8_t mcs)
Set the UL MCS subfield, which indicates the MCS of the solicited HE TB PPDU.
void SetMuBarTriggerDepUserInfo(const CtrlBAckRequestHeader &bar)
Set the Trigger Dependent User Info subfield for the MU-BAR variant of Trigger frames,...
void SetUlDcm(bool dcm)
Set the UL DCM subfield, which indicates whether or not DCM is used.
void SetSsAllocation(uint8_t startingSs, uint8_t nSs)
Set the SS Allocation subfield, which is present when the AID12 subfield is neither 0 nor 2045.
void SetUlTargetRssi(int8_t dBm)
Set the UL Target RSSI subfield to indicate the expected receive signal power in dBm.
void SetRuAllocation(HeRu::RuSpec ru)
Set the RU Allocation subfield according to the specified RU.
This class can be used to hold variables of floating point type such as 'double' or 'float'.
static WifiMode GetHeMcs9()
Return MCS 9 from HE MCS values.
static WifiMode GetHeMcs7()
Return MCS 7 from HE MCS values.
uint16_t GetStaId(const Ptr< const WifiPpdu > ppdu) const override
Return the STA ID that has been assigned to the station this PHY belongs to.
static std::pair< uint16_t, Time > ConvertHeTbPpduDurationToLSigLength(Time ppduDuration, const WifiTxVector &txVector, WifiPhyBand band)
Compute the L-SIG length value corresponding to the given HE TB PPDU duration.
@ PSD_HE_PORTION
HE portion of an HE PPDU.
@ PSD_NON_HE_PORTION
Non-HE portion of an HE PPDU.
RuType GetRuType() const
Get the RU type.
static uint16_t GetBandwidth(RuType ruType)
Get the approximate bandwidth occupied by a RU.
RuType
The different HE Resource Unit (RU) types.
static Mac48Address ConvertFrom(const Address &address)
static Mac48Address GetBroadcast()
Helper class used to assign positions and mobility models to nodes.
Keep track of the current position and velocity of an object.
holds a vector of ns3::NetDevice pointers
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
keep track of a set of node pointers.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
bool TraceConnectWithoutContext(std::string name, const CallbackBase &cb)
Connect a TraceSource to a Callback without a context.
void SetAttribute(std::string name, const AttributeValue &value)
Set a single attribute, raising fatal errors if unsuccessful.
Ptr< T > GetObject() const
Get a pointer to the requested aggregated Object.
void Dispose()
Dispose of this Object.
void SetOwner(Ptr< WifiPhy > wifiPhy)
Set the WifiPhy owning this PHY entity.
static uint64_t m_globalPpduUid
Global counter of the PPDU UID.
AttributeValue implementation for Pointer.
Smart pointer class similar to boost::intrusive_ptr.
static void SetRun(uint64_t run)
Set the run number of simulation.
static void SetSeed(uint32_t seed)
Set the seed.
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
static Time Now()
Return the current simulation virtual time.
static void Run()
Run the simulation.
static EventId ScheduleNow(FUNC f, Ts &&... args)
Schedule an event to expire Now.
static void Stop()
Tell the Simulator the calling event should be the last one executed.
Make it easy to create and manage PHY objects for the spectrum model.
void SetChannel(const Ptr< SpectrumChannel > channel)
void SetDevice(const Ptr< WifiNetDevice > device) override
Sets the device this PHY is associated with.
void StartRx(Ptr< SpectrumSignalParameters > rxParams, Ptr< const WifiSpectrumPhyInterface > interface)
Input method for delivering a signal from the spectrum channel and low-level PHY interface to this Sp...
void DoInitialize() override
Initialize() implementation.
void AddChannel(const Ptr< SpectrumChannel > channel, const FrequencyRange &freqRange=WHOLE_WIFI_SPECTRUM)
Attach a SpectrumChannel to use for a given frequency range.
void DoDispose() override
Destructor implementation.
uint16_t GetGuardBandwidth(uint16_t currentChannelWidth) const override
void StartTx(Ptr< const WifiPpdu > ppdu) override
Hold variables of type string.
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
Simulation virtual time values and global simulation resolution.
AttributeValue implementation for Time.
Forward calls to a chain of Callback.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Hold an unsigned integer type.
static WifiMode GetVhtMcs5()
Return MCS 5 from VHT MCS values.
helps to create WifiNetDevice objects
create MAC layers for a ns3::WifiNetDevice.
Ptr< WifiMac > GetMac() const
bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber) override
Ptr< HeConfiguration > GetHeConfiguration() const
Ptr< WifiPhy > GetPhy() const
Address GetAddress() const override
void Set(std::string name, const AttributeValue &v)
void SetErrorRateModel(std::string type, Args &&... args)
Helper function used to set the error rate model.
virtual void SetInterferenceHelper(const Ptr< InterferenceHelper > helper)
Sets the interference helper.
void Send(Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector)
This function is a wrapper for the Send variant that accepts a WifiConstPsduMap as first argument.
void SetErrorRateModel(const Ptr< ErrorRateModel > model)
Sets the error rate model.
std::map< std::pair< uint64_t, WifiPreamble >, Ptr< Event > > m_currentPreambleEvents
store event associated to a PPDU (that has a unique ID and preamble combination) whose preamble is be...
Time GetSifs() const
Return the Short Interframe Space (SIFS) for this PHY.
static Time GetPreambleDetectionDuration()
void SetReceiveErrorCallback(RxErrorCallback callback)
virtual void ConfigureStandard(WifiStandard standard)
Configure the PHY-level parameters for different Wi-Fi standard.
static Time CalculateTxDuration(uint32_t size, const WifiTxVector &txVector, WifiPhyBand band, uint16_t staId=SU_STA_ID)
std::map< WifiModulationClass, Ptr< PhyEntity > > m_phyEntities
This map holds the supported PHY entities.
void RegisterListener(const std::shared_ptr< WifiPhyListener > &listener)
void SetOperatingChannel(const ChannelTuple &channelTuple)
If the standard for this object has not been set yet, store the given channel settings.
WifiPhyBand GetPhyBand() const
Get the configured Wi-Fi band.
Ptr< Event > m_currentEvent
Hold the current event.
Ptr< PhyEntity > GetPhyEntity(WifiModulationClass modulation) const
Get the supported PHY entity corresponding to the modulation class.
uint64_t m_previouslyRxPpduUid
UID of the previously received PPDU, reset to UINT64_MAX upon transmission.
void SetPreambleDetectionModel(const Ptr< PreambleDetectionModel > preambleDetectionModel)
Sets the preamble detection model.
std::tuple< uint8_t, uint16_t, WifiPhyBand, uint8_t > ChannelTuple
Tuple identifying an operating channel.
void SetMobility(const Ptr< MobilityModel > mobility)
assign a mobility model to this device
Ptr< InterferenceHelper > m_interference
Pointer to a helper responsible for interference computations.
void SetReceiveOkCallback(RxOkCallback callback)
void Reset()
Reset data upon end of TX or RX.
const WifiPhyOperatingChannel & GetOperatingChannel() const
Get a const reference to the operating channel.
Ptr< PhyEntity > GetLatestPhyEntity() const
Get the latest PHY entity supported by this PHY instance.
virtual int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
receive notifications about PHY events.
static ConstIterator FindFirst(uint8_t number, uint16_t frequency, uint16_t width, WifiStandard standard, WifiPhyBand band, ConstIterator start=m_frequencyChannels.begin())
Find the first channel matching the specified parameters.
This objects implements the PHY state machine of the Wifi device.
static Ptr< SpectrumValue > CreateHeMuOfdmTxPowerSpectralDensity(uint32_t centerFrequency, uint16_t channelWidth, double txPowerW, uint16_t guardBandwidth, const WifiSpectrumBandIndices &ru)
Create a transmit power spectral density corresponding to the OFDMA part of HE TB PPDUs for a given R...
static Ptr< SpectrumValue > CreateHeOfdmTxPowerSpectralDensity(uint32_t centerFrequency, uint16_t channelWidth, double txPowerW, uint16_t guardBandwidth, double minInnerBandDbr=-20, double minOuterbandDbr=-28, double lowestPointDbr=-40, const std::vector< bool > &puncturedSubchannels=std::vector< bool >{})
Create a transmit power spectral density corresponding to OFDM High Efficiency (HE) (802....
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
void SetRuAllocation(const RuAllocation &ruAlloc, uint8_t p20Index)
Set RU_ALLOCATION field.
void SetInactiveSubchannels(const std::vector< bool > &inactiveSubchannels)
Set the 20 MHz subchannels that are punctured.
void SetHeMuUserInfo(uint16_t staId, HeMuUserInfo userInfo)
Set the HE MU user-specific transmission information for the given STA-ID.
WifiPreamble GetPreambleType() const
HeRu::RuSpec GetRu(uint16_t staId) const
Get the RU specification for the STA-ID.
const HeMuUserInfoMap & GetHeMuUserInfoMap() const
Get a const reference to the map HE MU user-specific transmission information indexed by STA-ID.
void SetRu(HeRu::RuSpec ru, uint16_t staId)
Set the RU specification for the STA-ID.
void SetLength(uint16_t length)
Set the LENGTH field of the L-SIG.
void SetSigBMode(const WifiMode &mode)
Set the MCS used for SIG-B.
void SetMode(WifiMode mode)
Sets the selected payload transmission mode.
void SetNss(uint8_t nss)
Sets the number of Nss.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
#define NS_ABORT_MSG(msg)
Unconditional abnormal program termination with a message.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not.
#define NS_TEST_ASSERT_MSG_EQ_TOL(actual, limit, tol, msg)
Test that actual and expected (limit) values are equal to plus or minus some tolerance and report and...
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Time NanoSeconds(uint64_t value)
Construct a Time in the indicated unit.
Time Seconds(double value)
Construct a Time in the indicated unit.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
WifiPhyRxfailureReason
Enumeration of the possible reception failure reasons.
WifiPhyBand
Identifies the PHY band.
WifiChannelListType
Enumeration of the possible channel-list parameter elements defined in Table 8-5 of IEEE 802....
@ WIFI_PHY_BAND_5GHZ
The 5 GHz band.
@ WIFI_MOD_CLASS_HE
HE (Clause 27)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::unordered_map< uint16_t, Ptr< const WifiPsdu > > WifiConstPsduMap
Map of const PSDUs indexed by STA-ID.
WifiPhyState
The state of the PHY layer.
Callback< R, Args... > MakeCallback(R(T::*memPtr)(Args...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
std::vector< BandInfo > Bands
Container of BandInfo.
double DbmToW(double dBm)
Convert from dBm to Watts.
uint32_t GetBlockAckSize(BlockAckType type)
Return the total BlockAck size (including FCS trailer).
static constexpr uint16_t SU_STA_ID
STA_ID to identify a single user (SU)
The building block of a SpectrumModel.
double fc
center frequency
double fl
lower limit of subband
double fh
upper limit of subband
RxSignalInfo structure containing info on the received signal.
WifiSpectrumBandInfo structure containing info about a spectrum band.
static const uint16_t DEFAULT_CHANNEL_WIDTH
static WifiPhyOfdmaTestSuite wifiPhyOfdmaTestSuite
the test suite
static const uint8_t DEFAULT_CHANNEL_NUMBER
static const WifiPhyBand DEFAULT_WIFI_BAND
static const uint16_t DEFAULT_GUARD_WIDTH
static const uint32_t DEFAULT_FREQUENCY