A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
mesh.cc File Reference
#include "ns3/applications-module.h"
#include "ns3/core-module.h"
#include "ns3/internet-module.h"
#include "ns3/mesh-helper.h"
#include "ns3/mesh-module.h"
#include "ns3/mobility-module.h"
#include "ns3/network-module.h"
#include "ns3/yans-wifi-helper.h"
#include <fstream>
#include <iostream>
#include <sstream>
+ Include dependency graph for mesh.cc:

Go to the source code of this file.

Classes

class  MeshTest
 MeshTest class. More...
 

Functions

void RxTrace (Ptr< const Packet > p)
 Reception trace sink,.
 
void TxTrace (Ptr< const Packet > p)
 Transmission trace sink.
 

Variables

uint32_t g_udpRxCount = 0
 Tx packet counter.
 
uint32_t g_udpTxCount = 0
 Rx packet counter.
 

Detailed Description

Usage

$ ./ns3 run "mesh [Program Options]"

Program Options

--x-size
Number of nodes in a row grid [3]
--y-size
Number of rows in a grid [3]
--step
Size of edge in our grid (meters) [50]
--start
Maximum random start delay for beacon jitter (sec) [0.1]
--time
Simulation time (sec) [100]
--packet-interval
Interval between packets in UDP ping (sec) [1]
--packet-size
Size of packets in UDP ping (bytes) [1024]
--interfaces
Number of radio interfaces used by each mesh point [1]
--channels
Use different frequency channels for different interfaces [true]
--pcap
Enable PCAP traces on interfaces [false]
--ascii
Enable Ascii traces on interfaces [false]
--stack
Type of protocol stack. ns3::Dot11sStack by default [ns3::Dot11sStack]
--root
Mac address of root mesh point in HWMP [ff:ff:ff:ff:ff:ff]

Definition in file mesh.cc.

Function Documentation

◆ RxTrace()

void RxTrace ( Ptr< const Packet p)

Reception trace sink,.

Parameters
pThe received packet.

Definition at line 111 of file mesh.cc.

References g_udpRxCount, and NS_LOG_DEBUG.

Referenced by MeshTest::InstallApplication().

+ Here is the caller graph for this function:

◆ TxTrace()

void TxTrace ( Ptr< const Packet p)

Transmission trace sink.

Parameters
pThe sent packet.

Definition at line 99 of file mesh.cc.

References g_udpTxCount, and NS_LOG_DEBUG.

Referenced by MeshTest::InstallApplication().

+ Here is the caller graph for this function:

Variable Documentation

◆ g_udpRxCount

uint32_t g_udpRxCount = 0

Tx packet counter.

Definition at line 91 of file mesh.cc.

Referenced by MeshTest::Run(), and RxTrace().

◆ g_udpTxCount

uint32_t g_udpTxCount = 0

Rx packet counter.

Definition at line 90 of file mesh.cc.

Referenced by MeshTest::Run(), and TxTrace().