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 <peppe.piro@gmail.com>, <g.piro@poliba.it> |
| 19 */ |
| 20 |
| 21 |
| 22 #ifndef LTE_HELPER_H |
| 23 #define LTE_HELPER_H |
| 24 |
| 25 #include <string> |
| 26 #include "ns3/object-factory.h" |
| 27 #include "ns3/node-container.h" |
| 28 #include "ns3/net-device-container.h" |
| 29 #include "ns3/lte-net-device.h" |
| 30 #include "ns3/enb-net-device.h" |
| 31 #include "ns3/ue-net-device.h" |
| 32 #include "ns3/deprecated.h" |
| 33 #include "ns3/packet-scheduler.h" |
| 34 //#include "ns3/lte-spectrum-channel.h" |
| 35 #include "ns3/single-model-spectrum-channel.h" |
| 36 #include "ns3/lte-phy.h" |
| 37 #include "ns3/ue-phy.h" |
| 38 #include "ns3/enb-phy.h" |
| 39 #include <ns3/mobility-model.h> |
| 40 |
| 41 |
| 42 namespace ns3 { |
| 43 |
| 44 |
| 45 /** |
| 46 * \brief helps to manage and create LteNetDevice objects |
| 47 * |
| 48 * This class can help to create a LteNetDevice objects· |
| 49 * and to configure their attributes during creation. |
| 50 */ |
| 51 |
| 52 class LteHelper //:public PcapHelperForDevice, public AsciiTraceHelperForDevice |
| 53 { |
| 54 public: |
| 55 /** |
| 56 * Net Device Type |
| 57 * Distinguish a user equipment (UE) device from eNodeB (eNB) device |
| 58 */ |
| 59 enum NetDeviceType |
| 60 { |
| 61 DEVICE_TYPE_USER_EQUIPMENT, /**< UE device */ |
| 62 DEVICE_TYPE_ENODEB /**< eNB device */ |
| 63 }; |
| 64 |
| 65 /** |
| 66 * \brief Create a Lte helper in an empty state. |
| 67 */ |
| 68 LteHelper (void); |
| 69 ~LteHelper (void); |
| 70 |
| 71 /** |
| 72 * \brief Create a PHY layer for a LTE device |
| 73 * \param dlChannel the downlink channel |
| 74 * \param ulChannel the uplink channel |
| 75 * \return the pointer to the LTE physical layer |
| 76 */ |
| 77 Ptr<LtePhy> CreatePhy (Ptr<SpectrumChannel> dlChannel, Ptr<SpectrumChannel> ul
Channel, NetDeviceType t); |
| 78 |
| 79 /** |
| 80 * \brief Create a PHY layer for a LTE device |
| 81 * \return the pointer to the LTE physical layer |
| 82 */ |
| 83 Ptr<LtePhy> CreatePhy (NetDeviceType t); |
| 84 |
| 85 /** |
| 86 * \brief Create a PHY layer for a UE LTE device |
| 87 * \return the pointer to the UE LTE physical layer |
| 88 */ |
| 89 Ptr<UeLtePhy> CreateUePhy (void); |
| 90 |
| 91 /** |
| 92 * \brief Create a PHY layer for a eNB LTE device |
| 93 * \return the pointer to the eNB LTE physical layer |
| 94 */ |
| 95 Ptr<EnbLtePhy> CreateEnbPhy (void); |
| 96 |
| 97 ·· |
| 98 void AddMobility (Ptr<LtePhy> phy, Ptr<MobilityModel>m); |
| 99 |
| 100 |
| 101 /** |
| 102 * \param c a set of nodes |
| 103 * \param type device type to create |
| 104 */ |
| 105 NetDeviceContainer Install (NodeContainer c, NetDeviceType type); |
| 106 |
| 107 |
| 108 /** |
| 109 * \brief register UEs to the target eNB |
| 110 * \param ue |
| 111 * \param enb |
| 112 */ |
| 113 void RegisterUeToTheEnb (Ptr<UeNetDevice> ue, Ptr<EnbNetDevice> enb); |
| 114 |
| 115 /** |
| 116 * Helper to enable all LTE log components with one statement |
| 117 */ |
| 118 void EnableLogComponents (void); |
| 119 |
| 120 · |
| 121 void AddDownlinkChannelRealization (Ptr<MobilityModel> enbMobility,· |
| 122 Ptr<MobilityModel> ueMobility, |
| 123 Ptr<LtePhy> phy); |
| 124 ··· |
| 125 |
| 126 Ptr<SingleModelSpectrumChannel> m_downlinkChannel; |
| 127 Ptr<SingleModelSpectrumChannel> m_uplinkChannel; |
| 128 }; |
| 129 |
| 130 } // namespace ns3 |
| 131 |
| 132 #endif /* LTE_HELPER_H */ |
OLD | NEW |