A Discrete-Event Network Simulator
API
queue-discs-benchmark.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2015 Universita' degli Studi di Napoli Federico II
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  * Authors: Pasquale Imputato <p.imputato@gmail.com>
19  * Stefano Avallone <stefano.avallone@unina.it>
20  */
21 
22 // This example serves as a benchmark for all the queue discs (with BQL enabled or not)
23 //
24 // Network topology
25 //
26 // 192.168.1.0 192.168.2.0
27 // n1 ------------------------------------ n2 ----------------------------------- n3
28 // point-to-point (access link) point-to-point (bottleneck link)
29 // 100 Mbps, 0.1 ms bandwidth [10 Mbps], delay [5 ms]
30 // qdiscs PfifoFast with capacity qdiscs queueDiscType in {PfifoFast, ARED, CoDel, FqCoDel, PIE} [PfifoFast]
31 // of 1000 packets with capacity of queueDiscSize packets [1000]
32 // netdevices queues with size of 100 packets netdevices queues with size of netdevicesQueueSize packets [100]
33 // without BQL bql BQL [false]
34 // *** fixed configuration ***
35 //
36 // Two TCP flows are generated: one from n1 to n3 and the other from n3 to n1.
37 // Additionally, n1 pings n3, so that the RTT can be measured.
38 //
39 // The output will consist of a number of ping Rtt such as:
40 //
41 // /NodeList/0/ApplicationList/2/$ns3::V4Ping/Rtt=111 ms
42 // /NodeList/0/ApplicationList/2/$ns3::V4Ping/Rtt=111 ms
43 // /NodeList/0/ApplicationList/2/$ns3::V4Ping/Rtt=110 ms
44 // /NodeList/0/ApplicationList/2/$ns3::V4Ping/Rtt=111 ms
45 // /NodeList/0/ApplicationList/2/$ns3::V4Ping/Rtt=111 ms
46 // /NodeList/0/ApplicationList/2/$ns3::V4Ping/Rtt=112 ms
47 // /NodeList/0/ApplicationList/2/$ns3::V4Ping/Rtt=111 ms
48 //
49 // The files output will consist of a trace file with bytes in queue and of a trace file for limits
50 // (when BQL is enabled) both for bottleneck NetDevice on n2, two files with upload and download
51 // goodput for flows configuration and a file with flow monitor stats.
52 //
53 // If you use an AQM as queue disc on the bottleneck netdevices, you can observe that the ping Rtt
54 // decrease. A further decrease can be observed when you enable BQL.
55 
56 #include "ns3/core-module.h"
57 #include "ns3/network-module.h"
58 #include "ns3/internet-module.h"
59 #include "ns3/point-to-point-module.h"
60 #include "ns3/applications-module.h"
61 #include "ns3/internet-apps-module.h"
62 #include "ns3/traffic-control-module.h"
63 #include "ns3/flow-monitor-module.h"
64 
65 using namespace ns3;
66 
67 NS_LOG_COMPONENT_DEFINE ("BenchmarkQueueDiscs");
68 
69 void
70 LimitsTrace (Ptr<OutputStreamWrapper> stream, uint32_t oldVal, uint32_t newVal)
71 {
72  *stream->GetStream () << Simulator::Now ().GetSeconds () << " " << newVal << std::endl;
73 }
74 
75 void
76 BytesInQueueTrace (Ptr<OutputStreamWrapper> stream, uint32_t oldVal, uint32_t newVal)
77 {
78  *stream->GetStream () << Simulator::Now ().GetSeconds () << " " << newVal << std::endl;
79 }
80 
81 static void
82 GoodputSampling (std::string fileName, ApplicationContainer app, Ptr<OutputStreamWrapper> stream, float period)
83 {
84  Simulator::Schedule (Seconds (period), &GoodputSampling, fileName, app, stream, period);
85  double goodput;
86  uint64_t totalPackets = DynamicCast<PacketSink> (app.Get (0))->GetTotalRx ();
87  goodput = totalPackets * 8 / (Simulator::Now ().GetSeconds () * 1024); // Kbit/s
88  *stream->GetStream () << Simulator::Now ().GetSeconds () << " " << goodput << std::endl;
89 }
90 
91 static void PingRtt (std::string context, Time rtt)
92 {
93  std::cout << context << "=" << rtt.GetMilliSeconds () << " ms" << std::endl;
94 }
95 
96 int main (int argc, char *argv[])
97 {
98  std::string bandwidth = "10Mbps";
99  std::string delay = "5ms";
100  std::string queueDiscType = "PfifoFast";
101  uint32_t queueDiscSize = 1000;
102  uint32_t netdevicesQueueSize = 50;
103  bool bql = false;
104 
105  std::string flowsDatarate = "20Mbps";
106  uint32_t flowsPacketsSize = 1000;
107 
108  float startTime = 0.1f; // in s
109  float simDuration = 60;
110  float samplingPeriod = 1;
111 
113  cmd.AddValue ("bandwidth", "Bottleneck bandwidth", bandwidth);
114  cmd.AddValue ("delay", "Bottleneck delay", delay);
115  cmd.AddValue ("queueDiscType", "Bottleneck queue disc type in {PfifoFast, ARED, CoDel, FqCoDel, PIE, prio}", queueDiscType);
116  cmd.AddValue ("queueDiscSize", "Bottleneck queue disc size in packets", queueDiscSize);
117  cmd.AddValue ("netdevicesQueueSize", "Bottleneck netdevices queue size in packets", netdevicesQueueSize);
118  cmd.AddValue ("bql", "Enable byte queue limits on bottleneck netdevices", bql);
119  cmd.AddValue ("flowsDatarate", "Upload and download flows datarate", flowsDatarate);
120  cmd.AddValue ("flowsPacketsSize", "Upload and download flows packets sizes", flowsPacketsSize);
121  cmd.AddValue ("startTime", "Simulation start time", startTime);
122  cmd.AddValue ("simDuration", "Simulation duration in seconds", simDuration);
123  cmd.AddValue ("samplingPeriod", "Goodput sampling period in seconds", samplingPeriod);
124  cmd.Parse (argc, argv);
125 
126  float stopTime = startTime + simDuration;
127 
128  // Create nodes
129  NodeContainer n1, n2, n3;
130  n1.Create (1);
131  n2.Create (1);
132  n3.Create (1);
133 
134  // Create and configure access link and bottleneck link
135  PointToPointHelper accessLink;
136  accessLink.SetDeviceAttribute ("DataRate", StringValue ("100Mbps"));
137  accessLink.SetChannelAttribute ("Delay", StringValue ("0.1ms"));
138 
139  PointToPointHelper bottleneckLink;
140  bottleneckLink.SetDeviceAttribute ("DataRate", StringValue (bandwidth));
141  bottleneckLink.SetChannelAttribute ("Delay", StringValue (delay));
142 
144  stack.InstallAll ();
145 
146  // Access link traffic control configuration
147  TrafficControlHelper tchPfifoFastAccess;
148  tchPfifoFastAccess.SetRootQueueDisc ("ns3::PfifoFastQueueDisc", "MaxSize", StringValue ("1000p"));
149 
150  // Bottleneck link traffic control configuration
151  TrafficControlHelper tchBottleneck;
152 
153  if (queueDiscType.compare ("PfifoFast") == 0)
154  {
155  tchBottleneck.SetRootQueueDisc ("ns3::PfifoFastQueueDisc", "MaxSize",
156  QueueSizeValue (QueueSize (QueueSizeUnit::PACKETS, queueDiscSize)));
157  }
158  else if (queueDiscType.compare ("ARED") == 0)
159  {
160  tchBottleneck.SetRootQueueDisc ("ns3::RedQueueDisc");
161  Config::SetDefault ("ns3::RedQueueDisc::ARED", BooleanValue (true));
162  Config::SetDefault ("ns3::RedQueueDisc::MaxSize",
163  QueueSizeValue (QueueSize (QueueSizeUnit::PACKETS, queueDiscSize)));
164  }
165  else if (queueDiscType.compare ("CoDel") == 0)
166  {
167  tchBottleneck.SetRootQueueDisc ("ns3::CoDelQueueDisc");
168  Config::SetDefault ("ns3::CoDelQueueDisc::MaxSize",
169  QueueSizeValue (QueueSize (QueueSizeUnit::PACKETS, queueDiscSize)));
170  }
171  else if (queueDiscType.compare ("FqCoDel") == 0)
172  {
173  tchBottleneck.SetRootQueueDisc ("ns3::FqCoDelQueueDisc");
174  Config::SetDefault ("ns3::FqCoDelQueueDisc::MaxSize",
175  QueueSizeValue (QueueSize (QueueSizeUnit::PACKETS, queueDiscSize)));
176  }
177  else if (queueDiscType.compare ("PIE") == 0)
178  {
179  tchBottleneck.SetRootQueueDisc ("ns3::PieQueueDisc");
180  Config::SetDefault ("ns3::PieQueueDisc::MaxSize",
181  QueueSizeValue (QueueSize (QueueSizeUnit::PACKETS, queueDiscSize)));
182  }
183  else if (queueDiscType.compare ("prio") == 0)
184  {
185  uint16_t handle = tchBottleneck.SetRootQueueDisc ("ns3::PrioQueueDisc", "Priomap",
186  StringValue ("0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1"));
187  TrafficControlHelper::ClassIdList cid = tchBottleneck.AddQueueDiscClasses (handle, 2, "ns3::QueueDiscClass");
188  tchBottleneck.AddChildQueueDisc (handle, cid[0], "ns3::FifoQueueDisc");
189  tchBottleneck.AddChildQueueDisc (handle, cid[1], "ns3::RedQueueDisc");
190  }
191  else
192  {
193  NS_ABORT_MSG ("--queueDiscType not valid");
194  }
195 
196  if (bql)
197  {
198  tchBottleneck.SetQueueLimits ("ns3::DynamicQueueLimits");
199  }
200 
201  Config::SetDefault ("ns3::QueueBase::MaxSize", StringValue ("100p"));
202 
203  NetDeviceContainer devicesAccessLink = accessLink.Install (n1.Get (0), n2.Get (0));
204  tchPfifoFastAccess.Install (devicesAccessLink);
206  address.SetBase ("192.168.0.0", "255.255.255.0");
207  address.NewNetwork ();
208  Ipv4InterfaceContainer interfacesAccess = address.Assign (devicesAccessLink);
209 
210  Config::SetDefault ("ns3::QueueBase::MaxSize", StringValue (std::to_string (netdevicesQueueSize) + "p"));
211 
212  NetDeviceContainer devicesBottleneckLink = bottleneckLink.Install (n2.Get (0), n3.Get (0));
213  QueueDiscContainer qdiscs;
214  qdiscs = tchBottleneck.Install (devicesBottleneckLink);
215 
216  address.NewNetwork ();
217  Ipv4InterfaceContainer interfacesBottleneck = address.Assign (devicesBottleneckLink);
218 
219  Ptr<NetDeviceQueueInterface> interface = devicesBottleneckLink.Get (0)->GetObject<NetDeviceQueueInterface> ();
220  Ptr<NetDeviceQueue> queueInterface = interface->GetTxQueue (0);
221  Ptr<DynamicQueueLimits> queueLimits = StaticCast<DynamicQueueLimits> (queueInterface->GetQueueLimits ());
222 
223  AsciiTraceHelper ascii;
224  if (bql)
225  {
226  queueDiscType = queueDiscType + "-bql";
227  Ptr<OutputStreamWrapper> streamLimits = ascii.CreateFileStream (queueDiscType + "-limits.txt");
228  queueLimits->TraceConnectWithoutContext ("Limit",MakeBoundCallback (&LimitsTrace, streamLimits));
229  }
230  Ptr<Queue<Packet> > queue = StaticCast<PointToPointNetDevice> (devicesBottleneckLink.Get (0))->GetQueue ();
231  Ptr<OutputStreamWrapper> streamBytesInQueue = ascii.CreateFileStream (queueDiscType + "-bytesInQueue.txt");
232  queue->TraceConnectWithoutContext ("BytesInQueue",MakeBoundCallback (&BytesInQueueTrace, streamBytesInQueue));
233 
234  Ipv4InterfaceContainer n1Interface;
235  n1Interface.Add (interfacesAccess.Get (0));
236 
237  Ipv4InterfaceContainer n3Interface;
238  n3Interface.Add (interfacesBottleneck.Get (1));
239 
241 
242  Config::SetDefault ("ns3::TcpSocket::SegmentSize", UintegerValue (flowsPacketsSize));
243 
244  // Flows configuration
245  // Bidirectional TCP streams with ping like flent tcp_bidirectional test.
246  uint16_t port = 7;
247  ApplicationContainer uploadApp, downloadApp, sourceApps;
248  // Configure and install upload flow
250  PacketSinkHelper sinkHelperUp ("ns3::TcpSocketFactory", addUp);
251  sinkHelperUp.SetAttribute ("Protocol", TypeIdValue (TcpSocketFactory::GetTypeId ()));
252  uploadApp.Add (sinkHelperUp.Install (n3));
253 
254  InetSocketAddress socketAddressUp = InetSocketAddress (n3Interface.GetAddress (0), port);
255  OnOffHelper onOffHelperUp ("ns3::TcpSocketFactory", Address ());
256  onOffHelperUp.SetAttribute ("Remote", AddressValue (socketAddressUp));
257  onOffHelperUp.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
258  onOffHelperUp.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
259  onOffHelperUp.SetAttribute ("PacketSize", UintegerValue (flowsPacketsSize));
260  onOffHelperUp.SetAttribute ("DataRate", StringValue (flowsDatarate));
261  sourceApps.Add (onOffHelperUp.Install (n1));
262 
263  port = 8;
264  // Configure and install download flow
266  PacketSinkHelper sinkHelperDown ("ns3::TcpSocketFactory", addDown);
267  sinkHelperDown.SetAttribute ("Protocol", TypeIdValue (TcpSocketFactory::GetTypeId ()));
268  downloadApp.Add (sinkHelperDown.Install (n1));
269 
270  InetSocketAddress socketAddressDown = InetSocketAddress (n1Interface.GetAddress (0), port);
271  OnOffHelper onOffHelperDown ("ns3::TcpSocketFactory", Address ());
272  onOffHelperDown.SetAttribute ("Remote", AddressValue (socketAddressDown));
273  onOffHelperDown.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
274  onOffHelperDown.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
275  onOffHelperDown.SetAttribute ("PacketSize", UintegerValue (flowsPacketsSize));
276  onOffHelperDown.SetAttribute ("DataRate", StringValue (flowsDatarate));
277  sourceApps.Add (onOffHelperDown.Install (n3));
278 
279  // Configure and install ping
280  V4PingHelper ping = V4PingHelper (n3Interface.GetAddress (0));
281  ping.Install (n1);
282 
283  Config::Connect ("/NodeList/*/ApplicationList/*/$ns3::V4Ping/Rtt", MakeCallback (&PingRtt));
284 
285  uploadApp.Start (Seconds (0));
286  uploadApp.Stop (Seconds (stopTime));
287  downloadApp.Start (Seconds (0));
288  downloadApp.Stop (Seconds (stopTime));
289 
290  sourceApps.Start (Seconds (0 + 0.1));
291  sourceApps.Stop (Seconds (stopTime - 0.1));
292 
293  Ptr<OutputStreamWrapper> uploadGoodputStream = ascii.CreateFileStream (queueDiscType + "-upGoodput.txt");
294  Simulator::Schedule (Seconds (samplingPeriod), &GoodputSampling, queueDiscType + "-upGoodput.txt", uploadApp,
295  uploadGoodputStream, samplingPeriod);
296  Ptr<OutputStreamWrapper> downloadGoodputStream = ascii.CreateFileStream (queueDiscType + "-downGoodput.txt");
297  Simulator::Schedule (Seconds (samplingPeriod), &GoodputSampling, queueDiscType + "-downGoodput.txt", downloadApp,
298  downloadGoodputStream, samplingPeriod);
299 
300  // Flow monitor
301  Ptr<FlowMonitor> flowMonitor;
302  FlowMonitorHelper flowHelper;
303  flowMonitor = flowHelper.InstallAll();
304 
306  Simulator::Run ();
307 
308  flowMonitor->SerializeToXmlFile(queueDiscType + "-flowMonitor.xml", true, true);
309 
311  return 0;
312 }
holds a vector of ns3::Application pointers.
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:102
Manage ASCII trace files for device models.
Definition: trace-helper.h:161
an Inet address class
static Ipv4Address GetAny(void)
AttributeValue implementation for Boolean.
Definition: boolean.h:36
QueueDiscContainer Install(NetDeviceContainer c)
void BytesInQueueTrace(Ptr< OutputStreamWrapper > stream, uint32_t oldVal, uint32_t newVal)
Class for representing queue sizes.
Definition: queue-size.h:94
#define NS_ABORT_MSG(msg)
Unconditional abnormal program termination with a message.
Definition: abort.h:50
holds a vector of std::pair of Ptr<Ipv4> and interface index.
static void PopulateRoutingTables(void)
Build a routing database and initialize the routing tables of the nodes in the simulation.
Hold variables of type string.
Definition: string.h:41
NetDeviceContainer Install(NodeContainer c)
void Add(ApplicationContainer other)
Append the contents of another ApplicationContainer to the end of this container. ...
void Add(const Ipv4InterfaceContainer &other)
Concatenate the entries in the other container with ours.
Callback< R > MakeBoundCallback(R(*fnPtr)(TX), ARG a1)
Make Callbacks with one bound argument.
Definition: callback.h:1686
double GetSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
Definition: nstime.h:355
static void Run(void)
Run the simulation.
Definition: simulator.cc:170
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:204
aggregate IP/TCP/UDP functionality to existing Nodes.
A helper to make it easier to instantiate an ns3::PacketSinkApplication on a set of nodes...
cmd
Definition: second.py:35
Build a set of PointToPointNetDevice objects.
void SetDeviceAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each NetDevice created by the helper.
ClassIdList AddQueueDiscClasses(uint16_t handle, uint16_t count, std::string type, std::string n01="", const AttributeValue &v01=EmptyAttributeValue(), std::string n02="", const AttributeValue &v02=EmptyAttributeValue(), std::string n03="", const AttributeValue &v03=EmptyAttributeValue(), std::string n04="", const AttributeValue &v04=EmptyAttributeValue(), std::string n05="", const AttributeValue &v05=EmptyAttributeValue(), std::string n06="", const AttributeValue &v06=EmptyAttributeValue(), std::string n07="", const AttributeValue &v07=EmptyAttributeValue(), std::string n08="", const AttributeValue &v08=EmptyAttributeValue())
Helper function used to add the given number of queue disc classes (of the given type and with the gi...
A helper to make it easier to instantiate an ns3::OnOffApplication on a set of nodes.
Definition: on-off-helper.h:42
stack
Definition: first.py:34
double stopTime
uint16_t port
Definition: dsdv-manet.cc:45
a polymophic address class
Definition: address.h:90
Holds a vector of ns3::QueueDisc pointers.
ApplicationContainer Install(NodeContainer nodes) const
Install a Ping application on each Node in the provided NodeContainer.
static void GoodputSampling(std::string fileName, ApplicationContainer app, Ptr< OutputStreamWrapper > stream, float period)
static EventId Schedule(Time const &delay, MEM mem_ptr, OBJ obj)
Schedule an event to expire after delay.
Definition: simulator.h:1389
static void PingRtt(std::string context, Time rtt)
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const
Hold an unsigned integer type.
Definition: uinteger.h:44
double startTime
Use number of packets for queue size.
Definition: queue-size.h:44
holds a vector of ns3::NetDevice pointers
AttributeValue implementation for TypeId.
Definition: type-id.h:608
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
Definition: callback.h:1489
Build a set of QueueDisc objects.
void SetQueueLimits(std::string type, std::string n01="", const AttributeValue &v01=EmptyAttributeValue(), std::string n02="", const AttributeValue &v02=EmptyAttributeValue(), std::string n03="", const AttributeValue &v03=EmptyAttributeValue(), std::string n04="", const AttributeValue &v04=EmptyAttributeValue(), std::string n05="", const AttributeValue &v05=EmptyAttributeValue(), std::string n06="", const AttributeValue &v06=EmptyAttributeValue(), std::string n07="", const AttributeValue &v07=EmptyAttributeValue(), std::string n08="", const AttributeValue &v08=EmptyAttributeValue())
Helper function used to add a queue limits object to the transmission queues of the devices...
Network device transmission queue interface.
Ptr< FlowMonitor > InstallAll()
Enable flow monitoring on all nodes.
void Start(Time start)
Arrange for all of the Applications in this container to Start() at the Time given as a parameter...
Parse command-line arguments.
Definition: command-line.h:213
void Connect(std::string path, const CallbackBase &cb)
Definition: config.cc:871
static void Destroy(void)
Execute the events scheduled with ScheduleDestroy().
Definition: simulator.cc:134
static TypeId GetTypeId(void)
Get the type ID.
uint16_t AddChildQueueDisc(uint16_t handle, uint16_t classId, std::string type, std::string n01="", const AttributeValue &v01=EmptyAttributeValue(), std::string n02="", const AttributeValue &v02=EmptyAttributeValue(), std::string n03="", const AttributeValue &v03=EmptyAttributeValue(), std::string n04="", const AttributeValue &v04=EmptyAttributeValue(), std::string n05="", const AttributeValue &v05=EmptyAttributeValue(), std::string n06="", const AttributeValue &v06=EmptyAttributeValue(), std::string n07="", const AttributeValue &v07=EmptyAttributeValue(), std::string n08="", const AttributeValue &v08=EmptyAttributeValue(), std::string n09="", const AttributeValue &v09=EmptyAttributeValue(), std::string n10="", const AttributeValue &v10=EmptyAttributeValue(), std::string n11="", const AttributeValue &v11=EmptyAttributeValue(), std::string n12="", const AttributeValue &v12=EmptyAttributeValue(), std::string n13="", const AttributeValue &v13=EmptyAttributeValue(), std::string n14="", const AttributeValue &v14=EmptyAttributeValue(), std::string n15="", const AttributeValue &v15=EmptyAttributeValue())
Helper function used to attach a child queue disc (of the given type and with the given attributes) t...
std::vector< uint16_t > ClassIdList
Container type for Class IDs.
bool TraceConnectWithoutContext(std::string name, const CallbackBase &cb)
Connect a TraceSource to a Callback without a context.
Definition: object-base.cc:293
Every class exported by the ns3 library is enclosed in the ns3 namespace.
keep track of a set of node pointers.
address
Definition: first.py:37
uint16_t SetRootQueueDisc(std::string type, std::string n01="", const AttributeValue &v01=EmptyAttributeValue(), std::string n02="", const AttributeValue &v02=EmptyAttributeValue(), std::string n03="", const AttributeValue &v03=EmptyAttributeValue(), std::string n04="", const AttributeValue &v04=EmptyAttributeValue(), std::string n05="", const AttributeValue &v05=EmptyAttributeValue(), std::string n06="", const AttributeValue &v06=EmptyAttributeValue(), std::string n07="", const AttributeValue &v07=EmptyAttributeValue(), std::string n08="", const AttributeValue &v08=EmptyAttributeValue(), std::string n09="", const AttributeValue &v09=EmptyAttributeValue(), std::string n10="", const AttributeValue &v10=EmptyAttributeValue(), std::string n11="", const AttributeValue &v11=EmptyAttributeValue(), std::string n12="", const AttributeValue &v12=EmptyAttributeValue(), std::string n13="", const AttributeValue &v13=EmptyAttributeValue(), std::string n14="", const AttributeValue &v14=EmptyAttributeValue(), std::string n15="", const AttributeValue &v15=EmptyAttributeValue())
Helper function used to set a root queue disc of the given type and with the given attributes...
Helper to enable IP flow monitoring on a set of Nodes.
static Time Now(void)
Return the current simulation virtual time.
Definition: simulator.cc:193
void LimitsTrace(Ptr< OutputStreamWrapper > stream, uint32_t oldVal, uint32_t newVal)
void SetChannelAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each Channel created by the helper.
AttributeValue implementation for Address.
Definition: address.h:278
void Stop(Time stop)
Arrange for all of the Applications in this container to Stop() at the Time given as a parameter...
static void Stop(void)
Tell the Simulator the calling event should be the last one executed.
Definition: simulator.cc:178
void SerializeToXmlFile(std::string fileName, bool enableHistograms, bool enableProbes)
Same as SerializeToXmlStream, but writes to a file instead.
int64_t GetMilliSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
Definition: nstime.h:359
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1062
void SetDefault(std::string name, const AttributeValue &value)
Definition: config.cc:810
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
std::pair< Ptr< Ipv4 >, uint32_t > Get(uint32_t i) const
Get the std::pair of an Ptr<Ipv4> and interface stored at the location specified by the index...
Create a IPv4 ping application and associate it to a node.
Definition: v4ping-helper.h:37
std::ostream * GetStream(void)
Return a pointer to an ostream previously set in the wrapper.
Ptr< Application > Get(uint32_t i) const
Get the Ptr<Application> stored in this container at a given index.