A Discrete-Event Network Simulator
API
wifi-simple-interference.cc File Reference
#include "ns3/command-line.h"
#include "ns3/config.h"
#include "ns3/double.h"
#include "ns3/string.h"
#include "ns3/log.h"
#include "ns3/yans-wifi-helper.h"
#include "ns3/ssid.h"
#include "ns3/mobility-helper.h"
#include "ns3/yans-wifi-channel.h"
#include "ns3/mobility-model.h"
#include "ns3/internet-stack-helper.h"
+ Include dependency graph for wifi-simple-interference.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. More...
 
static std::string PrintReceivedPacket (Ptr< Socket > socket)
 Print a packer that has been received. More...
 
static void ReceivePacket (Ptr< Socket > socket)
 Function called when a packet is received. More...
 

Detailed Description

Usage

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

Program Options

--phyMode
Wifi Phy mode [DsssRate1Mbps]
--Prss
Intended primary received signal strength (dBm) [-80]
--Irss
Intended interfering received signal strength (dBm) [-95]
--delta
time offset (microseconds) for interfering signal [0]
--PpacketSize
size of application packet sent [1000]
--IpacketSize
size of interfering packet sent [1000]
--verbose
turn on all WifiNetDevice log components [false]

Definition in file wifi-simple-interference.cc.

Function Documentation

◆ GenerateTraffic()

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

Generate traffic.

Parameters
socketThe seding socket.
pktSizeThe packet size.
pktCountThe packet counter.
pktIntervalThe interval between two packets.

Definition at line 139 of file wifi-simple-interference.cc.

References ns3::Socket::Close(), GenerateTraffic(), pktSize, and ns3::Socket::Send().

Referenced by GenerateTraffic().

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

◆ PrintReceivedPacket()

static std::string PrintReceivedPacket ( Ptr< Socket socket)
inlinestatic

Print a packer that has been received.

Parameters
socketThe receiving socket.
Returns
a string with the packet details.

Definition at line 104 of file wifi-simple-interference.cc.

References ns3::InetSocketAddress::GetIpv4(), ns3::InetSocketAddress::GetPort(), ns3::Socket::GetSockName(), and ns3::Socket::Recv().

Referenced by ReceivePacket().

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

◆ ReceivePacket()

static void ReceivePacket ( Ptr< Socket socket)
static

Function called when a packet is received.

Parameters
socketThe receiving socket.

Definition at line 126 of file wifi-simple-interference.cc.

References NS_LOG_UNCOND, and PrintReceivedPacket().

+ Here is the call graph for this function: