Test transmissions in IBSS when peers have different capabilities. More...
Public Member Functions | |
| IbssCapabilitiesTest (WifiStandard txStandard, WifiStandard rxStandard, bool beaconing) | |
| Constructor. | |
| Public Member Functions inherited from ns3::TestCase | |
| TestCase (const TestCase &)=delete | |
| Caller graph was not generated because of its size. | |
| virtual | ~TestCase () |
| Destructor. | |
| std::string | GetName () const |
| TestCase & | operator= (const TestCase &)=delete |
Private Member Functions | |
| void | CheckResults () |
| Check that the simulation produced the expected results. | |
| void | DoRun () override |
| Implementation to actually run this TestCase. | |
| void | DoSetup () override |
| Implementation to do any local setup required for this TestCase. | |
| void | Receive (Ptr< const Packet > pkt, const Address &addr) |
| Callback invoked when a packet is received by the packet socket server. | |
| void | Transmit (WifiConstPsduMap psduMap, WifiTxVector txVector, Watt_u txPower) |
| Callback invoked when a FEM passes PSDUs to the PHY. | |
| void | TxDrop (Ptr< const Packet > packet) |
| Callback invoked when a packet is dropped by the MAC prior to enqueueing. | |
| void | TxGenerated (Ptr< const Packet > pkt, const Address &addr) |
| Callback invoked when a packet is generated by the packet socket client. | |
Private Attributes | |
| bool | m_beaconing |
| flag whether beacon generation is enabled | |
| std::vector< Ptr< const Packet > > | m_droppedPackets |
| dropped packets | |
| std::vector< Ptr< const Packet > > | m_generatedPackets |
| generated packets | |
| std::size_t | m_nPackets |
| number of packets to generate | |
| std::vector< Ptr< const Packet > > | m_rxPackets |
| received packets | |
| WifiStandard | m_rxStandard |
| the standard for the RX device | |
| WifiStandard | m_txStandard |
| the standard for the TX device | |
| std::vector< WifiTxVector > | m_txVectors |
| TXVECTOR of transmitted packets. | |
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... | |
| 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. | |
| TestCase * | GetParent () 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. | |
Test transmissions in IBSS when peers have different capabilities.
Definition at line 209 of file wifi-p2p-test.cc.
| IbssCapabilitiesTest::IbssCapabilitiesTest | ( | WifiStandard | txStandard, |
| WifiStandard | rxStandard, | ||
| bool | beaconing ) |
Constructor.
| txStandard | the standard supported by the TX device |
| rxStandard | the standard supported by the RX device |
| beaconing | flag whether beaconing is used in IBSS |
Definition at line 273 of file wifi-p2p-test.cc.
References ns3::TestCase::TestCase(), m_beaconing, m_nPackets, m_rxStandard, and m_txStandard.
|
private |
Check that the simulation produced the expected results.
Definition at line 317 of file wifi-p2p-test.cc.
References m_beaconing, m_droppedPackets, m_generatedPackets, m_nPackets, m_rxPackets, m_rxStandard, m_txStandard, m_txVectors, NS_ABORT_MSG, NS_TEST_EXPECT_MSG_EQ, ns3::WIFI_MOD_CLASS_HE, ns3::WIFI_MOD_CLASS_VHT, ns3::WIFI_STANDARD_80211ac, and ns3::WIFI_STANDARD_80211ax.
Referenced by DoRun().
|
overrideprivatevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 498 of file wifi-p2p-test.cc.
References CheckResults(), ns3::Simulator::Destroy(), ns3::Simulator::Run(), ns3::Seconds(), and ns3::Simulator::Stop().
|
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 416 of file wifi-p2p-test.cc.
References ns3::Node::AddApplication(), ns3::WifiHelper::AssignStreams(), ns3::Config::ConnectWithoutContext(), ns3::NodeContainer::Create(), ns3::CreateObject(), ns3::YansWifiChannelHelper::Default(), ns3::NodeContainer::Get(), ns3::PacketSocketHelper::Install(), m_beaconing, m_nPackets, m_rxStandard, m_txStandard, ns3::MakeCallback(), Receive(), ns3::Seconds(), ns3::PacketSocketAddress::SetPhysicalAddress(), ns3::RngSeedManager::SetRun(), ns3::RngSeedManager::SetSeed(), ns3::PacketSocketAddress::SetSingleDevice(), Transmit(), TxDrop(), and TxGenerated().
Callback invoked when a packet is received by the packet socket server.
| pkt | the packet |
| addr | the address |
Definition at line 310 of file wifi-p2p-test.cc.
References m_rxPackets, and NS_LOG_FUNCTION.
Referenced by DoSetup().
|
private |
Callback invoked when a FEM passes PSDUs to the PHY.
| psduMap | the PSDU map |
| txVector | the TX vector |
| txPower | the TX power |
Definition at line 285 of file wifi-p2p-test.cc.
References m_txVectors, and NS_LOG_FUNCTION.
Referenced by DoSetup().
Callback invoked when a packet is dropped by the MAC prior to enqueueing.
| Packet | the dropped packet |
Definition at line 296 of file wifi-p2p-test.cc.
References m_droppedPackets, and NS_LOG_FUNCTION.
Referenced by DoSetup().
Callback invoked when a packet is generated by the packet socket client.
| pkt | the packet |
| addr | the address |
Definition at line 303 of file wifi-p2p-test.cc.
References m_generatedPackets, and NS_LOG_FUNCTION.
Referenced by DoSetup().
|
private |
flag whether beacon generation is enabled
Definition at line 263 of file wifi-p2p-test.cc.
Referenced by IbssCapabilitiesTest(), CheckResults(), and DoSetup().
dropped packets
Definition at line 268 of file wifi-p2p-test.cc.
Referenced by CheckResults(), and TxDrop().
generated packets
Definition at line 269 of file wifi-p2p-test.cc.
Referenced by CheckResults(), and TxGenerated().
|
private |
number of packets to generate
Definition at line 265 of file wifi-p2p-test.cc.
Referenced by IbssCapabilitiesTest(), CheckResults(), and DoSetup().
received packets
Definition at line 270 of file wifi-p2p-test.cc.
Referenced by CheckResults(), and Receive().
|
private |
the standard for the RX device
Definition at line 262 of file wifi-p2p-test.cc.
Referenced by IbssCapabilitiesTest(), CheckResults(), and DoSetup().
|
private |
the standard for the TX device
Definition at line 261 of file wifi-p2p-test.cc.
Referenced by IbssCapabilitiesTest(), CheckResults(), and DoSetup().
|
private |
TXVECTOR of transmitted packets.
Definition at line 267 of file wifi-p2p-test.cc.
Referenced by CheckResults(), and Transmit().