A Discrete-Event Network Simulator
API
lte-test-cqa-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: Biljana Bojovic<bbojovic@cttc.es>
18  * Dizhi Zhou <dizhi.zhou@gmail.com>
19  * Marco Miozzo <marco.miozzo@cttc.es>,
20  * Nicola Baldo <nbaldo@cttc.es>
21  *
22  */
23 
25 
26 #include "ns3/double.h"
27 #include "ns3/internet-module.h"
28 #include "ns3/ipv4-global-routing-helper.h"
29 #include "ns3/network-module.h"
30 #include "ns3/packet-sink-helper.h"
31 #include "ns3/point-to-point-epc-helper.h"
32 #include "ns3/point-to-point-helper.h"
33 #include "ns3/radio-bearer-stats-calculator.h"
34 #include "ns3/string.h"
35 #include "ns3/udp-client-server-helper.h"
36 #include <ns3/boolean.h>
37 #include <ns3/constant-position-mobility-model.h>
38 #include <ns3/enum.h>
39 #include <ns3/eps-bearer.h>
40 #include <ns3/ff-mac-scheduler.h>
41 #include <ns3/log.h>
42 #include <ns3/lte-enb-net-device.h>
43 #include <ns3/lte-enb-phy.h>
44 #include <ns3/lte-helper.h>
45 #include <ns3/lte-ue-net-device.h>
46 #include <ns3/lte-ue-phy.h>
47 #include <ns3/lte-ue-rrc.h>
48 #include <ns3/mobility-helper.h>
49 #include <ns3/net-device-container.h>
50 #include <ns3/node-container.h>
51 #include <ns3/object.h>
52 #include <ns3/packet.h>
53 #include <ns3/ptr.h>
54 #include <ns3/simulator.h>
55 #include <ns3/spectrum-error-model.h>
56 #include <ns3/spectrum-interference.h>
57 #include <ns3/test.h>
58 
59 #include <iostream>
60 #include <sstream>
61 #include <string>
62 
63 using namespace ns3;
64 
65 NS_LOG_COMPONENT_DEFINE("LenaTestCqaFfMacScheduler");
66 
68  : TestSuite("lte-cqa-ff-mac-scheduler", SYSTEM)
69 {
70  NS_LOG_INFO("creating LenaTestCqaFfMacSchedulerSuite");
71 
72  bool errorModel = false;
73 
74  // General config
75  // Traffic: UDP traffic with fixed rate
76  // Token generation rate = traffic rate
77  // RLC header length = 2 bytes, PDCP header = 2 bytes
78  // Simulation time = 1.0 sec
79  // Throughput in this file is calculated in RLC layer
80 
81  // Test Case 1: homogeneous flow test in CQA (same distance)
82  // DOWNLINK -> DISTANCE 0 -> MCS 28 -> Itbs 26 (from table 7.1.7.2.1-1 of 36.2 13)
83  // Traffic info
84  // UDP traffic: payload size = 200 bytes, interval = 1 ms
85  // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) *
86  // 1000 byte/sec -> 232000 byte/rate
87  // Total bandwidth: 24 PRB at Itbs 26 -> 2196 -> 2196000 byte/sec
88  // 1 user -> 232000 * 1 = 232000 < 2196000 -> throughput = 232000 byte/sec
89  // 3 user -> 232000 * 3 = 696000 < 2196000 -> througphut = 232000 byte/sec
90  // 6 user -> 232000 * 6 = 139200 < 2196000 -> throughput = 232000 byte/sec
91  // 12 user -> 232000 * 12 = 2784000 > 2196000 -> throughput = 2196000 / 12 = 183000 byte/sec
92  // UPLINK -> DISTANCE 0 -> MCS 28 -> Itbs 26 (from table 7.1.7.2.1-1 of 36.2 13)
93  // 1 user -> 25 PRB at Itbs 26 -> 2292 -> 2292000 > 232000 -> throughput = 232000 bytes/sec
94  // 3 users -> 8 PRB at Itbs 26 -> 749 -> 749000 > 232000 -> throughput = 232000 bytes/sec
95  // 6 users -> 4 PRB at Itbs 26 -> 373 -> 373000 > 232000 -> throughput = 232000 bytes/sec
96  // 12 users -> 2 PRB at Itbs 26 -> 185 -> 185000 < 232000 -> throughput = 185000 bytes/sec
97  AddTestCase(new LenaCqaFfMacSchedulerTestCase1(1, 0, 232000, 232000, 200, 1, errorModel),
98  TestCase::EXTENSIVE);
99  AddTestCase(new LenaCqaFfMacSchedulerTestCase1(3, 0, 232000, 232000, 200, 1, errorModel),
100  TestCase::EXTENSIVE);
101  AddTestCase(new LenaCqaFfMacSchedulerTestCase1(6, 0, 232000, 232000, 200, 1, errorModel),
102  TestCase::EXTENSIVE);
103 
104  // AddTestCase (new LenaCqaFfMacSchedulerTestCase1 (12,0,183000,185000,200,1,errorModel));//
105  // simulation time = 1.5, otherwise, ul test will fail
106 
107  // DOWNLINK - DISTANCE 4800 -> MCS 22 -> Itbs 20 (from table 7.1.7.2.1-1 of 36.213)
108  // Traffic info
109  // UDP traffic: payload size = 200 bytes, interval = 1 ms
110  // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000
111  // byte/sec -> 232000 byte/rate
112  // Total bandwidth: 24 PRB at Itbs 20 -> 1383 -> 1383000 byte/sec
113  // 1 user -> 903000 * 1 = 232000 < 1383000 -> throughput = 232000 byte/sec
114  // 3 user -> 232000 * 3 = 696000 < 1383000 -> througphut = 232000 byte/sec
115  // 6 user -> 232000 * 6 = 139200 > 1383000 -> throughput = 1383000 / 6 = 230500 byte/sec
116  // 12 user -> 232000 * 12 = 2784000 > 1383000 -> throughput = 1383000 / 12 = 115250 byte/sec
117  // UPLINK - DISTANCE 4800 -> MCS 14 -> Itbs 13 (from table 7.1.7.2.1-1 of 36.213)
118  // 1 user -> 25 PRB at Itbs 13 -> 807 -> 807000 > 232000 -> throughput = 232000 bytes/sec
119  // 3 users -> 8 PRB at Itbs 13 -> 253 -> 253000 > 232000 -> throughput = 232000 bytes/sec
120  // 6 users -> 4 PRB at Itbs 13 -> 125 -> 125000 < 232000 -> throughput = 125000 bytes/sec
121  // after the patch enforcing min 3 PRBs per UE:
122  // 12 users -> 3 PRB at Itbs 13 -> 93 bytes * 8/12 UE/TTI -> 62000 < 232000 -> throughput =
123  // 62000 bytes/sec
124  AddTestCase(new LenaCqaFfMacSchedulerTestCase1(1, 4800, 232000, 232000, 200, 1, errorModel),
125  TestCase::EXTENSIVE);
126  AddTestCase(new LenaCqaFfMacSchedulerTestCase1(3, 4800, 232000, 232000, 200, 1, errorModel),
127  TestCase::EXTENSIVE);
128  AddTestCase(new LenaCqaFfMacSchedulerTestCase1(6, 4800, 230500, 125000, 200, 1, errorModel),
129  TestCase::EXTENSIVE);
130  // AddTestCase (new LenaCqaFfMacSchedulerTestCase1 (12,4800,115250,62000,200,1,errorModel)); //
131  // simulation time = 1.5, otherwise, ul test will fail
132 
133  // DOWNLINK - DISTANCE 6000 -> MCS 20 -> Itbs 18 (from table 7.1.7.2.1-1 of 36.213)
134  // Traffic info
135  // UDP traffic: payload size = 200 bytes, interval = 1 ms
136  // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000
137  // byte/sec -> 232000 byte/rate
138  // Total bandwidth: 24 PRB at Itbs 18 -> 1191 -> 1191000 byte/sec
139  // 1 user -> 903000 * 1 = 232000 < 1191000 -> throughput = 232000 byte/sec
140  // 3 user -> 232000 * 3 = 696000 < 1191000 -> througphut = 232000 byte/sec
141  // 6 user -> 232000 * 6 = 1392000 > 1191000 -> throughput = 1191000 / 6 = 198500 byte/sec
142  // 12 user -> 232000 * 12 = 2784000 > 1191000 -> throughput = 1191000 / 12 = 99250 byte/sec
143 
144  // UPLINK - DISTANCE 6000 -> MCS 12 -> Itbs 11 (from table 7.1.7.2.1-1 of 36.213)
145  // 1 user -> 25 PRB at Itbs 11 -> 621 -> 621000 > 232000 -> throughput = 232000 bytes/sec
146  // 3 users -> 8 PRB at Itbs 11 -> 201 -> 201000 < 232000 -> throughput = 201000 bytes/sec
147  // 6 users -> 4 PRB at Itbs 11 -> 97 -> 97000 < 232000 -> throughput = 97000 bytes/sec
148  // after the patch enforcing min 3 PRBs per UE:
149  // 12 users -> 3 PRB at Itbs 11 -> 73 bytes * 8/12 UE/TTI -> 48667 < 232000 -> throughput =
150  // 48667 bytes/sec
151  AddTestCase(new LenaCqaFfMacSchedulerTestCase1(1, 6000, 232000, 232000, 200, 1, errorModel),
152  TestCase::EXTENSIVE);
153  AddTestCase(new LenaCqaFfMacSchedulerTestCase1(3, 6000, 232000, 201000, 200, 1, errorModel),
154  TestCase::EXTENSIVE);
155  AddTestCase(new LenaCqaFfMacSchedulerTestCase1(6, 6000, 198500, 97000, 200, 1, errorModel),
156  TestCase::EXTENSIVE);
157  // AddTestCase (new LenaCqaFfMacSchedulerTestCase1 (12,6000,99250,48667,200,1, errorModel)); //
158  // simulation time = 1.5, otherwise, ul test will fail
159 
160  // DOWNLINK - DISTANCE 10000 -> MCS 14 -> Itbs 13 (from table 7.1.7.2.1-1 of 36.213)
161  // Traffic info
162  // UDP traffic: payload size = 200 bytes, interval = 1 ms
163  // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000
164  // byte/sec -> 232000 byte/rate
165  // Total bandwidth: 24 PRB at Itbs 13 -> 775 -> 775000 byte/sec
166  // 1 user -> 903000 * 1 = 232000 < 775000 -> throughput = 232000 byte/sec
167  // 3 user -> 232000 * 3 = 696000 > 775000 -> througphut = 232000 byte/sec
168  // 6 user -> 232000 * 6 = 139200 > 775000 -> throughput = 775000 / 6 = 129166 byte/sec
169  // 12 user -> 232000 * 12 = 2784000 > 775000 -> throughput = 775000 / 12 = 64583 byte/sec
170  // UPLINK - DISTANCE 10000 -> MCS 8 -> Itbs 8 (from table 7.1.7.2.1-1 of 36.213)
171  // 1 user -> 24 PRB at Itbs 8 -> 437 -> 437000 > 232000 -> throughput = 232000 bytes/sec
172  // 3 users -> 8 PRB at Itbs 8 -> 137 -> 137000 < 232000 -> throughput = 137000 bytes/sec
173  // 6 users -> 4 PRB at Itbs 8 -> 67 -> 67000 < 232000 -> throughput = 67000 bytes/sec
174  // after the patch enforcing min 3 PRBs per UE:
175  // 12 users -> 3 PRB at Itbs 8 -> 49 bytes * 8/12 UE/TTI -> 32667 < 232000 -> throughput = 32667
176  // bytes/sec
177  AddTestCase(new LenaCqaFfMacSchedulerTestCase1(1, 10000, 232000, 232000, 200, 1, errorModel),
178  TestCase::EXTENSIVE);
179  AddTestCase(new LenaCqaFfMacSchedulerTestCase1(3, 10000, 232000, 137000, 200, 1, errorModel),
180  TestCase::EXTENSIVE);
181  AddTestCase(new LenaCqaFfMacSchedulerTestCase1(6, 10000, 129166, 67000, 200, 1, errorModel),
182  TestCase::EXTENSIVE);
183  // AddTestCase (new LenaCqaFfMacSchedulerTestCase1 (12,10000,64583,32667,200,1,errorModel));//
184  // simulation time = 1.5, otherwise, ul test will fail
185 
186  // DOWNLINK - DISTANCE 100000 -> CQI == 0 -> out of range -> 0 bytes/sec
187  // UPLINK - DISTANCE 100000 -> CQI == 0 -> out of range -> 0 bytes/sec
188  AddTestCase(new LenaCqaFfMacSchedulerTestCase1(1, 100000, 0, 0, 200, 1, errorModel),
189  TestCase::QUICK);
190 
191  // Test Case 2: homogeneous flow test in CQA (different distance)
192  // Traffic1 info
193  // UDP traffic: payload size = 100 bytes, interval = 1 ms
194  // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000
195  // byte/sec -> 132000 byte/rate
196  // Maximum throughput = 4 / ( 1/2196000 + 1/1191000 + 1/1383000 + 1/775000 ) = 1209046 byte/s
197  // 132000 * 4 = 528000 < 1209046 -> estimated throughput in downlink = 132000 byte/sec
198  std::vector<double> dist1;
199  dist1.push_back(0); // User 0 distance --> MCS 28
200  dist1.push_back(4800); // User 1 distance --> MCS 22
201  dist1.push_back(6000); // User 2 distance --> MCS 20
202  dist1.push_back(10000); // User 3 distance --> MCS 14
203  std::vector<uint16_t> packetSize1;
204  packetSize1.push_back(100);
205  packetSize1.push_back(100);
206  packetSize1.push_back(100);
207  packetSize1.push_back(100);
208  std::vector<uint32_t> estThrCqaDl1;
209  estThrCqaDl1.push_back(132000); // User 0 estimated TTI throughput from CQA
210  estThrCqaDl1.push_back(132000); // User 1 estimated TTI throughput from CQA
211  estThrCqaDl1.push_back(132000); // User 2 estimated TTI throughput from CQA
212  estThrCqaDl1.push_back(132000); // User 3 estimated TTI throughput from CQA
213  AddTestCase(new LenaCqaFfMacSchedulerTestCase2(dist1, estThrCqaDl1, packetSize1, 1, errorModel),
214  TestCase::QUICK);
215 
216  // Traffic2 info
217  // UDP traffic: payload size = 200 bytes, interval = 1 ms
218  // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000
219  // byte/sec -> 232000 byte/rate
220  // Maximum throughput = 4 / ( 1/2196000 + 1/1191000 + 1/1383000 + 1/775000 ) = 1209046 byte/s
221  // 232000 * 4 = 928000 < 1209046 -> estimated throughput in downlink = 928000 / 4 = 230000
222  // byte/sec
223  std::vector<double> dist2;
224  dist2.push_back(0); // User 0 distance --> MCS 28
225  dist2.push_back(4800); // User 1 distance --> MCS 22
226  dist2.push_back(6000); // User 2 distance --> MCS 20
227  dist2.push_back(10000); // User 3 distance --> MCS 14
228  std::vector<uint16_t> packetSize2;
229  packetSize2.push_back(200);
230  packetSize2.push_back(200);
231  packetSize2.push_back(200);
232  packetSize2.push_back(200);
233  std::vector<uint32_t> estThrCqaDl2;
234  estThrCqaDl2.push_back(230000); // User 0 estimated TTI throughput from CQA
235  estThrCqaDl2.push_back(230000); // User 1 estimated TTI throughput from CQA
236  estThrCqaDl2.push_back(230000); // User 2 estimated TTI throughput from CQA
237  estThrCqaDl2.push_back(230000); // User 3 estimated TTI throughput from CQA
238  AddTestCase(new LenaCqaFfMacSchedulerTestCase2(dist2, estThrCqaDl2, packetSize2, 1, errorModel),
239  TestCase::QUICK);
240 
241  // Test Case 3: heterogeneous flow test in CQA
242  // UDP traffic: payload size = [100,200,300] bytes, interval = 1 ms
243  // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000
244  // byte/sec -> [132000, 232000, 332000] byte/rate
245  // Maximum throughput = 3 / ( 1/2196000 + 1/1191000 + 1/1383000) = 1486569 byte/s
246  // 132000 + 232000 + 332000 = 696000 < 1486569 -> estimated throughput in downlink = [132000,
247  // 232000, 332000] byte/sec
248  std::vector<double> dist3;
249  dist3.push_back(0); // User 0 distance --> MCS 28
250  dist3.push_back(4800); // User 1 distance --> MCS 22
251  dist3.push_back(6000); // User 2 distance --> MCS 20
252  std::vector<uint16_t> packetSize3;
253  packetSize3.push_back(100);
254  packetSize3.push_back(200);
255  packetSize3.push_back(300);
256  std::vector<uint32_t> estThrCqaDl3;
257  estThrCqaDl3.push_back(132000); // User 0 estimated TTI throughput from CQA
258  estThrCqaDl3.push_back(232000); // User 1 estimated TTI throughput from CQA
259  estThrCqaDl3.push_back(332000); // User 2 estimated TTI throughput from CQA
260  AddTestCase(new LenaCqaFfMacSchedulerTestCase2(dist3, estThrCqaDl3, packetSize3, 1, errorModel),
261  TestCase::QUICK);
262 }
263 
269 
270 // --------------- T E S T - C A S E # 1 ------------------------------
271 
272 std::string
274 {
275  std::ostringstream oss;
276  oss << nUser << " UEs, distance " << dist << " m";
277  return oss.str();
278 }
279 
281  double dist,
282  double thrRefDl,
283  double thrRefUl,
284  uint16_t packetSize,
285  uint16_t interval,
286  bool errorModelEnabled)
287  : TestCase(BuildNameString(nUser, dist)),
288  m_nUser(nUser),
289  m_dist(dist),
290  m_packetSize(packetSize),
291  m_interval(interval),
292  m_thrRefDl(thrRefDl),
293  m_thrRefUl(thrRefUl),
294  m_errorModelEnabled(errorModelEnabled)
295 {
296 }
297 
299 {
300 }
301 
302 void
304 {
305  NS_LOG_FUNCTION(this << GetName());
306 
307  if (!m_errorModelEnabled)
308  {
309  Config::SetDefault("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue(false));
310  Config::SetDefault("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue(false));
311  }
312 
313  Config::SetDefault("ns3::LteHelper::UseIdealRrc", BooleanValue(true));
314  Config::SetDefault("ns3::MacStatsCalculator::DlOutputFilename",
315  StringValue(CreateTempDirFilename("DlMacStats.txt")));
316  Config::SetDefault("ns3::MacStatsCalculator::UlOutputFilename",
317  StringValue(CreateTempDirFilename("UlMacStats.txt")));
318  Config::SetDefault("ns3::RadioBearerStatsCalculator::DlRlcOutputFilename",
319  StringValue(CreateTempDirFilename("DlRlcStats.txt")));
320  Config::SetDefault("ns3::RadioBearerStatsCalculator::UlRlcOutputFilename",
321  StringValue(CreateTempDirFilename("UlRlcStats.txt")));
322 
323  Ptr<LteHelper> lteHelper = CreateObject<LteHelper>();
324  Ptr<PointToPointEpcHelper> epcHelper = CreateObject<PointToPointEpcHelper>();
325  lteHelper->SetEpcHelper(epcHelper);
326 
327  // LogComponentEnable ("CqaFfMacScheduler", LOG_DEBUG);
328 
329  Ptr<Node> pgw = epcHelper->GetPgwNode();
330 
331  // Create a single RemoteHost
332  NodeContainer remoteHostContainer;
333  remoteHostContainer.Create(1);
334  Ptr<Node> remoteHost = remoteHostContainer.Get(0);
336  internet.Install(remoteHostContainer);
337 
338  // Create the Internet
339  PointToPointHelper p2ph;
340  p2ph.SetDeviceAttribute("DataRate", DataRateValue(DataRate("100Gb/s")));
341  p2ph.SetDeviceAttribute("Mtu", UintegerValue(1500));
342  p2ph.SetChannelAttribute("Delay", TimeValue(Seconds(0.001)));
343  NetDeviceContainer internetDevices = p2ph.Install(pgw, remoteHost);
344  Ipv4AddressHelper ipv4h;
345  ipv4h.SetBase("1.0.0.0", "255.0.0.0");
346  Ipv4InterfaceContainer internetIpIfaces = ipv4h.Assign(internetDevices);
347  // interface 0 is localhost, 1 is the p2p device
348  Ipv4Address remoteHostAddr = internetIpIfaces.GetAddress(1);
349 
350  Ipv4StaticRoutingHelper ipv4RoutingHelper;
351  Ptr<Ipv4StaticRouting> remoteHostStaticRouting =
352  ipv4RoutingHelper.GetStaticRouting(remoteHost->GetObject<Ipv4>());
353  remoteHostStaticRouting->AddNetworkRouteTo(Ipv4Address("7.0.0.0"), Ipv4Mask("255.0.0.0"), 1);
354 
355  // Config::SetDefault ("ns3::LteAmc::AmcModel", EnumValue (LteAmc::PiroEW2010));
356  // Config::SetDefault ("ns3::LteAmc::Ber", DoubleValue (0.00005));
357  // Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (false));
358  // Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (false));
359 
360  // Config::SetDefault ("ns3::LteEnbRrc::EpsBearerToRlcMapping", EnumValue
361  // (LteHelper::RLC_UM_ALWAYS));
362 
363  // LogComponentDisableAll (LOG_LEVEL_ALL);
364  // LogComponentEnable ("LenaTestCqaFfMacScheduler", LOG_LEVEL_ALL);
365 
366  lteHelper->SetAttribute("PathlossModel", StringValue("ns3::FriisSpectrumPropagationLossModel"));
367 
368  // Create Nodes: eNodeB and UE
369  NodeContainer enbNodes;
370  NodeContainer ueNodes;
371  enbNodes.Create(1);
372  ueNodes.Create(m_nUser);
373 
374  // Install Mobility Model
376  mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel");
377  mobility.Install(enbNodes);
378  mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel");
379  mobility.Install(ueNodes);
380 
381  // Create Devices and install them in the Nodes (eNB and UE)
382  NetDeviceContainer enbDevs;
383  NetDeviceContainer ueDevs;
384  lteHelper->SetSchedulerType("ns3::CqaFfMacScheduler");
385  lteHelper->SetSchedulerAttribute("UlCqiFilter", EnumValue(FfMacScheduler::SRS_UL_CQI));
386  enbDevs = lteHelper->InstallEnbDevice(enbNodes);
387  ueDevs = lteHelper->InstallUeDevice(ueNodes);
388 
389  Ptr<LteEnbNetDevice> lteEnbDev = enbDevs.Get(0)->GetObject<LteEnbNetDevice>();
390  Ptr<LteEnbPhy> enbPhy = lteEnbDev->GetPhy();
391  enbPhy->SetAttribute("TxPower", DoubleValue(30.0));
392  enbPhy->SetAttribute("NoiseFigure", DoubleValue(5.0));
393 
394  // Set UEs' position and power
395  for (int i = 0; i < m_nUser; i++)
396  {
399  mm->SetPosition(Vector(m_dist, 0.0, 0.0));
400  Ptr<LteUeNetDevice> lteUeDev = ueDevs.Get(i)->GetObject<LteUeNetDevice>();
401  Ptr<LteUePhy> uePhy = lteUeDev->GetPhy();
402  uePhy->SetAttribute("TxPower", DoubleValue(23.0));
403  uePhy->SetAttribute("NoiseFigure", DoubleValue(9.0));
404  }
405 
406  // Install the IP stack on the UEs
407  internet.Install(ueNodes);
408  Ipv4InterfaceContainer ueIpIface;
409  ueIpIface = epcHelper->AssignUeIpv4Address(NetDeviceContainer(ueDevs));
410 
411  // Assign IP address to UEs
412  for (uint32_t u = 0; u < ueNodes.GetN(); ++u)
413  {
414  Ptr<Node> ueNode = ueNodes.Get(u);
415  // Set the default gateway for the UE
416  Ptr<Ipv4StaticRouting> ueStaticRouting =
417  ipv4RoutingHelper.GetStaticRouting(ueNode->GetObject<Ipv4>());
418  ueStaticRouting->SetDefaultRoute(epcHelper->GetUeDefaultGatewayAddress(), 1);
419  }
420 
421  // Attach a UE to a eNB
422  lteHelper->Attach(ueDevs, enbDevs.Get(0));
423 
424  // Activate an EPS bearer on all UEs
425  for (uint32_t u = 0; u < ueNodes.GetN(); ++u)
426  {
427  Ptr<NetDevice> ueDevice = ueDevs.Get(u);
428  GbrQosInformation qos;
429  qos.gbrDl = (m_packetSize + 32) * (1000 / m_interval) *
430  8; // bit/s, considering IP, UDP, RLC, PDCP header size
431  qos.gbrUl = (m_packetSize + 32) * (1000 / m_interval) * 8;
432  qos.mbrDl = 0;
433  qos.mbrUl = 0;
434 
435  EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE;
436  EpsBearer bearer(q, qos);
437  lteHelper->ActivateDedicatedEpsBearer(ueDevice, bearer, EpcTft::Default());
438  }
439 
440  // Install downlink and uplink applications
441  uint16_t dlPort = 1234;
442  uint16_t ulPort = 2000;
445  PacketSinkHelper dlPacketSinkHelper("ns3::UdpSocketFactory",
446  InetSocketAddress(Ipv4Address::GetAny(), dlPort));
447 
448  for (uint32_t u = 0; u < ueNodes.GetN(); ++u)
449  {
450  ++ulPort;
451  PacketSinkHelper ulPacketSinkHelper("ns3::UdpSocketFactory",
452  InetSocketAddress(Ipv4Address::GetAny(), ulPort));
453  serverApps.Add(ulPacketSinkHelper.Install(remoteHost)); // receive packets from UEs
454  serverApps.Add(
455  dlPacketSinkHelper.Install(ueNodes.Get(u))); // receive packets from remotehost
456 
457  UdpClientHelper dlClient(ueIpIface.GetAddress(u), dlPort); // downlink packets generator
458  dlClient.SetAttribute("Interval", TimeValue(MilliSeconds(m_interval)));
459  dlClient.SetAttribute("MaxPackets", UintegerValue(1000000));
460  dlClient.SetAttribute("PacketSize", UintegerValue(m_packetSize));
461 
462  UdpClientHelper ulClient(remoteHostAddr, ulPort); // uplink packets generator
463  ulClient.SetAttribute("Interval", TimeValue(MilliSeconds(m_interval)));
464  ulClient.SetAttribute("MaxPackets", UintegerValue(1000000));
465  ulClient.SetAttribute("PacketSize", UintegerValue(m_packetSize));
466 
467  clientApps.Add(dlClient.Install(remoteHost));
468  clientApps.Add(ulClient.Install(ueNodes.Get(u)));
469  }
470 
471  serverApps.Start(Seconds(0.030));
472  clientApps.Start(Seconds(0.030));
473 
474  double statsStartTime = 0.300; // need to allow for RRC connection establishment + SRS
475  double statsDuration = 0.6;
476  double tolerance = 0.1;
477  Simulator::Stop(Seconds(statsStartTime + statsDuration - 0.0001));
478 
479  lteHelper->EnableRlcTraces();
480  lteHelper->EnableMacTraces();
481  Ptr<RadioBearerStatsCalculator> rlcStats = lteHelper->GetRlcStats();
482  rlcStats->SetAttribute("StartTime", TimeValue(Seconds(statsStartTime)));
483  rlcStats->SetAttribute("EpochDuration", TimeValue(Seconds(statsDuration)));
484 
485  Simulator::Run();
486 
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,
505  m_thrRefDl,
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,
531  m_thrRefUl,
532  m_thrRefUl * tolerance,
533  " Unfair Throughput!");
534  }
535  Simulator::Destroy();
536 }
537 
538 // --------------- T E S T - C A S E # 2 ------------------------------
539 
540 std::string
541 LenaCqaFfMacSchedulerTestCase2::BuildNameString(uint16_t nUser, std::vector<double> dist)
542 {
543  std::ostringstream oss;
544  oss << "distances (m) = [ ";
545  for (auto it = dist.begin(); it != dist.end(); ++it)
546  {
547  oss << *it << " ";
548  }
549  oss << "]";
550  return oss.str();
551 }
552 
554  std::vector<uint32_t> estThrCqaDl,
555  std::vector<uint16_t> packetSize,
556  uint16_t interval,
557  bool errorModelEnabled)
558  : TestCase(BuildNameString(dist.size(), dist)),
559  m_nUser(dist.size()),
560  m_dist(dist),
561  m_packetSize(packetSize),
562  m_interval(interval),
563  m_estThrCqaDl(estThrCqaDl),
564  m_errorModelEnabled(errorModelEnabled)
565 {
566 }
567 
569 {
570 }
571 
572 void
574 {
575  if (!m_errorModelEnabled)
576  {
577  Config::SetDefault("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue(false));
578  Config::SetDefault("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue(false));
579  }
580 
581  Config::SetDefault("ns3::LteHelper::UseIdealRrc", BooleanValue(true));
582  Config::SetDefault("ns3::MacStatsCalculator::DlOutputFilename",
583  StringValue(CreateTempDirFilename("DlMacStats.txt")));
584  Config::SetDefault("ns3::MacStatsCalculator::UlOutputFilename",
585  StringValue(CreateTempDirFilename("UlMacStats.txt")));
586  Config::SetDefault("ns3::RadioBearerStatsCalculator::DlRlcOutputFilename",
587  StringValue(CreateTempDirFilename("DlRlcStats.txt")));
588  Config::SetDefault("ns3::RadioBearerStatsCalculator::UlRlcOutputFilename",
589  StringValue(CreateTempDirFilename("UlRlcStats.txt")));
590 
591  Ptr<LteHelper> lteHelper = CreateObject<LteHelper>();
592  Ptr<PointToPointEpcHelper> epcHelper = CreateObject<PointToPointEpcHelper>();
593  lteHelper->SetEpcHelper(epcHelper);
594 
595  Ptr<Node> pgw = epcHelper->GetPgwNode();
596 
597  // Create a single RemoteHost
598  NodeContainer remoteHostContainer;
599  remoteHostContainer.Create(1);
600  Ptr<Node> remoteHost = remoteHostContainer.Get(0);
602  internet.Install(remoteHostContainer);
603 
604  // Create the Internet
605  PointToPointHelper p2ph;
606  p2ph.SetDeviceAttribute("DataRate", DataRateValue(DataRate("100Gb/s")));
607  p2ph.SetDeviceAttribute("Mtu", UintegerValue(1500));
608  p2ph.SetChannelAttribute("Delay", TimeValue(Seconds(0.001)));
609  NetDeviceContainer internetDevices = p2ph.Install(pgw, remoteHost);
610  Ipv4AddressHelper ipv4h;
611  ipv4h.SetBase("1.0.0.0", "255.0.0.0");
612  Ipv4InterfaceContainer internetIpIfaces = ipv4h.Assign(internetDevices);
613  // interface 0 is localhost, 1 is the p2p device
614  Ipv4Address remoteHostAddr = internetIpIfaces.GetAddress(1);
615 
616  Ipv4StaticRoutingHelper ipv4RoutingHelper;
617  Ptr<Ipv4StaticRouting> remoteHostStaticRouting =
618  ipv4RoutingHelper.GetStaticRouting(remoteHost->GetObject<Ipv4>());
619  remoteHostStaticRouting->AddNetworkRouteTo(Ipv4Address("7.0.0.0"), Ipv4Mask("255.0.0.0"), 1);
620 
621  // LogComponentDisableAll (LOG_LEVEL_ALL);
622  // LogComponentEnable ("LenaTestCqaFfMacScheduler", LOG_LEVEL_ALL);
623 
624  lteHelper->SetAttribute("PathlossModel", StringValue("ns3::FriisSpectrumPropagationLossModel"));
625 
626  // Create Nodes: eNodeB and UE
627  NodeContainer enbNodes;
628  NodeContainer ueNodes;
629  enbNodes.Create(1);
630  ueNodes.Create(m_nUser);
631 
632  // Install Mobility Model
634  mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel");
635  mobility.Install(enbNodes);
636  mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel");
637  mobility.Install(ueNodes);
638 
639  // Create Devices and install them in the Nodes (eNB and UE)
640  NetDeviceContainer enbDevs;
641  NetDeviceContainer ueDevs;
642  lteHelper->SetSchedulerType("ns3::CqaFfMacScheduler");
643  lteHelper->SetSchedulerAttribute("UlCqiFilter", EnumValue(FfMacScheduler::SRS_UL_CQI));
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  for (uint32_t u = 0; u < ueNodes.GetN(); ++u)
685  {
686  Ptr<NetDevice> ueDevice = ueDevs.Get(u);
687  GbrQosInformation qos;
688  qos.gbrDl = (m_packetSize.at(u) + 32) * (1000 / m_interval) *
689  8; // bit/s, considering IP, UDP, RLC, PDCP header size
690  qos.gbrUl = (m_packetSize.at(u) + 32) * (1000 / m_interval) * 8;
691  qos.mbrDl = qos.gbrDl;
692  qos.mbrUl = qos.gbrUl;
693 
694  EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE;
695  EpsBearer bearer(q, qos);
696  lteHelper->ActivateDedicatedEpsBearer(ueDevice, bearer, EpcTft::Default());
697  }
698 
699  // Install downlink and uplink applications
700  uint16_t dlPort = 1234;
701  uint16_t ulPort = 2000;
704  PacketSinkHelper dlPacketSinkHelper("ns3::UdpSocketFactory",
705  InetSocketAddress(Ipv4Address::GetAny(), dlPort));
706 
707  for (uint32_t u = 0; u < ueNodes.GetN(); ++u)
708  {
709  ++ulPort;
710  PacketSinkHelper ulPacketSinkHelper("ns3::UdpSocketFactory",
711  InetSocketAddress(Ipv4Address::GetAny(), ulPort));
712  serverApps.Add(ulPacketSinkHelper.Install(remoteHost)); // receive packets from UEs
713  serverApps.Add(
714  dlPacketSinkHelper.Install(ueNodes.Get(u))); // receive packets from remotehost
715 
716  UdpClientHelper dlClient(ueIpIface.GetAddress(u), dlPort); // downlink packets generator
717  dlClient.SetAttribute("Interval", TimeValue(MilliSeconds(m_interval)));
718  dlClient.SetAttribute("MaxPackets", UintegerValue(1000000));
719  dlClient.SetAttribute("PacketSize", UintegerValue(m_packetSize.at(u)));
720 
721  UdpClientHelper ulClient(remoteHostAddr, ulPort); // uplink packets generator
722  ulClient.SetAttribute("Interval", TimeValue(MilliSeconds(m_interval)));
723  ulClient.SetAttribute("MaxPackets", UintegerValue(1000000));
724  ulClient.SetAttribute("PacketSize", UintegerValue(m_packetSize.at(u)));
725 
726  clientApps.Add(dlClient.Install(remoteHost));
727  clientApps.Add(ulClient.Install(ueNodes.Get(u)));
728  }
729 
730  serverApps.Start(Seconds(0.030));
731  clientApps.Start(Seconds(0.030));
732 
733  double statsStartTime = 0.04; // need to allow for RRC connection establishment + SRS
734  double statsDuration = 0.5;
735  double tolerance = 0.1;
736  Simulator::Stop(Seconds(statsStartTime + statsDuration - 0.0001));
737 
738  lteHelper->EnableRlcTraces();
739  Ptr<RadioBearerStatsCalculator> rlcStats = lteHelper->GetRlcStats();
740  rlcStats->SetAttribute("StartTime", TimeValue(Seconds(statsStartTime)));
741  rlcStats->SetAttribute("EpochDuration", TimeValue(Seconds(statsDuration)));
742 
743  Simulator::Run();
744 
750  NS_LOG_INFO("DL - Test with " << m_nUser << " user(s)");
751  std::vector<uint64_t> dlDataRxed;
752  for (int i = 0; i < m_nUser; i++)
753  {
754  // get the imsi
755  uint64_t imsi = ueDevs.Get(i)->GetObject<LteUeNetDevice>()->GetImsi();
756  // get the lcId
757  uint8_t lcId = 4;
758  dlDataRxed.push_back(rlcStats->GetDlRxData(imsi, lcId));
759  NS_LOG_INFO("\tUser " << i << " dist " << m_dist.at(i) << " imsi " << imsi << " bytes rxed "
760  << (double)dlDataRxed.at(i) << " thr "
761  << (double)dlDataRxed.at(i) / statsDuration << " ref "
762  << m_estThrCqaDl.at(i));
763  }
764 
765  for (int i = 0; i < m_nUser; i++)
766  {
767  NS_TEST_ASSERT_MSG_EQ_TOL((double)dlDataRxed.at(i) / statsDuration,
768  m_estThrCqaDl.at(i),
769  m_estThrCqaDl.at(i) * tolerance,
770  " Unfair Throughput!");
771  }
772 
773  Simulator::Destroy();
774 }
double m_dist
distance between the nodes
double m_thrRefUl
estimated uplink throughput
void DoRun() override
Implementation to actually run this TestCase.
uint16_t m_packetSize
packet size in bytes
LenaCqaFfMacSchedulerTestCase1(uint16_t nUser, double dist, double thrRefDl, double thrRefUl, uint16_t packetSize, uint16_t interval, bool errorModelEnabled)
Constructor.
double m_thrRefDl
estimated downlink throughput
static std::string BuildNameString(uint16_t nUser, double dist)
Builds the test name string based on provided parameter values.
bool m_errorModelEnabled
whether error model is enabled
bool m_errorModelEnabled
whether the error model is enabled
uint16_t m_interval
UDP interval time in ms.
static std::string BuildNameString(uint16_t nUser, std::vector< double > dist)
Builds the test name string based on provided parameter values.
std::vector< double > m_dist
distance between the nodes
LenaCqaFfMacSchedulerTestCase2(std::vector< double > dist, std::vector< uint32_t > estThrCqaDl, std::vector< uint16_t > packetSize, uint16_t interval, bool errorModelEnabled)
Constructor.
std::vector< uint16_t > m_packetSize
packet size in bytes
std::vector< uint32_t > m_estThrCqaDl
estimated throughput CQA DL
void DoRun() override
Implementation to actually run this TestCase.
The test suite for testing CQA scheduler functionality.
holds a vector of ns3::Application pointers.
Mobility model for which the current position does not change once it has been set and until it is se...
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:62
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.
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:42
Access to the IPv4 forwarding table, interfaces, and configuration.
Definition: ipv4.h:80
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:257
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:285
Ptr< RadioBearerStatsCalculator > GetRlcStats()
Definition: lte-helper.cc:1701
void SetSchedulerAttribute(std::string n, const AttributeValue &v)
Set an attribute for the scheduler to be created.
Definition: lte-helper.cc:306
NetDeviceContainer InstallEnbDevice(NodeContainer c)
Create a set of eNodeB devices.
Definition: lte-helper.cc:485
void SetSchedulerType(std::string type)
Set the type of scheduler to be used by eNodeB devices.
Definition: lte-helper.cc:292
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:1039
void EnableRlcTraces()
Enable trace sinks for RLC layer.
Definition: lte-helper.cc:1558
NetDeviceContainer InstallUeDevice(NodeContainer c)
Create a set of UE devices.
Definition: lte-helper.cc:500
void EnableMacTraces()
Enable trace sinks for MAC layer.
Definition: lte-helper.cc:1659
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:1154
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:204
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:56
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:301
std::string CreateTempDirFilename(std::string filename)
Construct the full path to a file in a temporary directory.
Definition: test.cc:438
std::string GetName() const
Definition: test.cc:373
A suite of tests to run.
Definition: test.h:1256
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:890
#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
static LenaTestCqaFfMacSchedulerSuite lenaTestCqaFfMacSchedulerSuite
Static variable for test initialization.
void(* DataRate)(DataRate oldValue, DataRate newValue)
TracedValue callback signature for DataRate.
Definition: data-rate.h:327
#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:1326
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1338
serverApps
Definition: first.py:54
clientApps
Definition: first.py:64
Every class exported by the ns3 library is enclosed in the ns3 namespace.
mobility
Definition: third.py:105
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.