A Discrete-Event Network Simulator
API
MeshTest Class Reference

MeshTest class. More...

+ Collaboration diagram for MeshTest:

Public Member Functions

 MeshTest ()
 Init test. More...
 
void Configure (int argc, char **argv)
 Configure test from command line arguments. More...
 
int Run ()
 Run test. More...
 

Private Member Functions

void CreateNodes ()
 Create nodes and setup their mobility. More...
 
void InstallApplication ()
 Install applications. More...
 
void InstallInternetStack ()
 Install internet m_stack on nodes. More...
 
void Report ()
 Print mesh devices diagnostics. More...
 

Private Attributes

Ipv4InterfaceContainer interfaces
 Addresses of interfaces: More...
 
bool m_ascii
 ASCII. More...
 
bool m_chan
 channel More...
 
uint32_t m_nIfaces
 number interfaces More...
 
double m_packetInterval
 packet interval More...
 
uint16_t m_packetSize
 packet size More...
 
bool m_pcap
 PCAP. More...
 
double m_randomStart
 random start More...
 
std::string m_root
 root More...
 
std::string m_stack
 stack More...
 
double m_step
 step More...
 
double m_totalTime
 total time More...
 
int m_xSize
 X size. More...
 
int m_ySize
 Y size. More...
 
MeshHelper mesh
 MeshHelper. Report is not static methods. More...
 
NetDeviceContainer meshDevices
 List of all mesh point devices. More...
 
NodeContainer nodes
 List of network nodes. More...
 

Detailed Description

MeshTest class.

Definition at line 122 of file mesh.cc.

Constructor & Destructor Documentation

◆ MeshTest()

MeshTest::MeshTest ( )

Init test.

Definition at line 171 of file mesh.cc.

Member Function Documentation

◆ Configure()

void MeshTest::Configure ( int  argc,
char **  argv 
)

Configure test from command line arguments.

Parameters
argccommand line argument count
argvcommand line arguments

Definition at line 188 of file mesh.cc.

References second::cmd, m_ascii, m_chan, m_nIfaces, m_packetInterval, m_packetSize, m_pcap, m_randomStart, m_root, m_stack, m_step, m_totalTime, m_xSize, m_ySize, and NS_LOG_DEBUG.

◆ CreateNodes()

◆ InstallApplication()

void MeshTest::InstallApplication ( )
private

Install applications.

Definition at line 285 of file mesh.cc.

References first::clientApps, first::echoClient, first::echoServer, ns3::NodeContainer::Get(), ns3::Ipv4InterfaceContainer::GetAddress(), interfaces, m_packetInterval, m_packetSize, m_totalTime, m_xSize, m_ySize, ns3::MakeCallback(), nodes, RxTrace(), ns3::Seconds(), first::serverApps, and TxTrace().

Referenced by Run().

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

◆ InstallInternetStack()

void MeshTest::InstallInternetStack ( )
private

Install internet m_stack on nodes.

Definition at line 276 of file mesh.cc.

References first::address, ns3::InternetStackHelper::Install(), interfaces, meshDevices, and nodes.

Referenced by Run().

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

◆ Report()

void MeshTest::Report ( )
private

Print mesh devices diagnostics.

Definition at line 318 of file mesh.cc.

References ns3::NetDeviceContainer::Begin(), ns3::NetDeviceContainer::End(), mesh, meshDevices, and ns3::MeshHelper::Report().

Referenced by Run().

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

◆ Run()

int MeshTest::Run ( void  )

Run test.

Returns
the test status

Definition at line 305 of file mesh.cc.

References CreateNodes(), g_udpRxCount, g_udpTxCount, InstallApplication(), InstallInternetStack(), m_totalTime, Report(), Run(), and ns3::Seconds().

+ Here is the call graph for this function:

Member Data Documentation

◆ interfaces

Ipv4InterfaceContainer MeshTest::interfaces
private

Addresses of interfaces:

Definition at line 158 of file mesh.cc.

Referenced by InstallApplication(), and InstallInternetStack().

◆ m_ascii

bool MeshTest::m_ascii
private

ASCII.

Definition at line 150 of file mesh.cc.

Referenced by Configure(), and CreateNodes().

◆ m_chan

bool MeshTest::m_chan
private

channel

Definition at line 148 of file mesh.cc.

Referenced by Configure(), and CreateNodes().

◆ m_nIfaces

uint32_t MeshTest::m_nIfaces
private

number interfaces

Definition at line 147 of file mesh.cc.

Referenced by Configure(), and CreateNodes().

◆ m_packetInterval

double MeshTest::m_packetInterval
private

packet interval

Definition at line 145 of file mesh.cc.

Referenced by Configure(), and InstallApplication().

◆ m_packetSize

uint16_t MeshTest::m_packetSize
private

packet size

Definition at line 146 of file mesh.cc.

Referenced by Configure(), and InstallApplication().

◆ m_pcap

bool MeshTest::m_pcap
private

PCAP.

Definition at line 149 of file mesh.cc.

Referenced by Configure(), and CreateNodes().

◆ m_randomStart

double MeshTest::m_randomStart
private

random start

Definition at line 143 of file mesh.cc.

Referenced by Configure(), and CreateNodes().

◆ m_root

std::string MeshTest::m_root
private

root

Definition at line 152 of file mesh.cc.

Referenced by Configure(), and CreateNodes().

◆ m_stack

std::string MeshTest::m_stack
private

stack

Definition at line 151 of file mesh.cc.

Referenced by Configure(), and CreateNodes().

◆ m_step

double MeshTest::m_step
private

step

Definition at line 142 of file mesh.cc.

Referenced by Configure(), and CreateNodes().

◆ m_totalTime

double MeshTest::m_totalTime
private

total time

Definition at line 144 of file mesh.cc.

Referenced by Configure(), InstallApplication(), and Run().

◆ m_xSize

int MeshTest::m_xSize
private

X size.

Definition at line 140 of file mesh.cc.

Referenced by Configure(), CreateNodes(), and InstallApplication().

◆ m_ySize

int MeshTest::m_ySize
private

Y size.

Definition at line 141 of file mesh.cc.

Referenced by Configure(), CreateNodes(), and InstallApplication().

◆ mesh

MeshHelper MeshTest::mesh
private

MeshHelper. Report is not static methods.

Definition at line 160 of file mesh.cc.

Referenced by CreateNodes(), and Report().

◆ meshDevices

NetDeviceContainer MeshTest::meshDevices
private

List of all mesh point devices.

Definition at line 156 of file mesh.cc.

Referenced by CreateNodes(), InstallInternetStack(), and Report().

◆ nodes

NodeContainer MeshTest::nodes
private

List of network nodes.

Definition at line 154 of file mesh.cc.

Referenced by CreateNodes(), InstallApplication(), and InstallInternetStack().


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