A Discrete-Event Network Simulator
API
wifi-ap.cc File Reference
#include "ns3/command-line.h"
#include "ns3/config.h"
#include "ns3/boolean.h"
#include "ns3/string.h"
#include "ns3/yans-wifi-helper.h"
#include "ns3/ssid.h"
#include "ns3/mobility-helper.h"
#include "ns3/on-off-helper.h"
#include "ns3/yans-wifi-channel.h"
#include "ns3/mobility-model.h"
#include "ns3/packet-socket-helper.h"
#include "ns3/packet-socket-address.h"
#include "ns3/athstats-helper.h"
+ Include dependency graph for wifi-ap.cc:

Go to the source code of this file.

Functions

static void AdvancePosition (Ptr< Node > node)
 Move a node position by 5m on the x axis every second, up to 210m. More...
 
void DevRxTrace (std::string context, Ptr< const Packet > p)
 MAC-level RX trace. More...
 
void DevTxTrace (std::string context, Ptr< const Packet > p)
 MAC-level TX trace. More...
 
void PhyRxErrorTrace (std::string context, Ptr< const Packet > packet, double snr)
 PHY-level RX error trace. More...
 
void PhyRxOkTrace (std::string context, Ptr< const Packet > packet, double snr, WifiMode mode, WifiPreamble preamble)
 PHY-level RX OK trace. More...
 
void PhyStateTrace (std::string context, Time start, Time duration, WifiPhyState state)
 PHY state trace. More...
 
void PhyTxTrace (std::string context, Ptr< const Packet > packet, WifiMode mode, WifiPreamble preamble, uint8_t txPower)
 PHY-level TX trace. More...
 

Variables

static bool g_verbose = true
 True for verbose output. More...
 

Detailed Description

Usage

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

Program Options

--verbose
Print trace information if true [true]

Definition in file wifi-ap.cc.

Function Documentation

◆ AdvancePosition()

static void AdvancePosition ( Ptr< Node node)
static

Move a node position by 5m on the x axis every second, up to 210m.

Parameters
nodeThe node.

Definition at line 145 of file wifi-ap.cc.

References AdvancePosition(), ns3::Object::GetObject(), third::mobility, and ns3::Seconds().

Referenced by AdvancePosition().

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

◆ DevRxTrace()

void DevRxTrace ( std::string  context,
Ptr< const Packet p 
)

MAC-level RX trace.

Parameters
contextThe context.
pThe packet.

Definition at line 62 of file wifi-ap.cc.

References g_verbose.

◆ DevTxTrace()

void DevTxTrace ( std::string  context,
Ptr< const Packet p 
)

MAC-level TX trace.

Parameters
contextThe context.
pThe packet.

Definition at line 47 of file wifi-ap.cc.

References g_verbose.

◆ PhyRxErrorTrace()

void PhyRxErrorTrace ( std::string  context,
Ptr< const Packet packet,
double  snr 
)

PHY-level RX error trace.

Parameters
contextThe context.
packetThe packet.
snrThe SNR.

Definition at line 96 of file wifi-ap.cc.

References g_verbose.

◆ PhyRxOkTrace()

void PhyRxOkTrace ( std::string  context,
Ptr< const Packet packet,
double  snr,
WifiMode  mode,
WifiPreamble  preamble 
)

PHY-level RX OK trace.

Parameters
contextThe context.
packetThe packet.
snrThe SNR.
modeThe wifi mode.
preambleThe preamble.

Definition at line 80 of file wifi-ap.cc.

References g_verbose.

◆ PhyStateTrace()

void PhyStateTrace ( std::string  context,
Time  start,
Time  duration,
WifiPhyState  state 
)

PHY state trace.

Parameters
contextThe context.
startStart time of the state.
durationDuration of the state.
stateThe state.

Definition at line 131 of file wifi-ap.cc.

References g_verbose, and visualizer.core::start().

+ Here is the call graph for this function:

◆ PhyTxTrace()

void PhyTxTrace ( std::string  context,
Ptr< const Packet packet,
WifiMode  mode,
WifiPreamble  preamble,
uint8_t  txPower 
)

PHY-level TX trace.

Parameters
contextThe context.
packetThe packet.
modeThe wifi mode.
preambleThe preamble.
txPowerThe TX power.

Definition at line 114 of file wifi-ap.cc.

References g_verbose.

Variable Documentation

◆ g_verbose

bool g_verbose = true
static

True for verbose output.

Definition at line 38 of file wifi-ap.cc.

Referenced by DevRxTrace(), DevTxTrace(), PhyRxErrorTrace(), PhyRxOkTrace(), PhyStateTrace(), and PhyTxTrace().