Make sure that when multiple broadcast packets are queued on the same device in a short succession no virtual collision occurs. More...
Public Member Functions | |
Bug555TestCase () | |
virtual void | DoRun (void) |
Implementation to actually run this TestCase. More... | |
![]() | |
virtual | ~TestCase () |
Destructor. More... | |
std::string | GetName (void) const |
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 | |
![]() | |
enum | TestDuration { QUICK = 1, EXTENSIVE = 2, TAKES_FOREVER = 3 } |
How long the test takes to execute. More... | |
![]() | |
TestCase (std::string name) | |
void | AddTestCase (TestCase *testCase, enum TestDuration duration) |
Add an individual child TestCase to this test suite. More... | |
TestCase * | GetParent () const |
bool | IsStatusFailure (void) const |
bool | IsStatusSuccess (void) const |
void | SetDataDir (std::string directory) |
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 |
bool | MustContinueOnFailure (void) const |
std::string | CreateDataDirFilename (std::string filename) |
std::string | CreateTempDirFilename (std::string filename) |
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).
See Bug 555
Definition at line 357 of file wifi-test.cc.
Bug555TestCase::Bug555TestCase | ( | ) |
Definition at line 380 of file wifi-test.cc.
|
virtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 408 of file wifi-test.cc.
References ns3::Node::AddDevice(), ns3::Object::AggregateObject(), AssignWifiRandomStreams(), ns3::WifiMac::ConfigureStandard(), ns3::ObjectFactory::Create(), m_firstTransmissionTime, m_mac, m_manager, m_numSentPackets, m_propDelay, m_secondTransmissionTime, ns3::MakeCallback(), ns3::MicroSeconds(), NotifyPhyTxBegin(), NS_TEST_ASSERT_MSG_EQ, ns3::Seconds(), SendOnePacket(), ns3::Config::SetDefault(), ns3::MobilityModel::SetPosition(), ns3::YansWifiChannel::SetPropagationDelayModel(), ns3::YansWifiChannel::SetPropagationLossModel(), ns3::ObjectFactory::SetTypeId(), and ns3::WIFI_PHY_STANDARD_80211a.
Definition at line 386 of file wifi-test.cc.
References m_firstTransmissionTime, m_numSentPackets, m_secondTransmissionTime, ns3::Now(), NS_ASSERT_MSG, and ns3::Seconds().
Referenced by DoRun().
|
private |
Definition at line 401 of file wifi-test.cc.
References ns3::WifiNetDevice::GetBroadcast(), and ns3::WifiNetDevice::Send().
Referenced by DoRun().
|
private |
Definition at line 373 of file wifi-test.cc.
Referenced by DoRun(), and NotifyPhyTxBegin().
|
private |
Definition at line 370 of file wifi-test.cc.
Referenced by DoRun().
|
private |
Definition at line 369 of file wifi-test.cc.
Referenced by DoRun().
|
private |
Definition at line 375 of file wifi-test.cc.
Referenced by DoRun(), and NotifyPhyTxBegin().
|
private |
Definition at line 371 of file wifi-test.cc.
Referenced by DoRun().
|
private |
Definition at line 374 of file wifi-test.cc.
Referenced by DoRun(), and NotifyPhyTxBegin().