9#include "ns3/ap-wifi-mac.h"
10#include "ns3/boolean.h"
11#include "ns3/constant-position-mobility-model.h"
12#include "ns3/ctrl-headers.h"
13#include "ns3/double.h"
14#include "ns3/he-configuration.h"
15#include "ns3/he-phy.h"
16#include "ns3/he-ppdu.h"
17#include "ns3/interference-helper.h"
19#include "ns3/mobility-helper.h"
20#include "ns3/multi-model-spectrum-channel.h"
21#include "ns3/nist-error-rate-model.h"
23#include "ns3/non-communicating-net-device.h"
24#include "ns3/pointer.h"
25#include "ns3/rng-seed-manager.h"
26#include "ns3/simulator.h"
27#include "ns3/spectrum-wifi-helper.h"
28#include "ns3/spectrum-wifi-phy.h"
29#include "ns3/sta-wifi-mac.h"
30#include "ns3/string.h"
32#include "ns3/threshold-preamble-detection-model.h"
34#include "ns3/waveform-generator.h"
35#include "ns3/wifi-mac-header.h"
36#include "ns3/wifi-net-device.h"
37#include "ns3/wifi-phy-listener.h"
38#include "ns3/wifi-psdu.h"
39#include "ns3/wifi-spectrum-phy-interface.h"
40#include "ns3/wifi-spectrum-signal-parameters.h"
41#include "ns3/wifi-spectrum-value-helper.h"
42#include "ns3/wifi-utils.h"
202 TypeId(
"ns3::OfdmaSpectrumWifiPhy")
204 .SetGroupName(
"Wifi")
205 .AddTraceSource(
"TxPpduUid",
206 "UID of the PPDU to be transmitted",
208 "ns3::OfdmaSpectrumWifiPhy::TxPpduUidCallback");
258std::map<std::pair<uint64_t, WifiPreamble>,
Ptr<Event>>&
297 void DoRun()
override;
441 m_countRxSuccessSta1(0),
442 m_countRxSuccessSta2(0),
443 m_countRxSuccessSta3(0),
444 m_countRxFailureSta1(0),
445 m_countRxFailureSta2(0),
446 m_countRxFailureSta3(0),
447 m_countRxBytesSta1(0),
448 m_countRxBytesSta2(0),
449 m_countRxBytesSta3(0),
489 txVector.SetRuAllocation({96}, 0);
494 txVector.SetRuAllocation({192, 192}, 0);
499 txVector.SetRuAllocation({200, 200, 200, 200}, 0);
504 txVector.SetRuAllocation({208, 208, 208, 208, 208, 208, 208, 208}, 0);
528 hdr1.SetSequenceNumber(1);
537 hdr2.SetSequenceNumber(2);
567 const std::vector<bool>& )
578 const std::vector<bool>& )
589 const std::vector<bool>& )
624 "The number of successfully received packets by STA 1 is not correct!");
627 "The number of unsuccessfuly received packets by STA 1 is not correct!");
630 "The number of bytes received by STA 1 is not correct!");
640 "The number of successfully received packets by STA 2 is not correct!");
643 "The number of unsuccessfuly received packets by STA 2 is not correct!");
646 "The number of bytes received by STA 2 is not correct!");
656 "The number of successfully received packets by STA 3 is not correct!");
659 "The number of unsuccessfuly received packets by STA 3 is not correct!");
662 "The number of bytes received by STA 3 is not correct!");
679 phy->GetAttribute(
"State", ptr);
685 "PHY State " <<
currentState <<
" does not match expected state "
847 WifiPhyState::CCA_BUSY);
900 WifiPhyState::CCA_BUSY);
980 WifiPhyState::CCA_BUSY);
985 WifiPhyState::CCA_BUSY);
990 WifiPhyState::CCA_BUSY);
995 WifiPhyState::CCA_BUSY);
1049 WifiPhyState::CCA_BUSY);
1055 : WifiPhyState::CCA_BUSY);
1061 : WifiPhyState::CCA_BUSY);
1067 : WifiPhyState::CCA_BUSY);
1121 WifiPhyState::CCA_BUSY);
1126 WifiPhyState::CCA_BUSY);
1131 WifiPhyState::CCA_BUSY);
1136 WifiPhyState::CCA_BUSY);
1192 void DoRun()
override;
1320 :
TestCase(
"DL-OFDMA PHY puncturing test"),
1321 m_countRxSuccessSta1(0),
1322 m_countRxSuccessSta2(0),
1323 m_countRxFailureSta1(0),
1324 m_countRxFailureSta2(0),
1325 m_countRxBytesSta1(0),
1326 m_countRxBytesSta2(0),
1327 m_frequency(
MHz_u{5210}),
1328 m_channelWidth(
MHz_u{80}),
1329 m_indexSubchannel(0),
1386 std::fill_n(std::back_inserter(
ruAlloc), 4, 200);
1398 txVector.SetRuAllocation(
ruAlloc, 0);
1406 hdr1.SetSequenceNumber(1);
1415 hdr2.SetSequenceNumber(2);
1448 const std::vector<bool>& )
1459 const std::vector<bool>& )
1487 "The number of successfully received packets by STA 1 is not correct!");
1490 "The number of unsuccessfuly received packets by STA 1 is not correct!");
1493 "The number of bytes received by STA 1 is not correct!");
1503 "The number of successfully received packets by STA 2 is not correct!");
1506 "The number of unsuccessfuly received packets by STA 2 is not correct!");
1509 "The number of bytes received by STA 2 is not correct!");
1525 phy->GetAttribute(
"State", ptr);
1531 "PHY State " <<
currentState <<
" does not match expected state "
1675 std::vector<bool>{});
1693 WifiPhyState::IDLE);
1698 WifiPhyState::IDLE);
1776 WifiPhyState::IDLE);
1781 WifiPhyState::IDLE);
1808 for (
auto index : {1, 2, 3})
1831 void DoRun()
override;
1884 :
TestCase(
"UL-OFDMA PPDU UID attribution test"),
2010 "UID " <<
uid <<
" does not match expected one " <<
expectedUid <<
" for "
2069 txVector.SetRuAllocation({96}, 0);
2076 hdr1.SetSequenceNumber(1);
2085 hdr2.SetSequenceNumber(2);
2125 hdr1.SetSequenceNumber(1);
2143 hdr2.SetSequenceNumber(2);
2191 hdr.SetSequenceNumber(1);
2266 void DoRun()
override;
2326 :
TestCase(
"UL-OFDMA multiple RX events test"),
2327 m_totalBytesDropped(0),
2328 m_trigVector(
HePhy::GetHeMcs7(),
2370 auto it = events.find(
pair);
2371 bool found = (
it != events.end());
2374 "HE TB PPDU with UID " <<
uid <<
" has not been received!");
2383 "The number of dropped bytes is not correct!");
2405 txVector.SetRu(ru, staId);
2407 txVector.SetNss(1, staId);
2416 hdr.SetSequenceNumber(1);
2418 psdus.insert(std::make_pair(staId, psdu));
2434 m_phy->
GetHePhy()->GetCenterFrequenciesForNonHePart(ppdu, staId).front();
2451 txVector.SetLength(length);
2455 ppdu->ResetTxVector();
2461 const auto band =
m_phy->
GetHePhy()->GetRuBandForRx(txVector, staId);
2507 mac->SetAttribute(
"BeaconGeneration",
BooleanValue(
false));
2529 node->AddDevice(dev);
2551 std::vector<uint64_t>
uids{0};
2579 std::vector<uint64_t>
uids{1, 2};
2623 std::vector<uint64_t>
uids{3, 4};
2667 std::vector<uint64_t>
uids{5, 6};
2702 std::vector<uint64_t>{
uids[0]});
2715 std::vector<uint64_t>
uids{7, 8};
2750 std::vector<uint64_t>{
uids[0]});
2763 std::vector<uint64_t>
uids{9};
2841 const std::vector<Time>& )
override
2957 void DoRun()
override;
2968 uint8_t bssColor)
const;
2987 std::size_t payloadSize,
3185 std::shared_ptr<OfdmaTestPhyListener>
3204 m_countRxSuccessFromSta1(0),
3205 m_countRxSuccessFromSta2(0),
3206 m_countRxFailureFromSta1(0),
3207 m_countRxFailureFromSta2(0),
3208 m_countRxBytesFromSta1(0),
3209 m_countRxBytesFromSta2(0),
3218 std::size_t payloadSize,
3243 std::ostringstream addr;
3244 addr <<
"00:00:00:00:00:0" <<
txStaId;
3246 hdr.SetSequenceNumber(1);
3267 phy->SetPpduUid(
uid);
3268 phy->Send(
psdus, txVector);
3274 uint8_t bssColor)
const
3330 channelWidth = (channelWidth ==
MHz_u{160} ?
MHz_u{20} : channelWidth * 2);
3347 if (channelWidth ==
MHz_u{20})
3351 else if (channelWidth ==
MHz_u{40})
3355 else if (channelWidth ==
MHz_u{80})
3359 else if (channelWidth ==
MHz_u{160})
3368 uint16_t
aid1 = (error ==
AID ? 3 : 1);
3369 uint16_t
aid2 = (error ==
AID ? 4 : 2);
3398 std::size_t payloadSize,
3417 std::ostringstream addr;
3418 addr <<
"00:00:00:00:00:0" <<
txStaId;
3420 hdr.SetSequenceNumber(1);
3445 phy->SetPpduUid(
uid);
3446 phy->Send(
psdus, txVector);
3473 const std::vector<bool>& )
3476 if (psdu->GetAddr2() ==
Mac48Address(
"00:00:00:00:00:01"))
3481 else if (psdu->GetAddr2() ==
Mac48Address(
"00:00:00:00:00:02"))
3492 if (psdu->GetAddr2() ==
Mac48Address(
"00:00:00:00:00:01"))
3496 else if (psdu->GetAddr2() ==
Mac48Address(
"00:00:00:00:00:02"))
3509 "The number of successfully received packets from STA 1 is not correct!");
3513 "The number of unsuccessfuly received packets from STA 1 is not correct!");
3516 "The number of bytes received from STA 1 is not correct!");
3526 "The number of successfully received packets from STA 2 is not correct!");
3530 "The number of unsuccessfuly received packets from STA 2 is not correct!");
3533 "The number of bytes received from STA 2 is not correct!");
3541 auto event = phy->GetCurrentEvent();
3543 auto rxPower =
event->GetRxPower(band);
3549 "RX power " <<
rxPower <<
" over (" << band
3569 phy->GetEnergyDuration(
expectedRxPower - step, band).IsStrictlyPositive(),
3571 "At least " <<
expectedRxPower <<
" W expected for OFDMA part over (" << band <<
") at "
3574 phy->GetEnergyDuration(
expectedRxPower + step, band).IsStrictlyPositive(),
3576 "At most " <<
expectedRxPower <<
" W expected for OFDMA part over (" << band <<
") at "
3582 phy->GetEnergyDuration(
expectedRxPower + step, band).IsStrictlyPositive(),
3584 "At most " <<
expectedRxPower <<
" W expected for OFDMA part over (" << band <<
") at "
3594 "m_currentEvent for AP was not cleared");
3597 "m_currentEvent for STA 1 was not cleared");
3600 "m_currentEvent for STA 2 was not cleared");
3617 phy->GetAttribute(
"State", ptr);
3623 "PHY State " <<
currentState <<
" does not match expected state "
3633 "Number of RX start notifications "
3639 "Last time RX start notification has been received "
3652 "Number of RX end notifications "
3658 "Last time RX end notification has been received "
3664 "Last time RX end notification indicated a "
3817 for (
auto& phy :
phys)
3820 phy->SetAttribute(
"TxPowerStart",
DoubleValue(16.0));
3821 phy->SetAttribute(
"TxPowerEnd",
DoubleValue(16.0));
3822 phy->SetAttribute(
"PowerDensityLimit",
DoubleValue(100.0));
3825 phy->SetAttribute(
"TxMaskInnerBandMinimumRejection",
DoubleValue(-100.0));
3826 phy->SetAttribute(
"TxMaskOuterBandMinimumRejection",
DoubleValue(-100.0));
3827 phy->SetAttribute(
"TxMaskOuterBandMaximumRejection",
DoubleValue(-100.0));
3867 static uint64_t
uid = 0;
3998 for (uint8_t
i = 0;
i < 2; ++
i)
4159 "Reception of solicited HE TB PPDUs");
4178 "Reception of solicited HE TB PPDUs with delay (< 400ns) between the two signals");
4197 "Dropping of unsolicited HE TB PPDUs");
4209 WifiPhyState::CCA_BUSY);
4217 "Dropping of HE TB PPDUs with channel width differing from TRIGVECTOR");
4229 WifiPhyState::CCA_BUSY,
4238 "Dropping of HE TB PPDUs with UL Length differing from TRIGVECTOR");
4250 WifiPhyState::CCA_BUSY,
4259 "Dropping of HE TB PPDUs with AIDs differing from TRIGVECTOR");
4271 WifiPhyState::CCA_BUSY,
4282 "Reception of solicited HE TB PPDUs with interference on RU 1 during PSDU reception");
4304 WifiPhyState::CCA_BUSY,
4321 "Reception of solicited HE TB PPDUs with interference on RU 2 during PSDU reception");
4341 ? WifiPhyState::IDLE
4342 : WifiPhyState::CCA_BUSY,
4359 "Reception of solicited HE TB PPDUs with interference on the full band "
4360 "during PSDU reception");
4380 WifiPhyState::CCA_BUSY,
4398 "Reception of solicited HE TB PPDUs with another HE TB PPDU arriving on RU "
4399 "1 during PSDU reception");
4432 WifiPhyState::CCA_BUSY,
4450 "Reception of solicited HE TB PPDUs with another HE TB PPDU arriving on RU "
4451 "2 during PSDU reception");
4482 ? WifiPhyState::IDLE
4483 : WifiPhyState::CCA_BUSY,
4501 "Reception of solicited HE TB PPDUs with an HE SU PPDU arriving during the 400 ns window");
4528 "Reception of solicited HE TB PPDU only on RU 2");
4536 ? WifiPhyState::IDLE
4537 : WifiPhyState::CCA_BUSY);
4558 "Measure power for reception of HE TB PPDU only on RU 2");
4587 "Measure power for reception of HE TB PPDU only on RU 2 with PSD limitation");
4639 "Measure power for reception of HE TB PPDU on both RUs");
4664 "Reception of an HE TB PPDU from another BSS");
4692 "Reception of solicited HE TB PPDUs with delay (< 400ns) between the two signals and "
4693 "reception of an HE TB PPDU from another BSS between the ends of the two HE TB PPDUs");
4706 WifiPhyState::CCA_BUSY,
4765 void DoRun()
override;
4776 std::size_t payloadSize,
4873 :
TestCase(
"PHY padding exclusion test"),
4874 m_countRxSuccessFromSta1(0),
4875 m_countRxSuccessFromSta2(0),
4876 m_countRxFailureFromSta1(0),
4877 m_countRxFailureFromSta2(0),
4878 m_countRxBytesFromSta1(0),
4879 m_countRxBytesFromSta2(0)
4886 std::size_t payloadSize,
4913 std::ostringstream addr;
4914 addr <<
"00:00:00:00:00:0" <<
txStaId;
4916 hdr.SetSequenceNumber(1);
4934 phy->Send(
psdus, txVector);
4960 const std::vector<bool>& )
4963 if (psdu->GetAddr2() ==
Mac48Address(
"00:00:00:00:00:01"))
4968 else if (psdu->GetAddr2() ==
Mac48Address(
"00:00:00:00:00:02"))
4979 if (psdu->GetAddr2() ==
Mac48Address(
"00:00:00:00:00:01"))
4983 else if (psdu->GetAddr2() ==
Mac48Address(
"00:00:00:00:00:02"))
4996 "The number of successfully received packets from STA 1 is not correct!");
5000 "The number of unsuccessfuly received packets from STA 1 is not correct!");
5003 "The number of bytes received from STA 1 is not correct!");
5013 "The number of successfully received packets from STA 2 is not correct!");
5017 "The number of unsuccessfuly received packets from STA 2 is not correct!");
5020 "The number of bytes received from STA 2 is not correct!");
5028 "m_currentEvent for AP was not cleared");
5031 "m_currentEvent for STA 1 was not cleared");
5034 "m_currentEvent for STA 2 was not cleared");
5052 "PHY State " <<
currentState <<
" does not match expected state "
5256 WifiPhyState::IDLE);
5319 WifiPhyState::CCA_BUSY);
5351 void DoRun()
override;
5419 :
TestCase(
"UL-OFDMA power control test"),
5421 m_txPowerAp(
dBm_u{0}),
5422 m_txPowerStart(
dBm_u{0}),
5423 m_txPowerEnd(
dBm_u{0}),
5425 m_requestedRssiSta1(
dBm_u{0}),
5426 m_requestedRssiSta2(
dBm_u{0}),
5427 m_rssiSta1(
dBm_u{0}),
5428 m_rssiSta2(
dBm_u{0}),
5446 m_apDev->Send(pkt, destination, 0);
5457 muBar.SetMoreTF(
true);
5458 muBar.SetCsRequired(
true);
5462 muBar.SetUlSpatialReuse(60500);
5465 std::size_t index = 1;
5467 for (
const auto& staId :
staIds)
5471 ui.SetRuAllocation({ru, index,
true});
5472 ui.SetUlFecCodingType(
true);
5475 ui.SetSsAllocation(1, 1);
5480 else if (staId == 2)
5493 bar.SetStartingSequence(4095);
5494 ui.SetMuBarTriggerDepUserInfo(
bar);
5540 hdr.SetAddr1(receiver);
5546 hdr.SetNoMoreFragments();
5550 const auto staId =
staIds.front();
5555 psdu->SetDuration(
nav);
5565 const std::vector<bool>& )
5570 const auto&
hdr = psdu->GetHeader(0);
5578 "The obtained RSSI from STA 1 at AP is different from the expected one ("
5579 << rssi <<
" vs " <<
m_rssiSta1 <<
", with tolerance of " <<
m_tol <<
")");
5581 else if (psdu->GetAddr2() ==
m_sta2Dev->GetAddress())
5587 "The obtained RSSI from STA 2 at AP is different from the expected one ("
5588 << rssi <<
" vs " <<
m_rssiSta2 <<
", with tolerance of " <<
m_tol <<
")");
5600 m_phyAp->SetReceiveOkCallback(
5619 spectrumPhy.SetErrorRateModel(
"ns3::NistErrorRateModel");
5624 wifi.SetRemoteStationManager(
"ns3::ConstantRateWifiManager",
5631 mac.SetType(
"ns3::StaWifiMac");
5642 mac.SetType(
"ns3::ApWifiMac",
5656 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
5661 Vector(2.0, 0.0, 0.0));
5664 mobility.Install(
apNode);
5667 lossModel->SetDefaultLoss(50.0);
5741 std::vector<uint16_t>
staIds{1};
5747 std::vector<uint16_t>
staIds{2};
5756 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.
void Reset()
Reset data upon end of TX or RX.
TracedCallback< uint64_t > m_phyTxPpduUidTrace
Callback providing UID of the PPDU that is about to be transmitted.
void DoInitialize() override
Initialize() implementation.
Time GetEnergyDuration(Watt_u energy, WifiSpectrumBandInfo band)
Wrapper to InterferenceHelper method.
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,...
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,...
void NotifyTxStart(Time duration, dBm_u txPower) override
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.
uint32_t m_countRxFailureSta1
count RX failure for STA 1
void RxSuccessSta2(Ptr< const WifiPsdu > psdu, RxSignalInfo rxSignalInfo, const WifiTxVector &txVector, const std::vector< bool > &statusPerMpdu)
Receive success function for STA 2.
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.
MHz_u m_frequency
frequency
MHz_u m_channelWidth
channel width
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 RxSuccessSta1(Ptr< const WifiPsdu > psdu, RxSignalInfo rxSignalInfo, const WifiTxVector &txVector, const std::vector< bool > &statusPerMpdu)
Receive success function for STA 1.
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 GenerateInterference(Ptr< SpectrumValue > interferencePsd, Time duration)
Generate interference function.
void RxSuccessSta2(Ptr< const WifiPsdu > psdu, RxSignalInfo rxSignalInfo, const WifiTxVector &txVector, const std::vector< bool > &statusPerMpdu)
Receive success function for STA 2.
void DoSetup() override
Implementation to do any local setup required for this TestCase.
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.
void RxSuccessSta1(Ptr< const WifiPsdu > psdu, RxSignalInfo rxSignalInfo, const WifiTxVector &txVector, const std::vector< bool > &statusPerMpdu)
Receive success function for STA 1.
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.
MHz_u m_channelWidth
channel width
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 RxSuccessSta3(Ptr< const WifiPsdu > psdu, RxSignalInfo rxSignalInfo, const WifiTxVector &txVector, const std::vector< bool > &statusPerMpdu)
Receive success function for STA 3.
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 CheckResultsSta1(uint32_t expectedRxSuccess, uint32_t expectedRxFailure, uint32_t expectedRxBytes)
Check the results for STA 1.
Ptr< OfdmaSpectrumWifiPhy > m_phySta3
PHY of 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.
MHz_u m_frequency
frequency
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.
void RxHeTbPpdu(uint64_t uid, uint16_t staId, Watt_u txPower, size_t payloadSize)
Receive HE TB PPDU function.
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.
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 RxSuccess(Ptr< const WifiPsdu > psdu, RxSignalInfo rxSignalInfo, const WifiTxVector &txVector, const std::vector< bool > &statusPerMpdu)
Receive success function.
void SendHeTbPpdu(uint16_t txStaId, std::size_t index, std::size_t payloadSize, Time txDuration)
Send HE TB PPDU 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.
MHz_u m_channelWidth
channel width
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 RxSuccess(Ptr< const WifiPsdu > psdu, RxSignalInfo rxSignalInfo, const WifiTxVector &txVector, const std::vector< bool > &statusPerMpdu)
Receive success function.
void DoCheckPhyState(Ptr< OfdmaSpectrumWifiPhy > phy, WifiPhyState expectedState)
Check the PHY state.
uint32_t m_countRxBytesFromSta1
count RX bytes from STA 1
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 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 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.
void CheckOfdmaRxPower(Ptr< OfdmaSpectrumWifiPhy > phy, WifiSpectrumBandInfo band, Watt_u expectedRxPower)
Check the received power for the OFDMA part of the HE TB PPDUs over the given band.
uint32_t m_countRxBytesFromSta2
count RX bytes from STA 2
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.
void SetPsdLimit(Ptr< WifiPhy > phy, dBm_per_MHz_u psdLimit)
Set the PSD limit.
Ptr< OfdmaSpectrumWifiPhy > m_phySta1
PHY of STA 1.
~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 CheckNonOfdmaRxPower(Ptr< OfdmaSpectrumWifiPhy > phy, WifiSpectrumBandInfo band, Watt_u expectedRxPower)
Check the received power for the non-OFDMA of the HE TB PPDUs over the given band.
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.
void SchedulePowerMeasurementChecks(Time delay, Watt_u rxPowerNonOfdmaRu1, Watt_u rxPowerNonOfdmaRu2, Watt_u rxPowerOfdmaRu1, Watt_u rxPowerOfdmaRu2)
Schedule power measurement related checks.
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.
MHz_u m_frequency
frequency
UL-OFDMA power control test.
dBm_u m_requestedRssiSta2
requested RSSI from STA 2 at AP for HE TB PPDUs
void DoRun() override
Implementation to actually run this TestCase.
Ptr< WifiNetDevice > m_sta2Dev
network device of STA 2
dBm_u m_rssiSta2
expected RSSI from STA 2 at AP for HE TB PPDUs
dBm_u m_txPowerEnd
maximum transmission power for STAs
dBm_u m_txPowerStart
minimum transmission power 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
dBm_u m_rssiSta1
expected RSSI from STA 1 at AP for HE TB PPDUs
Ptr< WifiNetDevice > m_apDev
network device of AP
dBm_u m_requestedRssiSta1
requested RSSI from STA 1 at AP for HE TB PPDUs
void DoTeardown() override
Implementation to do any local setup required for this TestCase.
uint8_t m_bssColor
BSS color.
void ReplaceReceiveOkCallbackOfAp()
Replace the AP's callback on its PHY's ReceiveOkCallback by the ReceiveOkCallbackAtAp method.
dBm_u m_txPowerAp
transmit power of AP
uint8_t m_txPowerLevels
number of transmission power levels for STAs
dB_u m_tol
tolerance between received and expected RSSIs
TestUlOfdmaPowerControl()
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.
void ReceiveOkCallbackAtAp(Ptr< const WifiPsdu > psdu, RxSignalInfo rxSignalInfo, const WifiTxVector &txVector, const std::vector< bool > &statusPerMpdu)
Receive OK callback function at 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 ...
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.
static MHz_u 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.
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.
bool TraceConnectWithoutContext(std::string name, const CallbackBase &cb)
Connect a TraceSource to a Callback without a context.
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.
MHz_u GetGuardBandwidth(MHz_u currentChannelWidth) const override
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.
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
static int64_t AssignStreams(NetDeviceContainer c, int64_t stream)
Assign a fixed random variable stream number to the random variables used by the PHY and MAC aspects ...
create MAC layers for a ns3::WifiNetDevice.
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...
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::tuple< uint8_t, MHz_u, WifiPhyBand, uint8_t > ChannelTuple
Tuple identifying a segment of an operating channel.
std::map< WifiModulationClass, Ptr< PhyEntity > > m_phyEntities
This map holds the supported PHY entities.
void RegisterListener(const std::shared_ptr< WifiPhyListener > &listener)
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 SetOperatingChannel(const WifiPhyOperatingChannel &channel)
If the standard for this object has not been set yet, store the channel settings corresponding to the...
void SetPreambleDetectionModel(const Ptr< PreambleDetectionModel > preambleDetectionModel)
Sets the preamble detection model.
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, MHz_u frequency, MHz_u width, WifiStandard standard, WifiPhyBand band, ConstIterator start=m_frequencyChannels.begin())
Find the first frequency segment matching the specified parameters.
This objects implements the PHY state machine of the Wifi device.
static Ptr< SpectrumValue > CreateHeMuOfdmTxPowerSpectralDensity(const std::vector< MHz_u > ¢erFrequencies, MHz_u channelWidth, Watt_u txPower, MHz_u guardBandwidth, const std::vector< 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(MHz_u centerFrequency, MHz_u channelWidth, Watt_u txPower, MHz_u guardBandwidth, dBr_u minInnerBand=dBr_u{-20}, dBr_u minOuterband=dBr_u{-28}, dBr_u lowestPoint=dBr_u{-40}, const std::vector< bool > &puncturedSubchannels={})
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 SetHeMuUserInfo(uint16_t staId, HeMuUserInfo userInfo)
Set the HE MU user-specific transmission information for the given STA-ID.
WifiPreamble GetPreambleType() const
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 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.
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
#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.
std::size_t Count20MHzSubchannels(MHz_u channelWidth)
Return the number of 20 MHz subchannels covering the channel width.
Watt_u DbmToW(dBm_u val)
Convert from dBm to Watts.
uint32_t GetBlockAckSize(BlockAckType type)
Return the total BlockAck size (including FCS trailer).
std::vector< uint16_t > RuAllocation
9 bits RU_ALLOCATION per 20 MHz
Hz_u MHzToHz(MHz_u val)
Convert from MHz to Hz.
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
RxSignalInfo structure containing info on the received signal.
WifiSpectrumBandInfo structure containing info about a spectrum band.
static const MHz_u DEFAULT_FREQUENCY
static WifiPhyOfdmaTestSuite wifiPhyOfdmaTestSuite
the test suite
static const uint8_t DEFAULT_CHANNEL_NUMBER
static const WifiPhyBand DEFAULT_WIFI_BAND
static const MHz_u DEFAULT_CHANNEL_WIDTH
static const MHz_u DEFAULT_GUARD_WIDTH