author | Manuel Requena <manuel.requena@cttc.es> |
Tue, 02 Apr 2013 13:18:37 +0200 | |
changeset 10025 | 283a41ca5aa7 |
parent 10020 | 586c8e7937fd |
child 10039 | f52de4b2fe75 |
permissions | -rw-r--r-- |
10020
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
1 |
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
2 |
/* |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
3 |
* Copyright (c) 2013 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
4 |
* |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
5 |
* This program is free software; you can redistribute it and/or modify |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
6 |
* it under the terms of the GNU General Public License version 2 as |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
8 |
* |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
9 |
* This program is distributed in the hope that it will be useful, |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
12 |
* GNU General Public License for more details. |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
13 |
* |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
14 |
* You should have received a copy of the GNU General Public License |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
15 |
* along with this program; if not, write to the Free Software |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
16 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
17 |
* |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
18 |
* Authors: Nicola Baldo <nbaldo@cttc.es> |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
19 |
* Manuel Requena <manuel.requena@cttc.es> |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
20 |
*/ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
21 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
22 |
#include <ns3/core-module.h> |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
23 |
#include <ns3/network-module.h> |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
24 |
#include <ns3/mobility-module.h> |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
25 |
#include <ns3/lte-module.h> |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
26 |
#include <ns3/internet-module.h> |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
27 |
#include <ns3/applications-module.h> |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
28 |
#include <ns3/point-to-point-module.h> |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
29 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
30 |
NS_LOG_COMPONENT_DEFINE ("LteX2HandoverMeasuresTest"); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
31 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
32 |
namespace ns3 { |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
33 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
34 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
35 |
struct CheckPointEvent |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
36 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
37 |
Time checkStartTime; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
38 |
Time checkStopTime; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
39 |
Time checkInterval; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
40 |
uint32_t ueDeviceIndex; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
41 |
uint32_t enbDeviceIndex; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
42 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
43 |
CheckPointEvent (Time start, Time stop, Time interval, uint32_t ueIndex, uint32_t enbIndex) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
44 |
: checkStartTime (start), |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
45 |
checkStopTime (stop), |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
46 |
checkInterval (interval), |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
47 |
ueDeviceIndex (ueIndex), |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
48 |
enbDeviceIndex (enbIndex) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
49 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
50 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
51 |
}; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
52 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
53 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
54 |
class LteX2HandoverMeasuresTestCase : public TestCase |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
55 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
56 |
public: |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
57 |
/** |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
58 |
* |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
59 |
* |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
60 |
* \param nEnbs number of eNBs in the test |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
61 |
* \param nUes number of UEs in the test |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
62 |
* \param nDedicatedBearers number of bearers to be activated per UE |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
63 |
* \param checkPointEventList |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
64 |
* \param checkPointEventListName |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
65 |
* \param useUdp true if UDP is to be used, false if TCP is to be used |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
66 |
* |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
67 |
* \return |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
68 |
*/ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
69 |
LteX2HandoverMeasuresTestCase (uint32_t nEnbs, uint32_t nUes, uint32_t nDedicatedBearers, |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
70 |
std::list<CheckPointEvent> checkPointEventList, std::string checkPointEventListName, |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
71 |
bool useUdp, std::string schedulerType, bool admitHo, bool useIdealRrc); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
72 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
73 |
private: |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
74 |
static std::string BuildNameString (uint32_t nEnbs, uint32_t nUes, uint32_t nDedicatedBearers, |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
75 |
std::string checkPointEventListName, |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
76 |
bool useUdp, std::string schedulerType, bool admitHo, bool useIdealRrc); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
77 |
virtual void DoRun (void); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
78 |
void CheckConnected (Ptr<NetDevice> ueDevice, Ptr<NetDevice> enbDevice); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
79 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
80 |
uint32_t m_nEnbs; // number of eNBs in the test |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
81 |
uint32_t m_nUes; // number of UEs in the test |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
82 |
uint32_t m_nDedicatedBearers; // number of UEs in the test |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
83 |
std::list<CheckPointEvent> m_checkPointEventList; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
84 |
std::string m_checkPointEventListName; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
85 |
bool m_epc; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
86 |
bool m_useUdp; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
87 |
std::string m_schedulerType; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
88 |
bool m_admitHo; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
89 |
bool m_useIdealRrc; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
90 |
Ptr<LteHelper> m_lteHelper; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
91 |
Ptr<EpcHelper> m_epcHelper; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
92 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
93 |
struct BearerData |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
94 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
95 |
uint32_t bid; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
96 |
Ptr<PacketSink> dlSink; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
97 |
Ptr<PacketSink> ulSink; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
98 |
uint32_t dlOldTotalRx; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
99 |
uint32_t ulOldTotalRx; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
100 |
}; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
101 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
102 |
struct UeData |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
103 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
104 |
uint32_t id; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
105 |
std::list<BearerData> bearerDataList; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
106 |
}; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
107 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
108 |
void SaveStats (uint32_t ueIndex); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
109 |
void CheckStats (uint32_t ueIndex); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
110 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
111 |
std::vector<UeData> m_ueDataVector; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
112 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
113 |
const Time m_maxHoDuration; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
114 |
const Time m_statsDuration; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
115 |
const Time m_udpClientInterval; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
116 |
const uint32_t m_udpClientPktSize; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
117 |
}; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
118 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
119 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
120 |
std::string |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
121 |
LteX2HandoverMeasuresTestCase::BuildNameString (uint32_t nEnbs, uint32_t nUes, uint32_t nDedicatedBearers, |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
122 |
std::string checkPointEventListName, |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
123 |
bool useUdp, std::string schedulerType, bool admitHo, bool useIdealRrc) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
124 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
125 |
std::ostringstream oss; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
126 |
oss << "nEnbs=" << nEnbs |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
127 |
<< " nUes=" << nUes |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
128 |
<< " nDedicatedBearers=" << nDedicatedBearers |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
129 |
<< " udp=" << useUdp |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
130 |
<< " " << schedulerType |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
131 |
<< " admitHo=" << admitHo |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
132 |
<< " hoList: " << checkPointEventListName; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
133 |
if (useIdealRrc) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
134 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
135 |
oss << ", ideal RRC"; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
136 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
137 |
else |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
138 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
139 |
oss << ", real RRC"; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
140 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
141 |
return oss.str (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
142 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
143 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
144 |
LteX2HandoverMeasuresTestCase::LteX2HandoverMeasuresTestCase (uint32_t nEnbs, uint32_t nUes, uint32_t nDedicatedBearers, |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
145 |
std::list<CheckPointEvent> checkPointEventList, std::string checkPointEventListName, |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
146 |
bool useUdp, std::string schedulerType, bool admitHo, bool useIdealRrc) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
147 |
: TestCase (BuildNameString (nEnbs, nUes, nDedicatedBearers, checkPointEventListName, useUdp, schedulerType, admitHo, useIdealRrc)), |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
148 |
m_nEnbs (nEnbs), |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
149 |
m_nUes (nUes), |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
150 |
m_nDedicatedBearers (nDedicatedBearers), |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
151 |
m_checkPointEventList (checkPointEventList), |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
152 |
m_checkPointEventListName (checkPointEventListName), |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
153 |
m_epc (true), |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
154 |
m_useUdp (useUdp), |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
155 |
m_schedulerType (schedulerType), |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
156 |
m_admitHo (admitHo), |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
157 |
m_useIdealRrc (useIdealRrc), |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
158 |
m_maxHoDuration (Seconds (0.1)), |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
159 |
m_statsDuration (Seconds (0.5)), |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
160 |
m_udpClientInterval (Seconds (0.01)), |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
161 |
m_udpClientPktSize (100) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
162 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
163 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
164 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
165 |
void |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
166 |
LteX2HandoverMeasuresTestCase::DoRun () |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
167 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
168 |
NS_LOG_FUNCTION (this << BuildNameString (m_nEnbs, m_nUes, m_nDedicatedBearers, |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
169 |
m_checkPointEventListName, |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
170 |
m_useUdp, m_schedulerType, m_admitHo, m_useIdealRrc)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
171 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
172 |
Config::Reset (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
173 |
Config::SetDefault ("ns3::UdpClient::Interval", TimeValue (m_udpClientInterval)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
174 |
Config::SetDefault ("ns3::UdpClient::MaxPackets", UintegerValue (1000000)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
175 |
Config::SetDefault ("ns3::UdpClient::PacketSize", UintegerValue (m_udpClientPktSize)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
176 |
Config::SetDefault ("ns3::LteEnbRrc::ServingCellHandoverThreshold", UintegerValue (30)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
177 |
Config::SetDefault ("ns3::LteEnbRrc::NeighbourCellHandoverOffset", UintegerValue (1)); |
10025
283a41ca5aa7
Uncomment failing testcase
Manuel Requena <manuel.requena@cttc.es>
parents:
10020
diff
changeset
|
178 |
Config::SetDefault ("ns3::LteEnbRrc::HandoverJoiningTimeoutDuration", TimeValue (MilliSeconds (200))); |
10020
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
179 |
Config::SetDefault ("ns3::LteEnbPhy::TxPower", DoubleValue (20)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
180 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
181 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
182 |
int64_t stream = 1; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
183 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
184 |
m_lteHelper = CreateObject<LteHelper> (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
185 |
m_lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel")); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
186 |
m_lteHelper->SetSchedulerType (m_schedulerType); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
187 |
m_lteHelper->SetAttribute ("UseIdealRrc", BooleanValue (m_useIdealRrc)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
188 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
189 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
190 |
double distance = 1000.0; // m |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
191 |
double speed = 100; // m/s |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
192 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
193 |
NodeContainer enbNodes; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
194 |
enbNodes.Create (m_nEnbs); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
195 |
NodeContainer ueNodes; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
196 |
ueNodes.Create (m_nUes); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
197 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
198 |
if (m_epc) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
199 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
200 |
m_epcHelper = CreateObject<EpcHelper> (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
201 |
m_lteHelper->SetEpcHelper (m_epcHelper); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
202 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
203 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
204 |
// Install Mobility Model in eNBs |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
205 |
// eNBs are located along a line in the X axis |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
206 |
Ptr<ListPositionAllocator> enbPositionAlloc = CreateObject<ListPositionAllocator> (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
207 |
for (uint16_t i = 0; i < m_nEnbs; i++) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
208 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
209 |
Vector enbPosition (distance * (i + 1), 0, 0); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
210 |
enbPositionAlloc->Add (enbPosition); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
211 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
212 |
MobilityHelper enbMobility; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
213 |
enbMobility.SetMobilityModel("ns3::ConstantPositionMobilityModel"); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
214 |
enbMobility.SetPositionAllocator(enbPositionAlloc); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
215 |
enbMobility.Install(enbNodes); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
216 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
217 |
// Install Mobility Model in UE |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
218 |
// UE moves with a constant speed along the X axis |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
219 |
MobilityHelper ueMobility; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
220 |
ueMobility.SetMobilityModel ("ns3::ConstantVelocityMobilityModel"); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
221 |
ueMobility.Install(ueNodes); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
222 |
ueNodes.Get (0)->GetObject<MobilityModel> ()->SetPosition (Vector (0, 0, 0)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
223 |
ueNodes.Get (0)->GetObject<ConstantVelocityMobilityModel> ()->SetVelocity (Vector (speed, 0, 0)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
224 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
225 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
226 |
NetDeviceContainer enbDevices; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
227 |
enbDevices = m_lteHelper->InstallEnbDevice (enbNodes); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
228 |
stream += m_lteHelper->AssignStreams (enbDevices, stream); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
229 |
for (NetDeviceContainer::Iterator it = enbDevices.Begin (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
230 |
it != enbDevices.End (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
231 |
++it) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
232 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
233 |
Ptr<LteEnbRrc> enbRrc = (*it)->GetObject<LteEnbNetDevice> ()->GetRrc (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
234 |
enbRrc->SetAttribute ("AdmitHandoverRequest", BooleanValue (m_admitHo)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
235 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
236 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
237 |
NetDeviceContainer ueDevices; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
238 |
ueDevices = m_lteHelper->InstallUeDevice (ueNodes); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
239 |
stream += m_lteHelper->AssignStreams (ueDevices, stream); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
240 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
241 |
Ipv4Address remoteHostAddr; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
242 |
Ipv4StaticRoutingHelper ipv4RoutingHelper; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
243 |
Ipv4InterfaceContainer ueIpIfaces; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
244 |
Ptr<Node> remoteHost; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
245 |
if (m_epc) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
246 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
247 |
// Create a single RemoteHost |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
248 |
NodeContainer remoteHostContainer; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
249 |
remoteHostContainer.Create (1); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
250 |
remoteHost = remoteHostContainer.Get (0); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
251 |
InternetStackHelper internet; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
252 |
internet.Install (remoteHostContainer); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
253 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
254 |
// Create the Internet |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
255 |
PointToPointHelper p2ph; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
256 |
p2ph.SetDeviceAttribute ("DataRate", DataRateValue (DataRate ("100Gb/s"))); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
257 |
p2ph.SetDeviceAttribute ("Mtu", UintegerValue (1500)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
258 |
p2ph.SetChannelAttribute ("Delay", TimeValue (Seconds (0.010))); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
259 |
Ptr<Node> pgw = m_epcHelper->GetPgwNode (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
260 |
NetDeviceContainer internetDevices = p2ph.Install (pgw, remoteHost); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
261 |
Ipv4AddressHelper ipv4h; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
262 |
ipv4h.SetBase ("1.0.0.0", "255.0.0.0"); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
263 |
Ipv4InterfaceContainer internetIpIfaces = ipv4h.Assign (internetDevices); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
264 |
// in this container, interface 0 is the pgw, 1 is the remoteHost |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
265 |
remoteHostAddr = internetIpIfaces.GetAddress (1); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
266 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
267 |
Ipv4StaticRoutingHelper ipv4RoutingHelper; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
268 |
Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ()); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
269 |
remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
270 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
271 |
// Install the IP stack on the UEs |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
272 |
internet.Install (ueNodes); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
273 |
ueIpIfaces = m_epcHelper->AssignUeIpv4Address (NetDeviceContainer (ueDevices)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
274 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
275 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
276 |
// attachment (needs to be done after IP stack configuration) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
277 |
// all UEs attached to eNB 0 at the beginning |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
278 |
m_lteHelper->Attach (ueDevices, enbDevices.Get (0)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
279 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
280 |
if (m_epc) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
281 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
282 |
bool epcDl = true; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
283 |
bool epcUl = false; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
284 |
// the rest of this block is copied from lena-dual-stripe |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
285 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
286 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
287 |
// Install and start applications on UEs and remote host |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
288 |
uint16_t dlPort = 10000; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
289 |
uint16_t ulPort = 20000; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
290 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
291 |
// randomize a bit start times to avoid simulation artifacts |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
292 |
// (e.g., buffer overflows due to packet transmissions happening |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
293 |
// exactly at the same time) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
294 |
Ptr<UniformRandomVariable> startTimeSeconds = CreateObject<UniformRandomVariable> (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
295 |
startTimeSeconds->SetAttribute ("Min", DoubleValue (0)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
296 |
startTimeSeconds->SetAttribute ("Max", DoubleValue (0.010)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
297 |
startTimeSeconds->SetStream (stream++); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
298 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
299 |
for (uint32_t u = 0; u < ueNodes.GetN (); ++u) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
300 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
301 |
Ptr<Node> ue = ueNodes.Get (u); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
302 |
// Set the default gateway for the UE |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
303 |
Ptr<Ipv4StaticRouting> ueStaticRouting = ipv4RoutingHelper.GetStaticRouting (ue->GetObject<Ipv4> ()); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
304 |
ueStaticRouting->SetDefaultRoute (m_epcHelper->GetUeDefaultGatewayAddress (), 1); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
305 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
306 |
UeData ueData; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
307 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
308 |
for (uint32_t b = 0; b < m_nDedicatedBearers; ++b) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
309 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
310 |
++dlPort; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
311 |
++ulPort; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
312 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
313 |
ApplicationContainer clientApps; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
314 |
ApplicationContainer serverApps; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
315 |
BearerData bearerData; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
316 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
317 |
if (m_useUdp) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
318 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
319 |
if (epcDl) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
320 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
321 |
UdpClientHelper dlClientHelper (ueIpIfaces.GetAddress (u), dlPort); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
322 |
clientApps.Add (dlClientHelper.Install (remoteHost)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
323 |
PacketSinkHelper dlPacketSinkHelper ("ns3::UdpSocketFactory", |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
324 |
InetSocketAddress (Ipv4Address::GetAny (), dlPort)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
325 |
ApplicationContainer sinkContainer = dlPacketSinkHelper.Install (ue); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
326 |
bearerData.dlSink = sinkContainer.Get (0)->GetObject<PacketSink> (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
327 |
serverApps.Add (sinkContainer); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
328 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
329 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
330 |
if (epcUl) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
331 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
332 |
UdpClientHelper ulClientHelper (remoteHostAddr, ulPort); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
333 |
clientApps.Add (ulClientHelper.Install (ue)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
334 |
PacketSinkHelper ulPacketSinkHelper ("ns3::UdpSocketFactory", |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
335 |
InetSocketAddress (Ipv4Address::GetAny (), ulPort)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
336 |
ApplicationContainer sinkContainer = ulPacketSinkHelper.Install (remoteHost); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
337 |
bearerData.ulSink = sinkContainer.Get (0)->GetObject<PacketSink> (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
338 |
serverApps.Add (sinkContainer); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
339 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
340 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
341 |
else // use TCP |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
342 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
343 |
if (epcDl) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
344 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
345 |
BulkSendHelper dlClientHelper ("ns3::TcpSocketFactory", |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
346 |
InetSocketAddress (ueIpIfaces.GetAddress (u), dlPort)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
347 |
dlClientHelper.SetAttribute ("MaxBytes", UintegerValue (0)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
348 |
clientApps.Add (dlClientHelper.Install (remoteHost)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
349 |
PacketSinkHelper dlPacketSinkHelper ("ns3::TcpSocketFactory", |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
350 |
InetSocketAddress (Ipv4Address::GetAny (), dlPort)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
351 |
ApplicationContainer sinkContainer = dlPacketSinkHelper.Install (ue); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
352 |
bearerData.dlSink = sinkContainer.Get (0)->GetObject<PacketSink> (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
353 |
serverApps.Add (sinkContainer); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
354 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
355 |
if (epcUl) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
356 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
357 |
BulkSendHelper ulClientHelper ("ns3::TcpSocketFactory", |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
358 |
InetSocketAddress (remoteHostAddr, ulPort)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
359 |
ulClientHelper.SetAttribute ("MaxBytes", UintegerValue (0)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
360 |
clientApps.Add (ulClientHelper.Install (ue)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
361 |
PacketSinkHelper ulPacketSinkHelper ("ns3::TcpSocketFactory", |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
362 |
InetSocketAddress (Ipv4Address::GetAny (), ulPort)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
363 |
ApplicationContainer sinkContainer = ulPacketSinkHelper.Install (remoteHost); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
364 |
bearerData.ulSink = sinkContainer.Get (0)->GetObject<PacketSink> (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
365 |
serverApps.Add (sinkContainer); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
366 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
367 |
} // end if (useUdp) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
368 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
369 |
Ptr<EpcTft> tft = Create<EpcTft> (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
370 |
if (epcDl) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
371 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
372 |
EpcTft::PacketFilter dlpf; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
373 |
dlpf.localPortStart = dlPort; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
374 |
dlpf.localPortEnd = dlPort; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
375 |
tft->Add (dlpf); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
376 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
377 |
if (epcUl) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
378 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
379 |
EpcTft::PacketFilter ulpf; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
380 |
ulpf.remotePortStart = ulPort; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
381 |
ulpf.remotePortEnd = ulPort; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
382 |
tft->Add (ulpf); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
383 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
384 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
385 |
if (epcDl || epcUl) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
386 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
387 |
EpsBearer bearer (EpsBearer::NGBR_VIDEO_TCP_DEFAULT); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
388 |
m_lteHelper->ActivateDedicatedEpsBearer (ueDevices.Get (u), bearer, tft); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
389 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
390 |
Time startTime = Seconds (startTimeSeconds->GetValue ()); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
391 |
serverApps.Start (startTime); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
392 |
clientApps.Start (startTime); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
393 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
394 |
ueData.bearerDataList.push_back (bearerData); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
395 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
396 |
} // end for b |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
397 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
398 |
m_ueDataVector.push_back (ueData); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
399 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
400 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
401 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
402 |
else // (epc == false) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
403 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
404 |
// for radio bearer activation purposes, consider together home UEs and macro UEs |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
405 |
for (uint32_t u = 0; u < ueDevices.GetN (); ++u) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
406 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
407 |
Ptr<NetDevice> ueDev = ueDevices.Get (u); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
408 |
for (uint32_t b = 0; b < m_nDedicatedBearers; ++b) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
409 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
410 |
enum EpsBearer::Qci q = EpsBearer::NGBR_VIDEO_TCP_DEFAULT; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
411 |
EpsBearer bearer (q); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
412 |
m_lteHelper->ActivateDataRadioBearer (ueDev, bearer); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
413 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
414 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
415 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
416 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
417 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
418 |
m_lteHelper->AddX2Interface (enbNodes); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
419 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
420 |
// check initial RRC connection |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
421 |
const Time maxRrcConnectionEstablishmentDuration = Seconds (0.080); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
422 |
for (NetDeviceContainer::Iterator it = ueDevices.Begin (); it != ueDevices.End (); ++it) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
423 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
424 |
NS_LOG_FUNCTION (maxRrcConnectionEstablishmentDuration); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
425 |
Simulator::Schedule (maxRrcConnectionEstablishmentDuration, |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
426 |
&LteX2HandoverMeasuresTestCase::CheckConnected, |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
427 |
this, *it, enbDevices.Get (0)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
428 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
429 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
430 |
// schedule the checkpoint events |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
431 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
432 |
Time stopTime = Seconds (0); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
433 |
for (std::list<CheckPointEvent>::iterator checkPointEventIt = m_checkPointEventList.begin (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
434 |
checkPointEventIt != m_checkPointEventList.end (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
435 |
++checkPointEventIt) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
436 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
437 |
for (Time checkPointTime = checkPointEventIt->checkStartTime; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
438 |
checkPointTime < checkPointEventIt->checkStopTime; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
439 |
checkPointTime += checkPointEventIt->checkInterval) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
440 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
441 |
Simulator::Schedule (checkPointTime, &LteX2HandoverMeasuresTestCase::CheckConnected, |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
442 |
this, ueDevices.Get (checkPointEventIt->ueDeviceIndex), |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
443 |
enbDevices.Get (checkPointEventIt->enbDeviceIndex)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
444 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
445 |
Time saveStatsTime = checkPointTime; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
446 |
Simulator::Schedule (saveStatsTime, &LteX2HandoverMeasuresTestCase::SaveStats, |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
447 |
this, checkPointEventIt->ueDeviceIndex); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
448 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
449 |
Time checkStats = saveStatsTime + m_statsDuration; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
450 |
Simulator::Schedule (checkStats, &LteX2HandoverMeasuresTestCase::CheckStats, |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
451 |
this, checkPointEventIt->ueDeviceIndex); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
452 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
453 |
if (stopTime <= checkStats) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
454 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
455 |
stopTime = checkStats + Seconds (1); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
456 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
457 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
458 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
459 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
460 |
// TODO useful? to remove |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
461 |
// m_lteHelper->EnableRlcTraces (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
462 |
// Ptr<RadioBearerStatsCalculator> rlcStats = m_lteHelper->GetRlcStats (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
463 |
// rlcStats->SetAttribute ("StartTime", TimeValue (Seconds (0.101))); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
464 |
// rlcStats->SetAttribute ("EpochDuration", TimeValue (Seconds (0.1))); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
465 |
// m_lteHelper->EnablePdcpTraces (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
466 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
467 |
Simulator::Stop (stopTime); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
468 |
Simulator::Run (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
469 |
Simulator::Destroy (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
470 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
471 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
472 |
void |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
473 |
LteX2HandoverMeasuresTestCase::CheckConnected (Ptr<NetDevice> ueDevice, Ptr<NetDevice> enbDevice) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
474 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
475 |
NS_LOG_FUNCTION (ueDevice << enbDevice); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
476 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
477 |
Ptr<LteUeNetDevice> ueLteDevice = ueDevice->GetObject<LteUeNetDevice> (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
478 |
Ptr<LteUeRrc> ueRrc = ueLteDevice->GetRrc (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
479 |
NS_TEST_ASSERT_MSG_EQ (ueRrc->GetState (), LteUeRrc::CONNECTED_NORMALLY, "Wrong LteUeRrc state!"); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
480 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
481 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
482 |
Ptr<LteEnbNetDevice> enbLteDevice = enbDevice->GetObject<LteEnbNetDevice> (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
483 |
Ptr<LteEnbRrc> enbRrc = enbLteDevice->GetRrc (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
484 |
uint16_t rnti = ueRrc->GetRnti (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
485 |
Ptr<UeManager> ueManager = enbRrc->GetUeManager (rnti); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
486 |
NS_TEST_ASSERT_MSG_NE (ueManager, 0, "RNTI " << rnti << " not found in eNB"); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
487 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
488 |
UeManager::State ueManagerState = ueManager->GetState (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
489 |
NS_TEST_ASSERT_MSG_EQ (ueManagerState, UeManager::CONNECTED_NORMALLY, "Wrong UeManager state!"); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
490 |
NS_ASSERT_MSG (ueManagerState == UeManager::CONNECTED_NORMALLY, "Wrong UeManager state!"); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
491 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
492 |
uint16_t ueCellId = ueRrc->GetCellId (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
493 |
uint16_t enbCellId = enbLteDevice->GetCellId (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
494 |
uint8_t ueDlBandwidth = ueRrc->GetDlBandwidth (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
495 |
uint8_t enbDlBandwidth = enbLteDevice->GetDlBandwidth (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
496 |
uint8_t ueUlBandwidth = ueRrc->GetUlBandwidth (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
497 |
uint8_t enbUlBandwidth = enbLteDevice->GetUlBandwidth (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
498 |
uint8_t ueDlEarfcn = ueRrc->GetDlEarfcn (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
499 |
uint8_t enbDlEarfcn = enbLteDevice->GetDlEarfcn (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
500 |
uint8_t ueUlEarfcn = ueRrc->GetUlEarfcn (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
501 |
uint8_t enbUlEarfcn = enbLteDevice->GetUlEarfcn (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
502 |
uint64_t ueImsi = ueLteDevice->GetImsi (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
503 |
uint64_t enbImsi = ueManager->GetImsi (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
504 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
505 |
NS_TEST_ASSERT_MSG_EQ (ueImsi, enbImsi, "inconsistent IMSI"); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
506 |
NS_TEST_ASSERT_MSG_EQ (ueCellId, enbCellId, "inconsistent CellId"); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
507 |
NS_TEST_ASSERT_MSG_EQ (ueDlBandwidth, enbDlBandwidth, "inconsistent DlBandwidth"); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
508 |
NS_TEST_ASSERT_MSG_EQ (ueUlBandwidth, enbUlBandwidth, "inconsistent UlBandwidth"); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
509 |
NS_TEST_ASSERT_MSG_EQ (ueDlEarfcn, enbDlEarfcn, "inconsistent DlEarfcn"); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
510 |
NS_TEST_ASSERT_MSG_EQ (ueUlEarfcn, enbUlEarfcn, "inconsistent UlEarfcn"); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
511 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
512 |
ObjectMapValue enbDataRadioBearerMapValue; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
513 |
ueManager->GetAttribute ("DataRadioBearerMap", enbDataRadioBearerMapValue); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
514 |
NS_TEST_ASSERT_MSG_EQ (enbDataRadioBearerMapValue.GetN (), m_nDedicatedBearers + 1, "wrong num bearers at eNB"); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
515 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
516 |
ObjectMapValue ueDataRadioBearerMapValue; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
517 |
ueRrc->GetAttribute ("DataRadioBearerMap", ueDataRadioBearerMapValue); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
518 |
NS_TEST_ASSERT_MSG_EQ (ueDataRadioBearerMapValue.GetN (), m_nDedicatedBearers + 1, "wrong num bearers at UE"); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
519 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
520 |
ObjectMapValue::Iterator enbBearerIt = enbDataRadioBearerMapValue.Begin (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
521 |
ObjectMapValue::Iterator ueBearerIt = ueDataRadioBearerMapValue.Begin (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
522 |
while (enbBearerIt != enbDataRadioBearerMapValue.End () |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
523 |
&& ueBearerIt != ueDataRadioBearerMapValue.End ()) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
524 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
525 |
Ptr<LteDataRadioBearerInfo> enbDrbInfo = enbBearerIt->second->GetObject<LteDataRadioBearerInfo> (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
526 |
Ptr<LteDataRadioBearerInfo> ueDrbInfo = ueBearerIt->second->GetObject<LteDataRadioBearerInfo> (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
527 |
//NS_TEST_ASSERT_MSG_EQ (enbDrbInfo->m_epsBearer, ueDrbInfo->m_epsBearer, "epsBearer differs"); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
528 |
NS_TEST_ASSERT_MSG_EQ ((uint32_t) enbDrbInfo->m_epsBearerIdentity, (uint32_t) ueDrbInfo->m_epsBearerIdentity, "epsBearerIdentity differs"); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
529 |
NS_TEST_ASSERT_MSG_EQ ((uint32_t) enbDrbInfo->m_drbIdentity, (uint32_t) ueDrbInfo->m_drbIdentity, "drbIdentity differs"); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
530 |
//NS_TEST_ASSERT_MSG_EQ (enbDrbInfo->m_rlcConfig, ueDrbInfo->m_rlcConfig, "rlcConfig differs"); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
531 |
NS_TEST_ASSERT_MSG_EQ ((uint32_t) enbDrbInfo->m_logicalChannelIdentity, (uint32_t) ueDrbInfo->m_logicalChannelIdentity, "logicalChannelIdentity differs"); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
532 |
//NS_TEST_ASSERT_MSG_EQ (enbDrbInfo->m_logicalChannelConfig, ueDrbInfo->m_logicalChannelConfig, "logicalChannelConfig differs"); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
533 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
534 |
++enbBearerIt; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
535 |
++ueBearerIt; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
536 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
537 |
NS_ASSERT_MSG (enbBearerIt == enbDataRadioBearerMapValue.End (), "too many bearers at eNB"); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
538 |
NS_ASSERT_MSG (ueBearerIt == ueDataRadioBearerMapValue.End (), "too many bearers at UE"); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
539 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
540 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
541 |
void |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
542 |
LteX2HandoverMeasuresTestCase::SaveStats (uint32_t ueIndex) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
543 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
544 |
NS_LOG_FUNCTION (ueIndex); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
545 |
for (std::list<BearerData>::iterator it = m_ueDataVector.at (ueIndex).bearerDataList.begin (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
546 |
it != m_ueDataVector.at (ueIndex).bearerDataList.end (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
547 |
++it) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
548 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
549 |
if (it->dlSink) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
550 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
551 |
it->dlOldTotalRx = it->dlSink->GetTotalRx (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
552 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
553 |
if (it->ulSink) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
554 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
555 |
it->ulOldTotalRx = it->ulSink->GetTotalRx (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
556 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
557 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
558 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
559 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
560 |
void |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
561 |
LteX2HandoverMeasuresTestCase::CheckStats (uint32_t ueIndex) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
562 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
563 |
NS_LOG_FUNCTION (ueIndex); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
564 |
uint32_t b = 1; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
565 |
for (std::list<BearerData>::iterator it = m_ueDataVector.at (ueIndex).bearerDataList.begin (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
566 |
it != m_ueDataVector.at (ueIndex).bearerDataList.end (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
567 |
++it) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
568 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
569 |
uint32_t dlRx = 0; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
570 |
uint32_t ulRx = 0; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
571 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
572 |
if (it->dlSink) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
573 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
574 |
dlRx = it->dlSink->GetTotalRx () - it->dlOldTotalRx; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
575 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
576 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
577 |
if (it->ulSink) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
578 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
579 |
ulRx = it->ulSink->GetTotalRx () - it->ulOldTotalRx; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
580 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
581 |
double expectedBytes = m_udpClientPktSize * (m_statsDuration.GetSeconds () / m_udpClientInterval.GetSeconds ()); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
582 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
583 |
NS_LOG_LOGIC ("expBytes = " << expectedBytes); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
584 |
NS_LOG_LOGIC ("dlRx = " << dlRx); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
585 |
NS_LOG_LOGIC ("ulRx = " << ulRx); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
586 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
587 |
// tolerance |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
588 |
if (it->dlSink) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
589 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
590 |
NS_TEST_ASSERT_MSG_GT (dlRx, 0.500 * expectedBytes, "too few RX bytes in DL, ue=" << ueIndex << ", b=" << b); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
591 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
592 |
if (it->ulSink) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
593 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
594 |
NS_TEST_ASSERT_MSG_GT (ulRx, 0.500 * expectedBytes, "too few RX bytes in UL, ue=" << ueIndex << ", b=" << b); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
595 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
596 |
++b; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
597 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
598 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
599 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
600 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
601 |
class LteX2HandoverMeasuresTestSuite : public TestSuite |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
602 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
603 |
public: |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
604 |
LteX2HandoverMeasuresTestSuite (); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
605 |
}; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
606 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
607 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
608 |
LteX2HandoverMeasuresTestSuite::LteX2HandoverMeasuresTestSuite () |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
609 |
: TestSuite ("lte-x2-handover-measures", SYSTEM) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
610 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
611 |
std::string cel0name ("no ho"); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
612 |
std::list<CheckPointEvent> cel0; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
613 |
cel0.push_back (CheckPointEvent (Seconds (1), Seconds (50), Seconds (1), 0, 0)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
614 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
615 |
std::string cel1name ("ho: 0 -> 1"); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
616 |
std::list<CheckPointEvent> cel1; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
617 |
cel1.push_back (CheckPointEvent (Seconds (1), Seconds (16.1), Seconds (1), 0, 0)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
618 |
// HO is performed between seconds 16 and 17 |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
619 |
cel1.push_back (CheckPointEvent (Seconds (17), Seconds (50), Seconds (1), 0, 1)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
620 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
621 |
std::string cel2name ("ho: 0 -> 1 -> 2"); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
622 |
std::list<CheckPointEvent> cel2; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
623 |
cel2.push_back (CheckPointEvent (Seconds (1), Seconds (16.1), Seconds (1), 0, 0)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
624 |
// First HO is performed between seconds 16 and 17 |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
625 |
cel2.push_back (CheckPointEvent (Seconds (17), Seconds (26.1), Seconds (1), 0, 1)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
626 |
// Second HO is performed between seconds 26 and 27 |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
627 |
cel2.push_back (CheckPointEvent (Seconds (27), Seconds (50), Seconds (1), 0, 2)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
628 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
629 |
std::string cel3name ("ho: 0 -> 1 -> 2 -> 3"); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
630 |
std::list<CheckPointEvent> cel3; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
631 |
cel3.push_back (CheckPointEvent (Seconds (1), Seconds (16.1), Seconds (1), 0, 0)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
632 |
// First HO is performed between seconds 16 and 17 |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
633 |
cel3.push_back (CheckPointEvent (Seconds (17), Seconds (26.1), Seconds (1), 0, 1)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
634 |
// Second HO is performed between seconds 26 and 27 |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
635 |
cel3.push_back (CheckPointEvent (Seconds (27), Seconds (36.1), Seconds (1), 0, 2)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
636 |
// Third HO is performed between seconds 36 and 37 |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
637 |
cel3.push_back (CheckPointEvent (Seconds (37), Seconds (50), Seconds (1), 0, 3)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
638 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
639 |
std::vector<std::string> schedulers; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
640 |
schedulers.push_back ("ns3::RrFfMacScheduler"); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
641 |
// schedulers.push_back ("ns3::PfFfMacScheduler"); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
642 |
for (std::vector<std::string>::iterator schedIt = schedulers.begin (); schedIt != schedulers.end (); ++schedIt) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
643 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
644 |
int32_t useIdealRrc = 0; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
645 |
// for (int32_t useIdealRrc = 1; useIdealRrc >= 0; --useIdealRrc) |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
646 |
{ |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
647 |
// nEnbs, nUes, nDBearers, celist, name, useUdp, sched, admitHo, idealRrc |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
648 |
// AddTestCase (new LteX2HandoverMeasuresTestCase ( 2, 1, 0, cel1, cel1name, true, *schedIt, true, useIdealRrc)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
649 |
// AddTestCase (new LteX2HandoverMeasuresTestCase ( 2, 1, 1, cel1, cel1name, true, *schedIt, true, useIdealRrc)); |
10025
283a41ca5aa7
Uncomment failing testcase
Manuel Requena <manuel.requena@cttc.es>
parents:
10020
diff
changeset
|
650 |
AddTestCase (new LteX2HandoverMeasuresTestCase ( 2, 1, 2, cel1, cel1name, true, *schedIt, true, useIdealRrc)); // CRASH in lte-enb-rrc.cc, line=1916 |
10020
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
651 |
// AddTestCase (new LteX2HandoverMeasuresTestCase ( 2, 1, 0, cel0, cel0name, true, *schedIt, false, useIdealRrc)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
652 |
// AddTestCase (new LteX2HandoverMeasuresTestCase ( 2, 1, 1, cel0, cel0name, true, *schedIt, false, useIdealRrc)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
653 |
// AddTestCase (new LteX2HandoverMeasuresTestCase ( 2, 1, 2, cel0, cel0name, true, *schedIt, false, useIdealRrc)); |
10025
283a41ca5aa7
Uncomment failing testcase
Manuel Requena <manuel.requena@cttc.es>
parents:
10020
diff
changeset
|
654 |
// AddTestCase (new LteX2HandoverMeasuresTestCase ( 3, 1, 0, cel2, cel2name, true, *schedIt, true, useIdealRrc)); // CRASH in rr-ff-mac-scheduler.cc, line=1519 |
283a41ca5aa7
Uncomment failing testcase
Manuel Requena <manuel.requena@cttc.es>
parents:
10020
diff
changeset
|
655 |
// AddTestCase (new LteX2HandoverMeasuresTestCase ( 3, 1, 1, cel2, cel2name, true, *schedIt, true, useIdealRrc)); // CRASH msg="method unexpected in state HANDOVER_PREPARATION", file=../src/lte/model/lte-enb-rrc.cc, line=560 |
10020
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
656 |
// AddTestCase (new LteX2HandoverMeasuresTestCase ( 3, 1, 2, cel2, cel2name, true, *schedIt, true, useIdealRrc)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
657 |
// AddTestCase (new LteX2HandoverMeasuresTestCase ( 3, 1, 0, cel0, cel0name, true, *schedIt, false, useIdealRrc)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
658 |
// AddTestCase (new LteX2HandoverMeasuresTestCase ( 3, 1, 1, cel0, cel0name, true, *schedIt, false, useIdealRrc)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
659 |
// AddTestCase (new LteX2HandoverMeasuresTestCase ( 3, 1, 2, cel0, cel0name, true, *schedIt, false, useIdealRrc)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
660 |
// AddTestCase (new LteX2HandoverMeasuresTestCase ( 4, 1, 0, cel3, cel3name, true, *schedIt, true, useIdealRrc)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
661 |
// AddTestCase (new LteX2HandoverMeasuresTestCase ( 4, 1, 1, cel3, cel3name, true, *schedIt, true, useIdealRrc)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
662 |
// AddTestCase (new LteX2HandoverMeasuresTestCase ( 4, 1, 2, cel3, cel3name, true, *schedIt, true, useIdealRrc)); |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
663 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
664 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
665 |
} |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
666 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
667 |
static LteX2HandoverMeasuresTestSuite g_lteX2HandoverMeasuresTestSuiteInstance; |
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
668 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
669 |
|
586c8e7937fd
Add testcase for the automatic HO triger
Manuel Requena <manuel.requena@cttc.es>
parents:
diff
changeset
|
670 |
} // namespace ns3 |