renamed LenaHelper --> LteHelper

This commit is contained in:
Nicola Baldo
2011-12-05 21:13:53 +01:00
parent 91ab4937a7
commit 744f8bc2b1
20 changed files with 266 additions and 266 deletions

View File

@@ -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

View File

@@ -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<LenaHelper> lena = CreateObject<LenaHelper> ();
Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
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<LenaHelper> lena = CreateObject<LenaHelper> ();
Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
// 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<LenaHelper> lena = CreateObject<LenaHelper> ();
lena->SetFadingModel("ns3::TraceFadingLossModel");
Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
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<LenaHelper> lena = CreateObject<LenaHelper> ();
Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
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<BuildingsMobilityModel> mm = enbNodes.Get (0)->GetObject<BuildingsMobilityModel> ();
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<LenaHelper> lena = CreateObject<LenaHelper> ();
Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
Ptr<EpcHelper> epcHelper = CreateObject<EpcHelper> ();
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.

View File

@@ -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<LenaHelper> lena = CreateObject<LenaHelper> ();
lena->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel"));
Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
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));

View File

@@ -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<LenaHelper> lena = CreateObject<LenaHelper> ();
Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
// 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));

View File

@@ -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<LenaHelper> lena = CreateObject<LenaHelper> ();
Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
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 ();

View File

@@ -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<LenaHelper> lena = CreateObject<LenaHelper> ();
Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
// 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));

View File

@@ -66,18 +66,18 @@ main (int argc, char *argv[])
uint32_t nRooms = ceil (sqrt (nEnbPerFloor));
uint32_t nEnb;
Ptr < LenaHelper > lena = CreateObject<LenaHelper> ();
//lena->EnableLogComponents ();
Ptr < LteHelper > lteHelper = CreateObject<LteHelper> ();
//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();

View File

@@ -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<LenaHelper> lena = CreateObject<LenaHelper> ();
Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
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};

View File

@@ -18,7 +18,7 @@
* Author: Jaume Nin <jaume.nin@cttc.cat>
*/
#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<LenaHelper> lteHelper = CreateObject<LenaHelper> ();
Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
Ptr<EpcHelper> epcHelper = CreateObject<EpcHelper> ();
lteHelper->SetEpcHelper (epcHelper);
lteHelper->SetSchedulerType("ns3::RrFfMacScheduler");

View File

@@ -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<LenaHelper> lena = CreateObject<LenaHelper> ();
Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
// 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));

View File

@@ -20,7 +20,7 @@
*/
#include "lena-helper.h"
#include "lte-helper.h"
#include <ns3/string.h>
#include <ns3/log.h>
#include <ns3/abort.h>
@@ -49,20 +49,20 @@
#include <ns3/lte-spectrum-value-helper.h>
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<SingleModelSpectrumChannel> ();
@@ -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<Object> ()
.AddConstructor<LenaHelper> ()
.AddConstructor<LteHelper> ()
.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<EpcHelper> h)
LteHelper::SetEpcHelper (Ptr<EpcHelper> h)
{
NS_LOG_FUNCTION (this << h);
m_epcHelper = h;
@@ -181,7 +181,7 @@ LenaHelper::SetEpcHelper (Ptr<EpcHelper> 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<NetDevice>
LenaHelper::InstallSingleEnbDevice (Ptr<Node> n)
LteHelper::InstallSingleEnbDevice (Ptr<Node> n)
{
Ptr<LteSpectrumPhy> dlPhy = CreateObject<LteSpectrumPhy> ();
Ptr<LteSpectrumPhy> ulPhy = CreateObject<LteSpectrumPhy> ();
@@ -285,7 +285,7 @@ LenaHelper::InstallSingleEnbDevice (Ptr<Node> n)
ulPhy->SetChannel (m_uplinkChannel);
Ptr<MobilityModel> mm = n->GetObject<MobilityModel> ();
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<Node> n)
}
Ptr<NetDevice>
LenaHelper::InstallSingleUeDevice (Ptr<Node> n)
LteHelper::InstallSingleUeDevice (Ptr<Node> n)
{
NS_LOG_FUNCTION (this);
Ptr<LteSpectrumPhy> dlPhy = CreateObject<LteSpectrumPhy> ();
@@ -369,7 +369,7 @@ LenaHelper::InstallSingleUeDevice (Ptr<Node> n)
ulPhy->SetChannel (m_uplinkChannel);
Ptr<MobilityModel> mm = n->GetObject<MobilityModel> ();
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<Node> n)
void
LenaHelper::Attach (NetDeviceContainer ueDevices, Ptr<NetDevice> enbDevice)
LteHelper::Attach (NetDeviceContainer ueDevices, Ptr<NetDevice> enbDevice)
{
for (NetDeviceContainer::Iterator i = ueDevices.Begin (); i != ueDevices.End (); ++i)
{
@@ -409,7 +409,7 @@ LenaHelper::Attach (NetDeviceContainer ueDevices, Ptr<NetDevice> enbDevice)
}
void
LenaHelper::Attach (Ptr<NetDevice> ueDevice, Ptr<NetDevice> enbDevice)
LteHelper::Attach (Ptr<NetDevice> ueDevice, Ptr<NetDevice> enbDevice)
{
// setup RRC connection
Ptr<LteEnbRrc> enbRrc = enbDevice->GetObject<LteEnbNetDevice> ()->GetRrc ();
@@ -452,7 +452,7 @@ LenaHelper::Attach (Ptr<NetDevice> ueDevice, Ptr<NetDevice> enbDevice)
void
LenaHelper::ActivateEpsBearer (NetDeviceContainer ueDevices, EpsBearer bearer, Ptr<LteTft> tft)
LteHelper::ActivateEpsBearer (NetDeviceContainer ueDevices, EpsBearer bearer, Ptr<LteTft> 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<NetDevice> ueDevice, EpsBearer bearer, Ptr<LteTft> tft)
LteHelper::ActivateEpsBearer (Ptr<NetDevice> ueDevice, EpsBearer bearer, Ptr<LteTft> tft)
{
NS_LOG_INFO (" setting up Radio Bearer");
Ptr<LteEnbNetDevice> enbDevice = ueDevice->GetObject<LteUeNetDevice> ()->GetTargetEnb ();
@@ -482,7 +482,7 @@ LenaHelper::ActivateEpsBearer (Ptr<NetDevice> ueDevice, EpsBearer bearer, Ptr<Lt
}
TypeId
LenaHelper::GetRlcType (EpsBearer bearer)
LteHelper::GetRlcType (EpsBearer bearer)
{
switch (m_epsBearerToRlcMapping)
{
@@ -516,9 +516,9 @@ LenaHelper::GetRlcType (EpsBearer bearer)
}
void
LenaHelper::EnableLogComponents (void)
LteHelper::EnableLogComponents (void)
{
LogComponentEnable ("LenaHelper", LOG_LEVEL_ALL);
LogComponentEnable ("LteHelper", LOG_LEVEL_ALL);
LogComponentEnable ("LteEnbRrc", LOG_LEVEL_ALL);
LogComponentEnable ("LteUeRrc", LOG_LEVEL_ALL);
LogComponentEnable ("LteEnbMac", LOG_LEVEL_ALL);
@@ -573,7 +573,7 @@ LenaHelper::EnableLogComponents (void)
}
void
LenaHelper::EnableTraces (void)
LteHelper::EnableTraces (void)
{
EnableMacTraces ();
EnableRlcTraces ();
@@ -581,7 +581,7 @@ LenaHelper::EnableTraces (void)
}
void
LenaHelper::EnableRlcTraces (void)
LteHelper::EnableRlcTraces (void)
{
EnableDlRlcTraces ();
EnableUlRlcTraces ();
@@ -733,7 +733,7 @@ DlRxPduCallback (Ptr<RlcStatsCalculator> 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<MacStatsCalculator> 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<MacStatsCalculator> 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<RlcStatsCalculator>
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<RlcStatsCalculator>
LenaHelper::GetPdcpStats (void)
LteHelper::GetPdcpStats (void)
{
return m_pdcpStats;
}

View File

@@ -18,8 +18,8 @@
* Author: Nicola Baldo <nbaldo@cttc.es>
*/
#ifndef LENA_HELPER_H
#define LENA_HELPER_H
#ifndef LTE_HELPER_H
#define LTE_HELPER_H
#include <ns3/config.h>
#include <ns3/simulator.h>
@@ -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

View File

@@ -32,7 +32,7 @@
#include <ns3/buildings-propagation-loss-model.h>
#include <ns3/node-container.h>
#include <ns3/mobility-helper.h>
#include <ns3/lena-helper.h>
#include <ns3/lte-helper.h>
#include <ns3/single-model-spectrum-channel.h>
#include "ns3/string.h"
#include "ns3/double.h"
@@ -42,7 +42,7 @@
#include <ns3/lte-ue-net-device.h>
#include <ns3/lte-enb-net-device.h>
#include <ns3/lte-ue-rrc.h>
#include <ns3/lena-helper.h>
#include <ns3/lte-helper.h>
#include <ns3/lte-enb-phy.h>
#include <ns3/lte-ue-phy.h>
#include "lte-test-sinr-chunk-processor.h"
@@ -83,9 +83,9 @@ LteFadingTestSuite::LteFadingTestSuite ()
// NS_LOG_INFO ("Creating LteDownlinkSinrTestSuite");
Ptr<LenaHelper> lena = CreateObject<LenaHelper> ();
Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
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<LenaHelper> lena = CreateObject<LenaHelper> ();
lena->EnableLogComponents ();
lena->EnableMacTraces ();
lena->EnableRlcTraces ();
lena->SetAttribute ("PropagationModel", StringValue ("ns3::BuildingsPropagationLossModel"));
Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
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<BuildingsMobilityModel> mm_enb = enbNodes.Get (0)->GetObject<BuildingsMobilityModel> ();
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

View File

@@ -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<LenaHelper> lena = CreateObject<LenaHelper> ();
// lena->EnableLogComponents ();
lena->EnableMacTraces ();
lena->EnableRlcTraces ();
lena->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel"));
Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
// 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

View File

@@ -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<LenaHelper> lena = CreateObject<LenaHelper> ();
// lena->EnableLogComponents ();
lena->EnableMacTraces ();
lena->EnableRlcTraces ();
lena->SetAttribute ("PathlossModel", StringValue ("ns3::ConstantSpectrumPropagationLossModel"));
Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
// 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

View File

@@ -32,7 +32,7 @@
#include <ns3/buildings-propagation-loss-model.h>
#include <ns3/node-container.h>
#include <ns3/mobility-helper.h>
#include <ns3/lena-helper.h>
#include <ns3/lte-helper.h>
#include <ns3/single-model-spectrum-channel.h>
#include "ns3/string.h"
#include "ns3/double.h"
@@ -42,7 +42,7 @@
#include <ns3/lte-ue-net-device.h>
#include <ns3/lte-enb-net-device.h>
#include <ns3/lte-ue-rrc.h>
#include <ns3/lena-helper.h>
#include <ns3/lte-helper.h>
#include <ns3/lte-enb-phy.h>
#include <ns3/lte-ue-phy.h>
#include <ns3/lte-test-sinr-chunk-processor.h>
@@ -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<LenaHelper> lena = CreateObject<LenaHelper> ();
// lena->EnableLogComponents ();
lena->EnableMacTraces ();
lena->EnableRlcTraces ();
lena->SetAttribute ("PathlossModel", StringValue ("ns3::BuildingsPropagationLossModel"));
Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
// 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<BuildingsMobilityModel> mm_enb = enbNodes.Get (0)->GetObject<BuildingsMobilityModel> ();
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

View File

@@ -41,7 +41,7 @@
#include <ns3/lte-ue-net-device.h>
#include <ns3/lte-enb-net-device.h>
#include <ns3/lte-ue-rrc.h>
#include <ns3/lena-helper.h>
#include <ns3/lte-helper.h>
#include "ns3/string.h"
#include "ns3/double.h"
#include <ns3/lte-enb-phy.h>
@@ -239,9 +239,9 @@ LenaPfFfMacSchedulerTestCase1::DoRun (void)
* Initialize Simulation Scenario: 1 eNB and m_nUser UEs
*/
Ptr<LenaHelper> lena = CreateObject<LenaHelper> ();
Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
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<LteEnbNetDevice> lteEnbDev = enbDevs.Get (0)->GetObject<LteEnbNetDevice> ();
Ptr<LteEnbPhy> 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<RlcStatsCalculator> rlcStats = lena->GetRlcStats ();
Ptr<RlcStatsCalculator> 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<LenaHelper> lena = CreateObject<LenaHelper> ();
Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
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<LteEnbNetDevice> lteEnbDev = enbDevs.Get (0)->GetObject<LteEnbNetDevice> ();
Ptr<LteEnbPhy> 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<RlcStatsCalculator> rlcStats = lena->GetRlcStats ();
Ptr<RlcStatsCalculator> rlcStats = lteHelper->GetRlcStats ();
rlcStats->SetAttribute ("EpochDuration", TimeValue (Seconds (simulationTime)));
Simulator::Run ();

View File

@@ -37,7 +37,7 @@
#include <ns3/lte-ue-net-device.h>
#include <ns3/lte-enb-net-device.h>
#include <ns3/lte-ue-rrc.h>
#include <ns3/lena-helper.h>
#include <ns3/lte-helper.h>
#include "ns3/string.h"
#include "ns3/double.h"
#include <ns3/lte-enb-phy.h>
@@ -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<LenaHelper> lena = CreateObject<LenaHelper> ();
Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
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<LteEnbNetDevice> lteEnbDev = enbDevs.Get (0)->GetObject<LteEnbNetDevice> ();
@@ -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<RlcStatsCalculator> rlcStats = lena->GetRlcStats ();
Ptr<RlcStatsCalculator> rlcStats = lteHelper->GetRlcStats ();
rlcStats->SetAttribute ("EpochDuration", TimeValue (Seconds (simulationTime)));

View File

@@ -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<LenaHelper> lteHelper = CreateObject<LenaHelper> ();
Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
Ptr<EpcHelper> epcHelper = CreateObject<EpcHelper> ();
lteHelper->SetEpcHelper (epcHelper);

View File

@@ -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',