A Discrete-Event Network Simulator
API
TestUlMuMimoPhyTransmission Class Reference

UL MU-MIMO PHY test. More...

+ Inheritance diagram for TestUlMuMimoPhyTransmission:
+ Collaboration diagram for TestUlMuMimoPhyTransmission:

Public Member Functions

 TestUlMuMimoPhyTransmission ()
 
- Public Member Functions inherited from ns3::TestCase
 TestCase (const TestCase &)=delete
 
virtual ~TestCase ()
 Destructor. More...
 
std::string GetName () const
 
TestCaseoperator= (const TestCase &)=delete
 

Private Member Functions

void CheckPhyState (Ptr< MuMimoSpectrumWifiPhy > phy, WifiPhyState expectedState)
 Check the PHY state. More...
 
void CheckRxFromSta (uint16_t staId, uint32_t expectedSuccess, uint32_t expectedFailures, uint32_t expectedBytes)
 Check the received PSDUs from a given STA. More...
 
void DoCheckPhyState (Ptr< MuMimoSpectrumWifiPhy > phy, WifiPhyState expectedState)
 Check the PHY state. More...
 
void DoRun () override
 Implementation to actually run this TestCase. More...
 
void DoSetup () override
 Implementation to do any local setup required for this TestCase. More...
 
void DoTeardown () override
 Implementation to do any local setup required for this TestCase. More...
 
WifiTxVector GetTxVectorForHeTbPpdu (uint16_t txStaId, uint8_t nss, uint8_t bssColor) const
 Get TXVECTOR for HE TB PPDU. More...
 
void LogScenario (const std::string &log) const
 Log scenario description. More...
 
void Reset ()
 Reset function. More...
 
void RunOne ()
 Run one function. More...
 
void RxFailure (Ptr< const WifiPsdu > psdu)
 Receive failure function. More...
 
void RxSuccess (Ptr< const WifiPsdu > psdu, RxSignalInfo rxSignalInfo, WifiTxVector txVector, std::vector< bool > statusPerMpdu)
 Receive success function. More...
 
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. More...
 
void SendHeSuPpdu (uint16_t txStaId, std::size_t payloadSize, uint64_t uid, uint8_t bssColor)
 Send HE SU PPDU function. More...
 
void SendHeTbPpdu (uint16_t txStaId, uint8_t nss, std::size_t payloadSize, uint64_t uid, uint8_t bssColor)
 Send HE TB PPDU function. More...
 
void SetBssColor (Ptr< WifiPhy > phy, uint8_t bssColor)
 Set the BSS color. More...
 
void SetTrigVector (const std::vector< uint16_t > &staIds, uint8_t bssColor)
 Set TRIGVECTOR for HE TB PPDU. More...
 
void VerifyEventsCleared ()
 Verify all events are cleared at end of TX or RX. More...
 

Private Attributes

uint16_t m_channelWidth
 channel width in MHz More...
 
std::vector< uint32_t > m_countRxBytesFromStas
 count RX bytes from STAs More...
 
std::vector< uint32_t > m_countRxFailureFromStas
 count RX failure from STAs More...
 
std::vector< uint32_t > m_countRxSuccessFromStas
 count RX success from STAs More...
 
Time m_delayStart
 delay between the start of each HE TB PPDUs More...
 
Time m_expectedPpduDuration
 expected duration to send MU PPDU More...
 
uint16_t m_frequency
 frequency in MHz More...
 
Ptr< MuMimoSpectrumWifiPhym_phyAp
 PHY of AP. More...
 
std::vector< Ptr< MuMimoSpectrumWifiPhy > > m_phyStas
 PHYs of STAs. More...
 

Additional Inherited Members

- Public Types inherited from ns3::TestCase
enum  TestDuration { QUICK = 1 , EXTENSIVE = 2 , TAKES_FOREVER = 3 }
 How long the test takes to execute. More...
 
- Protected Member Functions inherited from ns3::TestCase
 TestCase (std::string name)
 Constructor. More...
 
void AddTestCase (TestCase *testCase, TestDuration duration=QUICK)
 Add an individual child TestCase to this test suite. More...
 
TestCaseGetParent () const
 Get the parent of this TestCase. More...
 
bool IsStatusFailure () const
 Check if any tests failed. More...
 
bool IsStatusSuccess () const
 Check if all tests passed. More...
 
void SetDataDir (std::string directory)
 Set the data directory where reference trace files can be found. More...
 
void ReportTestFailure (std::string cond, std::string actual, std::string limit, std::string message, std::string file, int32_t line)
 Log the failure of this TestCase. More...
 
bool MustAssertOnFailure () const
 Check if this run should assert on failure. More...
 
bool MustContinueOnFailure () const
 Check if this run should continue on failure. More...
 
std::string CreateDataDirFilename (std::string filename)
 Construct the full path to a file in the data directory. More...
 
std::string CreateTempDirFilename (std::string filename)
 Construct the full path to a file in a temporary directory. More...
 

Detailed Description

UL MU-MIMO PHY test.

Definition at line 1127 of file wifi-phy-mu-mimo-test.cc.

Constructor & Destructor Documentation

◆ TestUlMuMimoPhyTransmission()

TestUlMuMimoPhyTransmission::TestUlMuMimoPhyTransmission ( )

Definition at line 1271 of file wifi-phy-mu-mimo-test.cc.

Member Function Documentation

◆ CheckPhyState()

void TestUlMuMimoPhyTransmission::CheckPhyState ( Ptr< MuMimoSpectrumWifiPhy phy,
WifiPhyState  expectedState 
)
private

Check the PHY state.

Parameters
phythe PHY
expectedStatethe expected state of the PHY

Definition at line 1489 of file wifi-phy-mu-mimo-test.cc.

References DoCheckPhyState(), and third::phy.

Referenced by ScheduleTest().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CheckRxFromSta()

void TestUlMuMimoPhyTransmission::CheckRxFromSta ( uint16_t  staId,
uint32_t  expectedSuccess,
uint32_t  expectedFailures,
uint32_t  expectedBytes 
)
private

Check the received PSDUs from a given STA.

Parameters
staIdthe ID of the STA to check
expectedSuccessthe expected number of success
expectedFailuresthe expected number of failures
expectedBytesthe expected number of bytes

Definition at line 1453 of file wifi-phy-mu-mimo-test.cc.

References m_countRxBytesFromStas, m_countRxFailureFromStas, m_countRxSuccessFromStas, NS_LOG_FUNCTION, and NS_TEST_ASSERT_MSG_EQ.

Referenced by ScheduleTest().

+ Here is the caller graph for this function:

◆ DoCheckPhyState()

void TestUlMuMimoPhyTransmission::DoCheckPhyState ( Ptr< MuMimoSpectrumWifiPhy phy,
WifiPhyState  expectedState 
)
private

Check the PHY state.

Parameters
phythe PHY
expectedStatethe expected state of the PHY

Definition at line 1498 of file wifi-phy-mu-mimo-test.cc.

References ns3::PointerValue::Get(), ns3::Now(), NS_LOG_FUNCTION, NS_TEST_ASSERT_MSG_EQ, and third::phy.

Referenced by CheckPhyState().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoRun()

void TestUlMuMimoPhyTransmission::DoRun ( )
overrideprivatevirtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Implements ns3::TestCase.

Definition at line 1806 of file wifi-phy-mu-mimo-test.cc.

References m_channelWidth, m_delayStart, m_expectedPpduDuration, m_frequency, ns3::NanoSeconds(), NS_LOG_DEBUG, and RunOne().

+ Here is the call graph for this function:

◆ DoSetup()

◆ DoTeardown()

void TestUlMuMimoPhyTransmission::DoTeardown ( )
overrideprivatevirtual

Implementation to do any local setup required for this TestCase.

Subclasses should override this method to perform any costly per-test teardown

Reimplemented from ns3::TestCase.

Definition at line 1605 of file wifi-phy-mu-mimo-test.cc.

References m_phyStas, and third::phy.

◆ GetTxVectorForHeTbPpdu()

WifiTxVector TestUlMuMimoPhyTransmission::GetTxVectorForHeTbPpdu ( uint16_t  txStaId,
uint8_t  nss,
uint8_t  bssColor 
) const
private

Get TXVECTOR for HE TB PPDU.

Parameters
txStaIdthe ID of the TX STA
nssthe number of spatial streams used for the transmission
bssColorthe BSS color of the TX STA
Returns
the TXVECTOR for HE TB PPDU

Definition at line 1323 of file wifi-phy-mu-mimo-test.cc.

References m_channelWidth, ns3::WifiTxVector::SetMode(), ns3::WifiTxVector::SetNss(), ns3::WifiTxVector::SetRu(), and ns3::WIFI_PREAMBLE_HE_TB.

Referenced by SendHeTbPpdu().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LogScenario()

void TestUlMuMimoPhyTransmission::LogScenario ( const std::string &  log) const
private

Log scenario description.

Parameters
logthe scenario description to add to log

Definition at line 1615 of file wifi-phy-mu-mimo-test.cc.

References NS_LOG_INFO.

Referenced by RunOne().

+ Here is the caller graph for this function:

◆ Reset()

void TestUlMuMimoPhyTransmission::Reset ( )
private

Reset function.

Definition at line 1514 of file wifi-phy-mu-mimo-test.cc.

References m_countRxBytesFromStas, m_countRxFailureFromStas, m_countRxSuccessFromStas, m_phyAp, m_phyStas, third::phy, and SetBssColor().

Referenced by RunOne(), and ScheduleTest().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RunOne()

void TestUlMuMimoPhyTransmission::RunOne ( )
private

◆ RxFailure()

void TestUlMuMimoPhyTransmission::RxFailure ( Ptr< const WifiPsdu psdu)
private

Receive failure function.

Parameters
psduthe PSDU

Definition at line 1437 of file wifi-phy-mu-mimo-test.cc.

References ns3::WifiPsdu::GetAddr2(), m_countRxFailureFromStas, and NS_LOG_FUNCTION.

Referenced by DoSetup().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RxSuccess()

void TestUlMuMimoPhyTransmission::RxSuccess ( Ptr< const WifiPsdu psdu,
RxSignalInfo  rxSignalInfo,
WifiTxVector  txVector,
std::vector< bool >  statusPerMpdu 
)
private

Receive success function.

Parameters
psduthe PSDU
rxSignalInfothe info on the received signal (
See also
RxSignalInfo)
Parameters
txVectorthe transmit vector
statusPerMpdureception status per MPDU

Definition at line 1416 of file wifi-phy-mu-mimo-test.cc.

References ns3::WifiPsdu::GetAddr2(), ns3::WifiPsdu::GetSize(), m_countRxBytesFromStas, m_countRxSuccessFromStas, NS_LOG_FUNCTION, NS_TEST_ASSERT_MSG_EQ, ns3::RatioToDb(), and ns3::RxSignalInfo::snr.

Referenced by DoSetup().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ScheduleTest()

void TestUlMuMimoPhyTransmission::ScheduleTest ( Time  delay,
const std::vector< uint16_t > &  txStaIds,
WifiPhyState  expectedStateAtEnd,
const std::vector< std::tuple< uint32_t, uint32_t, uint32_t >> &  expectedCountersPerSta 
)
private

Schedule test to perform.

The interference generation should be scheduled apart.

Parameters
delaythe reference delay to schedule the events
txStaIdsthe IDs of the STAs planned to transmit an HE TB PPDU
expectedStateAtEndthe expected state of the PHY at the end of the reception
expectedCountersPerStathe expected counters per STA

Definition at line 1621 of file wifi-phy-mu-mimo-test.cc.

References CheckPhyState(), CheckRxFromSta(), m_delayStart, m_expectedPpduDuration, m_phyAp, ns3::MilliSeconds(), ns3::NanoSeconds(), Reset(), RX, SendHeSuPpdu(), SendHeTbPpdu(), SetTrigVector(), and VerifyEventsCleared().

Referenced by RunOne().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendHeSuPpdu()

void TestUlMuMimoPhyTransmission::SendHeSuPpdu ( uint16_t  txStaId,
std::size_t  payloadSize,
uint64_t  uid,
uint8_t  bssColor 
)
private

Send HE SU PPDU function.

Parameters
txStaIdthe ID of the TX STA
payloadSizethe size of the payload in bytes
uidthe UID of the trigger frame that is initiating this transmission
bssColorthe BSS color of the TX STA

Definition at line 1284 of file wifi-phy-mu-mimo-test.cc.

References m_channelWidth, m_phyAp, m_phyStas, NS_LOG_FUNCTION, third::phy, ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetAddr2(), ns3::WifiMacHeader::SetQosTid(), ns3::WifiMacHeader::SetSequenceNumber(), ns3::WifiMacHeader::SetType(), ns3::SU_STA_ID, ns3::WIFI_MAC_QOSDATA, and ns3::WIFI_PREAMBLE_HE_SU.

Referenced by RunOne(), and ScheduleTest().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendHeTbPpdu()

void TestUlMuMimoPhyTransmission::SendHeTbPpdu ( uint16_t  txStaId,
uint8_t  nss,
std::size_t  payloadSize,
uint64_t  uid,
uint8_t  bssColor 
)
private

Send HE TB PPDU function.

Parameters
txStaIdthe ID of the TX STA
nssthe number of spatial streams used for the transmission
payloadSizethe size of the payload in bytes
uidthe UID of the trigger frame that is initiating this transmission
bssColorthe BSS color of the TX STA

Definition at line 1383 of file wifi-phy-mu-mimo-test.cc.

References ns3::WifiPsdu::GetSize(), GetTxVectorForHeTbPpdu(), m_phyStas, NS_LOG_FUNCTION, third::phy, ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetAddr2(), ns3::WifiTxVector::SetLength(), ns3::WifiMacHeader::SetQosTid(), ns3::WifiMacHeader::SetSequenceNumber(), ns3::WifiMacHeader::SetType(), and ns3::WIFI_MAC_QOSDATA.

Referenced by ScheduleTest().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetBssColor()

void TestUlMuMimoPhyTransmission::SetBssColor ( Ptr< WifiPhy phy,
uint8_t  bssColor 
)
private

Set the BSS color.

Parameters
phythe PHY
bssColorthe BSS color

Definition at line 1537 of file wifi-phy-mu-mimo-test.cc.

References ns3::WifiNetDevice::GetHeConfiguration(), and third::phy.

Referenced by Reset().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetTrigVector()

void TestUlMuMimoPhyTransmission::SetTrigVector ( const std::vector< uint16_t > &  staIds,
uint8_t  bssColor 
)
private

Set TRIGVECTOR for HE TB PPDU.

Parameters
staIdsthe IDs of the STAs sollicited for the HE TB transmission
bssColorthe BSS color of the TX STA

Definition at line 1349 of file wifi-phy-mu-mimo-test.cc.

References ns3::WifiPhy::GetPhyBand(), ns3::WifiPhy::GetPhyEntity(), m_channelWidth, m_expectedPpduDuration, m_phyAp, ns3::WifiTxVector::SetLength(), ns3::WifiTxVector::SetMode(), ns3::WifiTxVector::SetNss(), ns3::WifiTxVector::SetRu(), ns3::WIFI_MOD_CLASS_HE, and ns3::WIFI_PREAMBLE_HE_TB.

Referenced by ScheduleTest().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ VerifyEventsCleared()

void TestUlMuMimoPhyTransmission::VerifyEventsCleared ( )
private

Verify all events are cleared at end of TX or RX.

Definition at line 1473 of file wifi-phy-mu-mimo-test.cc.

References MuMimoSpectrumWifiPhy::GetCurrentEvent(), m_phyAp, m_phyStas, NS_TEST_ASSERT_MSG_EQ, and third::phy.

Referenced by ScheduleTest().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_channelWidth

uint16_t TestUlMuMimoPhyTransmission::m_channelWidth
private

channel width in MHz

Definition at line 1267 of file wifi-phy-mu-mimo-test.cc.

Referenced by DoRun(), GetTxVectorForHeTbPpdu(), RunOne(), SendHeSuPpdu(), and SetTrigVector().

◆ m_countRxBytesFromStas

std::vector<uint32_t> TestUlMuMimoPhyTransmission::m_countRxBytesFromStas
private

count RX bytes from STAs

Definition at line 1263 of file wifi-phy-mu-mimo-test.cc.

Referenced by CheckRxFromSta(), DoSetup(), Reset(), and RxSuccess().

◆ m_countRxFailureFromStas

std::vector<uint32_t> TestUlMuMimoPhyTransmission::m_countRxFailureFromStas
private

count RX failure from STAs

Definition at line 1262 of file wifi-phy-mu-mimo-test.cc.

Referenced by CheckRxFromSta(), DoSetup(), Reset(), and RxFailure().

◆ m_countRxSuccessFromStas

std::vector<uint32_t> TestUlMuMimoPhyTransmission::m_countRxSuccessFromStas
private

count RX success from STAs

Definition at line 1261 of file wifi-phy-mu-mimo-test.cc.

Referenced by CheckRxFromSta(), DoSetup(), Reset(), and RxSuccess().

◆ m_delayStart

Time TestUlMuMimoPhyTransmission::m_delayStart
private

delay between the start of each HE TB PPDUs

Definition at line 1265 of file wifi-phy-mu-mimo-test.cc.

Referenced by DoRun(), and ScheduleTest().

◆ m_expectedPpduDuration

Time TestUlMuMimoPhyTransmission::m_expectedPpduDuration
private

expected duration to send MU PPDU

Definition at line 1268 of file wifi-phy-mu-mimo-test.cc.

Referenced by DoRun(), ScheduleTest(), and SetTrigVector().

◆ m_frequency

uint16_t TestUlMuMimoPhyTransmission::m_frequency
private

frequency in MHz

Definition at line 1266 of file wifi-phy-mu-mimo-test.cc.

Referenced by DoRun(), and RunOne().

◆ m_phyAp

Ptr<MuMimoSpectrumWifiPhy> TestUlMuMimoPhyTransmission::m_phyAp
private

◆ m_phyStas

std::vector<Ptr<MuMimoSpectrumWifiPhy> > TestUlMuMimoPhyTransmission::m_phyStas
private

PHYs of STAs.

Definition at line 1259 of file wifi-phy-mu-mimo-test.cc.

Referenced by DoSetup(), DoTeardown(), Reset(), RunOne(), SendHeSuPpdu(), SendHeTbPpdu(), and VerifyEventsCleared().


The documentation for this class was generated from the following file: