A Discrete-Event Network Simulator
API
test-lte-epc-e2e-data.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: Nicola Baldo <nbaldo@cttc.es>
19  */
20 
21 
22 
23 #include "ns3/simulator.h"
24 #include "ns3/log.h"
25 #include "ns3/test.h"
26 #include "ns3/lte-helper.h"
27 #include "ns3/point-to-point-epc-helper.h"
28 #include "ns3/packet-sink-helper.h"
29 #include "ns3/udp-client-server-helper.h"
30 #include "ns3/udp-echo-helper.h"
31 #include "ns3/point-to-point-helper.h"
32 #include "ns3/internet-stack-helper.h"
33 #include "ns3/ipv4-address-helper.h"
34 #include "ns3/inet-socket-address.h"
35 #include "ns3/packet-sink.h"
36 #include <ns3/ipv4-static-routing-helper.h>
37 #include <ns3/ipv4-static-routing.h>
38 #include "ns3/boolean.h"
39 #include "ns3/uinteger.h"
40 #include "ns3/double.h"
41 #include "ns3/abort.h"
42 #include "ns3/mobility-helper.h"
43 
44 
45 
46 
47 using namespace ns3;
48 
49 NS_LOG_COMPONENT_DEFINE ("LteEpcE2eData");
50 
51 
53 {
54  BearerTestData (uint32_t n, uint32_t s, double i);
55 
56  uint32_t numPkts;
57  uint32_t pktSize;
59 
62 
65 };
66 
67  BearerTestData::BearerTestData (uint32_t n, uint32_t s, double i)
68  : numPkts (n),
69  pktSize (s),
70  interPacketInterval (Seconds (i))
71 {
72 }
73 
74 struct UeTestData
75 {
76  std::vector<BearerTestData> bearers;
77 };
78 
80 {
81  std::vector<UeTestData> ues;
82 };
83 
84 
86 {
87 public:
88  LteEpcE2eDataTestCase (std::string name, std::vector<EnbTestData> v);
89  virtual ~LteEpcE2eDataTestCase ();
90 
91 private:
92  virtual void DoRun (void);
93  std::vector<EnbTestData> m_enbTestData;
94 };
95 
96 
97 LteEpcE2eDataTestCase::LteEpcE2eDataTestCase (std::string name, std::vector<EnbTestData> v)
98  : TestCase (name),
99  m_enbTestData (v)
100 {
101  NS_LOG_FUNCTION (this << name);
102 }
103 
105 {
106 }
107 
108 void
110 {
111  NS_LOG_FUNCTION (this << GetName ());
112  Config::Reset ();
113  Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (false));
114  Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (false));
115  Config::SetDefault ("ns3::LteHelper::UseIdealRrc", BooleanValue (true));
116  Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
117  Ptr<PointToPointEpcHelper> epcHelper = CreateObject<PointToPointEpcHelper> ();
118  lteHelper->SetEpcHelper (epcHelper);
119 
120  lteHelper->SetAttribute("PathlossModel",
121  StringValue("ns3::FriisPropagationLossModel"));
122 
123  // allow jumbo frames on the S1-U link
124  epcHelper->SetAttribute ("S1uLinkMtu", UintegerValue (30000));
125 
126  Ptr<Node> pgw = epcHelper->GetPgwNode ();
127 
128  // Create a single RemoteHost
129  NodeContainer remoteHostContainer;
130  remoteHostContainer.Create (1);
131  Ptr<Node> remoteHost = remoteHostContainer.Get (0);
132  InternetStackHelper internet;
133  internet.Install (remoteHostContainer);
134 
135  // Create the internet
136  PointToPointHelper p2ph;
137  p2ph.SetDeviceAttribute ("DataRate", DataRateValue (DataRate ("100Gb/s")));
138  p2ph.SetDeviceAttribute ("Mtu", UintegerValue (30000)); // jumbo frames here as well
139  p2ph.SetChannelAttribute ("Delay", TimeValue (Seconds (0.010)));
140  NetDeviceContainer internetDevices = p2ph.Install (pgw, remoteHost);
141  Ipv4AddressHelper ipv4h;
142  ipv4h.SetBase ("1.0.0.0", "255.0.0.0");
143  Ipv4InterfaceContainer internetIpIfaces = ipv4h.Assign (internetDevices);
144  Ipv4Address remoteHostAddr = internetIpIfaces.GetAddress (1);
145 
146  // setup default gateway for the remote hosts
147  Ipv4StaticRoutingHelper ipv4RoutingHelper;
148  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
149 
150  // hardcoded UE addresses for now
151  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.255.255.0"), 1);
152 
153 
154  NodeContainer enbs;
155  enbs.Create (m_enbTestData.size ());
156  MobilityHelper enbMobility;
157  enbMobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
158  enbMobility.SetPositionAllocator ("ns3::GridPositionAllocator",
159  "MinX", DoubleValue (0.0),
160  "MinY", DoubleValue (0.0),
161  "DeltaX", DoubleValue (10000.0),
162  "DeltaY", DoubleValue (10000.0),
163  "GridWidth", UintegerValue (3),
164  "LayoutType", StringValue ("RowFirst"));
165  enbMobility.Install (enbs);
166  NetDeviceContainer enbLteDevs = lteHelper->InstallEnbDevice (enbs);
167  NetDeviceContainer::Iterator enbLteDevIt = enbLteDevs.Begin ();
168 
169  uint16_t ulPort = 1000;
170 
171  for (std::vector<EnbTestData>::iterator enbit = m_enbTestData.begin ();
172  enbit < m_enbTestData.end ();
173  ++enbit, ++enbLteDevIt)
174  {
175  NS_ABORT_IF (enbLteDevIt == enbLteDevs.End ());
176 
177 
178 
179  NodeContainer ues;
180  ues.Create (enbit->ues.size ());
181  Vector enbPosition = (*enbLteDevIt)->GetNode ()->GetObject<MobilityModel> ()->GetPosition ();
182  MobilityHelper ueMobility;
183  ueMobility.SetPositionAllocator ("ns3::UniformDiscPositionAllocator",
184  "X", DoubleValue (enbPosition.x),
185  "Y", DoubleValue (enbPosition.y),
186  "rho", DoubleValue (100.0));
187  ueMobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
188  ueMobility.Install (ues);
189  NetDeviceContainer ueLteDevs = lteHelper->InstallUeDevice (ues);
190 
191  // we install the IP stack on the UEs
192  InternetStackHelper internet;
193  internet.Install (ues);
194 
195  // assign IP address to UEs, and install applications
196  for (uint32_t u = 0; u < ues.GetN (); ++u)
197  {
198 
199  Ptr<Node> ue = ues.Get (u);
200  Ptr<NetDevice> ueLteDevice = ueLteDevs.Get (u);
201  Ipv4InterfaceContainer ueIpIface = epcHelper->AssignUeIpv4Address (NetDeviceContainer (ueLteDevice));
202  // set the default gateway for the UE
203  Ptr<Ipv4StaticRouting> ueStaticRouting = ipv4RoutingHelper.GetStaticRouting (ue->GetObject<Ipv4> ());
204  ueStaticRouting->SetDefaultRoute (epcHelper->GetUeDefaultGatewayAddress (), 1);
205 
206 
207  // we can now attach the UE, which will also activate the default EPS bearer
208  lteHelper->Attach (ueLteDevice, *enbLteDevIt);
209 
210 
211  uint16_t dlPort = 2000;
212  for (uint32_t b = 0; b < enbit->ues.at (u).bearers.size (); ++b)
213  {
214  BearerTestData& bearerTestData = enbit->ues.at (u).bearers.at (b);
215 
216  { // Downlink
217  ++dlPort;
218  PacketSinkHelper packetSinkHelper ("ns3::UdpSocketFactory", InetSocketAddress (Ipv4Address::GetAny (), dlPort));
219  ApplicationContainer apps = packetSinkHelper.Install (ue);
220  apps.Start (Seconds (0.04));
221  bearerTestData.dlServerApp = apps.Get (0)->GetObject<PacketSink> ();
222 
223  UdpEchoClientHelper client (ueIpIface.GetAddress (0), dlPort);
224  client.SetAttribute ("MaxPackets", UintegerValue (bearerTestData.numPkts));
225  client.SetAttribute ("Interval", TimeValue (bearerTestData.interPacketInterval));
226  client.SetAttribute ("PacketSize", UintegerValue (bearerTestData.pktSize));
227  apps = client.Install (remoteHost);
228  apps.Start (Seconds (0.04));
229  bearerTestData.dlClientApp = apps.Get (0);
230  }
231 
232  { // Uplink
233  ++ulPort;
234  PacketSinkHelper packetSinkHelper ("ns3::UdpSocketFactory", InetSocketAddress (Ipv4Address::GetAny (), ulPort));
235  ApplicationContainer apps = packetSinkHelper.Install (remoteHost);
236  apps.Start (Seconds (0.8));
237  bearerTestData.ulServerApp = apps.Get (0)->GetObject<PacketSink> ();
238 
239  UdpEchoClientHelper client (remoteHostAddr, ulPort);
240  client.SetAttribute ("MaxPackets", UintegerValue (bearerTestData.numPkts));
241  client.SetAttribute ("Interval", TimeValue (bearerTestData.interPacketInterval));
242  client.SetAttribute ("PacketSize", UintegerValue (bearerTestData.pktSize));
243  apps = client.Install (ue);
244  apps.Start (Seconds (0.8));
245  bearerTestData.ulClientApp = apps.Get (0);
246  }
247 
248  EpsBearer epsBearer (EpsBearer::NGBR_VOICE_VIDEO_GAMING);
249 
250  Ptr<EpcTft> tft = Create<EpcTft> ();
252  dlpf.localPortStart = dlPort;
253  dlpf.localPortEnd = dlPort;
254  tft->Add (dlpf);
256  ulpf.remotePortStart = ulPort;
257  ulpf.remotePortEnd = ulPort;
258  tft->Add (ulpf);
259 
260  // all data will go over the dedicated bearer instead of the default EPS bearer
261  lteHelper->ActivateDedicatedEpsBearer (ueLteDevice, epsBearer, tft);
262  }
263  }
264 
265  }
266 
267  Config::Set ("/NodeList/*/DeviceList/*/LteEnbRrc/UeMap/*/RadioBearerMap/*/LteRlc/MaxTxBufferSize",
268  UintegerValue (2 * 1024 * 1024));
269  Config::Set ("/NodeList/*/DeviceList/*/LteUeRrc/RadioBearerMap/*/LteRlc/MaxTxBufferSize",
270  UintegerValue (2 * 1024 * 1024));
271 
272 
273  double statsStartTime = 0.040; // need to allow for RRC connection establishment + SRS
274  double statsDuration = 2.0;
275 
276  lteHelper->EnablePdcpTraces ();
277 
278  lteHelper->GetPdcpStats ()->SetAttribute ("StartTime", TimeValue (Seconds (statsStartTime)));
279  lteHelper->GetPdcpStats ()->SetAttribute ("EpochDuration", TimeValue (Seconds (statsDuration)));
280 
281 
282  Simulator::Stop (Seconds (statsStartTime + statsDuration - 0.0001));
283  Simulator::Run ();
284 
285  uint64_t imsiCounter = 0;
286 
287  for (std::vector<EnbTestData>::iterator enbit = m_enbTestData.begin ();
288  enbit < m_enbTestData.end ();
289  ++enbit)
290  {
291  for (std::vector<UeTestData>::iterator ueit = enbit->ues.begin ();
292  ueit < enbit->ues.end ();
293  ++ueit)
294  {
295  uint64_t imsi = ++imsiCounter;
296  for (uint32_t b = 0; b < ueit->bearers.size (); ++b)
297  {
298  // LCID 0, 1, 2 are for SRBs
299  // LCID 3 is (at the moment) the Default EPS bearer, and is unused in this test program
300  uint8_t lcid = b+4;
301  uint32_t expectedPkts = ueit->bearers.at (b).numPkts;
302  uint32_t expectedBytes = (ueit->bearers.at (b).numPkts) * (ueit->bearers.at (b).pktSize);
303  uint32_t txPktsPdcpDl = lteHelper->GetPdcpStats ()->GetDlTxPackets (imsi, lcid);
304  uint32_t rxPktsPdcpDl = lteHelper->GetPdcpStats ()->GetDlRxPackets (imsi, lcid);
305  uint32_t txPktsPdcpUl = lteHelper->GetPdcpStats ()->GetUlTxPackets (imsi, lcid);
306  uint32_t rxPktsPdcpUl = lteHelper->GetPdcpStats ()->GetUlRxPackets (imsi, lcid);
307  uint32_t rxBytesDl = ueit->bearers.at (b).dlServerApp->GetTotalRx ();
308  uint32_t rxBytesUl = ueit->bearers.at (b).ulServerApp->GetTotalRx ();
309 
310 
311  NS_TEST_ASSERT_MSG_EQ (txPktsPdcpDl,
312  expectedPkts,
313  "wrong TX PDCP packets in downlink for IMSI=" << imsi << " LCID=" << (uint16_t) lcid);
314 
315  NS_TEST_ASSERT_MSG_EQ (rxPktsPdcpDl,
316  expectedPkts,
317  "wrong RX PDCP packets in downlink for IMSI=" << imsi << " LCID=" << (uint16_t) lcid);
318  NS_TEST_ASSERT_MSG_EQ (txPktsPdcpUl,
319  expectedPkts,
320  "wrong TX PDCP packets in uplink for IMSI=" << imsi << " LCID=" << (uint16_t) lcid);
321  NS_TEST_ASSERT_MSG_EQ (rxPktsPdcpUl,
322  expectedPkts,
323  "wrong RX PDCP packets in uplink for IMSI=" << imsi << " LCID=" << (uint16_t) lcid);
324 
325  NS_TEST_ASSERT_MSG_EQ (rxBytesDl,
326  expectedBytes,
327  "wrong total received bytes in downlink");
328  NS_TEST_ASSERT_MSG_EQ (rxBytesUl,
329  expectedBytes,
330  "wrong total received bytes in uplink");
331  }
332  }
333  }
334 
335  Simulator::Destroy ();
336 }
337 
338 
339 
340 
341 
346 {
347 public:
349 
351 
353  : TestSuite ("lte-epc-e2e-data", SYSTEM)
354 {
355  std::vector<EnbTestData> v1;
356  EnbTestData e1;
357  UeTestData u1;
358  BearerTestData f1 (1, 100, 0.01);
359  u1.bearers.push_back (f1);
360  e1.ues.push_back (u1);
361  v1.push_back (e1);
362  AddTestCase (new LteEpcE2eDataTestCase ("1 eNB, 1UE", v1), TestCase::QUICK);
363 
364  std::vector<EnbTestData> v2;
365  EnbTestData e2;
366  UeTestData u2_1;
367  BearerTestData f2_1 (1, 100, 0.01);
368  u2_1.bearers.push_back (f2_1);
369  e2.ues.push_back (u2_1);
370  UeTestData u2_2;
371  BearerTestData f2_2 (2, 200, 0.01);
372  u2_2.bearers.push_back (f2_2);
373  e2.ues.push_back (u2_2);
374  v2.push_back (e2);
375  AddTestCase (new LteEpcE2eDataTestCase ("1 eNB, 2UEs", v2), TestCase::EXTENSIVE);
376 
377  std::vector<EnbTestData> v3;
378  v3.push_back (e1);
379  v3.push_back (e2);
380  AddTestCase (new LteEpcE2eDataTestCase ("2 eNBs", v3), TestCase::EXTENSIVE);
381 
382  EnbTestData e4;
383  UeTestData u4_1;
384  BearerTestData f4_1 (3, 50, 0.01);
385  u4_1.bearers.push_back (f4_1);
386  e4.ues.push_back (u4_1);
387  UeTestData u4_2;
388  BearerTestData f4_2 (5, 1400, 0.01);
389  u4_2.bearers.push_back (f4_2);
390  e4.ues.push_back (u4_2);
391  UeTestData u4_3;
392  BearerTestData f4_3 (1, 12, 0.01);
393  u4_3.bearers.push_back (f4_3);
394  e4.ues.push_back (u4_3);
395  std::vector<EnbTestData> v4;
396  v4.push_back (e4);
397  v4.push_back (e1);
398  v4.push_back (e2);
399  AddTestCase (new LteEpcE2eDataTestCase ("3 eNBs", v4), TestCase::EXTENSIVE);
400 
401  EnbTestData e5;
402  UeTestData u5;
403  BearerTestData f5 (5, 1000, 0.01);
404  u5.bearers.push_back (f5);
405  e5.ues.push_back (u5);
406  std::vector<EnbTestData> v5;
407  v5.push_back (e5);
408  AddTestCase (new LteEpcE2eDataTestCase ("1 eNB, 1UE with 1000 byte packets", v5), TestCase::EXTENSIVE);
409 
410 
411  EnbTestData e6;
412  UeTestData u6;
413  BearerTestData f6 (5, 1400, 0.01);
414  u6.bearers.push_back (f6);
415  e6.ues.push_back (u6);
416  std::vector<EnbTestData> v6;
417  v6.push_back (e6);
418  AddTestCase (new LteEpcE2eDataTestCase ("1 eNB, 1UE with 1400 byte packets", v6), TestCase::EXTENSIVE);
419 
420  EnbTestData e7;
421  UeTestData u7;
422  BearerTestData f7_1 (1, 1400, 0.01);
423  u7.bearers.push_back (f7_1);
424  BearerTestData f7_2 (1, 100, 0.01);
425  u7.bearers.push_back (f7_2);
426  e7.ues.push_back (u7);
427  std::vector<EnbTestData> v7;
428  v7.push_back (e7);
429  AddTestCase (new LteEpcE2eDataTestCase ("1 eNB, 1UE with 2 bearers", v7), TestCase::EXTENSIVE);
430 
431  EnbTestData e8;
432  UeTestData u8;
433  BearerTestData f8 (50, 8000, 0.02); // watch out for ns3::LteRlcUm::MaxTxBufferSize
434  u8.bearers.push_back (f8);
435  e8.ues.push_back (u8);
436  std::vector<EnbTestData> v8;
437  v8.push_back (e8);
438  AddTestCase (new LteEpcE2eDataTestCase ("1 eNB, 1UE with fragmentation", v8), TestCase::EXTENSIVE);
439 
440 
441  EnbTestData e9;
442  UeTestData u9;
443  BearerTestData f9 (1000, 20, 0.0001);
444  u9.bearers.push_back (f9);
445  e9.ues.push_back (u9);
446  std::vector<EnbTestData> v9;
447  v9.push_back (e9);
448  AddTestCase (new LteEpcE2eDataTestCase ("1 eNB, 1UE with aggregation", v9), TestCase::EXTENSIVE);
449 
450 
451 }
holds a vector of ns3::Application pointers.
Iterator Begin(void) const
Get an iterator which refers to the first NetDevice in the container.
uint8_t Add(PacketFilter f)
add a PacketFilter to the Traffic Flow Template
Definition: epc-tft.cc:157
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:102
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
Test that the S1-U interface implementation works correctly.
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.
void Set(std::string path, const AttributeValue &value)
Definition: config.cc:769
NetDeviceContainer Install(NodeContainer c)
a class to represent an Ipv4 address mask
Definition: ipv4-address.h:257
A suite of tests to run.
Definition: test.h:1333
static Vector GetPosition(Ptr< Node > node)
Definition: multirate.cc:315
Create an application which sends a UDP packet and waits for an echo of this packet.
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
aggregate IP/TCP/UDP functionality to existing Nodes.
std::vector< EnbTestData > m_enbTestData
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
virtual void DoRun(void)
Implementation to actually run this TestCase.
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
Class for representing data rates.
Definition: data-rate.h:88
void EnablePdcpTraces(void)
Enable trace sinks for PDCP layer.
Definition: lte-helper.cc:1239
Keep track of the current position and velocity of an object.
This class contains the specification of EPS Bearers.
Definition: eps-bearer.h:71
void Install(Ptr< Node > node) const
"Layout" a single node according to the current position allocator type.
void AddTestCase(TestCase *testCase, enum TestDuration duration)
Add an individual child TestCase to this test suite.
Definition: test.cc:298
AttributeValue implementation for Time.
Definition: nstime.h:957
Hold an unsigned integer type.
Definition: uinteger.h:44
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not.
Definition: test.h:161
holds a vector of ns3::NetDevice pointers
Ptr< Application > ulClientApp
std::vector< BearerTestData > bearers
void Start(Time start)
Arrange for all of the Applications in this container to Start() at the Time given as a parameter...
std::vector< UeTestData > ues
Ptr< PacketSink > ulServerApp
Access to the IPv4 forwarding table, interfaces, and configuration.
Definition: ipv4.h:76
uint16_t remotePortEnd
end of the port number range of the remote host
Definition: epc-tft.h:113
LteEpcE2eDataTestSuite g_lteEpcE2eDataTestSuite
Every class exported by the ns3 library is enclosed in the ns3 namespace.
keep track of a set of node pointers.
Ptr< Application > Get(uint32_t i) const
Get the Ptr stored in this container at a given index.
Ptr< Application > dlClientApp
LteEpcE2eDataTestCase(std::string name, std::vector< EnbTestData > v)
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 Reset(void)
Reset the initial value of every attribute as well as the value of every global to what they were bef...
Definition: config.cc:749
void SetChannelAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each Channel created by the helper.
NetDeviceContainer InstallUeDevice(NodeContainer c)
Create a set of UE devices.
Definition: lte-helper.cc:397
Ptr< RadioBearerStatsCalculator > GetPdcpStats(void)
Definition: lte-helper.cc:1247
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.
#define NS_ABORT_IF(cond)
Abnormal program termination if a condition is true.
Definition: abort.h:77
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.
std::vector< Ptr< NetDevice > >::const_iterator Iterator
NetDevice container iterator.
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
Ptr< PacketSink > dlServerApp
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.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
void SetAttribute(std::string name, const AttributeValue &value)
Record an attribute to be set in each Application after it is is created.
Receive and consume traffic generated to an IP address and port.
Definition: packet-sink.h:68
void SetPositionAllocator(Ptr< PositionAllocator > allocator)
Set the position allocator which will be used to allocate the initial position of every node initiali...
Iterator End(void) const
Get an iterator which indicates past-the-last NetDevice in the container.
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
BearerTestData(uint32_t n, uint32_t s, double i)
uint16_t remotePortStart
start of the port number range of the remote host
Definition: epc-tft.h:112
void SetBase(Ipv4Address network, Ipv4Mask mask, Ipv4Address base="0.0.0.1")
Set the base network number, network mask and base address.
Implement the data structure representing a TrafficFlowTemplate Packet Filter.
Definition: epc-tft.h:73
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const
uint16_t localPortStart
start of the port number range of the UE
Definition: epc-tft.h:114