A Discrete-Event Network Simulator
API
lte-test-tdtbfq-ff-mac-scheduler.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Marco Miozzo <marco.miozzo@cttc.es>,
18 * Nicola Baldo <nbaldo@cttc.es>
19 * Dizhi Zhou <dizhi.zhou@gmail.com>
20 */
21
23
24#include "ns3/applications-module.h"
25#include "ns3/double.h"
26#include "ns3/internet-module.h"
27#include "ns3/ipv4-global-routing-helper.h"
28#include "ns3/network-module.h"
29#include "ns3/point-to-point-epc-helper.h"
30#include "ns3/point-to-point-helper.h"
31#include "ns3/radio-bearer-stats-calculator.h"
32#include "ns3/string.h"
33#include <ns3/boolean.h>
34#include <ns3/constant-position-mobility-model.h>
35#include <ns3/enum.h>
36#include <ns3/eps-bearer.h>
37#include <ns3/ff-mac-scheduler.h>
38#include <ns3/log.h>
39#include <ns3/lte-enb-net-device.h>
40#include <ns3/lte-enb-phy.h>
41#include <ns3/lte-helper.h>
42#include <ns3/lte-ue-net-device.h>
43#include <ns3/lte-ue-phy.h>
44#include <ns3/lte-ue-rrc.h>
45#include <ns3/mobility-helper.h>
46#include <ns3/net-device-container.h>
47#include <ns3/node-container.h>
48#include <ns3/object.h>
49#include <ns3/packet.h>
50#include <ns3/ptr.h>
51#include <ns3/simulator.h>
52#include <ns3/spectrum-error-model.h>
53#include <ns3/spectrum-interference.h>
54#include <ns3/test.h>
55
56#include <iostream>
57#include <sstream>
58#include <string>
59
60using namespace ns3;
61
62NS_LOG_COMPONENT_DEFINE("LenaTestTdTbfqFfMacScheduler");
63
65 : TestSuite("lte-tdtbfq-ff-mac-scheduler", SYSTEM)
66{
67 NS_LOG_INFO("creating LenaTestTdTbfqFfMacSchedulerSuite");
68
69 bool errorModel = false;
70
71 // General config
72 // Traffic: UDP traffic with fixed rate
73 // Token generation rate = traffic rate
74 // RLC header length = 2 bytes, PDCP header = 2 bytes
75 // Simulation time = 1.0 sec
76 // Throughput in this file is calculated in RLC layer
77
78 // Test Case 1: homogeneous flow test in TDTBFQ (same distance)
79 // DOWNLINK -> DISTANCE 0 -> MCS 28 -> Itbs 26 (from table 7.1.7.2.1-1 of 36.2 13)
80 // Traffic info
81 // UDP traffic: payload size = 200 bytes, interval = 1 ms
82 // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) *
83 // 1000 byte/sec -> 232000 byte/rate
84 // Totol bandwidth: 24 PRB at Itbs 26 -> 2196 -> 2196000 byte/sec
85 // 1 user -> 232000 * 1 = 232000 < 2196000 -> throughput = 232000 byte/sec
86 // 3 user -> 232000 * 3 = 696000 < 2196000 -> througphut = 232000 byte/sec
87 // 6 user -> 232000 * 6 = 139200 < 2196000 -> throughput = 232000 byte/sec
88 // 12 user -> 232000 * 12 = 2784000 > 2196000 -> throughput = 2196000 / 12 = 183000 byte/sec
89 // UPLINK -> DISTANCE 0 -> MCS 28 -> Itbs 26 (from table 7.1.7.2.1-1 of 36.2 13)
90 // 1 user -> 25 PRB at Itbs 26 -> 2292 -> 2292000 > 232000 -> throughput = 232000 bytes/sec
91 // 3 users -> 8 PRB at Itbs 26 -> 749 -> 749000 > 232000 -> throughput = 232000 bytes/sec
92 // 6 users -> 4 PRB at Itbs 26 -> 373 -> 373000 > 232000 -> throughput = 232000 bytes/sec
93 // 12 users -> 2 PRB at Itbs 26 -> 185 -> 185000 < 232000 -> throughput = 185000 bytes/sec
94 AddTestCase(new LenaTdTbfqFfMacSchedulerTestCase1(1, 0, 232000, 232000, 200, 1, errorModel),
95 TestCase::EXTENSIVE);
96 AddTestCase(new LenaTdTbfqFfMacSchedulerTestCase1(3, 0, 232000, 232000, 200, 1, errorModel),
97 TestCase::EXTENSIVE);
98 AddTestCase(new LenaTdTbfqFfMacSchedulerTestCase1(6, 0, 232000, 232000, 200, 1, errorModel),
99 TestCase::EXTENSIVE);
100 // AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (12,0,183000,185000,200,1,errorModel));//
101 // simulation time = 1.5, otherwise, ul test will fail
102
103 // DOWNLINK - DISTANCE 4800 -> MCS 22 -> Itbs 20 (from table 7.1.7.2.1-1 of 36.213)
104 // Traffic info
105 // UDP traffic: payload size = 200 bytes, interval = 1 ms
106 // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000
107 // byte/sec -> 232000 byte/rate
108 // Totol bandwidth: 24 PRB at Itbs 20 -> 1383 -> 1383000 byte/sec
109 // 1 user -> 903000 * 1 = 232000 < 1383000 -> throughput = 232000 byte/sec
110 // 3 user -> 232000 * 3 = 696000 < 1383000 -> througphut = 232000 byte/sec
111 // 6 user -> 232000 * 6 = 1392000 > 1383000 -> throughput = 1383000 / 6 = 230500 byte/sec
112 // 12 user -> 232000 * 12 = 2784000 > 903000 -> throughput = 1383000 / 12 = 115250 byte/sec
113 // UPLINK - DISTANCE 4800 -> MCS 14 -> Itbs 13 (from table 7.1.7.2.1-1 of 36.213)
114 // 1 user -> 25 PRB at Itbs 13 -> 807 -> 807000 > 232000 -> throughput = 232000 bytes/sec
115 // 3 users -> 8 PRB at Itbs 13 -> 253 -> 253000 > 232000 -> throughput = 232000 bytes/sec
116 // 6 users -> 4 PRB at Itbs 13 -> 125 -> 125000 < 232000 -> throughput = 125000 bytes/sec
117 // after the patch enforcing min 3 PRBs per UE:
118 // 12 users -> 3 PRB at Itbs 13 -> 93 bytes * 8/12 UE/TTI -> 62000 < 232000 -> throughput =
119 // 62000 bytes/sec
120 AddTestCase(new LenaTdTbfqFfMacSchedulerTestCase1(1, 4800, 232000, 232000, 200, 1, errorModel),
121 TestCase::EXTENSIVE);
122 AddTestCase(new LenaTdTbfqFfMacSchedulerTestCase1(3, 4800, 232000, 232000, 200, 1, errorModel),
123 TestCase::EXTENSIVE);
124 AddTestCase(new LenaTdTbfqFfMacSchedulerTestCase1(6, 4800, 230500, 125000, 200, 1, errorModel),
125 TestCase::EXTENSIVE);
126 // AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (12,4800,115250,62000,200,1,errorModel));
127 // // simulation time = 1.5, otherwise, ul test will fail
128
129 // DOWNLINK - DISTANCE 6000 -> MCS 20 -> Itbs 18 (from table 7.1.7.2.1-1 of 36.213)
130 // Traffic info
131 // UDP traffic: payload size = 200 bytes, interval = 1 ms
132 // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000
133 // byte/sec -> 232000 byte/rate
134 // Totol bandwidth: 24 PRB at Itbs 18 -> 1191 -> 1191000 byte/sec
135 // 1 user -> 903000 * 1 = 232000 < 1191000 -> throughput = 232000 byte/sec
136 // 3 user -> 232000 * 3 = 696000 < 1191000 -> througphut = 232000 byte/sec
137 // 6 user -> 232000 * 6 = 1392000 > 1191000 -> throughput = 1191000 / 6 = 198500 byte/sec
138 // 12 user -> 232000 * 12 = 2784000 > 1191000 -> throughput = 1191000 / 12 = 99250 byte/sec
139
140 // UPLINK - DISTANCE 6000 -> MCS 12 -> Itbs 11 (from table 7.1.7.2.1-1 of 36.213)
141 // 1 user -> 25 PRB at Itbs 11 -> 621 -> 621000 > 232000 -> throughput = 232000 bytes/sec
142 // 3 users -> 8 PRB at Itbs 11 -> 201 -> 201000 < 232000 -> throughput = 201000 bytes/sec
143 // 6 users -> 4 PRB at Itbs 11 -> 97 -> 97000 < 232000 -> throughput = 97000 bytes/sec
144 // after the patch enforcing min 3 PRBs per UE:
145 // 12 users -> 3 PRB at Itbs 11 -> 73 bytes * 8/12 UE/TTI -> 48667 < 232000 -> throughput =
146 // 48667 bytes/sec
147 AddTestCase(new LenaTdTbfqFfMacSchedulerTestCase1(1, 6000, 232000, 232000, 200, 1, errorModel),
148 TestCase::EXTENSIVE);
149 AddTestCase(new LenaTdTbfqFfMacSchedulerTestCase1(3, 6000, 232000, 201000, 200, 1, errorModel),
150 TestCase::EXTENSIVE);
151 AddTestCase(new LenaTdTbfqFfMacSchedulerTestCase1(6, 6000, 198500, 97000, 200, 1, errorModel),
152 TestCase::EXTENSIVE);
153 // AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1 (12,6000,99250,48667,200,1, errorModel));
154 // // simulation time = 1.5, otherwise, ul test will fail
155
156 // DOWNLINK - DISTANCE 10000 -> MCS 14 -> Itbs 13 (from table 7.1.7.2.1-1 of 36.213)
157 // Traffic info
158 // UDP traffic: payload size = 200 bytes, interval = 1 ms
159 // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000
160 // byte/sec -> 232000 byte/rate
161 // Totol bandwidth: 24 PRB at Itbs 13 -> 775 -> 775000 byte/sec
162 // 1 user -> 903000 * 1 = 232000 < 775000 -> throughput = 232000 byte/sec
163 // 3 user -> 232000 * 3 = 696000 < 775000 -> througphut = 232000 byte/sec
164 // 6 user -> 232000 * 6 = 1392000 > 775000 -> throughput = 775000 / 6 = 129166 byte/sec
165 // 12 user -> 232000 * 12 = 2784000 > 775000 -> throughput = 775000 / 12 = 64583 byte/sec
166 // UPLINK - DISTANCE 10000 -> MCS 8 -> Itbs 8 (from table 7.1.7.2.1-1 of 36.213)
167 // 1 user -> 24 PRB at Itbs 8 -> 437 -> 437000 > 232000 -> throughput = 232000 bytes/sec
168 // 3 users -> 8 PRB at Itbs 8 -> 137 -> 137000 < 232000 -> throughput = 137000 bytes/sec
169 // 6 users -> 4 PRB at Itbs 8 -> 67 -> 67000 < 232000 -> throughput = 67000 bytes/sec
170 // after the patch enforcing min 3 PRBs per UE:
171 // 12 users -> 3 PRB at Itbs 8 -> 49 bytes * 8/12 UE/TTI -> 32667 < 232000 -> throughput = 32667
172 // bytes/sec
173 AddTestCase(new LenaTdTbfqFfMacSchedulerTestCase1(1, 10000, 232000, 232000, 200, 1, errorModel),
174 TestCase::EXTENSIVE);
175 AddTestCase(new LenaTdTbfqFfMacSchedulerTestCase1(3, 10000, 232000, 137000, 200, 1, errorModel),
176 TestCase::EXTENSIVE);
177 AddTestCase(new LenaTdTbfqFfMacSchedulerTestCase1(6, 10000, 129166, 67000, 200, 1, errorModel),
178 TestCase::EXTENSIVE);
179 // AddTestCase (new LenaTdTbfqFfMacSchedulerTestCase1
180 // (12,10000,64583,32667,200,1,errorModel));// simulation time = 1.5, otherwise, ul test will
181 // fail
182
183 // DOWNLINK - DISTANCE 100000 -> CQI == 0 -> out of range -> 0 bytes/sec
184 // UPLINK - DISTANCE 100000 -> CQI == 0 -> out of range -> 0 bytes/sec
185 AddTestCase(new LenaTdTbfqFfMacSchedulerTestCase1(1, 100000, 0, 0, 200, 1, errorModel),
186 TestCase::QUICK);
187
188 // Test Case 2: homogeneous flow test in TDTBFQ (different distance)
189 // Traffic1 info
190 // UDP traffic: payload size = 100 bytes, interval = 1 ms
191 // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000
192 // byte/sec -> 132000 byte/rate
193 // Maximum throughput = 4 / ( 1/2196000 + 1/1383000 + 1/1191000 + 1/775000 ) = 1209000 byte/s
194 // 132000 * 4 = 528000 < 1209000 -> estimated throughput in downlink = 132000 byte/sec
195 std::vector<double> dist1;
196 dist1.push_back(0); // User 0 distance --> MCS 28
197 dist1.push_back(4800); // User 1 distance --> MCS 22
198 dist1.push_back(6000); // User 2 distance --> MCS 20
199 dist1.push_back(10000); // User 3 distance --> MCS 14
200 std::vector<uint16_t> packetSize1;
201 packetSize1.push_back(100);
202 packetSize1.push_back(100);
203 packetSize1.push_back(100);
204 packetSize1.push_back(100);
205 std::vector<uint32_t> estThrTdTbfqDl1;
206 estThrTdTbfqDl1.push_back(132000); // User 0 estimated TTI throughput from TDTBFQ
207 estThrTdTbfqDl1.push_back(132000); // User 1 estimated TTI throughput from TDTBFQ
208 estThrTdTbfqDl1.push_back(132000); // User 2 estimated TTI throughput from TDTBFQ
209 estThrTdTbfqDl1.push_back(132000); // User 3 estimated TTI throughput from TDTBFQ
211 new LenaTdTbfqFfMacSchedulerTestCase2(dist1, estThrTdTbfqDl1, packetSize1, 1, errorModel),
212 TestCase::EXTENSIVE);
213
214 // Traffic2 info
215 // UDP traffic: payload size = 300 bytes, interval = 1 ms
216 // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000
217 // byte/sec -> 332000 byte/rate
218 // Maximum throughput = 4 / ( 1/2196000 + 1/1383000 + 1/1191000 + 1/775000 ) = 1209000 byte/s
219 // 332000 * 4 = 1328000 > 1209000 -> estimated throughput in downlink = 1209000 / 4 = 302500
220 // byte/sec
221 std::vector<double> dist2;
222 dist2.push_back(0); // User 0 distance --> MCS 28
223 dist2.push_back(4800); // User 1 distance --> MCS 22
224 dist2.push_back(6000); // User 2 distance --> MCS 20
225 dist2.push_back(10000); // User 3 distance --> MCS 14
226 std::vector<uint16_t> packetSize2;
227 packetSize2.push_back(300);
228 packetSize2.push_back(300);
229 packetSize2.push_back(300);
230 packetSize2.push_back(300);
231 std::vector<uint32_t> estThrTdTbfqDl2;
232 estThrTdTbfqDl2.push_back(302500); // User 0 estimated TTI throughput from TDTBFQ
233 estThrTdTbfqDl2.push_back(302500); // User 1 estimated TTI throughput from TDTBFQ
234 estThrTdTbfqDl2.push_back(302500); // User 2 estimated TTI throughput from TDTBFQ
235 estThrTdTbfqDl2.push_back(302500); // User 3 estimated TTI throughput from TDTBFQ
237 new LenaTdTbfqFfMacSchedulerTestCase2(dist2, estThrTdTbfqDl2, packetSize2, 1, errorModel),
238 TestCase::EXTENSIVE);
239
240 // Test Case 3: heterogeneous flow test in TDTBFQ
241 // UDP traffic: payload size = [100,200,300] bytes, interval = 1 ms
242 // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000
243 // byte/sec -> [132000, 232000, 332000] byte/rate
244 // Maximum throughput = 3 / ( 1/2196000 + 1/1383000 + 1/1191000 ) = 1486666 byte/s
245 // 132000 + 232000 + 332000 = 696000 < 1486666 -> estimated throughput in downlink = [132000,
246 // 232000, 332000] byte/sec
247 std::vector<double> dist3;
248 dist3.push_back(0); // User 0 distance --> MCS 28
249 dist3.push_back(4800); // User 1 distance --> MCS 22
250 dist3.push_back(6000); // User 2 distance --> MCS 20
251 std::vector<uint16_t> packetSize3;
252 packetSize3.push_back(100);
253 packetSize3.push_back(200);
254 packetSize3.push_back(300);
255 std::vector<uint32_t> estThrTdTbfqDl3;
256 estThrTdTbfqDl3.push_back(132000); // User 0 estimated TTI throughput from TDTBFQ
257 estThrTdTbfqDl3.push_back(232000); // User 1 estimated TTI throughput from TDTBFQ
258 estThrTdTbfqDl3.push_back(332000); // User 2 estimated TTI throughput from TDTBFQ
260 new LenaTdTbfqFfMacSchedulerTestCase2(dist3, estThrTdTbfqDl3, packetSize3, 1, errorModel),
261 TestCase::QUICK);
262}
263
265
266// --------------- T E S T - C A S E # 1 ------------------------------
267
268std::string
270{
271 std::ostringstream oss;
272 oss << nUser << " UEs, distance " << dist << " m";
273 return oss.str();
274}
275
277 double dist,
278 double thrRefDl,
279 double thrRefUl,
280 uint16_t packetSize,
281 uint16_t interval,
282 bool errorModelEnabled)
283 : TestCase(BuildNameString(nUser, dist)),
284 m_nUser(nUser),
285 m_dist(dist),
286 m_packetSize(packetSize),
287 m_interval(interval),
288 m_thrRefDl(thrRefDl),
289 m_thrRefUl(thrRefUl),
290 m_errorModelEnabled(errorModelEnabled)
291{
292}
293
295{
296}
297
298void
300{
301 NS_LOG_FUNCTION(this << GetName());
302
304 {
305 Config::SetDefault("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue(false));
306 Config::SetDefault("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue(false));
307 }
308
309 Config::SetDefault("ns3::LteHelper::UseIdealRrc", BooleanValue(true));
310 Config::SetDefault("ns3::MacStatsCalculator::DlOutputFilename",
311 StringValue(CreateTempDirFilename("DlMacStats.txt")));
312 Config::SetDefault("ns3::MacStatsCalculator::UlOutputFilename",
313 StringValue(CreateTempDirFilename("UlMacStats.txt")));
314 Config::SetDefault("ns3::RadioBearerStatsCalculator::DlRlcOutputFilename",
315 StringValue(CreateTempDirFilename("DlRlcStats.txt")));
316 Config::SetDefault("ns3::RadioBearerStatsCalculator::UlRlcOutputFilename",
317 StringValue(CreateTempDirFilename("UlRlcStats.txt")));
318
319 Ptr<LteHelper> lteHelper = CreateObject<LteHelper>();
320 Ptr<PointToPointEpcHelper> epcHelper = CreateObject<PointToPointEpcHelper>();
321 lteHelper->SetEpcHelper(epcHelper);
322
323 // LogComponentEnable ("TdTbfqFfMacScheduler", LOG_DEBUG);
324
325 Ptr<Node> pgw = epcHelper->GetPgwNode();
326
327 // Create a single RemoteHost
328 NodeContainer remoteHostContainer;
329 remoteHostContainer.Create(1);
330 Ptr<Node> remoteHost = remoteHostContainer.Get(0);
331 InternetStackHelper internet;
332 internet.Install(remoteHostContainer);
333
334 // Create the Internet
336 p2ph.SetDeviceAttribute("DataRate", DataRateValue(DataRate("100Gb/s")));
337 p2ph.SetDeviceAttribute("Mtu", UintegerValue(1500));
338 p2ph.SetChannelAttribute("Delay", TimeValue(Seconds(0.001)));
339 NetDeviceContainer internetDevices = p2ph.Install(pgw, remoteHost);
340 Ipv4AddressHelper ipv4h;
341 ipv4h.SetBase("1.0.0.0", "255.0.0.0");
342 Ipv4InterfaceContainer internetIpIfaces = ipv4h.Assign(internetDevices);
343 // interface 0 is localhost, 1 is the p2p device
344 Ipv4Address remoteHostAddr = internetIpIfaces.GetAddress(1);
345
346 Ipv4StaticRoutingHelper ipv4RoutingHelper;
347 Ptr<Ipv4StaticRouting> remoteHostStaticRouting =
348 ipv4RoutingHelper.GetStaticRouting(remoteHost->GetObject<Ipv4>());
349 remoteHostStaticRouting->AddNetworkRouteTo(Ipv4Address("7.0.0.0"), Ipv4Mask("255.0.0.0"), 1);
350
351 // Config::SetDefault ("ns3::LteAmc::AmcModel", EnumValue (LteAmc::PiroEW2010));
352 // Config::SetDefault ("ns3::LteAmc::Ber", DoubleValue (0.00005));
353 // Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (false));
354 // Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (false));
355
356 // Config::SetDefault ("ns3::LteEnbRrc::EpsBearerToRlcMapping", EnumValue
357 // (LteHelper::RLC_UM_ALWAYS));
358
359 // LogComponentDisableAll (LOG_LEVEL_ALL);
360 // LogComponentEnable ("LenaTestTdTbfqFfMacScheduler", LOG_LEVEL_ALL);
361
362 lteHelper->SetAttribute("PathlossModel", StringValue("ns3::FriisSpectrumPropagationLossModel"));
363
364 // Create Nodes: eNodeB and UE
365 NodeContainer enbNodes;
366 NodeContainer ueNodes;
367 enbNodes.Create(1);
368 ueNodes.Create(m_nUser);
369
370 // Install Mobility Model
372 mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel");
373 mobility.Install(enbNodes);
374 mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel");
375 mobility.Install(ueNodes);
376
377 // Create Devices and install them in the Nodes (eNB and UE)
378 NetDeviceContainer enbDevs;
379 NetDeviceContainer ueDevs;
380 lteHelper->SetSchedulerType("ns3::TdTbfqFfMacScheduler");
381 lteHelper->SetSchedulerAttribute("UlCqiFilter", EnumValue(FfMacScheduler::SRS_UL_CQI));
382 enbDevs = lteHelper->InstallEnbDevice(enbNodes);
383 ueDevs = lteHelper->InstallUeDevice(ueNodes);
384
385 Ptr<LteEnbNetDevice> lteEnbDev = enbDevs.Get(0)->GetObject<LteEnbNetDevice>();
386 Ptr<LteEnbPhy> enbPhy = lteEnbDev->GetPhy();
387 enbPhy->SetAttribute("TxPower", DoubleValue(30.0));
388 enbPhy->SetAttribute("NoiseFigure", DoubleValue(5.0));
389
390 // Set UEs' position and power
391 for (int i = 0; i < m_nUser; i++)
392 {
395 mm->SetPosition(Vector(m_dist, 0.0, 0.0));
396 Ptr<LteUeNetDevice> lteUeDev = ueDevs.Get(i)->GetObject<LteUeNetDevice>();
397 Ptr<LteUePhy> uePhy = lteUeDev->GetPhy();
398 uePhy->SetAttribute("TxPower", DoubleValue(23.0));
399 uePhy->SetAttribute("NoiseFigure", DoubleValue(9.0));
400 }
401
402 // Install the IP stack on the UEs
403 internet.Install(ueNodes);
404 Ipv4InterfaceContainer ueIpIface;
405 ueIpIface = epcHelper->AssignUeIpv4Address(NetDeviceContainer(ueDevs));
406
407 // Assign IP address to UEs
408 for (uint32_t u = 0; u < ueNodes.GetN(); ++u)
409 {
410 Ptr<Node> ueNode = ueNodes.Get(u);
411 // Set the default gateway for the UE
412 Ptr<Ipv4StaticRouting> ueStaticRouting =
413 ipv4RoutingHelper.GetStaticRouting(ueNode->GetObject<Ipv4>());
414 ueStaticRouting->SetDefaultRoute(epcHelper->GetUeDefaultGatewayAddress(), 1);
415 }
416
417 // Attach a UE to a eNB
418 lteHelper->Attach(ueDevs, enbDevs.Get(0));
419
420 // Activate an EPS bearer on all UEs
421 for (uint32_t u = 0; u < ueNodes.GetN(); ++u)
422 {
423 Ptr<NetDevice> ueDevice = ueDevs.Get(u);
425 qos.gbrDl = (m_packetSize + 32) * (1000 / m_interval) *
426 8; // bit/s, considering IP, UDP, RLC, PDCP header size
427 qos.gbrUl = 0;
428 qos.mbrDl = qos.gbrDl;
429 qos.mbrUl = 0;
430
431 enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE;
432 EpsBearer bearer(q, qos);
433 lteHelper->ActivateDedicatedEpsBearer(ueDevice, bearer, EpcTft::Default());
434 }
435
436 // Install downlink and uplink applications
437 uint16_t dlPort = 1234;
438 uint16_t ulPort = 2000;
439 PacketSinkHelper dlPacketSinkHelper("ns3::UdpSocketFactory",
440 InetSocketAddress(Ipv4Address::GetAny(), dlPort));
443
444 for (uint32_t u = 0; u < ueNodes.GetN(); ++u)
445 {
446 ++ulPort;
447 PacketSinkHelper ulPacketSinkHelper("ns3::UdpSocketFactory",
448 InetSocketAddress(Ipv4Address::GetAny(), ulPort));
449 serverApps.Add(ulPacketSinkHelper.Install(remoteHost)); // receive packets from UEs
450 serverApps.Add(
451 dlPacketSinkHelper.Install(ueNodes.Get(u))); // receive packets from remotehost
452
453 UdpClientHelper dlClient(ueIpIface.GetAddress(u), dlPort); // uplink packets generator
454 dlClient.SetAttribute("Interval", TimeValue(MilliSeconds(m_interval)));
455 dlClient.SetAttribute("MaxPackets", UintegerValue(1000000));
456 dlClient.SetAttribute("PacketSize", UintegerValue(m_packetSize));
457
458 UdpClientHelper ulClient(remoteHostAddr, ulPort); // downlink packets generator
459 ulClient.SetAttribute("Interval", TimeValue(MilliSeconds(m_interval)));
460 ulClient.SetAttribute("MaxPackets", UintegerValue(1000000));
461 ulClient.SetAttribute("PacketSize", UintegerValue(m_packetSize));
462
463 clientApps.Add(dlClient.Install(remoteHost));
464 clientApps.Add(ulClient.Install(ueNodes.Get(u)));
465 }
466
467 serverApps.Start(Seconds(0.001));
468 clientApps.Start(Seconds(0.040));
469
470 double statsStartTime = 0.040; // need to allow for RRC connection establishment + SRS
471 double statsDuration = 1;
472 double tolerance = 0.1;
473 Simulator::Stop(Seconds(statsStartTime + statsDuration - 0.0001));
474
475 lteHelper->EnableRlcTraces();
476 lteHelper->EnableMacTraces();
477 Ptr<RadioBearerStatsCalculator> rlcStats = lteHelper->GetRlcStats();
478 rlcStats->SetAttribute("StartTime", TimeValue(Seconds(statsStartTime)));
479 rlcStats->SetAttribute("EpochDuration", TimeValue(Seconds(statsDuration)));
480
481 Simulator::Run();
482
487 NS_LOG_INFO("DL - Test with " << m_nUser << " user(s) at distance " << m_dist);
488 std::vector<uint64_t> dlDataRxed;
489 for (int i = 0; i < m_nUser; i++)
490 {
491 // get the imsi
492 uint64_t imsi = ueDevs.Get(i)->GetObject<LteUeNetDevice>()->GetImsi();
493 // get the lcId
494 uint8_t lcId = 4;
495 uint64_t data = rlcStats->GetDlRxData(imsi, lcId);
496 dlDataRxed.push_back(data);
497 NS_LOG_INFO("\tUser " << i << " imsi " << imsi << " bytes rxed " << (double)dlDataRxed.at(i)
498 << " thr " << (double)dlDataRxed.at(i) / statsDuration << " ref "
499 << m_thrRefDl);
500 }
501
502 for (int i = 0; i < m_nUser; i++)
503 {
504 NS_TEST_ASSERT_MSG_EQ_TOL((double)dlDataRxed.at(i) / statsDuration,
506 m_thrRefDl * tolerance,
507 " Unfair Throughput!");
508 }
509
514 NS_LOG_INFO("UL - Test with " << m_nUser << " user(s) at distance " << m_dist);
515 std::vector<uint64_t> ulDataRxed;
516 for (int i = 0; i < m_nUser; i++)
517 {
518 // get the imsi
519 uint64_t imsi = ueDevs.Get(i)->GetObject<LteUeNetDevice>()->GetImsi();
520 // get the lcId
521 uint8_t lcId = 4;
522 ulDataRxed.push_back(rlcStats->GetUlRxData(imsi, lcId));
523 NS_LOG_INFO("\tUser " << i << " imsi " << imsi << " bytes rxed " << (double)ulDataRxed.at(i)
524 << " thr " << (double)ulDataRxed.at(i) / statsDuration << " ref "
525 << m_thrRefUl);
526 }
527
528 for (int i = 0; i < m_nUser; i++)
529 {
530 NS_TEST_ASSERT_MSG_EQ_TOL((double)ulDataRxed.at(i) / statsDuration,
532 m_thrRefUl * tolerance,
533 " Unfair Throughput!");
534 }
535 Simulator::Destroy();
536}
537
538// --------------- T E S T - C A S E # 2 ------------------------------
539
540std::string
541LenaTdTbfqFfMacSchedulerTestCase2::BuildNameString(uint16_t nUser, std::vector<double> dist)
542{
543 std::ostringstream oss;
544 oss << "distances (m) = [ ";
545 for (std::vector<double>::iterator it = dist.begin(); it != dist.end(); ++it)
546 {
547 oss << *it << " ";
548 }
549 oss << "]";
550 return oss.str();
551}
552
554 std::vector<double> dist,
555 std::vector<uint32_t> estThrTdTbfqDl,
556 std::vector<uint16_t> packetSize,
557 uint16_t interval,
558 bool errorModelEnabled)
559 : TestCase(BuildNameString(dist.size(), dist)),
560 m_nUser(dist.size()),
561 m_dist(dist),
562 m_packetSize(packetSize),
563 m_interval(interval),
564 m_estThrTdTbfqDl(estThrTdTbfqDl),
565 m_errorModelEnabled(errorModelEnabled)
566{
567}
568
570{
571}
572
573void
575{
577 {
578 Config::SetDefault("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue(false));
579 Config::SetDefault("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue(false));
580 }
581
582 Config::SetDefault("ns3::LteHelper::UseIdealRrc", BooleanValue(true));
583 Config::SetDefault("ns3::MacStatsCalculator::DlOutputFilename",
584 StringValue(CreateTempDirFilename("DlMacStats.txt")));
585 Config::SetDefault("ns3::MacStatsCalculator::UlOutputFilename",
586 StringValue(CreateTempDirFilename("UlMacStats.txt")));
587 Config::SetDefault("ns3::RadioBearerStatsCalculator::DlRlcOutputFilename",
588 StringValue(CreateTempDirFilename("DlRlcStats.txt")));
589 Config::SetDefault("ns3::RadioBearerStatsCalculator::UlRlcOutputFilename",
590 StringValue(CreateTempDirFilename("UlRlcStats.txt")));
591
592 Ptr<LteHelper> lteHelper = CreateObject<LteHelper>();
593 Ptr<PointToPointEpcHelper> epcHelper = CreateObject<PointToPointEpcHelper>();
594 lteHelper->SetEpcHelper(epcHelper);
595
596 Ptr<Node> pgw = epcHelper->GetPgwNode();
597
598 // Create a single RemoteHost
599 NodeContainer remoteHostContainer;
600 remoteHostContainer.Create(1);
601 Ptr<Node> remoteHost = remoteHostContainer.Get(0);
602 InternetStackHelper internet;
603 internet.Install(remoteHostContainer);
604
605 // Create the Internet
607 p2ph.SetDeviceAttribute("DataRate", DataRateValue(DataRate("100Gb/s")));
608 p2ph.SetDeviceAttribute("Mtu", UintegerValue(1500));
609 p2ph.SetChannelAttribute("Delay", TimeValue(Seconds(0.001)));
610 NetDeviceContainer internetDevices = p2ph.Install(pgw, remoteHost);
611 Ipv4AddressHelper ipv4h;
612 ipv4h.SetBase("1.0.0.0", "255.0.0.0");
613 Ipv4InterfaceContainer internetIpIfaces = ipv4h.Assign(internetDevices);
614 // interface 0 is localhost, 1 is the p2p device
615 Ipv4Address remoteHostAddr = internetIpIfaces.GetAddress(1);
616
617 Ipv4StaticRoutingHelper ipv4RoutingHelper;
618 Ptr<Ipv4StaticRouting> remoteHostStaticRouting =
619 ipv4RoutingHelper.GetStaticRouting(remoteHost->GetObject<Ipv4>());
620 remoteHostStaticRouting->AddNetworkRouteTo(Ipv4Address("7.0.0.0"), Ipv4Mask("255.0.0.0"), 1);
621
622 // LogComponentDisableAll (LOG_LEVEL_ALL);
623 // LogComponentEnable ("LenaTestTdTbfqFfMacScheduler", LOG_LEVEL_ALL);
624
625 lteHelper->SetAttribute("PathlossModel", StringValue("ns3::FriisSpectrumPropagationLossModel"));
626
627 // Create Nodes: eNodeB and UE
628 NodeContainer enbNodes;
629 NodeContainer ueNodes;
630 enbNodes.Create(1);
631 ueNodes.Create(m_nUser);
632
633 // Install Mobility Model
635 mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel");
636 mobility.Install(enbNodes);
637 mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel");
638 mobility.Install(ueNodes);
639
640 // Create Devices and install them in the Nodes (eNB and UE)
641 NetDeviceContainer enbDevs;
642 NetDeviceContainer ueDevs;
643 lteHelper->SetSchedulerType("ns3::TdTbfqFfMacScheduler");
644 enbDevs = lteHelper->InstallEnbDevice(enbNodes);
645 ueDevs = lteHelper->InstallUeDevice(ueNodes);
646
647 Ptr<LteEnbNetDevice> lteEnbDev = enbDevs.Get(0)->GetObject<LteEnbNetDevice>();
648 Ptr<LteEnbPhy> enbPhy = lteEnbDev->GetPhy();
649 enbPhy->SetAttribute("TxPower", DoubleValue(30.0));
650 enbPhy->SetAttribute("NoiseFigure", DoubleValue(5.0));
651
652 // Set UEs' position and power
653 for (int i = 0; i < m_nUser; i++)
654 {
657 mm->SetPosition(Vector(m_dist.at(i), 0.0, 0.0));
658 Ptr<LteUeNetDevice> lteUeDev = ueDevs.Get(i)->GetObject<LteUeNetDevice>();
659 Ptr<LteUePhy> uePhy = lteUeDev->GetPhy();
660 uePhy->SetAttribute("TxPower", DoubleValue(23.0));
661 uePhy->SetAttribute("NoiseFigure", DoubleValue(9.0));
662 }
663
664 // Install the IP stack on the UEs
665 internet.Install(ueNodes);
666 Ipv4InterfaceContainer ueIpIface;
667 ueIpIface = epcHelper->AssignUeIpv4Address(NetDeviceContainer(ueDevs));
668
669 // Assign IP address to UEs
670 for (uint32_t u = 0; u < ueNodes.GetN(); ++u)
671 {
672 Ptr<Node> ueNode = ueNodes.Get(u);
673 // Set the default gateway for the UE
674 Ptr<Ipv4StaticRouting> ueStaticRouting =
675 ipv4RoutingHelper.GetStaticRouting(ueNode->GetObject<Ipv4>());
676 ueStaticRouting->SetDefaultRoute(epcHelper->GetUeDefaultGatewayAddress(), 1);
677 }
678
679 // Attach a UE to a eNB
680 lteHelper->Attach(ueDevs, enbDevs.Get(0));
681
682 // Activate an EPS bearer on all UEs
683
684 uint16_t mbrDl = 0;
685 for (uint32_t u = 0; u < ueNodes.GetN(); ++u)
686 {
687 mbrDl = mbrDl + m_packetSize.at(u);
688 }
689 mbrDl = mbrDl / ueNodes.GetN();
690
691 for (uint32_t u = 0; u < ueNodes.GetN(); ++u)
692 {
693 Ptr<NetDevice> ueDevice = ueDevs.Get(u);
695 qos.gbrDl = (mbrDl + 32) * (1000 / m_interval) *
696 8; // bit/s, considering IP, UDP, RLC, PDCP header size
697 qos.gbrUl = 0;
698 qos.mbrDl = qos.gbrDl;
699 qos.mbrUl = 0;
700
701 enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE;
702 EpsBearer bearer(q, qos);
703 lteHelper->ActivateDedicatedEpsBearer(ueDevice, bearer, EpcTft::Default());
704 }
705
706 // Install downlink and uplink applications
707 uint16_t dlPort = 1234;
708 uint16_t ulPort = 2000;
709 PacketSinkHelper dlPacketSinkHelper("ns3::UdpSocketFactory",
710 InetSocketAddress(Ipv4Address::GetAny(), dlPort));
713
714 for (uint32_t u = 0; u < ueNodes.GetN(); ++u)
715 {
716 ++ulPort;
717 PacketSinkHelper ulPacketSinkHelper("ns3::UdpSocketFactory",
718 InetSocketAddress(Ipv4Address::GetAny(), ulPort));
719 serverApps.Add(ulPacketSinkHelper.Install(remoteHost)); // receive packets from UEs
720 serverApps.Add(
721 dlPacketSinkHelper.Install(ueNodes.Get(u))); // receive packets from remotehost
722
723 UdpClientHelper dlClient(ueIpIface.GetAddress(u), dlPort); // uplink packets generator
724 dlClient.SetAttribute("Interval", TimeValue(MilliSeconds(m_interval)));
725 dlClient.SetAttribute("MaxPackets", UintegerValue(1000000));
726 dlClient.SetAttribute("PacketSize", UintegerValue(m_packetSize.at(u)));
727
728 UdpClientHelper ulClient(remoteHostAddr, ulPort); // downlink packets generator
729 ulClient.SetAttribute("Interval", TimeValue(MilliSeconds(m_interval)));
730 ulClient.SetAttribute("MaxPackets", UintegerValue(1000000));
731 ulClient.SetAttribute("PacketSize", UintegerValue(m_packetSize.at(u)));
732
733 clientApps.Add(dlClient.Install(remoteHost));
734 clientApps.Add(ulClient.Install(ueNodes.Get(u)));
735 }
736
737 serverApps.Start(Seconds(0.001));
738 clientApps.Start(Seconds(0.040));
739
740 double statsStartTime = 0.040; // need to allow for RRC connection establishment + SRS
741 double statsDuration = 1.0;
742 double tolerance = 0.1;
743 Simulator::Stop(Seconds(statsStartTime + statsDuration - 0.0001));
744
745 lteHelper->EnableRlcTraces();
746 Ptr<RadioBearerStatsCalculator> rlcStats = lteHelper->GetRlcStats();
747 rlcStats->SetAttribute("StartTime", TimeValue(Seconds(statsStartTime)));
748 rlcStats->SetAttribute("EpochDuration", TimeValue(Seconds(statsDuration)));
749
750 Simulator::Run();
751
756 NS_LOG_INFO("DL - Test with " << m_nUser << " user(s)");
757 std::vector<uint64_t> dlDataRxed;
758 for (int i = 0; i < m_nUser; i++)
759 {
760 // get the imsi
761 uint64_t imsi = ueDevs.Get(i)->GetObject<LteUeNetDevice>()->GetImsi();
762 // get the lcId
763 uint8_t lcId = 4;
764 dlDataRxed.push_back(rlcStats->GetDlRxData(imsi, lcId));
765 NS_LOG_INFO("\tUser " << i << " dist " << m_dist.at(i) << " imsi " << imsi << " bytes rxed "
766 << (double)dlDataRxed.at(i) << " thr "
767 << (double)dlDataRxed.at(i) / statsDuration << " ref "
768 << m_estThrTdTbfqDl.at(i));
769 }
770
771 for (int i = 0; i < m_nUser; i++)
772 {
773 NS_TEST_ASSERT_MSG_EQ_TOL((double)dlDataRxed.at(i) / statsDuration,
774 m_estThrTdTbfqDl.at(i),
775 m_estThrTdTbfqDl.at(i) * tolerance,
776 " Unfair Throughput!");
777 }
778
779 Simulator::Destroy();
780}
This system test program creates different test cases with a single eNB and several UEs,...
double m_thrRefUl
the UL throughput reference
bool m_errorModelEnabled
whether the error model is enabled
double m_thrRefDl
the DL throughput reference
void DoRun() override
Implementation to actually run this TestCase.
uint16_t m_packetSize
the packet size in bytes
LenaTdTbfqFfMacSchedulerTestCase1(uint16_t nUser, double dist, double thrRefDl, double thrRefUl, uint16_t packetSize, uint16_t interval, bool errorModelEnabled)
Constructor.
static std::string BuildNameString(uint16_t nUser, double dist)
Builds the test name string based on provided parameter values.
Lena TdTbfq Ff Mac Scheduler Test Case 2.
std::vector< uint16_t > m_packetSize
the packet size in bytes
std::vector< double > m_dist
the distance between nodes
uint16_t m_interval
the packet interval time in ms
bool m_errorModelEnabled
whether the error model is enabled
std::vector< uint32_t > m_estThrTdTbfqDl
the estimated downlink throughput
void DoRun() override
Implementation to actually run this TestCase.
LenaTdTbfqFfMacSchedulerTestCase2(std::vector< double > dist, std::vector< uint32_t > estThrTdTbfqDl, std::vector< uint16_t > packetSize, uint16_t interval, bool errorModelEnabled)
Constructor.
static std::string BuildNameString(uint16_t nUser, std::vector< double > dist)
Builds the test name string based on provided parameter values.
Test suite for TdTbfqFfMacScheduler test.
holds a vector of ns3::Application pointers.
AttributeValue implementation for Boolean.
Definition: boolean.h:37
Mobility model for which the current position does not change once it has been set and until it is se...
AttributeValue implementation for DataRate.
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Definition: double.h:42
Hold variables of type enum.
Definition: enum.h:56
This class contains the specification of EPS Bearers.
Definition: eps-bearer.h:91
Qci
QoS Class Indicator.
Definition: eps-bearer.h:106
an Inet address class
aggregate IP/TCP/UDP functionality to existing Nodes.
void Install(std::string nodeName) const
Aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and ns3::Tcp classes onto the provid...
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
void SetBase(Ipv4Address network, Ipv4Mask mask, Ipv4Address base="0.0.0.1")
Set the base network number, network mask and base address.
Ipv4InterfaceContainer Assign(const NetDeviceContainer &c)
Assign IP addresses to the net devices specified in the container based on the current network prefix...
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:43
Access to the IPv4 forwarding table, interfaces, and configuration.
Definition: ipv4.h:79
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const
a class to represent an Ipv4 address mask
Definition: ipv4-address.h:258
Helper class that adds ns3::Ipv4StaticRouting objects.
Ptr< Ipv4StaticRouting > GetStaticRouting(Ptr< Ipv4 > ipv4) const
Try and find the static routing protocol as either the main routing protocol or in the list of routin...
The eNodeB device implementation.
Ptr< LteEnbPhy > GetPhy() const
void SetEpcHelper(Ptr< EpcHelper > h)
Set the EpcHelper to be used to setup the EPC network in conjunction with the setup of the LTE radio ...
Definition: lte-helper.cc:282
Ptr< RadioBearerStatsCalculator > GetRlcStats()
Definition: lte-helper.cc:1708
void SetSchedulerAttribute(std::string n, const AttributeValue &v)
Set an attribute for the scheduler to be created.
Definition: lte-helper.cc:303
NetDeviceContainer InstallEnbDevice(NodeContainer c)
Create a set of eNodeB devices.
Definition: lte-helper.cc:482
void SetSchedulerType(std::string type)
Set the type of scheduler to be used by eNodeB devices.
Definition: lte-helper.cc:289
void Attach(NetDeviceContainer ueDevices)
Enables automatic attachment of a set of UE devices to a suitable cell using Idle mode initial cell s...
Definition: lte-helper.cc:1044
void EnableRlcTraces()
Enable trace sinks for RLC layer.
Definition: lte-helper.cc:1563
NetDeviceContainer InstallUeDevice(NodeContainer c)
Create a set of UE devices.
Definition: lte-helper.cc:497
void EnableMacTraces()
Enable trace sinks for MAC layer.
Definition: lte-helper.cc:1666
uint8_t ActivateDedicatedEpsBearer(NetDeviceContainer ueDevices, EpsBearer bearer, Ptr< EpcTft > tft)
Activate a dedicated EPS bearer on a given set of UE devices.
Definition: lte-helper.cc:1159
The LteUeNetDevice class implements the UE net device.
Helper class used to assign positions and mobility models to nodes.
holds a vector of ns3::NetDevice pointers
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
Ptr< Node > GetPgwNode() const override
Get the PGW node.
Ipv4Address GetUeDefaultGatewayAddress() override
Ipv4InterfaceContainer AssignUeIpv4Address(NetDeviceContainer ueDevices) override
Assign IPv4 addresses to UE devices.
keep track of a set of node pointers.
uint32_t GetN() const
Get the number of Ptr<Node> stored in this container.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
void SetAttribute(std::string name, const AttributeValue &value)
Set a single attribute, raising fatal errors if unsuccessful.
Definition: object-base.cc:258
Ptr< T > GetObject() const
Get a pointer to the requested aggregated Object.
Definition: object.h:471
A helper to make it easier to instantiate an ns3::PacketSinkApplication on a set of nodes.
ApplicationContainer Install(NodeContainer c) const
Install an ns3::PacketSinkApplication on each node of the input container configured with all the att...
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.
void SetChannelAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each Channel created by the helper.
NetDeviceContainer Install(NodeContainer c)
Hold variables of type string.
Definition: string.h:42
encapsulates test code
Definition: test.h:1060
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
Definition: test.cc:305
std::string CreateTempDirFilename(std::string filename)
Construct the full path to a file in a temporary directory.
Definition: test.cc:442
std::string GetName() const
Definition: test.cc:377
A suite of tests to run.
Definition: test.h:1256
AttributeValue implementation for Time.
Definition: nstime.h:1425
Create a client application which sends UDP packets carrying a 32bit sequence number and a 64 bit tim...
void SetAttribute(std::string name, const AttributeValue &value)
Record an attribute to be set in each Application after it is is created.
ApplicationContainer Install(NodeContainer c)
Hold an unsigned integer type.
Definition: uinteger.h:45
void SetDefault(std::string name, const AttributeValue &value)
Definition: config.cc:891
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:202
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Definition: log.h:275
void(* DataRate)(DataRate oldValue, DataRate newValue)
TracedValue callback signature for DataRate.
Definition: data-rate.h:328
#define NS_TEST_ASSERT_MSG_EQ_TOL(actual, limit, tol, msg)
Test that actual and expected (limit) values are equal to plus or minus some tolerance and report and...
Definition: test.h:337
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1338
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1350
static LenaTestTdTbfqFfMacSchedulerSuite lenaTestTdTbfqFfMacSchedulerSuite
serverApps
Definition: first.py:48
clientApps
Definition: first.py:58
Every class exported by the ns3 library is enclosed in the ns3 namespace.
mobility
Definition: third.py:96
uint8_t data[writeSize]
3GPP TS 36.413 9.2.1.18 GBR QoS Information
Definition: eps-bearer.h:36
uint64_t gbrDl
Guaranteed Bit Rate (bit/s) in downlink.
Definition: eps-bearer.h:42
uint64_t gbrUl
Guaranteed Bit Rate (bit/s) in uplink.
Definition: eps-bearer.h:43
uint64_t mbrDl
Maximum Bit Rate (bit/s) in downlink.
Definition: eps-bearer.h:44
uint64_t mbrUl
Maximum Bit Rate (bit/s) in uplink.
Definition: eps-bearer.h:45
static const uint32_t packetSize
Packet size generated at the AP.