22 #include "ns3/command-line.h"
24 #include "ns3/config.h"
25 #include "ns3/uinteger.h"
26 #include "ns3/string.h"
27 #include "ns3/pointer.h"
28 #include "ns3/simulator.h"
31 #include "ns3/queue.h"
32 #include "ns3/drop-tail-queue.h"
33 #include "ns3/point-to-point-net-device.h"
46 main (
int argc,
char *argv[])
64 cmd.
AddValue (
"maxPackets",
"ns3::DropTailQueue::MaxPackets");
65 cmd.
Parse (argc, argv);
95 net0->GetAttribute (
"TxQueue", ptr);
110 dtq->GetAttribute (
"MaxPackets", limit);
122 NS_LOG_INFO (
"3. txQueue limit changed: " << limit.
Get () <<
" packets");
133 NS_LOG_INFO (
"4. txQueue limit changed through namespace: " <<
134 limit.
Get () <<
" packets");
141 NS_LOG_INFO (
"5. txQueue limit changed through wildcarded namespace: " <<
142 limit.
Get () <<
" packets");
Hold variables of type string.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
void Set(std::string path, const AttributeValue &value)
Abstract base class for packet Queues.
void LogComponentEnable(char const *name, enum LogLevel level)
Enable the logging output associated with that log component.
Hold an unsigned integer type.
Parse command-line arguments.
static void Destroy(void)
Execute the events scheduled with ScheduleDestroy().
void SetDefault(std::string name, const AttributeValue &value)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Hold objects of type Ptr.
void GetAttribute(std::string name, AttributeValue &value) const
Get the value of an attribute, raising fatal errors if unsuccessful.
uint32_t AddDevice(Ptr< NetDevice > device)
Associate a NetDevice to this node.
void AddValue(const std::string &name, const std::string &help, T &value)
Add a program argument, assigning to POD.
void Parse(int argc, char *argv[])
Parse the program arguments.
void SetAttribute(std::string name, const AttributeValue &value)
Set a single attribute, raising fatal errors if unsuccessful.
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
A FIFO packet queue that drops tail-end packets on overflow.