#include "ns3/applications-module.h"
#include "ns3/core-module.h"
#include "ns3/flow-monitor-module.h"
#include "ns3/internet-module.h"
#include "ns3/network-module.h"
#include "ns3/point-to-point-module.h"
#include "ns3/traffic-control-module.h"
#include <filesystem>
Go to the source code of this file.
Functions | |
void | CheckQueueSize (Ptr< QueueDisc > qd) |
Checks the queue size of the queue discipline. | |
static void | CwndTracer (Ptr< OutputStreamWrapper > stream, uint32_t oldval, uint32_t newval) |
Writes the cWnd to the output stream. | |
void | TraceCwnd (uint32_t nodeId, uint32_t socketId) |
Traces the congestion window of the socket. | |
static void | TraceThroughput (Ptr< FlowMonitor > monitor) |
Traces the throughput of the flow monitor. | |
Variables | |
std::string | dir |
The directory where the output files will be stored. | |
uint32_t | prev = 0 |
Previous transmitted bytes. | |
Time | prevTime |
Previous time for throughput calculation. | |
std::ofstream | queueSize |
The stream where the queue size will be stored. | |
std::ofstream | throughput |
The stream where the throughput will be stored. | |
$ ./ns3 run "tcp-ecn-example [Program Options]"
--tcpTypeId
--delAckCount
--enablePcap
--useEcn
--useAbe
--stopTime
Definition in file tcp-ecn-example.cc.
Checks the queue size of the queue discipline.
qd | The queue discipline to check. |
Definition at line 97 of file tcp-ecn-example.cc.
References CheckQueueSize(), ns3::Time::GetSeconds(), ns3::Simulator::Now(), queueSize, ns3::Simulator::Schedule(), and ns3::Seconds().
|
static |
Writes the cWnd to the output stream.
stream | The output stream to write to. |
oldval | The old congestion window value. |
newval | The new congestion window value. |
Definition at line 111 of file tcp-ecn-example.cc.
References ns3::Time::GetSeconds(), and ns3::Simulator::Now().
Traces the congestion window of the socket.
nodeId | The node ID of the socket. |
socketId | The socket ID of the socket. |
Definition at line 122 of file tcp-ecn-example.cc.
References ns3::Config::ConnectWithoutContext(), ns3::AsciiTraceHelper::CreateFileStream(), CwndTracer(), dir, and ns3::MakeBoundCallback().
|
static |
Traces the throughput of the flow monitor.
monitor | The flow monitor to trace. |
Definition at line 73 of file tcp-ecn-example.cc.
References ns3::Time::GetSeconds(), ns3::Now(), prev, prevTime, ns3::Simulator::Schedule(), ns3::Seconds(), throughput, TraceThroughput(), and ns3::Time::US.
std::string dir |
The directory where the output files will be stored.
Definition at line 61 of file tcp-ecn-example.cc.
uint32_t prev = 0 |
Previous transmitted bytes.
Definition at line 65 of file tcp-ecn-example.cc.
Time prevTime |
Previous time for throughput calculation.
Definition at line 66 of file tcp-ecn-example.cc.
std::ofstream queueSize |
The stream where the queue size will be stored.
Definition at line 63 of file tcp-ecn-example.cc.
std::ofstream throughput |
The stream where the throughput will be stored.
Definition at line 62 of file tcp-ecn-example.cc.