Wifi Test. More...
Inheritance diagram for TestInterBssConstantObssPdAlgo:
Collaboration diagram for TestInterBssConstantObssPdAlgo:Public Member Functions | |
| TestInterBssConstantObssPdAlgo () | |
| virtual void | DoRun (void) |
| Implementation to actually run this TestCase. More... | |
Public Member Functions inherited from ns3::TestCase | |
| virtual | ~TestCase () |
| Destructor. More... | |
| std::string | GetName (void) const |
Private Member Functions | |
| Ptr< ListPositionAllocator > | AllocatePositions (double d1, double d2, double d3, double d4, double d5) |
| Allocate the node positions. More... | |
| void | CheckPhyState (Ptr< WifiNetDevice > device, WifiPhyState expectedState) |
| Check if the Phy State for a device is an expected value. More... | |
| void | CheckResults () |
| Check the results. More... | |
| void | NotifyPhyRxEnd (std::string context, Ptr< const Packet > p) |
| Notify Phy receive endsn. More... | |
| void | NotifyPhyTxBegin (std::string context, Ptr< const Packet > p, double txPowerW) |
| Notify Phy transmit begin. More... | |
| void | ResetResults () |
| Reset the results. More... | |
| void | RunOne () |
| Run one function. More... | |
| void | SendOnePacket (Ptr< WifiNetDevice > tx_dev, Ptr< WifiNetDevice > rx_dev, uint32_t payloadSize) |
| Send one packet function. More... | |
| void | SetExpectedTxPower (double txPowerDbm) |
| Set the expected transmit power in dBm. More... | |
| void | SetupSimulation () |
| Setup the simulation. More... | |
Private Attributes | |
| NetDeviceContainer | m_apDevices |
| AP devices. More... | |
| uint8_t | m_bssColor1 |
| color for BSS 1 More... | |
| uint8_t | m_bssColor2 |
| color for BSS 2 More... | |
| uint8_t | m_bssColor3 |
| color for BSS 3 More... | |
| double | m_expectedTxPowerDbm |
| expected transmit power in dBm More... | |
| unsigned int | m_numAp1PacketsReceived |
| number of received packets from AP1 More... | |
| unsigned int | m_numAp1PacketsSent |
| number of sent packets from AP1 More... | |
| unsigned int | m_numAp2PacketsReceived |
| number of received packets from AP2 More... | |
| unsigned int | m_numAp2PacketsSent |
| number of sent packets from AP2 More... | |
| unsigned int | m_numSta1PacketsReceived |
| number of received packets from STA1 More... | |
| unsigned int | m_numSta1PacketsSent |
| number of sent packets from STA1 More... | |
| unsigned int | m_numSta2PacketsReceived |
| number of received packets from STA2 More... | |
| unsigned int | m_numSta2PacketsSent |
| number of sent packets from STA2 More... | |
| double | m_obssPdLevelDbm |
| OBSS-PD level in dBm. More... | |
| double | m_obssRxPowerDbm |
| forced RX power in dBm for OBSS More... | |
| unsigned int | m_payloadSize1 |
| size in bytes of packet payload in BSS 1 More... | |
| unsigned int | m_payloadSize2 |
| size in bytes of packet payload in BSS 2 More... | |
| unsigned int | m_payloadSize3 |
| size in bytes of packet payload in BSS 3 More... | |
| NetDeviceContainer | m_staDevices |
| STA devices. More... | |
| double | m_txPowerDbm |
| configured transmit power in dBm 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 TestCsse. More... | |
| bool | IsStatusFailure (void) const |
| Check if any tests failed. More... | |
| bool | IsStatusSuccess (void) 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 (void) const |
| Check if this run should assert on failure. More... | |
| bool | MustContinueOnFailure (void) 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... | |
Wifi Test.
This test case tests the transmission of inter-BSS cases and verify behavior of 11ax OBSS_PD spatial reuse.
The topology for this test case is made of three networks, each with one AP and one STA:
AP –d1– STA1 –d2– AP2 –d3– STA2 –d4– AP3 –d5– STA3 TX1 RX1 TX2 RX2 TX3 RX3
Main parameters: OBSS_PD level = -72dbm Received Power by TX1 from TX2 = [-62dbm, -82dbm] Received SINR by RX1 from TX1 > 3dB (enough to pass MCS0 reception) Received SINR by RX2 from TX2 > 3dB (enough to pass MCS0 reception) Received SINR by RX3 from TX3 > 3dB (enough to pass MCS0 reception) TX1/RX1 BSS Color = 1 TX2/RX2 transmission PPDU BSS Color = [2 0] TX3/RX3 BSS color = 3 (BSS 3 only used to test some corner cases) PHY = 11ax, MCS 0, 80MHz
Definition at line 78 of file inter-bss-test-suite.cc.
| TestInterBssConstantObssPdAlgo::TestInterBssConstantObssPdAlgo | ( | ) |
Definition at line 180 of file inter-bss-test-suite.cc.
|
private |
Allocate the node positions.
| d1 | distance d1 (in meters) |
| d2 | distance d2 (in meters) |
| d3 | distance d3 (in meters) |
| d4 | distance d4 (in meters) |
| d5 | distance d5 (in meters) |
Definition at line 204 of file inter-bss-test-suite.cc.
References ns3::ListPositionAllocator::Add().
Referenced by RunOne().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Check if the Phy State for a device is an expected value.
| expectedState | the expected PHY state |
| device | the device to check |
Definition at line 394 of file inter-bss-test-suite.cc.
References ns3::PointerValue::Get(), ns3::WifiNetDevice::GetPhy(), ns3::WifiPhyStateHelper::GetState(), ns3::Now(), NS_TEST_ASSERT_MSG_EQ, and third::phy.
Referenced by SetupSimulation().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Check the results.
Definition at line 318 of file inter-bss-test-suite.cc.
References m_numAp1PacketsReceived, m_numAp1PacketsSent, m_numAp2PacketsReceived, m_numAp2PacketsSent, m_numSta1PacketsReceived, m_numSta1PacketsSent, m_numSta2PacketsReceived, m_numSta2PacketsSent, and NS_TEST_ASSERT_MSG_EQ.
Referenced by RunOne().
Here is the caller graph for this function:
|
virtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 500 of file inter-bss-test-suite.cc.
References m_bssColor1, m_bssColor2, m_bssColor3, m_obssPdLevelDbm, m_obssRxPowerDbm, and RunOne().
Here is the call graph for this function:
|
private |
Notify Phy receive endsn.
| context | the context |
| p | the packet |
Definition at line 358 of file inter-bss-test-suite.cc.
References ConvertContextToNodeId(), ns3::Packet::GetSize(), m_numAp1PacketsReceived, m_numAp2PacketsReceived, m_numSta1PacketsReceived, m_numSta2PacketsReceived, m_payloadSize1, m_payloadSize2, and pktSize.
Referenced by RunOne().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Notify Phy transmit begin.
| context | the context |
| p | the packet |
| txPowerW | the tx power |
Definition at line 331 of file inter-bss-test-suite.cc.
References ConvertContextToNodeId(), ns3::Packet::GetSize(), m_expectedTxPowerDbm, m_numAp1PacketsSent, m_numAp2PacketsSent, m_numSta1PacketsSent, m_numSta2PacketsSent, m_payloadSize1, m_payloadSize2, NS_TEST_EXPECT_MSG_EQ, pktSize, ns3::TestDoubleIsEqual(), and ns3::WToDbm().
Referenced by RunOne().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Reset the results.
Definition at line 304 of file inter-bss-test-suite.cc.
References m_expectedTxPowerDbm, m_numAp1PacketsReceived, m_numAp1PacketsSent, m_numAp2PacketsReceived, m_numAp2PacketsSent, m_numSta1PacketsReceived, m_numSta1PacketsSent, m_numSta2PacketsReceived, m_numSta2PacketsSent, and m_txPowerDbm.
Referenced by RunOne().
Here is the caller graph for this function:
|
private |
Run one function.
Definition at line 406 of file inter-bss-test-suite.cc.
References AllocatePositions(), third::channel, CheckResults(), ns3::Config::Connect(), ns3::NodeContainer::Create(), ns3::NetDeviceContainer::Get(), ns3::NodeContainer::Get(), ns3::WifiNetDevice::GetHeConfiguration(), ns3::NetDeviceContainer::GetN(), ns3::Object::GetObject(), m_apDevices, m_bssColor1, m_bssColor2, m_bssColor3, m_obssPdLevelDbm, m_obssRxPowerDbm, m_staDevices, m_txPowerDbm, third::mac, ns3::MakeCallback(), third::mobility, NotifyPhyRxEnd(), NotifyPhyTxBegin(), third::phy, ResetResults(), ns3::Config::Set(), ns3::MatrixPropagationLossModel::SetDefaultLoss(), ns3::MatrixPropagationLossModel::SetLoss(), SetupSimulation(), third::ssid, third::wifi, ns3::WIFI_STANDARD_80211ax_5GHZ, and third::wifiStaNodes.
Referenced by DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Send one packet function.
| tx_dev | the transmitting device |
| rx_dev | the receiving device |
| payloadSize | the payload size |
Definition at line 381 of file inter-bss-test-suite.cc.
References ns3::WifiNetDevice::GetAddress(), and ns3::WifiNetDevice::Send().
Referenced by SetupSimulation().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Set the expected transmit power in dBm.
| txPowerDbm | the transmit power in dBm |
Definition at line 388 of file inter-bss-test-suite.cc.
References m_expectedTxPowerDbm.
Referenced by SetupSimulation().
Here is the caller graph for this function:
|
private |
Setup the simulation.
Definition at line 217 of file inter-bss-test-suite.cc.
References CCA_BUSY, CheckPhyState(), ns3::NetDeviceContainer::Get(), IDLE, m_apDevices, m_bssColor1, m_bssColor2, m_obssPdLevelDbm, m_obssRxPowerDbm, m_payloadSize1, m_payloadSize2, m_payloadSize3, m_staDevices, m_txPowerDbm, ns3::MicroSeconds(), min, RX, ns3::Seconds(), SendOnePacket(), SetExpectedTxPower(), and TX.
Referenced by RunOne().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
AP devices.
Definition at line 168 of file inter-bss-test-suite.cc.
Referenced by RunOne(), and SetupSimulation().
|
private |
color for BSS 1
Definition at line 175 of file inter-bss-test-suite.cc.
Referenced by DoRun(), RunOne(), and SetupSimulation().
|
private |
color for BSS 2
Definition at line 176 of file inter-bss-test-suite.cc.
Referenced by DoRun(), RunOne(), and SetupSimulation().
|
private |
color for BSS 3
Definition at line 177 of file inter-bss-test-suite.cc.
|
private |
expected transmit power in dBm
Definition at line 173 of file inter-bss-test-suite.cc.
Referenced by NotifyPhyTxBegin(), ResetResults(), and SetExpectedTxPower().
|
private |
number of received packets from AP1
Definition at line 160 of file inter-bss-test-suite.cc.
Referenced by CheckResults(), NotifyPhyRxEnd(), and ResetResults().
|
private |
number of sent packets from AP1
Definition at line 155 of file inter-bss-test-suite.cc.
Referenced by CheckResults(), NotifyPhyTxBegin(), and ResetResults().
|
private |
number of received packets from AP2
Definition at line 161 of file inter-bss-test-suite.cc.
Referenced by CheckResults(), NotifyPhyRxEnd(), and ResetResults().
|
private |
number of sent packets from AP2
Definition at line 156 of file inter-bss-test-suite.cc.
Referenced by CheckResults(), NotifyPhyTxBegin(), and ResetResults().
|
private |
number of received packets from STA1
Definition at line 158 of file inter-bss-test-suite.cc.
Referenced by CheckResults(), NotifyPhyRxEnd(), and ResetResults().
|
private |
number of sent packets from STA1
Definition at line 153 of file inter-bss-test-suite.cc.
Referenced by CheckResults(), NotifyPhyTxBegin(), and ResetResults().
|
private |
number of received packets from STA2
Definition at line 159 of file inter-bss-test-suite.cc.
Referenced by CheckResults(), NotifyPhyRxEnd(), and ResetResults().
|
private |
number of sent packets from STA2
Definition at line 154 of file inter-bss-test-suite.cc.
Referenced by CheckResults(), NotifyPhyTxBegin(), and ResetResults().
|
private |
OBSS-PD level in dBm.
Definition at line 171 of file inter-bss-test-suite.cc.
Referenced by DoRun(), RunOne(), and SetupSimulation().
|
private |
forced RX power in dBm for OBSS
Definition at line 172 of file inter-bss-test-suite.cc.
Referenced by DoRun(), RunOne(), and SetupSimulation().
|
private |
size in bytes of packet payload in BSS 1
Definition at line 163 of file inter-bss-test-suite.cc.
Referenced by NotifyPhyRxEnd(), NotifyPhyTxBegin(), and SetupSimulation().
|
private |
size in bytes of packet payload in BSS 2
Definition at line 164 of file inter-bss-test-suite.cc.
Referenced by NotifyPhyRxEnd(), NotifyPhyTxBegin(), and SetupSimulation().
|
private |
size in bytes of packet payload in BSS 3
Definition at line 165 of file inter-bss-test-suite.cc.
Referenced by SetupSimulation().
|
private |
STA devices.
Definition at line 167 of file inter-bss-test-suite.cc.
Referenced by RunOne(), and SetupSimulation().
|
private |
configured transmit power in dBm
Definition at line 170 of file inter-bss-test-suite.cc.
Referenced by ResetResults(), RunOne(), and SetupSimulation().