OLD | NEW |
(Empty) | |
| 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
| 2 /* |
| 3 * Copyright (c) 2010 TELEMATICS LAB, DEE - Politecnico di Bari |
| 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: Giuseppe Piro <g.piro@poliba.it> |
| 19 * Author: Marco Miozzo <marco.miozzo@cttc.es> : Update to FF API Architecture |
| 20 */ |
| 21 |
| 22 #ifndef NIST_LTE_ENB_NET_DEVICE_H |
| 23 #define NIST_LTE_ENB_NET_DEVICE_H |
| 24 |
| 25 #include "ns3/nist-lte-net-device.h" |
| 26 #include "ns3/event-id.h" |
| 27 #include "ns3/mac48-address.h" |
| 28 #include "ns3/traced-callback.h" |
| 29 #include "ns3/nstime.h" |
| 30 #include "ns3/nist-lte-phy.h" |
| 31 #include <vector> |
| 32 |
| 33 namespace ns3 { |
| 34 |
| 35 class Packet; |
| 36 class PacketBurst; |
| 37 class Node; |
| 38 class NistLtePhy; |
| 39 class NistLteEnbPhy; |
| 40 class NistLteEnbMac; |
| 41 class NistLteEnbRrc; |
| 42 class NistFfMacScheduler; |
| 43 class NistLteHandoverAlgorithm; |
| 44 class NistLteAnr; |
| 45 class NistLteFfrAlgorithm; |
| 46 |
| 47 /** |
| 48 * \ingroup lte |
| 49 * |
| 50 * The eNodeB device implementation |
| 51 */ |
| 52 class NistLteEnbNetDevice : public NistLteNetDevice |
| 53 { |
| 54 public: |
| 55 static TypeId GetTypeId (void); |
| 56 |
| 57 NistLteEnbNetDevice (); |
| 58 |
| 59 virtual ~NistLteEnbNetDevice (void); |
| 60 virtual void DoDispose (void); |
| 61 |
| 62 // inherited from NetDevice |
| 63 virtual bool Send (Ptr<Packet> packet, const Address& dest, uint16_t protocolN
umber); |
| 64 |
| 65 /** |
| 66 * \return a pointer to the MAC· |
| 67 */ |
| 68 Ptr<NistLteEnbMac> GetMac (void) const; |
| 69 |
| 70 /** |
| 71 * \return a pointer to the physical layer. |
| 72 */ |
| 73 Ptr<NistLteEnbPhy> GetPhy (void) const; |
| 74 |
| 75 /**· |
| 76 * \return a pointer to the Radio Resource Control instance of the eNB |
| 77 */ |
| 78 Ptr<NistLteEnbRrc> GetRrc () const; |
| 79 |
| 80 /**· |
| 81 * \return the Cell Identifier of this eNB |
| 82 */ |
| 83 uint16_t GetCellId () const; |
| 84 |
| 85 /**· |
| 86 * \return the uplink bandwidth in RBs |
| 87 */ |
| 88 uint8_t GetUlBandwidth () const; |
| 89 |
| 90 /**· |
| 91 * \param bw the uplink bandwidth in RBs |
| 92 */ |
| 93 void SetUlBandwidth (uint8_t bw); |
| 94 |
| 95 /**· |
| 96 * \return the downlink bandwidth in RBs |
| 97 */ |
| 98 uint8_t GetDlBandwidth () const; |
| 99 |
| 100 /**· |
| 101 * \param bw the downlink bandwidth in RBs |
| 102 */ |
| 103 void SetDlBandwidth (uint8_t bw); |
| 104 |
| 105 /**· |
| 106 * \return the downlink carrier frequency (EARFCN) |
| 107 */ |
| 108 uint16_t GetDlEarfcn () const; |
| 109 |
| 110 /**· |
| 111 * \param earfcn the downlink carrier frequency (EARFCN) |
| 112 */ |
| 113 void SetDlEarfcn (uint16_t earfcn); |
| 114 |
| 115 /**· |
| 116 * \return the uplink carrier frequency (EARFCN) |
| 117 */ |
| 118 uint16_t GetUlEarfcn () const; |
| 119 |
| 120 /**· |
| 121 * \param earfcn the uplink carrier frequency (EARFCN) |
| 122 */ |
| 123 void SetUlEarfcn (uint16_t earfcn); |
| 124 |
| 125 /** |
| 126 * \brief Returns the CSG ID of the eNodeB. |
| 127 * \return the Closed Subscriber Group identity |
| 128 * \sa NistLteEnbNetDevice::SetCsgId |
| 129 */ |
| 130 uint32_t GetCsgId () const; |
| 131 |
| 132 /** |
| 133 * \brief Associate the eNodeB device with a particular CSG. |
| 134 * \param csgId the intended Closed Subscriber Group identity |
| 135 * |
| 136 * CSG identity is a number identifying a Closed Subscriber Group which the |
| 137 * cell belongs to. eNodeB is associated with a single CSG identity. |
| 138 * |
| 139 * The same CSG identity can also be associated to several UEs, which is |
| 140 * equivalent as enlisting these UEs as the members of this particular CSG. |
| 141 * |
| 142 * \sa NistLteEnbNetDevice::SetCsgIndication |
| 143 */ |
| 144 void SetCsgId (uint32_t csgId); |
| 145 |
| 146 /** |
| 147 * \brief Returns the CSG indication flag of the eNodeB. |
| 148 * \return the CSG indication flag |
| 149 * \sa NistLteEnbNetDevice::SetCsgIndication |
| 150 */ |
| 151 bool GetCsgIndication () const; |
| 152 |
| 153 /** |
| 154 * \brief Enable or disable the CSG indication flag. |
| 155 * \param csgIndication if TRUE, only CSG members are allowed to access this |
| 156 * cell |
| 157 * |
| 158 * When the CSG indication field is set to TRUE, only UEs which are members of |
| 159 * the CSG (i.e. same CSG ID) can gain access to the eNodeB, therefore |
| 160 * enforcing closed access mode. Otherwise, the eNodeB operates as a non-CSG |
| 161 * cell and implements open access mode. |
| 162 * |
| 163 * \note This restriction only applies to initial cell selection and |
| 164 * EPC-enabled simulation. |
| 165 * |
| 166 * \sa NistLteEnbNetDevice::SetCsgIndication |
| 167 */ |
| 168 void SetCsgIndication (bool csgIndication); |
| 169 |
| 170 protected: |
| 171 // inherited from Object |
| 172 virtual void DoInitialize (void); |
| 173 |
| 174 |
| 175 private: |
| 176 bool m_isConstructed; |
| 177 bool m_isConfigured; |
| 178 |
| 179 /** |
| 180 * \brief Propagate attributes and configuration to sub-modules. |
| 181 * |
| 182 * Several attributes (e.g., the bandwidth) are exported as the attributes of |
| 183 * the NistLteEnbNetDevice from a user perspective, but are actually used also
in |
| 184 * other sub-modules (the RRC, the PHY, the scheduler, etc.). This method |
| 185 * takes care of updating the configuration of all these sub-modules so that |
| 186 * their copy of attribute values are in sync with the one in |
| 187 * the NistLteEnbNetDevice. |
| 188 */ |
| 189 void UpdateConfig (); |
| 190 |
| 191 Ptr<NistLteEnbMac> m_mac; |
| 192 |
| 193 Ptr<NistLteEnbPhy> m_phy; |
| 194 |
| 195 Ptr<NistLteEnbRrc> m_rrc; |
| 196 |
| 197 Ptr<NistFfMacScheduler> m_scheduler; |
| 198 |
| 199 Ptr<NistLteHandoverAlgorithm> m_handoverAlgorithm; |
| 200 |
| 201 Ptr<NistLteAnr> m_anr; |
| 202 |
| 203 Ptr<NistLteFfrAlgorithm> m_ffrAlgorithm; |
| 204 |
| 205 uint16_t m_cellId; /**< Cell Identifer. Part of the CGI, see TS 29.274, sectio
n 8.21.1 */ |
| 206 |
| 207 uint8_t m_dlBandwidth; /**< downlink bandwidth in RBs */ |
| 208 uint8_t m_ulBandwidth; /**< uplink bandwidth in RBs */ |
| 209 |
| 210 uint16_t m_dlEarfcn; /**< downlink carrier frequency */ |
| 211 uint16_t m_ulEarfcn; /**< uplink carrier frequency */ |
| 212 |
| 213 uint16_t m_csgId; |
| 214 bool m_csgIndication; |
| 215 |
| 216 }; // end of class NistLteEnbNetDevice |
| 217 |
| 218 } // namespace ns3 |
| 219 |
| 220 #endif /* NIST_LTE_ENB_NET_DEVICE_H */ |
OLD | NEW |