A Discrete-Event Network Simulator
API
Issue40TestCase Class Reference

Make sure that Ideal rate manager recovers when the station is moving away from the access point. More...

+ Inheritance diagram for Issue40TestCase:
+ Collaboration diagram for Issue40TestCase:

Public Member Functions

 Issue40TestCase ()
 
virtual ~Issue40TestCase ()
 
void DoRun (void) override
 Implementation to actually run this TestCase. More...
 
- Public Member Functions inherited from ns3::TestCase
 TestCase (const TestCase &)=delete
 
virtual ~TestCase ()
 Destructor. More...
 
std::string GetName (void) const
 
TestCaseoperator= (const TestCase &)=delete
 

Private Member Functions

void RunOne (bool useAmpdu)
 Run one function. More...
 
void RxSuccessCallback (std::string context, Ptr< const Packet > p)
 Callback when packet is successfully received. More...
 
void SendPackets (uint8_t numPackets, Ptr< NetDevice > sourceDevice, Address &destination)
 Triggers the arrival of 1000 Byte-long packets in the source device. More...
 
void TxFinalDataFailedCallback (std::string context, Mac48Address address)
 Transmit final data failed function. More...
 

Private Attributes

uint16_t m_rxCount
 Count number of successfully received data packets. More...
 
uint16_t m_txCount
 Count number of transmitted data packets. More...
 
uint16_t m_txMacFinalDataFailedCount
 Count number of unsuccessfully transmitted data packets. 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...
 
TestCaseGetParent () 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...
 

Detailed Description

Make sure that Ideal rate manager recovers when the station is moving away from the access point.

The scenario considers an access point and a moving station. Initially, the station is located at 1 meter from the access point. After 1s, the station moves away from the access for 0.5s to reach a point away of 50 meters from the access point. The tests checks the Ideal rate manager is reset once it has failed to transmit a data packet, so that the next data packets can be successfully transmitted using a lower modulation.

See Issue 40

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

Constructor & Destructor Documentation

◆ Issue40TestCase()

Issue40TestCase::Issue40TestCase ( )

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

◆ ~Issue40TestCase()

Issue40TestCase::~Issue40TestCase ( )
virtual

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

Member Function Documentation

◆ DoRun()

void Issue40TestCase::DoRun ( void  )
overridevirtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Implements ns3::TestCase.

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

References RunOne().

+ Here is the call graph for this function:

◆ RunOne()

◆ RxSuccessCallback()

void Issue40TestCase::RxSuccessCallback ( std::string  context,
Ptr< const Packet p 
)
private

Callback when packet is successfully received.

Parameters
contextnode context
pthe received packet

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

References m_rxCount.

Referenced by RunOne().

+ Here is the caller graph for this function:

◆ SendPackets()

void Issue40TestCase::SendPackets ( uint8_t  numPackets,
Ptr< NetDevice sourceDevice,
Address destination 
)
private

Triggers the arrival of 1000 Byte-long packets in the source device.

Parameters
numPacketsnumber of packets in burst
sourceDevicepointer to the source NetDevice
destinationaddress of the destination device

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

References m_txCount, and ns3::NetDevice::Send().

Referenced by RunOne().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TxFinalDataFailedCallback()

void Issue40TestCase::TxFinalDataFailedCallback ( std::string  context,
Mac48Address  address 
)
private

Transmit final data failed function.

Parameters
contextthe context
addressthe MAC address

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

References m_txMacFinalDataFailedCount.

Referenced by RunOne().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_rxCount

uint16_t Issue40TestCase::m_rxCount
private

Count number of successfully received data packets.

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

Referenced by RunOne(), and RxSuccessCallback().

◆ m_txCount

uint16_t Issue40TestCase::m_txCount
private

Count number of transmitted data packets.

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

Referenced by RunOne(), and SendPackets().

◆ m_txMacFinalDataFailedCount

uint16_t Issue40TestCase::m_txMacFinalDataFailedCount
private

Count number of unsuccessfully transmitted data packets.

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

Referenced by RunOne(), and TxFinalDataFailedCallback().


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