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

AODV deferred route lookup test case (see Bug 772) More...

#include <bug-772.h>

+ Inheritance diagram for Bug772ChainTest:
+ Collaboration diagram for Bug772ChainTest:

Public Member Functions

 Bug772ChainTest (const char *const prefix, const char *const proto, Time time, uint32_t size)
 Create test case. More...
 
 ~Bug772ChainTest ()
 
- Public Member Functions inherited from ns3::TestCase
virtual ~TestCase ()
 Destructor. More...
 
std::string GetName (void) const
 

Private Member Functions

void CheckResults ()
 Compare traces with reference ones. More...
 
void CreateDevices ()
 Create devices, install TCP/IP stack and applications. More...
 
void CreateNodes ()
 Create test topology. More...
 
void DoRun ()
 Go. More...
 

Private Attributes

NodeContainerm_nodes
 
const std::string m_prefix
 PCAP file names prefix. More...
 
const std::string m_proto
 Socket factory TID. More...
 
const uint32_t m_size
 Chain size. More...
 
const double m_step
 Chain step, meters. More...
 
const Time m_time
 Total simulation time. 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)
 
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...
 
bool GetErrorStatus (void) const NS_DEPRECATED
 
TestCaseGetParent () 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)
 

Detailed Description

AODV deferred route lookup test case (see Bug 772)

Todo:
describe expected packet trace

Definition at line 37 of file bug-772.h.

Constructor & Destructor Documentation

Bug772ChainTest::Bug772ChainTest ( const char *const  prefix,
const char *const  proto,
Time  time,
uint32_t  size 
)

Create test case.

Parameters
prefixUnique file names prefix
protons3::UdpSocketFactory or ns3::TcpSocketFactory
sizeNumber of nodes in the chain
timeSimulation time

Definition at line 56 of file bug-772.cc.

Bug772ChainTest::~Bug772ChainTest ( )

Definition at line 67 of file bug-772.cc.

References m_nodes.

Member Function Documentation

void Bug772ChainTest::CheckResults ( )
private

Compare traces with reference ones.

Definition at line 162 of file bug-772.cc.

References m_prefix, m_size, and NS_PCAP_TEST_EXPECT_EQ.

Referenced by DoRun().

+ Here is the caller graph for this function:

void Bug772ChainTest::CreateNodes ( )
private

Create test topology.

Definition at line 91 of file bug-772.cc.

References ns3::NodeContainer::Create(), ns3::MobilityHelper::Install(), m_nodes, m_size, m_step, ns3::MobilityHelper::SetMobilityModel(), and ns3::MobilityHelper::SetPositionAllocator().

Referenced by DoRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Bug772ChainTest::DoRun ( void  )
privatevirtual

Go.

Implements ns3::TestCase.

Definition at line 73 of file bug-772.cc.

References CheckResults(), CreateDevices(), CreateNodes(), m_nodes, and m_time.

+ Here is the call graph for this function:

Member Data Documentation

NodeContainer* Bug772ChainTest::m_nodes
private
Internal: It is important to have pointers here

Definition at line 53 of file bug-772.h.

Referenced by CreateDevices(), CreateNodes(), DoRun(), and ~Bug772ChainTest().

const std::string Bug772ChainTest::m_prefix
private

PCAP file names prefix.

Definition at line 56 of file bug-772.h.

Referenced by CheckResults(), and CreateDevices().

const std::string Bug772ChainTest::m_proto
private

Socket factory TID.

Definition at line 58 of file bug-772.h.

Referenced by CreateDevices().

const uint32_t Bug772ChainTest::m_size
private

Chain size.

Definition at line 62 of file bug-772.h.

Referenced by CheckResults(), CreateDevices(), and CreateNodes().

const double Bug772ChainTest::m_step
private

Chain step, meters.

Definition at line 64 of file bug-772.h.

Referenced by CreateNodes().

const Time Bug772ChainTest::m_time
private

Total simulation time.

Definition at line 60 of file bug-772.h.

Referenced by CreateDevices(), and DoRun().


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