Public Member Functions | |
OcbWifiMacTestCase (void) | |
virtual | ~OcbWifiMacTestCase (void) |
![]() | |
virtual | ~TestCase () |
Destructor. More... | |
std::string | GetName (void) const |
Private Member Functions | |
void | AdvancePosition (Ptr< Node > node) |
void | ConfigureAdhocMode (Ptr< Node > static_node, Ptr< Node > mobile_node) |
void | ConfigureApStaMode (Ptr< Node > static_node, Ptr< Node > mobile_node) |
void | ConfigureOcbMode (Ptr< Node > static_node, Ptr< Node > mobile_node) |
virtual void | DoRun (void) |
static-node:0 <-— mobile-node:1 More... | |
Vector | GetCurrentPosition (uint32_t i) |
void | MacAssoc (std::string context, Mac48Address bssid) |
void | PhyRxOkTrace (std::string context, Ptr< const Packet > packet, double snr, WifiMode mode, enum WifiPreamble preamble) |
void | PhyTxTrace (std::string context, Ptr< const Packet > packet, WifiMode mode, WifiPreamble preamble, uint8_t txPower) |
void | PostDeviceConfiguration (Ptr< Node > static_node, Ptr< Node > mobile_node) |
void | PreRandomConfiguration (void) |
Private Attributes | |
Vector | macassoc_pos |
Time | macassoc_time |
NodeContainer | nodes |
Vector | phyrx_pos |
Time | phyrx_time |
Vector | phytx_pos |
Time | phytx_time |
Additional Inherited Members | |
![]() | |
enum | TestDuration { QUICK = 1, EXTENSIVE = 2, TAKES_FOREVER = 3 } |
How long the test takes to execute. More... | |
![]() | |
TestCase (std::string name) | |
Constructor. More... | |
void | AddTestCase (TestCase *testCase, enum TestDuration duration) |
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... | |
Definition at line 76 of file ocb-test-suite.cc.
OcbWifiMacTestCase::OcbWifiMacTestCase | ( | void | ) |
Definition at line 110 of file ocb-test-suite.cc.
|
virtual |
Definition at line 115 of file ocb-test-suite.cc.
Definition at line 122 of file ocb-test-suite.cc.
References ns3::Object::GetObject(), ns3::MobilityModel::GetPosition(), third::mobility, ns3::Seconds(), and ns3::MobilityModel::SetPosition().
Referenced by PostDeviceConfiguration().
|
private |
Definition at line 216 of file ocb-test-suite.cc.
References ns3::YansWifiChannelHelper::Create(), ns3::WifiHelper::Install(), ns3::YansWifiPhyHelper::SetChannel(), ns3::WifiHelper::SetRemoteStationManager(), ns3::WifiHelper::SetStandard(), ns3::NqosWifiMacHelper::SetType(), third::wifi, and ns3::WIFI_PHY_STANDARD_80211_10MHZ.
Referenced by DoRun().
|
private |
Definition at line 194 of file ocb-test-suite.cc.
References ns3::YansWifiChannelHelper::Create(), ns3::WifiHelper::Install(), ns3::YansWifiPhyHelper::SetChannel(), ns3::WifiHelper::SetRemoteStationManager(), ns3::WifiHelper::SetStandard(), ns3::NqosWifiMacHelper::SetType(), third::ssid, third::wifi, and ns3::WIFI_PHY_STANDARD_80211_10MHZ.
Referenced by DoRun().
|
private |
Definition at line 235 of file ocb-test-suite.cc.
References ns3::YansWifiChannelHelper::Create(), ns3::Wifi80211pHelper::Install(), ns3::YansWifiPhyHelper::SetChannel(), and ns3::WifiHelper::SetRemoteStationManager().
Referenced by DoRun().
|
privatevirtual |
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 320 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().
|
private |
Definition at line 140 of file ocb-test-suite.cc.
References ns3::NodeContainer::Get(), ns3::Object::GetObject(), ns3::MobilityModel::GetPosition(), third::mobility, nodes, and NS_ASSERT.
Referenced by MacAssoc(), PhyRxOkTrace(), and PhyTxTrace().
|
private |
Definition at line 150 of file ocb-test-suite.cc.
References GetCurrentPosition(), ns3::Time::GetNanoSeconds(), macassoc_pos, macassoc_time, and ns3::Now().
Referenced by PostDeviceConfiguration().
|
private |
Definition at line 165 of file ocb-test-suite.cc.
References GetCurrentPosition(), ns3::Time::GetNanoSeconds(), ns3::Now(), phyrx_pos, and phyrx_time.
Referenced by PostDeviceConfiguration().
|
private |
Definition at line 179 of file ocb-test-suite.cc.
References GetCurrentPosition(), ns3::Time::GetNanoSeconds(), ns3::WifiMacHeader::IsData(), ns3::Now(), ns3::Packet::PeekHeader(), phytx_pos, and phytx_time.
Referenced by PostDeviceConfiguration().
|
private |
Definition at line 252 of file ocb-test-suite.cc.
References ns3::Node::AddApplication(), AdvancePosition(), AssignWifiRandomStreams(), ns3::Config::Connect(), ns3::WifiNetDevice::GetAddress(), ns3::Node::GetDevice(), 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::PacketSocketServer::SetLocal(), ns3::PacketSocketAddress::SetPhysicalAddress(), ns3::MobilityModel::SetPosition(), ns3::PacketSocketAddress::SetProtocol(), ns3::PacketSocketClient::SetRemote(), ns3::PacketSocketAddress::SetSingleDevice(), ns3::Application::SetStartTime(), and ns3::Application::SetStopTime().
Referenced by DoRun().
|
private |
Definition at line 379 of file ocb-test-suite.cc.
Referenced by DoRun().
|
private |
Definition at line 100 of file ocb-test-suite.cc.
Referenced by DoRun(), MacAssoc(), and PostDeviceConfiguration().
|
private |
Definition at line 99 of file ocb-test-suite.cc.
Referenced by DoRun(), MacAssoc(), and PostDeviceConfiguration().
|
private |
Definition at line 107 of file ocb-test-suite.cc.
Referenced by DoRun(), and GetCurrentPosition().
|
private |
Definition at line 103 of file ocb-test-suite.cc.
Referenced by DoRun(), PhyRxOkTrace(), and PostDeviceConfiguration().
|
private |
Definition at line 102 of file ocb-test-suite.cc.
Referenced by DoRun(), PhyRxOkTrace(), and PostDeviceConfiguration().
|
private |
Definition at line 97 of file ocb-test-suite.cc.
Referenced by DoRun(), PhyTxTrace(), and PostDeviceConfiguration().
|
private |
Definition at line 96 of file ocb-test-suite.cc.
Referenced by DoRun(), PhyTxTrace(), and PostDeviceConfiguration().