A Discrete-Event Network Simulator
API
wifi-power-adaptation-distance.cc
Go to the documentation of this file.
1/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/*
3 * Copyright (c) 2014 Universidad de la Rep├║blica - Uruguay
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation;
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * Author: Matias Richart <mrichart@fing.edu.uy>
19 */
20
88#include "ns3/gnuplot.h"
89#include "ns3/command-line.h"
90#include "ns3/config.h"
91#include "ns3/uinteger.h"
92#include "ns3/double.h"
93#include "ns3/log.h"
94#include "ns3/yans-wifi-helper.h"
95#include "ns3/ssid.h"
96#include "ns3/mobility-helper.h"
97#include "ns3/internet-stack-helper.h"
98#include "ns3/ipv4-address-helper.h"
99#include "ns3/packet-sink-helper.h"
100#include "ns3/on-off-helper.h"
101#include "ns3/yans-wifi-channel.h"
102#include "ns3/wifi-net-device.h"
103#include "ns3/wifi-mac.h"
104#include "ns3/wifi-mac-header.h"
105#include "ns3/mobility-model.h"
106
107using namespace ns3;
108
109NS_LOG_COMPONENT_DEFINE ("PowerAdaptationDistance");
110
112static const uint32_t packetSize = 1420;
113
118{
119public:
127
135 void PhyCallback (std::string path, Ptr<const Packet> packet, double powerW);
143 void RxCallback (std::string path, Ptr<const Packet> packet, const Address &from);
152 void PowerCallback (std::string path, double oldPower, double newPower, Mac48Address dest);
161 void RateCallback (std::string path, DataRate oldRate, DataRate newRate, Mac48Address dest);
168 void SetPosition (Ptr<Node> node, Vector position);
175 void AdvancePosition (Ptr<Node> node, int stepsSize, int stepsTime);
182 Vector GetPosition (Ptr<Node> node);
183
196
197
198private:
200 typedef std::vector<std::pair<Time, DataRate> > TxTime;
214
215 std::map<Mac48Address, double> m_currentPower;
216 std::map<Mac48Address, DataRate> m_currentRate;
219 double m_totalTime;
223};
224
226{
227 Ptr<NetDevice> device = aps.Get (0);
228 Ptr<WifiNetDevice> wifiDevice = DynamicCast<WifiNetDevice> (device);
229 Ptr<WifiPhy> phy = wifiDevice->GetPhy ();
230 SetupPhy (phy);
231 DataRate dataRate = DataRate (phy->GetDefaultMode ().GetDataRate (phy->GetChannelWidth ()));
232 double power = phy->GetTxPowerEnd ();
233 for (uint32_t j = 0; j < stas.GetN (); j++)
234 {
235 Ptr<NetDevice> staDevice = stas.Get (j);
236 Ptr<WifiNetDevice> wifiStaDevice = DynamicCast<WifiNetDevice> (staDevice);
237 Mac48Address addr = wifiStaDevice->GetMac ()->GetAddress ();
238 m_currentPower[addr] = power;
239 m_currentRate[addr] = dataRate;
240 }
241 m_currentRate[Mac48Address ("ff:ff:ff:ff:ff:ff")] = dataRate;
242 m_totalEnergy = 0;
243 m_totalTime = 0;
244 m_bytesTotal = 0;
245 m_output.SetTitle ("Throughput Mbits/s");
246 m_output_power.SetTitle ("Average Transmit Power");
247}
248
249void
251{
252 for (const auto & mode : phy->GetModeList ())
253 {
254 WifiTxVector txVector;
255 txVector.SetMode (mode);
257 txVector.SetChannelWidth (phy->GetChannelWidth ());
258 DataRate dataRate = DataRate (mode.GetDataRate (phy->GetChannelWidth ()));
259 Time time = phy->CalculateTxDuration (packetSize, txVector, phy->GetPhyBand ());
260 NS_LOG_DEBUG (mode.GetUniqueName () << " " << time.GetSeconds () << " " << dataRate);
261 m_timeTable.push_back (std::make_pair (time, dataRate));
262 }
263}
264
265Time
267{
268 for (TxTime::const_iterator i = m_timeTable.begin (); i != m_timeTable.end (); i++)
269 {
270 if (rate == i->second)
271 {
272 return i->first;
273 }
274 }
275 NS_ASSERT (false);
276 return Seconds (0);
277}
278
279void
280NodeStatistics::PhyCallback (std::string path, Ptr<const Packet> packet, double powerW)
281{
282 WifiMacHeader head;
283 packet->PeekHeader (head);
284 Mac48Address dest = head.GetAddr1 ();
285
286 if (head.GetType () == WIFI_MAC_DATA)
287 {
288 m_totalEnergy += pow (10.0, m_currentPower[dest] / 10.0) * GetCalcTxTime (m_currentRate[dest]).GetSeconds ();
290 }
291}
292
293void
294NodeStatistics::PowerCallback (std::string path, double oldPower, double newPower, Mac48Address dest)
295{
296 m_currentPower[dest] = newPower;
297}
298
299void
301{
302 m_currentRate[dest] = newRate;
303}
304
305void
307{
308 m_bytesTotal += packet->GetSize ();
309}
310
311void
313{
315 mobility->SetPosition (position);
316}
317
318Vector
320{
322 return mobility->GetPosition ();
323}
324
325void
326NodeStatistics::AdvancePosition (Ptr<Node> node, int stepsSize, int stepsTime)
327{
328 Vector pos = GetPosition (node);
329 double mbs = ((m_bytesTotal * 8.0) / (1000000 * stepsTime));
330 m_bytesTotal = 0;
331 double atp = m_totalEnergy / stepsTime;
332 m_totalEnergy = 0;
333 m_totalTime = 0;
334 m_output_power.Add (pos.x, atp);
335 m_output.Add (pos.x, mbs);
336 pos.x += stepsSize;
337 SetPosition (node, pos);
338 NS_LOG_INFO ("At time " << Simulator::Now ().GetSeconds () << " sec; setting new position to " << pos);
339 Simulator::Schedule (Seconds (stepsTime), &NodeStatistics::AdvancePosition, this, node, stepsSize, stepsTime);
340}
341
344{
345 return m_output;
346}
347
350{
351 return m_output_power;
352}
353
354void PowerCallback (std::string path, double oldPower, double newPower, Mac48Address dest)
355{
356 NS_LOG_INFO ((Simulator::Now ()).GetSeconds () << " " << dest << " Old power=" << oldPower << " New power=" << newPower);
357}
358
359void RateCallback (std::string path, DataRate oldRate, DataRate newRate, Mac48Address dest)
360{
361 NS_LOG_INFO ((Simulator::Now ()).GetSeconds () << " " << dest << " Old rate=" << oldRate << " New rate=" << newRate);
362}
363
364int main (int argc, char *argv[])
365{
366 double maxPower = 17;
367 double minPower = 0;
368 uint32_t powerLevels = 18;
369
370 uint32_t rtsThreshold = 2346;
371 std::string manager = "ns3::ParfWifiManager";
372 std::string outputFileName = "parf";
373 int ap1_x = 0;
374 int ap1_y = 0;
375 int sta1_x = 5;
376 int sta1_y = 0;
377 uint32_t steps = 200;
378 uint32_t stepsSize = 1;
379 uint32_t stepsTime = 1;
380
381 CommandLine cmd (__FILE__);
382 cmd.AddValue ("manager", "PRC Manager", manager);
383 cmd.AddValue ("rtsThreshold", "RTS threshold", rtsThreshold);
384 cmd.AddValue ("outputFileName", "Output filename", outputFileName);
385 cmd.AddValue ("steps", "How many different distances to try", steps);
386 cmd.AddValue ("stepsTime", "Time on each step", stepsTime);
387 cmd.AddValue ("stepsSize", "Distance between steps", stepsSize);
388 cmd.AddValue ("maxPower", "Maximum available transmission level (dbm).", maxPower);
389 cmd.AddValue ("minPower", "Minimum available transmission level (dbm).", minPower);
390 cmd.AddValue ("powerLevels", "Number of transmission power levels available between "
391 "TxPowerStart and TxPowerEnd included.", powerLevels);
392 cmd.AddValue ("AP1_x", "Position of AP1 in x coordinate", ap1_x);
393 cmd.AddValue ("AP1_y", "Position of AP1 in y coordinate", ap1_y);
394 cmd.AddValue ("STA1_x", "Position of STA1 in x coordinate", sta1_x);
395 cmd.AddValue ("STA1_y", "Position of STA1 in y coordinate", sta1_y);
396 cmd.Parse (argc, argv);
397
398 if (steps == 0)
399 {
400 std::cout << "Exiting without running simulation; steps value of 0" << std::endl;
401 }
402
403 uint32_t simuTime = (steps + 1) * stepsTime;
404
405 //Define the APs
406 NodeContainer wifiApNodes;
407 wifiApNodes.Create (1);
408
409 //Define the STAs
411 wifiStaNodes.Create (1);
412
414 wifi.SetStandard (WIFI_STANDARD_80211a);
415 WifiMacHelper wifiMac;
416 YansWifiPhyHelper wifiPhy;
417 YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
418
419 wifiPhy.SetChannel (wifiChannel.Create ());
420
421 NetDeviceContainer wifiApDevices;
422 NetDeviceContainer wifiStaDevices;
423 NetDeviceContainer wifiDevices;
424
425 //Configure the STA node
426 wifi.SetRemoteStationManager ("ns3::MinstrelWifiManager", "RtsCtsThreshold", UintegerValue (rtsThreshold));
427 wifiPhy.Set ("TxPowerStart", DoubleValue (maxPower));
428 wifiPhy.Set ("TxPowerEnd", DoubleValue (maxPower));
429
430 Ssid ssid = Ssid ("AP");
431 wifiMac.SetType ("ns3::StaWifiMac",
432 "Ssid", SsidValue (ssid));
433 wifiStaDevices.Add (wifi.Install (wifiPhy, wifiMac, wifiStaNodes.Get (0)));
434
435 //Configure the AP node
436 wifi.SetRemoteStationManager (manager, "DefaultTxPowerLevel", UintegerValue (powerLevels - 1), "RtsCtsThreshold", UintegerValue (rtsThreshold));
437 wifiPhy.Set ("TxPowerStart", DoubleValue (minPower));
438 wifiPhy.Set ("TxPowerEnd", DoubleValue (maxPower));
439 wifiPhy.Set ("TxPowerLevels", UintegerValue (powerLevels));
440
441 ssid = Ssid ("AP");
442 wifiMac.SetType ("ns3::ApWifiMac",
443 "Ssid", SsidValue (ssid));
444 wifiApDevices.Add (wifi.Install (wifiPhy, wifiMac, wifiApNodes.Get (0)));
445
446 wifiDevices.Add (wifiStaDevices);
447 wifiDevices.Add (wifiApDevices);
448
449 //Configure the mobility.
451 Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator> ();
452 //Initial position of AP and STA
453 positionAlloc->Add (Vector (ap1_x, ap1_y, 0.0));
454 NS_LOG_INFO ("Setting initial AP position to " << Vector (ap1_x, ap1_y, 0.0));
455 positionAlloc->Add (Vector (sta1_x, sta1_y, 0.0));
456 NS_LOG_INFO ("Setting initial STA position to " << Vector (sta1_x, sta1_y, 0.0));
457 mobility.SetPositionAllocator (positionAlloc);
458 mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
459 mobility.Install (wifiApNodes.Get (0));
460 mobility.Install (wifiStaNodes.Get (0));
461
462 //Statistics counter
463 NodeStatistics statistics = NodeStatistics (wifiApDevices, wifiStaDevices);
464
465 //Move the STA by stepsSize meters every stepsTime seconds
466 Simulator::Schedule (Seconds (0.5 + stepsTime), &NodeStatistics::AdvancePosition, &statistics, wifiStaNodes.Get (0), stepsSize, stepsTime);
467
468 //Configure the IP stack
470 stack.Install (wifiApNodes);
471 stack.Install (wifiStaNodes);
473 address.SetBase ("10.1.1.0", "255.255.255.0");
474 Ipv4InterfaceContainer i = address.Assign (wifiDevices);
475 Ipv4Address sinkAddress = i.GetAddress (0);
476 uint16_t port = 9;
477
478 //Configure the CBR generator
479 PacketSinkHelper sink ("ns3::UdpSocketFactory", InetSocketAddress (sinkAddress, port));
480 ApplicationContainer apps_sink = sink.Install (wifiStaNodes.Get (0));
481
482 OnOffHelper onoff ("ns3::UdpSocketFactory", InetSocketAddress (sinkAddress, port));
483 onoff.SetConstantRate (DataRate ("54Mb/s"), packetSize);
484 onoff.SetAttribute ("StartTime", TimeValue (Seconds (0.5)));
485 onoff.SetAttribute ("StopTime", TimeValue (Seconds (simuTime)));
486 ApplicationContainer apps_source = onoff.Install (wifiApNodes.Get (0));
487
488 apps_sink.Start (Seconds (0.5));
489 apps_sink.Stop (Seconds (simuTime));
490
491 //------------------------------------------------------------
492 //-- Setup stats and data collection
493 //--------------------------------------------
494
495 //Register packet receptions to calculate throughput
496 Config::Connect ("/NodeList/1/ApplicationList/*/$ns3::PacketSink/Rx",
498
499 //Register power and rate changes to calculate the Average Transmit Power
500 Config::Connect ("/NodeList/0/DeviceList/*/$ns3::WifiNetDevice/RemoteStationManager/$" + manager + "/PowerChange",
502 Config::Connect ("/NodeList/0/DeviceList/*/$ns3::WifiNetDevice/RemoteStationManager/$" + manager + "/RateChange",
504
505 Config::Connect ("/NodeList/0/DeviceList/*/$ns3::WifiNetDevice/Phy/PhyTxBegin",
507
508 //Callbacks to print every change of power and rate
509 Config::Connect ("/NodeList/0/DeviceList/*/$ns3::WifiNetDevice/RemoteStationManager/$" + manager + "/PowerChange",
511 Config::Connect ("/NodeList/0/DeviceList/*/$ns3::WifiNetDevice/RemoteStationManager/$" + manager + "/RateChange",
513
514 Simulator::Stop (Seconds (simuTime));
516
517 std::ofstream outfile (("throughput-" + outputFileName + ".plt").c_str ());
518 Gnuplot gnuplot = Gnuplot (("throughput-" + outputFileName + ".eps").c_str (), "Throughput");
519 gnuplot.SetTerminal ("post eps color enhanced");
520 gnuplot.SetLegend ("Time (seconds)", "Throughput (Mb/s)");
521 gnuplot.SetTitle ("Throughput (AP to STA) vs time");
522 gnuplot.AddDataset (statistics.GetDatafile ());
523 gnuplot.GenerateOutput (outfile);
524
525 if (manager.compare ("ns3::ParfWifiManager") == 0
526 || manager.compare ("ns3::AparfWifiManager") == 0
527 || manager.compare ("ns3::RrpaaWifiManager") == 0)
528 {
529 std::ofstream outfile2 (("power-" + outputFileName + ".plt").c_str ());
530 gnuplot = Gnuplot (("power-" + outputFileName + ".eps").c_str (), "Average Transmit Power");
531 gnuplot.SetTerminal ("post eps color enhanced");
532 gnuplot.SetLegend ("Time (seconds)", "Power (mW)");
533 gnuplot.SetTitle ("Average transmit power (AP to STA) vs time");
534 gnuplot.AddDataset (statistics.GetPowerDatafile ());
535 gnuplot.GenerateOutput (outfile2);
536 }
537
538 Simulator::Destroy ();
539
540 return 0;
541}
void Run(ObjectFactory &factory, uint32_t pop, uint32_t total, uint32_t runs, Ptr< RandomVariableStream > eventStream, bool calRev)
Perform the runs for a single scheduler type.
Class to collect node statistics.
void SetPosition(Ptr< Node > node, Vector position)
Set the Position of a node.
Gnuplot2dDataset m_output_power
Power output data.
Gnuplot2dDataset GetPowerDatafile()
Get the Power output data.
TxTime m_timeTable
Time, DataRate table.
void RateCallback(std::string path, DataRate oldRate, DataRate newRate, Mac48Address dest)
Callback called by WifiNetDevice/RemoteStationManager/x/RateChange.
Gnuplot2dDataset GetDatafile()
Get the Throughput output data.
void RxCallback(std::string path, Ptr< const Packet > packet, const Address &from)
Callback called by PacketSink/Rx.
NodeStatistics(NetDeviceContainer aps, NetDeviceContainer stas)
Constructor.
Time GetCalcTxTime(DataRate rate)
Get the time at which a given datarate has been recorded.
void PowerCallback(std::string path, double oldPower, double newPower, Mac48Address dest)
Callback called by WifiNetDevice/RemoteStationManager/x/PowerChange.
double m_totalTime
Time spent on a given state.
uint32_t m_bytesTotal
Number of received bytes on a given state.
void SetupPhy(Ptr< WifiPhy > phy)
Setup the WifiPhy object.
std::vector< std::pair< Time, DataRate > > TxTime
Time, DataRate pair vector.
Vector GetPosition(Ptr< Node > node)
Get the Position of a node.
std::map< Mac48Address, double > m_currentPower
Current Tx power for each sender.
double m_totalEnergy
Energy used on a given state.
Gnuplot2dDataset m_output
Throughput output data.
std::map< Mac48Address, DataRate > m_currentRate
Current Tx rate for each sender.
void AdvancePosition(Ptr< Node > node, int stepsSize, int stepsTime)
Move a node.
void PhyCallback(std::string path, Ptr< const Packet > packet, double powerW)
Callback called by WifiNetDevice/Phy/PhyTxBegin.
a polymophic address class
Definition: address.h:91
holds a vector of ns3::Application pointers.
void Start(Time start)
Arrange for all of the Applications in this container to Start() at the Time given as a parameter.
void Stop(Time stop)
Arrange for all of the Applications in this container to Stop() at the Time given as a parameter.
Parse command-line arguments.
Definition: command-line.h:229
Class for representing data rates.
Definition: data-rate.h:89
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Definition: double.h:41
Class to represent a 2D points plot.
Definition: gnuplot.h:118
void Add(double x, double y)
Definition: gnuplot.cc:361
void SetTitle(const std::string &title)
Change line title.
Definition: gnuplot.cc:141
a simple class to generate gnuplot-ready plotting commands from a set of datasets.
Definition: gnuplot.h:372
void AddDataset(const GnuplotDataset &dataset)
Definition: gnuplot.cc:758
void SetLegend(const std::string &xLegend, const std::string &yLegend)
Definition: gnuplot.cc:738
void SetTerminal(const std::string &terminal)
Definition: gnuplot.cc:726
void GenerateOutput(std::ostream &os)
Writes gnuplot commands and data values to a single output stream.
Definition: gnuplot.cc:764
void SetTitle(const std::string &title)
Definition: gnuplot.cc:732
an Inet address class
aggregate IP/TCP/UDP functionality to existing Nodes.
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:41
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const
an EUI-48 address
Definition: mac48-address.h:44
Helper class used to assign positions and mobility models to nodes.
Keep track of the current position and velocity of an object.
holds a vector of ns3::NetDevice pointers
uint32_t GetN(void) const
Get the number of Ptr<NetDevice> stored in this container.
void Add(NetDeviceContainer other)
Append the contents of another NetDeviceContainer to the end of this container.
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
keep track of a set of node pointers.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
Definition: object.h:470
A helper to make it easier to instantiate an ns3::OnOffApplication on a set of nodes.
Definition: on-off-helper.h:43
uint32_t PeekHeader(Header &header) const
Deserialize but does not remove the header from the internal buffer.
Definition: packet.cc:290
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
Definition: packet.h:856
A helper to make it easier to instantiate an ns3::PacketSinkApplication on a set of nodes.
The IEEE 802.11 SSID Information Element.
Definition: ssid.h:36
AttributeValue implementation for Ssid.
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:104
double GetSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
Definition: nstime.h:380
AttributeValue implementation for Time.
Definition: nstime.h:1309
Hold an unsigned integer type.
Definition: uinteger.h:44
Vector3D Vector
Vector alias typedef for compatibility with mobility models.
Definition: vector.h:324
helps to create WifiNetDevice objects
Definition: wifi-helper.h:322
Implements the IEEE 802.11 MAC header.
Mac48Address GetAddr1(void) const
Return the address in the Address 1 field.
WifiMacType GetType(void) const
Return the type (enum WifiMacType)
create MAC layers for a ns3::WifiNetDevice.
void SetType(std::string type, Args &&... args)
Ptr< WifiMac > GetMac(void) const
Ptr< WifiPhy > GetPhy(void) const
void Set(std::string name, const AttributeValue &v)
Definition: wifi-helper.cc:161
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
void SetChannelWidth(uint16_t channelWidth)
Sets the selected channelWidth (in MHz)
void SetMode(WifiMode mode)
Sets the selected payload transmission mode.
void SetPreambleType(WifiPreamble preamble)
Sets the preamble type.
manage and create wifi channel objects for the YANS model.
Ptr< YansWifiChannel > Create(void) const
Make it easy to create and manage PHY objects for the YANS model.
void SetChannel(Ptr< YansWifiChannel > channel)
uint16_t port
Definition: dsdv-manet.cc:45
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Definition: assert.h:67
void Connect(std::string path, const CallbackBase &cb)
Definition: config.cc:920
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:205
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:273
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Definition: log.h:281
void(* DataRate)(DataRate oldValue, DataRate newValue)
TracedValue callback signature for DataRate.
Definition: data-rate.h:329
Time Now(void)
create an ns3::Time instance which contains the current simulation time.
Definition: simulator.cc:287
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1245
@ WIFI_STANDARD_80211a
@ WIFI_PREAMBLE_LONG
address
Definition: first.py:40
stack
Definition: first.py:37
Every class exported by the ns3 library is enclosed in the ns3 namespace.
@ WIFI_MAC_DATA
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...
Definition: callback.h:1648
cmd
Definition: second.py:43
ssid
Definition: third.py:88
wifi
Definition: third.py:90
mobility
Definition: third.py:98
wifiStaNodes
Definition: third.py:79
phy
Definition: third.py:84
void RateCallback(std::string path, DataRate oldRate, DataRate newRate, Mac48Address dest)
static const uint32_t packetSize
Packet size generated at the AP.
void PowerCallback(std::string path, double oldPower, double newPower, Mac48Address dest)
Ptr< PacketSink > sink
Definition: wifi-tcp.cc:56