A Discrete-Event Network Simulator
API
ns3::aodv::LoopbackTestCase Class Reference

AODV loopback UDP echo test case. More...

+ Inheritance diagram for ns3::aodv::LoopbackTestCase:
+ Collaboration diagram for ns3::aodv::LoopbackTestCase:

Public Member Functions

 LoopbackTestCase ()
 
void DoRun ()
 Implementation to actually run this TestCase. More...
 
- Public Member Functions inherited from ns3::TestCase
virtual ~TestCase ()
 Destructor. More...
 
std::string GetName (void) const
 

Private Member Functions

void EchoData (Ptr< Socket > socket)
 
void ReceivePkt (Ptr< Socket > socket)
 
void SendData (Ptr< Socket > socket)
 

Private Attributes

uint32_t m_count
 number of packet received; More...
 
uint16_t m_echoReplyPort
 
uint16_t m_echoSendPort
 
Ptr< Socketm_echoSocket
 
Ptr< Socketm_rxSocket
 
Ptr< Socketm_txSocket
 

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, enum TestDuration duration)
 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

AODV loopback UDP echo test case.

Definition at line 54 of file loopback.cc.

Constructor & Destructor Documentation

ns3::aodv::LoopbackTestCase::LoopbackTestCase ( )

Definition at line 72 of file loopback.cc.

References m_echoReplyPort, and m_echoSendPort.

Member Function Documentation

void ns3::aodv::LoopbackTestCase::EchoData ( Ptr< Socket socket)
private

Definition at line 87 of file loopback.cc.

References ns3::InetSocketAddress::ConvertFrom(), ns3::InetSocketAddress::GetIpv4(), m_echoReplyPort, max, ns3::Socket::RecvFrom(), ns3::Packet::RemoveAllByteTags(), ns3::Packet::RemoveAllPacketTags(), and ns3::Socket::SendTo().

Referenced by DoRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::aodv::LoopbackTestCase::ReceivePkt ( Ptr< Socket socket)
private

Definition at line 79 of file loopback.cc.

References m_count, max, and ns3::Socket::Recv().

Referenced by DoRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::aodv::LoopbackTestCase::SendData ( Ptr< Socket socket)
private

Definition at line 102 of file loopback.cc.

References ns3::Node::GetId(), ns3::Ipv4Address::GetLoopback(), ns3::Socket::GetNode(), m_echoSendPort, ns3::Simulator::ScheduleWithContext(), ns3::Seconds(), and ns3::Socket::SendTo().

Referenced by DoRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

uint32_t ns3::aodv::LoopbackTestCase::m_count
private

number of packet received;

Definition at line 56 of file loopback.cc.

Referenced by DoRun(), and ReceivePkt().

uint16_t ns3::aodv::LoopbackTestCase::m_echoReplyPort
private

Definition at line 61 of file loopback.cc.

Referenced by DoRun(), EchoData(), and LoopbackTestCase().

uint16_t ns3::aodv::LoopbackTestCase::m_echoSendPort
private

Definition at line 60 of file loopback.cc.

Referenced by DoRun(), LoopbackTestCase(), and SendData().

Ptr<Socket> ns3::aodv::LoopbackTestCase::m_echoSocket
private

Definition at line 58 of file loopback.cc.

Referenced by DoRun().

Ptr<Socket> ns3::aodv::LoopbackTestCase::m_rxSocket
private

Definition at line 59 of file loopback.cc.

Referenced by DoRun().

Ptr<Socket> ns3::aodv::LoopbackTestCase::m_txSocket
private

Definition at line 57 of file loopback.cc.

Referenced by DoRun().


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