A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
wifi-bianchi.cc File Reference

Example comparing ns-3 to the Bianchi model. More...

#include "ns3/ampdu-subframe-header.h"
#include "ns3/application-container.h"
#include "ns3/boolean.h"
#include "ns3/command-line.h"
#include "ns3/config.h"
#include "ns3/double.h"
#include "ns3/gnuplot.h"
#include "ns3/integer.h"
#include "ns3/log.h"
#include "ns3/mobility-helper.h"
#include "ns3/node-list.h"
#include "ns3/packet-socket-client.h"
#include "ns3/packet-socket-helper.h"
#include "ns3/packet-socket-server.h"
#include "ns3/propagation-delay-model.h"
#include "ns3/propagation-loss-model.h"
#include "ns3/queue-size.h"
#include "ns3/rng-seed-manager.h"
#include "ns3/ssid.h"
#include "ns3/string.h"
#include "ns3/uinteger.h"
#include "ns3/wifi-mac-header.h"
#include "ns3/wifi-mac.h"
#include "ns3/wifi-net-device.h"
#include "ns3/wifi-phy-rx-trace-helper.h"
#include "ns3/wifi-tx-stats-helper.h"
#include "ns3/yans-wifi-helper.h"
#include <fstream>
#include <iomanip>
#include <numbers>
#include <vector>
Include dependency graph for wifi-bianchi.cc:

Go to the source code of this file.

Classes

class  anonymous_namespace{wifi-bianchi.cc}::Experiment
 Class to configure and run an experiment. More...

Namespaces

namespace  anonymous_namespace{wifi-bianchi.cc}
 Unnamed namespace, to disambiguate class Experiment.

Functions

void anonymous_namespace{wifi-bianchi.cc}::AssociationLog (std::string context, Mac48Address address)
 Association log trace.
void anonymous_namespace{wifi-bianchi.cc}::BackoffTrace (std::string context, uint32_t newVal, uint8_t)
 Backoff trace.
Mac48Address anonymous_namespace{wifi-bianchi.cc}::ContextToMac (std::string context)
 Parse context strings of the form "/NodeList/x/DeviceList/x/..." and fetch the Mac address.
uint32_t anonymous_namespace{wifi-bianchi.cc}::ContextToNodeId (std::string context)
 Parse context strings of the form "/NodeList/x/DeviceList/x/..." to extract the NodeId integer.
void anonymous_namespace{wifi-bianchi.cc}::CwTrace (std::string context, uint32_t cw, uint8_t)
 Contention window trace.
void anonymous_namespace{wifi-bianchi.cc}::DisassociationLog (std::string context, Mac48Address address)
 Deassociation log trace.
uint64_t anonymous_namespace{wifi-bianchi.cc}::GetCount (const std::map< Mac48Address, uint64_t > &counter, Mac48Address addr)
 Get the Counter associated with a MAC address.
void anonymous_namespace{wifi-bianchi.cc}::IncrementCounter (std::map< Mac48Address, uint64_t > &counter, Mac48Address addr, uint64_t increment=1)
 Increment the counter for a given address.
void anonymous_namespace{wifi-bianchi.cc}::MacRxTrace (std::string context, Ptr< const Packet > p)
 MAC RX trace.
void anonymous_namespace{wifi-bianchi.cc}::MacTxTrace (std::string context, Ptr< const Packet > p)
 MAC TX trace.
void anonymous_namespace{wifi-bianchi.cc}::PhyRxDoneTrace (std::string context, Ptr< const Packet > p)
 PHY RX end trace.
void anonymous_namespace{wifi-bianchi.cc}::PhyRxDropTrace (std::string context, Ptr< const Packet > p, WifiPhyRxfailureReason reason)
 PHY Drop trace.
void anonymous_namespace{wifi-bianchi.cc}::PhyRxErrorTrace (std::string context, Ptr< const Packet > p, double snr)
 PHY RX error trace.
void anonymous_namespace{wifi-bianchi.cc}::PhyRxOkTrace (std::string context, Ptr< const Packet > p, double snr, WifiMode mode, WifiPreamble preamble)
 PHY successful RX trace.
void anonymous_namespace{wifi-bianchi.cc}::PhyRxPayloadTrace (std::string context, WifiTxVector txVector, Time psduDuration)
 PHY Rx trace.
void anonymous_namespace{wifi-bianchi.cc}::PhyRxTrace (std::string context, Ptr< const Packet > p, RxPowerWattPerChannelBand power)
 PHY Rx trace.
void anonymous_namespace{wifi-bianchi.cc}::PhyTxDoneTrace (std::string context, Ptr< const Packet > p)
 PHY TX end trace.
void anonymous_namespace{wifi-bianchi.cc}::PhyTxTrace (std::string context, Ptr< const Packet > p, double txPowerW)
 PHY TX trace.
void anonymous_namespace{wifi-bianchi.cc}::RestartCalc ()
 Reset the stats.
void anonymous_namespace{wifi-bianchi.cc}::SocketSendTrace (std::string context, Ptr< const Packet > p, const Address &addr)
 Socket send trace.
void anonymous_namespace{wifi-bianchi.cc}::TracePacketReception (std::string context, Ptr< const Packet > p, uint16_t channelFreqMhz, WifiTxVector txVector, MpduInfo aMpdu, SignalNoiseDbm signalNoise, uint16_t staId)
 Trace a packet reception.

Variables

std::set< uint32_tanonymous_namespace{wifi-bianchi.cc}::associated
 Contains the IDs of the STAs that successfully associated to the access point (in infrastructure mode only).
std::ofstream anonymous_namespace{wifi-bianchi.cc}::backoffTraceFile
 File that traces backoff over time.
std::map< std::string, std::map< unsigned int, double > > anonymous_namespace{wifi-bianchi.cc}::bianchiResultsDifs
 Table of the expected values for DIFS.
std::map< std::string, std::map< unsigned int, double > > anonymous_namespace{wifi-bianchi.cc}::bianchiResultsEifs
 Table of the expected values for EIFS.
std::map< Mac48Address, uint64_t > anonymous_namespace{wifi-bianchi.cc}::bytesReceived
 Map that stores the total bytes received per STA (and addressed to that STA).
std::ofstream anonymous_namespace{wifi-bianchi.cc}::cwTraceFile
 File that traces CW over time.
std::ofstream anonymous_namespace{wifi-bianchi.cc}::macRxTraceFile
 File that traces MAC receptions over time.
std::ofstream anonymous_namespace{wifi-bianchi.cc}::macTxTraceFile
 File that traces MAC transmissions over time.
uint8_t anonymous_namespace{wifi-bianchi.cc}::maxMpdus = 0
 The maximum number of MPDUs in A-MPDUs (0 to disable MPDU aggregation).
std::map< Mac48Address, uint64_t > anonymous_namespace{wifi-bianchi.cc}::packetsReceived
 Map that stores the total packets received per STA (and addressed to that STA).
std::map< Mac48Address, uint64_t > anonymous_namespace{wifi-bianchi.cc}::packetsTransmitted
 Map that stores the total packets transmitted per STA.
std::map< Mac48Address, uint64_t > anonymous_namespace{wifi-bianchi.cc}::phyHeaderFailed
 Map that stores the total number of unsuccessfully received PHY headers per STA.
std::ofstream anonymous_namespace{wifi-bianchi.cc}::phyTxTraceFile
 File that traces PHY transmissions over time.
uint32_t anonymous_namespace{wifi-bianchi.cc}::pktSize = 1500
 packet size used for the simulation (in bytes)
std::map< Mac48Address, uint64_t > anonymous_namespace{wifi-bianchi.cc}::psduFailed
 Map that stores the total number of unsuccessfully received PSDUS (for which the PHY header was successfully received) per STA (including PSDUs not addressed to that STA).
std::map< Mac48Address, uint64_t > anonymous_namespace{wifi-bianchi.cc}::psduSucceeded
 Map that stores the total number of successfully received PSDUs per STA (including PSDUs not addressed to that STA).
std::map< Mac48Address, uint64_t > anonymous_namespace{wifi-bianchi.cc}::rxEventAbortedByTx
 Map that stores the number of reception events aborted per STA because the PHY has started to transmit.
std::map< Mac48Address, uint64_t > anonymous_namespace{wifi-bianchi.cc}::rxEventWhileDecodingPreamble
 Map that stores the number of reception events per STA that occurred while PHY was already decoding a preamble.
std::map< Mac48Address, uint64_t > anonymous_namespace{wifi-bianchi.cc}::rxEventWhileRxing
 Map that stores the number of reception events per STA that occurred while PHY was already receiving a PPDU.
std::map< Mac48Address, uint64_t > anonymous_namespace{wifi-bianchi.cc}::rxEventWhileTxing
 Map that stores the number of reception events per STA that occurred while PHY was already transmitting a PPDU.
std::ofstream anonymous_namespace{wifi-bianchi.cc}::socketSendTraceFile
 File that traces packets transmitted by the application over time.
std::map< Mac48Address, Timeanonymous_namespace{wifi-bianchi.cc}::timeFirstReceived
 Map that stores the time at which the first packet was received per STA (and the packet is addressed to that STA).
std::map< Mac48Address, Timeanonymous_namespace{wifi-bianchi.cc}::timeFirstTransmitted
 Map that stores the time at which the first packet was transmitted per STA.
std::map< Mac48Address, Timeanonymous_namespace{wifi-bianchi.cc}::timeLastReceived
 Map that stores the time at which the last packet was received per STA (and the packet is addressed to that STA).
std::map< Mac48Address, Timeanonymous_namespace{wifi-bianchi.cc}::timeLastTransmitted
 Map that stores the time at which the last packet was transmitted per STA.
bool anonymous_namespace{wifi-bianchi.cc}::tracing = false
 Flag to enable/disable generation of tracing files.
bool anonymous_namespace{wifi-bianchi.cc}::useRxHelper = false
 Flag to get PPDU statistics with WifiPhyRxTraceHelper.
bool anonymous_namespace{wifi-bianchi.cc}::useTxHelper = false
 Flag to get MPDU statistics with WifiTxStatsHelper.

Detailed Description

Example comparing ns-3 to the Bianchi model.

See the Wi-Fi Module documentation in the Models chapter.

Definition in file wifi-bianchi.cc.