Test the beaconing operation in IBSS. More...
Classes | |
| struct | BeaconFrameInfo |
| Information about transmitted beacon frames. More... | |
Public Member Functions | |
| IbssBeaconingTest () | |
| 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 correctness of transmitted beacon frames. | |
| void | DoRun () override |
| Implementation to actually run this TestCase. | |
| void | DoSetup () override |
| Implementation to do any local setup required for this TestCase. | |
| virtual void | Transmit (WifiConstPsduMap psduMap, WifiTxVector txVector, Watt_u txPower) |
| Callback invoked when a FEM passes PSDUs to the PHY. | |
| void | UpdateBeaconJitters (Mac48Address sender) |
| Update the BeaconJitter of the IBSS STAs based on the sender of the Beacon to have control over the randomness of the Beacon transmission time. | |
Private Attributes | |
| std::vector< Ptr< ConstantRandomVariable > > | m_beaconJitters |
| BeaconJitter of the IBSS STAs. | |
| std::vector< Ptr< AdhocWifiMac > > | m_macs |
| MAC of the IBSS STAs. | |
| std::vector< BeaconFrameInfo > | m_txBeacons |
| transmitted beacons | |
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 the beaconing operation in IBSS.
Definition at line 41 of file wifi-p2p-test.cc.
| IbssBeaconingTest::IbssBeaconingTest | ( | ) |
Constructor.
Definition at line 88 of file wifi-p2p-test.cc.
References ns3::TestCase::TestCase().
|
private |
Check correctness of transmitted beacon frames.
Definition at line 119 of file wifi-p2p-test.cc.
References m_macs, m_txBeacons, and NS_TEST_EXPECT_MSG_EQ.
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 193 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 134 of file wifi-p2p-test.cc.
References ns3::WifiHelper::AssignStreams(), ns3::Config::ConnectWithoutContext(), ns3::NodeContainer::Create(), ns3::CreateObject(), ns3::YansWifiChannelHelper::Default(), ns3::DynamicCast(), m_beaconJitters, m_macs, ns3::MakeCallback(), ns3::RngSeedManager::SetRun(), ns3::RngSeedManager::SetSeed(), Transmit(), and ns3::WIFI_STANDARD_80211ax.
|
privatevirtual |
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 94 of file wifi-p2p-test.cc.
References m_txBeacons, NS_LOG_FUNCTION, and UpdateBeaconJitters().
Referenced by DoSetup().
|
private |
Update the BeaconJitter of the IBSS STAs based on the sender of the Beacon to have control over the randomness of the Beacon transmission time.
If the sender is the same as the STA, the BeaconJitter is set to 1, otherwise it is set to 0.
| sender | the address of the STA that just transmitted a Beacon |
Definition at line 108 of file wifi-p2p-test.cc.
References m_beaconJitters, m_macs, and NS_LOG_FUNCTION.
Referenced by Transmit().
|
private |
BeaconJitter of the IBSS STAs.
Definition at line 85 of file wifi-p2p-test.cc.
Referenced by DoSetup(), and UpdateBeaconJitters().
|
private |
MAC of the IBSS STAs.
Definition at line 84 of file wifi-p2p-test.cc.
Referenced by CheckResults(), DoSetup(), and UpdateBeaconJitters().
|
private |
transmitted beacons
Definition at line 83 of file wifi-p2p-test.cc.
Referenced by CheckResults(), and Transmit().