23 #include "ns3/simulator.h"
26 #include "ns3/epc-helper.h"
27 #include "ns3/epc-enb-application.h"
28 #include "ns3/packet-sink-helper.h"
29 #include "ns3/udp-echo-helper.h"
30 #include "ns3/point-to-point-helper.h"
31 #include "ns3/csma-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/config.h"
41 #include "ns3/eps-bearer.h"
70 std::vector<UeDlTestData>
ues;
82 virtual void DoRun (
void);
110 remoteHostContainer.
Create (1);
113 internet.
Install (remoteHostContainer);
120 ipv4h.
SetBase (
"1.0.0.0",
"255.0.0.0");
121 ipv4h.
Assign (internetDevices);
134 uint16_t cellIdCounter = 0;
136 for (std::vector<EnbDlTestData>::iterator enbit =
m_enbDlTestData.begin ();
147 uint16_t cellId = ++cellIdCounter;
150 ues.
Create (enbit->ues.size ());
163 epcHelper->
AddEnb (enb, enbDevice, cellId);
167 NS_ASSERT_MSG (enbApp != 0,
"cannot retrieve EpcEnbApplication");
169 rrc->SetS1SapProvider (enbApp->GetS1SapProvider ());
170 enbApp->SetS1SapUser (rrc->GetS1SapUser ());
177 for (uint32_t u = 0; u < ues.
GetN (); ++u)
189 uint16_t
port = 1234;
199 client.SetAttribute (
"Interval",
TimeValue (interPacketInterval));
200 client.SetAttribute (
"PacketSize",
UintegerValue (enbit->ues[u].pktSize));
201 apps = client.Install (remoteHost);
204 enbit->ues[u].clientApp = apps.
Get (0);
207 epcHelper->
AddUe (ueLteDevice, imsi);
209 enbApp->GetS1SapProvider ()->InitialUeMessage (imsi, (uint16_t) imsi);
216 for (std::vector<EnbDlTestData>::iterator enbit =
m_enbDlTestData.begin ();
220 for (std::vector<UeDlTestData>::iterator ueit = enbit->ues.begin ();
221 ueit < enbit->ues.end ();
224 NS_TEST_ASSERT_MSG_EQ (ueit->serverApp->GetTotalRx (), (ueit->numPkts) * (ueit->pktSize),
"wrong total received bytes");
248 std::vector<EnbDlTestData> v1;
251 e1.
ues.push_back (f1);
256 std::vector<EnbDlTestData> v2;
259 e2.
ues.push_back (f2_1);
261 e2.
ues.push_back (f2_2);
266 std::vector<EnbDlTestData> v3;
274 e3.
ues.push_back (f3_1);
276 e3.
ues.push_back (f3_2);
278 e3.
ues.push_back (f3_2);
279 std::vector<EnbDlTestData> v4;
285 std::vector<EnbDlTestData> v5;
288 e5.
ues.push_back (f5);
292 std::vector<EnbDlTestData> v6;
295 e6.
ues.push_back (f6);
299 std::vector<EnbDlTestData> v7;
302 e7.
ues.push_back (f7);
306 std::vector<EnbDlTestData> v8;
309 e8.
ues.push_back (f8);