A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
TestDlOfdmaPhyTransmission< LatestPhyEntityType > Class Template Reference

DL-OFDMA PHY test. More...

+ Inheritance diagram for TestDlOfdmaPhyTransmission< LatestPhyEntityType >:
+ Collaboration diagram for TestDlOfdmaPhyTransmission< LatestPhyEntityType >:

Public Member Functions

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

Private Member Functions

void CheckPhyState (Ptr< OfdmaSpectrumWifiPhy< LatestPhyEntityType > > phy, WifiPhyState expectedState)
 Schedule now to check the PHY state.
 
void CheckResultsSta1 (uint32_t expectedRxSuccess, uint32_t expectedRxFailure, uint32_t expectedRxBytes)
 Check the results for STA 1.
 
void CheckResultsSta2 (uint32_t expectedRxSuccess, uint32_t expectedRxFailure, uint32_t expectedRxBytes)
 Check the results for STA 2.
 
void CheckResultsSta3 (uint32_t expectedRxSuccess, uint32_t expectedRxFailure, uint32_t expectedRxBytes)
 Check the results for STA 3.
 
void DoCheckPhyState (Ptr< OfdmaSpectrumWifiPhy< LatestPhyEntityType > > phy, WifiPhyState expectedState)
 Check the PHY state now.
 
void DoRun () override
 Implementation to actually run this TestCase.
 
void DoSetup () override
 Implementation to do any local setup required for this TestCase.
 
void DoTeardown () override
 Implementation to do any local setup required for this TestCase.
 
void GenerateInterference (Ptr< SpectrumValue > interferencePsd, Time duration)
 Generate interference function.
 
void ResetResults ()
 Reset the results.
 
void RunOne ()
 Run one function.
 
void RxFailureSta1 (Ptr< const WifiPsdu > psdu)
 Receive failure function for STA 1.
 
void RxFailureSta2 (Ptr< const WifiPsdu > psdu)
 Receive failure function for STA 2.
 
void RxFailureSta3 (Ptr< const WifiPsdu > psdu)
 Receive failure function for STA 3.
 
void RxSuccessSta1 (Ptr< const WifiPsdu > psdu, RxSignalInfo rxSignalInfo, const WifiTxVector &txVector, const std::vector< bool > &statusPerMpdu)
 Receive success function 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.
 
void RxSuccessSta3 (Ptr< const WifiPsdu > psdu, RxSignalInfo rxSignalInfo, const WifiTxVector &txVector, const std::vector< bool > &statusPerMpdu)
 Receive success function for STA 3.
 
void SendMuPpdu (uint16_t rxStaId1, uint16_t rxStaId2)
 Send MU-PPDU function.
 
void StopInterference ()
 Stop interference function.
 

Private Attributes

MHz_u m_channelWidth {DEFAULT_CHANNEL_WIDTH}
 channel width
 
uint32_t m_countRxBytesSta1 {0}
 count RX bytes for STA 1
 
uint32_t m_countRxBytesSta2 {0}
 count RX bytes for STA 2
 
uint32_t m_countRxBytesSta3 {0}
 count RX bytes for STA 3
 
uint32_t m_countRxFailureSta1 {0}
 count RX failure for STA 1
 
uint32_t m_countRxFailureSta2 {0}
 count RX failure for STA 2
 
uint32_t m_countRxFailureSta3 {0}
 count RX failure for STA 3
 
uint32_t m_countRxSuccessSta1 {0}
 count RX success for STA 1
 
uint32_t m_countRxSuccessSta2 {0}
 count RX success for STA 2
 
uint32_t m_countRxSuccessSta3 {0}
 count RX success for STA 3
 
Time m_expectedPpduDuration
 expected duration to send MU PPDU
 
MHz_u m_frequency {DEFAULT_FREQUENCY}
 frequency
 
WifiModulationClass m_modClass
 the modulation class to consider for the test
 
Ptr< SpectrumWifiPhym_phyAp
 PHY of AP.
 
Ptr< WaveformGeneratorm_phyInterferer
 PHY of interferer.
 
Ptr< OfdmaSpectrumWifiPhy< LatestPhyEntityType > > m_phySta1
 PHY of STA 1.
 
Ptr< OfdmaSpectrumWifiPhy< LatestPhyEntityType > > m_phySta2
 PHY of STA 2.
 
Ptr< OfdmaSpectrumWifiPhy< LatestPhyEntityType > > m_phySta3
 PHY of STA 3.
 

Additional Inherited Members

- Public Types inherited from ns3::TestCase
enum class  Duration { QUICK = 1 , EXTENSIVE = 2 , TAKES_FOREVER = 3 }
 How long the test takes to execute. More...
 
- Static Public Attributes inherited from ns3::TestCase
static constexpr auto QUICK = Duration::QUICK
 Deprecated test duration simple enums.
 
static constexpr auto EXTENSIVE = Duration::EXTENSIVE
 
static constexpr auto TAKES_FOREVER = Duration::TAKES_FOREVER
 
- Protected Member Functions inherited from ns3::TestCase
 TestCase (std::string name)
 Constructor.
 
void AddTestCase (TestCase *testCase, Duration duration=Duration::QUICK)
 Add an individual child TestCase to this test suite.
 
TestCaseGetParent () const
 Get the parent of this TestCase.
 
bool IsStatusFailure () const
 Check if any tests failed.
 
bool IsStatusSuccess () const
 Check if all tests passed.
 
void SetDataDir (std::string directory)
 Set the data directory where reference trace files can be found.
 
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.
 
bool MustAssertOnFailure () const
 Check if this run should assert on failure.
 
bool MustContinueOnFailure () const
 Check if this run should continue on failure.
 
std::string CreateDataDirFilename (std::string filename)
 Construct the full path to a file in the data directory.
 
std::string CreateTempDirFilename (std::string filename)
 Construct the full path to a file in a temporary directory.
 

Detailed Description

template<typename LatestPhyEntityType>
class TestDlOfdmaPhyTransmission< LatestPhyEntityType >

DL-OFDMA PHY test.

Definition at line 360 of file wifi-phy-ofdma-test.cc.

Constructor & Destructor Documentation

◆ TestDlOfdmaPhyTransmission()

template<typename LatestPhyEntityType >
TestDlOfdmaPhyTransmission< LatestPhyEntityType >::TestDlOfdmaPhyTransmission ( )

Constructor.

Definition at line 518 of file wifi-phy-ofdma-test.cc.

Member Function Documentation

◆ CheckPhyState()

template<typename LatestPhyEntityType >
void TestDlOfdmaPhyTransmission< LatestPhyEntityType >::CheckPhyState ( Ptr< OfdmaSpectrumWifiPhy< LatestPhyEntityType > > phy,
WifiPhyState expectedState )
private

Schedule now to check the PHY state.

Parameters
phythe PHY
expectedStatethe expected state of the PHY

Definition at line 791 of file wifi-phy-ofdma-test.cc.

References ns3::Simulator::ScheduleNow().

+ Here is the call graph for this function:

◆ CheckResultsSta1()

template<typename LatestPhyEntityType >
void TestDlOfdmaPhyTransmission< LatestPhyEntityType >::CheckResultsSta1 ( uint32_t expectedRxSuccess,
uint32_t expectedRxFailure,
uint32_t expectedRxBytes )
private

Check the results for STA 1.

Parameters
expectedRxSuccessthe expected number of RX success
expectedRxFailurethe expected number of RX failures
expectedRxBytesthe expected number of RX bytes

Definition at line 740 of file wifi-phy-ofdma-test.cc.

References NS_TEST_ASSERT_MSG_EQ.

◆ CheckResultsSta2()

template<typename LatestPhyEntityType >
void TestDlOfdmaPhyTransmission< LatestPhyEntityType >::CheckResultsSta2 ( uint32_t expectedRxSuccess,
uint32_t expectedRxFailure,
uint32_t expectedRxBytes )
private

Check the results for STA 2.

Parameters
expectedRxSuccessthe expected number of RX success
expectedRxFailurethe expected number of RX failures
expectedRxBytesthe expected number of RX bytes

Definition at line 757 of file wifi-phy-ofdma-test.cc.

References NS_TEST_ASSERT_MSG_EQ.

◆ CheckResultsSta3()

template<typename LatestPhyEntityType >
void TestDlOfdmaPhyTransmission< LatestPhyEntityType >::CheckResultsSta3 ( uint32_t expectedRxSuccess,
uint32_t expectedRxFailure,
uint32_t expectedRxBytes )
private

Check the results for STA 3.

Parameters
expectedRxSuccessthe expected number of RX success
expectedRxFailurethe expected number of RX failures
expectedRxBytesthe expected number of RX bytes

Definition at line 774 of file wifi-phy-ofdma-test.cc.

References NS_TEST_ASSERT_MSG_EQ.

◆ DoCheckPhyState()

template<typename LatestPhyEntityType >
void TestDlOfdmaPhyTransmission< LatestPhyEntityType >::DoCheckPhyState ( Ptr< OfdmaSpectrumWifiPhy< LatestPhyEntityType > > phy,
WifiPhyState expectedState )
private

Check the PHY state now.

Parameters
phythe PHY
expectedStatethe expected state of the PHY

Definition at line 805 of file wifi-phy-ofdma-test.cc.

References ns3::DynamicCast(), ns3::PointerValue::Get(), ns3::Simulator::Now(), NS_LOG_FUNCTION, and NS_TEST_ASSERT_MSG_EQ.

+ Here is the call graph for this function:

◆ DoRun()

template<typename LatestPhyEntityType >
void TestDlOfdmaPhyTransmission< LatestPhyEntityType >::DoRun ( )
overrideprivatevirtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Implements ns3::TestCase.

Definition at line 1392 of file wifi-phy-ofdma-test.cc.

References ns3::Simulator::Destroy(), ns3::NanoSeconds(), and ns3::WIFI_MOD_CLASS_EHT.

+ Here is the call graph for this function:

◆ DoSetup()

template<typename LatestPhyEntityType >
void TestDlOfdmaPhyTransmission< LatestPhyEntityType >::DoSetup ( )
overrideprivatevirtual

Implementation to do any local setup required for this TestCase.

Subclasses should override this method to perform any costly per-test setup before DoRun is invoked.

Reimplemented from ns3::TestCase.

Definition at line 823 of file wifi-phy-ofdma-test.cc.

References ns3::CreateObject(), ns3::MakeCallback(), ns3::MHzToHz(), ns3::WIFI_MOD_CLASS_EHT, ns3::WIFI_MOD_CLASS_HE, ns3::WIFI_STANDARD_80211ax, and ns3::WIFI_STANDARD_80211be.

+ Here is the call graph for this function:

◆ DoTeardown()

template<typename LatestPhyEntityType >
void TestDlOfdmaPhyTransmission< LatestPhyEntityType >::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 944 of file wifi-phy-ofdma-test.cc.

◆ GenerateInterference()

template<typename LatestPhyEntityType >
void TestDlOfdmaPhyTransmission< LatestPhyEntityType >::GenerateInterference ( Ptr< SpectrumValue > interferencePsd,
Time duration )
private

Generate interference function.

Parameters
interferencePsdthe PSD of the interference to be generated
durationthe duration of the interference

Definition at line 656 of file wifi-phy-ofdma-test.cc.

References ns3::Simulator::Schedule().

+ Here is the call graph for this function:

◆ ResetResults()

template<typename LatestPhyEntityType >
void TestDlOfdmaPhyTransmission< LatestPhyEntityType >::ResetResults ( )
private

Reset the results.

Definition at line 532 of file wifi-phy-ofdma-test.cc.

◆ RunOne()

template<typename LatestPhyEntityType >
void TestDlOfdmaPhyTransmission< LatestPhyEntityType >::RunOne ( )
private

◆ RxFailureSta1()

template<typename LatestPhyEntityType >
void TestDlOfdmaPhyTransmission< LatestPhyEntityType >::RxFailureSta1 ( Ptr< const WifiPsdu > psdu)
private

Receive failure function for STA 1.

Parameters
psduthe PSDU

Definition at line 716 of file wifi-phy-ofdma-test.cc.

References NS_LOG_FUNCTION.

◆ RxFailureSta2()

template<typename LatestPhyEntityType >
void TestDlOfdmaPhyTransmission< LatestPhyEntityType >::RxFailureSta2 ( Ptr< const WifiPsdu > psdu)
private

Receive failure function for STA 2.

Parameters
psduthe PSDU

Definition at line 724 of file wifi-phy-ofdma-test.cc.

References NS_LOG_FUNCTION.

◆ RxFailureSta3()

template<typename LatestPhyEntityType >
void TestDlOfdmaPhyTransmission< LatestPhyEntityType >::RxFailureSta3 ( Ptr< const WifiPsdu > psdu)
private

Receive failure function for STA 3.

Parameters
psduthe PSDU

Definition at line 732 of file wifi-phy-ofdma-test.cc.

References NS_LOG_FUNCTION.

◆ RxSuccessSta1()

template<typename LatestPhyEntityType >
void TestDlOfdmaPhyTransmission< LatestPhyEntityType >::RxSuccessSta1 ( Ptr< const WifiPsdu > psdu,
RxSignalInfo rxSignalInfo,
const WifiTxVector & txVector,
const std::vector< bool > & statusPerMpdu )
private

Receive success function for STA 1.

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

Definition at line 677 of file wifi-phy-ofdma-test.cc.

References NS_LOG_FUNCTION.

◆ RxSuccessSta2()

template<typename LatestPhyEntityType >
void TestDlOfdmaPhyTransmission< LatestPhyEntityType >::RxSuccessSta2 ( Ptr< const WifiPsdu > psdu,
RxSignalInfo rxSignalInfo,
const WifiTxVector & txVector,
const std::vector< bool > & statusPerMpdu )
private

Receive success function for STA 2.

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

Definition at line 690 of file wifi-phy-ofdma-test.cc.

References NS_LOG_FUNCTION.

◆ RxSuccessSta3()

template<typename LatestPhyEntityType >
void TestDlOfdmaPhyTransmission< LatestPhyEntityType >::RxSuccessSta3 ( Ptr< const WifiPsdu > psdu,
RxSignalInfo rxSignalInfo,
const WifiTxVector & txVector,
const std::vector< bool > & statusPerMpdu )
private

Receive success function for STA 3.

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

Definition at line 703 of file wifi-phy-ofdma-test.cc.

References NS_LOG_FUNCTION.

◆ SendMuPpdu()

template<typename LatestPhyEntityType >
void TestDlOfdmaPhyTransmission< LatestPhyEntityType >::SendMuPpdu ( uint16_t rxStaId1,
uint16_t rxStaId2 )
private

Send MU-PPDU function.

Parameters
rxStaId1the ID of the recipient STA for the first PSDU
rxStaId2the ID of the recipient STA for the second PSDU

Definition at line 547 of file wifi-phy-ofdma-test.cc.

References ns3::Create(), ns3::EhtPhy::GetEhtMcs7(), ns3::EhtPhy::GetEhtMcs9(), ns3::HePhy::GetHeMcs7(), ns3::HePhy::GetHeMcs9(), ns3::VhtPhy::GetVhtMcs5(), ns3::NanoSeconds(), NS_ASSERT, NS_ASSERT_MSG, NS_LOG_FUNCTION, ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetQosTid(), ns3::WifiMacHeader::SetSequenceNumber(), ns3::WifiMacHeader::SetType(), ns3::WIFI_MAC_QOSDATA, ns3::WIFI_MOD_CLASS_EHT, ns3::WIFI_MOD_CLASS_HE, ns3::WIFI_PREAMBLE_EHT_MU, and ns3::WIFI_PREAMBLE_HE_MU.

+ Here is the call graph for this function:

◆ StopInterference()

template<typename LatestPhyEntityType >
void TestDlOfdmaPhyTransmission< LatestPhyEntityType >::StopInterference ( )
private

Stop interference function.

Definition at line 670 of file wifi-phy-ofdma-test.cc.

Member Data Documentation

◆ m_channelWidth

template<typename LatestPhyEntityType >
MHz_u TestDlOfdmaPhyTransmission< LatestPhyEntityType >::m_channelWidth {DEFAULT_CHANNEL_WIDTH}
private

channel width

Definition at line 513 of file wifi-phy-ofdma-test.cc.

◆ m_countRxBytesSta1

template<typename LatestPhyEntityType >
uint32_t TestDlOfdmaPhyTransmission< LatestPhyEntityType >::m_countRxBytesSta1 {0}
private

count RX bytes for STA 1

Definition at line 502 of file wifi-phy-ofdma-test.cc.

◆ m_countRxBytesSta2

template<typename LatestPhyEntityType >
uint32_t TestDlOfdmaPhyTransmission< LatestPhyEntityType >::m_countRxBytesSta2 {0}
private

count RX bytes for STA 2

Definition at line 503 of file wifi-phy-ofdma-test.cc.

◆ m_countRxBytesSta3

template<typename LatestPhyEntityType >
uint32_t TestDlOfdmaPhyTransmission< LatestPhyEntityType >::m_countRxBytesSta3 {0}
private

count RX bytes for STA 3

Definition at line 504 of file wifi-phy-ofdma-test.cc.

◆ m_countRxFailureSta1

template<typename LatestPhyEntityType >
uint32_t TestDlOfdmaPhyTransmission< LatestPhyEntityType >::m_countRxFailureSta1 {0}
private

count RX failure for STA 1

Definition at line 499 of file wifi-phy-ofdma-test.cc.

◆ m_countRxFailureSta2

template<typename LatestPhyEntityType >
uint32_t TestDlOfdmaPhyTransmission< LatestPhyEntityType >::m_countRxFailureSta2 {0}
private

count RX failure for STA 2

Definition at line 500 of file wifi-phy-ofdma-test.cc.

◆ m_countRxFailureSta3

template<typename LatestPhyEntityType >
uint32_t TestDlOfdmaPhyTransmission< LatestPhyEntityType >::m_countRxFailureSta3 {0}
private

count RX failure for STA 3

Definition at line 501 of file wifi-phy-ofdma-test.cc.

◆ m_countRxSuccessSta1

template<typename LatestPhyEntityType >
uint32_t TestDlOfdmaPhyTransmission< LatestPhyEntityType >::m_countRxSuccessSta1 {0}
private

count RX success for STA 1

Definition at line 496 of file wifi-phy-ofdma-test.cc.

◆ m_countRxSuccessSta2

template<typename LatestPhyEntityType >
uint32_t TestDlOfdmaPhyTransmission< LatestPhyEntityType >::m_countRxSuccessSta2 {0}
private

count RX success for STA 2

Definition at line 497 of file wifi-phy-ofdma-test.cc.

◆ m_countRxSuccessSta3

template<typename LatestPhyEntityType >
uint32_t TestDlOfdmaPhyTransmission< LatestPhyEntityType >::m_countRxSuccessSta3 {0}
private

count RX success for STA 3

Definition at line 498 of file wifi-phy-ofdma-test.cc.

◆ m_expectedPpduDuration

template<typename LatestPhyEntityType >
Time TestDlOfdmaPhyTransmission< LatestPhyEntityType >::m_expectedPpduDuration
private

expected duration to send MU PPDU

Definition at line 514 of file wifi-phy-ofdma-test.cc.

◆ m_frequency

template<typename LatestPhyEntityType >
MHz_u TestDlOfdmaPhyTransmission< LatestPhyEntityType >::m_frequency {DEFAULT_FREQUENCY}
private

frequency

Definition at line 512 of file wifi-phy-ofdma-test.cc.

◆ m_modClass

template<typename LatestPhyEntityType >
WifiModulationClass TestDlOfdmaPhyTransmission< LatestPhyEntityType >::m_modClass
private

the modulation class to consider for the test

Definition at line 494 of file wifi-phy-ofdma-test.cc.

◆ m_phyAp

template<typename LatestPhyEntityType >
Ptr<SpectrumWifiPhy> TestDlOfdmaPhyTransmission< LatestPhyEntityType >::m_phyAp
private

PHY of AP.

Definition at line 506 of file wifi-phy-ofdma-test.cc.

◆ m_phyInterferer

template<typename LatestPhyEntityType >
Ptr<WaveformGenerator> TestDlOfdmaPhyTransmission< LatestPhyEntityType >::m_phyInterferer
private

PHY of interferer.

Definition at line 510 of file wifi-phy-ofdma-test.cc.

◆ m_phySta1

template<typename LatestPhyEntityType >
Ptr<OfdmaSpectrumWifiPhy<LatestPhyEntityType> > TestDlOfdmaPhyTransmission< LatestPhyEntityType >::m_phySta1
private

PHY of STA 1.

Definition at line 507 of file wifi-phy-ofdma-test.cc.

◆ m_phySta2

template<typename LatestPhyEntityType >
Ptr<OfdmaSpectrumWifiPhy<LatestPhyEntityType> > TestDlOfdmaPhyTransmission< LatestPhyEntityType >::m_phySta2
private

PHY of STA 2.

Definition at line 508 of file wifi-phy-ofdma-test.cc.

◆ m_phySta3

template<typename LatestPhyEntityType >
Ptr<OfdmaSpectrumWifiPhy<LatestPhyEntityType> > TestDlOfdmaPhyTransmission< LatestPhyEntityType >::m_phySta3
private

PHY of STA 3.

Definition at line 509 of file wifi-phy-ofdma-test.cc.


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