UL-OFDMA power control test. More...
Public Member Functions | |
TestUlOfdmaPowerControl () | |
~TestUlOfdmaPowerControl () override | |
Public Member Functions inherited from ns3::TestCase | |
TestCase (const TestCase &)=delete | |
virtual | ~TestCase () |
Destructor. More... | |
std::string | GetName () const |
TestCase & | operator= (const TestCase &)=delete |
Private Member Functions | |
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... | |
void | ReceiveOkCallbackAtAp (Ptr< const WifiPsdu > psdu, RxSignalInfo rxSignalInfo, WifiTxVector txVector, std::vector< bool > statusPerMpdu) |
Receive OK callback function at AP. More... | |
void | ReplaceReceiveOkCallbackOfAp () |
Replace the AP's callback on its PHY's ReceiveOkCallback by the ReceiveOkCallbackAtAp method. More... | |
void | RunOne (bool setupBa) |
Run one simulation with an optional BA session set up phase. More... | |
void | SendMuBar (std::vector< uint16_t > staIds) |
Send a MU BAR through the AP to the STAs listed in the provided vector. More... | |
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 MU-BAR may have a reply). More... | |
Private Attributes | |
Ptr< WifiNetDevice > | m_apDev |
network device of AP More... | |
uint8_t | m_bssColor |
BSS color. More... | |
Ptr< SpectrumWifiPhy > | m_phyAp |
PHY of AP. More... | |
double | m_requestedRssiSta1 |
requested RSSI (in dBm) from STA 1 at AP for HE TB PPDUs More... | |
double | m_requestedRssiSta2 |
requested RSSI (in dBm) from STA 2 at AP for HE TB PPDUs More... | |
double | m_rssiSta1 |
expected RSSI (in dBm) from STA 1 at AP for HE TB PPDUs More... | |
double | m_rssiSta2 |
expected RSSI (in dBm) from STA 2 at AP for HE TB PPDUs More... | |
Ptr< WifiNetDevice > | m_sta1Dev |
network device of STA 1 More... | |
Ptr< WifiNetDevice > | m_sta2Dev |
network device of STA 2 More... | |
double | m_tol |
tolerance (in dB) between received and expected RSSIs More... | |
double | m_txPowerAp |
transmit power (in dBm) of AP More... | |
double | m_txPowerEnd |
maximum transmission power (in dBm) for STAs More... | |
uint8_t | m_txPowerLevels |
number of transmission power levels for STAs More... | |
double | m_txPowerStart |
minimum transmission power (in dBm) for 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... | |
TestCase * | GetParent () 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... | |
UL-OFDMA power control test.
Definition at line 5329 of file wifi-phy-ofdma-test.cc.
TestUlOfdmaPowerControl::TestUlOfdmaPowerControl | ( | ) |
Definition at line 5405 of file wifi-phy-ofdma-test.cc.
|
override |
|
overrideprivatevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 5756 of file wifi-phy-ofdma-test.cc.
References m_requestedRssiSta1, m_requestedRssiSta2, m_rssiSta1, m_rssiSta2, m_txPowerAp, m_txPowerEnd, m_txPowerLevels, m_txPowerStart, and RunOne().
|
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 5592 of file wifi-phy-ofdma-test.cc.
References ns3::NodeContainer::Create(), ns3::NetDeviceContainer::Get(), ns3::NodeContainer::Get(), ns3::WifiNetDevice::GetHeConfiguration(), ns3::Object::GetObject(), ns3::WifiNetDevice::GetPhy(), m_apDev, m_bssColor, m_phyAp, m_sta1Dev, m_sta2Dev, third::mac, ns3::MicroSeconds(), third::mobility, NS_ASSERT, ns3::WifiPhyHelper::Set(), ns3::SpectrumWifiPhyHelper::SetChannel(), ns3::WifiPhyHelper::SetErrorRateModel(), third::wifi, and ns3::WIFI_STANDARD_80211ax.
|
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 5663 of file wifi-phy-ofdma-test.cc.
References ns3::Object::Dispose(), m_apDev, m_phyAp, m_sta1Dev, and m_sta2Dev.
|
private |
Receive OK callback function at AP.
This method will be plugged into the AP PHY's ReceiveOkCallback once the block Ack session has been set up. This is done in the Reset function.
psdu | the PSDU |
rxSignalInfo | the info on the received signal ( |
txVector | the TXVECTOR used for the packet |
statusPerMpdu | reception status per MPDU |
Definition at line 5549 of file wifi-phy-ofdma-test.cc.
References ns3::WifiMacHeader::GetAddr2(), ns3::WifiPsdu::GetAddr2(), ns3::WifiNetDevice::GetAddress(), ns3::WifiPsdu::GetHeader(), ns3::WifiPsdu::GetNMpdus(), ns3::WifiTxVector::GetPreambleType(), ns3::WifiMacHeader::GetType(), m_rssiSta1, m_rssiSta2, m_sta1Dev, m_sta2Dev, m_tol, NS_ABORT_MSG, NS_ASSERT, NS_TEST_ASSERT_MSG_EQ, NS_TEST_ASSERT_MSG_EQ_TOL, ns3::RxSignalInfo::rssi, ns3::WIFI_MAC_CTL_BACKRESP, and ns3::WIFI_PREAMBLE_HE_TB.
Referenced by ReplaceReceiveOkCallbackOfAp().
|
private |
Replace the AP's callback on its PHY's ReceiveOkCallback by the ReceiveOkCallbackAtAp method.
Definition at line 5584 of file wifi-phy-ofdma-test.cc.
References m_phyAp, ns3::MakeCallback(), ReceiveOkCallbackAtAp(), and ns3::WifiPhy::SetReceiveOkCallback().
Referenced by RunOne().
|
private |
Run one simulation with an optional BA session set up phase.
setupBa | true if BA session should be set up (i.e. upon first run), false otherwise |
Definition at line 5676 of file wifi-phy-ofdma-test.cc.
References ns3::WifiPhy::AssignStreams(), ns3::WifiNetDevice::GetAddress(), ns3::WifiNetDevice::GetMac(), ns3::WifiNetDevice::GetPhy(), m_apDev, m_phyAp, m_sta1Dev, m_sta2Dev, m_txPowerAp, m_txPowerEnd, m_txPowerLevels, m_txPowerStart, ns3::MilliSeconds(), NS_ASSERT, ReplaceReceiveOkCallbackOfAp(), SendMuBar(), ns3::ObjectBase::SetAttribute(), and SetupBa().
Referenced by DoRun().
|
private |
Send a MU BAR through the AP to the STAs listed in the provided vector.
staIds | the vector of STA-IDs of STAs to address the MU-BAR to |
Definition at line 5437 of file wifi-phy-ofdma-test.cc.
References ns3::Packet::AddHeader(), ns3::CtrlTriggerHeader::AddUserInfoField(), ns3::WifiPhy::CalculateTxDuration(), DEFAULT_CHANNEL_WIDTH, DEFAULT_WIFI_BAND, ns3::WifiNetDevice::GetAddress(), ns3::GetBlockAckSize(), ns3::CtrlTriggerHeader::GetHeTbTxVector(), ns3::WifiNetDevice::GetMac(), ns3::WifiNetDevice::GetPhy(), ns3::WifiPhy::GetSifs(), m_apDev, m_bssColor, m_phyAp, m_requestedRssiSta1, m_requestedRssiSta2, m_sta1Dev, m_sta2Dev, m_txPowerAp, ns3::MicroSeconds(), NS_ABORT_MSG, NS_ASSERT, ns3::WifiPhy::Send(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetAddr2(), ns3::WifiMacHeader::SetAddr3(), ns3::CtrlTriggerUserInfoField::SetAid12(), ns3::CtrlTriggerHeader::SetApTxPower(), ns3::CtrlTriggerHeader::SetCsRequired(), ns3::WifiMacHeader::SetDsFrom(), ns3::WifiMacHeader::SetDsNotTo(), ns3::WifiPsdu::SetDuration(), ns3::CtrlTriggerHeader::SetGiAndLtfType(), ns3::CtrlTriggerHeader::SetMoreTF(), ns3::CtrlTriggerUserInfoField::SetMuBarTriggerDepUserInfo(), ns3::WifiMacHeader::SetNoMoreFragments(), ns3::WifiMacHeader::SetNoRetry(), ns3::CtrlTriggerUserInfoField::SetRuAllocation(), ns3::CtrlTriggerUserInfoField::SetSsAllocation(), ns3::CtrlBAckRequestHeader::SetStartingSequence(), ns3::CtrlBAckRequestHeader::SetTidInfo(), ns3::CtrlBAckRequestHeader::SetType(), ns3::CtrlTriggerHeader::SetType(), ns3::WifiMacHeader::SetType(), ns3::CtrlTriggerHeader::SetUlBandwidth(), ns3::CtrlTriggerUserInfoField::SetUlDcm(), ns3::CtrlTriggerUserInfoField::SetUlFecCodingType(), ns3::CtrlTriggerHeader::SetUlLength(), ns3::CtrlTriggerUserInfoField::SetUlMcs(), ns3::CtrlTriggerHeader::SetUlSpatialReuse(), ns3::CtrlTriggerUserInfoField::SetUlTargetRssi(), ns3::SU_STA_ID, ns3::WIFI_MAC_CTL_TRIGGER, ns3::WIFI_PHY_BAND_5GHZ, and ns3::WIFI_PREAMBLE_HE_SU.
Referenced by RunOne().
|
private |
Send a QoS Data packet to the destination station in order to set up a block Ack session (so that the MU-BAR may have a reply).
destination | the address of the destination station |
Definition at line 5429 of file wifi-phy-ofdma-test.cc.
References m_apDev, and ns3::WifiNetDevice::Send().
Referenced by RunOne().
|
private |
network device of AP
Definition at line 5385 of file wifi-phy-ofdma-test.cc.
Referenced by ~TestUlOfdmaPowerControl(), DoSetup(), DoTeardown(), RunOne(), SendMuBar(), and SetupBa().
|
private |
BSS color.
Definition at line 5383 of file wifi-phy-ofdma-test.cc.
Referenced by DoSetup(), and SendMuBar().
|
private |
PHY of AP.
Definition at line 5389 of file wifi-phy-ofdma-test.cc.
Referenced by ~TestUlOfdmaPowerControl(), DoSetup(), DoTeardown(), ReplaceReceiveOkCallbackOfAp(), RunOne(), and SendMuBar().
|
private |
requested RSSI (in dBm) from STA 1 at AP for HE TB PPDUs
Definition at line 5396 of file wifi-phy-ofdma-test.cc.
Referenced by DoRun(), and SendMuBar().
|
private |
requested RSSI (in dBm) from STA 2 at AP for HE TB PPDUs
Definition at line 5397 of file wifi-phy-ofdma-test.cc.
Referenced by DoRun(), and SendMuBar().
|
private |
expected RSSI (in dBm) from STA 1 at AP for HE TB PPDUs
Definition at line 5399 of file wifi-phy-ofdma-test.cc.
Referenced by DoRun(), and ReceiveOkCallbackAtAp().
|
private |
expected RSSI (in dBm) from STA 2 at AP for HE TB PPDUs
Definition at line 5400 of file wifi-phy-ofdma-test.cc.
Referenced by DoRun(), and ReceiveOkCallbackAtAp().
|
private |
network device of STA 1
Definition at line 5386 of file wifi-phy-ofdma-test.cc.
Referenced by ~TestUlOfdmaPowerControl(), DoSetup(), DoTeardown(), ReceiveOkCallbackAtAp(), RunOne(), and SendMuBar().
|
private |
network device of STA 2
Definition at line 5387 of file wifi-phy-ofdma-test.cc.
Referenced by ~TestUlOfdmaPowerControl(), DoSetup(), DoTeardown(), ReceiveOkCallbackAtAp(), RunOne(), and SendMuBar().
|
private |
tolerance (in dB) between received and expected RSSIs
Definition at line 5402 of file wifi-phy-ofdma-test.cc.
Referenced by ReceiveOkCallbackAtAp().
|
private |
transmit power (in dBm) of AP
Definition at line 5391 of file wifi-phy-ofdma-test.cc.
Referenced by DoRun(), RunOne(), and SendMuBar().
|
private |
maximum transmission power (in dBm) for STAs
Definition at line 5393 of file wifi-phy-ofdma-test.cc.
|
private |
number of transmission power levels for STAs
Definition at line 5394 of file wifi-phy-ofdma-test.cc.
|
private |
minimum transmission power (in dBm) for STAs
Definition at line 5392 of file wifi-phy-ofdma-test.cc.