A Discrete-Event Network Simulator
API
lte-test-cqa-ff-mac-scheduler.cc
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Biljana Bojovic<bbojovic@cttc.es>
19  * Dizhi Zhou <dizhi.zhou@gmail.com>
20  * Marco Miozzo <marco.miozzo@cttc.es>,
21  * Nicola Baldo <nbaldo@cttc.es>
22  *
23  */
24 
25 #include <iostream>
26 #include <sstream>
27 #include <string>
28 
29 #include <ns3/object.h>
30 #include <ns3/spectrum-interference.h>
31 #include <ns3/spectrum-error-model.h>
32 #include <ns3/log.h>
33 #include <ns3/test.h>
34 #include <ns3/simulator.h>
35 #include <ns3/packet.h>
36 #include <ns3/ptr.h>
37 #include "ns3/radio-bearer-stats-calculator.h"
38 #include <ns3/constant-position-mobility-model.h>
39 #include <ns3/eps-bearer.h>
40 #include <ns3/node-container.h>
41 #include <ns3/mobility-helper.h>
42 #include <ns3/net-device-container.h>
43 #include <ns3/lte-ue-net-device.h>
44 #include <ns3/lte-enb-net-device.h>
45 #include <ns3/lte-ue-rrc.h>
46 #include <ns3/lte-helper.h>
47 #include "ns3/string.h"
48 #include "ns3/double.h"
49 #include <ns3/lte-enb-phy.h>
50 #include <ns3/lte-ue-phy.h>
51 #include <ns3/boolean.h>
52 #include <ns3/enum.h>
53 
54 #include "ns3/point-to-point-epc-helper.h"
55 #include "ns3/network-module.h"
56 #include "ns3/ipv4-global-routing-helper.h"
57 #include "ns3/internet-module.h"
58 #include "ns3/applications-module.h"
59 #include "ns3/point-to-point-helper.h"
60 
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) * 1000 byte/sec -> 232000 byte/rate
86  // Totol bandwidth: 24 PRB at Itbs 26 -> 2196 -> 2196000 byte/sec
87  // 1 user -> 232000 * 1 = 232000 < 2196000 -> throughput = 232000 byte/sec
88  // 3 user -> 232000 * 3 = 696000 < 2196000 -> througphut = 232000 byte/sec
89  // 6 user -> 232000 * 6 = 139200 < 2196000 -> throughput = 232000 byte/sec
90  // 12 user -> 232000 * 12 = 2784000 > 2196000 -> throughput = 2196000 / 12 = 183000 byte/sec
91  // UPLINK -> DISTANCE 0 -> MCS 28 -> Itbs 26 (from table 7.1.7.2.1-1 of 36.2 13)
92  // 1 user -> 25 PRB at Itbs 26 -> 2292 -> 2292000 > 232000 -> throughput = 232000 bytes/sec
93  // 3 users -> 8 PRB at Itbs 26 -> 749 -> 749000 > 232000 -> throughput = 232000 bytes/sec
94  // 6 users -> 4 PRB at Itbs 26 -> 373 -> 373000 > 232000 -> throughput = 232000 bytes/sec
95  // 12 users -> 2 PRB at Itbs 26 -> 185 -> 185000 < 232000 -> throughput = 185000 bytes/sec
96  AddTestCase (new LenaCqaFfMacSchedulerTestCase1 (1,0,232000,232000,200,1,errorModel), TestCase::EXTENSIVE);
97  AddTestCase (new LenaCqaFfMacSchedulerTestCase1 (3,0,232000,232000,200,1,errorModel), TestCase::EXTENSIVE);
98  AddTestCase (new LenaCqaFfMacSchedulerTestCase1 (6,0,232000,232000,200,1,errorModel), TestCase::EXTENSIVE);
99 
100  //AddTestCase (new LenaCqaFfMacSchedulerTestCase1 (12,0,183000,185000,200,1,errorModel));// simulation time = 1.5, otherwise, ul test will fail
101 
102  // DOWNLINK - DISTANCE 4800 -> MCS 22 -> Itbs 20 (from table 7.1.7.2.1-1 of 36.213)
103  // Traffic info
104  // UDP traffic: payload size = 200 bytes, interval = 1 ms
105  // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000 byte/sec -> 232000 byte/rate
106  // Totol bandwidth: 24 PRB at Itbs 20 -> 1383 -> 1383000 byte/sec
107  // 1 user -> 903000 * 1 = 232000 < 1383000 -> throughput = 232000 byte/sec
108  // 3 user -> 232000 * 3 = 696000 < 1383000 -> througphut = 232000 byte/sec
109  // 6 user -> 232000 * 6 = 139200 > 1383000 -> throughput = 1383000 / 6 = 230500 byte/sec
110  // 12 user -> 232000 * 12 = 2784000 > 1383000 -> throughput = 1383000 / 12 = 115250 byte/sec
111  // UPLINK - DISTANCE 4800 -> MCS 14 -> Itbs 13 (from table 7.1.7.2.1-1 of 36.213)
112  // 1 user -> 25 PRB at Itbs 13 -> 807 -> 807000 > 232000 -> throughput = 232000 bytes/sec
113  // 3 users -> 8 PRB at Itbs 13 -> 253 -> 253000 > 232000 -> throughput = 232000 bytes/sec
114  // 6 users -> 4 PRB at Itbs 13 -> 125 -> 125000 < 232000 -> throughput = 125000 bytes/sec
115  // after the patch enforcing min 3 PRBs per UE:
116  // 12 users -> 3 PRB at Itbs 13 -> 93 bytes * 8/12 UE/TTI -> 62000 < 232000 -> throughput = 62000 bytes/sec
117  AddTestCase (new LenaCqaFfMacSchedulerTestCase1 (1,4800,232000,232000,200,1,errorModel), TestCase::EXTENSIVE);
118  AddTestCase (new LenaCqaFfMacSchedulerTestCase1 (3,4800,232000,232000,200,1,errorModel), TestCase::EXTENSIVE);
119  AddTestCase (new LenaCqaFfMacSchedulerTestCase1 (6,4800,230500,125000,200,1,errorModel), TestCase::EXTENSIVE);
120  //AddTestCase (new LenaCqaFfMacSchedulerTestCase1 (12,4800,115250,62000,200,1,errorModel)); // simulation time = 1.5, otherwise, ul test will fail
121 
122  // DOWNLINK - DISTANCE 6000 -> MCS 20 -> Itbs 18 (from table 7.1.7.2.1-1 of 36.213)
123  // Traffic info
124  // UDP traffic: payload size = 200 bytes, interval = 1 ms
125  // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000 byte/sec -> 232000 byte/rate
126  // Totol bandwidth: 24 PRB at Itbs 18 -> 1191 -> 1191000 byte/sec
127  // 1 user -> 903000 * 1 = 232000 < 1191000 -> throughput = 232000 byte/sec
128  // 3 user -> 232000 * 3 = 696000 < 1191000 -> througphut = 232000 byte/sec
129  // 6 user -> 232000 * 6 = 1392000 > 1191000 -> throughput = 1191000 / 6 = 198500 byte/sec
130  // 12 user -> 232000 * 12 = 2784000 > 1191000 -> throughput = 1191000 / 12 = 99250 byte/sec
131 
132  // UPLINK - DISTANCE 6000 -> MCS 12 -> Itbs 11 (from table 7.1.7.2.1-1 of 36.213)
133  // 1 user -> 25 PRB at Itbs 11 -> 621 -> 621000 > 232000 -> throughput = 232000 bytes/sec
134  // 3 users -> 8 PRB at Itbs 11 -> 201 -> 201000 < 232000 -> throughput = 201000 bytes/sec
135  // 6 users -> 4 PRB at Itbs 11 -> 97 -> 97000 < 232000 -> throughput = 97000 bytes/sec
136  // after the patch enforcing min 3 PRBs per UE:
137  // 12 users -> 3 PRB at Itbs 11 -> 73 bytes * 8/12 UE/TTI -> 48667 < 232000 -> throughput = 48667 bytes/sec
138  AddTestCase (new LenaCqaFfMacSchedulerTestCase1 (1,6000,232000,232000,200,1,errorModel), TestCase::EXTENSIVE);
139  AddTestCase (new LenaCqaFfMacSchedulerTestCase1 (3,6000,232000,201000,200,1,errorModel), TestCase::EXTENSIVE);
140  AddTestCase (new LenaCqaFfMacSchedulerTestCase1 (6,6000,198500,97000,200,1,errorModel), TestCase::EXTENSIVE);
141  //AddTestCase (new LenaCqaFfMacSchedulerTestCase1 (12,6000,99250,48667,200,1, errorModel)); // simulation time = 1.5, otherwise, ul test will fail
142 
143  // DOWNLINK - DISTANCE 10000 -> MCS 14 -> Itbs 13 (from table 7.1.7.2.1-1 of 36.213)
144  // Traffic info
145  // UDP traffic: payload size = 200 bytes, interval = 1 ms
146  // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000 byte/sec -> 232000 byte/rate
147  // Totol bandwidth: 24 PRB at Itbs 13 -> 775 -> 775000 byte/sec
148  // 1 user -> 903000 * 1 = 232000 < 775000 -> throughput = 232000 byte/sec
149  // 3 user -> 232000 * 3 = 696000 > 775000 -> througphut = 232000 byte/sec
150  // 6 user -> 232000 * 6 = 139200 > 775000 -> throughput = 775000 / 6 = 129166 byte/sec
151  // 12 user -> 232000 * 12 = 2784000 > 775000 -> throughput = 775000 / 12 = 64583 byte/sec
152  // UPLINK - DISTANCE 10000 -> MCS 8 -> Itbs 8 (from table 7.1.7.2.1-1 of 36.213)
153  // 1 user -> 24 PRB at Itbs 8 -> 437 -> 437000 > 232000 -> throughput = 232000 bytes/sec
154  // 3 users -> 8 PRB at Itbs 8 -> 137 -> 137000 < 232000 -> throughput = 137000 bytes/sec
155  // 6 users -> 4 PRB at Itbs 8 -> 67 -> 67000 < 232000 -> throughput = 67000 bytes/sec
156  // after the patch enforcing min 3 PRBs per UE:
157  // 12 users -> 3 PRB at Itbs 8 -> 49 bytes * 8/12 UE/TTI -> 32667 < 232000 -> throughput = 32667 bytes/sec
158  AddTestCase (new LenaCqaFfMacSchedulerTestCase1 (1,10000,232000,232000,200,1,errorModel), TestCase::EXTENSIVE);
159  AddTestCase (new LenaCqaFfMacSchedulerTestCase1 (3,10000,232000,137000,200,1,errorModel), TestCase::EXTENSIVE);
160  AddTestCase (new LenaCqaFfMacSchedulerTestCase1 (6,10000,129166,67000,200,1,errorModel), TestCase::EXTENSIVE);
161  //AddTestCase (new LenaCqaFfMacSchedulerTestCase1 (12,10000,64583,32667,200,1,errorModel));// simulation time = 1.5, otherwise, ul test will fail
162 
163  // Test Case 2: homogeneous flow test in CQA (different distance)
164  // Traffic1 info
165  // UDP traffic: payload size = 100 bytes, interval = 1 ms
166  // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000 byte/sec -> 132000 byte/rate
167  // Maximum throughput = 4 / ( 1/2196000 + 1/1191000 + 1/1383000 + 1/775000 ) = 1209046 byte/s
168  // 132000 * 4 = 528000 < 1209046 -> estimated throughput in downlink = 132000 byte/sec
169  std::vector<uint16_t> dist1;
170  dist1.push_back (0); // User 0 distance --> MCS 28
171  dist1.push_back (4800); // User 1 distance --> MCS 22
172  dist1.push_back (6000); // User 2 distance --> MCS 20
173  dist1.push_back (10000); // User 3 distance --> MCS 14
174  std::vector<uint16_t> packetSize1;
175  packetSize1.push_back (100);
176  packetSize1.push_back (100);
177  packetSize1.push_back (100);
178  packetSize1.push_back (100);
179  std::vector<uint32_t> estThrCqaDl1;
180  estThrCqaDl1.push_back (132000); // User 0 estimated TTI throughput from CQA
181  estThrCqaDl1.push_back (132000); // User 1 estimated TTI throughput from CQA
182  estThrCqaDl1.push_back (132000); // User 2 estimated TTI throughput from CQA
183  estThrCqaDl1.push_back (132000); // User 3 estimated TTI throughput from CQA
184  AddTestCase (new LenaCqaFfMacSchedulerTestCase2 (dist1,estThrCqaDl1,packetSize1,1,errorModel), TestCase::QUICK);
185 
186  // Traffic2 info
187  // UDP traffic: payload size = 200 bytes, interval = 1 ms
188  // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000 byte/sec -> 232000 byte/rate
189  // Maximum throughput = 4 / ( 1/2196000 + 1/1191000 + 1/1383000 + 1/775000 ) = 1209046 byte/s
190  // 232000 * 4 = 928000 < 1209046 -> estimated throughput in downlink = 928000 / 4 = 230000 byte/sec
191  std::vector<uint16_t> dist2;
192  dist2.push_back (0); // User 0 distance --> MCS 28
193  dist2.push_back (4800); // User 1 distance --> MCS 22
194  dist2.push_back (6000); // User 2 distance --> MCS 20
195  dist2.push_back (10000); // User 3 distance --> MCS 14
196  std::vector<uint16_t> packetSize2;
197  packetSize2.push_back (200);
198  packetSize2.push_back (200);
199  packetSize2.push_back (200);
200  packetSize2.push_back (200);
201  std::vector<uint32_t> estThrCqaDl2;
202  estThrCqaDl2.push_back (230000); // User 0 estimated TTI throughput from CQA
203  estThrCqaDl2.push_back (230000); // User 1 estimated TTI throughput from CQA
204  estThrCqaDl2.push_back (230000); // User 2 estimated TTI throughput from CQA
205  estThrCqaDl2.push_back (230000); // User 3 estimated TTI throughput from CQA
206  AddTestCase (new LenaCqaFfMacSchedulerTestCase2 (dist2,estThrCqaDl2,packetSize2,1,errorModel), TestCase::QUICK);
207 
208  // Test Case 3: heterogeneous flow test in CQA
209  // UDP traffic: payload size = [100,200,300] bytes, interval = 1 ms
210  // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000 byte/sec -> [132000, 232000, 332000] byte/rate
211  // Maximum throughput = 3 / ( 1/2196000 + 1/1191000 + 1/1383000) = 1486569 byte/s
212  // 132000 + 232000 + 332000 = 696000 < 1486569 -> estimated throughput in downlink = [132000, 232000, 332000] byte/sec
213  std::vector<uint16_t> dist3;
214  dist3.push_back (0); // User 0 distance --> MCS 28
215  dist3.push_back (4800); // User 1 distance --> MCS 22
216  dist3.push_back (6000); // User 2 distance --> MCS 20
217  std::vector<uint16_t> packetSize3;
218  packetSize3.push_back (100);
219  packetSize3.push_back (200);
220  packetSize3.push_back (300);
221  std::vector<uint32_t> estThrCqaDl3;
222  estThrCqaDl3.push_back (132000); // User 0 estimated TTI throughput from CQA
223  estThrCqaDl3.push_back (232000); // User 1 estimated TTI throughput from CQA
224  estThrCqaDl3.push_back (332000); // User 2 estimated TTI throughput from CQA
225  AddTestCase (new LenaCqaFfMacSchedulerTestCase2 (dist3,estThrCqaDl3,packetSize3,1,errorModel), TestCase::QUICK);
226 
227 }
228 
230 
231 // --------------- T E S T - C A S E # 1 ------------------------------
232 
233 
234 std::string
235 LenaCqaFfMacSchedulerTestCase1::BuildNameString (uint16_t nUser, uint16_t dist)
236 {
237  std::ostringstream oss;
238  oss << nUser << " UEs, distance " << dist << " m";
239  return oss.str ();
240 }
241 
242 
243 LenaCqaFfMacSchedulerTestCase1::LenaCqaFfMacSchedulerTestCase1 (uint16_t nUser, uint16_t dist, double thrRefDl, double thrRefUl, uint16_t packetSize, uint16_t interval,bool errorModelEnabled)
244  : TestCase (BuildNameString (nUser, dist)),
245  m_nUser (nUser),
246  m_dist (dist),
247  m_packetSize (packetSize),
248  m_interval (interval),
249  m_thrRefDl (thrRefDl),
250  m_thrRefUl (thrRefUl),
251  m_errorModelEnabled (errorModelEnabled)
252 {
253 }
254 
256 {
257 }
258 
259 void
261 {
262  NS_LOG_FUNCTION (this << GetName ());
263 
264  if (!m_errorModelEnabled)
265  {
266  Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (false));
267  Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (false));
268  }
269 
270  Config::SetDefault ("ns3::LteHelper::UseIdealRrc", BooleanValue (true));
271 
272  Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
273  Ptr<PointToPointEpcHelper> epcHelper = CreateObject<PointToPointEpcHelper> ();
274  lteHelper->SetEpcHelper (epcHelper);
275 
276  //LogComponentEnable ("CqaFfMacScheduler", LOG_DEBUG);
277 
278  Ptr<Node> pgw = epcHelper->GetPgwNode ();
279 
280  // Create a single RemoteHost
281  NodeContainer remoteHostContainer;
282  remoteHostContainer.Create (1);
283  Ptr<Node> remoteHost = remoteHostContainer.Get (0);
284  InternetStackHelper internet;
285  internet.Install (remoteHostContainer);
286 
287  // Create the Internet
288  PointToPointHelper p2ph;
289  p2ph.SetDeviceAttribute ("DataRate", DataRateValue (DataRate ("100Gb/s")));
290  p2ph.SetDeviceAttribute ("Mtu", UintegerValue (1500));
291  p2ph.SetChannelAttribute ("Delay", TimeValue (Seconds (0.001)));
292  NetDeviceContainer internetDevices = p2ph.Install (pgw, remoteHost);
293  Ipv4AddressHelper ipv4h;
294  ipv4h.SetBase ("1.0.0.0", "255.0.0.0");
295  Ipv4InterfaceContainer internetIpIfaces = ipv4h.Assign (internetDevices);
296  // interface 0 is localhost, 1 is the p2p device
297  Ipv4Address remoteHostAddr = internetIpIfaces.GetAddress (1);
298 
299  Ipv4StaticRoutingHelper ipv4RoutingHelper;
300  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
301  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);
302 
303  //Config::SetDefault ("ns3::LteAmc::AmcModel", EnumValue (LteAmc::PiroEW2010));
304  //Config::SetDefault ("ns3::LteAmc::Ber", DoubleValue (0.00005));
305  //Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (false));
306  //Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (false));
307 
308  //Config::SetDefault ("ns3::LteEnbRrc::EpsBearerToRlcMapping", EnumValue (LteHelper::RLC_UM_ALWAYS));
309 
310 // LogComponentDisableAll (LOG_LEVEL_ALL);
311  //LogComponentEnable ("LenaTestCqaFfMacCheduler", LOG_LEVEL_ALL);
312 
313  lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel"));
314 
315  // Create Nodes: eNodeB and UE
316  NodeContainer enbNodes;
317  NodeContainer ueNodes;
318  enbNodes.Create (1);
319  ueNodes.Create (m_nUser);
320 
321  // Install Mobility Model
323  mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
324  mobility.Install (enbNodes);
325  mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
326  mobility.Install (ueNodes);
327 
328  // Create Devices and install them in the Nodes (eNB and UE)
329  NetDeviceContainer enbDevs;
330  NetDeviceContainer ueDevs;
331  lteHelper->SetSchedulerType ("ns3::CqaFfMacScheduler");
332  enbDevs = lteHelper->InstallEnbDevice (enbNodes);
333  ueDevs = lteHelper->InstallUeDevice (ueNodes);
334 
335 
336  Ptr<LteEnbNetDevice> lteEnbDev = enbDevs.Get (0)->GetObject<LteEnbNetDevice> ();
337  Ptr<LteEnbPhy> enbPhy = lteEnbDev->GetPhy ();
338  enbPhy->SetAttribute ("TxPower", DoubleValue (30.0));
339  enbPhy->SetAttribute ("NoiseFigure", DoubleValue (5.0));
340 
341  // Set UEs' position and power
342  for (int i = 0; i < m_nUser; i++)
343  {
345  mm->SetPosition (Vector (m_dist, 0.0, 0.0));
346  Ptr<LteUeNetDevice> lteUeDev = ueDevs.Get (i)->GetObject<LteUeNetDevice> ();
347  Ptr<LteUePhy> uePhy = lteUeDev->GetPhy ();
348  uePhy->SetAttribute ("TxPower", DoubleValue (23.0));
349  uePhy->SetAttribute ("NoiseFigure", DoubleValue (9.0));
350  }
351 
352  // Install the IP stack on the UEs
353  internet.Install (ueNodes);
354  Ipv4InterfaceContainer ueIpIface;
355  ueIpIface = epcHelper->AssignUeIpv4Address (NetDeviceContainer (ueDevs));
356 
357  // Assign IP address to UEs
358  for (uint32_t u = 0; u < ueNodes.GetN (); ++u)
359  {
360  Ptr<Node> ueNode = ueNodes.Get (u);
361  // Set the default gateway for the UE
362  Ptr<Ipv4StaticRouting> ueStaticRouting = ipv4RoutingHelper.GetStaticRouting (ueNode->GetObject<Ipv4> ());
363  ueStaticRouting->SetDefaultRoute (epcHelper->GetUeDefaultGatewayAddress (), 1);
364  }
365 
366  // Attach a UE to a eNB
367  lteHelper->Attach (ueDevs, enbDevs.Get (0));
368 
369  // Activate an EPS bearer on all UEs
370  for (uint32_t u = 0; u < ueNodes.GetN (); ++u)
371  {
372  Ptr<NetDevice> ueDevice = ueDevs.Get (u);
373  GbrQosInformation qos;
374  qos.gbrDl = (m_packetSize + 32) * (1000 / m_interval) * 8; // bit/s, considering IP, UDP, RLC, PDCP header size
375  qos.gbrUl = (m_packetSize + 32) * (1000 / m_interval) * 8;
376  qos.mbrDl = 0;
377  qos.mbrUl = 0;
378 
379  enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE;
380  EpsBearer bearer (q, qos);
381  lteHelper->ActivateDedicatedEpsBearer (ueDevice, bearer, EpcTft::Default ());
382  }
383 
384  // Install downlind and uplink applications
385  uint16_t dlPort = 1234;
386  uint16_t ulPort = 2000;
387  PacketSinkHelper dlPacketSinkHelper ("ns3::UdpSocketFactory", InetSocketAddress (Ipv4Address::GetAny (), dlPort));
388  PacketSinkHelper ulPacketSinkHelper ("ns3::UdpSocketFactory", InetSocketAddress (Ipv4Address::GetAny (), ulPort));
391  for (uint32_t u = 0; u < ueNodes.GetN (); ++u)
392  {
393  ++ulPort;
394  serverApps.Add (dlPacketSinkHelper.Install (ueNodes.Get (u))); // receive packets from remotehost
395  serverApps.Add (ulPacketSinkHelper.Install (remoteHost)); // receive packets from UEs
396 
397  UdpClientHelper dlClient (ueIpIface.GetAddress (u), dlPort); // uplink packets generator
398  dlClient.SetAttribute ("Interval", TimeValue (MilliSeconds (m_interval)));
399  dlClient.SetAttribute ("MaxPackets", UintegerValue (1000000));
400  dlClient.SetAttribute ("PacketSize", UintegerValue (m_packetSize));
401 
402  UdpClientHelper ulClient (remoteHostAddr, ulPort); // downlink packets generator
403  ulClient.SetAttribute ("Interval", TimeValue (MilliSeconds (m_interval)));
404  ulClient.SetAttribute ("MaxPackets", UintegerValue (1000000));
405  ulClient.SetAttribute ("PacketSize", UintegerValue (m_packetSize));
406 
407  clientApps.Add (dlClient.Install (remoteHost));
408  clientApps.Add (ulClient.Install (ueNodes.Get (u)));
409  }
410 
411  serverApps.Start (Seconds (0.030));
412  clientApps.Start (Seconds (0.030));
413 
414  double statsStartTime = 0.04; // need to allow for RRC connection establishment + SRS
415  double statsDuration = 0.5;
416  double tolerance = 0.1;
417  Simulator::Stop (Seconds (statsStartTime + statsDuration - 0.0001));
418 
419  lteHelper->EnableRlcTraces ();
420  lteHelper->EnableMacTraces ();
421  Ptr<RadioBearerStatsCalculator> rlcStats = lteHelper->GetRlcStats ();
422  rlcStats->SetAttribute ("StartTime", TimeValue (Seconds (statsStartTime)));
423  rlcStats->SetAttribute ("EpochDuration", TimeValue (Seconds (statsDuration)));
424 
425  Simulator::Run ();
426 
431  NS_LOG_INFO ("DL - Test with " << m_nUser << " user(s) at distance " << m_dist);
432  std::vector <uint64_t> dlDataRxed;
433  for (int i = 0; i < m_nUser; i++)
434  {
435  // get the imsi
436  uint64_t imsi = ueDevs.Get (i)->GetObject<LteUeNetDevice> ()->GetImsi ();
437  // get the lcId
438  uint8_t lcId = 4;
439  uint64_t data = rlcStats->GetDlRxData (imsi, lcId);
440  dlDataRxed.push_back (data);
441  NS_LOG_INFO ("\tUser " << i << " imsi " << imsi << " bytes rxed " << (double)dlDataRxed.at (i) << " thr " << (double)dlDataRxed.at (i) / statsDuration << " ref " << m_thrRefDl);
442  }
443 
444  for (int i = 0; i < m_nUser; i++)
445  {
446  NS_TEST_ASSERT_MSG_EQ_TOL ((double)dlDataRxed.at (i) / statsDuration, m_thrRefDl, m_thrRefDl * tolerance, " Unfair Throughput!");
447  }
448 
453  NS_LOG_INFO ("UL - Test with " << m_nUser << " user(s) at distance " << m_dist);
454  std::vector <uint64_t> ulDataRxed;
455  for (int i = 0; i < m_nUser; i++)
456  {
457  // get the imsi
458  uint64_t imsi = ueDevs.Get (i)->GetObject<LteUeNetDevice> ()->GetImsi ();
459  // get the lcId
460  uint8_t lcId = 4;
461  ulDataRxed.push_back (rlcStats->GetUlRxData (imsi, lcId));
462  NS_LOG_INFO ("\tUser " << i << " imsi " << imsi << " bytes rxed " << (double)ulDataRxed.at (i) << " thr " << (double)ulDataRxed.at (i) / statsDuration << " ref " << m_thrRefUl);
463  }
464 
465  for (int i = 0; i < m_nUser; i++)
466  {
467  NS_TEST_ASSERT_MSG_EQ_TOL ((double)ulDataRxed.at (i) / statsDuration, m_thrRefUl, m_thrRefUl * tolerance, " Unfair Throughput!");
468  }
469  Simulator::Destroy ();
470 
471 }
472 
473 
474 
475 // --------------- T E S T - C A S E # 2 ------------------------------
476 
477 
478 std::string
479 LenaCqaFfMacSchedulerTestCase2::BuildNameString (uint16_t nUser, std::vector<uint16_t> dist)
480 {
481  std::ostringstream oss;
482  oss << "distances (m) = [ " ;
483  for (std::vector<uint16_t>::iterator it = dist.begin (); it != dist.end (); ++it)
484  {
485  oss << *it << " ";
486  }
487  oss << "]";
488  return oss.str ();
489 }
490 
491 
492 LenaCqaFfMacSchedulerTestCase2::LenaCqaFfMacSchedulerTestCase2 (std::vector<uint16_t> dist, std::vector<uint32_t> estThrCqaDl, std::vector<uint16_t> packetSize, uint16_t interval,bool errorModelEnabled)
493  : TestCase (BuildNameString (dist.size (), dist)),
494  m_nUser (dist.size ()),
495  m_dist (dist),
496  m_packetSize (packetSize),
497  m_interval (interval),
498  m_estThrCqaDl (estThrCqaDl),
499  m_errorModelEnabled (errorModelEnabled)
500 {
501 }
502 
504 {
505 }
506 
507 void
509 {
510 
511  if (!m_errorModelEnabled)
512  {
513  Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (false));
514  Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (false));
515  }
516 
517  Config::SetDefault ("ns3::LteHelper::UseIdealRrc", BooleanValue (true));
518 
519 
520  Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
521  Ptr<PointToPointEpcHelper> epcHelper = CreateObject<PointToPointEpcHelper> ();
522  lteHelper->SetEpcHelper (epcHelper);
523 
524  Ptr<Node> pgw = epcHelper->GetPgwNode ();
525 
526  // Create a single RemoteHost
527  NodeContainer remoteHostContainer;
528  remoteHostContainer.Create (1);
529  Ptr<Node> remoteHost = remoteHostContainer.Get (0);
530  InternetStackHelper internet;
531  internet.Install (remoteHostContainer);
532 
533  // Create the Internet
534  PointToPointHelper p2ph;
535  p2ph.SetDeviceAttribute ("DataRate", DataRateValue (DataRate ("100Gb/s")));
536  p2ph.SetDeviceAttribute ("Mtu", UintegerValue (1500));
537  p2ph.SetChannelAttribute ("Delay", TimeValue (Seconds (0.001)));
538  NetDeviceContainer internetDevices = p2ph.Install (pgw, remoteHost);
539  Ipv4AddressHelper ipv4h;
540  ipv4h.SetBase ("1.0.0.0", "255.0.0.0");
541  Ipv4InterfaceContainer internetIpIfaces = ipv4h.Assign (internetDevices);
542  // interface 0 is localhost, 1 is the p2p device
543  Ipv4Address remoteHostAddr = internetIpIfaces.GetAddress (1);
544 
545  Ipv4StaticRoutingHelper ipv4RoutingHelper;
546  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
547  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);
548 
549 
550 // LogComponentDisableAll (LOG_LEVEL_ALL);
551  //LogComponentEnable ("LenaTestCqaFfMacCheduler", LOG_LEVEL_ALL);
552 
553  lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel"));
554 
555  // Create Nodes: eNodeB and UE
556  NodeContainer enbNodes;
557  NodeContainer ueNodes;
558  enbNodes.Create (1);
559  ueNodes.Create (m_nUser);
560 
561  // Install Mobility Model
563  mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
564  mobility.Install (enbNodes);
565  mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
566  mobility.Install (ueNodes);
567 
568  // Create Devices and install them in the Nodes (eNB and UE)
569  NetDeviceContainer enbDevs;
570  NetDeviceContainer ueDevs;
571  lteHelper->SetSchedulerType ("ns3::CqaFfMacScheduler");
572  enbDevs = lteHelper->InstallEnbDevice (enbNodes);
573  ueDevs = lteHelper->InstallUeDevice (ueNodes);
574 
575  Ptr<LteEnbNetDevice> lteEnbDev = enbDevs.Get (0)->GetObject<LteEnbNetDevice> ();
576  Ptr<LteEnbPhy> enbPhy = lteEnbDev->GetPhy ();
577  enbPhy->SetAttribute ("TxPower", DoubleValue (30.0));
578  enbPhy->SetAttribute ("NoiseFigure", DoubleValue (5.0));
579 
580  // Set UEs' position and power
581  for (int i = 0; i < m_nUser; i++)
582  {
584  mm->SetPosition (Vector (m_dist.at (i), 0.0, 0.0));
585  Ptr<LteUeNetDevice> lteUeDev = ueDevs.Get (i)->GetObject<LteUeNetDevice> ();
586  Ptr<LteUePhy> uePhy = lteUeDev->GetPhy ();
587  uePhy->SetAttribute ("TxPower", DoubleValue (23.0));
588  uePhy->SetAttribute ("NoiseFigure", DoubleValue (9.0));
589  }
590 
591  // Install the IP stack on the UEs
592  internet.Install (ueNodes);
593  Ipv4InterfaceContainer ueIpIface;
594  ueIpIface = epcHelper->AssignUeIpv4Address (NetDeviceContainer (ueDevs));
595 
596  // Assign IP address to UEs
597  for (uint32_t u = 0; u < ueNodes.GetN (); ++u)
598  {
599  Ptr<Node> ueNode = ueNodes.Get (u);
600  // Set the default gateway for the UE
601  Ptr<Ipv4StaticRouting> ueStaticRouting = ipv4RoutingHelper.GetStaticRouting (ueNode->GetObject<Ipv4> ());
602  ueStaticRouting->SetDefaultRoute (epcHelper->GetUeDefaultGatewayAddress (), 1);
603  }
604 
605  // Attach a UE to a eNB
606  lteHelper->Attach (ueDevs, enbDevs.Get (0));
607 
608  // Activate an EPS bearer on all UEs
609 
610  for (uint32_t u = 0; u < ueNodes.GetN (); ++u)
611  {
612  Ptr<NetDevice> ueDevice = ueDevs.Get (u);
613  GbrQosInformation qos;
614  qos.gbrDl = (m_packetSize.at (u) + 32) * (1000 / m_interval) * 8; // bit/s, considering IP, UDP, RLC, PDCP header size
615  qos.gbrUl = (m_packetSize.at (u) + 32) * (1000 / m_interval) * 8;
616  qos.mbrDl = qos.gbrDl;
617  qos.mbrUl = qos.gbrUl;
618 
619  enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE;
620  EpsBearer bearer (q, qos);
621  lteHelper->ActivateDedicatedEpsBearer (ueDevice, bearer, EpcTft::Default ());
622  }
623 
624 
625  // Install downlind and uplink applications
626  uint16_t dlPort = 1234;
627  uint16_t ulPort = 2000;
628  PacketSinkHelper dlPacketSinkHelper ("ns3::UdpSocketFactory", InetSocketAddress (Ipv4Address::GetAny (), dlPort));
629  PacketSinkHelper ulPacketSinkHelper ("ns3::UdpSocketFactory", InetSocketAddress (Ipv4Address::GetAny (), ulPort));
632  for (uint32_t u = 0; u < ueNodes.GetN (); ++u)
633  {
634  ++ulPort;
635  serverApps.Add (dlPacketSinkHelper.Install (ueNodes.Get (u))); // receive packets from remotehost
636  serverApps.Add (ulPacketSinkHelper.Install (remoteHost)); // receive packets from UEs
637 
638  UdpClientHelper dlClient (ueIpIface.GetAddress (u), dlPort); // uplink packets generator
639  dlClient.SetAttribute ("Interval", TimeValue (MilliSeconds (m_interval)));
640  dlClient.SetAttribute ("MaxPackets", UintegerValue (1000000));
641  dlClient.SetAttribute ("PacketSize", UintegerValue (m_packetSize.at (u)));
642 
643  UdpClientHelper ulClient (remoteHostAddr, ulPort); // downlink packets generator
644  ulClient.SetAttribute ("Interval", TimeValue (MilliSeconds (m_interval)));
645  ulClient.SetAttribute ("MaxPackets", UintegerValue (1000000));
646  ulClient.SetAttribute ("PacketSize", UintegerValue (m_packetSize.at (u)));
647 
648  clientApps.Add (dlClient.Install (remoteHost));
649  clientApps.Add (ulClient.Install (ueNodes.Get (u)));
650  }
651 
652  serverApps.Start (Seconds (0.030));
653  clientApps.Start (Seconds (0.030));
654 
655  double statsStartTime = 0.04; // need to allow for RRC connection establishment + SRS
656  double statsDuration = 0.5;
657  double tolerance = 0.1;
658  Simulator::Stop (Seconds (statsStartTime + statsDuration - 0.0001));
659 
660  lteHelper->EnableRlcTraces ();
661  Ptr<RadioBearerStatsCalculator> rlcStats = lteHelper->GetRlcStats ();
662  rlcStats->SetAttribute ("StartTime", TimeValue (Seconds (statsStartTime)));
663  rlcStats->SetAttribute ("EpochDuration", TimeValue (Seconds (statsDuration)));
664 
665 
666  Simulator::Run ();
667 
672  NS_LOG_INFO ("DL - Test with " << m_nUser << " user(s)");
673  std::vector <uint64_t> dlDataRxed;
674  for (int i = 0; i < m_nUser; i++)
675  {
676  // get the imsi
677  uint64_t imsi = ueDevs.Get (i)->GetObject<LteUeNetDevice> ()->GetImsi ();
678  // get the lcId
679  uint8_t lcId = 4;
680  dlDataRxed.push_back (rlcStats->GetDlRxData (imsi, lcId));
681  NS_LOG_INFO ("\tUser " << i << " dist " << m_dist.at (i) << " imsi " << imsi << " bytes rxed " << (double)dlDataRxed.at (i) << " thr " << (double)dlDataRxed.at (i) / statsDuration << " ref " << m_estThrCqaDl.at (i));
682  }
683 
684  for (int i = 0; i < m_nUser; i++)
685  {
686  NS_TEST_ASSERT_MSG_EQ_TOL ((double)dlDataRxed.at (i) / statsDuration, m_estThrCqaDl.at (i), m_estThrCqaDl.at (i) * tolerance, " Unfair Throughput!");
687  }
688 
689  Simulator::Destroy ();
690 
691 }
static LenaTestCqaFfMacSchedulerSuite lenaTestCqaFfMacSchedulerSuite
holds a vector of ns3::Application pointers.
an Inet address class
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
AttributeValue implementation for Boolean.
Definition: boolean.h:34
NetDeviceContainer InstallEnbDevice(NodeContainer c)
Create a set of eNodeB devices.
Definition: lte-helper.cc:382
holds a vector of std::pair of Ptr and interface index.
void SetDefaultRoute(Ipv4Address nextHop, uint32_t interface, uint32_t metric=0)
Add a default route to the static routing table.
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
Definition: object.h:462
Hold variables of type string.
Definition: string.h:41
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr stored in this container at a given index.
NetDeviceContainer Install(NodeContainer c)
a class to represent an Ipv4 address mask
Definition: ipv4-address.h:257
void Add(ApplicationContainer other)
Append the contents of another ApplicationContainer to the end of this container. ...
A suite of tests to run.
Definition: test.h:1333
Ptr< LteEnbPhy > GetPhy(void) const
Mobility model for which the current position does not change once it has been set and until it is se...
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:716
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:201
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:903
void EnableRlcTraces(void)
Enable trace sinks for RLC layer.
Definition: lte-helper.cc:1102
aggregate IP/TCP/UDP functionality to existing Nodes.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Definition: log.h:244
A helper to make it easier to instantiate an ns3::PacketSinkApplication on a set of nodes...
Build a set of PointToPointNetDevice objects.
encapsulates test code
Definition: test.h:1147
void SetDeviceAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each NetDevice created by the helper.
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:824
ApplicationContainer Install(NodeContainer c)
tuple clientApps
Definition: first.py:54
void SetSchedulerType(std::string type)
Set the type of scheduler to be used by eNodeB devices.
Definition: lte-helper.cc:225
uint32_t GetN(void) const
Get the number of Ptr stored in this container.
uint64_t gbrUl
Guaranteed Bit Rate (bit/s) in uplink.
Definition: eps-bearer.h:41
Class for representing data rates.
Definition: data-rate.h:88
This class contains the specification of EPS Bearers.
Definition: eps-bearer.h:71
virtual void DoRun(void)
Implementation to actually run this TestCase.
void Install(Ptr< Node > node) const
"Layout" a single node according to the current position allocator type.
tuple mobility
Definition: third.py:101
static std::string BuildNameString(uint16_t nUser, uint16_t dist)
void AddTestCase(TestCase *testCase, enum TestDuration duration)
Add an individual child TestCase to this test suite.
Definition: test.cc:298
Create a client application which sends UDP packets carrying a 32bit sequence number and a 64 bit tim...
AttributeValue implementation for Time.
Definition: nstime.h:957
uint64_t GetDlRxData(uint64_t imsi, uint8_t lcid)
Gets the number of received downlink data bytes.
Hold an unsigned integer type.
Definition: uinteger.h:44
uint8_t data[writeSize]
holds a vector of ns3::NetDevice pointers
uint64_t gbrDl
Guaranteed Bit Rate (bit/s) in downlink.
Definition: eps-bearer.h:40
void Start(Time start)
Arrange for all of the Applications in this container to Start() at the Time given as a parameter...
#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:373
tuple serverApps
Definition: first.py:45
Access to the IPv4 forwarding table, interfaces, and configuration.
Definition: ipv4.h:76
void SetAttribute(std::string name, const AttributeValue &value)
Record an attribute to be set in each Application after it is is created.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
keep track of a set of node pointers.
uint64_t mbrUl
Maximum Bit Rate (bit/s) in uplink.
Definition: eps-bearer.h:43
void SetMobilityModel(std::string type, std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue(), std::string n8="", const AttributeValue &v8=EmptyAttributeValue(), std::string n9="", const AttributeValue &v9=EmptyAttributeValue())
This is a system test program.
LenaCqaFfMacSchedulerTestCase2(std::vector< uint16_t > dist, std::vector< uint32_t > estThrCqaDl, std::vector< uint16_t > packetSize, uint16_t interval, bool errorModelEnabled)
void Install(std::string nodeName) const
Aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and ns3::Tcp classes onto the provid...
virtual void DoRun(void)
Implementation to actually run this TestCase.
void SetPosition(const Vector &position)
void SetChannelAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each Channel created by the helper.
Ptr< RadioBearerStatsCalculator > GetRlcStats(void)
Definition: lte-helper.cc:1233
NetDeviceContainer InstallUeDevice(NodeContainer c)
Create a set of UE devices.
Definition: lte-helper.cc:397
Helper class used to assign positions and mobility models to nodes.
void AddNetworkRouteTo(Ipv4Address network, Ipv4Mask networkMask, Ipv4Address nextHop, uint32_t interface, uint32_t metric=0)
Add a network route to the static routing table.
uint64_t GetUlRxData(uint64_t imsi, uint8_t lcid)
Gets the number of received uplink data bytes.
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:40
Ipv4InterfaceContainer Assign(const NetDeviceContainer &c)
Assign IP addresses to the net devices specified in the container based on the current network prefix...
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...
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:218
Helper class that adds ns3::Ipv4StaticRouting objects.
AttributeValue implementation for DataRate.
Definition: data-rate.h:242
Ptr< Node > Get(uint32_t i) const
Get the Ptr stored in this container at a given index.
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:895
void SetDefault(std::string name, const AttributeValue &value)
Definition: config.cc:774
LenaCqaFfMacSchedulerTestCase1(uint16_t nUser, uint16_t dist, double thrRefDl, double thrRefUl, uint16_t packetSize, uint16_t interval, bool errorModelEnabled)
ApplicationContainer Install(NodeContainer c) const
Install an ns3::PacketSinkApplication on each node of the input container configured with all the att...
std::string GetName(void) const
Definition: test.cc:369
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
static std::string BuildNameString(uint16_t nUser, std::vector< uint16_t > dist)
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
static const uint32_t packetSize
void EnableMacTraces(void)
Enable trace sinks for MAC layer.
Definition: lte-helper.cc:1190
uint64_t mbrDl
Maximum Bit Rate (bit/s) in downlink.
Definition: eps-bearer.h:42
Ptr< LteUePhy > GetPhy(void) const
3GPP TS 36.143 9.2.1.18 GBR QoS Information
Definition: eps-bearer.h:33
This class can be used to hold variables of floating point type such as 'double' or 'float'...
Definition: double.h:41
void SetAttribute(std::string name, const AttributeValue &value)
Set a single attribute, raising fatal errors if unsuccessful.
Definition: object-base.cc:191
The eNodeB device implementation.
Qci
QoS Class Indicator.
Definition: eps-bearer.h:77
void SetBase(Ipv4Address network, Ipv4Mask mask, Ipv4Address base="0.0.0.1")
Set the base network number, network mask and base address.
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const
The LteUeNetDevice class implements the UE net device.