LEFT | RIGHT |
(no file at all) | |
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) 2017 Alexander Krotov | 3 * Copyright (c) 2017 Alexander Krotov |
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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 Config::Connect ("/NodeList/*/DeviceList/*/LteUeRrc/ConnectionEstablished", | 143 Config::Connect ("/NodeList/*/DeviceList/*/LteUeRrc/ConnectionEstablished", |
144 MakeCallback (&LteSecondaryCellSelectionTestCase::ConnectionE
stablishedCallback, | 144 MakeCallback (&LteSecondaryCellSelectionTestCase::ConnectionE
stablishedCallback, |
145 this)); | 145 this)); |
146 | 146 |
147 // Run simulation. | 147 // Run simulation. |
148 Simulator::Stop (Seconds (2.0)); | 148 Simulator::Stop (Seconds (2.0)); |
149 Simulator::Run (); | 149 Simulator::Run (); |
150 | 150 |
151 for (auto &it: enbDev->GetCcMap ()) | 151 for (auto &it: enbDev->GetCcMap ()) |
152 { | 152 { |
153 auto ueDev = DynamicCast<LteUeNetDevice> (ueDevs.Get (it.first)); | 153 ueDev = DynamicCast<LteUeNetDevice> (ueDevs.Get (it.first)); |
154 uint16_t expectedCellId = it.second->GetCellId (); | 154 uint16_t expectedCellId = it.second->GetCellId (); |
155 uint16_t actualCellId = ueDev->GetRrc ()->GetCellId (); | 155 uint16_t actualCellId = ueDev->GetRrc ()->GetCellId (); |
156 NS_TEST_ASSERT_MSG_EQ (expectedCellId, actualCellId, "IMSI " << ueDev->Get
Imsi () << " has attached to an unexpected cell"); | 156 NS_TEST_ASSERT_MSG_EQ (expectedCellId, actualCellId, "IMSI " << ueDev->Get
Imsi () << " has attached to an unexpected cell"); |
157 | 157 |
158 NS_TEST_ASSERT_MSG_EQ (m_lastState.at (ueDev->GetImsi ()), | 158 NS_TEST_ASSERT_MSG_EQ (m_lastState.at (ueDev->GetImsi ()), |
159 LteUeRrc::CONNECTED_NORMALLY, | 159 LteUeRrc::CONNECTED_NORMALLY, |
160 "UE " << ueDev->GetImsi () | 160 "UE " << ueDev->GetImsi () |
161 << " is not at CONNECTED_NORMALLY state"); | 161 << " is not at CONNECTED_NORMALLY state"); |
162 } | 162 } |
163 | 163 |
(...skipping 18 matching lines...) Expand all Loading... |
182 { | 182 { |
183 NS_LOG_FUNCTION (this << imsi << cellId); | 183 NS_LOG_FUNCTION (this << imsi << cellId); |
184 } | 184 } |
185 | 185 |
186 void | 186 void |
187 LteSecondaryCellSelectionTestCase::ConnectionEstablishedCallback ( | 187 LteSecondaryCellSelectionTestCase::ConnectionEstablishedCallback ( |
188 std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti) | 188 std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti) |
189 { | 189 { |
190 NS_LOG_FUNCTION (this << imsi << cellId << rnti); | 190 NS_LOG_FUNCTION (this << imsi << cellId << rnti); |
191 } | 191 } |
LEFT | RIGHT |