From 744f8bc2b112e7449365384732c981a9b147f687 Mon Sep 17 00:00:00 2001 From: Nicola Baldo Date: Mon, 5 Dec 2011 21:13:53 +0100 Subject: [PATCH] renamed LenaHelper --> LteHelper --- src/lte/doc/source/lte-design.rst | 10 +- src/lte/doc/source/lte-user.rst | 58 +++++------ src/lte/examples/lena-cqi-threshold.cc | 24 ++--- src/lte/examples/lena-fading.cc | 26 ++--- .../examples/lena-intercell-interference.cc | 22 ++--- src/lte/examples/lena-pathloss-traces.cc | 24 ++--- src/lte/examples/lena-profiling.cc | 22 ++--- src/lte/examples/lena-rlc-traces.cc | 20 ++-- src/lte/examples/lena-simple-epc.cc | 4 +- src/lte/examples/lena-simple.cc | 14 +-- .../helper/{lena-helper.cc => lte-helper.cc} | 96 +++++++++---------- .../helper/{lena-helper.h => lte-helper.h} | 14 +-- src/lte/test/lte-test-fading.cc | 42 ++++---- src/lte/test/lte-test-interference.cc | 28 +++--- src/lte/test/lte-test-link-adaptation.cc | 24 ++--- src/lte/test/lte-test-pathloss-model.cc | 36 +++---- src/lte/test/lte-test-pf-ff-mac-scheduler.cc | 38 ++++---- src/lte/test/lte-test-rr-ff-mac-scheduler.cc | 22 ++--- src/lte/test/test-lte-epc-e2e-data.cc | 4 +- src/lte/wscript | 4 +- 20 files changed, 266 insertions(+), 266 deletions(-) rename src/lte/helper/{lena-helper.cc => lte-helper.cc} (92%) rename src/lte/helper/{lena-helper.h => lte-helper.h} (97%) diff --git a/src/lte/doc/source/lte-design.rst b/src/lte/doc/source/lte-design.rst index 5b1819147..0b6b255cf 100644 --- a/src/lte/doc/source/lte-design.rst +++ b/src/lte/doc/source/lte-design.rst @@ -929,19 +929,19 @@ Two helper objects are use to setup simulations and configure the variosu components. These objects are: - * LenaHelper, which takes care of the configuration of the LTE radio + * LteHelper, which takes care of the configuration of the LTE radio access network, as well as of coordinating the setup and release of EPS bearers * EpcHelper, which takes care of the configuratio of the Evolved Packet Core It is possible to create a simple LTE-only simulations by -using LenaHelper alone, or to create complete LTE-EPC simulations by -using both LenaHelper and EpcHelper. When both helpers are used, they -interact in a master-slave fashion, with LenaHelper being the Master +using LteHelper alone, or to create complete LTE-EPC simulations by +using both LteHelper and EpcHelper. When both helpers are used, they +interact in a master-slave fashion, with LteHelper being the Master that interacts directly with the user program, and EpcHelper working "under the hood" to configure the EPC upon explicit methods called by -LenaHelper. The exact interactions are displayed in the following diagram: +LteHelper. The exact interactions are displayed in the following diagram: .. seqdiag:: helpers.seqdiag diff --git a/src/lte/doc/source/lte-user.rst b/src/lte/doc/source/lte-user.rst index 43fe315c5..aa2e27f11 100644 --- a/src/lte/doc/source/lte-user.rst +++ b/src/lte/doc/source/lte-user.rst @@ -27,7 +27,7 @@ following steps: 1. *Define the scenario* to be simulated 2. *Write a simulation program* that recreates the desired scenario topology/architecture. This is done accessing the ns-3 LTE model - library using the ``ns3::LenaHelper`` API defined in ``src/lte/helper/lena-helper.h``. + library using the ``ns3::LteHelper`` API defined in ``src/lte/helper/lte-helper.h``. 3. *Specify configuration parameters* of the objects that are being used for the simulation. This can be done using input files (via the ``ns3::ConfigStore``) or directly within the simulation program. @@ -60,9 +60,9 @@ Here is the minimal simulation program that is needed to do an LTE-only simulati // the rest of the simulation program follows -#. Create a LenaHelper object:: +#. Create a LteHelper object:: - Ptr lena = CreateObject (); + Ptr lteHelper = CreateObject (); This will instantiate some common objects (e.g., the Channel object) and provide the methods to add @@ -93,24 +93,24 @@ Here is the minimal simulation program that is needed to do an LTE-only simulati #. Install an LTE protocol stack on the eNB(s):: NetDeviceContainer enbDevs; - enbDevs = lena->InstallEnbDevice (enbNodes); + enbDevs = lteHelper->InstallEnbDevice (enbNodes); #. Install an LTE protocol stack on the UEs:: NetDeviceContainer ueDevs; - ueDevs = lena->InstallUeDevice (ueNodes); + ueDevs = lteHelper->InstallUeDevice (ueNodes); #. Attach the UEs to an eNB. This will configure each UE according to the eNB configuration, and create an RRC connection between them:: - lena->Attach (ueDevs, enbDevs.Get (0)); + lteHelper->Attach (ueDevs, enbDevs.Get (0)); #. Activate an EPS Bearer including the setup of the Radio Bearer between an eNB and its attached UE:: enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE; EpsBearer bearer (q); - lena->ActivateEpsBearer (ueDevs, bearer); + lteHelper->ActivateEpsBearer (ueDevs, bearer); In the current version of the ns-3 LTE model, the activation of an EPS Bearer will also activate two saturation traffic generators for @@ -162,8 +162,8 @@ for the above to work, make sure you also ``#include "ns3/config-store.h"``. Now create a text file named (for example) ``input-defaults.txt`` specifying the new default values that you want to use for some attributes:: - default ns3::LenaHelper::Scheduler "ns3::PfFfMacScheduler" - default ns3::LenaHelper::PathlossModel "ns3::FriisSpectrumPropagationLossModel" + default ns3::LteHelper::Scheduler "ns3::PfFfMacScheduler" + default ns3::LteHelper::PathlossModel "ns3::FriisSpectrumPropagationLossModel" default ns3::LteEnbNetDevice::UlBandwidth "25" default ns3::LteEnbNetDevice::DlBandwidth "25" default ns3::LteEnbNetDevice::DlEarfcn "100" @@ -196,12 +196,12 @@ Simulation Output The ns-3 LTE model currently supports the output to file of both MAC and RLC level Key Performance Indicators (KPIs). You can enable it in the following way:: - Ptr lena = CreateObject (); + Ptr lteHelper = CreateObject (); // configure all the simulation scenario here... - lena->EnableMacTraces (); - lena->EnableRlcTraces (); + lteHelper->EnableMacTraces (); + lteHelper->EnableRlcTraces (); Simulator::Run (); @@ -299,16 +299,16 @@ The default configuration of the matlab script provides a trace 10 seconds long, In order to activate the fading module (which is not active by default) the following code should be included in the simulation program:: - Ptr lena = CreateObject (); - lena->SetFadingModel("ns3::TraceFadingLossModel"); + Ptr lteHelper = CreateObject (); + lteHelper->SetFadingModel("ns3::TraceFadingLossModel"); And for setting the parameters:: - lena->SetFadingModelAttribute ("TraceFilename", StringValue ("src/lte/model/fading-traces/fading_trace_EPA_3kmph.fad")); - lena->SetFadingModelAttribute ("TraceLength", TimeValue (Seconds (10.0))); - lena->SetFadingModelAttribute ("SamplesNum", UintegerValue (10000)); - lena->SetFadingModelAttribute ("WindowSize", TimeValue (Seconds (0.5))); - lena->SetFadingModelAttribute ("RbNum", UintegerValue (100)); + lteHelper->SetFadingModelAttribute ("TraceFilename", StringValue ("src/lte/model/fading-traces/fading_trace_EPA_3kmph.fad")); + lteHelper->SetFadingModelAttribute ("TraceLength", TimeValue (Seconds (10.0))); + lteHelper->SetFadingModelAttribute ("SamplesNum", UintegerValue (10000)); + lteHelper->SetFadingModelAttribute ("WindowSize", TimeValue (Seconds (0.5))); + lteHelper->SetFadingModelAttribute ("RbNum", UintegerValue (100)); It has to be noted that, ``TraceFilename`` does not have a default value, therefore is has to be always set explicitly. @@ -356,16 +356,16 @@ We now explain by examples how to use the buildings model (in particular, the `` #. Pathloss model selection:: - Ptr lena = CreateObject (); + Ptr lteHelper = CreateObject (); - lena->SetAttribute ("PathlossModel", StringValue ("ns3::BuildingsPropagationLossModel")); + lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::BuildingsPropagationLossModel")); #. EUTRA Band Selection The selection of the working frequency of the propagation model has to be done with the standard ns-3 attribute system as described in the correspond section ("Configuration of LTE model parameters") by means of the DlEarfcn and UlEarfcn parameters, for instance:: - lena->SetEnbDeviceAttribute ("DlEarfcn", UintegerValue (100)); - lena->SetEnbDeviceAttribute ("UlEarfcn", UintegerValue (18100)); + lteHelper->SetEnbDeviceAttribute ("DlEarfcn", UintegerValue (100)); + lteHelper->SetEnbDeviceAttribute ("UlEarfcn", UintegerValue (18100)); It is to be noted that using other means to configure the frequency used by the propagation model (i.e., configuring the corresponding BuildingsPropagationLossModel attributes directly) might generates conflicts in the frequencies definition in the modules during the simulation, and is therefore not advised. @@ -379,7 +379,7 @@ It is to be noted that using other means to configure the frequency used by the ueNodes.Create (1); mobility.Install (ueNodes); NetDeviceContainer ueDevs; - ueDevs = lena->InstallUeDevice (ueNodes); + ueDevs = lteHelper->InstallUeDevice (ueNodes); Ptr mm = enbNodes.Get (0)->GetObject (); double x_axis = 0.0; double y_axis = 0.0; @@ -432,12 +432,12 @@ network you might have in your simulation. First of all, in your simulation program you need to create two helpers:: - Ptr lena = CreateObject (); + Ptr lteHelper = CreateObject (); Ptr epcHelper = CreateObject (); Then, you need to tell the LTE helper that the EPC will be used:: - lena->SetEpcHelper (epcHelper); + lteHelper->SetEpcHelper (epcHelper); the above step is necessary so that the LTE helper will trigger the appropriate EPC configuration in correspondance with some important @@ -499,8 +499,8 @@ follows. We assume you have a container for UE and eNodeB nodes like this:: to configure an LTE-only simulation, you would then normally do something like this:: - NetDeviceContainer ueLteDevs = lena->InstallUeDevice (ueNodes); - lena->Attach (ueLteDevs, enbLteDevs.Get (0)); + NetDeviceContainer ueLteDevs = lteHelper->InstallUeDevice (ueNodes); + lteHelper->Attach (ueLteDevs, enbLteDevs.Get (0)); in order to configure the UEs for IP networking, you just need to additionally do like this:: @@ -523,7 +523,7 @@ additionally do like this:: The activation of bearers is done exactly in the same way as for an LTE-only simulation. Here is how to activate a default bearer:: - lena->ActivateEpsBearer (ueLteDevs, EpsBearer (EpsBearer::NGBR_VIDEO_TCP_DEFAULT), LteTft::Default ()); + lteHelper->ActivateEpsBearer (ueLteDevs, EpsBearer (EpsBearer::NGBR_VIDEO_TCP_DEFAULT), LteTft::Default ()); you can of course use custom EpsBearer and LteTft configurations, please refer to the doxygen documentation for how to do it. diff --git a/src/lte/examples/lena-cqi-threshold.cc b/src/lte/examples/lena-cqi-threshold.cc index 047da76af..348fb6d94 100644 --- a/src/lte/examples/lena-cqi-threshold.cc +++ b/src/lte/examples/lena-cqi-threshold.cc @@ -77,10 +77,10 @@ int main (int argc, char *argv[]) // parse again so you can override default values from the command line cmd.Parse (argc, argv); - Ptr lena = CreateObject (); - lena->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel")); + Ptr lteHelper = CreateObject (); + lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel")); // Uncomment to enable logging - //lena->EnableLogComponents (); + //lteHelper->EnableLogComponents (); // Create Nodes: eNodeB and UE NodeContainer enbNodes; @@ -98,17 +98,17 @@ int main (int argc, char *argv[]) // Create Devices and install them in the Nodes (eNB and UE) NetDeviceContainer enbDevs; NetDeviceContainer ueDevs; -// lena->SetSchedulerType ("ns3::RrFfMacScheduler"); - lena->SetSchedulerType ("ns3::PfFfMacScheduler"); - lena->SetSchedulerAttribute ("CqiTimerThreshold", UintegerValue (3)); - enbDevs = lena->InstallEnbDevice (enbNodes); - ueDevs = lena->InstallUeDevice (ueNodes); +// lteHelper->SetSchedulerType ("ns3::RrFfMacScheduler"); + lteHelper->SetSchedulerType ("ns3::PfFfMacScheduler"); + lteHelper->SetSchedulerAttribute ("CqiTimerThreshold", UintegerValue (3)); + enbDevs = lteHelper->InstallEnbDevice (enbNodes); + ueDevs = lteHelper->InstallUeDevice (ueNodes); - lena->EnableRlcTraces(); - lena->EnableMacTraces(); + lteHelper->EnableRlcTraces(); + lteHelper->EnableMacTraces(); // Attach a UE to a eNB - lena->Attach (ueDevs, enbDevs.Get (0)); + lteHelper->Attach (ueDevs, enbDevs.Get (0)); Simulator::Schedule (Seconds (0.010), &ChangePosition, ueNodes.Get (0)); Simulator::Schedule (Seconds (0.020), &ChangePosition, ueNodes.Get (0)); @@ -116,7 +116,7 @@ int main (int argc, char *argv[]) // Activate an EPS bearer enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE; EpsBearer bearer (q); - lena->ActivateEpsBearer (ueDevs, bearer, LteTft::Default ()); + lteHelper->ActivateEpsBearer (ueDevs, bearer, LteTft::Default ()); Simulator::Stop (Seconds (0.030)); diff --git a/src/lte/examples/lena-fading.cc b/src/lte/examples/lena-fading.cc index d7d60e388..bc27dbcd0 100644 --- a/src/lte/examples/lena-fading.cc +++ b/src/lte/examples/lena-fading.cc @@ -47,24 +47,24 @@ int main (int argc, char *argv[]) // parse again so you can override default values from the command line //cmd.Parse (argc, argv); - Ptr lena = CreateObject (); + Ptr lteHelper = CreateObject (); // Uncomment to enable logging - //lena->EnableLogComponents (); + //lteHelper->EnableLogComponents (); - lena->SetAttribute ("FadingModel", StringValue ("ns3::TraceFadingLossModel")); + lteHelper->SetAttribute ("FadingModel", StringValue ("ns3::TraceFadingLossModel")); std::ifstream ifTraceFile; ifTraceFile.open ("../../src/lte/model/fading-traces/fading_trace_EPA_3kmph.fad", std::ifstream::in); if (ifTraceFile.good ()) { // script launched by test.py - lena->SetFadingModelAttribute ("TraceFilename", StringValue ("../../src/lte/model/fading-traces/fading_trace_EPA_3kmph.fad")); + lteHelper->SetFadingModelAttribute ("TraceFilename", StringValue ("../../src/lte/model/fading-traces/fading_trace_EPA_3kmph.fad")); } else { // script launched as an example - lena->SetFadingModelAttribute ("TraceFilename", StringValue ("src/lte/model/fading-traces/fading_trace_EPA_3kmph.fad")); + lteHelper->SetFadingModelAttribute ("TraceFilename", StringValue ("src/lte/model/fading-traces/fading_trace_EPA_3kmph.fad")); } // these parameters have to setted only in case of the trace format @@ -73,10 +73,10 @@ int main (int argc, char *argv[]) // - 10,000 samples // - 0.5 seconds for window size // - 100 RB - lena->SetFadingModelAttribute ("TraceLength", TimeValue (Seconds (10.0))); - lena->SetFadingModelAttribute ("SamplesNum", UintegerValue (10000)); - lena->SetFadingModelAttribute ("WindowSize", TimeValue (Seconds (0.5))); - lena->SetFadingModelAttribute ("RbNum", UintegerValue (100)); + lteHelper->SetFadingModelAttribute ("TraceLength", TimeValue (Seconds (10.0))); + lteHelper->SetFadingModelAttribute ("SamplesNum", UintegerValue (10000)); + lteHelper->SetFadingModelAttribute ("WindowSize", TimeValue (Seconds (0.5))); + lteHelper->SetFadingModelAttribute ("RbNum", UintegerValue (100)); // Create Nodes: eNodeB and UE NodeContainer enbNodes; @@ -94,16 +94,16 @@ int main (int argc, char *argv[]) // Create Devices and install them in the Nodes (eNB and UE) NetDeviceContainer enbDevs; NetDeviceContainer ueDevs; - enbDevs = lena->InstallEnbDevice (enbNodes); - ueDevs = lena->InstallUeDevice (ueNodes); + enbDevs = lteHelper->InstallEnbDevice (enbNodes); + ueDevs = lteHelper->InstallUeDevice (ueNodes); // Attach a UE to a eNB - lena->Attach (ueDevs, enbDevs.Get (0)); + lteHelper->Attach (ueDevs, enbDevs.Get (0)); // Activate an EPS bearer enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE; EpsBearer bearer (q); - lena->ActivateEpsBearer (ueDevs, bearer, LteTft::Default ()); + lteHelper->ActivateEpsBearer (ueDevs, bearer, LteTft::Default ()); Simulator::Stop (Seconds (0.005)); diff --git a/src/lte/examples/lena-intercell-interference.cc b/src/lte/examples/lena-intercell-interference.cc index b99f0e2dc..613db4a0a 100644 --- a/src/lte/examples/lena-intercell-interference.cc +++ b/src/lte/examples/lena-intercell-interference.cc @@ -68,9 +68,9 @@ int main (int argc, char *argv[]) << "_numUes" << std::setw (3) << std::setfill ('0') << numUes << "_rngRun" << std::setw (3) << std::setfill ('0') << runValue.Get () ; - Ptr lena = CreateObject (); + Ptr lteHelper = CreateObject (); - lena->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel")); + lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel")); // Create Nodes: eNodeB and UE NodeContainer enbNodes; @@ -112,19 +112,19 @@ int main (int argc, char *argv[]) NetDeviceContainer enbDevs; NetDeviceContainer ueDevs1; NetDeviceContainer ueDevs2; - enbDevs = lena->InstallEnbDevice (enbNodes); - ueDevs1 = lena->InstallUeDevice (ueNodes1); - ueDevs2 = lena->InstallUeDevice (ueNodes2); + enbDevs = lteHelper->InstallEnbDevice (enbNodes); + ueDevs1 = lteHelper->InstallUeDevice (ueNodes1); + ueDevs2 = lteHelper->InstallUeDevice (ueNodes2); // Attach UEs to a eNB - lena->Attach (ueDevs1, enbDevs.Get (0)); - lena->Attach (ueDevs2, enbDevs.Get (1)); + lteHelper->Attach (ueDevs1, enbDevs.Get (0)); + lteHelper->Attach (ueDevs2, enbDevs.Get (1)); // Activate an EPS bearer on all UEs enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE; EpsBearer bearer (q); - lena->ActivateEpsBearer (ueDevs1, bearer, LteTft::Default ()); - lena->ActivateEpsBearer (ueDevs2, bearer, LteTft::Default ()); + lteHelper->ActivateEpsBearer (ueDevs1, bearer, LteTft::Default ()); + lteHelper->ActivateEpsBearer (ueDevs2, bearer, LteTft::Default ()); Simulator::Stop (Seconds (10)); @@ -134,8 +134,8 @@ int main (int argc, char *argv[]) std::string ulOutFname = "UlRlcStats"; ulOutFname.append (tag.str ()); - lena->EnableMacTraces (); - lena->EnableRlcTraces (); + lteHelper->EnableMacTraces (); + lteHelper->EnableRlcTraces (); Simulator::Run (); Simulator::Destroy (); diff --git a/src/lte/examples/lena-pathloss-traces.cc b/src/lte/examples/lena-pathloss-traces.cc index db1f6d0ed..e0392e76a 100644 --- a/src/lte/examples/lena-pathloss-traces.cc +++ b/src/lte/examples/lena-pathloss-traces.cc @@ -158,7 +158,7 @@ int main (int argc, char *argv[]) << "_numUes" << std::setw (3) << std::setfill ('0') << numUes << "_rngRun" << std::setw (3) << std::setfill ('0') << runValue.Get () ; - Ptr lena = CreateObject (); + Ptr lteHelper = CreateObject (); // NOTE: the PropagationLoss trace source of the SpectrumChannel @@ -174,7 +174,7 @@ int main (int argc, char *argv[]) // but it WON'T work if you ONLY use SpectrumPropagationLossModels such as: // ns3::FriisSpectrumPropagationLossModel // ns3::ConstantSpectrumPropagationLossModel - lena->SetAttribute ("PathlossModel", StringValue ("ns3::Cost231PropagationLossModel")); + lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::Cost231PropagationLossModel")); // Create Nodes: eNodeB and UE @@ -215,19 +215,19 @@ int main (int argc, char *argv[]) NetDeviceContainer enbDevs; NetDeviceContainer ueDevs1; NetDeviceContainer ueDevs2; - enbDevs = lena->InstallEnbDevice (enbNodes); - ueDevs1 = lena->InstallUeDevice (ueNodes1); - ueDevs2 = lena->InstallUeDevice (ueNodes2); + enbDevs = lteHelper->InstallEnbDevice (enbNodes); + ueDevs1 = lteHelper->InstallUeDevice (ueNodes1); + ueDevs2 = lteHelper->InstallUeDevice (ueNodes2); // Attach UEs to a eNB - lena->Attach (ueDevs1, enbDevs.Get (0)); - lena->Attach (ueDevs2, enbDevs.Get (1)); + lteHelper->Attach (ueDevs1, enbDevs.Get (0)); + lteHelper->Attach (ueDevs2, enbDevs.Get (1)); // Activate an EPS bearer on all UEs enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE; EpsBearer bearer (q); - lena->ActivateEpsBearer (ueDevs1, bearer, LteTft::Default ()); - lena->ActivateEpsBearer (ueDevs2, bearer, LteTft::Default ()); + lteHelper->ActivateEpsBearer (ueDevs1, bearer, LteTft::Default ()); + lteHelper->ActivateEpsBearer (ueDevs2, bearer, LteTft::Default ()); Simulator::Stop (Seconds (0.5)); @@ -237,15 +237,15 @@ int main (int argc, char *argv[]) std::string ulOutFname = "UlRlcStats"; ulOutFname.append (tag.str ()); - lena->EnableMacTraces (); - lena->EnableRlcTraces (); + lteHelper->EnableMacTraces (); + lteHelper->EnableRlcTraces (); // keep track of all path loss values in a global object DownlinkGlobalPathlossDatabase dlPathlossDb; UplinkGlobalPathlossDatabase ulPathlossDb; - // we rely on the fact that LenaHelper creates the DL channel object first, then the UL channel object, + // we rely on the fact that LteHelper creates the DL channel object first, then the UL channel object, // hence the former will have index 0 and the latter 1 Config::Connect ("/ChannelList/0/PropagationLoss", MakeCallback (&DownlinkGlobalPathlossDatabase::UpdatePathloss, &dlPathlossDb)); diff --git a/src/lte/examples/lena-profiling.cc b/src/lte/examples/lena-profiling.cc index bff661964..11d99a5f4 100644 --- a/src/lte/examples/lena-profiling.cc +++ b/src/lte/examples/lena-profiling.cc @@ -66,18 +66,18 @@ main (int argc, char *argv[]) uint32_t nRooms = ceil (sqrt (nEnbPerFloor)); uint32_t nEnb; - Ptr < LenaHelper > lena = CreateObject (); - //lena->EnableLogComponents (); + Ptr < LteHelper > lteHelper = CreateObject (); + //lteHelper->EnableLogComponents (); //LogComponentEnable ("BuildingsPropagationLossModel", LOG_LEVEL_ALL); if (nFloors == 0) { - lena->SetAttribute("PathlossModel", + lteHelper->SetAttribute("PathlossModel", StringValue("ns3::FriisPropagationLossModel")); nEnb = nEnbPerFloor; } else { - lena->SetAttribute("PathlossModel", + lteHelper->SetAttribute("PathlossModel", StringValue("ns3::BuildingsPropagationLossModel")); nEnb = nFloors * nEnbPerFloor; } @@ -191,21 +191,21 @@ main (int argc, char *argv[]) // Create Devices and install them in the Nodes (eNB and UE) NetDeviceContainer enbDevs; vector < NetDeviceContainer > ueDevs; - enbDevs = lena->InstallEnbDevice(enbNodes); + enbDevs = lteHelper->InstallEnbDevice(enbNodes); for (uint32_t i = 0; i < nEnb; i++) { - NetDeviceContainer ueDev = lena->InstallUeDevice(ueNodes[i]); + NetDeviceContainer ueDev = lteHelper->InstallUeDevice(ueNodes[i]); ueDevs.push_back(ueDev); - lena->Attach(ueDev, enbDevs.Get(i)); + lteHelper->Attach(ueDev, enbDevs.Get(i)); enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE; EpsBearer bearer(q); - lena->ActivateEpsBearer(ueDev, bearer, LteTft::Default ()); + lteHelper->ActivateEpsBearer(ueDev, bearer, LteTft::Default ()); } Simulator::Stop(Seconds(simTime)); - lena->SetTraceDirectory(traceDirectory); - lena->EnableRlcTraces(); - lena->EnableMacTraces(); + lteHelper->SetTraceDirectory(traceDirectory); + lteHelper->EnableRlcTraces(); + lteHelper->EnableMacTraces(); Simulator::Run(); diff --git a/src/lte/examples/lena-rlc-traces.cc b/src/lte/examples/lena-rlc-traces.cc index 8aa1c54d7..89499e91f 100644 --- a/src/lte/examples/lena-rlc-traces.cc +++ b/src/lte/examples/lena-rlc-traces.cc @@ -41,12 +41,12 @@ int main (int argc, char *argv[]) // parse again so you can override default values from the command line cmd.Parse (argc, argv); - Ptr lena = CreateObject (); + Ptr lteHelper = CreateObject (); - lena->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel")); + lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel")); // Enable LTE log components - //lena->EnableLogComponents (); - lena->EnableRlcTraces(); + //lteHelper->EnableLogComponents (); + lteHelper->EnableRlcTraces(); // Create Nodes: eNodeB and UE NodeContainer enbNodes; @@ -64,21 +64,21 @@ int main (int argc, char *argv[]) // Create Devices and install them in the Nodes (eNB and UE) NetDeviceContainer enbDevs; NetDeviceContainer ueDevs; - enbDevs = lena->InstallEnbDevice (enbNodes); - ueDevs = lena->InstallUeDevice (ueNodes); + enbDevs = lteHelper->InstallEnbDevice (enbNodes); + ueDevs = lteHelper->InstallUeDevice (ueNodes); // Attach a UE to a eNB - lena->Attach (ueDevs, enbDevs.Get (0)); + lteHelper->Attach (ueDevs, enbDevs.Get (0)); // Activate an EPS bearer enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE; EpsBearer bearer (q); - lena->ActivateEpsBearer (ueDevs, bearer, LteTft::Default ()); + lteHelper->ActivateEpsBearer (ueDevs, bearer, LteTft::Default ()); Simulator::Stop (Seconds (2)); - lena->EnableMacTraces (); - lena->EnableRlcTraces (); + lteHelper->EnableMacTraces (); + lteHelper->EnableRlcTraces (); double distance_temp [] = { 10000,10000,10000}; diff --git a/src/lte/examples/lena-simple-epc.cc b/src/lte/examples/lena-simple-epc.cc index 0607b6d62..ff0445681 100644 --- a/src/lte/examples/lena-simple-epc.cc +++ b/src/lte/examples/lena-simple-epc.cc @@ -18,7 +18,7 @@ * Author: Jaume Nin */ -#include "ns3/lena-helper.h" +#include "ns3/lte-helper.h" #include "ns3/epc-helper.h" #include "ns3/core-module.h" #include "ns3/network-module.h" @@ -55,7 +55,7 @@ main (int argc, char *argv[]) cmd.AddValue("simTime", "Total duration of the simulation (in seconds)",simTime); cmd.Parse(argc, argv); - Ptr lteHelper = CreateObject (); + Ptr lteHelper = CreateObject (); Ptr epcHelper = CreateObject (); lteHelper->SetEpcHelper (epcHelper); lteHelper->SetSchedulerType("ns3::RrFfMacScheduler"); diff --git a/src/lte/examples/lena-simple.cc b/src/lte/examples/lena-simple.cc index ad27f0012..f07087b00 100644 --- a/src/lte/examples/lena-simple.cc +++ b/src/lte/examples/lena-simple.cc @@ -45,10 +45,10 @@ int main (int argc, char *argv[]) // Parse again so you can override default values from the command line cmd.Parse (argc, argv); - Ptr lena = CreateObject (); + Ptr lteHelper = CreateObject (); // Uncomment to enable logging - //lena->EnableLogComponents (); + //lteHelper->EnableLogComponents (); // Create Nodes: eNodeB and UE NodeContainer enbNodes; @@ -67,18 +67,18 @@ int main (int argc, char *argv[]) NetDeviceContainer enbDevs; NetDeviceContainer ueDevs; // Default scheduler is PF, uncomment to use RR - //lena->SetSchedulerType ("ns3::RrFfMacScheduler"); + //lteHelper->SetSchedulerType ("ns3::RrFfMacScheduler"); - enbDevs = lena->InstallEnbDevice (enbNodes); - ueDevs = lena->InstallUeDevice (ueNodes); + enbDevs = lteHelper->InstallEnbDevice (enbNodes); + ueDevs = lteHelper->InstallUeDevice (ueNodes); // Attach a UE to a eNB - lena->Attach (ueDevs, enbDevs.Get (0)); + lteHelper->Attach (ueDevs, enbDevs.Get (0)); // Activate an EPS bearer enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE; EpsBearer bearer (q); - lena->ActivateEpsBearer (ueDevs, bearer, LteTft::Default ()); + lteHelper->ActivateEpsBearer (ueDevs, bearer, LteTft::Default ()); Simulator::Stop (Seconds (0.005)); diff --git a/src/lte/helper/lena-helper.cc b/src/lte/helper/lte-helper.cc similarity index 92% rename from src/lte/helper/lena-helper.cc rename to src/lte/helper/lte-helper.cc index a0b7c5476..a937b28a6 100644 --- a/src/lte/helper/lena-helper.cc +++ b/src/lte/helper/lte-helper.cc @@ -20,7 +20,7 @@ */ -#include "lena-helper.h" +#include "lte-helper.h" #include #include #include @@ -49,20 +49,20 @@ #include -NS_LOG_COMPONENT_DEFINE ("LenaHelper"); +NS_LOG_COMPONENT_DEFINE ("LteHelper"); namespace ns3 { -NS_OBJECT_ENSURE_REGISTERED (LenaHelper); +NS_OBJECT_ENSURE_REGISTERED (LteHelper); -LenaHelper::LenaHelper (void) +LteHelper::LteHelper (void) { NS_LOG_FUNCTION (this); m_enbNetDeviceFactory.SetTypeId (LteEnbNetDevice::GetTypeId ()); } void -LenaHelper::DoStart (void) +LteHelper::DoStart (void) { NS_LOG_FUNCTION (this); m_downlinkChannel = CreateObject (); @@ -119,37 +119,37 @@ LenaHelper::DoStart (void) Object::DoStart (); } -LenaHelper::~LenaHelper (void) +LteHelper::~LteHelper (void) { NS_LOG_FUNCTION (this); } -TypeId LenaHelper::GetTypeId (void) +TypeId LteHelper::GetTypeId (void) { static TypeId tid = - TypeId ("ns3::LenaHelper") + TypeId ("ns3::LteHelper") .SetParent () - .AddConstructor () + .AddConstructor () .AddAttribute ("Scheduler", "The type of scheduler to be used for eNBs", StringValue ("ns3::PfFfMacScheduler"), - MakeStringAccessor (&LenaHelper::SetSchedulerType), + MakeStringAccessor (&LteHelper::SetSchedulerType), MakeStringChecker ()) .AddAttribute ("PathlossModel", "The type of pathloss model to be used", StringValue ("ns3::FriisPropagationLossModel"), - MakeStringAccessor (&LenaHelper::SetPathlossModelType), + MakeStringAccessor (&LteHelper::SetPathlossModelType), MakeStringChecker ()) .AddAttribute ("FadingModel", "The type of fading model to be used", StringValue (""), // fake module -> no fading - MakeStringAccessor (&LenaHelper::SetFadingModel), + MakeStringAccessor (&LteHelper::SetFadingModel), MakeStringChecker ()) .AddAttribute ("EpsBearerToRlcMapping", "Specify which type of RLC will be used for each type of EPS bearer. ", EnumValue (RLC_SM_ALWAYS), - MakeEnumAccessor (&LenaHelper::m_epsBearerToRlcMapping), + MakeEnumAccessor (&LteHelper::m_epsBearerToRlcMapping), MakeEnumChecker (RLC_SM_ALWAYS, "RlcSmAlways", RLC_UM_ALWAYS, "RlcUmAlways", RLC_AM_ALWAYS, "RlcAmAlways", @@ -159,7 +159,7 @@ TypeId LenaHelper::GetTypeId (void) } void -LenaHelper::DoDispose () +LteHelper::DoDispose () { NS_LOG_FUNCTION (this); m_downlinkChannel = 0; @@ -169,7 +169,7 @@ LenaHelper::DoDispose () void -LenaHelper::SetEpcHelper (Ptr h) +LteHelper::SetEpcHelper (Ptr h) { NS_LOG_FUNCTION (this << h); m_epcHelper = h; @@ -181,7 +181,7 @@ LenaHelper::SetEpcHelper (Ptr h) } void -LenaHelper::SetSchedulerType (std::string type) +LteHelper::SetSchedulerType (std::string type) { NS_LOG_FUNCTION (this << type); m_schedulerFactory = ObjectFactory (); @@ -189,7 +189,7 @@ LenaHelper::SetSchedulerType (std::string type) } void -LenaHelper::SetSchedulerAttribute (std::string n, const AttributeValue &v) +LteHelper::SetSchedulerAttribute (std::string n, const AttributeValue &v) { NS_LOG_FUNCTION (this << n); m_schedulerFactory.Set (n, v); @@ -197,7 +197,7 @@ LenaHelper::SetSchedulerAttribute (std::string n, const AttributeValue &v) void -LenaHelper::SetPathlossModelType (std::string type) +LteHelper::SetPathlossModelType (std::string type) { NS_LOG_FUNCTION (this << type); m_dlPathlossModelFactory = ObjectFactory (); @@ -207,7 +207,7 @@ LenaHelper::SetPathlossModelType (std::string type) } void -LenaHelper::SetPathlossModelAttribute (std::string n, const AttributeValue &v) +LteHelper::SetPathlossModelAttribute (std::string n, const AttributeValue &v) { NS_LOG_FUNCTION (this << n); m_dlPathlossModelFactory.Set (n, v); @@ -215,14 +215,14 @@ LenaHelper::SetPathlossModelAttribute (std::string n, const AttributeValue &v) } void -LenaHelper::SetEnbDeviceAttribute (std::string n, const AttributeValue &v) +LteHelper::SetEnbDeviceAttribute (std::string n, const AttributeValue &v) { NS_LOG_FUNCTION (this); m_enbNetDeviceFactory.Set (n, v); } void -LenaHelper::SetFadingModel (std::string type) +LteHelper::SetFadingModel (std::string type) { NS_LOG_FUNCTION (this << type); m_fadingModelType = type; @@ -234,14 +234,14 @@ LenaHelper::SetFadingModel (std::string type) } void -LenaHelper::SetFadingModelAttribute (std::string n, const AttributeValue &v) +LteHelper::SetFadingModelAttribute (std::string n, const AttributeValue &v) { m_fadingModelFactory.Set (n, v); } NetDeviceContainer -LenaHelper::InstallEnbDevice (NodeContainer c) +LteHelper::InstallEnbDevice (NodeContainer c) { NS_LOG_FUNCTION (this); Start (); // will run DoStart () if necessary @@ -256,7 +256,7 @@ LenaHelper::InstallEnbDevice (NodeContainer c) } NetDeviceContainer -LenaHelper::InstallUeDevice (NodeContainer c) +LteHelper::InstallUeDevice (NodeContainer c) { NS_LOG_FUNCTION (this); NetDeviceContainer devices; @@ -271,7 +271,7 @@ LenaHelper::InstallUeDevice (NodeContainer c) Ptr -LenaHelper::InstallSingleEnbDevice (Ptr n) +LteHelper::InstallSingleEnbDevice (Ptr n) { Ptr dlPhy = CreateObject (); Ptr ulPhy = CreateObject (); @@ -285,7 +285,7 @@ LenaHelper::InstallSingleEnbDevice (Ptr n) ulPhy->SetChannel (m_uplinkChannel); Ptr mm = n->GetObject (); - NS_ASSERT_MSG (mm, "MobilityModel needs to be set on node before calling LenaHelper::InstallUeDevice ()"); + NS_ASSERT_MSG (mm, "MobilityModel needs to be set on node before calling LteHelper::InstallUeDevice ()"); dlPhy->SetMobility (mm); ulPhy->SetMobility (mm); m_uplinkChannel->AddRx (ulPhy); @@ -354,7 +354,7 @@ LenaHelper::InstallSingleEnbDevice (Ptr n) } Ptr -LenaHelper::InstallSingleUeDevice (Ptr n) +LteHelper::InstallSingleUeDevice (Ptr n) { NS_LOG_FUNCTION (this); Ptr dlPhy = CreateObject (); @@ -369,7 +369,7 @@ LenaHelper::InstallSingleUeDevice (Ptr n) ulPhy->SetChannel (m_uplinkChannel); Ptr mm = n->GetObject (); - NS_ASSERT_MSG (mm, "MobilityModel needs to be set on node before calling LenaHelper::InstallUeDevice ()"); + NS_ASSERT_MSG (mm, "MobilityModel needs to be set on node before calling LteHelper::InstallUeDevice ()"); dlPhy->SetMobility (mm); ulPhy->SetMobility (mm); @@ -400,7 +400,7 @@ LenaHelper::InstallSingleUeDevice (Ptr n) void -LenaHelper::Attach (NetDeviceContainer ueDevices, Ptr enbDevice) +LteHelper::Attach (NetDeviceContainer ueDevices, Ptr enbDevice) { for (NetDeviceContainer::Iterator i = ueDevices.Begin (); i != ueDevices.End (); ++i) { @@ -409,7 +409,7 @@ LenaHelper::Attach (NetDeviceContainer ueDevices, Ptr enbDevice) } void -LenaHelper::Attach (Ptr ueDevice, Ptr enbDevice) +LteHelper::Attach (Ptr ueDevice, Ptr enbDevice) { // setup RRC connection Ptr enbRrc = enbDevice->GetObject ()->GetRrc (); @@ -452,7 +452,7 @@ LenaHelper::Attach (Ptr ueDevice, Ptr enbDevice) void -LenaHelper::ActivateEpsBearer (NetDeviceContainer ueDevices, EpsBearer bearer, Ptr tft) +LteHelper::ActivateEpsBearer (NetDeviceContainer ueDevices, EpsBearer bearer, Ptr tft) { for (NetDeviceContainer::Iterator i = ueDevices.Begin (); i != ueDevices.End (); ++i) { @@ -462,7 +462,7 @@ LenaHelper::ActivateEpsBearer (NetDeviceContainer ueDevices, EpsBearer bearer, P void -LenaHelper::ActivateEpsBearer (Ptr ueDevice, EpsBearer bearer, Ptr tft) +LteHelper::ActivateEpsBearer (Ptr ueDevice, EpsBearer bearer, Ptr tft) { NS_LOG_INFO (" setting up Radio Bearer"); Ptr enbDevice = ueDevice->GetObject ()->GetTargetEnb (); @@ -482,7 +482,7 @@ LenaHelper::ActivateEpsBearer (Ptr ueDevice, EpsBearer bearer, Ptr rlcStats, std::string path, } void -LenaHelper::EnableDlRlcTraces (void) +LteHelper::EnableDlRlcTraces (void) { NS_LOG_FUNCTION_NOARGS (); Config::Connect ("/NodeList/*/DeviceList/*/LteEnbRrc/UeMap/*/RadioBearerMap/*/LteRlc/TxPDU", @@ -824,7 +824,7 @@ DlSchedulingCallback (Ptr macStats, } void -LenaHelper::EnableUlRlcTraces (void) +LteHelper::EnableUlRlcTraces (void) { Config::Connect ("/NodeList/*/DeviceList/*/LteUeRrc/RadioBearerMap/*/LteRlc/TxPDU", MakeBoundCallback (&UlTxPduCallback, m_rlcStats)); @@ -833,7 +833,7 @@ LenaHelper::EnableUlRlcTraces (void) } void -LenaHelper::EnableMacTraces (void) +LteHelper::EnableMacTraces (void) { EnableDlMacTraces (); EnableUlMacTraces (); @@ -841,7 +841,7 @@ LenaHelper::EnableMacTraces (void) void -LenaHelper::EnableDlMacTraces (void) +LteHelper::EnableDlMacTraces (void) { Config::Connect ("/NodeList/*/DeviceList/*/LteEnbMac/DlScheduling", MakeBoundCallback (&DlSchedulingCallback, m_macStats)); @@ -881,14 +881,14 @@ UlSchedulingCallback (Ptr macStats, std::string path, } void -LenaHelper::EnableUlMacTraces (void) +LteHelper::EnableUlMacTraces (void) { Config::Connect ("/NodeList/*/DeviceList/*/LteEnbMac/UlScheduling", MakeBoundCallback (&UlSchedulingCallback, m_macStats)); } void -LenaHelper::SetTraceDirectory (std::string path) +LteHelper::SetTraceDirectory (std::string path) { m_macStats->SetDlOutputFilename(path + m_macStats->GetDlOutputFilename()); m_macStats->SetUlOutputFilename(path + m_macStats->GetUlOutputFilename()); @@ -897,20 +897,20 @@ LenaHelper::SetTraceDirectory (std::string path) } Ptr -LenaHelper::GetRlcStats (void) +LteHelper::GetRlcStats (void) { return m_rlcStats; } void -LenaHelper::EnablePdcpTraces (void) +LteHelper::EnablePdcpTraces (void) { EnableDlPdcpTraces (); EnableUlPdcpTraces (); } void -LenaHelper::EnableDlPdcpTraces (void) +LteHelper::EnableDlPdcpTraces (void) { NS_LOG_FUNCTION_NOARGS (); Config::Connect ("/NodeList/*/DeviceList/*/LteEnbRrc/UeMap/*/RadioBearerMap/*/LtePdcp/TxPDU", @@ -920,7 +920,7 @@ LenaHelper::EnableDlPdcpTraces (void) } void -LenaHelper::EnableUlPdcpTraces (void) +LteHelper::EnableUlPdcpTraces (void) { Config::Connect ("/NodeList/*/DeviceList/*/LteUeRrc/RadioBearerMap/*/LtePdcp/TxPDU", MakeBoundCallback (&UlTxPduCallback, m_pdcpStats)); @@ -929,7 +929,7 @@ LenaHelper::EnableUlPdcpTraces (void) } Ptr -LenaHelper::GetPdcpStats (void) +LteHelper::GetPdcpStats (void) { return m_pdcpStats; } diff --git a/src/lte/helper/lena-helper.h b/src/lte/helper/lte-helper.h similarity index 97% rename from src/lte/helper/lena-helper.h rename to src/lte/helper/lte-helper.h index a2ff8bc31..c07d8d7a5 100644 --- a/src/lte/helper/lena-helper.h +++ b/src/lte/helper/lte-helper.h @@ -18,8 +18,8 @@ * Author: Nicola Baldo */ -#ifndef LENA_HELPER_H -#define LENA_HELPER_H +#ifndef LTE_HELPER_H +#define LTE_HELPER_H #include #include @@ -48,11 +48,11 @@ class PropagationLossModel; * Creation and configuration of LTE entities * */ -class LenaHelper : public Object +class LteHelper : public Object { public: - LenaHelper (void); - virtual ~LenaHelper (void); + LteHelper (void); + virtual ~LteHelper (void); static TypeId GetTypeId (void); virtual void DoDispose (void); @@ -62,7 +62,7 @@ public: * 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 LenaHelper will default + * \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 @@ -299,4 +299,4 @@ private: -#endif // LENA_HELPER_H +#endif // LTE_HELPER_H diff --git a/src/lte/test/lte-test-fading.cc b/src/lte/test/lte-test-fading.cc index 0eece5fb5..082e538c8 100644 --- a/src/lte/test/lte-test-fading.cc +++ b/src/lte/test/lte-test-fading.cc @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include "ns3/string.h" #include "ns3/double.h" @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include #include "lte-test-sinr-chunk-processor.h" @@ -83,9 +83,9 @@ LteFadingTestSuite::LteFadingTestSuite () // NS_LOG_INFO ("Creating LteDownlinkSinrTestSuite"); - Ptr lena = CreateObject (); + Ptr lteHelper = CreateObject (); - lena->SetAttribute ("PathlossModel", StringValue ("ns3::BuildingsPropagationLossModel")); + lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::BuildingsPropagationLossModel")); // Create Nodes: eNodeB, home eNB, UE and home UE (UE attached to HeNB) NodeContainer enbNodes; @@ -109,15 +109,15 @@ LteFadingTestSuite::LteFadingTestSuite () NetDeviceContainer henbDevs; NetDeviceContainer ueDevs; NetDeviceContainer hueDevs; - enbDevs = lena->InstallEnbDevice (enbNodes); - ueDevs = lena->InstallUeDevice (ueNodes); - henbDevs = lena->InstallEnbDevice (henbNodes); - hueDevs = lena->InstallUeDevice (hueNodes); + enbDevs = lteHelper->InstallEnbDevice (enbNodes); + ueDevs = lteHelper->InstallUeDevice (ueNodes); + henbDevs = lteHelper->InstallEnbDevice (henbNodes); + hueDevs = lteHelper->InstallUeDevice (hueNodes); - lena->Attach (ueDevs, enbDevs.Get (0)); - lena->Attach (hueDevs, henbDevs.Get (0)); + lteHelper->Attach (ueDevs, enbDevs.Get (0)); + lteHelper->Attach (hueDevs, henbDevs.Get (0)); // Test #1 Okumura Hata Model (150 < freq < 1500 MHz) (Macro<->UE) @@ -239,7 +239,7 @@ LteFadingTestSuite::LteFadingTestSuite () /* // LogLevel logLevel = (LogLevel)(LOG_PREFIX_FUNC | LOG_PREFIX_TIME | LOG_LEVEL_ALL); // - // LogComponentEnable ("LenaHelper", logLevel); + // LogComponentEnable ("LteHelper", logLevel); LogComponentEnable ("LteShadowingTest", LOG_LEVEL_ALL); // LogComponentEnable ("BuildingsPropagationLossModel", logLevel); // LogComponentEnable ("LteInterference", logLevel); @@ -524,11 +524,11 @@ LteShadowingSystemTestCase::DoRun (void) LogComponentEnable ("BuildingsPropagationLossModel", LOG_LEVEL_ALL); - Ptr lena = CreateObject (); - lena->EnableLogComponents (); - lena->EnableMacTraces (); - lena->EnableRlcTraces (); - lena->SetAttribute ("PropagationModel", StringValue ("ns3::BuildingsPropagationLossModel")); + Ptr lteHelper = CreateObject (); + lteHelper->EnableLogComponents (); + lteHelper->EnableMacTraces (); + lteHelper->EnableRlcTraces (); + lteHelper->SetAttribute ("PropagationModel", StringValue ("ns3::BuildingsPropagationLossModel")); //Create Nodes: eNodeB and UE NodeContainer enbNodes; @@ -545,9 +545,9 @@ LteShadowingSystemTestCase::DoRun (void) // Create Devices and install them in the Nodes (eNB and UE) NetDeviceContainer enbDevs; NetDeviceContainer ueDevs; - lena->SetSchedulerType ("ns3::RrFfMacScheduler"); - enbDevs = lena->InstallEnbDevice (enbNodes); - ueDevs = lena->InstallUeDevice (ueNodes); + lteHelper->SetSchedulerType ("ns3::RrFfMacScheduler"); + enbDevs = lteHelper->InstallEnbDevice (enbNodes); + ueDevs = lteHelper->InstallUeDevice (ueNodes); Ptr mm_enb = enbNodes.Get (0)->GetObject (); mm_enb->SetPosition (Vector (0.0, 0.0, 30.0)); @@ -567,12 +567,12 @@ LteShadowingSystemTestCase::DoRun (void) uePhy->SetAttribute ("NoiseFigure", DoubleValue (9.0)); // Attach a UE to a eNB - lena->Attach (ueDevs, enbDevs.Get (0)); + lteHelper->Attach (ueDevs, enbDevs.Get (0)); // Activate an EPS bearer enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE; EpsBearer bearer (q); - lena->ActivateEpsBearer (ueDevs, bearer); + lteHelper->ActivateEpsBearer (ueDevs, bearer); // Use testing chunk processor in the PHY layer // It will be used to test that the SNR is as intended diff --git a/src/lte/test/lte-test-interference.cc b/src/lte/test/lte-test-interference.cc index fa8cd127e..fd3d0d527 100644 --- a/src/lte/test/lte-test-interference.cc +++ b/src/lte/test/lte-test-interference.cc @@ -25,7 +25,7 @@ #include "ns3/double.h" #include "ns3/mobility-helper.h" -#include "ns3/lena-helper.h" +#include "ns3/lte-helper.h" #include "ns3/lte-enb-phy.h" #include "ns3/lte-enb-net-device.h" @@ -112,11 +112,11 @@ LteInterferenceTestCase::~LteInterferenceTestCase () void LteInterferenceTestCase::DoRun (void) { - Ptr lena = CreateObject (); -// lena->EnableLogComponents (); - lena->EnableMacTraces (); - lena->EnableRlcTraces (); - lena->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel")); + Ptr lteHelper = CreateObject (); +// lteHelper->EnableLogComponents (); + lteHelper->EnableMacTraces (); + lteHelper->EnableRlcTraces (); + lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel")); // Create Nodes: eNodeB and UE NodeContainer enbNodes; @@ -149,19 +149,19 @@ LteInterferenceTestCase::DoRun (void) NetDeviceContainer enbDevs; NetDeviceContainer ueDevs1; NetDeviceContainer ueDevs2; - lena->SetSchedulerType ("ns3::RrFfMacScheduler"); - enbDevs = lena->InstallEnbDevice (enbNodes); - ueDevs1 = lena->InstallUeDevice (ueNodes1); - ueDevs2 = lena->InstallUeDevice (ueNodes2); + lteHelper->SetSchedulerType ("ns3::RrFfMacScheduler"); + enbDevs = lteHelper->InstallEnbDevice (enbNodes); + ueDevs1 = lteHelper->InstallUeDevice (ueNodes1); + ueDevs2 = lteHelper->InstallUeDevice (ueNodes2); - lena->Attach (ueDevs1, enbDevs.Get (0)); - lena->Attach (ueDevs2, enbDevs.Get (1)); + lteHelper->Attach (ueDevs1, enbDevs.Get (0)); + lteHelper->Attach (ueDevs2, enbDevs.Get (1)); // Activate an EPS bearer enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE; EpsBearer bearer (q); - lena->ActivateEpsBearer (ueDevs1, bearer, LteTft::Default ()); - lena->ActivateEpsBearer (ueDevs2, bearer, LteTft::Default ()); + lteHelper->ActivateEpsBearer (ueDevs1, bearer, LteTft::Default ()); + lteHelper->ActivateEpsBearer (ueDevs2, bearer, LteTft::Default ()); // Use testing chunk processor in the PHY layer // It will be used to test that the SNR is as intended diff --git a/src/lte/test/lte-test-link-adaptation.cc b/src/lte/test/lte-test-link-adaptation.cc index f28f5e5e1..7a2d16fd4 100644 --- a/src/lte/test/lte-test-link-adaptation.cc +++ b/src/lte/test/lte-test-link-adaptation.cc @@ -24,7 +24,7 @@ #include "ns3/double.h" #include "ns3/mobility-helper.h" -#include "ns3/lena-helper.h" +#include "ns3/lte-helper.h" #include "ns3/lte-ue-phy.h" #include "ns3/lte-ue-net-device.h" @@ -158,13 +158,13 @@ LteLinkAdaptationTestCase::DoRun (void) * Simulation Topology */ - Ptr lena = CreateObject (); -// lena->EnableLogComponents (); - lena->EnableMacTraces (); - lena->EnableRlcTraces (); - lena->SetAttribute ("PathlossModel", StringValue ("ns3::ConstantSpectrumPropagationLossModel")); + Ptr lteHelper = CreateObject (); +// lteHelper->EnableLogComponents (); + lteHelper->EnableMacTraces (); + lteHelper->EnableRlcTraces (); + lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::ConstantSpectrumPropagationLossModel")); NS_LOG_INFO ("SNR = " << m_snrDb << " LOSS = " << m_loss); - lena->SetPathlossModelAttribute ("Loss", DoubleValue (m_loss)); + lteHelper->SetPathlossModelAttribute ("Loss", DoubleValue (m_loss)); // Create Nodes: eNodeB and UE NodeContainer enbNodes; @@ -181,17 +181,17 @@ LteLinkAdaptationTestCase::DoRun (void) // Create Devices and install them in the Nodes (eNB and UE) NetDeviceContainer enbDevs; NetDeviceContainer ueDevs; - lena->SetSchedulerType ("ns3::RrFfMacScheduler"); - enbDevs = lena->InstallEnbDevice (enbNodes); - ueDevs = lena->InstallUeDevice (ueNodes); + lteHelper->SetSchedulerType ("ns3::RrFfMacScheduler"); + enbDevs = lteHelper->InstallEnbDevice (enbNodes); + ueDevs = lteHelper->InstallUeDevice (ueNodes); // Attach a UE to a eNB - lena->Attach (ueDevs, enbDevs.Get (0)); + lteHelper->Attach (ueDevs, enbDevs.Get (0)); // Activate the default EPS bearer enum EpsBearer::Qci q = EpsBearer::NGBR_VIDEO_TCP_DEFAULT; EpsBearer bearer (q); - lena->ActivateEpsBearer (ueDevs, bearer, LteTft::Default ()); + lteHelper->ActivateEpsBearer (ueDevs, bearer, LteTft::Default ()); // Use testing chunk processor in the PHY layer // It will be used to test that the SNR is as intended diff --git a/src/lte/test/lte-test-pathloss-model.cc b/src/lte/test/lte-test-pathloss-model.cc index 33b04563f..986b564e7 100644 --- a/src/lte/test/lte-test-pathloss-model.cc +++ b/src/lte/test/lte-test-pathloss-model.cc @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include "ns3/string.h" #include "ns3/double.h" @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include #include @@ -78,7 +78,7 @@ LtePathlossModelTestSuite::LtePathlossModelTestSuite () // LogLevel logLevel = (LogLevel)(LOG_PREFIX_FUNC | LOG_PREFIX_TIME | LOG_LEVEL_ALL); - // LogComponentEnable ("LenaHelper", logLevel); + // LogComponentEnable ("LteHelper", logLevel); // LogComponentEnable ("LtePathlossModelTest", logLevel); // LogComponentEnable ("BuildingsPropagationLossModel", logLevel); // LogComponentEnable ("LteInterference", logLevel); @@ -200,23 +200,23 @@ LtePathlossModelSystemTestCase::DoRun (void) // LogComponentEnable ("LteUePhy", LOG_LEVEL_ALL); // LogComponentEnable ("SingleModelSpectrumChannel", LOG_LEVEL_ALL); LogComponentEnable ("BuildingsPropagationLossModel", LOG_LEVEL_ALL); -// LogComponentEnable ("LenaHelper", LOG_LEVEL_ALL); +// LogComponentEnable ("LteHelper", LOG_LEVEL_ALL); // LogComponentDisable ("BuildingsPropagationLossModel", LOG_LEVEL_ALL); // - Ptr lena = CreateObject (); - // lena->EnableLogComponents (); - lena->EnableMacTraces (); - lena->EnableRlcTraces (); - lena->SetAttribute ("PathlossModel", StringValue ("ns3::BuildingsPropagationLossModel")); + Ptr lteHelper = CreateObject (); + // lteHelper->EnableLogComponents (); + lteHelper->EnableMacTraces (); + lteHelper->EnableRlcTraces (); + lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::BuildingsPropagationLossModel")); // set frequency. This is important because it changes the behavior of the pathloss model - lena->SetEnbDeviceAttribute ("DlEarfcn", UintegerValue (200)); + lteHelper->SetEnbDeviceAttribute ("DlEarfcn", UintegerValue (200)); // remove shadowing component - lena->SetPathlossModelAttribute ("ShadowSigmaOutdoor", DoubleValue (0.0)); - lena->SetPathlossModelAttribute ("ShadowSigmaIndoor", DoubleValue (0.0)); - lena->SetPathlossModelAttribute ("ShadowSigmaExtWalls", DoubleValue (0.0)); + lteHelper->SetPathlossModelAttribute ("ShadowSigmaOutdoor", DoubleValue (0.0)); + lteHelper->SetPathlossModelAttribute ("ShadowSigmaIndoor", DoubleValue (0.0)); + lteHelper->SetPathlossModelAttribute ("ShadowSigmaExtWalls", DoubleValue (0.0)); // Create Nodes: eNodeB and UE NodeContainer enbNodes; @@ -233,9 +233,9 @@ LtePathlossModelSystemTestCase::DoRun (void) // Create Devices and install them in the Nodes (eNB and UE) NetDeviceContainer enbDevs; NetDeviceContainer ueDevs; - lena->SetSchedulerType ("ns3::RrFfMacScheduler"); - enbDevs = lena->InstallEnbDevice (enbNodes); - ueDevs = lena->InstallUeDevice (ueNodes); + lteHelper->SetSchedulerType ("ns3::RrFfMacScheduler"); + enbDevs = lteHelper->InstallEnbDevice (enbNodes); + ueDevs = lteHelper->InstallUeDevice (ueNodes); Ptr mm_enb = enbNodes.Get (0)->GetObject (); mm_enb->SetPosition (Vector (0.0, 0.0, 30.0)); @@ -254,13 +254,13 @@ LtePathlossModelSystemTestCase::DoRun (void) // Attach a UE to a eNB - lena->Attach (ueDevs, enbDevs.Get (0)); + lteHelper->Attach (ueDevs, enbDevs.Get (0)); // Activate an EPS bearer enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE; EpsBearer bearer (q); - lena->ActivateEpsBearer (ueDevs, bearer, LteTft::Default ()); + lteHelper->ActivateEpsBearer (ueDevs, bearer, LteTft::Default ()); // Use testing chunk processor in the PHY layer // It will be used to test that the SNR is as intended diff --git a/src/lte/test/lte-test-pf-ff-mac-scheduler.cc b/src/lte/test/lte-test-pf-ff-mac-scheduler.cc index ccbba68d0..b8f417c38 100644 --- a/src/lte/test/lte-test-pf-ff-mac-scheduler.cc +++ b/src/lte/test/lte-test-pf-ff-mac-scheduler.cc @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include "ns3/string.h" #include "ns3/double.h" #include @@ -239,9 +239,9 @@ LenaPfFfMacSchedulerTestCase1::DoRun (void) * Initialize Simulation Scenario: 1 eNB and m_nUser UEs */ - Ptr lena = CreateObject (); + Ptr lteHelper = CreateObject (); - lena->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel")); + lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel")); // Create Nodes: eNodeB and UE NodeContainer enbNodes; @@ -259,17 +259,17 @@ LenaPfFfMacSchedulerTestCase1::DoRun (void) // Create Devices and install them in the Nodes (eNB and UE) NetDeviceContainer enbDevs; NetDeviceContainer ueDevs; - lena->SetSchedulerType ("ns3::PfFfMacScheduler"); - enbDevs = lena->InstallEnbDevice (enbNodes); - ueDevs = lena->InstallUeDevice (ueNodes); + lteHelper->SetSchedulerType ("ns3::PfFfMacScheduler"); + enbDevs = lteHelper->InstallEnbDevice (enbNodes); + ueDevs = lteHelper->InstallUeDevice (ueNodes); // Attach a UE to a eNB - lena->Attach (ueDevs, enbDevs.Get (0)); + lteHelper->Attach (ueDevs, enbDevs.Get (0)); // Activate an EPS bearer enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE; EpsBearer bearer (q); - lena->ActivateEpsBearer (ueDevs, bearer, LteTft::Default ()); + lteHelper->ActivateEpsBearer (ueDevs, bearer, LteTft::Default ()); Ptr lteEnbDev = enbDevs.Get (0)->GetObject (); Ptr enbPhy = lteEnbDev->GetPhy (); @@ -287,13 +287,13 @@ LenaPfFfMacSchedulerTestCase1::DoRun (void) uePhy->SetAttribute ("NoiseFigure", DoubleValue (9.0)); } - lena->EnableRlcTraces (); + lteHelper->EnableRlcTraces (); double simulationTime = 1.0; double tolerance = 0.1; Simulator::Stop (Seconds (simulationTime)); - Ptr rlcStats = lena->GetRlcStats (); + Ptr rlcStats = lteHelper->GetRlcStats (); rlcStats->SetAttribute ("EpochDuration", TimeValue (Seconds (simulationTime))); Simulator::Run (); @@ -420,9 +420,9 @@ LenaPfFfMacSchedulerTestCase2::DoRun (void) * Initialize Simulation Scenario: 1 eNB and m_nUser UEs */ - Ptr lena = CreateObject (); + Ptr lteHelper = CreateObject (); - lena->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel")); + lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel")); // Create Nodes: eNodeB and UE NodeContainer enbNodes; @@ -440,17 +440,17 @@ LenaPfFfMacSchedulerTestCase2::DoRun (void) // Create Devices and install them in the Nodes (eNB and UE) NetDeviceContainer enbDevs; NetDeviceContainer ueDevs; - lena->SetSchedulerType ("ns3::PfFfMacScheduler"); - enbDevs = lena->InstallEnbDevice (enbNodes); - ueDevs = lena->InstallUeDevice (ueNodes); + lteHelper->SetSchedulerType ("ns3::PfFfMacScheduler"); + enbDevs = lteHelper->InstallEnbDevice (enbNodes); + ueDevs = lteHelper->InstallUeDevice (ueNodes); // Attach a UE to a eNB - lena->Attach (ueDevs, enbDevs.Get (0)); + lteHelper->Attach (ueDevs, enbDevs.Get (0)); // Activate an EPS bearer enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE; EpsBearer bearer (q); - lena->ActivateEpsBearer (ueDevs, bearer, LteTft::Default ()); + lteHelper->ActivateEpsBearer (ueDevs, bearer, LteTft::Default ()); Ptr lteEnbDev = enbDevs.Get (0)->GetObject (); Ptr enbPhy = lteEnbDev->GetPhy (); @@ -468,13 +468,13 @@ LenaPfFfMacSchedulerTestCase2::DoRun (void) uePhy->SetAttribute ("NoiseFigure", DoubleValue (9.0)); } - lena->EnableRlcTraces (); + lteHelper->EnableRlcTraces (); double simulationTime = 0.4; double tolerance = 0.1; Simulator::Stop (Seconds (simulationTime)); - Ptr rlcStats = lena->GetRlcStats (); + Ptr rlcStats = lteHelper->GetRlcStats (); rlcStats->SetAttribute ("EpochDuration", TimeValue (Seconds (simulationTime))); Simulator::Run (); diff --git a/src/lte/test/lte-test-rr-ff-mac-scheduler.cc b/src/lte/test/lte-test-rr-ff-mac-scheduler.cc index f5467b662..52750f30a 100644 --- a/src/lte/test/lte-test-rr-ff-mac-scheduler.cc +++ b/src/lte/test/lte-test-rr-ff-mac-scheduler.cc @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include "ns3/string.h" #include "ns3/double.h" #include @@ -218,7 +218,7 @@ LenaRrFfMacSchedulerTestCase::DoRun (void) // LogComponentEnable ("RrFfMacScheduler", LOG_LEVEL_ALL); // LogComponentEnable ("LenaTestRrFfMacCheduler", LOG_LEVEL_ALL); -// LogComponentEnable ("LenaHelper", LOG_LEVEL_ALL); +// LogComponentEnable ("LteHelper", LOG_LEVEL_ALL); // LogComponentEnable ("RlcStatsCalculator", LOG_LEVEL_ALL); @@ -227,9 +227,9 @@ LenaRrFfMacSchedulerTestCase::DoRun (void) */ - Ptr lena = CreateObject (); + Ptr lteHelper = CreateObject (); - lena->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel")); + lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel")); // Create Nodes: eNodeB and UE NodeContainer enbNodes; @@ -247,17 +247,17 @@ LenaRrFfMacSchedulerTestCase::DoRun (void) // Create Devices and install them in the Nodes (eNB and UE) NetDeviceContainer enbDevs; NetDeviceContainer ueDevs; - lena->SetSchedulerType ("ns3::RrFfMacScheduler"); - enbDevs = lena->InstallEnbDevice (enbNodes); - ueDevs = lena->InstallUeDevice (ueNodes); + lteHelper->SetSchedulerType ("ns3::RrFfMacScheduler"); + enbDevs = lteHelper->InstallEnbDevice (enbNodes); + ueDevs = lteHelper->InstallUeDevice (ueNodes); // Attach a UE to a eNB - lena->Attach (ueDevs, enbDevs.Get (0)); + lteHelper->Attach (ueDevs, enbDevs.Get (0)); // Activate an EPS bearer enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE; EpsBearer bearer (q); - lena->ActivateEpsBearer (ueDevs, bearer, LteTft::Default ()); + lteHelper->ActivateEpsBearer (ueDevs, bearer, LteTft::Default ()); Ptr lteEnbDev = enbDevs.Get (0)->GetObject (); @@ -276,12 +276,12 @@ LenaRrFfMacSchedulerTestCase::DoRun (void) uePhy->SetAttribute ("NoiseFigure", DoubleValue (9.0)); } - lena->EnableRlcTraces (); + lteHelper->EnableRlcTraces (); double simulationTime = 0.4; double tolerance = 0.1; Simulator::Stop (Seconds (simulationTime)); - Ptr rlcStats = lena->GetRlcStats (); + Ptr rlcStats = lteHelper->GetRlcStats (); rlcStats->SetAttribute ("EpochDuration", TimeValue (Seconds (simulationTime))); diff --git a/src/lte/test/test-lte-epc-e2e-data.cc b/src/lte/test/test-lte-epc-e2e-data.cc index 9bcfcf98a..98294b505 100644 --- a/src/lte/test/test-lte-epc-e2e-data.cc +++ b/src/lte/test/test-lte-epc-e2e-data.cc @@ -23,7 +23,7 @@ #include "ns3/simulator.h" #include "ns3/log.h" #include "ns3/test.h" -#include "ns3/lena-helper.h" +#include "ns3/lte-helper.h" #include "ns3/epc-helper.h" #include "ns3/packet-sink-helper.h" #include "ns3/udp-client-server-helper.h" @@ -107,7 +107,7 @@ void LteEpcE2eDataTestCase::DoRun () { - Ptr lteHelper = CreateObject (); + Ptr lteHelper = CreateObject (); Ptr epcHelper = CreateObject (); lteHelper->SetEpcHelper (epcHelper); diff --git a/src/lte/wscript b/src/lte/wscript index 47194d7f2..2ed6f112e 100644 --- a/src/lte/wscript +++ b/src/lte/wscript @@ -32,7 +32,7 @@ def build(bld): 'model/lte-enb-net-device.cc', 'model/lte-ue-net-device.cc', 'model/ideal-control-messages.cc', - 'helper/lena-helper.cc', + 'helper/lte-helper.cc', 'helper/gtpu-tunnel-helper.cc', 'helper/lte-stats-calculator.cc', 'helper/epc-helper.cc', @@ -118,7 +118,7 @@ def build(bld): 'model/lte-enb-net-device.h', 'model/lte-ue-net-device.h', 'model/ideal-control-messages.h', - 'helper/lena-helper.h', + 'helper/lte-helper.h', 'helper/gtpu-tunnel-helper.h', 'helper/lte-stats-calculator.h', 'helper/epc-helper.h',