A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
lte-test-pss-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: Marco Miozzo <marco.miozzo@cttc.es>,
19  * Nicola Baldo <nbaldo@cttc.es>
20  * Dizhi Zhou <dizhi.zhou@gmail.com>
21  */
22 
23 #include <iostream>
24 #include <sstream>
25 #include <string>
26 
27 #include <ns3/object.h>
28 #include <ns3/spectrum-interference.h>
29 #include <ns3/spectrum-error-model.h>
30 #include <ns3/log.h>
31 #include <ns3/test.h>
32 #include <ns3/simulator.h>
33 #include <ns3/packet.h>
34 #include <ns3/ptr.h>
35 #include "ns3/radio-bearer-stats-calculator.h"
36 #include <ns3/constant-position-mobility-model.h>
37 #include <ns3/eps-bearer.h>
38 #include <ns3/node-container.h>
39 #include <ns3/mobility-helper.h>
40 #include <ns3/net-device-container.h>
41 #include <ns3/lte-ue-net-device.h>
42 #include <ns3/lte-enb-net-device.h>
43 #include <ns3/lte-ue-rrc.h>
44 #include <ns3/lte-helper.h>
45 #include "ns3/string.h"
46 #include "ns3/double.h"
47 #include <ns3/lte-enb-phy.h>
48 #include <ns3/lte-ue-phy.h>
49 #include <ns3/boolean.h>
50 #include <ns3/enum.h>
51 
52 #include "ns3/point-to-point-epc-helper.h"
53 #include "ns3/network-module.h"
54 #include "ns3/ipv4-global-routing-helper.h"
55 #include "ns3/internet-module.h"
56 #include "ns3/applications-module.h"
57 #include "ns3/point-to-point-helper.h"
58 
60 
61 NS_LOG_COMPONENT_DEFINE ("LenaTestPssFfMacScheduler");
62 
63 using namespace ns3;
64 
66  : TestSuite ("lte-pss-ff-mac-scheduler", SYSTEM)
67 {
68  NS_LOG_INFO ("creating LenaTestPssFfMacSchedulerSuite");
69 
70  bool errorModel = false;
71 
72  // General config
73  // Traffic: UDP traffic with fixed rate
74  // Token generation rate = traffic rate
75  // RLC header length = 2 bytes, PDCP header = 2 bytes
76  // Simulation time = 1.0 sec
77  // Throughput in this file is calculated in RLC layer
78 
79  //Test Case 1: homogeneous flow test in PSS (same distance)
80  // DOWNLINK -> DISTANCE 0 -> MCS 28 -> Itbs 26 (from table 7.1.7.2.1-1 of 36.2 13)
81  // Traffic info
82  // UDP traffic: payload size = 200 bytes, interval = 1 ms
83  // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 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 LenaPssFfMacSchedulerTestCase1 (1,0,232000,232000,200,1,errorModel), TestCase::EXTENSIVE);
95  AddTestCase (new LenaPssFfMacSchedulerTestCase1 (3,0,232000,232000,200,1,errorModel), TestCase::EXTENSIVE);
96  AddTestCase (new LenaPssFfMacSchedulerTestCase1 (6,0,232000,232000,200,1,errorModel), TestCase::EXTENSIVE);
97 
98  //AddTestCase (new LenaPssFfMacSchedulerTestCase1 (12,0,183000,185000,200,1,errorModel));// simulation time = 1.5, otherwise, ul test will fail
99 
100  // DOWNLINK - DISTANCE 4800 -> MCS 22 -> Itbs 20 (from table 7.1.7.2.1-1 of 36.213)
101  // Traffic info
102  // UDP traffic: payload size = 200 bytes, interval = 1 ms
103  // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000 byte/sec -> 232000 byte/rate
104  // Totol bandwidth: 24 PRB at Itbs 20 -> 1383 -> 1383000 byte/sec
105  // 1 user -> 903000 * 1 = 232000 < 1383000 -> throughput = 232000 byte/sec
106  // 3 user -> 232000 * 3 = 696000 < 1383000 -> througphut = 232000 byte/sec
107  // 6 user -> 232000 * 6 = 139200 > 1383000 -> throughput = 1383000 / 6 = 230500 byte/sec
108  // 12 user -> 232000 * 12 = 2784000 > 1383000 -> throughput = 1383000 / 12 = 115250 byte/sec
109  // UPLINK - DISTANCE 4800 -> MCS 14 -> Itbs 13 (from table 7.1.7.2.1-1 of 36.213)
110  // 1 user -> 25 PRB at Itbs 13 -> 807 -> 807000 > 232000 -> throughput = 232000 bytes/sec
111  // 3 users -> 8 PRB at Itbs 13 -> 253 -> 253000 > 232000 -> throughput = 232000 bytes/sec
112  // 6 users -> 4 PRB at Itbs 13 -> 125 -> 125000 < 232000 -> throughput = 125000 bytes/sec
113  // after the patch enforcing min 3 PRBs per UE:
114  // 12 users -> 3 PRB at Itbs 13 -> 93 bytes * 8/12 UE/TTI -> 62000 < 232000 -> throughput = 62000 bytes/sec
115  AddTestCase (new LenaPssFfMacSchedulerTestCase1 (1,4800,232000,232000,200,1,errorModel), TestCase::EXTENSIVE);
116  AddTestCase (new LenaPssFfMacSchedulerTestCase1 (3,4800,232000,232000,200,1,errorModel), TestCase::EXTENSIVE);
117  AddTestCase (new LenaPssFfMacSchedulerTestCase1 (6,4800,230500,125000,200,1,errorModel), TestCase::EXTENSIVE);
118  //AddTestCase (new LenaPssFfMacSchedulerTestCase1 (12,4800,115250,62000,200,1,errorModel)); // simulation time = 1.5, otherwise, ul test will fail
119 
120  // DOWNLINK - DISTANCE 6000 -> MCS 20 -> Itbs 18 (from table 7.1.7.2.1-1 of 36.213)
121  // Traffic info
122  // UDP traffic: payload size = 200 bytes, interval = 1 ms
123  // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000 byte/sec -> 232000 byte/rate
124  // Totol bandwidth: 24 PRB at Itbs 18 -> 1191 -> 1191000 byte/sec
125  // 1 user -> 903000 * 1 = 232000 < 1191000 -> throughput = 232000 byte/sec
126  // 3 user -> 232000 * 3 = 696000 < 1191000 -> througphut = 232000 byte/sec
127  // 6 user -> 232000 * 6 = 1392000 > 1191000 -> throughput = 1191000 / 6 = 198500 byte/sec
128  // 12 user -> 232000 * 12 = 2784000 > 1191000 -> throughput = 1191000 / 12 = 99250 byte/sec
129 
130  // UPLINK - DISTANCE 6000 -> MCS 12 -> Itbs 11 (from table 7.1.7.2.1-1 of 36.213)
131  // 1 user -> 25 PRB at Itbs 11 -> 621 -> 621000 > 232000 -> throughput = 232000 bytes/sec
132  // 3 users -> 8 PRB at Itbs 11 -> 201 -> 201000 < 232000 -> throughput = 201000 bytes/sec
133  // 6 users -> 4 PRB at Itbs 11 -> 97 -> 97000 < 232000 -> throughput = 97000 bytes/sec
134  // after the patch enforcing min 3 PRBs per UE:
135  // 12 users -> 3 PRB at Itbs 11 -> 73 bytes * 8/12 UE/TTI -> 48667 < 232000 -> throughput = 48667 bytes/sec
136  AddTestCase (new LenaPssFfMacSchedulerTestCase1 (1,6000,232000,232000,200,1,errorModel), TestCase::EXTENSIVE);
137  AddTestCase (new LenaPssFfMacSchedulerTestCase1 (3,6000,232000,201000,200,1,errorModel), TestCase::EXTENSIVE);
138  AddTestCase (new LenaPssFfMacSchedulerTestCase1 (6,6000,198500,97000,200,1,errorModel), TestCase::EXTENSIVE);
139  //AddTestCase (new LenaPssFfMacSchedulerTestCase1 (12,6000,99250,48667,200,1, errorModel)); // simulation time = 1.5, otherwise, ul test will fail
140 
141  // DOWNLINK - DISTANCE 10000 -> MCS 14 -> Itbs 13 (from table 7.1.7.2.1-1 of 36.213)
142  // Traffic info
143  // UDP traffic: payload size = 200 bytes, interval = 1 ms
144  // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000 byte/sec -> 232000 byte/rate
145  // Totol bandwidth: 24 PRB at Itbs 13 -> 775 -> 775000 byte/sec
146  // 1 user -> 903000 * 1 = 232000 < 775000 -> throughput = 232000 byte/sec
147  // 3 user -> 232000 * 3 = 696000 > 775000 -> througphut = 232000 byte/sec
148  // 6 user -> 232000 * 6 = 139200 > 775000 -> throughput = 775000 / 6 = 129166 byte/sec
149  // 12 user -> 232000 * 12 = 2784000 > 775000 -> throughput = 775000 / 12 = 64583 byte/sec
150  // UPLINK - DISTANCE 10000 -> MCS 8 -> Itbs 8 (from table 7.1.7.2.1-1 of 36.213)
151  // 1 user -> 24 PRB at Itbs 8 -> 437 -> 437000 > 232000 -> throughput = 232000 bytes/sec
152  // 3 users -> 8 PRB at Itbs 8 -> 137 -> 137000 < 232000 -> throughput = 137000 bytes/sec
153  // 6 users -> 4 PRB at Itbs 8 -> 67 -> 67000 < 232000 -> throughput = 67000 bytes/sec
154  // after the patch enforcing min 3 PRBs per UE:
155  // 12 users -> 3 PRB at Itbs 8 -> 49 bytes * 8/12 UE/TTI -> 32667 < 232000 -> throughput = 32667 bytes/sec
156  AddTestCase (new LenaPssFfMacSchedulerTestCase1 (1,10000,232000,232000,200,1,errorModel), TestCase::EXTENSIVE);
157  AddTestCase (new LenaPssFfMacSchedulerTestCase1 (3,10000,232000,137000,200,1,errorModel), TestCase::EXTENSIVE);
158  AddTestCase (new LenaPssFfMacSchedulerTestCase1 (6,10000,129166,67000,200,1,errorModel), TestCase::EXTENSIVE);
159  //AddTestCase (new LenaPssFfMacSchedulerTestCase1 (12,10000,64583,32667,200,1,errorModel));// simulation time = 1.5, otherwise, ul test will fail
160 
161  // Test Case 2: homogeneous flow test in PSS (different distance)
162  // Traffic1 info
163  // UDP traffic: payload size = 100 bytes, interval = 1 ms
164  // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000 byte/sec -> 132000 byte/rate
165  // Maximum throughput = 4 / ( 1/2196000 + 1/1191000 + 1/1383000 + 1/775000 ) = 1209046 byte/s
166  // 132000 * 4 = 528000 < 1209046 -> estimated throughput in downlink = 132000 byte/sec
167  std::vector<uint16_t> dist1;
168  dist1.push_back (0); // User 0 distance --> MCS 28
169  dist1.push_back (4800); // User 1 distance --> MCS 22
170  dist1.push_back (6000); // User 2 distance --> MCS 20
171  dist1.push_back (10000); // User 3 distance --> MCS 14
172  std::vector<uint16_t> packetSize1;
173  packetSize1.push_back (100);
174  packetSize1.push_back (100);
175  packetSize1.push_back (100);
176  packetSize1.push_back (100);
177  std::vector<uint32_t> estThrPssDl1;
178  estThrPssDl1.push_back (132000); // User 0 estimated TTI throughput from PSS
179  estThrPssDl1.push_back (132000); // User 1 estimated TTI throughput from PSS
180  estThrPssDl1.push_back (132000); // User 2 estimated TTI throughput from PSS
181  estThrPssDl1.push_back (132000); // User 3 estimated TTI throughput from PSS
182  AddTestCase (new LenaPssFfMacSchedulerTestCase2 (dist1,estThrPssDl1,packetSize1,1,errorModel), TestCase::QUICK);
183 
184  // Traffic2 info
185  // UDP traffic: payload size = 200 bytes, interval = 1 ms
186  // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000 byte/sec -> 232000 byte/rate
187  // Maximum throughput = 4 / ( 1/2196000 + 1/1191000 + 1/1383000 + 1/775000 ) = 1209046 byte/s
188  // 232000 * 4 = 928000 < 1209046 -> estimated throughput in downlink = 928000 / 4 = 230000 byte/sec
189  std::vector<uint16_t> dist2;
190  dist2.push_back (0); // User 0 distance --> MCS 28
191  dist2.push_back (4800); // User 1 distance --> MCS 22
192  dist2.push_back (6000); // User 2 distance --> MCS 20
193  dist2.push_back (10000); // User 3 distance --> MCS 14
194  std::vector<uint16_t> packetSize2;
195  packetSize2.push_back (200);
196  packetSize2.push_back (200);
197  packetSize2.push_back (200);
198  packetSize2.push_back (200);
199  std::vector<uint32_t> estThrPssDl2;
200  estThrPssDl2.push_back (230000); // User 0 estimated TTI throughput from PSS
201  estThrPssDl2.push_back (230000); // User 1 estimated TTI throughput from PSS
202  estThrPssDl2.push_back (230000); // User 2 estimated TTI throughput from PSS
203  estThrPssDl2.push_back (230000); // User 3 estimated TTI throughput from PSS
204  AddTestCase (new LenaPssFfMacSchedulerTestCase2 (dist2,estThrPssDl2,packetSize2,1,errorModel), TestCase::QUICK);
205 
206  // Test Case 3: heterogeneous flow test in PSS
207  // UDP traffic: payload size = [100,200,300] bytes, interval = 1 ms
208  // UDP rate in scheduler: (payload + RLC header + PDCP header + IP header + UDP header) * 1000 byte/sec -> [132000, 232000, 332000] byte/rate
209  // Maximum throughput = 3 / ( 1/2196000 + 1/1191000 + 1/1383000) = 1486569 byte/s
210  // 132000 + 232000 + 332000 = 696000 < 1486569 -> estimated throughput in downlink = [132000, 232000, 332000] byte/sec
211  std::vector<uint16_t> dist3;
212  dist3.push_back (0); // User 0 distance --> MCS 28
213  dist3.push_back (4800); // User 1 distance --> MCS 22
214  dist3.push_back (6000); // User 2 distance --> MCS 20
215  std::vector<uint16_t> packetSize3;
216  packetSize3.push_back (100);
217  packetSize3.push_back (200);
218  packetSize3.push_back (300);
219  std::vector<uint32_t> estThrPssDl3;
220  estThrPssDl3.push_back (132000); // User 0 estimated TTI throughput from PSS
221  estThrPssDl3.push_back (232000); // User 1 estimated TTI throughput from PSS
222  estThrPssDl3.push_back (332000); // User 2 estimated TTI throughput from PSS
223  AddTestCase (new LenaPssFfMacSchedulerTestCase2 (dist3,estThrPssDl3,packetSize3,1,errorModel), TestCase::QUICK);
224 
225 }
226 
228 
229 // --------------- T E S T - C A S E # 1 ------------------------------
230 
231 
232 std::string
233 LenaPssFfMacSchedulerTestCase1::BuildNameString (uint16_t nUser, uint16_t dist)
234 {
235  std::ostringstream oss;
236  oss << nUser << " UEs, distance " << dist << " m";
237  return oss.str ();
238 }
239 
240 
241 LenaPssFfMacSchedulerTestCase1::LenaPssFfMacSchedulerTestCase1 (uint16_t nUser, uint16_t dist, double thrRefDl, double thrRefUl, uint16_t packetSize, uint16_t interval,bool errorModelEnabled)
242  : TestCase (BuildNameString (nUser, dist)),
243  m_nUser (nUser),
244  m_dist (dist),
245  m_packetSize (packetSize),
246  m_interval (interval),
247  m_thrRefDl (thrRefDl),
248  m_thrRefUl (thrRefUl),
249  m_errorModelEnabled (errorModelEnabled)
250 {
251 }
252 
254 {
255 }
256 
257 void
259 {
260  NS_LOG_FUNCTION (this << GetName ());
261 
262  if (!m_errorModelEnabled)
263  {
264  Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (false));
265  Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (false));
266  }
267 
268  Config::SetDefault ("ns3::LteHelper::UseIdealRrc", BooleanValue (true));
269 
270  Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
271  Ptr<PointToPointEpcHelper> epcHelper = CreateObject<PointToPointEpcHelper> ();
272  lteHelper->SetEpcHelper (epcHelper);
273 
274  //LogComponentEnable ("PssFfMacScheduler", LOG_DEBUG);
275 
276  Ptr<Node> pgw = epcHelper->GetPgwNode ();
277 
278  // Create a single RemoteHost
279  NodeContainer remoteHostContainer;
280  remoteHostContainer.Create (1);
281  Ptr<Node> remoteHost = remoteHostContainer.Get (0);
282  InternetStackHelper internet;
283  internet.Install (remoteHostContainer);
284 
285  // Create the Internet
286  PointToPointHelper p2ph;
287  p2ph.SetDeviceAttribute ("DataRate", DataRateValue (DataRate ("100Gb/s")));
288  p2ph.SetDeviceAttribute ("Mtu", UintegerValue (1500));
289  p2ph.SetChannelAttribute ("Delay", TimeValue (Seconds (0.001)));
290  NetDeviceContainer internetDevices = p2ph.Install (pgw, remoteHost);
291  Ipv4AddressHelper ipv4h;
292  ipv4h.SetBase ("1.0.0.0", "255.0.0.0");
293  Ipv4InterfaceContainer internetIpIfaces = ipv4h.Assign (internetDevices);
294  // interface 0 is localhost, 1 is the p2p device
295  Ipv4Address remoteHostAddr = internetIpIfaces.GetAddress (1);
296 
297  Ipv4StaticRoutingHelper ipv4RoutingHelper;
298  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
299  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);
300 
301  //Config::SetDefault ("ns3::LteAmc::AmcModel", EnumValue (LteAmc::PiroEW2010));
302  //Config::SetDefault ("ns3::LteAmc::Ber", DoubleValue (0.00005));
303  //Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (false));
304  //Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (false));
305 
306  //Config::SetDefault ("ns3::LteEnbRrc::EpsBearerToRlcMapping", EnumValue (LteHelper::RLC_UM_ALWAYS));
307 
308 // LogComponentDisableAll (LOG_LEVEL_ALL);
309  //LogComponentEnable ("LenaTestPssFfMacCheduler", LOG_LEVEL_ALL);
310 
311  lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel"));
312 
313  // Create Nodes: eNodeB and UE
314  NodeContainer enbNodes;
315  NodeContainer ueNodes;
316  enbNodes.Create (1);
317  ueNodes.Create (m_nUser);
318 
319  // Install Mobility Model
320  MobilityHelper mobility;
321  mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
322  mobility.Install (enbNodes);
323  mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
324  mobility.Install (ueNodes);
325 
326  // Create Devices and install them in the Nodes (eNB and UE)
327  NetDeviceContainer enbDevs;
328  NetDeviceContainer ueDevs;
329  lteHelper->SetSchedulerType ("ns3::PssFfMacScheduler");
330  enbDevs = lteHelper->InstallEnbDevice (enbNodes);
331  ueDevs = lteHelper->InstallUeDevice (ueNodes);
332 
333 
334  Ptr<LteEnbNetDevice> lteEnbDev = enbDevs.Get (0)->GetObject<LteEnbNetDevice> ();
335  Ptr<LteEnbPhy> enbPhy = lteEnbDev->GetPhy ();
336  enbPhy->SetAttribute ("TxPower", DoubleValue (30.0));
337  enbPhy->SetAttribute ("NoiseFigure", DoubleValue (5.0));
338 
339  // Set UEs' position and power
340  for (int i = 0; i < m_nUser; i++)
341  {
343  mm->SetPosition (Vector (m_dist, 0.0, 0.0));
344  Ptr<LteUeNetDevice> lteUeDev = ueDevs.Get (i)->GetObject<LteUeNetDevice> ();
345  Ptr<LteUePhy> uePhy = lteUeDev->GetPhy ();
346  uePhy->SetAttribute ("TxPower", DoubleValue (23.0));
347  uePhy->SetAttribute ("NoiseFigure", DoubleValue (9.0));
348  }
349 
350  // Install the IP stack on the UEs
351  internet.Install (ueNodes);
352  Ipv4InterfaceContainer ueIpIface;
353  ueIpIface = epcHelper->AssignUeIpv4Address (NetDeviceContainer (ueDevs));
354 
355  // Assign IP address to UEs
356  for (uint32_t u = 0; u < ueNodes.GetN (); ++u)
357  {
358  Ptr<Node> ueNode = ueNodes.Get (u);
359  // Set the default gateway for the UE
360  Ptr<Ipv4StaticRouting> ueStaticRouting = ipv4RoutingHelper.GetStaticRouting (ueNode->GetObject<Ipv4> ());
361  ueStaticRouting->SetDefaultRoute (epcHelper->GetUeDefaultGatewayAddress (), 1);
362  }
363 
364  // Attach a UE to a eNB
365  lteHelper->Attach (ueDevs, enbDevs.Get (0));
366 
367  // Activate an EPS bearer on all UEs
368  for (uint32_t u = 0; u < ueNodes.GetN (); ++u)
369  {
370  Ptr<NetDevice> ueDevice = ueDevs.Get (u);
371  GbrQosInformation qos;
372  qos.gbrDl = (m_packetSize + 32) * (1000 / m_interval) * 8; // bit/s, considering IP, UDP, RLC, PDCP header size
373  qos.gbrUl = (m_packetSize + 32) * (1000 / m_interval) * 8;
374  qos.mbrDl = 0;
375  qos.mbrUl = 0;
376 
377  enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE;
378  EpsBearer bearer (q, qos);
379  lteHelper->ActivateDedicatedEpsBearer (ueDevice, bearer, EpcTft::Default ());
380  }
381 
382  // Install downlind and uplink applications
383  uint16_t dlPort = 1234;
384  uint16_t ulPort = 2000;
385  PacketSinkHelper dlPacketSinkHelper ("ns3::UdpSocketFactory", InetSocketAddress (Ipv4Address::GetAny (), dlPort));
386  PacketSinkHelper ulPacketSinkHelper ("ns3::UdpSocketFactory", InetSocketAddress (Ipv4Address::GetAny (), ulPort));
389  for (uint32_t u = 0; u < ueNodes.GetN (); ++u)
390  {
391  ++ulPort;
392  serverApps.Add (dlPacketSinkHelper.Install (ueNodes.Get (u))); // receive packets from remotehost
393  serverApps.Add (ulPacketSinkHelper.Install (remoteHost)); // receive packets from UEs
394 
395  UdpClientHelper dlClient (ueIpIface.GetAddress (u), dlPort); // uplink packets generator
396  dlClient.SetAttribute ("Interval", TimeValue (MilliSeconds (m_interval)));
397  dlClient.SetAttribute ("MaxPackets", UintegerValue (1000000));
398  dlClient.SetAttribute ("PacketSize", UintegerValue (m_packetSize));
399 
400  UdpClientHelper ulClient (remoteHostAddr, ulPort); // downlink packets generator
401  ulClient.SetAttribute ("Interval", TimeValue (MilliSeconds (m_interval)));
402  ulClient.SetAttribute ("MaxPackets", UintegerValue (1000000));
403  ulClient.SetAttribute ("PacketSize", UintegerValue (m_packetSize));
404 
405  clientApps.Add (dlClient.Install (remoteHost));
406  clientApps.Add (ulClient.Install (ueNodes.Get (u)));
407  }
408 
409  serverApps.Start (Seconds (0.030));
410  clientApps.Start (Seconds (0.030));
411 
412  double statsStartTime = 0.04; // need to allow for RRC connection establishment + SRS
413  double statsDuration = 0.5;
414  double tolerance = 0.1;
415  Simulator::Stop (Seconds (statsStartTime + statsDuration - 0.0001));
416 
417  lteHelper->EnableRlcTraces ();
418  lteHelper->EnableMacTraces ();
419  Ptr<RadioBearerStatsCalculator> rlcStats = lteHelper->GetRlcStats ();
420  rlcStats->SetAttribute ("StartTime", TimeValue (Seconds (statsStartTime)));
421  rlcStats->SetAttribute ("EpochDuration", TimeValue (Seconds (statsDuration)));
422 
423  Simulator::Run ();
424 
429  NS_LOG_INFO ("DL - Test with " << m_nUser << " user(s) at distance " << m_dist);
430  std::vector <uint64_t> dlDataRxed;
431  for (int i = 0; i < m_nUser; i++)
432  {
433  // get the imsi
434  uint64_t imsi = ueDevs.Get (i)->GetObject<LteUeNetDevice> ()->GetImsi ();
435  // get the lcId
436  uint8_t lcId = 4;
437  uint64_t data = rlcStats->GetDlRxData (imsi, lcId);
438  dlDataRxed.push_back (data);
439  NS_LOG_INFO ("\tUser " << i << " imsi " << imsi << " bytes rxed " << (double)dlDataRxed.at (i) << " thr " << (double)dlDataRxed.at (i) / statsDuration << " ref " << m_thrRefDl);
440  }
441 
442  for (int i = 0; i < m_nUser; i++)
443  {
444  NS_TEST_ASSERT_MSG_EQ_TOL ((double)dlDataRxed.at (i) / statsDuration, m_thrRefDl, m_thrRefDl * tolerance, " Unfair Throughput!");
445  }
446 
451  NS_LOG_INFO ("UL - Test with " << m_nUser << " user(s) at distance " << m_dist);
452  std::vector <uint64_t> ulDataRxed;
453  for (int i = 0; i < m_nUser; i++)
454  {
455  // get the imsi
456  uint64_t imsi = ueDevs.Get (i)->GetObject<LteUeNetDevice> ()->GetImsi ();
457  // get the lcId
458  uint8_t lcId = 4;
459  ulDataRxed.push_back (rlcStats->GetUlRxData (imsi, lcId));
460  NS_LOG_INFO ("\tUser " << i << " imsi " << imsi << " bytes rxed " << (double)ulDataRxed.at (i) << " thr " << (double)ulDataRxed.at (i) / statsDuration << " ref " << m_thrRefUl);
461  }
462 
463  for (int i = 0; i < m_nUser; i++)
464  {
465  NS_TEST_ASSERT_MSG_EQ_TOL ((double)ulDataRxed.at (i) / statsDuration, m_thrRefUl, m_thrRefUl * tolerance, " Unfair Throughput!");
466  }
467  Simulator::Destroy ();
468 
469 }
470 
471 
472 
473 // --------------- T E S T - C A S E # 2 ------------------------------
474 
475 
476 std::string
477 LenaPssFfMacSchedulerTestCase2::BuildNameString (uint16_t nUser, std::vector<uint16_t> dist)
478 {
479  std::ostringstream oss;
480  oss << "distances (m) = [ " ;
481  for (std::vector<uint16_t>::iterator it = dist.begin (); it != dist.end (); ++it)
482  {
483  oss << *it << " ";
484  }
485  oss << "]";
486  return oss.str ();
487 }
488 
489 
490 LenaPssFfMacSchedulerTestCase2::LenaPssFfMacSchedulerTestCase2 (std::vector<uint16_t> dist, std::vector<uint32_t> estThrPssDl, std::vector<uint16_t> packetSize, uint16_t interval,bool errorModelEnabled)
491  : TestCase (BuildNameString (dist.size (), dist)),
492  m_nUser (dist.size ()),
493  m_dist (dist),
494  m_packetSize (packetSize),
495  m_interval (interval),
496  m_estThrPssDl (estThrPssDl),
497  m_errorModelEnabled (errorModelEnabled)
498 {
499 }
500 
502 {
503 }
504 
505 void
507 {
508 
509  if (!m_errorModelEnabled)
510  {
511  Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (false));
512  Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (false));
513  }
514 
515  Config::SetDefault ("ns3::LteHelper::UseIdealRrc", BooleanValue (true));
516 
517 
518  Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
519  Ptr<PointToPointEpcHelper> epcHelper = CreateObject<PointToPointEpcHelper> ();
520  lteHelper->SetEpcHelper (epcHelper);
521 
522  Ptr<Node> pgw = epcHelper->GetPgwNode ();
523 
524  // Create a single RemoteHost
525  NodeContainer remoteHostContainer;
526  remoteHostContainer.Create (1);
527  Ptr<Node> remoteHost = remoteHostContainer.Get (0);
528  InternetStackHelper internet;
529  internet.Install (remoteHostContainer);
530 
531  // Create the Internet
532  PointToPointHelper p2ph;
533  p2ph.SetDeviceAttribute ("DataRate", DataRateValue (DataRate ("100Gb/s")));
534  p2ph.SetDeviceAttribute ("Mtu", UintegerValue (1500));
535  p2ph.SetChannelAttribute ("Delay", TimeValue (Seconds (0.001)));
536  NetDeviceContainer internetDevices = p2ph.Install (pgw, remoteHost);
537  Ipv4AddressHelper ipv4h;
538  ipv4h.SetBase ("1.0.0.0", "255.0.0.0");
539  Ipv4InterfaceContainer internetIpIfaces = ipv4h.Assign (internetDevices);
540  // interface 0 is localhost, 1 is the p2p device
541  Ipv4Address remoteHostAddr = internetIpIfaces.GetAddress (1);
542 
543  Ipv4StaticRoutingHelper ipv4RoutingHelper;
544  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
545  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);
546 
547 
548 // LogComponentDisableAll (LOG_LEVEL_ALL);
549  //LogComponentEnable ("LenaTestPssFfMacCheduler", LOG_LEVEL_ALL);
550 
551  lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel"));
552 
553  // Create Nodes: eNodeB and UE
554  NodeContainer enbNodes;
555  NodeContainer ueNodes;
556  enbNodes.Create (1);
557  ueNodes.Create (m_nUser);
558 
559  // Install Mobility Model
560  MobilityHelper mobility;
561  mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
562  mobility.Install (enbNodes);
563  mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
564  mobility.Install (ueNodes);
565 
566  // Create Devices and install them in the Nodes (eNB and UE)
567  NetDeviceContainer enbDevs;
568  NetDeviceContainer ueDevs;
569  lteHelper->SetSchedulerType ("ns3::PssFfMacScheduler");
570  enbDevs = lteHelper->InstallEnbDevice (enbNodes);
571  ueDevs = lteHelper->InstallUeDevice (ueNodes);
572 
573  Ptr<LteEnbNetDevice> lteEnbDev = enbDevs.Get (0)->GetObject<LteEnbNetDevice> ();
574  Ptr<LteEnbPhy> enbPhy = lteEnbDev->GetPhy ();
575  enbPhy->SetAttribute ("TxPower", DoubleValue (30.0));
576  enbPhy->SetAttribute ("NoiseFigure", DoubleValue (5.0));
577 
578  // Set UEs' position and power
579  for (int i = 0; i < m_nUser; i++)
580  {
582  mm->SetPosition (Vector (m_dist.at (i), 0.0, 0.0));
583  Ptr<LteUeNetDevice> lteUeDev = ueDevs.Get (i)->GetObject<LteUeNetDevice> ();
584  Ptr<LteUePhy> uePhy = lteUeDev->GetPhy ();
585  uePhy->SetAttribute ("TxPower", DoubleValue (23.0));
586  uePhy->SetAttribute ("NoiseFigure", DoubleValue (9.0));
587  }
588 
589  // Install the IP stack on the UEs
590  internet.Install (ueNodes);
591  Ipv4InterfaceContainer ueIpIface;
592  ueIpIface = epcHelper->AssignUeIpv4Address (NetDeviceContainer (ueDevs));
593 
594  // Assign IP address to UEs
595  for (uint32_t u = 0; u < ueNodes.GetN (); ++u)
596  {
597  Ptr<Node> ueNode = ueNodes.Get (u);
598  // Set the default gateway for the UE
599  Ptr<Ipv4StaticRouting> ueStaticRouting = ipv4RoutingHelper.GetStaticRouting (ueNode->GetObject<Ipv4> ());
600  ueStaticRouting->SetDefaultRoute (epcHelper->GetUeDefaultGatewayAddress (), 1);
601  }
602 
603  // Attach a UE to a eNB
604  lteHelper->Attach (ueDevs, enbDevs.Get (0));
605 
606  // Activate an EPS bearer on all UEs
607 
608  for (uint32_t u = 0; u < ueNodes.GetN (); ++u)
609  {
610  Ptr<NetDevice> ueDevice = ueDevs.Get (u);
611  GbrQosInformation qos;
612  qos.gbrDl = (m_packetSize.at (u) + 32) * (1000 / m_interval) * 8; // bit/s, considering IP, UDP, RLC, PDCP header size
613  qos.gbrUl = (m_packetSize.at (u) + 32) * (1000 / m_interval) * 8;
614  qos.mbrDl = qos.gbrDl;
615  qos.mbrUl = qos.gbrUl;
616 
617  enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE;
618  EpsBearer bearer (q, qos);
619  lteHelper->ActivateDedicatedEpsBearer (ueDevice, bearer, EpcTft::Default ());
620  }
621 
622 
623  // Install downlind and uplink applications
624  uint16_t dlPort = 1234;
625  uint16_t ulPort = 2000;
626  PacketSinkHelper dlPacketSinkHelper ("ns3::UdpSocketFactory", InetSocketAddress (Ipv4Address::GetAny (), dlPort));
627  PacketSinkHelper ulPacketSinkHelper ("ns3::UdpSocketFactory", InetSocketAddress (Ipv4Address::GetAny (), ulPort));
630  for (uint32_t u = 0; u < ueNodes.GetN (); ++u)
631  {
632  ++ulPort;
633  serverApps.Add (dlPacketSinkHelper.Install (ueNodes.Get (u))); // receive packets from remotehost
634  serverApps.Add (ulPacketSinkHelper.Install (remoteHost)); // receive packets from UEs
635 
636  UdpClientHelper dlClient (ueIpIface.GetAddress (u), dlPort); // uplink packets generator
637  dlClient.SetAttribute ("Interval", TimeValue (MilliSeconds (m_interval)));
638  dlClient.SetAttribute ("MaxPackets", UintegerValue (1000000));
639  dlClient.SetAttribute ("PacketSize", UintegerValue (m_packetSize.at (u)));
640 
641  UdpClientHelper ulClient (remoteHostAddr, ulPort); // downlink packets generator
642  ulClient.SetAttribute ("Interval", TimeValue (MilliSeconds (m_interval)));
643  ulClient.SetAttribute ("MaxPackets", UintegerValue (1000000));
644  ulClient.SetAttribute ("PacketSize", UintegerValue (m_packetSize.at (u)));
645 
646  clientApps.Add (dlClient.Install (remoteHost));
647  clientApps.Add (ulClient.Install (ueNodes.Get (u)));
648  }
649 
650  serverApps.Start (Seconds (0.030));
651  clientApps.Start (Seconds (0.030));
652 
653  double statsStartTime = 0.04; // need to allow for RRC connection establishment + SRS
654  double statsDuration = 0.5;
655  double tolerance = 0.1;
656  Simulator::Stop (Seconds (statsStartTime + statsDuration - 0.0001));
657 
658  lteHelper->EnableRlcTraces ();
659  Ptr<RadioBearerStatsCalculator> rlcStats = lteHelper->GetRlcStats ();
660  rlcStats->SetAttribute ("StartTime", TimeValue (Seconds (statsStartTime)));
661  rlcStats->SetAttribute ("EpochDuration", TimeValue (Seconds (statsDuration)));
662 
663 
664  Simulator::Run ();
665 
670  NS_LOG_INFO ("DL - Test with " << m_nUser << " user(s)");
671  std::vector <uint64_t> dlDataRxed;
672  for (int i = 0; i < m_nUser; i++)
673  {
674  // get the imsi
675  uint64_t imsi = ueDevs.Get (i)->GetObject<LteUeNetDevice> ()->GetImsi ();
676  // get the lcId
677  uint8_t lcId = 4;
678  dlDataRxed.push_back (rlcStats->GetDlRxData (imsi, lcId));
679  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_estThrPssDl.at (i));
680  }
681 
682  for (int i = 0; i < m_nUser; i++)
683  {
684  NS_TEST_ASSERT_MSG_EQ_TOL ((double)dlDataRxed.at (i) / statsDuration, m_estThrPssDl.at (i), m_estThrPssDl.at (i) * tolerance, " Unfair Throughput!");
685  }
686 
687  Simulator::Destroy ();
688 
689 }
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 "...
Hold a bool native type.
Definition: boolean.h:38
NetDeviceContainer InstallEnbDevice(NodeContainer c)
create a set of eNB devices
Definition: lte-helper.cc:346
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.
hold variables of type string
Definition: string.h:18
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:222
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:1105
virtual void DoRun(void)
Implementation to actually run this TestCase.
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:646
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:170
void EnableRlcTraces(void)
Enable trace sinks for RLC layer.
Definition: lte-helper.cc:956
aggregate IP/TCP/UDP functionality to existing Nodes.
static std::string BuildNameString(uint16_t nUser, std::vector< uint16_t > dist)
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Definition: log.h:223
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:929
void SetDeviceAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each NetDevice created by the helper.
a 3d vector
Definition: vector.h:31
ApplicationContainer Install(NodeContainer c)
tuple clientApps
Definition: first.py:53
void SetSchedulerType(std::string type)
Definition: lte-helper.cc:210
LenaPssFfMacSchedulerTestCase1(uint16_t nUser, uint16_t dist, double thrRefDl, double thrRefUl, uint16_t packetSize, uint16_t interval, bool errorModelEnabled)
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:71
This class contains the specification of EPS Bearers.
Definition: eps-bearer.h:71
This system test program creates different test cases with a single eNB and several UEs...
void Install(Ptr< Node > node) const
"Layout" a single node according to the current position allocator type.
Create a client application which sends UDP packets carrying a 32bit sequence number and a 64 bit tim...
hold objects of type ns3::Time
Definition: nstime.h:1008
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:46
static LenaTestPssFfMacSchedulerSuite lenaTestPssFfMacSchedulerSuite
uint8_t data[writeSize]
LenaPssFfMacSchedulerTestCase2(std::vector< uint16_t > dist, std::vector< uint32_t > estThrPssDl, std::vector< uint16_t > packetSize, uint16_t interval, bool errorModelEnabled)
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:355
tuple serverApps
Definition: first.py:44
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.
void SetDefault(std::string name, const AttributeValue &value)
Definition: config.cc:667
void ActivateDedicatedEpsBearer(NetDeviceContainer ueDevices, EpsBearer bearer, Ptr< EpcTft > tft)
Activate a dedicated EPS bearer on a given set of UE devices.
Definition: lte-helper.cc:754
keep track of a set of node pointers.
virtual void DoRun(void)
Implementation to actually run this TestCase.
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())
void Install(std::string nodeName) const
Aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and ns3::Tcp classes onto the provid...
void AddTestCase(TestCase *testCase) NS_DEPRECATED
Add an individual child TestCase case to this TestCase.
Definition: test.cc:184
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:1087
NetDeviceContainer InstallUeDevice(NodeContainer c)
create a set of UE devices
Definition: lte-helper.cc:361
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:38
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:203
Helper class that adds ns3::Ipv4StaticRouting objects.
hold objects of type ns3::DataRate
Ptr< Node > Get(uint32_t i) const
Get the Ptr stored in this container at a given index.
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:253
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
static std::string BuildNameString(uint16_t nUser, uint16_t dist)
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
void EnableMacTraces(void)
Enable trace sinks for MAC layer.
Definition: lte-helper.cc:1044
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
Hold a floating point type.
Definition: double.h:41
void SetAttribute(std::string name, const AttributeValue &value)
Definition: object-base.cc:176
The eNodeB device implementation.
Ptr< T > GetObject(void) const
Definition: object.h:362
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.