A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
red-tests.cc File Reference
#include "ns3/applications-module.h"
#include "ns3/core-module.h"
#include "ns3/flow-monitor-helper.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 dependency graph for red-tests.cc:

Go to the source code of this file.

Functions

void BuildAppsTest (uint32_t test)
 Setup the apps.
 
void CheckQueueSize (Ptr< QueueDisc > queue)
 Check the queue size and write its stats to the output files.
 

Variables

double avgQueueSize
 Average Queue size.
 
uint32_t checkTimes
 Number of times the queues have been checked.
 
double client_start_time
 Client start time.
 
double client_stop_time
 Client stop time.
 
std::stringstream filePlotQueue
 Output file name for queue size.
 
std::stringstream filePlotQueueAvg
 Output file name for queue average.
 
double global_start_time
 Global start time.
 
double global_stop_time
 Global stop time.
 
Ipv4InterfaceContainer i0i2
 IPv4 interface container i0 + i2.
 
Ipv4InterfaceContainer i1i2
 IPv4 interface container i1 + i2.
 
Ipv4InterfaceContainer i2i3
 IPv4 interface container i2 + i3.
 
Ipv4InterfaceContainer i3i4
 IPv4 interface container i3 + i4.
 
Ipv4InterfaceContainer i3i5
 IPv4 interface container i3 + i5.
 
NodeContainer n0n2
 Nodecontainer n0 + n2.
 
NodeContainer n1n2
 Nodecontainer n1 + n2.
 
NodeContainer n2n3
 Nodecontainer n2 + n3.
 
NodeContainer n3n4
 Nodecontainer n3 + n4.
 
NodeContainer n3n5
 Nodecontainer n3 + n5.
 
double sink_start_time
 Sink start time.
 
double sink_stop_time
 Sink stop time.
 

Detailed Description

Usage

$ ./ns3 run "red-tests [Program Options]"

Program Options

--testNumber
Run test 1, 3, 4 or 5 [1]
--pathOut
Path to save results from –writeForPlot/–writePcap/–writeFlowMonitor [.]
--writeForPlot
Write results for plot (gnuplot) [false]
--writePcap
Write results in pcapfile [false]
--writeFlowMonitor
Enable Flow Monitor and write their results [false]

Definition in file red-tests.cc.

Function Documentation

◆ BuildAppsTest()

void BuildAppsTest ( uint32_t  test)

Setup the apps.

Parameters
testThe test number.

Definition at line 109 of file red-tests.cc.

References ns3::ApplicationContainer::Add(), client_start_time, client_stop_time, ns3::NodeContainer::Get(), ns3::Ipv4InterfaceContainer::GetAddress(), ns3::Ipv4Address::GetAny(), i0i2, i1i2, i3i4, i3i5, ns3::ApplicationHelper::Install(), n0n2, n1n2, n3n4, n3n5, port, ns3::Seconds(), ns3::ApplicationHelper::SetAttribute(), sink_start_time, sink_stop_time, ns3::ApplicationContainer::Start(), and ns3::ApplicationContainer::Stop().

+ Here is the call graph for this function:

◆ CheckQueueSize()

void CheckQueueSize ( Ptr< QueueDisc queue)

Check the queue size and write its stats to the output files.

Parameters
queueThe queue to check.

Definition at line 84 of file red-tests.cc.

References avgQueueSize, CheckQueueSize(), checkTimes, filePlotQueue, filePlotQueueAvg, fPlotQueue, ns3::Time::GetSeconds(), ns3::Simulator::Now(), ns3::Simulator::Schedule(), and ns3::Seconds().

Referenced by CheckQueueSize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ avgQueueSize

double avgQueueSize

Average Queue size.

Definition at line 53 of file red-tests.cc.

Referenced by CheckQueueSize().

◆ checkTimes

uint32_t checkTimes

Number of times the queues have been checked.

Definition at line 52 of file red-tests.cc.

Referenced by CheckQueueSize().

◆ client_start_time

double client_start_time

Client start time.

Definition at line 60 of file red-tests.cc.

Referenced by BuildAppsTest().

◆ client_stop_time

double client_stop_time

Client stop time.

Definition at line 61 of file red-tests.cc.

Referenced by BuildAppsTest().

◆ filePlotQueue

std::stringstream filePlotQueue

Output file name for queue size.

Definition at line 75 of file red-tests.cc.

Referenced by CheckQueueSize().

◆ filePlotQueueAvg

std::stringstream filePlotQueueAvg

Output file name for queue average.

Definition at line 76 of file red-tests.cc.

Referenced by CheckQueueSize().

◆ global_start_time

double global_start_time

Global start time.

Definition at line 56 of file red-tests.cc.

◆ global_stop_time

double global_stop_time

Global stop time.

Definition at line 57 of file red-tests.cc.

◆ i0i2

IPv4 interface container i0 + i2.

Definition at line 69 of file red-tests.cc.

Referenced by BuildAppsTest().

◆ i1i2

IPv4 interface container i1 + i2.

Definition at line 70 of file red-tests.cc.

Referenced by BuildAppsTest().

◆ i2i3

IPv4 interface container i2 + i3.

Definition at line 71 of file red-tests.cc.

◆ i3i4

IPv4 interface container i3 + i4.

Definition at line 72 of file red-tests.cc.

Referenced by BuildAppsTest().

◆ i3i5

IPv4 interface container i3 + i5.

Definition at line 73 of file red-tests.cc.

Referenced by BuildAppsTest().

◆ n0n2

Nodecontainer n0 + n2.

Definition at line 63 of file red-tests.cc.

Referenced by BuildAppsTest().

◆ n1n2

Nodecontainer n1 + n2.

Definition at line 64 of file red-tests.cc.

Referenced by BuildAppsTest().

◆ n2n3

Nodecontainer n2 + n3.

Definition at line 65 of file red-tests.cc.

◆ n3n4

Nodecontainer n3 + n4.

Definition at line 66 of file red-tests.cc.

Referenced by BuildAppsTest().

◆ n3n5

Nodecontainer n3 + n5.

Definition at line 67 of file red-tests.cc.

Referenced by BuildAppsTest().

◆ sink_start_time

double sink_start_time

Sink start time.

Definition at line 58 of file red-tests.cc.

Referenced by BuildAppsTest().

◆ sink_stop_time

double sink_stop_time

Sink stop time.

Definition at line 59 of file red-tests.cc.

Referenced by BuildAppsTest().