9#include "ns3/command-line.h"
10#include "ns3/config.h"
11#include "ns3/drop-tail-queue.h"
14#include "ns3/point-to-point-net-device.h"
15#include "ns3/pointer.h"
18#include "ns3/simulator.h"
19#include "ns3/string.h"
20#include "ns3/uinteger.h"
33main(
int argc,
char* argv[])
63 cmd.AddValue(
"maxSize",
"ns3::DropTailQueue<Packet>::MaxSize");
64 cmd.Parse(argc, argv);
94 net0->GetAttribute(
"TxQueue", ptr);
115 txQueue->GetAttribute(
"MaxSize", limit);
122 txQueue->SetAttribute(
"MaxSize",
StringValue(
"60p"));
123 txQueue->GetAttribute(
"MaxSize", limit);
134 txQueue->GetAttribute(
"MaxSize", limit);
135 NS_LOG_INFO(
"4. txQueue limit changed through namespace: " << limit.
Get());
141 txQueue->GetAttribute(
"MaxSize", limit);
142 NS_LOG_INFO(
"5. txQueue limit changed through wildcarded namespace: " << limit.
Get());
Parse command-line arguments.
A FIFO packet queue that drops tail-end packets on overflow.
void GetAttribute(std::string name, AttributeValue &value, bool permissive=false) const
Get the value of an attribute, raising fatal errors if unsuccessful.
AttributeValue implementation for Pointer.
Smart pointer class similar to boost::intrusive_ptr.
Template class for packet Queues.
Class for representing queue sizes.
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
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,...
void SetDefault(std::string name, const AttributeValue &value)
void Set(std::string path, const AttributeValue &value)
#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.
Ptr< T > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void LogComponentEnable(const std::string &name, LogLevel level)
Enable the logging output associated with that log component.
@ LOG_LEVEL_INFO
LOG_INFO and above.