OLD | NEW |
(Empty) | |
| 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
| 2 /* |
| 3 * Copyright (c) 2015 Danilo Abrignani |
| 4 * |
| 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 |
| 7 * published by the Free Software Foundation; |
| 8 * |
| 9 * This program is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 * GNU General Public License for more details. |
| 13 * |
| 14 * You should have received a copy of the GNU General Public License |
| 15 * along with this program; if not, write to the Free Software |
| 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 17 * |
| 18 * Author: Danilo Abrignani <danilo.abrignani@unibo.it> |
| 19 * |
| 20 */ |
| 21 |
| 22 #ifndef LTE_CCS_ALGORITHM_H |
| 23 #define LTE_CCS_ALGORITHM_H |
| 24 |
| 25 #include <ns3/object.h> |
| 26 #include <ns3/lte-rrc-sap.h> |
| 27 |
| 28 namespace ns3 { |
| 29 |
| 30 |
| 31 class LteComponentCarrierManagementSapUser; |
| 32 class LteComponentCarrierManagementSapProvider; |
| 33 |
| 34 |
| 35 /** |
| 36 * \brief The abstract base class of a Carrier Component Selection (CCS) algorit
hm that operates using |
| 37 * the ComponentCarrier Management SAP interface. |
| 38 * |
| 39 * CCS algorithm receives measurement reports from an eNode RRC instance |
| 40 * and tells the eNodeB RRC instance when to do a CCS. |
| 41 * |
| 42 * This class is an abstract class intended to be inherited by subclasses that |
| 43 * implement its virtual methods. By inheriting from this abstract class, the |
| 44 * subclasses gain the benefits of being compatible with the LteEnbNetDevice |
| 45 * class, being accessible using namespace-based access through ns-3 Config |
| 46 * subsystem, and being installed and configured by LteHelper class (see |
| 47 * LteHelper::SetComponentCarrierAlgorithmType and |
| 48 * LteHelper::SetComponentCarrierAlgorithmAttribute methods). |
| 49 * |
| 50 * The communication with the eNodeB RRC instance is done through the *Component
Carrier |
| 51 * Management SAP* interface. The ComponentCarrier algorithm instance correspond
s to the |
| 52 * "provider" part of this interface, while the eNodeB RRC instance takes the |
| 53 * role of the "user" part. The following code skeleton establishes the |
| 54 * connection between both instances: |
| 55 * |
| 56 * Ptr<LteEnbRrc> u = ...; |
| 57 * Ptr<LteCcsAlgorithm> p = ...; |
| 58 * u->SetLteComponentCarrierManagementSapProvider (p->GetLteComponentCarrier
ManagementSapProvider ()); |
| 59 * p->SetLteComponentCarrierManagementSapUser (u->GetLteComponentCarrierMana
gementSapUser ()); |
| 60 * |
| 61 * However, user rarely needs to use the above code, since it has already been |
| 62 * taken care by LteHelper::InstallEnbDevice. |
| 63 * |
| 64 * \sa LteComponentCarrierManagementSapProvider, LteComponentCarrierManagementSa
pUser |
| 65 */ |
| 66 class LteCcsAlgorithm : public Object |
| 67 { |
| 68 public: |
| 69 LteCcsAlgorithm (); |
| 70 virtual ~LteCcsAlgorithm (); |
| 71 |
| 72 // inherited from Object |
| 73 static TypeId GetTypeId (); |
| 74 |
| 75 /** |
| 76 * \brief Set the "user" part of the ComponentCarrier Management SAP interface
that |
| 77 * this ComponentCarrier algorithm instance will interact with. |
| 78 * \param s a reference to the "user" part of the interface, typically a |
| 79 * member of an LteEnbRrc instance |
| 80 */ |
| 81 virtual void SetLteComponentCarrierManagementSapUser (LteComponentCarrierManag
ementSapUser* s) = 0; |
| 82 |
| 83 /** |
| 84 * \brief Export the "provider" part of the ComponentCarrier Management SAP in
terface. |
| 85 * \return the reference to the "provider" part of the interface, typically to |
| 86 * be kept by an LteEnbRrc instance |
| 87 */ |
| 88 virtual LteComponentCarrierManagementSapProvider* GetLteComponentCarrierManage
mentSapProvider () = 0; |
| 89 |
| 90 protected: |
| 91 |
| 92 // inherited from Object |
| 93 virtual void DoDispose (); |
| 94 |
| 95 // COMPONENT CARRIER MANAGEMENT SAP PROVIDER IMPLEMENTATION |
| 96 |
| 97 /** |
| 98 * \brief Implementation of LteComponentCarrierManagementSapProvider::ReportUe
Meas. |
| 99 * \param rnti Radio Network Temporary Identity, an integer identifying the UE |
| 100 * where the report originates from |
| 101 * \param measResults a single report of one measurement identity |
| 102 */ |
| 103 virtual void DoReportUeMeas (uint16_t rnti, LteRrcSap::MeasResults measResults
) = 0; |
| 104 |
| 105 }; // end of class LteCcsAlgorithm |
| 106 |
| 107 |
| 108 } // end of namespace ns3 |
| 109 |
| 110 |
| 111 #endif /* LTE_CCS_ALGORITHM_H */ |
OLD | NEW |