OLD | NEW |
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2013 Magister Solutions | 3 * Copyright (c) 2013 Magister Solutions |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 Simulator::Destroy (); | 217 Simulator::Destroy (); |
218 | 218 |
219 } // end of void LteHandoverDelayTestCase::DoRun () | 219 } // end of void LteHandoverDelayTestCase::DoRun () |
220 | 220 |
221 | 221 |
222 void | 222 void |
223 LteHandoverDelayTestCase::UeHandoverStartCallback (std::string context, | 223 LteHandoverDelayTestCase::UeHandoverStartCallback (std::string context, |
224 uint64_t imsi, uint16_t cellid, uint16_t rnti, uint16_t targetCellId) | 224 uint64_t imsi, uint16_t cellid, uint16_t rnti, uint16_t targetCellId) |
225 { | 225 { |
226 NS_LOG_FUNCTION (this << context); | 226 NS_LOG_FUNCTION (this << context); |
| 227 NS_UNUSED (imsi); |
| 228 NS_UNUSED (cellid); |
| 229 NS_UNUSED (rnti); |
| 230 NS_UNUSED (targetCellId); |
227 m_ueHandoverStart = Simulator::Now (); | 231 m_ueHandoverStart = Simulator::Now (); |
228 } | 232 } |
229 | 233 |
230 void | 234 void |
231 LteHandoverDelayTestCase::UeHandoverEndOkCallback (std::string context, | 235 LteHandoverDelayTestCase::UeHandoverEndOkCallback (std::string context, |
232 uint64_t imsi, uint16_t cellid, uint16_t rnti) | 236 uint64_t imsi, uint16_t cellid, uint16_t rnti) |
233 { | 237 { |
234 NS_LOG_FUNCTION (this << context); | 238 NS_LOG_FUNCTION (this << context); |
| 239 NS_UNUSED (imsi); |
| 240 NS_UNUSED (cellid); |
| 241 NS_UNUSED (rnti); |
235 NS_ASSERT (m_ueHandoverStart > Seconds (0)); | 242 NS_ASSERT (m_ueHandoverStart > Seconds (0)); |
236 Time delay = Simulator::Now () - m_ueHandoverStart; | 243 Time delay = Simulator::Now () - m_ueHandoverStart; |
237 NS_LOG_DEBUG (this << " UE delay = " << delay.GetSeconds ()); | 244 NS_LOG_DEBUG (this << " UE delay = " << delay.GetSeconds ()); |
238 NS_TEST_ASSERT_MSG_LT (delay.GetSeconds (), m_delayThreshold.GetSeconds (), | 245 NS_TEST_ASSERT_MSG_LT (delay.GetSeconds (), m_delayThreshold.GetSeconds (), |
239 "UE handover delay is higher than the allowed threshold " | 246 "UE handover delay is higher than the allowed threshold " |
240 << "(ideal RRC = " << m_useIdealRrc | 247 << "(ideal RRC = " << m_useIdealRrc |
241 << " handover time = " << m_handoverTime.GetSeconds () << ")"); | 248 << " handover time = " << m_handoverTime.GetSeconds () << ")"); |
242 } | 249 } |
243 | 250 |
244 | 251 |
245 void | 252 void |
246 LteHandoverDelayTestCase::EnbHandoverStartCallback (std::string context, | 253 LteHandoverDelayTestCase::EnbHandoverStartCallback (std::string context, |
247 uint64_t imsi, uint16_t cellid, uint16_t rnti, uint16_t targetCellId) | 254 uint64_t imsi, uint16_t cellid, uint16_t rnti, uint16_t targetCellId) |
248 { | 255 { |
249 NS_LOG_FUNCTION (this << context); | 256 NS_LOG_FUNCTION (this << context); |
| 257 NS_UNUSED (imsi); |
| 258 NS_UNUSED (cellid); |
| 259 NS_UNUSED (rnti); |
| 260 NS_UNUSED (targetCellId); |
250 m_enbHandoverStart = Simulator::Now (); | 261 m_enbHandoverStart = Simulator::Now (); |
251 } | 262 } |
252 | 263 |
253 void | 264 void |
254 LteHandoverDelayTestCase::EnbHandoverEndOkCallback (std::string context, | 265 LteHandoverDelayTestCase::EnbHandoverEndOkCallback (std::string context, |
255 uint64_t imsi, uint16_t cellid, uint16_t rnti) | 266 uint64_t imsi, uint16_t cellid, uint16_t rnti) |
256 { | 267 { |
257 NS_LOG_FUNCTION (this << context); | 268 NS_LOG_FUNCTION (this << context); |
| 269 NS_UNUSED (imsi); |
| 270 NS_UNUSED (cellid); |
| 271 NS_UNUSED (rnti); |
258 NS_ASSERT (m_enbHandoverStart > Seconds (0)); | 272 NS_ASSERT (m_enbHandoverStart > Seconds (0)); |
259 Time delay = Simulator::Now () - m_enbHandoverStart; | 273 Time delay = Simulator::Now () - m_enbHandoverStart; |
260 NS_LOG_DEBUG (this << " eNodeB delay = " << delay.GetSeconds ()); | 274 NS_LOG_DEBUG (this << " eNodeB delay = " << delay.GetSeconds ()); |
261 NS_TEST_ASSERT_MSG_LT (delay.GetSeconds (), m_delayThreshold.GetSeconds (), | 275 NS_TEST_ASSERT_MSG_LT (delay.GetSeconds (), m_delayThreshold.GetSeconds (), |
262 "eNodeB handover delay is higher than the allowed threshold " | 276 "eNodeB handover delay is higher than the allowed threshold " |
263 << "(ideal RRC = " << m_useIdealRrc | 277 << "(ideal RRC = " << m_useIdealRrc |
264 << " handover time = " << m_handoverTime.GetSeconds () << ")"); | 278 << " handover time = " << m_handoverTime.GetSeconds () << ")"); |
265 } | 279 } |
266 | 280 |
267 | 281 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 for (Time handoverTime = Seconds (0.100); handoverTime < Seconds (0.110); | 313 for (Time handoverTime = Seconds (0.100); handoverTime < Seconds (0.110); |
300 handoverTime += Seconds (0.001)) | 314 handoverTime += Seconds (0.001)) |
301 { | 315 { |
302 // arguments: useIdealRrc, handoverTime, delayThreshold, simulationDurat
ion | 316 // arguments: useIdealRrc, handoverTime, delayThreshold, simulationDurat
ion |
303 AddTestCase ( | 317 AddTestCase ( |
304 new LteHandoverDelayTestCase (1, false, handoverTime, Seconds (0.020
), | 318 new LteHandoverDelayTestCase (1, false, handoverTime, Seconds (0.020
), |
305 Seconds (0.200)), TestCase::QUICK); | 319 Seconds (0.200)), TestCase::QUICK); |
306 } | 320 } |
307 } | 321 } |
308 } g_lteHandoverDelayTestSuite; ///< the test suite | 322 } g_lteHandoverDelayTestSuite; ///< the test suite |
OLD | NEW |