/usr/include/ns3.17/ns3/lte-helper.h is in libns3-dev 3.17+dfsg-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 | /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Author: Nicola Baldo <nbaldo@cttc.es>
*/
#ifndef LTE_HELPER_H
#define LTE_HELPER_H
#include <ns3/config.h>
#include <ns3/simulator.h>
#include <ns3/names.h>
#include <ns3/net-device.h>
#include <ns3/net-device-container.h>
#include <ns3/node.h>
#include <ns3/node-container.h>
#include <ns3/eps-bearer.h>
#include <ns3/phy-stats-calculator.h>
#include <ns3/phy-tx-stats-calculator.h>
#include <ns3/phy-rx-stats-calculator.h>
#include <ns3/mac-stats-calculator.h>
#include <ns3/radio-bearer-stats-calculator.h>
#include <ns3/radio-bearer-stats-connector.h>
#include <ns3/epc-tft.h>
#include <ns3/mobility-model.h>
namespace ns3 {
class LteUePhy;
class LteEnbPhy;
class SpectrumChannel;
class EpcHelper;
class PropagationLossModel;
/**
* Creation and configuration of LTE entities
*
*/
class LteHelper : public Object
{
public:
LteHelper (void);
virtual ~LteHelper (void);
static TypeId GetTypeId (void);
virtual void DoDispose (void);
/**
* Set the EpcHelper to be used to setup the EPC network in
* conjunction with the setup of the LTE radio access network
*
* \note if no EpcHelper is ever set, then LteHelper will default
* to creating an LTE-only simulation with no EPC, using LteRlcSm as
* the RLC model, and without supporting any IP networking. In other
* words, it will be a radio-level simulation involving only LTE PHY
* and MAC and the FF Scheduler, with a saturation traffic model for
* the RLC.
*
* \param h a pointer to the EpcHelper to be used
*/
void SetEpcHelper (Ptr<EpcHelper> h);
/**
*
*
* \param type the type of pathloss model to be used for the eNBs
*/
void SetPathlossModelType (std::string type);
/**
* set an attribute for the pathloss model to be created
*
* \param n the name of the attribute
* \param v the value of the attribute
*/
void SetPathlossModelAttribute (std::string n, const AttributeValue &v);
/**
*
* \param type the type of scheduler to be used for the eNBs
*/
void SetSchedulerType (std::string type);
/**
* set an attribute for the scheduler to be created
*
* \param n the name of the attribute
* \param v the value of the attribute
*/
void SetSchedulerAttribute (std::string n, const AttributeValue &v);
/**
* set an attribute for the LteEnbNetDevice to be created
*
* \param n the name of the attribute
* \param v the value of the attribute
*/
void SetEnbDeviceAttribute (std::string n, const AttributeValue &v);
/**
*
* \param type the type of AntennaModel to be used for the eNBs
*/
void SetEnbAntennaModelType (std::string type);
/**
* set an attribute for the AntennaModel to be used for the eNBs
*
* \param n the name of the attribute
* \param v the value of the attribute
*/
void SetEnbAntennaModelAttribute (std::string n, const AttributeValue &v);
/**
*
* \param type the type of AntennaModel to be used for the UEs
*/
void SetUeAntennaModelType (std::string type);
/**
* set an attribute for the AntennaModel to be used for the UEs
*
* \param n the name of the attribute
* \param v the value of the attribute
*/
void SetUeAntennaModelAttribute (std::string n, const AttributeValue &v);
/**
*
* \param type the type of SpectrumChannel to be used for the UEs
*/
void SetSpectrumChannelType (std::string type);
/**
* set an attribute for the SpectrumChannel to be used for the UEs
*
* \param n the name of the attribute
* \param v the value of the attribute
*/
void SetSpectrumChannelAttribute (std::string n, const AttributeValue &v);
/**
* create a set of eNB devices
*
* \param c the node container where the devices are to be installed
*
* \return the NetDeviceContainer with the newly created devices
*/
NetDeviceContainer InstallEnbDevice (NodeContainer c);
/**
* create a set of UE devices
*
* \param c the node container where the devices are to be installed
*
* \return the NetDeviceContainer with the newly created devices
*/
NetDeviceContainer InstallUeDevice (NodeContainer c);
/**
* Attach a set of UE devices to a single eNB device
*
* \param ueDevices
* \param enbDevice
*/
void Attach (NetDeviceContainer ueDevices, Ptr<NetDevice> enbDevice);
/**
* Attach a UE to the network
*
* Attach a UE device to the network via a given eNB, and activate the default EPS bearer.
*
* \param ueDevice
* \param enbDevice
*/
void Attach (Ptr<NetDevice> ueDevice, Ptr<NetDevice> enbDevice);
/**
* Attach each UE in a set to the closest (w.r.t. distance) eNB among those in a set.
*
*
*
* \param ueDevices the set of UEs
* \param enbDevices the set of eNBs
*/
void AttachToClosestEnb (NetDeviceContainer ueDevices, NetDeviceContainer enbDevices);
/**
* Attach an UE ito the closest (w.r.t. distance) eNB among those in a set
* Will call LteHelper::Attach () passing to it the single eNB
* instance which resulted to be the closest to the UE
*
* \param ueDevice the UE
* \param enbDevices the set of eNBs
*/
void AttachToClosestEnb (Ptr<NetDevice> ueDevice, NetDeviceContainer enbDevices);
/**
* Activate a dedicated EPS bearer on a given set of UE devices
*
* \param ueDevices the set of UE devices
* \param bearer the characteristics of the bearer to be activated
* \param tft the Traffic Flow Template that identifies the traffic to go on this bearer
*/
void ActivateDedicatedEpsBearer (NetDeviceContainer ueDevices, EpsBearer bearer, Ptr<EpcTft> tft);
/**
* Activate a dedicated EPS bearer on a given UE device
*
* \param ueDevices the set of UE devices
* \param bearer the characteristics of the bearer to be activated
* \param tft the Traffic Flow Template that identifies the traffic to go on this bearer
*/
void ActivateDedicatedEpsBearer (Ptr<NetDevice> ueDevice, EpsBearer bearer, Ptr<EpcTft> tft);
/**
* Create an X2 interface between all the eNBs in a given set
*
* \param enbNodes the set of eNB nodes
*/
void AddX2Interface (NodeContainer enbNodes);
/**
* Create an X2 interface between two eNBs
*
* \param enbNode1 one eNB of the X2 interface
* \param enbNode2 the other eNB of the X2 interface
*/
void AddX2Interface (Ptr<Node> enbNode1, Ptr<Node> enbNode2);
/**
* Trigger an X2-based handover of a UE between two eNBs
*
* \param hoTime when the Handover is initiated
* \param ueDev the UE that hands off
* \param enbDev1 source eNB, originally the UE is attached to this eNB
* \param enbDev2 target eNB, the UE is finally connected to this eNB
*/
void HandoverRequest (Time hoTime, Ptr<NetDevice> ueDev, Ptr<NetDevice> sourceEnbDev, Ptr<NetDevice> targetEnbDev);
/**
* Call ActivateDataRadioBearer (ueDevice, bearer) for each UE
* device in a given set
*
* \param ueDevices the set of UE devices
* \param bearer
*/
void ActivateDataRadioBearer (NetDeviceContainer ueDevices, EpsBearer bearer);
/**
* Activate a Data Radio Bearer for a simplified LTE-only simulation
* without EPC. This method will schedule the actual activation of
* the bearer so that it happens after the UE got connected.
*
* \param ueDevice the device of the UE for which the radio bearer
* is to be activated
* \param bearer the characteristics of the bearer to be activated
*/
void ActivateDataRadioBearer (Ptr<NetDevice> ueDevice, EpsBearer bearer);
/**
*
*
* \param type the fading model to be used
*/
void SetFadingModel (std::string model);
/**
* set an attribute of the fading model
*/
void SetFadingModelAttribute (std::string n, const AttributeValue &v);
/**
* Enables logging for all components of the LENA architecture
*
*/
void EnableLogComponents (void);
/**
* Enables trace sinks for PHY, MAC, RLC and PDCP. To make sure all nodes are
* traced, traces should be enabled once all UEs and eNodeBs are in place and
* connected, just before starting the simulation.
*/
void EnableTraces (void);
/**
* Enable trace sinks for PHY layer
*/
void EnablePhyTraces (void);
/**
* Enable trace sinks for DL PHY layer
*/
void EnableDlPhyTraces (void);
/**
* Enable trace sinks for UL PHY layer
*/
void EnableUlPhyTraces (void);
/**
* Enable trace sinks for DL transmission PHY layer
*/
void EnableDlTxPhyTraces (void);
/**
* Enable trace sinks for UL transmission PHY layer
*/
void EnableUlTxPhyTraces (void);
/**
* Enable trace sinks for DL reception PHY layer
*/
void EnableDlRxPhyTraces (void);
/**
* Enable trace sinks for UL reception PHY layer
*/
void EnableUlRxPhyTraces (void);
/**
* Enable trace sinks for MAC layer
*/
void EnableMacTraces (void);
/**
* Enable trace sinks for DL MAC layer
*/
void EnableDlMacTraces (void);
/**
* Enable trace sinks for UL MAC layer
*/
void EnableUlMacTraces (void);
/**
* Enable trace sinks for RLC layer
*/
void EnableRlcTraces (void);
/**
*
* \return the RLC stats calculator object
*/
Ptr<RadioBearerStatsCalculator> GetRlcStats (void);
/**
* Enable trace sinks for PDCP layer
*/
void EnablePdcpTraces (void);
/**
*
* \return the PDCP stats calculator object
*/
Ptr<RadioBearerStatsCalculator> GetPdcpStats (void);
enum LteEpsBearerToRlcMapping_t {RLC_SM_ALWAYS = 1,
RLC_UM_ALWAYS = 2,
RLC_AM_ALWAYS = 3,
PER_BASED = 4};
/**
* Assign a fixed random variable stream number to the random variables
* used by this model. Return the number of streams (possibly zero) that
* have been assigned. The Install() method should have previously been
* called by the user.
*
* \param c NetDeviceContainer of the set of net devices for which the
* LteNetDevice should be modified to use a fixed stream
* \param stream first stream index to use
* \return the number of stream indices assigned by this helper
*/
int64_t AssignStreams (NetDeviceContainer c, int64_t stream);
protected:
// inherited from Object
virtual void DoInitialize (void);
private:
Ptr<NetDevice> InstallSingleEnbDevice (Ptr<Node> n);
Ptr<NetDevice> InstallSingleUeDevice (Ptr<Node> n);
void DoHandoverRequest (Ptr<NetDevice> ueDev, Ptr<NetDevice> sourceEnbDev, Ptr<NetDevice> targetEnbDev);
Ptr<SpectrumChannel> m_downlinkChannel;
Ptr<SpectrumChannel> m_uplinkChannel;
Ptr<Object> m_downlinkPathlossModel;
Ptr<Object> m_uplinkPathlossModel;
ObjectFactory m_schedulerFactory;
ObjectFactory m_propagationModelFactory;
ObjectFactory m_enbNetDeviceFactory;
ObjectFactory m_enbAntennaModelFactory;
ObjectFactory m_ueAntennaModelFactory;
ObjectFactory m_dlPathlossModelFactory;
ObjectFactory m_ulPathlossModelFactory;
ObjectFactory m_channelFactory;
std::string m_fadingModelType;
ObjectFactory m_fadingModelFactory;
Ptr<PhyStatsCalculator> m_phyStats;
Ptr<PhyTxStatsCalculator> m_phyTxStats;
Ptr<PhyRxStatsCalculator> m_phyRxStats;
Ptr<MacStatsCalculator> m_macStats;
Ptr<RadioBearerStatsCalculator> m_rlcStats;
Ptr<RadioBearerStatsCalculator> m_pdcpStats;
RadioBearerStatsConnector m_radioBearerStatsConnector;
Ptr<EpcHelper> m_epcHelper;
uint64_t m_imsiCounter;
uint16_t m_cellIdCounter;
bool m_useIdealRrc;
};
} // namespace ns3
#endif // LTE_HELPER_H
|