A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
wifi-simple-adhoc-grid.cc File Reference
#include "ns3/command-line.h"
#include "ns3/config.h"
#include "ns3/double.h"
#include "ns3/internet-stack-helper.h"
#include "ns3/ipv4-address-helper.h"
#include "ns3/ipv4-list-routing-helper.h"
#include "ns3/ipv4-static-routing-helper.h"
#include "ns3/log.h"
#include "ns3/mobility-helper.h"
#include "ns3/mobility-model.h"
#include "ns3/olsr-helper.h"
#include "ns3/string.h"
#include "ns3/uinteger.h"
#include "ns3/yans-wifi-channel.h"
#include "ns3/yans-wifi-helper.h"
+ Include dependency graph for wifi-simple-adhoc-grid.cc:

Go to the source code of this file.

Functions

static void GenerateTraffic (Ptr< Socket > socket, uint32_t pktSize, uint32_t pktCount, Time pktInterval)
 Generate traffic.
 
void ReceivePacket (Ptr< Socket > socket)
 Function called when a packet is received.
 

Detailed Description

Usage

$ ./ns3 run "wifi-simple-adhoc-grid [Program Options]"

Program Options

--phyMode
Wifi Phy mode [DsssRate1Mbps]
--distance
distance (m) [100]
--packetSize
size of application packet sent [1000]
--numPackets
number of packets generated [1]
--interval
interval (seconds) between packets [1]
--verbose
turn on all WifiNetDevice log components [false]
--tracing
turn on ascii and pcap tracing [false]
--numNodes
number of nodes [25]
--sinkNode
Receiver node number [0]
--sourceNode
Sender node number [24]

Definition in file wifi-simple-adhoc-grid.cc.

Function Documentation

◆ GenerateTraffic()

static void GenerateTraffic ( Ptr< Socket socket,
uint32_t  pktSize,
uint32_t  pktCount,
Time  pktInterval 
)
static

Generate traffic.

Parameters
socketThe sending socket.
pktSizeThe packet size.
pktCountThe packet count.
pktIntervalThe interval between two packets.

Definition at line 131 of file wifi-simple-adhoc-grid.cc.

References GenerateTraffic(), pktSize, and ns3::Simulator::Schedule().

Referenced by GenerateTraffic().

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

◆ ReceivePacket()

void ReceivePacket ( Ptr< Socket socket)

Function called when a packet is received.

Parameters
socketThe receiving socket.

Definition at line 114 of file wifi-simple-adhoc-grid.cc.

References NS_LOG_UNCOND.