A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OcbWifiMacTestCase Class Reference
+ Inheritance diagram for OcbWifiMacTestCase:
+ Collaboration diagram for OcbWifiMacTestCase:

Public Member Functions

 OcbWifiMacTestCase (void)
 
virtual ~OcbWifiMacTestCase (void)
 
- Public Member Functions inherited from ns3::TestCase
virtual ~TestCase ()
 Destructor. More...
 

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

- 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)
 
void AddTestCase (TestCase *testCase) NS_DEPRECATED
 Add an individual child TestCase case to this TestCase. More...
 
void AddTestCase (TestCase *testCase, enum TestDuration duration)
 Add an individual child TestCase to this test suite. More...
 
std::string CreateDataDirFilename (std::string filename)
 
std::string CreateTempDirFilename (std::string filename)
 
bool GetErrorStatus (void) const NS_DEPRECATED
 
std::string GetName (void) const
 
bool IsStatusFailure (void) const
 
bool IsStatusSuccess (void) const
 
bool MustAssertOnFailure (void) const
 
bool MustContinueOnFailure (void) const
 
void ReportTestFailure (std::string cond, std::string actual, std::string limit, std::string message, std::string file, int32_t line)
 
void SetDataDir (std::string directory)
 

Detailed Description

Definition at line 75 of file ocb-test-suite.cc.

Constructor & Destructor Documentation

OcbWifiMacTestCase::OcbWifiMacTestCase ( void  )

Definition at line 109 of file ocb-test-suite.cc.

OcbWifiMacTestCase::~OcbWifiMacTestCase ( void  )
virtual

Definition at line 114 of file ocb-test-suite.cc.

Member Function Documentation

void OcbWifiMacTestCase::AdvancePosition ( Ptr< Node node)
private

Definition at line 121 of file ocb-test-suite.cc.

References ns3::Object::GetObject(), ns3::MobilityModel::GetPosition(), ns3::MobilityModel::SetPosition(), and ns3::Vector3D::x.

Referenced by PostDeviceConfiguration().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void OcbWifiMacTestCase::ConfigureAdhocMode ( Ptr< Node static_node,
Ptr< Node mobile_node 
)
private
void OcbWifiMacTestCase::ConfigureApStaMode ( Ptr< Node static_node,
Ptr< Node mobile_node 
)
private
void OcbWifiMacTestCase::ConfigureOcbMode ( Ptr< Node static_node,
Ptr< Node mobile_node 
)
private

Definition at line 234 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:

void OcbWifiMacTestCase::DoRun ( void  )
privatevirtual

static-node:0 <-— mobile-node:1

  • ---— 350m ----— *

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 313 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::Vector3D::x.

+ Here is the call graph for this function:

Vector OcbWifiMacTestCase::GetCurrentPosition ( uint32_t  i)
private

Definition at line 139 of file ocb-test-suite.cc.

References ns3::NodeContainer::Get(), ns3::Object::GetObject(), ns3::MobilityModel::GetPosition(), 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:

void OcbWifiMacTestCase::MacAssoc ( std::string  context,
Mac48Address  bssid 
)
private

Definition at line 149 of file ocb-test-suite.cc.

References GetCurrentPosition(), ns3::Time::GetNanoSeconds(), 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:

void OcbWifiMacTestCase::PhyRxOkTrace ( std::string  context,
Ptr< const Packet packet,
double  snr,
WifiMode  mode,
enum WifiPreamble  preamble 
)
private

Definition at line 164 of file ocb-test-suite.cc.

References GetCurrentPosition(), ns3::Time::GetNanoSeconds(), 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:

void OcbWifiMacTestCase::PhyTxTrace ( std::string  context,
Ptr< const Packet packet,
WifiMode  mode,
WifiPreamble  preamble,
uint8_t  txPower 
)
private

Definition at line 178 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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void OcbWifiMacTestCase::PreRandomConfiguration ( void  )
private

Definition at line 372 of file ocb-test-suite.cc.

Referenced by DoRun().

+ Here is the caller graph for this function:

Member Data Documentation

Vector OcbWifiMacTestCase::macassoc_pos
private

Definition at line 99 of file ocb-test-suite.cc.

Referenced by DoRun(), MacAssoc(), and PostDeviceConfiguration().

Time OcbWifiMacTestCase::macassoc_time
private

Definition at line 98 of file ocb-test-suite.cc.

Referenced by DoRun(), MacAssoc(), and PostDeviceConfiguration().

NodeContainer OcbWifiMacTestCase::nodes
private

Definition at line 106 of file ocb-test-suite.cc.

Referenced by DoRun(), and GetCurrentPosition().

Vector OcbWifiMacTestCase::phyrx_pos
private

Definition at line 102 of file ocb-test-suite.cc.

Referenced by DoRun(), PhyRxOkTrace(), and PostDeviceConfiguration().

Time OcbWifiMacTestCase::phyrx_time
private

Definition at line 101 of file ocb-test-suite.cc.

Referenced by DoRun(), PhyRxOkTrace(), and PostDeviceConfiguration().

Vector OcbWifiMacTestCase::phytx_pos
private

Definition at line 96 of file ocb-test-suite.cc.

Referenced by DoRun(), PhyTxTrace(), and PostDeviceConfiguration().

Time OcbWifiMacTestCase::phytx_time
private

Definition at line 95 of file ocb-test-suite.cc.

Referenced by DoRun(), PhyTxTrace(), and PostDeviceConfiguration().


The documentation for this class was generated from the following file: