A Discrete-Event Network Simulator
API
test-lte-epc-e2e-data.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Nicola Baldo <nbaldo@cttc.es>
18 */
19
20#include "ns3/abort.h"
21#include "ns3/boolean.h"
22#include "ns3/double.h"
23#include "ns3/inet-socket-address.h"
24#include "ns3/internet-stack-helper.h"
25#include "ns3/ipv4-address-helper.h"
26#include "ns3/log.h"
27#include "ns3/lte-helper.h"
28#include "ns3/mobility-helper.h"
29#include "ns3/packet-sink-helper.h"
30#include "ns3/packet-sink.h"
31#include "ns3/point-to-point-epc-helper.h"
32#include "ns3/point-to-point-helper.h"
33#include "ns3/simulator.h"
34#include "ns3/test.h"
35#include "ns3/udp-client-server-helper.h"
36#include "ns3/udp-echo-helper.h"
37#include "ns3/uinteger.h"
38#include <ns3/ipv4-static-routing-helper.h>
39#include <ns3/ipv4-static-routing.h>
40
41using namespace ns3;
42
43NS_LOG_COMPONENT_DEFINE("LteEpcE2eData");
44
52{
60 BearerTestData(uint32_t n, uint32_t s, double i);
61
65
68
71};
72
74 : numPkts(n),
75 pktSize(s),
76 interPacketInterval(Seconds(i))
77{
78}
79
82{
83 std::vector<BearerTestData> bearers;
84};
85
88{
89 std::vector<UeTestData> ues;
90};
91
101{
102 public:
109 LteEpcE2eDataTestCase(std::string name, std::vector<EnbTestData> v);
110 ~LteEpcE2eDataTestCase() override;
111
112 private:
113 void DoRun() override;
114 std::vector<EnbTestData> m_enbTestData;
115};
116
117LteEpcE2eDataTestCase::LteEpcE2eDataTestCase(std::string name, std::vector<EnbTestData> v)
118 : TestCase(name),
119 m_enbTestData(v)
120{
121 NS_LOG_FUNCTION(this << name);
122}
123
125{
126}
127
128void
130{
131 NS_LOG_FUNCTION(this << GetName());
133 Config::SetDefault("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue(false));
134 Config::SetDefault("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue(false));
135 Config::SetDefault("ns3::LteHelper::UseIdealRrc", BooleanValue(true));
136
137 Config::SetDefault("ns3::RadioBearerStatsCalculator::DlPdcpOutputFilename",
138 StringValue(CreateTempDirFilename("DlPdcpStats.txt")));
139 Config::SetDefault("ns3::RadioBearerStatsCalculator::UlPdcpOutputFilename",
140 StringValue(CreateTempDirFilename("UlPdcpStats.txt")));
141
142 Ptr<LteHelper> lteHelper = CreateObject<LteHelper>();
143 Ptr<PointToPointEpcHelper> epcHelper = CreateObject<PointToPointEpcHelper>();
144 lteHelper->SetEpcHelper(epcHelper);
145
146 lteHelper->SetAttribute("PathlossModel", StringValue("ns3::FriisPropagationLossModel"));
147
148 // allow jumbo frames on the S1-U link
149 epcHelper->SetAttribute("S1uLinkMtu", UintegerValue(30000));
150
151 Ptr<Node> pgw = epcHelper->GetPgwNode();
152
153 // Create a single RemoteHost
154 NodeContainer remoteHostContainer;
155 remoteHostContainer.Create(1);
156 Ptr<Node> remoteHost = remoteHostContainer.Get(0);
157 InternetStackHelper internet;
158 internet.Install(remoteHostContainer);
159
160 // Create the internet
162 p2ph.SetDeviceAttribute("DataRate", DataRateValue(DataRate("100Gb/s")));
163 p2ph.SetDeviceAttribute("Mtu", UintegerValue(30000)); // jumbo frames here as well
164 p2ph.SetChannelAttribute("Delay", TimeValue(Seconds(0.010)));
165 NetDeviceContainer internetDevices = p2ph.Install(pgw, remoteHost);
166 Ipv4AddressHelper ipv4h;
167 ipv4h.SetBase("1.0.0.0", "255.0.0.0");
168 Ipv4InterfaceContainer internetIpIfaces = ipv4h.Assign(internetDevices);
169 Ipv4Address remoteHostAddr = internetIpIfaces.GetAddress(1);
170
171 // setup default gateway for the remote hosts
172 Ipv4StaticRoutingHelper ipv4RoutingHelper;
173 Ptr<Ipv4StaticRouting> remoteHostStaticRouting =
174 ipv4RoutingHelper.GetStaticRouting(remoteHost->GetObject<Ipv4>());
175
176 // hardcoded UE addresses for now
177 remoteHostStaticRouting->AddNetworkRouteTo(Ipv4Address("7.0.0.0"),
178 Ipv4Mask("255.255.255.0"),
179 1);
180
181 NodeContainer enbs;
182 enbs.Create(m_enbTestData.size());
183 MobilityHelper enbMobility;
184 enbMobility.SetMobilityModel("ns3::ConstantPositionMobilityModel");
185 enbMobility.SetPositionAllocator("ns3::GridPositionAllocator",
186 "MinX",
187 DoubleValue(0.0),
188 "MinY",
189 DoubleValue(0.0),
190 "DeltaX",
191 DoubleValue(10000.0),
192 "DeltaY",
193 DoubleValue(10000.0),
194 "GridWidth",
195 UintegerValue(3),
196 "LayoutType",
197 StringValue("RowFirst"));
198 enbMobility.Install(enbs);
199 NetDeviceContainer enbLteDevs = lteHelper->InstallEnbDevice(enbs);
200 NetDeviceContainer::Iterator enbLteDevIt = enbLteDevs.Begin();
201
202 uint16_t ulPort = 1000;
203
204 for (std::vector<EnbTestData>::iterator enbit = m_enbTestData.begin();
205 enbit < m_enbTestData.end();
206 ++enbit, ++enbLteDevIt)
207 {
208 NS_ABORT_IF(enbLteDevIt == enbLteDevs.End());
209
210 NodeContainer ues;
211 ues.Create(enbit->ues.size());
212 Vector enbPosition = (*enbLteDevIt)->GetNode()->GetObject<MobilityModel>()->GetPosition();
213 MobilityHelper ueMobility;
214 ueMobility.SetPositionAllocator("ns3::UniformDiscPositionAllocator",
215 "X",
216 DoubleValue(enbPosition.x),
217 "Y",
218 DoubleValue(enbPosition.y),
219 "rho",
220 DoubleValue(100.0));
221 ueMobility.SetMobilityModel("ns3::ConstantPositionMobilityModel");
222 ueMobility.Install(ues);
223 NetDeviceContainer ueLteDevs = lteHelper->InstallUeDevice(ues);
224
225 // we install the IP stack on the UEs
226 InternetStackHelper internet;
227 internet.Install(ues);
228
229 // assign IP address to UEs, and install applications
230 for (uint32_t u = 0; u < ues.GetN(); ++u)
231 {
232 Ptr<Node> ue = ues.Get(u);
233 Ptr<NetDevice> ueLteDevice = ueLteDevs.Get(u);
234 Ipv4InterfaceContainer ueIpIface =
235 epcHelper->AssignUeIpv4Address(NetDeviceContainer(ueLteDevice));
236 // set the default gateway for the UE
237 Ptr<Ipv4StaticRouting> ueStaticRouting =
238 ipv4RoutingHelper.GetStaticRouting(ue->GetObject<Ipv4>());
239 ueStaticRouting->SetDefaultRoute(epcHelper->GetUeDefaultGatewayAddress(), 1);
240
241 // we can now attach the UE, which will also activate the default EPS bearer
242 lteHelper->Attach(ueLteDevice, *enbLteDevIt);
243
244 uint16_t dlPort = 2000;
245 for (uint32_t b = 0; b < enbit->ues.at(u).bearers.size(); ++b)
246 {
247 BearerTestData& bearerTestData = enbit->ues.at(u).bearers.at(b);
248
249 { // Downlink
250 ++dlPort;
251 PacketSinkHelper packetSinkHelper(
252 "ns3::UdpSocketFactory",
253 InetSocketAddress(Ipv4Address::GetAny(), dlPort));
254 ApplicationContainer apps = packetSinkHelper.Install(ue);
255 apps.Start(Seconds(0.04));
256 bearerTestData.dlServerApp = apps.Get(0)->GetObject<PacketSink>();
257
258 UdpEchoClientHelper client(ueIpIface.GetAddress(0), dlPort);
259 client.SetAttribute("MaxPackets", UintegerValue(bearerTestData.numPkts));
260 client.SetAttribute("Interval", TimeValue(bearerTestData.interPacketInterval));
261 client.SetAttribute("PacketSize", UintegerValue(bearerTestData.pktSize));
262 apps = client.Install(remoteHost);
263 apps.Start(Seconds(0.04));
264 bearerTestData.dlClientApp = apps.Get(0);
265 }
266
267 { // Uplink
268 ++ulPort;
269 PacketSinkHelper packetSinkHelper(
270 "ns3::UdpSocketFactory",
271 InetSocketAddress(Ipv4Address::GetAny(), ulPort));
272 ApplicationContainer apps = packetSinkHelper.Install(remoteHost);
273 apps.Start(Seconds(0.8));
274 bearerTestData.ulServerApp = apps.Get(0)->GetObject<PacketSink>();
275
276 UdpEchoClientHelper client(remoteHostAddr, ulPort);
277 client.SetAttribute("MaxPackets", UintegerValue(bearerTestData.numPkts));
278 client.SetAttribute("Interval", TimeValue(bearerTestData.interPacketInterval));
279 client.SetAttribute("PacketSize", UintegerValue(bearerTestData.pktSize));
280 apps = client.Install(ue);
281 apps.Start(Seconds(0.8));
282 bearerTestData.ulClientApp = apps.Get(0);
283 }
284
285 EpsBearer epsBearer(EpsBearer::NGBR_VOICE_VIDEO_GAMING);
286
287 Ptr<EpcTft> tft = Create<EpcTft>();
289 dlpf.localPortStart = dlPort;
290 dlpf.localPortEnd = dlPort;
291 tft->Add(dlpf);
293 ulpf.remotePortStart = ulPort;
294 ulpf.remotePortEnd = ulPort;
295 tft->Add(ulpf);
296
297 // all data will go over the dedicated bearer instead of the default EPS bearer
298 lteHelper->ActivateDedicatedEpsBearer(ueLteDevice, epsBearer, tft);
299 }
300 }
301 }
302
304 "/NodeList/*/DeviceList/*/LteEnbRrc/UeMap/*/RadioBearerMap/*/LteRlc/MaxTxBufferSize",
305 UintegerValue(2 * 1024 * 1024));
306 Config::Set("/NodeList/*/DeviceList/*/LteUeRrc/RadioBearerMap/*/LteRlc/MaxTxBufferSize",
307 UintegerValue(2 * 1024 * 1024));
308
309 double statsStartTime = 0.040; // need to allow for RRC connection establishment + SRS
310 double statsDuration = 2.0;
311
312 lteHelper->EnablePdcpTraces();
313
314 lteHelper->GetPdcpStats()->SetAttribute("StartTime", TimeValue(Seconds(statsStartTime)));
315 lteHelper->GetPdcpStats()->SetAttribute("EpochDuration", TimeValue(Seconds(statsDuration)));
316
317 Simulator::Stop(Seconds(statsStartTime + statsDuration - 0.0001));
318 Simulator::Run();
319
320 uint64_t imsiCounter = 0;
321
322 for (std::vector<EnbTestData>::iterator enbit = m_enbTestData.begin();
323 enbit < m_enbTestData.end();
324 ++enbit)
325 {
326 for (std::vector<UeTestData>::iterator ueit = enbit->ues.begin(); ueit < enbit->ues.end();
327 ++ueit)
328 {
329 uint64_t imsi = ++imsiCounter;
330 for (uint32_t b = 0; b < ueit->bearers.size(); ++b)
331 {
332 // LCID 0, 1, 2 are for SRBs
333 // LCID 3 is (at the moment) the Default EPS bearer, and is unused in this test
334 // program
335 uint8_t lcid = b + 4;
336 uint32_t expectedPkts = ueit->bearers.at(b).numPkts;
337 uint32_t expectedBytes =
338 (ueit->bearers.at(b).numPkts) * (ueit->bearers.at(b).pktSize);
339 uint32_t txPktsPdcpDl = lteHelper->GetPdcpStats()->GetDlTxPackets(imsi, lcid);
340 uint32_t rxPktsPdcpDl = lteHelper->GetPdcpStats()->GetDlRxPackets(imsi, lcid);
341 uint32_t txPktsPdcpUl = lteHelper->GetPdcpStats()->GetUlTxPackets(imsi, lcid);
342 uint32_t rxPktsPdcpUl = lteHelper->GetPdcpStats()->GetUlRxPackets(imsi, lcid);
343 uint32_t rxBytesDl = ueit->bearers.at(b).dlServerApp->GetTotalRx();
344 uint32_t rxBytesUl = ueit->bearers.at(b).ulServerApp->GetTotalRx();
345
346 NS_TEST_ASSERT_MSG_EQ(txPktsPdcpDl,
347 expectedPkts,
348 "wrong TX PDCP packets in downlink for IMSI="
349 << imsi << " LCID=" << (uint16_t)lcid);
350
351 NS_TEST_ASSERT_MSG_EQ(rxPktsPdcpDl,
352 expectedPkts,
353 "wrong RX PDCP packets in downlink for IMSI="
354 << imsi << " LCID=" << (uint16_t)lcid);
355 NS_TEST_ASSERT_MSG_EQ(txPktsPdcpUl,
356 expectedPkts,
357 "wrong TX PDCP packets in uplink for IMSI="
358 << imsi << " LCID=" << (uint16_t)lcid);
359 NS_TEST_ASSERT_MSG_EQ(rxPktsPdcpUl,
360 expectedPkts,
361 "wrong RX PDCP packets in uplink for IMSI="
362 << imsi << " LCID=" << (uint16_t)lcid);
363
364 NS_TEST_ASSERT_MSG_EQ(rxBytesDl,
365 expectedBytes,
366 "wrong total received bytes in downlink");
367 NS_TEST_ASSERT_MSG_EQ(rxBytesUl,
368 expectedBytes,
369 "wrong total received bytes in uplink");
370 }
371 }
372 }
373
374 Simulator::Destroy();
375}
376
383{
384 public:
386
388
390 : TestSuite("lte-epc-e2e-data", SYSTEM)
391{
392 std::vector<EnbTestData> v1;
393 EnbTestData e1;
394 UeTestData u1;
395 BearerTestData f1(1, 100, 0.01);
396 u1.bearers.push_back(f1);
397 e1.ues.push_back(u1);
398 v1.push_back(e1);
399 AddTestCase(new LteEpcE2eDataTestCase("1 eNB, 1UE", v1), TestCase::QUICK);
400
401 std::vector<EnbTestData> v2;
402 EnbTestData e2;
403 UeTestData u2_1;
404 BearerTestData f2_1(1, 100, 0.01);
405 u2_1.bearers.push_back(f2_1);
406 e2.ues.push_back(u2_1);
407 UeTestData u2_2;
408 BearerTestData f2_2(2, 200, 0.01);
409 u2_2.bearers.push_back(f2_2);
410 e2.ues.push_back(u2_2);
411 v2.push_back(e2);
412 AddTestCase(new LteEpcE2eDataTestCase("1 eNB, 2UEs", v2), TestCase::EXTENSIVE);
413
414 std::vector<EnbTestData> v3;
415 v3.push_back(e1);
416 v3.push_back(e2);
417 AddTestCase(new LteEpcE2eDataTestCase("2 eNBs", v3), TestCase::EXTENSIVE);
418
419 EnbTestData e4;
420 UeTestData u4_1;
421 BearerTestData f4_1(3, 50, 0.01);
422 u4_1.bearers.push_back(f4_1);
423 e4.ues.push_back(u4_1);
424 UeTestData u4_2;
425 BearerTestData f4_2(5, 1400, 0.01);
426 u4_2.bearers.push_back(f4_2);
427 e4.ues.push_back(u4_2);
428 UeTestData u4_3;
429 BearerTestData f4_3(1, 12, 0.01);
430 u4_3.bearers.push_back(f4_3);
431 e4.ues.push_back(u4_3);
432 std::vector<EnbTestData> v4;
433 v4.push_back(e4);
434 v4.push_back(e1);
435 v4.push_back(e2);
436 AddTestCase(new LteEpcE2eDataTestCase("3 eNBs", v4), TestCase::EXTENSIVE);
437
438 EnbTestData e5;
439 UeTestData u5;
440 BearerTestData f5(5, 1000, 0.01);
441 u5.bearers.push_back(f5);
442 e5.ues.push_back(u5);
443 std::vector<EnbTestData> v5;
444 v5.push_back(e5);
445 AddTestCase(new LteEpcE2eDataTestCase("1 eNB, 1UE with 1000 byte packets", v5),
446 TestCase::EXTENSIVE);
447
448 EnbTestData e6;
449 UeTestData u6;
450 BearerTestData f6(5, 1400, 0.01);
451 u6.bearers.push_back(f6);
452 e6.ues.push_back(u6);
453 std::vector<EnbTestData> v6;
454 v6.push_back(e6);
455 AddTestCase(new LteEpcE2eDataTestCase("1 eNB, 1UE with 1400 byte packets", v6),
456 TestCase::EXTENSIVE);
457
458 EnbTestData e7;
459 UeTestData u7;
460 BearerTestData f7_1(1, 1400, 0.01);
461 u7.bearers.push_back(f7_1);
462 BearerTestData f7_2(1, 100, 0.01);
463 u7.bearers.push_back(f7_2);
464 e7.ues.push_back(u7);
465 std::vector<EnbTestData> v7;
466 v7.push_back(e7);
467 AddTestCase(new LteEpcE2eDataTestCase("1 eNB, 1UE with 2 bearers", v7), TestCase::EXTENSIVE);
468
469 EnbTestData e8;
470 UeTestData u8;
471 BearerTestData f8(50, 8000, 0.02); // watch out for ns3::LteRlcUm::MaxTxBufferSize
472 u8.bearers.push_back(f8);
473 e8.ues.push_back(u8);
474 std::vector<EnbTestData> v8;
475 v8.push_back(e8);
476 AddTestCase(new LteEpcE2eDataTestCase("1 eNB, 1UE with fragmentation", v8),
477 TestCase::EXTENSIVE);
478
479 EnbTestData e9;
480 UeTestData u9;
481 BearerTestData f9(1000, 20, 0.0001);
482 u9.bearers.push_back(f9);
483 e9.ues.push_back(u9);
484 std::vector<EnbTestData> v9;
485 v9.push_back(e9);
486 AddTestCase(new LteEpcE2eDataTestCase("1 eNB, 1UE with aggregation", v9), TestCase::EXTENSIVE);
487}
Test that e2e packet flow is correct.
LteEpcE2eDataTestCase(std::string name, std::vector< EnbTestData > v)
Constructor.
void DoRun() override
Implementation to actually run this TestCase.
std::vector< EnbTestData > m_enbTestData
the ENB test data
Test that the S1-U interface implementation works correctly.
holds a vector of ns3::Application pointers.
Ptr< Application > Get(uint32_t i) const
Get the Ptr<Application> stored in this container at a given index.
void Start(Time start)
Arrange for all of the Applications in this container to Start() at the Time given as a parameter.
AttributeValue implementation for Boolean.
Definition: boolean.h:37
AttributeValue implementation for DataRate.
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Definition: double.h:42
This class contains the specification of EPS Bearers.
Definition: eps-bearer.h:91
an Inet address class
aggregate IP/TCP/UDP functionality to existing Nodes.
void Install(std::string nodeName) const
Aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and ns3::Tcp classes onto the provid...
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
void SetBase(Ipv4Address network, Ipv4Mask mask, Ipv4Address base="0.0.0.1")
Set the base network number, network mask and base address.
Ipv4InterfaceContainer Assign(const NetDeviceContainer &c)
Assign IP addresses to the net devices specified in the container based on the current network prefix...
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:43
Access to the IPv4 forwarding table, interfaces, and configuration.
Definition: ipv4.h:79
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const
a class to represent an Ipv4 address mask
Definition: ipv4-address.h:258
Helper class that adds ns3::Ipv4StaticRouting objects.
Ptr< Ipv4StaticRouting > GetStaticRouting(Ptr< Ipv4 > ipv4) const
Try and find the static routing protocol as either the main routing protocol or in the list of routin...
void SetEpcHelper(Ptr< EpcHelper > h)
Set the EpcHelper to be used to setup the EPC network in conjunction with the setup of the LTE radio ...
Definition: lte-helper.cc:282
Ptr< RadioBearerStatsCalculator > GetPdcpStats()
Definition: lte-helper.cc:1723
NetDeviceContainer InstallEnbDevice(NodeContainer c)
Create a set of eNodeB devices.
Definition: lte-helper.cc:482
void EnablePdcpTraces()
Enable trace sinks for PDCP layer.
Definition: lte-helper.cc:1714
void Attach(NetDeviceContainer ueDevices)
Enables automatic attachment of a set of UE devices to a suitable cell using Idle mode initial cell s...
Definition: lte-helper.cc:1044
NetDeviceContainer InstallUeDevice(NodeContainer c)
Create a set of UE devices.
Definition: lte-helper.cc:497
uint8_t ActivateDedicatedEpsBearer(NetDeviceContainer ueDevices, EpsBearer bearer, Ptr< EpcTft > tft)
Activate a dedicated EPS bearer on a given set of UE devices.
Definition: lte-helper.cc:1159
Helper class used to assign positions and mobility models to nodes.
void Install(Ptr< Node > node) const
"Layout" a single node according to the current position allocator type.
void SetMobilityModel(std::string type, Ts &&... args)
void SetPositionAllocator(Ptr< PositionAllocator > allocator)
Set the position allocator which will be used to allocate the initial position of every node initiali...
Keep track of the current position and velocity of an object.
holds a vector of ns3::NetDevice pointers
std::vector< Ptr< NetDevice > >::const_iterator Iterator
NetDevice container iterator.
Iterator Begin() const
Get an iterator which refers to the first NetDevice in the container.
Iterator End() const
Get an iterator which indicates past-the-last NetDevice in the container.
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
Ptr< Node > GetPgwNode() const override
Get the PGW node.
Ipv4Address GetUeDefaultGatewayAddress() override
Ipv4InterfaceContainer AssignUeIpv4Address(NetDeviceContainer ueDevices) override
Assign IPv4 addresses to UE devices.
keep track of a set of node pointers.
uint32_t GetN() const
Get the number of Ptr<Node> stored in this container.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
void SetAttribute(std::string name, const AttributeValue &value)
Set a single attribute, raising fatal errors if unsuccessful.
Definition: object-base.cc:258
Ptr< T > GetObject() const
Get a pointer to the requested aggregated Object.
Definition: object.h:471
A helper to make it easier to instantiate an ns3::PacketSinkApplication on a set of nodes.
ApplicationContainer Install(NodeContainer c) const
Install an ns3::PacketSinkApplication on each node of the input container configured with all the att...
Receive and consume traffic generated to an IP address and port.
Definition: packet-sink.h:74
Build a set of PointToPointNetDevice objects.
void SetDeviceAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each NetDevice created by the helper.
void SetChannelAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each Channel created by the helper.
NetDeviceContainer Install(NodeContainer c)
Hold variables of type string.
Definition: string.h:42
encapsulates test code
Definition: test.h:1060
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
Definition: test.cc:305
std::string CreateTempDirFilename(std::string filename)
Construct the full path to a file in a temporary directory.
Definition: test.cc:442
std::string GetName() const
Definition: test.cc:377
A suite of tests to run.
Definition: test.h:1256
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
AttributeValue implementation for Time.
Definition: nstime.h:1425
Create an application which sends a UDP packet and waits for an echo of this packet.
Hold an unsigned integer type.
Definition: uinteger.h:45
void Reset()
Reset the initial value of every attribute as well as the value of every global to what they were bef...
Definition: config.cc:856
void SetDefault(std::string name, const AttributeValue &value)
Definition: config.cc:891
void Set(std::string path, const AttributeValue &value)
Definition: config.cc:877
#define NS_ABORT_IF(cond)
Abnormal program termination if a condition is true.
Definition: abort.h:76
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:202
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
LteEpcE2eDataTestSuite g_lteEpcE2eDataTestSuite
the test suite
void(* DataRate)(DataRate oldValue, DataRate newValue)
TracedValue callback signature for DataRate.
Definition: data-rate.h:328
#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:144
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1338
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Time interPacketInterval
the inter packet interval time
uint32_t numPkts
the number of packets
uint32_t pktSize
the packet size
BearerTestData(uint32_t n, uint32_t s, double i)
Constructor.
Ptr< PacketSink > dlServerApp
the DL server app
Ptr< Application > ulClientApp
the UL client app
Ptr< PacketSink > ulServerApp
the UL server app
Ptr< Application > dlClientApp
the DL client app
EnbTestData structure.
std::vector< UeTestData > ues
the list of UEs
UeTestData structure.
std::vector< BearerTestData > bearers
the bearer test data
Implement the data structure representing a TrafficFlowTemplate Packet Filter.
Definition: epc-tft.h:71
uint16_t localPortEnd
end of the port number range of the UE
Definition: epc-tft.h:132
uint16_t remotePortEnd
end of the port number range of the remote host
Definition: epc-tft.h:130
uint16_t remotePortStart
start of the port number range of the remote host
Definition: epc-tft.h:129
uint16_t localPortStart
start of the port number range of the UE
Definition: epc-tft.h:131
uint32_t pktSize
packet size used for the simulation (in bytes)