A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::Bug555TestCase Class Reference

Make sure that when multiple broadcast packets are queued on the same device in a short succession no virtual collision occurs. More...

+ Inheritance diagram for ns3::Bug555TestCase:
+ Collaboration diagram for ns3::Bug555TestCase:

Public Member Functions

 Bug555TestCase ()
 
virtual void DoRun (void)
 Implementation to actually run this TestCase. More...
 
- Public Member Functions inherited from ns3::TestCase
virtual ~TestCase ()
 Destructor. More...
 

Private Member Functions

void NotifyPhyTxBegin (Ptr< const Packet > p)
 
void SendOnePacket (Ptr< WifiNetDevice > dev)
 

Private Attributes

Time m_firstTransmissionTime
 
ObjectFactory m_mac
 
ObjectFactory m_manager
 
unsigned int m_numSentPackets
 
ObjectFactory m_propDelay
 
Time m_secondTransmissionTime
 

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

Make sure that when multiple broadcast packets are queued on the same device in a short succession no virtual collision occurs.

The observed behavior is that the first frame will be sent immediately, and the frames are spaced by (backoff + SIFS + AIFS) time intervals (where backoff is a random number of slot sizes up to maximum CW)

The following test case should not generate virtual collision for the second frame. The seed and run numbers were pick such that the second frame gets backoff = 0.

                 frame 1, frame 2
                 arrive                SIFS + AIFS
                 V                    <-----------> 

time |-----------—|----------------—|----------—|--------—> 0 1s 1.001408s 1.001442s ^ ^ ^ start TX finish TX start TX frame 1 frame 1 frame 2 ^ frame 2 backoff = 0

The buggy behavior was that frame 2 experiences a virtual collision and re-selects the backoff again. As a result, the actual backoff experience by frame 2 is less likely to be 0 since that would require two successions of 0 backoff (one that generates the virtual collision and one after the virtual collision).

Internal:
See Bug 555

Definition at line 359 of file wifi-test.cc.

Constructor & Destructor Documentation

ns3::Bug555TestCase::Bug555TestCase ( )

Definition at line 382 of file wifi-test.cc.

Member Function Documentation

void ns3::Bug555TestCase::NotifyPhyTxBegin ( Ptr< const Packet p)
private

Definition at line 388 of file wifi-test.cc.

References m_firstTransmissionTime, m_numSentPackets, m_secondTransmissionTime, ns3::Simulator::Now(), and NS_ASSERT_MSG.

Referenced by DoRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::Bug555TestCase::SendOnePacket ( Ptr< WifiNetDevice dev)
private

Definition at line 403 of file wifi-test.cc.

Referenced by DoRun().

+ Here is the caller graph for this function:

Member Data Documentation

Time ns3::Bug555TestCase::m_firstTransmissionTime
private

Definition at line 375 of file wifi-test.cc.

Referenced by DoRun(), and NotifyPhyTxBegin().

ObjectFactory ns3::Bug555TestCase::m_mac
private

Definition at line 372 of file wifi-test.cc.

Referenced by DoRun().

ObjectFactory ns3::Bug555TestCase::m_manager
private

Definition at line 371 of file wifi-test.cc.

Referenced by DoRun().

unsigned int ns3::Bug555TestCase::m_numSentPackets
private

Definition at line 377 of file wifi-test.cc.

Referenced by DoRun(), and NotifyPhyTxBegin().

ObjectFactory ns3::Bug555TestCase::m_propDelay
private

Definition at line 373 of file wifi-test.cc.

Referenced by DoRun().

Time ns3::Bug555TestCase::m_secondTransmissionTime
private

Definition at line 376 of file wifi-test.cc.

Referenced by DoRun(), and NotifyPhyTxBegin().


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