9#include "ns3/applications-module.h"
10#include "ns3/core-module.h"
11#include "ns3/internet-module.h"
12#include "ns3/network-module.h"
13#include "ns3/point-to-point-layout-module.h"
14#include "ns3/point-to-point-module.h"
15#include "ns3/traffic-control-module.h"
40 cmd.AddValue(
"nLeaf",
"Number of left and right side leaf nodes",
nLeaf);
41 cmd.AddValue(
"maxPackets",
"Max Packets allowed in the device queue",
maxPackets);
42 cmd.AddValue(
"queueDiscLimitPackets",
43 "Max Packets allowed in the queue disc",
45 cmd.AddValue(
"queueDiscType",
"Set QueueDisc type to PfifoFast or RED",
queueDiscType);
46 cmd.AddValue(
"appPktSize",
"Set OnOff App Packet Size",
pktSize);
47 cmd.AddValue(
"appDataRate",
"Set OnOff App DataRate",
appDataRate);
48 cmd.AddValue(
"modeBytes",
"Set QueueDisc mode to Packets <0> or bytes <1>",
modeBytes);
50 cmd.AddValue(
"redMinTh",
"RED queue minimum threshold",
minTh);
51 cmd.AddValue(
"redMaxTh",
"RED queue maximum threshold",
maxTh);
57 "Invalid queue disc type: Use --queueDiscType=RED or --queueDiscType=PfifoFast");
69 "ns3::RedQueueDisc::MaxSize",
72 "ns3::PfifoFastQueueDisc::MaxSize",
78 "ns3::RedQueueDisc::MaxSize",
113 stack.Install(
d.GetLeft());
114 stack.Install(
d.GetRight());
118 stack.Install(
d.GetLeft());
119 stack.Install(
d.GetRight());
158 std::cout <<
"Running the simulation" << std::endl;
168 NS_LOG_UNCOND(
"----------------------------\nQueueDisc Type:"
173 std::cout <<
"Destroying the simulation" << std::endl;
a polymophic address class
AttributeValue implementation for Address.
holds a vector of ns3::Application pointers.
void Add(ApplicationContainer other)
Append the contents of another ApplicationContainer to the end of this container.
Parse command-line arguments.
This class can be used to hold variables of floating point type such as 'double' or 'float'.
aggregate IP/TCP/UDP functionality to existing Nodes.
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
static Ipv4Address GetAny()
static void PopulateRoutingTables()
Build a routing database and initialize the routing tables of the nodes in the simulation.
A helper to make it easier to instantiate an ns3::OnOffApplication on a set of nodes.
A helper to make it easier to instantiate an ns3::PacketSinkApplication on a set of nodes.
A helper to make it easier to create a dumbbell topology with p2p links.
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.
Smart pointer class similar to boost::intrusive_ptr.
Class for representing queue sizes.
AttributeValue implementation for QueueSize.
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
static Time Now()
Return the current simulation virtual time.
static void Run()
Run the simulation.
Hold variables of type string.
Build a set of QueueDisc objects.
uint16_t SetRootQueueDisc(const std::string &type, Args &&... args)
Helper function used to set a root queue disc of the given type and with the given attributes.
Hold an unsigned integer type.
void SetDefault(std::string name, const AttributeValue &value)
#define NS_ABORT_MSG(msg)
Unconditional abnormal program termination with a message.
#define NS_LOG_UNCOND(msg)
Output the requested message unconditionally.
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Time Seconds(double value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint32_t pktSize
packet size used for the simulation (in bytes)