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 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 #include <ns3/ipv4-static-routing.h> | 46 #include <ns3/ipv4-static-routing.h> |
47 #include <ns3/position-allocator.h> | 47 #include <ns3/position-allocator.h> |
48 #include <ns3/lte-enb-net-device.h> | 48 #include <ns3/lte-enb-net-device.h> |
49 #include <ns3/lte-enb-phy.h> | 49 #include <ns3/lte-enb-phy.h> |
50 | 50 |
51 using namespace ns3; | 51 using namespace ns3; |
52 | 52 |
53 NS_LOG_COMPONENT_DEFINE ("LteHandoverTargetTest"); | 53 NS_LOG_COMPONENT_DEFINE ("LteHandoverTargetTest"); |
54 | 54 |
55 /** | 55 /** |
| 56 * \ingroup lte-test |
| 57 * \ingroup tests |
| 58 * |
56 * \brief Testing a handover algorithm, verifying that it selects the right | 59 * \brief Testing a handover algorithm, verifying that it selects the right |
57 * target cell when more than one options available. | 60 * target cell when more than one options available. |
58 * | 61 * |
59 * Part of the `lte-handover-target` test suite. | 62 * Part of the `lte-handover-target` test suite. |
60 * | 63 * |
61 * The test case will run a 1-second LTE-EPC simulation using the parameters | 64 * The test case will run a 1-second LTE-EPC simulation using the parameters |
62 * provided to the constructor function. | 65 * provided to the constructor function. |
63 * | 66 * |
64 * \sa ns3::LteHandoverTargetTestCase | 67 * \sa ns3::LteHandoverTargetTestCase |
65 */ | 68 */ |
(...skipping 24 matching lines...) Expand all Loading... |
90 std::string handoverAlgorithmType); | 93 std::string handoverAlgorithmType); |
91 | 94 |
92 virtual ~LteHandoverTargetTestCase (); | 95 virtual ~LteHandoverTargetTestCase (); |
93 | 96 |
94 /** | 97 /** |
95 * \brief Triggers when an eNodeB starts a handover and then verifies that | 98 * \brief Triggers when an eNodeB starts a handover and then verifies that |
96 * the handover has the right source and target cells. | 99 * the handover has the right source and target cells. |
97 * | 100 * |
98 * The trigger is set up beforehand by connecting to the | 101 * The trigger is set up beforehand by connecting to the |
99 * `LteEnbRrc::HandoverStart` trace source. | 102 * `LteEnbRrc::HandoverStart` trace source. |
| 103 * |
| 104 * \param context the context string |
| 105 * \param imsi the IMSI |
| 106 * \param sourceCellId the source cell ID |
| 107 * \param rnti the RNTI |
| 108 * \param targetCellId the target cell ID |
100 */ | 109 */ |
101 void HandoverStartCallback (std::string context, uint64_t imsi, | 110 void HandoverStartCallback (std::string context, uint64_t imsi, |
102 uint16_t sourceCellId, uint16_t rnti, | 111 uint16_t sourceCellId, uint16_t rnti, |
103 uint16_t targetCellId); | 112 uint16_t targetCellId); |
104 | 113 |
105 /** | 114 /** |
106 * \brief A trigger that can be scheduled to "shutdown" the cell pointed by | 115 * \brief A trigger that can be scheduled to "shutdown" the cell pointed by |
107 * `m_sourceCellId` by reducing its power to 1 dB. | 116 * `m_sourceCellId` by reducing its power to 1 dB. |
108 */ | 117 */ |
109 void CellShutdownCallback (); | 118 void CellShutdownCallback (); |
110 | 119 |
111 private: | 120 private: |
112 /** | 121 /** |
113 * \brief Run a simulation of a micro-cell network using the parameters | 122 * \brief Run a simulation of a micro-cell network using the parameters |
114 * provided to the constructor function. | 123 * provided to the constructor function. |
115 */ | 124 */ |
116 virtual void DoRun (); | 125 virtual void DoRun (); |
117 | 126 |
118 /** | 127 /** |
119 * \brief Called at the end of simulation and verifies that a handover has | 128 * \brief Called at the end of simulation and verifies that a handover has |
120 * occurred in the simulation. | 129 * occurred in the simulation. |
121 */ | 130 */ |
122 virtual void DoTeardown (); | 131 virtual void DoTeardown (); |
123 | 132 |
124 // simulation parameters | 133 // simulation parameters |
125 Vector m_uePosition; | 134 Vector m_uePosition; ///< UE positions |
126 uint8_t m_gridSizeX; | 135 uint8_t m_gridSizeX; ///< X grid size |
127 uint8_t m_gridSizeY; | 136 uint8_t m_gridSizeY; ///< Y grid size |
128 uint16_t m_sourceCellId; | 137 uint16_t m_sourceCellId; ///< source cell ID |
129 uint16_t m_targetCellId; | 138 uint16_t m_targetCellId; ///< target celll ID |
130 std::string m_handoverAlgorithmType; | 139 std::string m_handoverAlgorithmType; ///< handover algorithm type |
131 | 140 |
132 Ptr<LteEnbNetDevice> m_sourceEnbDev; | 141 Ptr<LteEnbNetDevice> m_sourceEnbDev; ///< source ENB device |
133 bool m_hasHandoverOccurred; | 142 bool m_hasHandoverOccurred; ///< has handover occured? |
134 | 143 |
135 }; // end of class LteHandoverTargetTestCase | 144 }; // end of class LteHandoverTargetTestCase |
136 | 145 |
137 | 146 |
138 LteHandoverTargetTestCase::LteHandoverTargetTestCase (std::string name, Vector u
ePosition, | 147 LteHandoverTargetTestCase::LteHandoverTargetTestCase (std::string name, Vector u
ePosition, |
139 uint8_t gridSizeX, uint8_t
gridSizeY, | 148 uint8_t gridSizeX, uint8_t
gridSizeY, |
140 uint16_t sourceCellId, uin
t16_t targetCellId, | 149 uint16_t sourceCellId, uin
t16_t targetCellId, |
141 std::string handoverAlgori
thmType) | 150 std::string handoverAlgori
thmType) |
142 : TestCase (name), | 151 : TestCase (name), |
143 m_uePosition (uePosition), | 152 m_uePosition (uePosition), |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 TestCase::EXTENSIVE); | 430 TestCase::EXTENSIVE); |
422 AddTestCase (new LteHandoverTargetTestCase ("6 cells and strongest cell algori
thm", | 431 AddTestCase (new LteHandoverTargetTestCase ("6 cells and strongest cell algori
thm", |
423 Vector (150, 90, 0), 3, 2, 5, 2, | 432 Vector (150, 90, 0), 3, 2, 5, 2, |
424 "ns3::A3RsrpHandoverAlgorithm"), | 433 "ns3::A3RsrpHandoverAlgorithm"), |
425 TestCase::EXTENSIVE); | 434 TestCase::EXTENSIVE); |
426 | 435 |
427 } // end of LteHandoverTargetTestSuite () | 436 } // end of LteHandoverTargetTestSuite () |
428 | 437 |
429 | 438 |
430 static LteHandoverTargetTestSuite g_lteHandoverTargetTestSuiteInstance; | 439 static LteHandoverTargetTestSuite g_lteHandoverTargetTestSuiteInstance; |
OLD | NEW |