Ocb Wifi Mac Test Case. More...
Inheritance diagram for OcbWifiMacTestCase:
Collaboration diagram for OcbWifiMacTestCase:Public Member Functions | |
| OcbWifiMacTestCase () | |
| ~OcbWifiMacTestCase () 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 | AdvancePosition (Ptr< Node > node) |
| Advance position function. More... | |
| void | ConfigureAdhocMode (Ptr< Node > static_node, Ptr< Node > mobile_node) |
| Configure adhoc mode function. More... | |
| void | ConfigureApStaMode (Ptr< Node > static_node, Ptr< Node > mobile_node) |
| Configure AP STA mode function. More... | |
| void | ConfigureOcbMode (Ptr< Node > static_node, Ptr< Node > mobile_node) |
| Configure OCB mode function. More... | |
| void | DoRun () override |
| static-node:0 <-— mobile-node:1 More... | |
| Vector | GetCurrentPosition (uint32_t i) |
| Get current position function. More... | |
| void | MacAssoc (std::string context, Mac48Address bssid) |
| MAC associate function. More... | |
| void | PhyRxOkTrace (std::string context, Ptr< const Packet > packet, double snr, WifiMode mode, WifiPreamble preamble) |
| Phy receive ok trace function. More... | |
| void | PhyTxTrace (std::string context, Ptr< const Packet > packet, WifiMode mode, WifiPreamble preamble, uint8_t txPower) |
| Phy transmit trace function. More... | |
| void | PostDeviceConfiguration (Ptr< Node > static_node, Ptr< Node > mobile_node) |
| Post device configuration function. More... | |
| void | PreRandomConfiguration () |
| Pre random configuration function. More... | |
Private Attributes | |
| Vector | macassoc_pos |
| MAC associate position. More... | |
| Time | macassoc_time |
| MAC associate time. More... | |
| NodeContainer | nodes |
| the nodes More... | |
| Vector | phyrx_pos |
| Phy receive position. More... | |
| Time | phyrx_time |
| Phy receive time. More... | |
| Vector | phytx_pos |
| Phy transmit position. More... | |
| Time | phytx_time |
| Phy transmit time. 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... | |
Ocb Wifi Mac Test Case.
Definition at line 84 of file ocb-test-suite.cc.
| OcbWifiMacTestCase::OcbWifiMacTestCase | ( | ) |
Definition at line 178 of file ocb-test-suite.cc.
|
override |
Definition at line 183 of file ocb-test-suite.cc.
Advance position function.
| node | the node |
Definition at line 190 of file ocb-test-suite.cc.
References ns3::Object::GetObject(), third::mobility, and ns3::Seconds().
Referenced by PostDeviceConfiguration().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Configure adhoc mode function.
| static_node | the static node |
| mobile_node | the mobile node |
Definition at line 291 of file ocb-test-suite.cc.
References ns3::YansWifiChannelHelper::Create(), ns3::YansWifiPhyHelper::SetChannel(), ns3::WifiMacHelper::SetType(), third::wifi, and ns3::WIFI_STANDARD_80211p.
Referenced by DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Configure AP STA mode function.
| static_node | the static node |
| mobile_node | the mobile node |
Definition at line 267 of file ocb-test-suite.cc.
References ns3::YansWifiChannelHelper::Create(), ns3::YansWifiPhyHelper::SetChannel(), ns3::WifiMacHelper::SetType(), third::ssid, third::wifi, and ns3::WIFI_STANDARD_80211p.
Referenced by DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Configure OCB mode function.
| static_node | the static node |
| mobile_node | the mobile node |
Definition at line 312 of file ocb-test-suite.cc.
References ns3::YansWifiChannelHelper::Create(), ns3::Wifi80211pHelper::Install(), ns3::YansWifiPhyHelper::SetChannel(), and ns3::WifiHelper::SetRemoteStationManager().
Referenced by DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
overrideprivatevirtual |
static-node:0 <-— mobile-node:1
the node transmit range is less than 150m
Ap+Sta mode vs Adhoc mode vs Ocb mode first test the time point when the stationary node is an AP and the mobile node is a Sta then test when one Ad-hoc node and another Ad-hoc node last test when one OCB node and another OCB node
Implements ns3::TestCase.
Definition at line 406 of file ocb-test-suite.cc.
References ConfigureAdhocMode(), ConfigureApStaMode(), ConfigureOcbMode(), ns3::NodeContainer::Create(), ns3::NodeContainer::Get(), ns3::Time::GetNanoSeconds(), macassoc_pos, macassoc_time, nodes, NS_TEST_ASSERT_MSG_EQ, NS_TEST_ASSERT_MSG_GT, NS_TEST_ASSERT_MSG_LT, phyrx_pos, phyrx_time, phytx_pos, phytx_time, PostDeviceConfiguration(), PreRandomConfiguration(), and ns3::Seconds().
Here is the call graph for this function:
|
private |
Get current position function.
| i | the current position index |
Definition at line 208 of file ocb-test-suite.cc.
References ns3::NodeContainer::Get(), ns3::Object::GetObject(), third::mobility, nodes, and NS_ASSERT.
Referenced by MacAssoc(), PhyRxOkTrace(), and PhyTxTrace().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
MAC associate function.
| context | the context |
| bssid | the BSSID |
Definition at line 218 of file ocb-test-suite.cc.
References ns3::Time::As(), GetCurrentPosition(), macassoc_pos, macassoc_time, and ns3::Now().
Referenced by PostDeviceConfiguration().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Phy receive ok trace function.
| context | the context |
| packet | the packet |
| snr | the SNR |
| mode | the mode |
| preamble | the preamble |
Definition at line 232 of file ocb-test-suite.cc.
References ns3::Time::As(), GetCurrentPosition(), ns3::Now(), phyrx_pos, and phyrx_time.
Referenced by PostDeviceConfiguration().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Phy transmit trace function.
| context | the context |
| packet | the packet |
| mode | the mode |
| preamble | the preamble |
| txPower | the transmit power |
Definition at line 249 of file ocb-test-suite.cc.
References ns3::Time::As(), GetCurrentPosition(), ns3::WifiMacHeader::IsData(), ns3::Now(), ns3::Packet::PeekHeader(), phytx_pos, and phytx_time.
Referenced by PostDeviceConfiguration().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Post device configuration function.
| static_node | the static node |
| mobile_node | the mobile node |
Definition at line 331 of file ocb-test-suite.cc.
References ns3::Node::AddApplication(), AdvancePosition(), AssignWifiRandomStreams(), ns3::Config::Connect(), ns3::WifiNetDevice::GetAddress(), ns3::Node::GetDevice(), ns3::WifiNetDevice::GetIfIndex(), ns3::WifiNetDevice::GetMac(), ns3::Object::GetObject(), ns3::MobilityModel::GetPosition(), ns3::PacketSocketHelper::Install(), MacAssoc(), macassoc_pos, macassoc_time, ns3::MakeCallback(), third::mobility, phyrx_pos, phyrx_time, PhyRxOkTrace(), phytx_pos, phytx_time, PhyTxTrace(), ns3::Seconds(), ns3::PacketSocketAddress::SetPhysicalAddress(), ns3::MobilityModel::SetPosition(), ns3::PacketSocketAddress::SetProtocol(), and ns3::PacketSocketAddress::SetSingleDevice().
Referenced by DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Pre random configuration function.
Definition at line 478 of file ocb-test-suite.cc.
Referenced by DoRun().
Here is the caller graph for this function:
|
private |
MAC associate position.
Definition at line 168 of file ocb-test-suite.cc.
Referenced by DoRun(), MacAssoc(), and PostDeviceConfiguration().
|
private |
MAC associate time.
Definition at line 167 of file ocb-test-suite.cc.
Referenced by DoRun(), MacAssoc(), and PostDeviceConfiguration().
|
private |
the nodes
Definition at line 175 of file ocb-test-suite.cc.
Referenced by DoRun(), and GetCurrentPosition().
|
private |
Phy receive position.
Definition at line 171 of file ocb-test-suite.cc.
Referenced by DoRun(), PhyRxOkTrace(), and PostDeviceConfiguration().
|
private |
Phy receive time.
Definition at line 170 of file ocb-test-suite.cc.
Referenced by DoRun(), PhyRxOkTrace(), and PostDeviceConfiguration().
|
private |
Phy transmit position.
Definition at line 165 of file ocb-test-suite.cc.
Referenced by DoRun(), PhyTxTrace(), and PostDeviceConfiguration().
|
private |
Phy transmit time.
Definition at line 164 of file ocb-test-suite.cc.
Referenced by DoRun(), PhyTxTrace(), and PostDeviceConfiguration().