9#include "ns3/ap-wifi-mac.h"
10#include "ns3/boolean.h"
11#include "ns3/double.h"
12#include "ns3/he-configuration.h"
13#include "ns3/he-phy.h"
14#include "ns3/interference-helper.h"
16#include "ns3/multi-model-spectrum-channel.h"
17#include "ns3/nist-error-rate-model.h"
19#include "ns3/pointer.h"
20#include "ns3/rng-seed-manager.h"
21#include "ns3/simulator.h"
22#include "ns3/spectrum-wifi-helper.h"
23#include "ns3/spectrum-wifi-phy.h"
24#include "ns3/string.h"
27#include "ns3/uinteger.h"
28#include "ns3/wifi-mac-header.h"
29#include "ns3/wifi-net-device.h"
30#include "ns3/wifi-psdu.h"
31#include "ns3/wifi-spectrum-value-helper.h"
32#include "ns3/wifi-utils.h"
56 void DoRun()
override;
70 :
TestCase(
"Check for valid combinations of MU TX-VECTOR")
80 std::list<uint16_t> staIds;
82 for (
const auto& userInfo : userInfos)
85 staIds.push_back(staId++);
94 std::list<HeMuUserInfo> userInfos;
95 userInfos.push_back({
HeRu::RuSpec{RuType::RU_106_TONE, 1,
true}, 11, 1});
96 userInfos.push_back({
HeRu::RuSpec{RuType::RU_106_TONE, 2,
true}, 10, 2});
100 "TX-VECTOR should indicate an OFDMA transmission");
103 "TX-VECTOR should not indicate a MU-MIMO transmission");
106 "TX-VECTOR should not indicate a SIG-B compression");
109 "TX-VECTOR should indicate all checks are passed");
114 userInfos.push_back({ru, 11, 1});
115 userInfos.push_back({ru, 10, 2});
119 "TX-VECTOR should indicate a MU-MIMO transmission");
122 "TX-VECTOR should not indicate an OFDMA transmission");
125 "TX-VECTOR should indicate a SIG-B compression");
128 "TX-VECTOR should indicate all checks are passed");
133 userInfos.push_back({ru, 11, 1});
134 userInfos.push_back({ru, 10, 1});
135 userInfos.push_back({ru, 9, 1});
136 userInfos.push_back({ru, 8, 1});
137 userInfos.push_back({ru, 7, 1});
138 userInfos.push_back({ru, 6, 1});
139 userInfos.push_back({ru, 5, 1});
140 userInfos.push_back({ru, 4, 1});
141 userInfos.push_back({ru, 3, 1});
145 "TX-VECTOR should indicate a MU-MIMO transmission");
148 "TX-VECTOR should not indicate an OFDMA transmission");
151 "TX-VECTOR should indicate a SIG-B compression");
154 "TX-VECTOR should not indicate all checks are passed");
157 userInfos.push_back({ru, 11, 2});
158 userInfos.push_back({ru, 10, 2});
159 userInfos.push_back({ru, 9, 3});
160 userInfos.push_back({ru, 8, 3});
164 "TX-VECTOR should indicate a MU-MIMO transmission");
167 "TX-VECTOR should not indicate an OFDMA transmission");
170 "TX-VECTOR should indicate a SIG-B compression");
173 "TX-VECTOR should not indicate all checks are passed");
348 void DoRun()
override;
360 const std::vector<bool>& statusPerMpdu);
371 const std::vector<bool>& statusPerMpdu);
382 const std::vector<bool>& statusPerMpdu);
446 void SendMuPpdu(
const std::vector<StaInfo>& staInfos);
500 m_countRxSuccessSta1{0},
501 m_countRxSuccessSta2{0},
502 m_countRxSuccessSta3{0},
503 m_countRxFailureSta1{0},
504 m_countRxFailureSta2{0},
505 m_countRxFailureSta3{0},
506 m_countRxBytesSta1{0},
507 m_countRxBytesSta2{0},
508 m_countRxBytesSta3{0},
549 for (
const auto& staInfo : staInfos)
551 txVector.
SetRu(ru, staInfo.staId);
553 txVector.
SetNss(staInfo.staNss, staInfo.staId);
559 std::ostringstream addr;
560 addr <<
"00:00:00:00:00:0" << staInfo.staId;
564 psdus.insert(std::make_pair(staInfo.staId, psdu));
572 m_phyAp->Send(psdus, txVector);
579 const std::vector<bool>& )
590 const std::vector<bool>& )
601 const std::vector<bool>& )
636 "The number of successfully received packets by STA 1 is not correct!");
639 "The number of unsuccessfully received packets by STA 1 is not correct!");
642 "The number of bytes received by STA 1 is not correct!");
652 "The number of successfully received packets by STA 2 is not correct!");
655 "The number of unsuccessfully received packets by STA 2 is not correct!");
658 "The number of bytes received by STA 2 is not correct!");
668 "The number of successfully received packets by STA 3 is not correct!");
671 "The number of unsuccessfully received packets by STA 3 is not correct!");
674 "The number of bytes received by STA 3 is not correct!");
692 phy->GetAttribute(
"State", ptr);
694 currentState = state->GetState();
698 "PHY State " << currentState <<
" does not match expected state "
708 spectrumChannel->SetPropagationDelayModel(delayModel);
714 m_phyAp->SetInterferenceHelper(apInterferenceHelper);
716 m_phyAp->SetErrorRateModel(apErrorModel);
718 m_phyAp->AddChannel(spectrumChannel);
721 apNode->AddDevice(apDev);
738 sta1Node->AddDevice(sta1Dev);
755 sta2Node->AddDevice(sta2Dev);
772 sta3Node->AddDevice(sta3Dev);
793 int64_t streamNumber = 0;
794 m_phyAp->AssignStreams(streamNumber);
814 m_phyAp->SetNumberOfAntennas(8);
815 m_phyAp->SetMaxSupportedTxSpatialStreams(8);
824 std::vector<StaInfo>{{1,
m_nss}, {2,
m_nss}});
843 WifiPhyState::CCA_BUSY);
891 std::vector<StaInfo>{{1,
m_nss}, {3,
m_nss}});
905 WifiPhyState::CCA_BUSY);
958 std::vector<StaInfo>{{2,
m_nss}, {3,
m_nss}});
967 WifiPhyState::CCA_BUSY);
1047 WifiPhyState::IDLE);
1052 WifiPhyState::IDLE);
1057 WifiPhyState::IDLE);
1089 std::vector<uint8_t> nssToTest{1, 2};
1090 for (
auto nss : nssToTest)
1133 void DoRun()
override;
1149 void SetTrigVector(
const std::vector<uint16_t>& staIds, uint8_t bssColor);
1160 std::size_t payloadSize,
1171 void SendHeSuPpdu(uint16_t txStaId, std::size_t payloadSize, uint64_t uid, uint8_t bssColor);
1226 const std::vector<bool>& statusPerMpdu);
1245 const std::vector<uint16_t>& txStaIds,
1247 const std::vector<std::tuple<uint32_t, uint32_t, uint32_t>>& expectedCountersPerSta);
1271 m_countRxSuccessFromStas{},
1272 m_countRxFailureFromStas{},
1273 m_countRxBytesFromStas{},
1283 std::size_t payloadSize,
1308 std::ostringstream addr;
1309 addr <<
"00:00:00:00:00:0" << txStaId;
1313 psdus.insert(std::make_pair(
SU_STA_ID, psdu));
1316 phy->SetPpduUid(uid);
1317 phy->Send(psdus, txVector);
1323 uint8_t bssColor)
const
1339 txVector.
SetRu(ru, txStaId);
1341 txVector.
SetNss(nss, txStaId);
1363 for (
auto staId : staIds)
1365 txVector.
SetRu(ru, staId);
1367 txVector.
SetNss(1, staId);
1383 std::size_t payloadSize,
1387 NS_LOG_FUNCTION(
this << txStaId << +nss << payloadSize << uid << +bssColor);
1396 std::ostringstream addr;
1397 addr <<
"00:00:00:00:00:0" << txStaId;
1401 psdus.insert(std::make_pair(txStaId, psdu));
1411 phy->SetPpduUid(uid);
1412 phy->Send(psdus, txVector);
1419 const std::vector<bool>& )
1425 std::ostringstream addr;
1426 addr <<
"00:00:00:00:00:0" << index + 1;
1427 if (psdu->GetAddr2() ==
Mac48Address(addr.str().c_str()))
1442 std::ostringstream addr;
1443 addr <<
"00:00:00:00:00:0" << index + 1;
1444 if (psdu->GetAddr2() ==
Mac48Address(addr.str().c_str()))
1458 NS_LOG_FUNCTION(
this << staId << expectedSuccess << expectedFailures << expectedBytes);
1461 "The number of successfully received packets from STA "
1462 << staId <<
" is not correct!");
1465 "The number of unsuccessfully received packets from STA "
1466 << staId <<
" is not correct!");
1469 "The number of bytes received from STA " << staId <<
" is not correct!");
1477 "m_currentEvent for AP was not cleared");
1478 std::size_t sta = 1;
1483 "m_currentEvent for STA " << sta <<
" was not cleared");
1503 phy->GetAttribute(
"State", ptr);
1505 currentState = state->GetState();
1509 "PHY State " << currentState <<
" does not match expected state "
1531 phy->SetTriggerFrameUid(0);
1541 heConfiguration->m_bssColor = bssColor;
1553 spectrumChannel->SetPropagationDelayModel(delayModel);
1561 apMac->SetAttribute(
"BeaconGeneration",
BooleanValue(
false));
1562 apDev->SetMac(apMac);
1565 apDev->SetHeConfiguration(heConfiguration);
1576 apNode->AddDevice(apDev);
1578 for (std::size_t i = 1; i <= 4; ++i)
1586 phy->SetInterferenceHelper(staInterferenceHelper);
1588 phy->SetErrorRateModel(staErrorModel);
1589 phy->SetDevice(staDev);
1590 phy->AddChannel(spectrumChannel);
1593 phy->SetAttribute(
"TxPowerStart",
DoubleValue(16.0));
1594 phy->SetAttribute(
"TxPowerEnd",
DoubleValue(16.0));
1595 phy->SetAttribute(
"PowerDensityLimit",
DoubleValue(100.0));
1597 staDev->SetPhy(phy);
1598 staNode->AddDevice(staDev);
1625 const std::vector<uint16_t>& txStaIds,
1627 const std::vector<std::tuple<uint32_t, uint32_t, uint32_t>>& expectedCountersPerSta)
1629 static uint64_t uid = 0;
1643 uint16_t payloadSize = 1000;
1644 std::size_t index = 0;
1645 for (
auto txStaId : txStaIds)
1670 expectedStateAtEnd);
1675 for (
const auto& expectedCounters : expectedCountersPerSta)
1677 uint16_t expectedSuccessFromSta = std::get<0>(expectedCounters);
1678 uint16_t expectedFailuresFromSta = std::get<1>(expectedCounters);
1679 uint16_t expectedBytesFromSta = std::get<2>(expectedCounters);
1684 expectedSuccessFromSta,
1685 expectedFailuresFromSta,
1686 expectedBytesFromSta);
1702 int64_t streamNumber = 0;
1706 phy->AssignStreams(streamNumber);
1720 phy->SetOperatingChannel(
1733 "Reception of HE TB PPDUs using full BW MU-MIMO");
1738 std::make_tuple(1, 0, 1000),
1740 std::make_tuple(1, 0, 1001),
1742 std::make_tuple(1, 0, 1002)
1753 "Reception of HE TB PPDUs HE TB PPDUs using full BW MU-MIMO with an HE SU "
1754 "PPDU arriving during the 400 ns window");
1767 std::make_tuple(0, 1, 0),
1769 std::make_tuple(0, 1, 0),
1771 std::make_tuple(0, 1, 0)
1782 "Reception of HE TB PPDUs using full BW MU-MIMO with an HE SU PPDU "
1783 "arriving during the HE portion");
1794 WifiPhyState::CCA_BUSY,
1796 std::make_tuple(0, 1, 0),
1798 std::make_tuple(0, 1, 0),
1800 std::make_tuple(0, 1, 0)
1813 for (
const auto& delayStart : startDelays)
1820 NS_LOG_DEBUG(
"Run UL MU-MIMO PHY transmission test for "
1821 <<
m_channelWidth <<
" MHz with delay between each HE TB PPDUs of "
1828 NS_LOG_DEBUG(
"Run UL MU-MIMO PHY transmission test for "
1829 <<
m_channelWidth <<
" MHz with delay between each HE TB PPDUs of "
1836 NS_LOG_DEBUG(
"Run UL MU-MIMO PHY transmission test for "
1837 <<
m_channelWidth <<
" MHz with delay between each HE TB PPDUs of "
1844 NS_LOG_DEBUG(
"Run UL MU-MIMO PHY transmission test for "
1845 <<
m_channelWidth <<
" MHz with delay between each HE TB PPDUs of "
SpectrumWifiPhy used for testing MU-MIMO.
void SetTriggerFrameUid(uint64_t uid)
Since we assume trigger frame was previously received from AP, this is used to set its UID.
MuMimoSpectrumWifiPhy(uint16_t staId)
Constructor.
void DoInitialize() override
Initialize() implementation.
~MuMimoSpectrumWifiPhy() override
static TypeId GetTypeId()
Get the type ID.
void SetPpduUid(uint64_t uid)
Set the global PPDU UID counter.
void DoDispose() override
Destructor implementation.
Ptr< Event > GetCurrentEvent()
Ptr< MuMimoTestHePhy > m_ofdmTestHePhy
Pointer to HE PHY instance used for MU-MIMO test.
HE PHY slightly modified so as to return a given STA-ID in case of DL MU for MuMimoSpectrumWifiPhy.
MuMimoTestHePhy(uint16_t staId)
Constructor.
void SetGlobalPpduUid(uint64_t uid)
Set the global PPDU UID counter.
uint16_t m_staId
ID of the STA to which this PHY belongs to.
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.
void DoTeardown() override
Implementation to do any local setup required for this TestCase.
Time m_expectedPpduDuration
expected duration to send MU PPDU
void RxFailureSta2(Ptr< const WifiPsdu > psdu)
Receive failure function for STA 2.
void RxFailureSta1(Ptr< const WifiPsdu > psdu)
Receive failure function for STA 1.
Ptr< SpectrumWifiPhy > m_phyAp
PHY of AP.
void DoSetup() override
Implementation to do any local setup required for this TestCase.
void RxSuccessSta1(Ptr< const WifiPsdu > psdu, RxSignalInfo rxSignalInfo, const WifiTxVector &txVector, const std::vector< bool > &statusPerMpdu)
Receive success function for STA 1.
TestDlMuMimoPhyTransmission()
Ptr< MuMimoSpectrumWifiPhy > m_phySta1
PHY of STA 1.
uint32_t m_countRxFailureSta3
count RX failure for STA 3
uint32_t m_countRxFailureSta1
count RX failure for STA 1
MHz_u m_channelWidth
channel width
void GenerateInterference(Ptr< SpectrumValue > interferencePsd, Time duration)
Generate interference function.
MHz_u m_frequency
frequency
void CheckPhyState(Ptr< MuMimoSpectrumWifiPhy > phy, WifiPhyState expectedState)
Schedule now to check the PHY state.
uint32_t m_countRxSuccessSta2
count RX success for 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 CheckResultsSta3(uint32_t expectedRxSuccess, uint32_t expectedRxFailure, uint32_t expectedRxBytes)
Check the results for STA 3.
void ResetResults()
Reset the results.
uint8_t m_nss
number of spatial streams per STA
Ptr< MuMimoSpectrumWifiPhy > m_phySta3
PHY of STA 3.
void RxFailureSta3(Ptr< const WifiPsdu > psdu)
Receive failure function for STA 3.
uint32_t m_countRxBytesSta2
count RX bytes for STA 2
void RunOne()
Run one function.
uint32_t m_countRxSuccessSta3
count RX success for STA 3
void SendMuPpdu(const std::vector< StaInfo > &staInfos)
Send DL MU-MIMO PPDU function.
void DoCheckPhyState(Ptr< MuMimoSpectrumWifiPhy > phy, WifiPhyState expectedState)
Check the PHY state now.
uint32_t m_countRxBytesSta1
count RX bytes for STA 1
uint32_t m_countRxFailureSta2
count RX failure for STA 2
void CheckResultsSta1(uint32_t expectedRxSuccess, uint32_t expectedRxFailure, uint32_t expectedRxBytes)
Check the results for STA 1.
Ptr< MuMimoSpectrumWifiPhy > m_phySta2
PHY of STA 2.
void DoRun() override
Implementation to actually run this TestCase.
void StopInterference()
Stop interference function.
void RxSuccessSta2(Ptr< const WifiPsdu > psdu, RxSignalInfo rxSignalInfo, const WifiTxVector &txVector, const std::vector< bool > &statusPerMpdu)
Receive success function for STA 2.
uint32_t m_countRxBytesSta3
count RX bytes for STA 3
void CheckResultsSta2(uint32_t expectedRxSuccess, uint32_t expectedRxFailure, uint32_t expectedRxBytes)
Check the results for STA 2.
uint32_t m_countRxSuccessSta1
count RX success for STA 1
static WifiTxVector BuildTxVector(MHz_u bw, const std::list< HeMuUserInfo > &userInfos)
Build a TXVECTOR for DL MU with the given bandwidth and user information.
void DoRun() override
Implementation to actually run this TestCase.
void RxFailure(Ptr< const WifiPsdu > psdu)
Receive failure function.
void VerifyEventsCleared()
Verify all events are cleared at end of TX or RX.
void DoRun() override
Implementation to actually run this TestCase.
TestUlMuMimoPhyTransmission()
void LogScenario(const std::string &log) const
Log scenario description.
std::vector< uint32_t > m_countRxFailureFromStas
count RX failure from STAs
void SendHeSuPpdu(uint16_t txStaId, std::size_t payloadSize, uint64_t uid, uint8_t bssColor)
Send HE SU PPDU function.
void SendHeTbPpdu(uint16_t txStaId, uint8_t nss, std::size_t payloadSize, uint64_t uid, uint8_t bssColor)
Send HE TB PPDU function.
std::vector< uint32_t > m_countRxSuccessFromStas
count RX success from STAs
void DoSetup() override
Implementation to do any local setup required for this TestCase.
std::vector< uint32_t > m_countRxBytesFromStas
count RX bytes from STAs
void CheckRxFromSta(uint16_t staId, uint32_t expectedSuccess, uint32_t expectedFailures, uint32_t expectedBytes)
Check the received PSDUs from a given STA.
void DoTeardown() override
Implementation to do any local setup required for this TestCase.
void DoCheckPhyState(Ptr< MuMimoSpectrumWifiPhy > phy, WifiPhyState expectedState)
Check the PHY state.
void SetBssColor(Ptr< WifiPhy > phy, uint8_t bssColor)
Set the BSS color.
void Reset()
Reset function.
void ScheduleTest(Time delay, const std::vector< uint16_t > &txStaIds, WifiPhyState expectedStateAtEnd, const std::vector< std::tuple< uint32_t, uint32_t, uint32_t > > &expectedCountersPerSta)
Schedule test to perform.
void CheckPhyState(Ptr< MuMimoSpectrumWifiPhy > phy, WifiPhyState expectedState)
Check the PHY state.
void RxSuccess(Ptr< const WifiPsdu > psdu, RxSignalInfo rxSignalInfo, const WifiTxVector &txVector, const std::vector< bool > &statusPerMpdu)
Receive success function.
void RunOne()
Run one function.
Time m_expectedPpduDuration
expected duration to send MU PPDU
Ptr< MuMimoSpectrumWifiPhy > m_phyAp
PHY of AP.
void SetTrigVector(const std::vector< uint16_t > &staIds, uint8_t bssColor)
Set TRIGVECTOR for HE TB PPDU.
MHz_u m_frequency
frequency
std::vector< Ptr< MuMimoSpectrumWifiPhy > > m_phyStas
PHYs of STAs.
Time m_delayStart
delay between the start of each HE TB PPDUs
MHz_u m_channelWidth
channel width
WifiTxVector GetTxVectorForHeTbPpdu(uint16_t txStaId, uint8_t nss, uint8_t bssColor) const
Get TXVECTOR for HE TB PPDU.
wifi PHY MU-MIMO Test Suite
AttributeValue implementation for Boolean.
This class can be used to hold variables of floating point type such as 'double' or 'float'.
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.
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.
void SetDevice(const Ptr< WifiNetDevice > device) override
Sets the device this PHY is associated with.
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.
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.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
static WifiMode GetVhtMcs5()
Return MCS 5 from VHT MCS values.
virtual void SetInterferenceHelper(const Ptr< InterferenceHelper > helper)
Sets the interference helper.
void SetErrorRateModel(const Ptr< ErrorRateModel > model)
Sets the error rate model.
std::tuple< uint8_t, MHz_u, WifiPhyBand, uint8_t > ChannelTuple
Tuple identifying a segment of an operating channel.
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.
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 SetReceiveOkCallback(RxOkCallback callback)
virtual int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
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 RuType GetRuType(RuSpec ru)
Get the type of a given RU.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
bool IsSigBCompression() const
Indicate whether the Common field is present in the HE-SIG-B field.
bool IsValid(WifiPhyBand band=WIFI_PHY_BAND_UNSPECIFIED) const
The standard disallows certain combinations of WifiMode, number of spatial streams,...
void SetHeMuUserInfo(uint16_t staId, HeMuUserInfo userInfo)
Set the HE MU user-specific transmission information for the given STA-ID.
void SetRu(WifiRu::RuSpec ru, uint16_t staId)
Set the RU specification for the STA-ID.
void SetChannelWidth(MHz_u channelWidth)
Sets the selected channelWidth.
bool IsDlOfdma() const
Return true if this TX vector is used for a downlink multi-user transmission using OFDMA.
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.
bool IsDlMuMimo() const
Return true if this TX vector is used for a downlink multi-user transmission using MU-MIMO.
void SetMode(WifiMode mode)
Sets the selected payload transmission mode.
void SetNss(uint8_t nss)
Sets the number of Nss.
void SetPreambleType(WifiPreamble preamble)
Sets the preamble type.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
#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 > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
Ptr< T > CreateObjectWithAttributes(Args... args)
Allocate an Object on the heap and initialize with a set of attributes.
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_EXPECT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report if not.
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.
@ 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.
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...
dB_u RatioToDb(double ratio)
Convert from ratio to dB.
Ptr< T1 > DynamicCast(const Ptr< T2 > &p)
Cast a Ptr.
std::unordered_map< uint16_t, Ptr< const WifiPsdu > > WifiConstPsduMap
Map of const PSDUs indexed by STA-ID.
static constexpr uint16_t SU_STA_ID
STA_ID to identify a single user (SU)
uint8_t staNss
Number of spatial streams used for the STA.
RxSignalInfo structure containing info on the received signal.
double snr
SNR in linear scale.
constexpr MHz_u DEFAULT_CHANNEL_WIDTH
constexpr MHz_u DEFAULT_FREQUENCY
static WifiPhyMuMimoTestSuite WifiPhyMuMimoTestSuite
the test suite