A Discrete-Event Network Simulator
API
wifi-spectrum-per-example.cc File Reference
#include "ns3/boolean.h"
#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-global-routing-helper.h"
#include "ns3/log.h"
#include "ns3/mobility-helper.h"
#include "ns3/multi-model-spectrum-channel.h"
#include "ns3/on-off-helper.h"
#include "ns3/packet-sink-helper.h"
#include "ns3/packet-sink.h"
#include "ns3/propagation-loss-model.h"
#include "ns3/spectrum-wifi-helper.h"
#include "ns3/ssid.h"
#include "ns3/string.h"
#include "ns3/udp-client-server-helper.h"
#include "ns3/udp-server.h"
#include "ns3/uinteger.h"
#include "ns3/yans-wifi-channel.h"
#include "ns3/yans-wifi-helper.h"
#include <iomanip>
+ Include dependency graph for wifi-spectrum-per-example.cc:

Go to the source code of this file.

Functions

void MonitorSniffRx (Ptr< const Packet > packet, uint16_t channelFreqMhz, WifiTxVector txVector, MpduInfo aMpdu, SignalNoiseDbm signalNoise, uint16_t staId)
 Monitor sniffer Rx trace. More...
 

Variables

double g_noiseDbmAvg
 Average noise power [dBm]. More...
 
uint32_t g_samples
 Number of samples. More...
 
double g_signalDbmAvg
 Average signal power [dBm]. More...
 

Function Documentation

◆ MonitorSniffRx()

void MonitorSniffRx ( Ptr< const Packet packet,
uint16_t  channelFreqMhz,
WifiTxVector  txVector,
MpduInfo  aMpdu,
SignalNoiseDbm  signalNoise,
uint16_t  staId 
)

Monitor sniffer Rx trace.

Parameters
packetThe sensed packet.
channelFreqMhzThe channel frequency [MHz].
txVectorThe Tx vector.
aMpduThe aMPDU.
signalNoiseThe signal and noise dBm.
staIdThe STA ID.

Definition at line 113 of file wifi-spectrum-per-example.cc.

References g_noiseDbmAvg, g_samples, g_signalDbmAvg, ns3::SignalNoiseDbm::noise, and ns3::SignalNoiseDbm::signal.

Variable Documentation

◆ g_noiseDbmAvg

double g_noiseDbmAvg

Average noise power [dBm].

Definition at line 99 of file wifi-spectrum-per-example.cc.

Referenced by MonitorSniffRx().

◆ g_samples

uint32_t g_samples

Number of samples.

Definition at line 100 of file wifi-spectrum-per-example.cc.

Referenced by MonitorSniffRx().

◆ g_signalDbmAvg

double g_signalDbmAvg

Average signal power [dBm].

Definition at line 98 of file wifi-spectrum-per-example.cc.

Referenced by MonitorSniffRx().