LEFT | RIGHT |
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 Budiarto Herman | 3 * Copyright (c) 2013 Budiarto Herman |
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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 * | | | 179 * | | |
180 * [2] [4] | 180 * [2] [4] |
181 * CSG ------ CSG | 181 * CSG ------ CSG |
182 * 60 m | 182 * 60 m |
183 */ | 183 */ |
184 | 184 |
185 // Create Nodes | 185 // Create Nodes |
186 NodeContainer enbNodes; | 186 NodeContainer enbNodes; |
187 enbNodes.Create (4); | 187 enbNodes.Create (4); |
188 NodeContainer ueNodes; | 188 NodeContainer ueNodes; |
189 uint16_t nUe = (uint16_t)m_ueSetupList.size (); | 189 uint16_t nUe = static_cast<uint16_t>(m_ueSetupList.size ()); |
190 ueNodes.Create (nUe); | 190 ueNodes.Create (nUe); |
191 | 191 |
192 // Assign nodes to position | 192 // Assign nodes to position |
193 Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator>
(); | 193 Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator>
(); |
194 // eNodeB | 194 // eNodeB |
195 positionAlloc->Add (Vector ( 0.0, m_interSiteDistance, 0.0)); | 195 positionAlloc->Add (Vector ( 0.0, m_interSiteDistance, 0.0)); |
196 positionAlloc->Add (Vector ( 0.0, 0.0, 0.0)); | 196 positionAlloc->Add (Vector ( 0.0, 0.0, 0.0)); |
197 positionAlloc->Add (Vector (m_interSiteDistance, m_interSiteDistance, 0.0)); | 197 positionAlloc->Add (Vector (m_interSiteDistance, m_interSiteDistance, 0.0)); |
198 positionAlloc->Add (Vector (m_interSiteDistance, 0.0, 0.0)); | 198 positionAlloc->Add (Vector (m_interSiteDistance, 0.0, 0.0)); |
199 // UE | 199 // UE |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 NS_TEST_ASSERT_MSG_EQ (pass, true, | 377 NS_TEST_ASSERT_MSG_EQ (pass, true, |
378 "IMSI " << ueDev->GetImsi () | 378 "IMSI " << ueDev->GetImsi () |
379 << " has attached to an unexpected cell" | 379 << " has attached to an unexpected cell" |
380 << " (actual: " << actualCellId << "," | 380 << " (actual: " << actualCellId << "," |
381 << " expected: " << expectedCellId1 | 381 << " expected: " << expectedCellId1 |
382 << " or " << expectedCellId2 << ")"); | 382 << " or " << expectedCellId2 << ")"); |
383 } | 383 } |
384 | 384 |
385 if (expectedCellId1 > 0) | 385 if (expectedCellId1 > 0) |
386 { | 386 { |
387 NS_TEST_ASSERT_MSG_EQ (m_lastState.at ((unsigned int)ueDev->GetImsi () - 1
), | 387 NS_TEST_ASSERT_MSG_EQ (m_lastState.at (static_cast<unsigned int>(ueDev->Ge
tImsi () - 1)), |
388 LteUeRrc::CONNECTED_NORMALLY, | 388 LteUeRrc::CONNECTED_NORMALLY, |
389 "UE " << ueDev->GetImsi () | 389 "UE " << ueDev->GetImsi () |
390 << " is not at CONNECTED_NORMALLY state"); | 390 << " is not at CONNECTED_NORMALLY state"); |
391 } | 391 } |
392 } | 392 } |
393 | 393 |
394 | 394 |
395 void | 395 void |
396 LteCellSelectionTestCase::StateTransitionCallback ( | 396 LteCellSelectionTestCase::StateTransitionCallback ( |
397 std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, | 397 std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, |
398 LteUeRrc::State oldState, LteUeRrc::State newState) | 398 LteUeRrc::State oldState, LteUeRrc::State newState) |
399 { | 399 { |
400 NS_LOG_FUNCTION (this << imsi << cellId << rnti << oldState << newState); | 400 NS_LOG_FUNCTION (this << imsi << cellId << rnti << oldState << newState); |
401 m_lastState.at ((unsigned int)imsi - 1) = newState; | 401 m_lastState.at (static_cast<unsigned int>(imsi - 1)) = newState; |
402 } | 402 } |
403 | 403 |
404 | 404 |
405 void | 405 void |
406 LteCellSelectionTestCase::InitialCellSelectionEndOkCallback ( | 406 LteCellSelectionTestCase::InitialCellSelectionEndOkCallback ( |
407 std::string context, uint64_t imsi, uint16_t cellId) | 407 std::string context, uint64_t imsi, uint16_t cellId) |
408 { | 408 { |
409 NS_LOG_FUNCTION (this << imsi << cellId); | 409 NS_LOG_FUNCTION (this << imsi << cellId); |
410 } | 410 } |
411 | 411 |
412 | 412 |
413 void | 413 void |
414 LteCellSelectionTestCase::InitialCellSelectionEndErrorCallback ( | 414 LteCellSelectionTestCase::InitialCellSelectionEndErrorCallback ( |
415 std::string context, uint64_t imsi, uint16_t cellId) | 415 std::string context, uint64_t imsi, uint16_t cellId) |
416 { | 416 { |
417 NS_LOG_FUNCTION (this << imsi << cellId); | 417 NS_LOG_FUNCTION (this << imsi << cellId); |
418 } | 418 } |
419 | 419 |
420 | 420 |
421 void | 421 void |
422 LteCellSelectionTestCase::ConnectionEstablishedCallback ( | 422 LteCellSelectionTestCase::ConnectionEstablishedCallback ( |
423 std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti) | 423 std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti) |
424 { | 424 { |
425 NS_LOG_FUNCTION (this << imsi << cellId << rnti); | 425 NS_LOG_FUNCTION (this << imsi << cellId << rnti); |
426 } | 426 } |
LEFT | RIGHT |