29 #include "ns3/config.h" 30 #include "ns3/gnuplot.h" 31 #include "ns3/string.h" 32 #include "ns3/double.h" 33 #include "ns3/integer.h" 34 #include "ns3/uinteger.h" 35 #include "ns3/command-line.h" 36 #include "ns3/node-list.h" 37 #include "ns3/yans-wifi-helper.h" 39 #include "ns3/wifi-mac-header.h" 40 #include "ns3/queue-size.h" 41 #include "ns3/propagation-loss-model.h" 42 #include "ns3/propagation-delay-model.h" 43 #include "ns3/rng-seed-manager.h" 44 #include "ns3/mobility-helper.h" 45 #include "ns3/wifi-net-device.h" 46 #include "ns3/packet-socket-helper.h" 47 #include "ns3/packet-socket-client.h" 48 #include "ns3/packet-socket-server.h" 49 #include "ns3/application-container.h" 51 #define PI 3.1415926535 389 std::string sub = context.substr (10);
390 uint32_t pos = sub.find (
"/Device");
391 return atoi (sub.substr (0, pos).c_str ());
398 std::string sub = context.substr (10);
399 uint32_t pos = sub.find (
"/Device");
400 uint32_t nodeId = atoi (sub.substr (0, pos).c_str ());
403 for (uint32_t i = 0; i <
n->GetNDevices (); i++)
419 auto it = counter.find (addr);
420 if (it != counter.end ())
422 it->second += increment;
426 counter.insert (std::make_pair (addr, increment));
463 CwTrace (std::string context, uint32_t oldVal, uint32_t newVal)
556 NS_FATAL_ERROR (
"All devices should send with same power, so no packet switch during preamble detection should occur!");
693 uint32_t trialNumber, uint32_t networkSize,
double duration,
bool pcap,
bool infra);
702 uint32_t trialNumber, uint32_t networkSize,
double duration,
bool pcap,
bool infra)
707 wifiNodes.
Create (networkSize + 1);
711 wifiNodes.
Create (networkSize);
721 uint32_t nNodes = wifiNodes.
GetN ();
725 uint64_t beaconInterval = std::min<uint64_t> ((ceil ((duration * 1000000) / 1024) * 1024), (65535 * 1024));
726 mac.SetType (
"ns3::ApWifiMac",
731 mac.SetType (
"ns3::StaWifiMac",
734 for (uint32_t i = 1; i < nNodes; ++i)
741 mac.SetType (
"ns3::AdhocWifiMac");
749 mobility.SetMobilityModel (
"ns3::ConstantPositionMobilityModel");
751 positionAlloc->
Add (Vector (1.0, 1.0, 0.0));
754 double angle = (
static_cast<double> (360) / (nNodes - 1));
755 for (uint32_t i = 0; i < (nNodes - 1); ++i)
757 positionAlloc->
Add (Vector (1.0 + (0.001 * cos ((i * angle *
PI) / 180)), 1.0 + (0.001 * sin ((i * angle *
PI) / 180)), 0.0));
760 mobility.SetPositionAllocator (positionAlloc);
764 packetSocket.
Install (wifiNodes);
771 uint32_t i = infra ? 1 : 0;
772 for (; i < nNodes; ++i)
774 uint32_t j = infra ? 0 : (i + 1) % nNodes;
837 phy.EnablePcap (
"wifi_bianchi_pcap",
devices);
860 auto it = counter.find (addr);
861 if (it != counter.end ())
868 int main (
int argc,
char *argv[])
870 uint32_t nMinStas = 5;
871 uint32_t nMaxStas = 50;
872 uint32_t nStepSize = 5;
874 double duration = 100;
878 std::string workDir =
"./";
880 std::string standard (
"11a");
881 bool validate =
false;
882 uint32_t plotBianchiModel = 0x1;
883 double maxRelativeError = 0.015;
896 cmd.AddValue (
"verbose",
"Logging level (0: no log - 1: simulation script logs - 2: all logs)",
verbose);
897 cmd.AddValue (
"tracing",
"Generate trace files",
tracing);
898 cmd.AddValue (
"pktSize",
"The packet size in bytes",
pktSize);
899 cmd.AddValue (
"trials",
"The maximal number of runs per network size", trials);
900 cmd.AddValue (
"duration",
"Time duration for each trial in seconds", duration);
901 cmd.AddValue (
"pcap",
"Enable/disable PCAP tracing", pcap);
902 cmd.AddValue (
"infra",
"True to use infrastructure mode, false to use ring adhoc mode", infra);
903 cmd.AddValue (
"workDir",
"The working directory used to store generated files", workDir);
904 cmd.AddValue (
"phyRate",
"Set the constant PHY rate in Mbps used to transmit Data frames", phyRate);
905 cmd.AddValue (
"standard",
"Set the standard (11a, 11b, 11g, 11n, 11ac, 11ax)", standard);
906 cmd.AddValue (
"nMinStas",
"Minimum number of stations to start with", nMinStas);
907 cmd.AddValue (
"nMaxStas",
"Maximum number of stations to start with", nMaxStas);
908 cmd.AddValue (
"nStepSize",
"Number of stations to add at each step", nStepSize);
909 cmd.AddValue (
"validate",
"Enable/disable validation of the ns-3 simulations against the Bianchi model", validate);
910 cmd.AddValue (
"maxRelativeError",
"The maximum relative error tolerated between ns-3 results and the Bianchi model (used for regression, i.e. when the validate flag is set)", maxRelativeError);
911 cmd.Parse (argc, argv);
923 NS_FATAL_ERROR (
"Failed to open file wifi-bianchi-backoff-trace.out");
928 NS_FATAL_ERROR (
"Failed to open file wifi-bianchi-phy-tx-trace.out");
933 NS_FATAL_ERROR (
"Failed to open file wifi-bianchi-mac-tx-trace.out");
938 NS_FATAL_ERROR (
"Failed to open file wifi-bianchi-mac-rx-trace.out");
943 NS_FATAL_ERROR (
"Failed to open file wifi-bianchi-socket-send-trace.out");
956 std::stringstream ss;
957 ss <<
"wifi-"<< standard <<
"-p-" <<
pktSize << (infra ?
"-infrastructure" :
"-adhoc") <<
"-r-" << phyRate <<
"-min-" << nMinStas <<
"-max-" << nMaxStas <<
"-step-" << nStepSize <<
"-throughput.plt";
958 std::ofstream throughputPlot (ss.str ().c_str ());
960 ss <<
"wifi-" << standard <<
"-p-" <<
pktSize << (infra ?
"-infrastructure" :
"-adhoc") <<
"-r-" << phyRate <<
"-min-" << nMinStas <<
"-max-" << nMaxStas <<
"-step-" << nStepSize <<
"-throughput.eps";
964 std::stringstream phyRateStr;
965 if (standard ==
"11a")
968 if ((phyRate != 6) && (phyRate != 9) && (phyRate != 12) && (phyRate != 18) && (phyRate != 24) && (phyRate != 36) && (phyRate != 48) && (phyRate != 54))
970 NS_FATAL_ERROR (
"Selected PHY rate " << phyRate <<
" is not defined in " << standard);
972 phyRateStr <<
"OfdmRate" << phyRate <<
"Mbps";
974 else if (standard ==
"11b")
977 if ((phyRate != 1) && (phyRate != 2) && (phyRate != 5.5) && (phyRate != 11))
979 NS_FATAL_ERROR (
"Selected PHY rate " << phyRate <<
" is not defined in " << standard);
983 phyRateStr <<
"DsssRate5_5Mbps";
987 phyRateStr <<
"DsssRate" << phyRate <<
"Mbps";
990 else if (standard ==
"11g")
993 if ((phyRate != 6) && (phyRate != 9) && (phyRate != 12) && (phyRate != 18) && (phyRate != 24) && (phyRate != 36) && (phyRate != 48) && (phyRate != 54))
995 NS_FATAL_ERROR (
"Selected PHY rate " << phyRate <<
" is not defined in " << standard);
997 phyRateStr <<
"ErpOfdmRate" << phyRate <<
"Mbps";
1013 wifi.SetStandard (wifiStandard);
1014 wifi.SetRemoteStationManager (
"ns3::ConstantRateWifiManager",
"DataMode",
StringValue (phyRateStr.str()));
1025 double averageThroughput, throughputArray[trials];
1026 for (uint32_t
n = nMinStas;
n <= nMaxStas;
n += nStepSize)
1028 averageThroughput = 0;
1030 for (uint32_t runIndex = 0; runIndex < trials; runIndex++)
1046 std::cout <<
"Trial " << runIndex + 1 <<
" of " << trials <<
"; "<< phyRate <<
" Mbps for " <<
n <<
" nodes " << std::endl;
1049 cwTraceFile <<
"# Trial " << runIndex + 1 <<
" of " << trials <<
"; "<< phyRate <<
" Mbps for " <<
n <<
" nodes" << std::endl;
1050 backoffTraceFile <<
"# Trial " << runIndex + 1 <<
" of " << trials <<
"; "<< phyRate <<
" Mbps for " <<
n <<
" nodes" << std::endl;
1051 phyTxTraceFile <<
"# Trial " << runIndex + 1 <<
" of " << trials <<
"; " << phyRate <<
" Mbps for " <<
n <<
" nodes" << std::endl;
1052 macTxTraceFile <<
"# Trial " << runIndex + 1 <<
" of " << trials <<
"; " << phyRate <<
" Mbps for " <<
n <<
" nodes" << std::endl;
1053 macRxTraceFile <<
"# Trial " << runIndex + 1 <<
" of " << trials <<
"; " << phyRate <<
" Mbps for " <<
n <<
" nodes" << std::endl;
1054 socketSendTraceFile <<
"# Trial " << runIndex + 1 <<
" of " << trials <<
"; " << phyRate <<
" Mbps for " <<
n <<
" nodes" << std::endl;
1056 experiment.Run (
wifi, wifiPhy, wifiMac, wifiChannel, runIndex,
n, duration, pcap, infra);
1066 Time dataTransferDuration = last -
first;
1067 double nodeThroughput = (it->second * 8 /
static_cast<double> (dataTransferDuration.
GetMicroSeconds ()));
1068 throughput += nodeThroughput;
1078 uint64_t nodeRxEvents =
1079 nodePhyHeaderFailures + nodePsduFailures + nodePsduSuccess + nodeRxEventWhileDecodingPreamble +
1080 nodeRxEventWhileRxing + nodeRxEventWhileTxing + nodeRxEventAbortedByTx;
1081 std::cout <<
"Node " << it->first
1082 <<
": TX packets " << nodeTxPackets
1083 <<
"; RX packets " << nodeRxPackets
1084 <<
"; PHY header failures " << nodePhyHeaderFailures
1085 <<
"; PSDU failures " << nodePsduFailures
1086 <<
"; PSDU success " << nodePsduSuccess
1087 <<
"; RX events while decoding preamble " << nodeRxEventWhileDecodingPreamble
1088 <<
"; RX events while RXing " << nodeRxEventWhileRxing
1089 <<
"; RX events while TXing " << nodeRxEventWhileTxing
1090 <<
"; RX events aborted by TX " << nodeRxEventAbortedByTx
1091 <<
"; total RX events " << nodeRxEvents
1092 <<
"; total events " << nodeTxPackets + nodeRxEvents
1093 <<
"; time first RX " <<
first 1094 <<
"; time last RX " << last
1095 <<
"; dataTransferDuration " << dataTransferDuration
1096 <<
"; throughput " << nodeThroughput <<
" Mbps" << std::endl;
1098 std::cout <<
"Total throughput: " << throughput <<
" Mbps" << std::endl;
1099 averageThroughput += throughput;
1100 throughputArray[runIndex] = throughput;
1102 averageThroughput = averageThroughput / trials;
1104 bool rateFound =
false;
1105 double relativeErrorDifs = 0;
1106 double relativeErrorEifs = 0;
1107 auto itDifs =
bianchiResultsDifs.find (static_cast<unsigned int> (phyRate * 1000000));
1111 auto it = itDifs->second.find (
n);
1112 if (it != itDifs->second.end ())
1114 relativeErrorDifs = (std::abs (averageThroughput - it->second) / it->second);
1115 std::cout <<
"Relative error (DIFS): " << 100 * relativeErrorDifs <<
"%" << std::endl;
1119 NS_FATAL_ERROR (
"No Bianchi results (DIFS) calculated for that number of stations!");
1122 auto itEifs =
bianchiResultsEifs.find (static_cast<unsigned int> (phyRate * 1000000));
1126 auto it = itEifs->second.find (
n);
1127 if (it != itEifs->second.end ())
1129 relativeErrorEifs = (std::abs (averageThroughput - it->second) / it->second);
1130 std::cout <<
"Relative error (EIFS): " << 100 * relativeErrorEifs <<
"%" << std::endl;
1134 NS_FATAL_ERROR (
"No Bianchi results (EIFS) calculated for that number of stations!");
1137 if (!rateFound && validate)
1141 double relativeError =
std::min (relativeErrorDifs, relativeErrorEifs);
1142 if (validate && (relativeError > maxRelativeError))
1148 for (uint32_t i = 0; i < trials; ++i)
1150 stDev += pow (throughputArray[i] - averageThroughput, 2);
1152 stDev = sqrt (stDev / (trials - 1));
1153 dataset.
Add (
n, averageThroughput, stDev);
1157 auto itDifs =
bianchiResultsDifs.find (static_cast<unsigned int> (phyRate * 1000000));
1160 for (uint32_t i = nMinStas; i <= nMaxStas; i += nStepSize)
1163 auto it = itDifs->second.find (i);
1164 if (it != itDifs->second.end ())
1168 datasetBianchiDifs.
Add (i, value);
1173 for (uint32_t i = nMinStas; i <= nMaxStas; i += nStepSize)
1175 datasetBianchiDifs.
Add (i, 0.0);
1179 auto itEifs =
bianchiResultsEifs.find (static_cast<unsigned int> (phyRate * 1000000));
1182 for (uint32_t i = nMinStas; i <= nMaxStas; i += nStepSize)
1185 auto it = itEifs->second.find (i);
1186 if (it != itEifs->second.end ())
1190 datasetBianchiEifs.
Add (i, value);
1195 for (uint32_t i = nMinStas; i <= nMaxStas; i += nStepSize)
1197 datasetBianchiEifs.
Add (i, 0.0);
1201 datasetBianchiEifs.
SetTitle (
"Bianchi (EIFS - lower bound)");
1202 datasetBianchiDifs.
SetTitle (
"Bianchi (DIFS - upper bound)");
1203 gnuplot.AddDataset (dataset);
1204 gnuplot.SetTerminal (
"postscript eps color enh \"Times-BoldItalic\"");
1205 gnuplot.SetLegend (
"Number of competing stations",
"Throughput (Mbps)");
1207 ss <<
"Frame size " <<
pktSize <<
" bytes";
1208 gnuplot.SetTitle (ss.str ());
1210 ss <<
"set xrange [" << nMinStas <<
":" << nMaxStas <<
"]\n" 1211 <<
"set xtics " << nStepSize <<
"\n" 1212 <<
"set grid xtics ytics\n" 1214 <<
"set style line 1 linewidth 5\n" 1215 <<
"set style line 2 linewidth 5\n" 1216 <<
"set style line 3 linewidth 5\n" 1217 <<
"set style line 4 linewidth 5\n" 1218 <<
"set style line 5 linewidth 5\n" 1219 <<
"set style line 6 linewidth 5\n" 1220 <<
"set style line 7 linewidth 5\n" 1221 <<
"set style line 8 linewidth 5\n" 1222 <<
"set style increment user";
1223 gnuplot.SetExtra (ss.str ());
1224 if (plotBianchiModel & 0x01)
1226 datasetBianchiDifs.
SetTitle (
"Bianchi");
1227 gnuplot.AddDataset (datasetBianchiDifs);
1229 if (plotBianchiModel & 0x02)
1231 datasetBianchiEifs.
SetTitle (
"Bianchi");
1232 gnuplot.AddDataset (datasetBianchiEifs);
1234 if (plotBianchiModel == 0x03)
1236 datasetBianchiEifs.
SetTitle (
"Bianchi (EIFS - lower bound)");
1237 datasetBianchiDifs.
SetTitle (
"Bianchi (DIFS - upper bound)");
1239 gnuplot.GenerateOutput (throughputPlot);
1240 throughputPlot.close ();
ERP-OFDM PHY (Clause 19, Section 19.5)
void AddPropagationLoss(std::string name, std::string n0="", const AttributeValue &v0=EmptyAttributeValue(), std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue())
Helper class for UAN CW MAC example.
holds a vector of ns3::Application pointers.
uint32_t AddApplication(Ptr< Application > application)
Associate an Application to this Node.
static EventId Schedule(Time const &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
Simulation virtual time values and global simulation resolution.
void MacTxTrace(std::string context, Ptr< const Packet > p)
std::map< unsigned int, std::map< unsigned int, double > > bianchiResultsEifs
Class for representing queue sizes.
void SetLocal(PacketSocketAddress addr)
set the local address and protocol to be used
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
void IncrementCounter(std::map< Mac48Address, uint64_t > &counter, Mac48Address addr, uint64_t increment=1)
Class to represent a 2D points plot.
std::map< Mac48Address, Time > timeFirstReceived
Map that stores the time at which the first packet was received per STA (and the packet is addressed ...
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
void SetTitle(const std::string &title)
Change line title.
Hold variables of type string.
static Ptr< Node > GetNode(uint32_t n)
Make it easy to create and manage PHY objects for the YANS model.
std::map< unsigned int, std::map< unsigned int, double > > bianchiResultsDifs
std::map< Mac48Address, uint64_t > bytesReceived
Map that stores the total bytes received per STA (and addressed to that STA)
void DisassociationLog(std::string context, Mac48Address address)
std::ofstream macTxTraceFile
File that traces MAC transmissions over time.
double GetSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
an address for a packet socket
static void Run(void)
Run the simulation.
Hold a signed integer type.
void PhyRxOkTrace(std::string context, Ptr< const Packet > p, double snr, WifiMode mode, WifiPreamble preamble)
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
std::map< Mac48Address, Time > timeLastTransmitted
Map that stores the time at which the last packet was transmitted per STA.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Mac48Address ContextToMac(std::string context)
static YansWifiPhyHelper Default(void)
Create a PHY helper in a default working state.
void AssociationLog(std::string context, Mac48Address address)
void PhyTxDoneTrace(std::string context, Ptr< const Packet > p)
void BackoffTrace(std::string context, uint32_t newVal)
helps to create WifiNetDevice objects
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
uint32_t ContextToNodeId(std::string context)
Give ns3::PacketSocket powers to ns3::Node.
void SetSingleDevice(uint32_t device)
Set the address to match only a specified NetDevice.
Address GetAddress(void) const
a polymophic address class
Ptr< YansWifiChannel > Create(void) const
std::map< Mac48Address, uint64_t > phyHeaderFailed
Map that stores the total number of unsuccessfully received PHY headers per STA.
void SetErrorBars(enum ErrorBars errorBars)
WifiPreamble
The type of preamble to be used by an IEEE 802.11 transmission.
std::map< Mac48Address, uint64_t > rxEventWhileTxing
Map that stores the number of reception events per STA that occured while PHY was already transmittin...
WifiPhyStandard
Identifies the PHY specification that a Wifi device is configured to use.
std::map< Mac48Address, uint64_t > psduFailed
Map that stores the total number of unsuccessfully received PSDUS (for which the PHY header was succe...
void PhyRxDropTrace(std::string context, Ptr< const Packet > p, WifiPhyRxfailureReason reason)
std::map< Mac48Address, uint64_t > rxEventAbortedByTx
Map that stores the number of reception events aborted per STA because the PHY has started to transmi...
void LogComponentEnable(char const *name, enum LogLevel level)
Enable the logging output associated with that log component.
uint64_t GetCount(const std::map< Mac48Address, uint64_t > &counter, Mac48Address addr)
a simple class to generate gnuplot-ready plotting commands from a set of datasets.
std::ofstream socketSendTraceFile
File that traces packets transmitted by the application over time.
AttributeValue implementation for Time.
void MacRxTrace(std::string context, Ptr< const Packet > p)
Hold an unsigned integer type.
Use number of packets for queue size.
holds a vector of ns3::NetDevice pointers
std::map< Mac48Address, uint64_t > packetsReceived
Map that stores the total packets received per STA (and addressed to that STA)
void PhyTxTrace(std::string context, Ptr< const Packet > p, double txPowerW)
Hold together all Wifi-related objects.
uint32_t PeekHeader(Header &header) const
Deserialize but does not remove the header from the internal buffer.
std::map< Mac48Address, uint64_t > packetsTransmitted
Map that stores the total packets transmitted per STA.
void Add(double x, double y)
void SocketSendTrace(std::string context, Ptr< const Packet > p, const Address &addr)
Parse command-line arguments.
void Connect(std::string path, const CallbackBase &cb)
static void Destroy(void)
Execute the events scheduled with ScheduleDestroy().
static Mac48Address ConvertFrom(const Address &address)
uint32_t GetN(void) const
Get the number of Ptr<Node> stored in this container.
int64_t GetMicroSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
OFDM PHY for the 5 GHz band (Clause 17)
std::map< Mac48Address, uint64_t > psduSucceeded
Map that stores the total number of successfully received PSDUs per STA (including PSDUs not addresse...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void SetPhysicalAddress(const Address address)
Set the destination address.
keep track of a set of node pointers.
DSSS PHY (Clause 15) and HR/DSSS PHY (Clause 18)
void CwTrace(std::string context, uint32_t oldVal, uint32_t newVal)
void TracePacketReception(std::string context, Ptr< const Packet > packet, uint16_t channelFreqMhz, WifiTxVector txVector, MpduInfo aMpdu, SignalNoiseDbm signalNoise)
manage and create wifi channel objects for the YANS model.
std::ofstream macRxTraceFile
File that traces MAC receptions over time.
void PhyRxDoneTrace(std::string context, Ptr< const Packet > p)
create MAC layers for a ns3::WifiNetDevice.
void SetStyle(enum Style style)
static Time Now(void)
Return the current simulation virtual time.
void PhyRxPayloadTrace(std::string context, WifiTxVector txVector, Time psduDuration)
std::ofstream backoffTraceFile
File that traces backoff over time.
The IEEE 802.11 SSID Information Element.
std::ofstream cwTraceFile
File that traces CW over time.
Gnuplot2dDataset Run(const WifiHelper &wifi, const YansWifiPhyHelper &wifiPhy, const WifiMacHelper &wifiMac, const YansWifiChannelHelper &wifiChannel)
void PhyRxErrorTrace(std::string context, Ptr< const Packet > p, double snr)
Helper class used to assign positions and mobility models to nodes.
std::set< uint32_t > associated
Contains the IDs of the STAs that successfully associated to the access point (in infrastructure mode...
static void EnableLogComponents(void)
Helper to enable all WifiNetDevice log components with one statement.
void experiment(std::string queue_disc_type)
std::map< Mac48Address, uint64_t > rxEventWhileRxing
Map that stores the number of reception events per STA that occured while PHY was already receiving a...
void SetRemote(PacketSocketAddress addr)
set the remote address and protocol to be used
std::map< Mac48Address, Time > timeLastReceived
Map that stores the time at which the last packet was received per STA (and the packet is addressed t...
static void Stop(void)
Tell the Simulator the calling event should be the last one executed.
SignalNoiseDbm structure.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Time Seconds(double value)
Construct a Time in the indicated unit.
AttributeValue implementation for Ssid.
WifiPhyRxfailureReason
Enumeration of the possible reception failure reasons.
void SetDefault(std::string name, const AttributeValue &value)
void SetProtocol(uint16_t protocol)
Set the protocol.
void Add(Vector v)
Add a position to the list of positions.
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
std::ofstream phyTxTraceFile
File that traces PHY transmissions over time.
void Install(Ptr< Node > node) const
Aggregate an instance of a ns3::PacketSocketFactory onto the provided node.
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
std::map< Mac48Address, uint64_t > rxEventWhileDecodingPreamble
Map that stores the number of reception events per STA that occured while PHY was already decoding a ...
void SetPropagationDelay(std::string name, std::string n0="", const AttributeValue &v0=EmptyAttributeValue(), std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue())
void DisablePreambleDetectionModel()
Disable the preamble detection model.
uint32_t pktSize
packet size used for the simulation (in bytes)
This class can be used to hold variables of floating point type such as 'double' or 'float'...
void SetAttribute(std::string name, const AttributeValue &value)
Set a single attribute, raising fatal errors if unsuccessful.
Include Radiotap link layer information.
void SetStartTime(Time start)
Specify application start time.
void PhyRxTrace(std::string context, Ptr< const Packet > p)
Callback< R, Ts... > MakeCallback(R(T::*memPtr)(Ts...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
bool tracing
Flag to enable/disable generation of tracing files.
std::map< Mac48Address, Time > timeFirstTransmitted
Map that stores the time at which the first packet was transmitted per STA.