This commit is contained in:
Manuel Requena
2011-12-07 10:20:32 +01:00
52 changed files with 715 additions and 635 deletions

View File

@@ -1,5 +1,6 @@
EPSTOPDF = epstopdf
DIA = dia
SEQDIAG = seqdiag
CONVERT = convert -density 250
@@ -38,8 +39,7 @@ GRAPHS_EPS = \
$(FIGURES)/epc-data-flow-dl.eps \
$(FIGURES)/epc-data-flow-ul.eps \
$(FIGURES)/lte-arch-data-rrc-pdcp-rlc.eps \
$(FIGURES)/lte-epc-e2e-data-protocol-stack.eps
$(FIGURES)/lte-epc-e2e-data-protocol-stack.eps
# rescale pdf figures as necessary
@@ -54,9 +54,18 @@ $(FIGURES)/internet-node-recv.pdf_width = 5in
$(FIGURES)/routing.pdf_width = 6in
$(FIGURES)/routing-specialization.pdf_width = 5in
$(FIGURES)/snir.pdf_width = 3in
$(FIGURES)/lte-transmission.pdf_width = 3in
$(FIGURES)/auvmobility-classes.pdf_width = 10cm
$(FIGURES)/lte-interference-test-scenario.pdf_width = 4in
$(FIGURES)/lte-interference-test-scenario.pdf_width = 3in
$(FIGURES)/epc-topology.pdf_width = 4in
$(FIGURES)/lte-arch-data-rrc-pdcp-rlc.pdf_width = 3in
$(FIGURES)/lte-epc-e2e-data-protocol-stack.pdf_width = 15cm
$(FIGURES)/ff-mac-saps.pdf_width = 2in
$(FIGURES)/ff-example.pdf_width = 3in
$(FIGURES)/lte-rlc-implementation-model.pdf_width = 12in
$(FIGURES)/lte-rlc-data-txon-dl.pdf_width = 10cm
$(FIGURES)/lte-rlc-data-txon-ul.pdf_width = 10cm
$(FIGURES)/lte-rlc-data-retx-ul.pdf_width = 10cm
$(FIGURES)/phy.pdf_width = 12cm
IMAGES_PNG = ${IMAGES_EPS:.eps=.png}
@@ -67,13 +76,17 @@ IMAGES_OTHER = $(FIGURES)/fading_pedestrian.png \
$(FIGURES)/fading_urban_3kmph.png \
$(FIGURES)/fading_pedestrian.pdf \
$(FIGURES)/fading_vehicular.pdf \
$(FIGURES)/fading_urban_3kmph.pdf
$(FIGURES)/fading_urban_3kmph.pdf \
$(FIGURES)/phy.png \
$(FIGURES)/phy.pdf
IMAGES = $(IMAGES_EPS) $(IMAGES_PNG) $(IMAGES_PDF) $(IMAGES_OTHER)
%.eps : %.dia; $(DIA) -t eps $< -e $@
%.png : %.dia; $(DIA) -t png $< -e $@
%.png : %.seqdiag; $(SEQDIAG) -Tpng -o $@ $<
%.png : %.eps; $(CONVERT) $< $@
%.pdf : %.seqdiag; $(SEQDIAG) -Tpdf -o $@ $< ; if test x$($@_width) != x; then TMPFILE=`mktemp`; ./rescale-pdf.sh $($@_width) $@ $${TMPFILE} && mv $${TMPFILE} $@; fi
%.pdf : %.eps; $(EPSTOPDF) $< -o=$@; if test x$($@_width) != x; then TMPFILE=`mktemp`; ./rescale-pdf.sh $($@_width) $@ $${TMPFILE} && mv $${TMPFILE} $@; fi
GRAPHS_PNG = ${GRAPHS_EPS:.eps=.png}

View File

@@ -49,9 +49,9 @@ copyright = u'2011, CTTC'
# built documents.
#
# The short X.Y version.
version = '2011-11-04'
version = 'M4'
# The full version, including alpha/beta/rc tags.
version = '2011-11-04'
release = 'M4'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

View File

@@ -2,17 +2,17 @@
diagram {
LenaHelper => EpcHelper [label="AddEnb"] {
LteHelper => EpcHelper [label="AddEnb"] {
EpcHelper -> EpcHelper [label="create EpcEnbApplication"];
EpcHelper -> EpcHelper [label="Setup S1 link"];
EpcHelper => EpcSgwPgwApplication [label="AddEnb (enbIpv4Address)"];
}
LenaHelper => LteUeRrc [label="GetRnti", return="RNTI"]
LenaHelper => LteEnbRrc [label="SetupRadioBearer", return="LCID"]
LteHelper => LteUeRrc [label="GetRnti", return="RNTI"]
LteHelper => LteEnbRrc [label="SetupRadioBearer", return="LCID"]
LenaHelper => EpcHelper [label="ActivateEpsBearer(UE IP, eNB IP, TFT, RNTI, LCID)"] {
LteHelper => EpcHelper [label="ActivateEpsBearer(UE IP, eNB IP, TFT, RNTI, LCID)"] {
EpcHelper => EpcSgwPgwApplication [label="ActivateS1Bearer (UE IP, eNB IP, TFT)", return="TEID"] {
EpcSgwPgwApplication => EpcSgwPgwApplication [label="Store UE IP<->eNB IP mapping"];
EpcSgwPgwApplication => EpcSgwPgwApplication [label="Create GTP-U tunnel endpoint"];

View File

@@ -1,3 +1,6 @@
.. orphan::
.. only:: html or latex
ns-3 LTE module documentation

View File

@@ -255,6 +255,9 @@ are present.
.. figure:: figures/lte-epc-e2e-data-protocol-stack.*
:align: center
LTE-EPC data plane protocol stack
From the figure, it is evident that there are two different layers of
IP networking. The first one is the end-to-end layer, which provides end-to-end
connectivity to the users; this layers involves the UEs, the PGW and
@@ -350,6 +353,7 @@ The case of the downlink is depicted in Figure :ref:`fig-epc-data-flow-dl`.
Data flow in the uplink between the UE and the internet
Uplink IP packets are generated by a generic application inside the UE
and forwarded the local TCP/IP stack to the LteUeNetDevice of the
UE. The LteUeNetDevice then performs the following operations:
@@ -477,6 +481,7 @@ used within the eNB.
.. figure:: figures/ff-example.*
:align: center
The User side of both the CSCHED SAP and the SCHED SAP are
implemented within the eNB MAC, i.e., in the file ``lte-enb-mac.cc``.
The eNB MAC can be used with different scheduler implementations without
@@ -643,7 +648,7 @@ respect to the 3GPP specifications. In particular, a simulator-specific class (P
MAC SDUs in order to achieve the simulator's equivalent of a TB,
without the corresponding implementation complexity.
The multiplexing of different logical channels to and from the RLC
layer is performed using a dedicated packet tag (LteMacTag), which
layer is performed using a dedicated packet tag (LteRadioBearerTag), which
performs a functionality which is partially equivalent to that of the
MAC headers specified by 3GPP.
@@ -769,10 +774,15 @@ Interference Model
The PHY model is based on the well-known Gaussian interference models, according to which the powers of interfering signals (in linear units) are summed up together to determine the overall interference power.
The following diagram shows how interfering signals are processed to calculate the SINR, and how SINR is then used for the generation of CQI feedback.
The sequence diagram of Figure :ref:`fig-phy` shows how interfering signals are processed to calculate the SINR, and how SINR is then used for the generation of CQI feedback.
.. seqdiag:: phy.seqdiag
.. _fig-phy:
.. figure:: figures/phy.*
:align: center
Sequence diagram of the PHY interference calculation procedure
@@ -919,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

@@ -1,11 +1,6 @@
.. include:: replace.txt
+++++++++++++++++++++++++++++++++
References
+++++++++++++++++++++++++++++++++
.. [Sesia2009] S. Sesia, I. Toufik and M. Baker, "LTE - The UMTS Long Term Evolution - from theory to practice",
Wiley, 2009

View File

@@ -1,4 +1,3 @@
.. include:: replace.txt
@@ -11,14 +10,19 @@ The RLC entities provide the RLC service interface to upper PDCP layer and the M
to lower MAC layer. The RLC entities use the PDCP service interface from upper PDCP layer and
the MAC service interface from lower MAC layer.
Figure :ref:`lte-rlc-implementation-model` shows the implementation model of the RLC entities and its relationship
Figure :ref:`fig-lte-rlc-implementation-model` shows the implementation model of the RLC entities and its relationship
with all the other entities and services in the protocol stack.
.. _fig-lte-rlc-implementation-model:
.. figure:: figures/lte-rlc-implementation-model.*
:width: 300pt
Implementation Model of PDCP, RLC and MAC entities and SAPs
Service Interfaces
++++++++++++++++++

View File

@@ -98,6 +98,26 @@ tolerance of :math:`10^{-7}` which, as for the downlink SINR test,
deals with floating point arithmetic approximation issues.
E-UTRA Absolute Radio Frequency Channel Number (EARFCN)
-------------------------------------------------------
The test suite ``lte-earfcn`` checks that the carrier frequency used
by the LteSpectrumValueHelper class (which implements the LTE spectrum
model) is done in compliance with [TS36.101]_, where the E-UTRA
Absolute Radio Frequency Channel Number (EARFCN) is defined. The test
vector for this test suite comprises a set of EARFCN values and the
corresponding carrier frequency calculated by hand following the
specification of [TS36.101]_. The test passes if the carrier frequency
returned by LteSpectrumValueHelper is the same as the known value for
each element in the test vector.
System Tests
~~~~~~~~~~~~
@@ -331,45 +351,53 @@ more resources to the users that use a higher MCS index.
Building Propagation Loss Model
-------------------------------
The aim of the system test is to verify the integration of the BuildingPathlossModel with the lte module. The test exploits a set of three pre calculated losses for generating the expected SINR at the receiver counting the transmission and the noise powers. These SINR values are compared with the results obtained from a lte simulation. The losses are calculated off-line with an Octave script (/test/reference/lte_pathloss.m).
The aim of the system test is to verify the integration of the
BuildingPathlossModel with the lte module. The test exploits a set of
three pre calculated losses for generating the expected SINR at the
receiver counting the transmission and the noise powers. These SINR
values are compared with the results obtained from a LTE
simulation that uses the BuildingPathlossModel. The reference loss values are
calculated off-line with an Octave script
(/test/reference/lte_pathloss.m). Each test case passes if the
reference loss value is equal to the value calculated by the simulator
within a tolerance of :math:`0.001` dB, which accouns for numerical
errors in the calculations.
RLC
---
RLC UM tests
------------
Two test suites ``lte-rlc-um-transmitter`` and
``lte-rlc-am-transmitter`` check that the RLC/UM and the RLC/AM
implementation work correctly. Both these suites work by testing RLC
instances connected to special test entities that play the role of the
MAC and of the PDCP, implementing respectively the LteMacSapProvider
and LteRlcSapUser interfaces. Different test cases (i.e., input test
vector consisting of series of primitive calls by the MAC and the
PDCP) are provided that check the behavior in the following cases:
A suite of unit tests validate the RLC UM implementation in
isolation. The following tests have been implemented:
* With a single transmitter RLC/UM, a known SDU arrival pattern, and
a known Tx opportunity notification pattern passed to the RLC/UM by
the MAC, check that the RLC PDUs created by the RLC/UM are correct.
* With a single transmitter RLC/UM, a single receiver RLC/UM, and
error-free RLC PDU delivery, check that a set of known SDUs are
delivered correctly.
* With a single transmitter RLC/UM, a single receiver RLC/UM, and
erroneous RLC PDU delivery with a given RLC PDU loss pattern, check
that all and only the RLC SDUs that should be delivered by the
receiving RLC/UM are in fact delivered.
#. one SDU, one PDU: the MAC notifies a TX opportunity causes the creation of a PDU which exactly
contains a whole SDU
#. segmentation: the MAC notifies a TX opportunity that is smaller than the SDU
size, which is then to be fragmented;
#. concatenation: the MAC notifies a TX opportunity that is bigger than the SDU, hence
multiple SDUs are concatenated in the same PDU
#. buffer status report: a series of new SDUs notifications by the
PDCP is inteleaved with a series of TX opportunity notification in
order to verify that the buffer status report procedure is
correct.
RLC AM tests
------------
In all these cases, an output test vector is determine manually from
knowledge of the input test vector and knowledge of the expected
behavior. These test vector are specialized for RLC/UM and
RLC/AM due to their different behavior. Each test case passes if the
sequence of primitives triggered by the RLC instance being tested is
exacly equal to the output test vector. In particular, for each PDU
transmitted by the RLC instance, both the size and the content of the
PDU are verified to check for an exact match with the test vector.
Another suite of unit tests validates the RLC AM implementation in
isolation. The following tests have been implemented:
* With a single transmitter RLC/AM, a known SDU arrival pattern, and
a known Tx opportunity notification pattern passed to the RLC/AM by
the MAC, check that the RLC PDUs created by the RLC/AM are
correct.
* With a single transmitter RLC/AM, a single receiver RLC/AM, and
error-free RLC PDU delivery, check that a set of known SDUs are
delivered correctly
* With a single transmitter RLC/AM, a single receiver RLC/AM, and
erroneous RLC PDU delivery with a given RLC PDU loss pattern, check
that all and only the RLC SDUs that should be delivered by the
receiving RLC/AM are in fact delivered
@@ -406,6 +434,23 @@ traffic patterns is received. If any mismatch in the transmitted and
received traffic pattern is detected for any UE, the test fails.
TFT classifier
--------------
The test suite ``epc-tft-classifier`` checks in isolation that the
behavior of the EpcTftClassifier class is correct. This is performed
by creating different classifier instances where different TFT
instances are activated, and testing for each classifier that an
heterogeneous set of packets (including IP and TCP/UDP headers) is
classified correctly. Several test cases are provided that check the
different matching aspects of a TFT (e.g. local/remote IP address, local/remote port) both for uplink and
downlink traffic. Each test case corresponds to a specific packet and
a specific classifier instance with a given set of TFTs. The test case
passes if the bearer identifier returned by the classifier exactly
matches with the one that is expected for the considered packet.
End-to-end LTE-EPC data plane functionality
-------------------------------------------

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.
@@ -57,11 +57,12 @@ Here is the minimal simulation program that is needed to do an LTE-only simulati
int main (int argc, char *argv[])
{
// 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
@@ -92,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
@@ -161,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"
@@ -195,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 ();
@@ -208,9 +209,9 @@ level Key Performance Indicators (KPIs). You can enable it in the following way:
RLC KPIs are calculated over a time interval and stored on two ASCII
files, one for uplink and one for downlink. The time interval duration
and the name of the files can be controlled using the attributes
``ns3::RlcStatsCalculator::EpochDuration``,
``ns3::RlcStatsCalculator::DlOutputFilename`` and
``ns3::RlcStatsCalculator::UlOutputFilename``.
``ns3::RadioBearerStatsCalculator::EpochDuration``,
``ns3::RadioBearerStatsCalculator::DlOutputFilename`` and
``ns3::RadioBearerStatsCalculator::UlOutputFilename``.
The content of the columns of these files is the following (the same
for uplink and downlink):
@@ -298,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.
@@ -355,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.
@@ -378,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;
@@ -431,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
@@ -498,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::
@@ -522,9 +523,9 @@ 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), EpcTft::Default ());
you can of course use custom EpsBearer and LteTft configurations,
you can of course use custom EpsBearer and EpcTft 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, EpcTft::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, EpcTft::Default ());
Simulator::Stop (Seconds (0.005));

View File

@@ -25,7 +25,7 @@
#include "ns3/mobility-module.h"
#include "ns3/lte-module.h"
#include "ns3/config-store.h"
#include "ns3/rlc-stats-calculator.h"
#include "ns3/radio-bearer-stats-calculator.h"
#include <iomanip>
#include <string>
@@ -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, EpcTft::Default ());
lteHelper->ActivateEpsBearer (ueDevs2, bearer, EpcTft::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

@@ -25,7 +25,7 @@
#include "ns3/mobility-module.h"
#include "ns3/lte-module.h"
#include "ns3/config-store.h"
#include "ns3/rlc-stats-calculator.h"
#include "ns3/radio-bearer-stats-calculator.h"
#include <iomanip>
#include <string>
@@ -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, EpcTft::Default ());
lteHelper->ActivateEpsBearer (ueDevs2, bearer, EpcTft::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, EpcTft::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, EpcTft::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");
@@ -130,7 +130,7 @@ main (int argc, char *argv[])
Ptr<Ipv4StaticRouting> ueStaticRouting = ipv4RoutingHelper.GetStaticRouting (ueNode->GetObject<Ipv4> ());
ueStaticRouting->SetDefaultRoute (epcHelper->GetUeDefaultGatewayAddress (), 1);
}
lteHelper->ActivateEpsBearer (ueLteDevs, EpsBearer (EpsBearer::NGBR_VIDEO_TCP_DEFAULT), LteTft::Default ());
lteHelper->ActivateEpsBearer (ueLteDevs, EpsBearer (EpsBearer::NGBR_VIDEO_TCP_DEFAULT), EpcTft::Default ());
// Install and start applications on UEs and remote host

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, EpcTft::Default ());
Simulator::Stop (Seconds (0.005));

View File

@@ -186,7 +186,7 @@ EpcHelper::AddEnb (Ptr<Node> enb, Ptr<NetDevice> lteEnbNetDevice)
void
EpcHelper::ActivateEpsBearer (Ptr<NetDevice> ueLteDevice, Ptr<NetDevice> enbLteDevice, Ptr<LteTft> tft, uint16_t rnti, uint8_t lcid)
EpcHelper::ActivateEpsBearer (Ptr<NetDevice> ueLteDevice, Ptr<NetDevice> enbLteDevice, Ptr<EpcTft> tft, uint16_t rnti, uint8_t lcid)
{
Ptr<Node> ueNode = ueLteDevice->GetNode ();
Ptr<Ipv4> ueIpv4 = ueNode->GetObject<Ipv4> ();

View File

@@ -25,7 +25,7 @@
#include <ns3/object.h>
#include <ns3/ipv4-address-helper.h>
#include <ns3/data-rate.h>
#include <ns3/lte-tft.h>
#include <ns3/epc-tft.h>
namespace ns3 {
@@ -81,7 +81,7 @@ public:
* \param rnti the Radio Network Temporary Identifier that identifies the UE
* \param lcid the Logical Channel IDentifier of the corresponding RadioBearer
*/
void ActivateEpsBearer (Ptr<NetDevice> ueLteDevice, Ptr<NetDevice> enbLteDevice, Ptr<LteTft> tft, uint16_t rnti, uint8_t lcid);
void ActivateEpsBearer (Ptr<NetDevice> ueLteDevice, Ptr<NetDevice> enbLteDevice, Ptr<EpcTft> tft, uint16_t rnti, uint8_t lcid);
/**

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> ();
@@ -109,47 +109,47 @@ LenaHelper::DoStart (void)
m_macStats = CreateObject<MacStatsCalculator> ();
m_macStats->SetDlOutputFilename("DlMacStats.csv");
m_macStats->SetUlOutputFilename("UlMacStats.csv");
m_rlcStats = CreateObject<RlcStatsCalculator> ();
m_rlcStats = CreateObject<RadioBearerStatsCalculator> ();
m_rlcStats->SetDlOutputFilename("DlRlcStats.csv");
m_rlcStats->SetUlOutputFilename("UlRlcStats.csv");
m_pdcpStats = CreateObject<RlcStatsCalculator> ();
m_pdcpStats = CreateObject<RadioBearerStatsCalculator> ();
m_pdcpStats->SetDlOutputFilename("DlPdcpStats.csv");
m_pdcpStats->SetUlOutputFilename("UlPdcpStats.csv");
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<EpcTft> 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<EpcTft> 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);
@@ -568,12 +568,12 @@ LenaHelper::EnableLogComponents (void)
LogComponentEnable ("LteUeNetDevice", LOG_LEVEL_ALL);
LogComponentEnable ("LteEnbNetDevice", LOG_LEVEL_ALL);
LogComponentEnable ("RlcStatsCalculator", LOG_LEVEL_ALL);
LogComponentEnable ("RadioBearerStatsCalculator", LOG_LEVEL_ALL);
LogComponentEnable ("MacStatsCalculator", LOG_LEVEL_ALL);
}
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 ();
@@ -687,7 +687,7 @@ FindCellIdFromEnbMac (std::string path, uint16_t rnti)
void
DlTxPduCallback (Ptr<RlcStatsCalculator> rlcStats, std::string path,
DlTxPduCallback (Ptr<RadioBearerStatsCalculator> rlcStats, std::string path,
uint16_t rnti, uint8_t lcid, uint32_t packetSize)
{
NS_LOG_FUNCTION (rlcStats << path << rnti << lcid << packetSize);
@@ -715,7 +715,7 @@ DlTxPduCallback (Ptr<RlcStatsCalculator> rlcStats, std::string path,
}
void
DlRxPduCallback (Ptr<RlcStatsCalculator> rlcStats, std::string path,
DlRxPduCallback (Ptr<RadioBearerStatsCalculator> rlcStats, std::string path,
uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay)
{
NS_LOG_FUNCTION (rlcStats << path << rnti << lcid << packetSize << delay);
@@ -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",
@@ -743,7 +743,7 @@ LenaHelper::EnableDlRlcTraces (void)
}
void
UlTxPduCallback (Ptr<RlcStatsCalculator> rlcStats, std::string path,
UlTxPduCallback (Ptr<RadioBearerStatsCalculator> rlcStats, std::string path,
uint16_t rnti, uint8_t lcid, uint32_t packetSize)
{
NS_LOG_FUNCTION (rlcStats << path << rnti << lcid << packetSize);
@@ -761,7 +761,7 @@ UlTxPduCallback (Ptr<RlcStatsCalculator> rlcStats, std::string path,
}
void
UlRxPduCallback (Ptr<RlcStatsCalculator> rlcStats, std::string path,
UlRxPduCallback (Ptr<RadioBearerStatsCalculator> rlcStats, std::string path,
uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay)
{
NS_LOG_FUNCTION (rlcStats << path << rnti << lcid << packetSize << delay);
@@ -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());
@@ -896,21 +896,21 @@ LenaHelper::SetTraceDirectory (std::string path)
m_rlcStats->SetUlOutputFilename(path + m_rlcStats->GetUlOutputFilename());
}
Ptr<RlcStatsCalculator>
LenaHelper::GetRlcStats (void)
Ptr<RadioBearerStatsCalculator>
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));
@@ -928,8 +928,8 @@ LenaHelper::EnableUlPdcpTraces (void)
MakeBoundCallback (&UlRxPduCallback, m_pdcpStats));
}
Ptr<RlcStatsCalculator>
LenaHelper::GetPdcpStats (void)
Ptr<RadioBearerStatsCalculator>
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>
@@ -30,8 +30,8 @@
#include <ns3/node-container.h>
#include <ns3/eps-bearer.h>
#include <ns3/mac-stats-calculator.h>
#include <ns3/rlc-stats-calculator.h>
#include <ns3/lte-tft.h>
#include <ns3/radio-bearer-stats-calculator.h>
#include <ns3/epc-tft.h>
#include <ns3/trace-fading-loss-model.h>
namespace ns3 {
@@ -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
@@ -151,7 +151,7 @@ public:
* \param bearer the characteristics of the bearer to be activated
* \param tft the Traffic Flow Template that identifies the traffic to go on this bearer
*/
void ActivateEpsBearer (NetDeviceContainer ueDevices, EpsBearer bearer, Ptr<LteTft> tft);
void ActivateEpsBearer (NetDeviceContainer ueDevices, EpsBearer bearer, Ptr<EpcTft> tft);
/**
* Activate an EPS bearer on a given UE device
@@ -160,7 +160,7 @@ public:
* \param bearer the characteristics of the bearer to be activated
* \param tft the Traffic Flow Template that identifies the traffic to go on this bearer
*/
void ActivateEpsBearer (Ptr<NetDevice> ueDevice, EpsBearer bearer, Ptr<LteTft> tft);
void ActivateEpsBearer (Ptr<NetDevice> ueDevice, EpsBearer bearer, Ptr<EpcTft> tft);
/**
*
@@ -232,7 +232,7 @@ public:
*
* \return the RLC stats calculator object
*/
Ptr<RlcStatsCalculator> GetRlcStats (void);
Ptr<RadioBearerStatsCalculator> GetRlcStats (void);
/**
* Enable trace sinks for PDCP layer
@@ -253,7 +253,7 @@ public:
*
* \return the PDCP stats calculator object
*/
Ptr<RlcStatsCalculator> GetPdcpStats (void);
Ptr<RadioBearerStatsCalculator> GetPdcpStats (void);
protected:
// inherited from Object
@@ -282,8 +282,8 @@ private:
Ptr<TraceFadingLossModel> m_fadingModule;
Ptr<MacStatsCalculator> m_macStats;
Ptr<RlcStatsCalculator> m_rlcStats;
Ptr<RlcStatsCalculator> m_pdcpStats;
Ptr<RadioBearerStatsCalculator> m_rlcStats;
Ptr<RadioBearerStatsCalculator> m_pdcpStats;
enum LteEpsBearerToRlcMapping_t {RLC_SM_ALWAYS = 1,
RLC_UM_ALWAYS = 2,
@@ -299,4 +299,4 @@ private:
#endif // LENA_HELPER_H
#endif // LTE_HELPER_H

View File

@@ -18,7 +18,7 @@
* Author: Jaume Nin <jnin@cttc.es>
*/
#include "rlc-stats-calculator.h"
#include "radio-bearer-stats-calculator.h"
#include "ns3/string.h"
#include "ns3/nstime.h"
#include <ns3/log.h>
@@ -27,45 +27,45 @@
namespace ns3 {
NS_LOG_COMPONENT_DEFINE ("RlcStatsCalculator");
NS_LOG_COMPONENT_DEFINE ("RadioBearerStatsCalculator");
NS_OBJECT_ENSURE_REGISTERED (RlcStatsCalculator);
NS_OBJECT_ENSURE_REGISTERED (RadioBearerStatsCalculator);
RlcStatsCalculator::RlcStatsCalculator ()
RadioBearerStatsCalculator::RadioBearerStatsCalculator ()
: m_firstWrite (true)
{
NS_LOG_FUNCTION (this);
}
RlcStatsCalculator::~RlcStatsCalculator ()
RadioBearerStatsCalculator::~RadioBearerStatsCalculator ()
{
NS_LOG_FUNCTION (this);
ShowResults ();
}
TypeId
RlcStatsCalculator::GetTypeId (void)
RadioBearerStatsCalculator::GetTypeId (void)
{
static TypeId tid =
TypeId ("ns3::RlcStatsCalculator")
TypeId ("ns3::RadioBearerStatsCalculator")
.SetParent<Object> ()
.AddConstructor<RlcStatsCalculator> ()
.AddConstructor<RadioBearerStatsCalculator> ()
.AddAttribute ("StartTime",
"Start time of the on going epoch.",
TimeValue (Seconds (0.)),
MakeTimeAccessor (&RlcStatsCalculator::m_startTime),
MakeTimeAccessor (&RadioBearerStatsCalculator::m_startTime),
MakeTimeChecker ())
.AddAttribute ("EpochDuration",
"Epoch duration.",
TimeValue (Seconds (0.25)),
MakeTimeAccessor (&RlcStatsCalculator::m_epochDuration),
MakeTimeAccessor (&RadioBearerStatsCalculator::m_epochDuration),
MakeTimeChecker ());
return tid;
}
void
RlcStatsCalculator::UlTxPdu (uint64_t imsi, uint16_t rnti,
RadioBearerStatsCalculator::UlTxPdu (uint64_t imsi, uint16_t rnti,
uint8_t lcid, uint32_t packetSize)
{
NS_LOG_FUNCTION (this << "UlTxPDU" << imsi << rnti << (uint32_t) lcid << packetSize);
@@ -80,7 +80,7 @@ RlcStatsCalculator::UlTxPdu (uint64_t imsi, uint16_t rnti,
}
void
RlcStatsCalculator::DlTxPdu (uint16_t cellId, uint64_t imsi, uint16_t rnti,
RadioBearerStatsCalculator::DlTxPdu (uint16_t cellId, uint64_t imsi, uint16_t rnti,
uint8_t lcid, uint32_t packetSize)
{
NS_LOG_FUNCTION (this << "DlTxPDU" << imsi << rnti << (uint32_t) lcid << packetSize);
@@ -106,7 +106,7 @@ RlcStatsCalculator::DlTxPdu (uint16_t cellId, uint64_t imsi, uint16_t rnti,
}
void
RlcStatsCalculator::UlRxPdu (uint16_t cellId, uint64_t imsi, uint16_t rnti,
RadioBearerStatsCalculator::UlRxPdu (uint16_t cellId, uint64_t imsi, uint16_t rnti,
uint8_t lcid, uint32_t packetSize, uint64_t delay)
{
NS_LOG_FUNCTION (this << "UlRxPDU" << imsi << rnti << (uint32_t) lcid << packetSize << delay);
@@ -143,7 +143,7 @@ RlcStatsCalculator::UlRxPdu (uint16_t cellId, uint64_t imsi, uint16_t rnti,
}
void
RlcStatsCalculator::DlRxPdu (uint64_t imsi, uint16_t rnti,
RadioBearerStatsCalculator::DlRxPdu (uint64_t imsi, uint16_t rnti,
uint8_t lcid, uint32_t packetSize, uint64_t delay)
{
NS_LOG_FUNCTION (this << "DlRxPDU" << imsi << rnti << (uint32_t) lcid << packetSize << delay);
@@ -167,7 +167,7 @@ RlcStatsCalculator::DlRxPdu (uint64_t imsi, uint16_t rnti,
}
void
RlcStatsCalculator::ShowResults (void)
RadioBearerStatsCalculator::ShowResults (void)
{
NS_LOG_FUNCTION (this << GetUlOutputFilename ().c_str () << GetDlOutputFilename ().c_str () );
@@ -227,7 +227,7 @@ RlcStatsCalculator::ShowResults (void)
}
void
RlcStatsCalculator::WriteUlResults (std::ofstream& outFile)
RadioBearerStatsCalculator::WriteUlResults (std::ofstream& outFile)
{
NS_LOG_FUNCTION (this);
@@ -276,7 +276,7 @@ RlcStatsCalculator::WriteUlResults (std::ofstream& outFile)
}
void
RlcStatsCalculator::WriteDlResults (std::ofstream& outFile)
RadioBearerStatsCalculator::WriteDlResults (std::ofstream& outFile)
{
NS_LOG_FUNCTION (this);
@@ -324,7 +324,7 @@ RlcStatsCalculator::WriteDlResults (std::ofstream& outFile)
}
void
RlcStatsCalculator::ResetResults (void)
RadioBearerStatsCalculator::ResetResults (void)
{
NS_LOG_FUNCTION (this);
@@ -344,7 +344,7 @@ RlcStatsCalculator::ResetResults (void)
}
void
RlcStatsCalculator::CheckEpoch (bool forceEpoch)
RadioBearerStatsCalculator::CheckEpoch (bool forceEpoch)
{
NS_LOG_FUNCTION (this);
@@ -358,14 +358,14 @@ RlcStatsCalculator::CheckEpoch (bool forceEpoch)
}
void
RlcStatsCalculator::StartEpoch (void)
RadioBearerStatsCalculator::StartEpoch (void)
{
NS_LOG_FUNCTION (this);
m_startTime += m_epochDuration;
}
uint32_t
RlcStatsCalculator::GetUlTxPackets (uint64_t imsi, uint8_t lcid)
RadioBearerStatsCalculator::GetUlTxPackets (uint64_t imsi, uint8_t lcid)
{
NS_LOG_FUNCTION (this << imsi << (uint16_t) lcid);
ImsiLcidPair_t p (imsi, lcid);
@@ -373,7 +373,7 @@ RlcStatsCalculator::GetUlTxPackets (uint64_t imsi, uint8_t lcid)
}
uint32_t
RlcStatsCalculator::GetUlRxPackets (uint64_t imsi, uint8_t lcid)
RadioBearerStatsCalculator::GetUlRxPackets (uint64_t imsi, uint8_t lcid)
{
NS_LOG_FUNCTION (this << imsi << (uint16_t) lcid);
ImsiLcidPair_t p (imsi, lcid);
@@ -381,7 +381,7 @@ RlcStatsCalculator::GetUlRxPackets (uint64_t imsi, uint8_t lcid)
}
uint64_t
RlcStatsCalculator::GetUlTxData (uint64_t imsi, uint8_t lcid)
RadioBearerStatsCalculator::GetUlTxData (uint64_t imsi, uint8_t lcid)
{
NS_LOG_FUNCTION (this << imsi << (uint16_t) lcid);
ImsiLcidPair_t p (imsi, lcid);
@@ -389,7 +389,7 @@ RlcStatsCalculator::GetUlTxData (uint64_t imsi, uint8_t lcid)
}
uint64_t
RlcStatsCalculator::GetUlRxData (uint64_t imsi, uint8_t lcid)
RadioBearerStatsCalculator::GetUlRxData (uint64_t imsi, uint8_t lcid)
{
NS_LOG_FUNCTION (this << imsi << (uint16_t) lcid);
ImsiLcidPair_t p (imsi, lcid);
@@ -397,7 +397,7 @@ RlcStatsCalculator::GetUlRxData (uint64_t imsi, uint8_t lcid)
}
double
RlcStatsCalculator::GetUlDelay (uint64_t imsi, uint8_t lcid)
RadioBearerStatsCalculator::GetUlDelay (uint64_t imsi, uint8_t lcid)
{
NS_LOG_FUNCTION (this << imsi << (uint16_t) lcid);
ImsiLcidPair_t p (imsi, lcid);
@@ -412,7 +412,7 @@ RlcStatsCalculator::GetUlDelay (uint64_t imsi, uint8_t lcid)
}
std::vector<double>
RlcStatsCalculator::GetUlDelayStats (uint64_t imsi, uint8_t lcid)
RadioBearerStatsCalculator::GetUlDelayStats (uint64_t imsi, uint8_t lcid)
{
NS_LOG_FUNCTION (this << imsi << (uint16_t) lcid);
ImsiLcidPair_t p (imsi, lcid);
@@ -432,7 +432,7 @@ RlcStatsCalculator::GetUlDelayStats (uint64_t imsi, uint8_t lcid)
}
std::vector<double>
RlcStatsCalculator::GetUlPduSizeStats (uint64_t imsi, uint8_t lcid)
RadioBearerStatsCalculator::GetUlPduSizeStats (uint64_t imsi, uint8_t lcid)
{
NS_LOG_FUNCTION (this << imsi << (uint16_t) lcid);
ImsiLcidPair_t p (imsi, lcid);
@@ -452,7 +452,7 @@ RlcStatsCalculator::GetUlPduSizeStats (uint64_t imsi, uint8_t lcid)
}
uint32_t
RlcStatsCalculator::GetDlTxPackets (uint64_t imsi, uint8_t lcid)
RadioBearerStatsCalculator::GetDlTxPackets (uint64_t imsi, uint8_t lcid)
{
NS_LOG_FUNCTION (this << imsi << (uint16_t) lcid);
ImsiLcidPair_t p (imsi, lcid);
@@ -460,7 +460,7 @@ RlcStatsCalculator::GetDlTxPackets (uint64_t imsi, uint8_t lcid)
}
uint32_t
RlcStatsCalculator::GetDlRxPackets (uint64_t imsi, uint8_t lcid)
RadioBearerStatsCalculator::GetDlRxPackets (uint64_t imsi, uint8_t lcid)
{
NS_LOG_FUNCTION (this << imsi << (uint16_t) lcid);
ImsiLcidPair_t p (imsi, lcid);
@@ -468,7 +468,7 @@ RlcStatsCalculator::GetDlRxPackets (uint64_t imsi, uint8_t lcid)
}
uint64_t
RlcStatsCalculator::GetDlTxData (uint64_t imsi, uint8_t lcid)
RadioBearerStatsCalculator::GetDlTxData (uint64_t imsi, uint8_t lcid)
{
NS_LOG_FUNCTION (this << imsi << (uint16_t) lcid);
ImsiLcidPair_t p (imsi, lcid);
@@ -476,7 +476,7 @@ RlcStatsCalculator::GetDlTxData (uint64_t imsi, uint8_t lcid)
}
uint64_t
RlcStatsCalculator::GetDlRxData (uint64_t imsi, uint8_t lcid)
RadioBearerStatsCalculator::GetDlRxData (uint64_t imsi, uint8_t lcid)
{
NS_LOG_FUNCTION (this << imsi << (uint16_t) lcid);
ImsiLcidPair_t p (imsi, lcid);
@@ -484,7 +484,7 @@ RlcStatsCalculator::GetDlRxData (uint64_t imsi, uint8_t lcid)
}
uint32_t
RlcStatsCalculator::GetUlCellId (uint64_t imsi, uint8_t lcid)
RadioBearerStatsCalculator::GetUlCellId (uint64_t imsi, uint8_t lcid)
{
NS_LOG_FUNCTION (this << imsi << (uint16_t) lcid);
ImsiLcidPair_t p (imsi, lcid);
@@ -492,7 +492,7 @@ RlcStatsCalculator::GetUlCellId (uint64_t imsi, uint8_t lcid)
}
uint32_t
RlcStatsCalculator::GetDlCellId (uint64_t imsi, uint8_t lcid)
RadioBearerStatsCalculator::GetDlCellId (uint64_t imsi, uint8_t lcid)
{
NS_LOG_FUNCTION (this << imsi << (uint16_t) lcid);
ImsiLcidPair_t p (imsi, lcid);
@@ -500,7 +500,7 @@ RlcStatsCalculator::GetDlCellId (uint64_t imsi, uint8_t lcid)
}
double
RlcStatsCalculator::GetDlDelay (uint64_t imsi, uint8_t lcid)
RadioBearerStatsCalculator::GetDlDelay (uint64_t imsi, uint8_t lcid)
{
NS_LOG_FUNCTION (this << imsi << (uint16_t) lcid);
ImsiLcidPair_t p (imsi, lcid);
@@ -514,7 +514,7 @@ RlcStatsCalculator::GetDlDelay (uint64_t imsi, uint8_t lcid)
}
std::vector<double>
RlcStatsCalculator::GetDlDelayStats (uint64_t imsi, uint8_t lcid)
RadioBearerStatsCalculator::GetDlDelayStats (uint64_t imsi, uint8_t lcid)
{
NS_LOG_FUNCTION (this << imsi << (uint16_t) lcid);
ImsiLcidPair_t p (imsi, lcid);
@@ -535,7 +535,7 @@ RlcStatsCalculator::GetDlDelayStats (uint64_t imsi, uint8_t lcid)
}
std::vector<double>
RlcStatsCalculator::GetDlPduSizeStats (uint64_t imsi, uint8_t lcid)
RadioBearerStatsCalculator::GetDlPduSizeStats (uint64_t imsi, uint8_t lcid)
{
NS_LOG_FUNCTION (this << imsi << (uint16_t) lcid);
ImsiLcidPair_t p (imsi, lcid);

View File

@@ -18,8 +18,8 @@
* Author: Jaume Nin <jnin@cttc.es>
*/
#ifndef RLC_STATS_CALCULATOR_H_
#define RLC_STATS_CALCULATOR_H_
#ifndef RADIO_BEARER_STATS_CALCULATOR_H_
#define RADIO_BEARER_STATS_CALCULATOR_H_
#include "ns3/lte-stats-calculator.h"
#include "ns3/lte-common.h"
@@ -52,18 +52,18 @@ typedef std::map<ImsiLcidPair_t, LteFlowId_t> FlowIdMap;
* - Average, min, max and standard deviation of RLC to RLC delay
* - Average, min, max and standard deviation of RLC PDU size
*/
class RlcStatsCalculator : public LteStatsCalculator
class RadioBearerStatsCalculator : public LteStatsCalculator
{
public:
/**
* Class constructor
*/
RlcStatsCalculator ();
RadioBearerStatsCalculator ();
/**
* Class destructor
*/
virtual ~RlcStatsCalculator ();
virtual ~RadioBearerStatsCalculator ();
/**
* Inherited from ns3::Object
@@ -281,4 +281,4 @@ private:
} // namespace ns3
#endif /* RLC_STATS_CALCULATOR_H_ */
#endif /* RADIO_BEARER_STATS_CALCULATOR_H_ */

View File

@@ -27,7 +27,7 @@
#include "ns3/inet-socket-address.h"
#include "ns3/uinteger.h"
#include "ns3/epc-gtpu-header.h"
#include "ns3/lte-mac-tag.h"
#include "ns3/lte-radio-bearer-tag.h"
namespace ns3 {
@@ -80,7 +80,7 @@ EpcEnbApplication::RecvFromLteSocket (Ptr<Socket> socket)
SocketAddressTag satag;
packet->RemovePacketTag (satag);
LteMacTag tag;
LteRadioBearerTag tag;
bool found = packet->RemovePacketTag (tag);
NS_ASSERT (found);
LteFlowId_t flowId;
@@ -116,7 +116,7 @@ void
EpcEnbApplication::SendToLteSocket (Ptr<Packet> packet, uint16_t rnti, uint8_t lcid)
{
NS_LOG_FUNCTION (this << packet << rnti << (uint16_t) lcid);
LteMacTag tag (rnti, lcid);
LteRadioBearerTag tag (rnti, lcid);
packet->AddPacketTag (tag);
int sentBytes = m_lteSocket->Send (packet);
NS_ASSERT (sentBytes > 0);

View File

@@ -44,7 +44,7 @@ EpcSgwPgwApplication::UeInfo::UeInfo ()
}
void
EpcSgwPgwApplication::UeInfo::AddBearer (Ptr<LteTft> tft, uint32_t teid)
EpcSgwPgwApplication::UeInfo::AddBearer (Ptr<EpcTft> tft, uint32_t teid)
{
NS_LOG_FUNCTION (this << tft << teid);
return m_tftClassifier.Add (tft, teid);
@@ -57,7 +57,7 @@ EpcSgwPgwApplication::UeInfo::Classify (Ptr<Packet> p)
// we hardcode DOWNLINK direction since the PGW is espected to
// classify only downlink packets (uplink packets will go to the
// internet without any classification).
return m_tftClassifier.Classify (p, LteTft::DOWNLINK);
return m_tftClassifier.Classify (p, EpcTft::DOWNLINK);
}
Ipv4Address
@@ -105,7 +105,7 @@ EpcSgwPgwApplication::~EpcSgwPgwApplication ()
uint32_t
EpcSgwPgwApplication::ActivateS1Bearer (Ipv4Address ueAddr, Ipv4Address enbAddr, Ptr<LteTft> tft)
EpcSgwPgwApplication::ActivateS1Bearer (Ipv4Address ueAddr, Ipv4Address enbAddr, Ptr<EpcTft> tft)
{
NS_LOG_FUNCTION (this << ueAddr << enbAddr << tft);

View File

@@ -31,8 +31,8 @@
#include <ns3/ptr.h>
#include <ns3/object.h>
#include <ns3/eps-bearer.h>
#include <ns3/lte-tft.h>
#include <ns3/eps-tft-classifier.h>
#include <ns3/epc-tft.h>
#include <ns3/epc-tft-classifier.h>
#include <ns3/lte-common.h>
#include <ns3/application.h>
#include <map>
@@ -80,7 +80,7 @@ public:
*
* \return the TunnelEndpointIdentifier of this EPS bearer
*/
uint32_t ActivateS1Bearer (Ipv4Address ueAddr, Ipv4Address enbAddr, Ptr<LteTft> tft);
uint32_t ActivateS1Bearer (Ipv4Address ueAddr, Ipv4Address enbAddr, Ptr<EpcTft> tft);
/**
@@ -142,7 +142,7 @@ private:
* \param tft the Traffic Flow Template of the new bearer to be added
* \param teid the TEID of the new bearer
*/
void AddBearer (Ptr<LteTft> tft, uint32_t teid);
void AddBearer (Ptr<EpcTft> tft, uint32_t teid);
/**
*
@@ -169,7 +169,7 @@ private:
private:
EpsTftClassifier m_tftClassifier;
EpcTftClassifier m_tftClassifier;
Ipv4Address m_enbAddr;
};

View File

@@ -17,8 +17,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Authors:
* Nicola Baldo <nbaldo@cttc.es> (the EpsTftClassifier class)
* Giuseppe Piro <g.piro@poliba.it> (part of the code in EpsTftClassifier::Classify ()
* Nicola Baldo <nbaldo@cttc.es> (the EpcTftClassifier class)
* Giuseppe Piro <g.piro@poliba.it> (part of the code in EpcTftClassifier::Classify ()
* which comes from RrcEntity::Classify of the GSoC 2010 LTE module)
*
*/
@@ -26,8 +26,8 @@
#include "eps-tft-classifier.h"
#include "lte-tft.h"
#include "epc-tft-classifier.h"
#include "epc-tft.h"
#include "ns3/log.h"
#include "ns3/packet.h"
#include "ns3/ipv4-header.h"
@@ -36,17 +36,17 @@
#include "ns3/udp-l4-protocol.h"
#include "ns3/tcp-l4-protocol.h"
NS_LOG_COMPONENT_DEFINE ("EpsTftClassifier");
NS_LOG_COMPONENT_DEFINE ("EpcTftClassifier");
namespace ns3 {
EpsTftClassifier::EpsTftClassifier ()
EpcTftClassifier::EpcTftClassifier ()
{
NS_LOG_FUNCTION (this);
}
void
EpsTftClassifier::Add (Ptr<LteTft> tft, uint32_t id)
EpcTftClassifier::Add (Ptr<EpcTft> tft, uint32_t id)
{
NS_LOG_FUNCTION (this << tft);
@@ -57,7 +57,7 @@ EpsTftClassifier::Add (Ptr<LteTft> tft, uint32_t id)
}
void
EpsTftClassifier::Delete (uint32_t id)
EpcTftClassifier::Delete (uint32_t id)
{
NS_LOG_FUNCTION (this << id);
m_tftMap.erase (id);
@@ -65,7 +65,7 @@ EpsTftClassifier::Delete (uint32_t id)
uint32_t
EpsTftClassifier::Classify (Ptr<Packet> p, LteTft::Direction direction)
EpcTftClassifier::Classify (Ptr<Packet> p, EpcTft::Direction direction)
{
NS_LOG_FUNCTION (this << p << direction);
@@ -78,14 +78,14 @@ EpsTftClassifier::Classify (Ptr<Packet> p, LteTft::Direction direction)
Ipv4Address remoteAddress;
if (direction == LteTft::UPLINK)
if (direction == EpcTft::UPLINK)
{
localAddress = ipv4Header.GetSource ();
remoteAddress = ipv4Header.GetDestination ();
}
else
{
NS_ASSERT (direction == LteTft::DOWNLINK);
NS_ASSERT (direction == EpcTft::DOWNLINK);
remoteAddress = ipv4Header.GetSource ();
localAddress = ipv4Header.GetDestination ();
}
@@ -102,7 +102,7 @@ EpsTftClassifier::Classify (Ptr<Packet> p, LteTft::Direction direction)
UdpHeader udpHeader;
pCopy->RemoveHeader (udpHeader);
if (direction == LteTft::UPLINK)
if (direction == EpcTft::UPLINK)
{
localPort = udpHeader.GetSourcePort ();
remotePort = udpHeader.GetDestinationPort ();
@@ -117,7 +117,7 @@ EpsTftClassifier::Classify (Ptr<Packet> p, LteTft::Direction direction)
{
TcpHeader tcpHeader;
pCopy->RemoveHeader (tcpHeader);
if (direction == LteTft::UPLINK)
if (direction == EpcTft::UPLINK)
{
localPort = tcpHeader.GetSourcePort ();
remotePort = tcpHeader.GetDestinationPort ();
@@ -144,14 +144,14 @@ EpsTftClassifier::Classify (Ptr<Packet> p, LteTft::Direction direction)
// now it is possible to classify the packet!
// we use a reverse iterator since filter priority is not implemented properly.
// This way, since the default bearer is expected to be added first, it will be evaluated last.
std::map <uint32_t, Ptr<LteTft> >::const_reverse_iterator it;
std::map <uint32_t, Ptr<EpcTft> >::const_reverse_iterator it;
NS_LOG_LOGIC ("TFT MAP size: " << m_tftMap.size ());
for (it = m_tftMap.rbegin (); it != m_tftMap.rend (); ++it)
{
NS_LOG_LOGIC ("TFT id: " << it->first );
NS_LOG_LOGIC (" Ptr<LteTft>: " << it->second);
Ptr<LteTft> tft = it->second;
NS_LOG_LOGIC (" Ptr<EpcTft>: " << it->second);
Ptr<EpcTft> tft = it->second;
if (tft->Matches (direction, remoteAddress, localAddress, remotePort, localPort, tos))
{
NS_LOG_LOGIC ("matches with TFT ID = " << it->first);

View File

@@ -19,20 +19,20 @@
*/
#ifndef EPS_TFT_CLASSIFIER_H
#define EPS_TFT_CLASSIFIER_H
#ifndef EPC_TFT_CLASSIFIER_H
#define EPC_TFT_CLASSIFIER_H
#include "ns3/ptr.h"
#include "ns3/simple-ref-count.h"
#include "ns3/lte-tft.h"
#include "ns3/epc-tft.h"
#include <map>
namespace ns3 {
class LteTft;
class EpcTft;
class Packet;
/**
@@ -40,11 +40,11 @@ class Packet;
*
* \note this implementation works with IPv4 only.
*/
class EpsTftClassifier : public SimpleRefCount<EpsTftClassifier>
class EpcTftClassifier : public SimpleRefCount<EpcTftClassifier>
{
public:
EpsTftClassifier ();
EpcTftClassifier ();
/**
* add a TFT to the Classifier
@@ -52,7 +52,7 @@ public:
* \param tft the TFT to be added
*
*/
void Add (Ptr<LteTft> tft, uint32_t id);
void Add (Ptr<EpcTft> tft, uint32_t id);
/**
* delete an existing TFT from the classifier
@@ -69,11 +69,11 @@ public:
*
* \return the identifier (>0) of the first TFT that matches with the IP packet; 0 if no TFT matched.
*/
uint32_t Classify (Ptr<Packet> p, LteTft::Direction direction);
uint32_t Classify (Ptr<Packet> p, EpcTft::Direction direction);
protected:
std::map <uint32_t, Ptr<LteTft> > m_tftMap;
std::map <uint32_t, Ptr<EpcTft> > m_tftMap;
};

View File

@@ -21,23 +21,23 @@
#include "lte-tft.h"
#include "epc-tft.h"
#include "ns3/abort.h"
#include "ns3/log.h"
namespace ns3 {
NS_LOG_COMPONENT_DEFINE ("LteTft");
NS_LOG_COMPONENT_DEFINE ("EpcTft");
std::ostream& operator<< (std::ostream& os, LteTft::Direction& d)
std::ostream& operator<< (std::ostream& os, EpcTft::Direction& d)
{
switch (d)
{
case LteTft::DOWNLINK:
case EpcTft::DOWNLINK:
os << "DOWNLINK";
break;
case LteTft::UPLINK:
case EpcTft::UPLINK:
os << "UPLINK";
break;
default:
@@ -48,7 +48,7 @@ std::ostream& operator<< (std::ostream& os, LteTft::Direction& d)
}
std::ostream& operator<< (std::ostream& os, LteTft::PacketFilter& f)
std::ostream& operator<< (std::ostream& os, EpcTft::PacketFilter& f)
{
os << " direction: " << f.direction
<< " remoteAddress: " << f.remoteAddress
@@ -64,7 +64,7 @@ std::ostream& operator<< (std::ostream& os, LteTft::PacketFilter& f)
return os;
}
LteTft::PacketFilter::PacketFilter ()
EpcTft::PacketFilter::PacketFilter ()
: precedence (255),
direction (BIDIRECTIONAL),
remoteMask ("0.0.0.0"),
@@ -80,7 +80,7 @@ LteTft::PacketFilter::PacketFilter ()
}
bool
LteTft::PacketFilter::Matches (Direction d,
EpcTft::PacketFilter::Matches (Direction d,
Ipv4Address ra,
Ipv4Address la,
uint16_t rp,
@@ -137,24 +137,24 @@ LteTft::PacketFilter::Matches (Direction d,
}
Ptr<LteTft>
LteTft::Default ()
Ptr<EpcTft>
EpcTft::Default ()
{
Ptr<LteTft> tft = Create<LteTft> ();
LteTft::PacketFilter defaultPacketFilter;
Ptr<EpcTft> tft = Create<EpcTft> ();
EpcTft::PacketFilter defaultPacketFilter;
tft->Add (defaultPacketFilter);
return tft;
}
LteTft::LteTft ()
EpcTft::EpcTft ()
: m_numFilters (0)
{
NS_LOG_FUNCTION (this);
}
uint8_t
LteTft::Add (PacketFilter f)
EpcTft::Add (PacketFilter f)
{
NS_LOG_FUNCTION (this << f);
NS_ABORT_IF (m_numFilters >= 16);
@@ -171,7 +171,7 @@ LteTft::Add (PacketFilter f)
}
bool
LteTft::Matches (Direction direction,
EpcTft::Matches (Direction direction,
Ipv4Address remoteAddress,
Ipv4Address localAddress,
uint16_t remotePort,

View File

@@ -19,8 +19,8 @@
*/
#ifndef LTE_TFT_H
#define LTE_TFT_H
#ifndef EPC_TFT_H
#define EPC_TFT_H
#include <ns3/simple-ref-count.h>
@@ -37,7 +37,7 @@ namespace ns3 {
* which is the set of all packet filters associated with an EPS bearer.
*
*/
class LteTft : public SimpleRefCount<LteTft>
class EpcTft : public SimpleRefCount<EpcTft>
{
public:
@@ -48,7 +48,7 @@ public:
*
* \return a newly created TFT that will match any traffic
*/
static Ptr<LteTft> Default ();
static Ptr<EpcTft> Default ();
/**
* Indicates the direction of the traffic that is to be classified.
@@ -118,7 +118,7 @@ public:
uint8_t typeOfServiceMask; /**< type of service field mask */
};
LteTft ();
EpcTft ();
/**
@@ -159,11 +159,11 @@ private:
};
std::ostream& operator<< (std::ostream& os, LteTft::Direction& d);
std::ostream& operator<< (std::ostream& os, EpcTft::Direction& d);
} // namespace ns3
#endif /* LTE_TFT_H */
#endif /* EPC_TFT_H */

View File

@@ -30,7 +30,7 @@
#include "lte-ue-net-device.h"
#include <ns3/lte-enb-mac.h>
#include <ns3/lte-mac-tag.h>
#include <ns3/lte-radio-bearer-tag.h>
#include <ns3/lte-ue-phy.h>
#include "ns3/lte-mac-sap.h"
@@ -515,7 +515,7 @@ void
LteEnbMac::DoReceivePhyPdu (Ptr<Packet> p)
{
NS_LOG_FUNCTION (this);
LteMacTag tag;
LteRadioBearerTag tag;
p->RemovePacketTag (tag);
// store info of the packet received
@@ -652,7 +652,7 @@ void
LteEnbMac::DoTransmitPdu (LteMacSapProvider::TransmitPduParameters params)
{
NS_LOG_FUNCTION (this);
LteMacTag tag (params.rnti, params.lcid);
LteRadioBearerTag tag (params.rnti, params.lcid);
params.pdu->AddPacketTag (tag);
// Ptr<PacketBurst> pb = CreateObject<PacketBurst> ();
// pb->AddPacket (params.pdu);

View File

@@ -30,7 +30,7 @@
#include "lte-pdcp.h"
#include "lte-pdcp-sap.h"
#include "lte-radio-bearer-info.h"
#include "lte-mac-tag.h"
#include "lte-radio-bearer-tag.h"
#include "ns3/object-map.h"
@@ -386,7 +386,7 @@ LteEnbRrc::Send (Ptr<Packet> packet)
{
NS_LOG_FUNCTION (this << packet);
LteMacTag tag;
LteRadioBearerTag tag;
bool found = packet->RemovePacketTag (tag);
NS_ASSERT (found);
@@ -412,7 +412,7 @@ LteEnbRrc::DoReceiveRrcPdu (LtePdcpSapUser::ReceiveRrcPduParameters params)
{
NS_LOG_FUNCTION (this);
// this tag is needed by the EpcEnbApplication to determine the S1 bearer that corresponds to this radio bearer
LteMacTag tag;
LteRadioBearerTag tag;
tag.SetRnti (params.rnti);
tag.SetLcid (params.lcid);
params.rrcPdu->AddPacketTag (tag);

View File

@@ -32,7 +32,7 @@
#include "ns3/enum.h"
#include "lte-amc.h"
#include "ns3/ipv4-header.h"
#include <ns3/lte-mac-tag.h>
#include <ns3/lte-radio-bearer-tag.h>
#include <ns3/ipv4-l3-protocol.h>
#include <ns3/log.h>

View File

@@ -19,95 +19,95 @@
*/
#include "lte-mac-tag.h"
#include "lte-radio-bearer-tag.h"
#include "ns3/tag.h"
#include "ns3/uinteger.h"
namespace ns3 {
NS_OBJECT_ENSURE_REGISTERED (LteMacTag);
NS_OBJECT_ENSURE_REGISTERED (LteRadioBearerTag);
TypeId
LteMacTag::GetTypeId (void)
LteRadioBearerTag::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::LteMacTag")
static TypeId tid = TypeId ("ns3::LteRadioBearerTag")
.SetParent<Tag> ()
.AddConstructor<LteMacTag> ()
.AddConstructor<LteRadioBearerTag> ()
.AddAttribute ("rnti", "The rnti that indicates the UE which packet belongs",
UintegerValue (0),
MakeUintegerAccessor (&LteMacTag::GetRnti),
MakeUintegerAccessor (&LteRadioBearerTag::GetRnti),
MakeUintegerChecker<uint16_t> ())
.AddAttribute ("lcid", "The LC id that indicates the UE which packet belongs",
UintegerValue (0),
MakeUintegerAccessor (&LteMacTag::GetLcid),
MakeUintegerAccessor (&LteRadioBearerTag::GetLcid),
MakeUintegerChecker<uint8_t> ())
;
return tid;
}
TypeId
LteMacTag::GetInstanceTypeId (void) const
LteRadioBearerTag::GetInstanceTypeId (void) const
{
return GetTypeId ();
}
LteMacTag::LteMacTag ()
LteRadioBearerTag::LteRadioBearerTag ()
: m_rnti (0),
m_lcid (0)
{
}
LteMacTag::LteMacTag (uint16_t rnti, uint8_t lcid)
LteRadioBearerTag::LteRadioBearerTag (uint16_t rnti, uint8_t lcid)
: m_rnti (rnti),
m_lcid (lcid)
{
}
void
LteMacTag::SetRnti (uint16_t rnti)
LteRadioBearerTag::SetRnti (uint16_t rnti)
{
m_rnti = rnti;
}
void
LteMacTag::SetLcid (uint8_t lcid)
LteRadioBearerTag::SetLcid (uint8_t lcid)
{
m_lcid = lcid;
}
uint32_t
LteMacTag::GetSerializedSize (void) const
LteRadioBearerTag::GetSerializedSize (void) const
{
return 3;
}
void
LteMacTag::Serialize (TagBuffer i) const
LteRadioBearerTag::Serialize (TagBuffer i) const
{
i.WriteU16 (m_rnti);
i.WriteU8 (m_lcid);
}
void
LteMacTag::Deserialize (TagBuffer i)
LteRadioBearerTag::Deserialize (TagBuffer i)
{
m_rnti = (uint16_t) i.ReadU16 ();
m_lcid = (uint8_t) i.ReadU8 ();
}
uint16_t
LteMacTag::GetRnti () const
LteRadioBearerTag::GetRnti () const
{
return m_rnti;
}
uint8_t
LteMacTag::GetLcid () const
LteRadioBearerTag::GetLcid () const
{
return m_lcid;
}
void
LteMacTag::Print (std::ostream &os) const
LteRadioBearerTag::Print (std::ostream &os) const
{
os << "rnti=" << m_rnti << ", lcid=" << m_lcid;
}

View File

@@ -17,8 +17,8 @@
*
* Author: Author: Marco Miozzo <marco.miozzo@cttc.es>
*/
#ifndef LTE_MAC_TAG_H
#define LTE_MAC_TAG_H
#ifndef LTE_RADIO_BEARER_TAG_H
#define LTE_RADIO_BEARER_TAG_H
#include "ns3/packet.h"
@@ -31,21 +31,21 @@ class Tag;
* Tag used to define the RNTI and LC id for each MAC packet trasmitted
*/
class LteMacTag : public Tag
class LteRadioBearerTag : public Tag
{
public:
static TypeId GetTypeId (void);
virtual TypeId GetInstanceTypeId (void) const;
/**
* Create an empty LteMacTag
* Create an empty LteRadioBearerTag
*/
LteMacTag ();
LteRadioBearerTag ();
/**
* Create a LteMacTag with the given RNTI and LC id
* Create a LteRadioBearerTag with the given RNTI and LC id
*/
LteMacTag (uint16_t rnti, uint8_t lcId);
LteRadioBearerTag (uint16_t rnti, uint8_t lcId);
/**
* Set the RNTI to the given value.
@@ -80,4 +80,4 @@ private:
} // namespace ns3
#endif /* LTE_MAC_TAG_H */
#endif /* LTE_RADIO_BEARER_TAG_H */

View File

@@ -28,7 +28,7 @@
#include "lte-spectrum-phy.h"
#include "lte-spectrum-signal-parameters.h"
#include "lte-net-device.h"
#include "lte-mac-tag.h"
#include "lte-radio-bearer-tag.h"
#include "lte-sinr-chunk-processor.h"
#include "lte-phy-tag.h"

View File

@@ -28,7 +28,7 @@
#include "lte-ue-mac.h"
#include "lte-ue-net-device.h"
#include "lte-mac-tag.h"
#include "lte-radio-bearer-tag.h"
#include <ns3/ff-mac-common.h>
#include <ns3/ideal-control-messages.h>
#include <ns3/simulator.h>
@@ -243,7 +243,7 @@ LteUeMac::DoTransmitPdu (LteMacSapProvider::TransmitPduParameters params)
{
NS_LOG_FUNCTION (this);
NS_ASSERT_MSG (m_rnti == params.rnti, "RNTI mismatch between RLC and MAC");
LteMacTag tag (params.rnti, params.lcid);
LteRadioBearerTag tag (params.rnti, params.lcid);
params.pdu->AddPacketTag (tag);
// Ptr<PacketBurst> pb = CreateObject<PacketBurst> ();
// pb->AddPacket (params.pdu);
@@ -325,7 +325,7 @@ LteUeMac::DoRemoveLc (uint8_t lcId)
void
LteUeMac::DoReceivePhyPdu (Ptr<Packet> p)
{
LteMacTag tag;
LteRadioBearerTag tag;
p->RemovePacketTag (tag);
if (tag.GetRnti () == m_rnti)
{

View File

@@ -178,7 +178,7 @@ LteUeRrc::ConfigureUe (uint16_t rnti, uint16_t cellId)
}
void
LteUeRrc::SetupRadioBearer (uint16_t rnti, EpsBearer bearer, TypeId rlcTypeId, uint8_t lcid, Ptr<LteTft> tft)
LteUeRrc::SetupRadioBearer (uint16_t rnti, EpsBearer bearer, TypeId rlcTypeId, uint8_t lcid, Ptr<EpcTft> tft)
{
NS_LOG_FUNCTION (this << (uint32_t) rnti << (uint32_t) lcid);
@@ -229,7 +229,7 @@ bool
LteUeRrc::Send (Ptr<Packet> packet)
{
NS_LOG_FUNCTION (this << packet);
uint8_t lcid = m_tftClassifier.Classify (packet, LteTft::UPLINK);
uint8_t lcid = m_tftClassifier.Classify (packet, EpcTft::UPLINK);
LtePdcpSapProvider::TransmitRrcPduParameters params;
params.rrcPdu = packet;
params.rnti = m_rnti;

View File

@@ -24,7 +24,7 @@
#include <ns3/object.h>
#include <ns3/packet.h>
#include <ns3/lte-ue-cmac-sap.h>
#include <ns3/eps-tft-classifier.h>
#include <ns3/epc-tft-classifier.h>
#include <ns3/lte-pdcp-sap.h>
#include <map>
@@ -112,7 +112,7 @@ public:
* \param tft the Traffic Flow Template identifying this bearer
*
*/
void SetupRadioBearer (uint16_t rnti, EpsBearer bearer, TypeId rlcTypeId, uint8_t lcid, Ptr<LteTft> tft);
void SetupRadioBearer (uint16_t rnti, EpsBearer bearer, TypeId rlcTypeId, uint8_t lcid, Ptr<EpcTft> tft);
/**
@@ -182,7 +182,7 @@ private:
std::map <uint8_t, Ptr<LteRadioBearerInfo> > m_rbMap;
EpsTftClassifier m_tftClassifier;
EpcTftClassifier m_tftClassifier;
};

View File

@@ -48,6 +48,15 @@ TraceFadingLossModel::TraceFadingLossModel ()
TraceFadingLossModel::~TraceFadingLossModel ()
{
m_fadingTrace.clear ();
m_windowOffsetsMap.clear ();
std::map <ChannelRealizationId_t, UniformVariable* >::iterator itVar;
itVar = m_startVariableMap.begin ();
while (itVar!=m_startVariableMap.end ())
{
delete ((*itVar).second);
itVar++;
}
m_startVariableMap.clear ();
}

View File

@@ -186,7 +186,7 @@ EpcS1uDlTestCase::DoRun ()
uint16_t rnti = u+1;
uint16_t lcid = 1;
epcHelper->ActivateEpsBearer (ueLteDevice, lteEnbNetDevice, LteTft::Default (), rnti, lcid);
epcHelper->ActivateEpsBearer (ueLteDevice, lteEnbNetDevice, EpcTft::Default (), rnti, lcid);
}

View File

@@ -19,7 +19,7 @@
* The original version of UdpClient is by Amine Ismail
* <amine.ismail@sophia.inria.fr> <amine.ismail@udcast.com>
* The rest of the code (including modifying UdpClient into
* LteMacTagUdpClient) is by Nicola Baldo <nbaldo@cttc.es>
* LteRadioBearerTagUdpClient) is by Nicola Baldo <nbaldo@cttc.es>
*/
@@ -41,7 +41,7 @@
#include <ns3/ipv4-interface.h>
#include <ns3/mac48-address.h>
#include "ns3/seq-ts-header.h"
#include "ns3/lte-mac-tag.h"
#include "ns3/lte-radio-bearer-tag.h"
#include "ns3/arp-cache.h"
#include "ns3/boolean.h"
#include "ns3/uinteger.h"
@@ -55,23 +55,23 @@ NS_LOG_COMPONENT_DEFINE ("EpcTestS1uUplink");
/*
* A Udp client. Sends UDP packet carrying sequence number and time
* stamp but also including the LteMacTag. This tag is normally
* stamp but also including the LteRadioBearerTag. This tag is normally
* generated by the LteEnbNetDevice when forwarding packet in the
* uplink. But in this test we don't have the LteEnbNetDevice, because
* we test the S1-U interface with simpler devices to make sure it
* just works.
*
*/
class LteMacTagUdpClient : public Application
class LteRadioBearerTagUdpClient : public Application
{
public:
static TypeId
GetTypeId (void);
LteMacTagUdpClient ();
LteMacTagUdpClient (uint16_t rnti, uint8_t lcid);
LteRadioBearerTagUdpClient ();
LteRadioBearerTagUdpClient (uint16_t rnti, uint8_t lcid);
virtual ~LteMacTagUdpClient ();
virtual ~LteRadioBearerTagUdpClient ();
/**
* \brief set the remote address and port
@@ -109,40 +109,40 @@ private:
TypeId
LteMacTagUdpClient::GetTypeId (void)
LteRadioBearerTagUdpClient::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::LteMacTagUdpClient")
static TypeId tid = TypeId ("ns3::LteRadioBearerTagUdpClient")
.SetParent<Application> ()
.AddConstructor<LteMacTagUdpClient> ()
.AddConstructor<LteRadioBearerTagUdpClient> ()
.AddAttribute ("MaxPackets",
"The maximum number of packets the application will send",
UintegerValue (100),
MakeUintegerAccessor (&LteMacTagUdpClient::m_count),
MakeUintegerAccessor (&LteRadioBearerTagUdpClient::m_count),
MakeUintegerChecker<uint32_t> ())
.AddAttribute ("Interval",
"The time to wait between packets", TimeValue (Seconds (1.0)),
MakeTimeAccessor (&LteMacTagUdpClient::m_interval),
MakeTimeAccessor (&LteRadioBearerTagUdpClient::m_interval),
MakeTimeChecker ())
.AddAttribute (
"RemoteAddress",
"The destination Ipv4Address of the outbound packets",
Ipv4AddressValue (),
MakeIpv4AddressAccessor (&LteMacTagUdpClient::m_peerAddress),
MakeIpv4AddressAccessor (&LteRadioBearerTagUdpClient::m_peerAddress),
MakeIpv4AddressChecker ())
.AddAttribute ("RemotePort", "The destination port of the outbound packets",
UintegerValue (100),
MakeUintegerAccessor (&LteMacTagUdpClient::m_peerPort),
MakeUintegerAccessor (&LteRadioBearerTagUdpClient::m_peerPort),
MakeUintegerChecker<uint16_t> ())
.AddAttribute ("PacketSize",
"Size of packets generated. The minimum packet size is 12 bytes which is the size of the header carrying the sequence number and the time stamp.",
UintegerValue (1024),
MakeUintegerAccessor (&LteMacTagUdpClient::m_size),
MakeUintegerAccessor (&LteRadioBearerTagUdpClient::m_size),
MakeUintegerChecker<uint32_t> (12,1500))
;
return tid;
}
LteMacTagUdpClient::LteMacTagUdpClient ()
LteRadioBearerTagUdpClient::LteRadioBearerTagUdpClient ()
: m_rnti (0),
m_lcid (0)
{
@@ -152,7 +152,7 @@ LteMacTagUdpClient::LteMacTagUdpClient ()
m_sendEvent = EventId ();
}
LteMacTagUdpClient::LteMacTagUdpClient (uint16_t rnti, uint8_t lcid)
LteRadioBearerTagUdpClient::LteRadioBearerTagUdpClient (uint16_t rnti, uint8_t lcid)
: m_rnti (rnti),
m_lcid (lcid)
{
@@ -162,27 +162,27 @@ LteMacTagUdpClient::LteMacTagUdpClient (uint16_t rnti, uint8_t lcid)
m_sendEvent = EventId ();
}
LteMacTagUdpClient::~LteMacTagUdpClient ()
LteRadioBearerTagUdpClient::~LteRadioBearerTagUdpClient ()
{
NS_LOG_FUNCTION_NOARGS ();
}
void
LteMacTagUdpClient::SetRemote (Ipv4Address ip, uint16_t port)
LteRadioBearerTagUdpClient::SetRemote (Ipv4Address ip, uint16_t port)
{
m_peerAddress = ip;
m_peerPort = port;
}
void
LteMacTagUdpClient::DoDispose (void)
LteRadioBearerTagUdpClient::DoDispose (void)
{
NS_LOG_FUNCTION_NOARGS ();
Application::DoDispose ();
}
void
LteMacTagUdpClient::StartApplication (void)
LteRadioBearerTagUdpClient::StartApplication (void)
{
NS_LOG_FUNCTION_NOARGS ();
@@ -195,18 +195,18 @@ LteMacTagUdpClient::StartApplication (void)
}
m_socket->SetRecvCallback (MakeNullCallback<void, Ptr<Socket> > ());
m_sendEvent = Simulator::Schedule (Seconds (0.0), &LteMacTagUdpClient::Send, this);
m_sendEvent = Simulator::Schedule (Seconds (0.0), &LteRadioBearerTagUdpClient::Send, this);
}
void
LteMacTagUdpClient::StopApplication ()
LteRadioBearerTagUdpClient::StopApplication ()
{
NS_LOG_FUNCTION_NOARGS ();
Simulator::Cancel (m_sendEvent);
}
void
LteMacTagUdpClient::Send (void)
LteRadioBearerTagUdpClient::Send (void)
{
NS_LOG_FUNCTION_NOARGS ();
NS_ASSERT (m_sendEvent.IsExpired ());
@@ -215,7 +215,7 @@ LteMacTagUdpClient::Send (void)
Ptr<Packet> p = Create<Packet> (m_size-(8+4)); // 8+4 : the size of the seqTs header
p->AddHeader (seqTs);
LteMacTag tag (m_rnti, m_lcid);
LteRadioBearerTag tag (m_rnti, m_lcid);
p->AddPacketTag (tag);
if ((m_socket->Send (p)) >= 0)
@@ -234,7 +234,7 @@ LteMacTagUdpClient::Send (void)
if (m_sent < m_count)
{
m_sendEvent = Simulator::Schedule (m_interval, &LteMacTagUdpClient::Send, this);
m_sendEvent = Simulator::Schedule (m_interval, &LteRadioBearerTagUdpClient::Send, this);
}
}
@@ -396,7 +396,7 @@ EpcS1uUlTestCase::DoRun ()
enbit->ues[u].serverApp = sinkApp.Get (0)->GetObject<PacketSink> ();
Time interPacketInterval = Seconds (0.01);
Ptr<LteMacTagUdpClient> client = CreateObject<LteMacTagUdpClient> (enbit->ues[u].rnti, enbit->ues[u].lcid);
Ptr<LteRadioBearerTagUdpClient> client = CreateObject<LteRadioBearerTagUdpClient> (enbit->ues[u].rnti, enbit->ues[u].lcid);
client->SetAttribute ("RemoteAddress", Ipv4AddressValue (internetNodesIpIfaceContainer.GetAddress (1)));
client->SetAttribute ("RemotePort", UintegerValue (udpSinkPort));
client->SetAttribute ("MaxPackets", UintegerValue (enbit->ues[u].numPkts));
@@ -411,7 +411,7 @@ EpcS1uUlTestCase::DoRun ()
uint16_t rnti = u+1;
uint16_t lcid = 1;
epcHelper->ActivateEpsBearer (ueLteDevice, lteEnbNetDevice, LteTft::Default (), rnti, lcid);
epcHelper->ActivateEpsBearer (ueLteDevice, lteEnbNetDevice, EpcTft::Default (), rnti, lcid);
// need this since all sinks are installed in the same node
++udpSinkPort;

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, EpcTft::Default ());
lteHelper->ActivateEpsBearer (ueDevs2, bearer, EpcTft::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, EpcTft::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, EpcTft::Default ());
// Use testing chunk processor in the PHY layer
// It will be used to test that the SNR is as intended

View File

@@ -31,7 +31,7 @@
#include <ns3/simulator.h>
#include <ns3/packet.h>
#include <ns3/ptr.h>
#include "ns3/rlc-stats-calculator.h"
#include "ns3/radio-bearer-stats-calculator.h"
#include <ns3/constant-position-mobility-model.h>
#include "ns3/lte-test-pf-ff-mac-scheduler.h"
#include <ns3/eps-bearer.h>
@@ -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>
@@ -233,15 +233,15 @@ LenaPfFfMacSchedulerTestCase1::DoRun (void)
// LogComponentEnable ("PfFfMacScheduler", LOG_LEVEL_ALL);
LogComponentEnable ("LenaTestPfFfMacCheduler", LOG_LEVEL_ALL);
// LogComponentEnable ("LteAmc", LOG_LEVEL_ALL);
// LogComponentEnable ("RlcStatsCalculator", LOG_LEVEL_ALL);
// LogComponentEnable ("RadioBearerStatsCalculator", LOG_LEVEL_ALL);
/**
* 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, EpcTft::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<RadioBearerStatsCalculator> rlcStats = lteHelper->GetRlcStats ();
rlcStats->SetAttribute ("EpochDuration", TimeValue (Seconds (simulationTime)));
Simulator::Run ();
@@ -414,15 +414,15 @@ LenaPfFfMacSchedulerTestCase2::DoRun (void)
// LogComponentEnable ("PfFfMacScheduler", LOG_LEVEL_ALL);
LogComponentEnable ("LenaTestPfFfMacCheduler", LOG_LEVEL_ALL);
// LogComponentEnable ("LteAmc", LOG_LEVEL_ALL);
// LogComponentEnable ("RlcStatsCalculator", LOG_LEVEL_ALL);
// LogComponentEnable ("RadioBearerStatsCalculator", LOG_LEVEL_ALL);
/**
* 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, EpcTft::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<RadioBearerStatsCalculator> rlcStats = lteHelper->GetRlcStats ();
rlcStats->SetAttribute ("EpochDuration", TimeValue (Seconds (simulationTime)));
Simulator::Run ();

View File

@@ -27,7 +27,7 @@
#include <ns3/packet.h>
#include <ns3/ptr.h>
#include <iostream>
#include "ns3/rlc-stats-calculator.h"
#include "ns3/radio-bearer-stats-calculator.h"
#include <ns3/constant-position-mobility-model.h>
#include "ns3/lte-test-rr-ff-mac-scheduler.h"
#include <ns3/eps-bearer.h>
@@ -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,8 +218,8 @@ LenaRrFfMacSchedulerTestCase::DoRun (void)
// LogComponentEnable ("RrFfMacScheduler", LOG_LEVEL_ALL);
// LogComponentEnable ("LenaTestRrFfMacCheduler", LOG_LEVEL_ALL);
// LogComponentEnable ("LenaHelper", LOG_LEVEL_ALL);
// LogComponentEnable ("RlcStatsCalculator", LOG_LEVEL_ALL);
// LogComponentEnable ("LteHelper", LOG_LEVEL_ALL);
// LogComponentEnable ("RadioBearerStatsCalculator", 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, EpcTft::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<RadioBearerStatsCalculator> rlcStats = lteHelper->GetRlcStats ();
rlcStats->SetAttribute ("EpochDuration", TimeValue (Seconds (simulationTime)));

View File

@@ -29,38 +29,38 @@
#include "ns3/udp-l4-protocol.h"
#include "ns3/tcp-l4-protocol.h"
#include "ns3/eps-tft-classifier.h"
#include "ns3/epc-tft-classifier.h"
#include <iomanip>
NS_LOG_COMPONENT_DEFINE ("TestEpsTftClassifier");
NS_LOG_COMPONENT_DEFINE ("TestEpcTftClassifier");
namespace ns3 {
class EpsTftClassifierTestCase : public TestCase
class EpcTftClassifierTestCase : public TestCase
{
public:
EpsTftClassifierTestCase (Ptr<EpsTftClassifier> c,
LteTft::Direction d,
EpcTftClassifierTestCase (Ptr<EpcTftClassifier> c,
EpcTft::Direction d,
Ipv4Address sa,
Ipv4Address da,
uint16_t sp,
uint16_t dp,
uint8_t tos,
uint32_t tftId);
virtual ~EpsTftClassifierTestCase ();
virtual ~EpcTftClassifierTestCase ();
private:
Ptr<EpsTftClassifier> m_c;
LteTft::Direction m_d;
Ptr<EpcTftClassifier> m_c;
EpcTft::Direction m_d;
uint8_t m_tftId;
Ipv4Header m_ipHeader;
UdpHeader m_udpHeader;
TcpHeader m_tcpHeader;
static std::string BuildNameString (Ptr<EpsTftClassifier> c,
LteTft::Direction d,
static std::string BuildNameString (Ptr<EpcTftClassifier> c,
EpcTft::Direction d,
Ipv4Address sa,
Ipv4Address da,
uint16_t sp,
@@ -70,8 +70,8 @@ private:
virtual void DoRun (void);
};
EpsTftClassifierTestCase::EpsTftClassifierTestCase (Ptr<EpsTftClassifier> c,
LteTft::Direction d,
EpcTftClassifierTestCase::EpcTftClassifierTestCase (Ptr<EpcTftClassifier> c,
EpcTft::Direction d,
Ipv4Address sa,
Ipv4Address da,
uint16_t sp,
@@ -93,13 +93,13 @@ EpsTftClassifierTestCase::EpsTftClassifierTestCase (Ptr<EpsTftClassifier> c,
m_udpHeader.SetDestinationPort (dp);
}
EpsTftClassifierTestCase::~EpsTftClassifierTestCase ()
EpcTftClassifierTestCase::~EpcTftClassifierTestCase ()
{
}
std::string
EpsTftClassifierTestCase::BuildNameString (Ptr<EpsTftClassifier> c,
LteTft::Direction d,
EpcTftClassifierTestCase::BuildNameString (Ptr<EpcTftClassifier> c,
EpcTft::Direction d,
Ipv4Address sa,
Ipv4Address da,
uint16_t sp,
@@ -120,7 +120,7 @@ EpsTftClassifierTestCase::BuildNameString (Ptr<EpsTftClassifier> c,
}
void
EpsTftClassifierTestCase::DoRun (void)
EpcTftClassifierTestCase::DoRun (void)
{
ns3::PacketMetadata::Enable ();
@@ -136,15 +136,15 @@ EpsTftClassifierTestCase::DoRun (void)
class EpsTftClassifierTestSuite : public TestSuite
class EpcTftClassifierTestSuite : public TestSuite
{
public:
EpsTftClassifierTestSuite ();
EpcTftClassifierTestSuite ();
};
static EpsTftClassifierTestSuite g_lteTftClassifierTestSuite;
static EpcTftClassifierTestSuite g_lteTftClassifierTestSuite;
EpsTftClassifierTestSuite::EpsTftClassifierTestSuite ()
EpcTftClassifierTestSuite::EpcTftClassifierTestSuite ()
: TestSuite ("eps-tft-classifier", UNIT)
{
NS_LOG_FUNCTION (this);
@@ -155,19 +155,19 @@ EpsTftClassifierTestSuite::EpsTftClassifierTestSuite ()
///////////////////////////
Ptr<EpsTftClassifier> c1 = Create<EpsTftClassifier> ();
Ptr<EpcTftClassifier> c1 = Create<EpcTftClassifier> ();
Ptr<LteTft> tft1_1 = Create<LteTft> ();
Ptr<EpcTft> tft1_1 = Create<EpcTft> ();
LteTft::PacketFilter pf1_1_1;
EpcTft::PacketFilter pf1_1_1;
pf1_1_1.remoteAddress.Set ("1.0.0.0");
pf1_1_1.localAddress.Set ("2.0.0.0");
pf1_1_1.remoteMask.Set (0xFF000000);
pf1_1_1.localMask.Set (0xFF000000);
tft1_1->Add (pf1_1_1);
LteTft::PacketFilter pf1_1_2;
EpcTft::PacketFilter pf1_1_2;
pf1_1_2.remoteAddress.Set ("3.3.3.0");
pf1_1_2.localAddress.Set ("4.4.4.0");
pf1_1_2.remoteMask.Set (0xFFFFFF00);
@@ -178,26 +178,26 @@ EpsTftClassifierTestSuite::EpsTftClassifierTestSuite ()
Ptr<LteTft> tft1_2 = Create<LteTft> ();
Ptr<EpcTft> tft1_2 = Create<EpcTft> ();
LteTft::PacketFilter pf1_2_1;
EpcTft::PacketFilter pf1_2_1;
pf1_2_1.remotePortStart = 1024;
pf1_2_1.remotePortEnd = 1035;
tft1_2->Add (pf1_2_1);
LteTft::PacketFilter pf1_2_2;
EpcTft::PacketFilter pf1_2_2;
pf1_2_2.localPortStart = 3456;
pf1_2_2.localPortEnd = 3489;
tft1_2->Add (pf1_2_2);
LteTft::PacketFilter pf1_2_3;
EpcTft::PacketFilter pf1_2_3;
pf1_2_3.localPortStart = 7895;
pf1_2_3.localPortEnd = 7895;
tft1_2->Add (pf1_2_3);
LteTft::PacketFilter pf1_2_4;
EpcTft::PacketFilter pf1_2_4;
pf1_2_4.remotePortStart = 5897;
pf1_2_4.remotePortEnd = 5897;
tft1_2->Add (pf1_2_4);
@@ -208,68 +208,68 @@ EpsTftClassifierTestSuite::EpsTftClassifierTestSuite ()
// ------------------------------------classifier---direction--------------src address---------------dst address---src port--dst port--ToS--TFT id
// test IP addresses
AddTestCase (new EpsTftClassifierTestCase (c1, LteTft::UPLINK, Ipv4Address ("2.2.3.4"), Ipv4Address ("1.1.1.1"), 4, 1234, 0, 1));
AddTestCase (new EpsTftClassifierTestCase (c1, LteTft::UPLINK, Ipv4Address ("2.2.3.4"), Ipv4Address ("1.0.0.0"), 2, 123, 5, 1));
AddTestCase (new EpsTftClassifierTestCase (c1, LteTft::UPLINK, Ipv4Address ("6.2.3.4"), Ipv4Address ("1.1.1.1"), 4, 1234, 0, 0));
AddTestCase (new EpsTftClassifierTestCase (c1, LteTft::DOWNLINK, Ipv4Address ("3.3.3.4"), Ipv4Address ("4.4.4.1"), 4, 1234, 0, 1));
AddTestCase (new EpsTftClassifierTestCase (c1, LteTft::DOWNLINK, Ipv4Address ("3.3.4.4"), Ipv4Address ("4.4.4.1"), 4, 1234, 0, 0));
AddTestCase (new EpsTftClassifierTestCase (c1, LteTft::UPLINK, Ipv4Address ("3.3.3.4"), Ipv4Address ("4.4.2.1"), 4, 1234, 0, 0));
AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("2.2.3.4"), Ipv4Address ("1.1.1.1"), 4, 1234, 0, 1));
AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("2.2.3.4"), Ipv4Address ("1.0.0.0"), 2, 123, 5, 1));
AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("6.2.3.4"), Ipv4Address ("1.1.1.1"), 4, 1234, 0, 0));
AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::DOWNLINK, Ipv4Address ("3.3.3.4"), Ipv4Address ("4.4.4.1"), 4, 1234, 0, 1));
AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::DOWNLINK, Ipv4Address ("3.3.4.4"), Ipv4Address ("4.4.4.1"), 4, 1234, 0, 0));
AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("3.3.3.4"), Ipv4Address ("4.4.2.1"), 4, 1234, 0, 0));
// test remote port
AddTestCase (new EpsTftClassifierTestCase (c1, LteTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1024, 0, 2));
AddTestCase (new EpsTftClassifierTestCase (c1, LteTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1025, 0, 2));
AddTestCase (new EpsTftClassifierTestCase (c1, LteTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1035, 0, 2));
AddTestCase (new EpsTftClassifierTestCase (c1, LteTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1234, 0, 0));
AddTestCase (new EpsTftClassifierTestCase (c1, LteTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1024, 0, 0));
AddTestCase (new EpsTftClassifierTestCase (c1, LteTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1025, 0, 0));
AddTestCase (new EpsTftClassifierTestCase (c1, LteTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1035, 0, 0));
AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1024, 0, 2));
AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1025, 0, 2));
AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1035, 0, 2));
AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1234, 0, 0));
AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1024, 0, 0));
AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1025, 0, 0));
AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1035, 0, 0));
// test local port
AddTestCase (new EpsTftClassifierTestCase (c1, LteTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 3456, 0, 0));
AddTestCase (new EpsTftClassifierTestCase (c1, LteTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 3457, 0, 0));
AddTestCase (new EpsTftClassifierTestCase (c1, LteTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 3489, 0, 0));
AddTestCase (new EpsTftClassifierTestCase (c1, LteTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 3456, 6, 0, 2));
AddTestCase (new EpsTftClassifierTestCase (c1, LteTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 3461, 3461, 0, 2));
AddTestCase (new EpsTftClassifierTestCase (c1, LteTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 9, 3489, 0, 2));
AddTestCase (new EpsTftClassifierTestCase (c1, LteTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 9, 7895, 0, 2));
AddTestCase (new EpsTftClassifierTestCase (c1, LteTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 7895, 10, 0, 2));
AddTestCase (new EpsTftClassifierTestCase (c1, LteTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 9, 5897, 0, 2));
AddTestCase (new EpsTftClassifierTestCase (c1, LteTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 5897, 10, 0, 2));
AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 3456, 0, 0));
AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 3457, 0, 0));
AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 3489, 0, 0));
AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 3456, 6, 0, 2));
AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 3461, 3461, 0, 2));
AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 9, 3489, 0, 2));
AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 9, 7895, 0, 2));
AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 7895, 10, 0, 2));
AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 9, 5897, 0, 2));
AddTestCase (new EpcTftClassifierTestCase (c1, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 5897, 10, 0, 2));
///////////////////////////
// check default TFT
///////////////////////////
Ptr<EpsTftClassifier> c2 = Create<EpsTftClassifier> ();
c2->Add (LteTft::Default (), 1);
Ptr<EpcTftClassifier> c2 = Create<EpcTftClassifier> ();
c2->Add (EpcTft::Default (), 1);
// ------------------------------------classifier---direction--------------src address---------------dst address---src port--dst port--ToS--TFT id
// test IP addresses
AddTestCase (new EpsTftClassifierTestCase (c2, LteTft::UPLINK, Ipv4Address ("2.2.3.4"), Ipv4Address ("1.1.1.1"), 4, 1234, 0, 1));
AddTestCase (new EpsTftClassifierTestCase (c2, LteTft::UPLINK, Ipv4Address ("2.2.3.4"), Ipv4Address ("1.0.0.0"), 2, 123, 5, 1));
AddTestCase (new EpsTftClassifierTestCase (c2, LteTft::UPLINK, Ipv4Address ("6.2.3.4"), Ipv4Address ("1.1.1.1"), 4, 1234, 0, 1));
AddTestCase (new EpsTftClassifierTestCase (c2, LteTft::DOWNLINK, Ipv4Address ("3.3.3.4"), Ipv4Address ("4.4.4.1"), 4, 1234, 0, 1));
AddTestCase (new EpsTftClassifierTestCase (c2, LteTft::DOWNLINK, Ipv4Address ("3.3.4.4"), Ipv4Address ("4.4.4.1"), 4, 1234, 0, 1));
AddTestCase (new EpsTftClassifierTestCase (c2, LteTft::UPLINK, Ipv4Address ("3.3.3.4"), Ipv4Address ("4.4.2.1"), 4, 1234, 0, 1));
AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::UPLINK, Ipv4Address ("2.2.3.4"), Ipv4Address ("1.1.1.1"), 4, 1234, 0, 1));
AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::UPLINK, Ipv4Address ("2.2.3.4"), Ipv4Address ("1.0.0.0"), 2, 123, 5, 1));
AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::UPLINK, Ipv4Address ("6.2.3.4"), Ipv4Address ("1.1.1.1"), 4, 1234, 0, 1));
AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::DOWNLINK, Ipv4Address ("3.3.3.4"), Ipv4Address ("4.4.4.1"), 4, 1234, 0, 1));
AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::DOWNLINK, Ipv4Address ("3.3.4.4"), Ipv4Address ("4.4.4.1"), 4, 1234, 0, 1));
AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::UPLINK, Ipv4Address ("3.3.3.4"), Ipv4Address ("4.4.2.1"), 4, 1234, 0, 1));
// test remote port
AddTestCase (new EpsTftClassifierTestCase (c2, LteTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1024, 0, 1));
AddTestCase (new EpsTftClassifierTestCase (c2, LteTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1025, 0, 1));
AddTestCase (new EpsTftClassifierTestCase (c2, LteTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1035, 0, 1));
AddTestCase (new EpsTftClassifierTestCase (c2, LteTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1234, 0, 1));
AddTestCase (new EpsTftClassifierTestCase (c2, LteTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1024, 0, 1));
AddTestCase (new EpsTftClassifierTestCase (c2, LteTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1025, 0, 1));
AddTestCase (new EpsTftClassifierTestCase (c2, LteTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1035, 0, 1));
AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1024, 0, 1));
AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1025, 0, 1));
AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1035, 0, 1));
AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1234, 0, 1));
AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1024, 0, 1));
AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1025, 0, 1));
AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1035, 0, 1));
// test local port
AddTestCase (new EpsTftClassifierTestCase (c2, LteTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 3456, 0, 1));
AddTestCase (new EpsTftClassifierTestCase (c2, LteTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 3457, 0, 1));
AddTestCase (new EpsTftClassifierTestCase (c2, LteTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 3489, 0, 1));
AddTestCase (new EpsTftClassifierTestCase (c2, LteTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 3456, 6, 0, 1));
AddTestCase (new EpsTftClassifierTestCase (c2, LteTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 3461, 3461, 0, 1));
AddTestCase (new EpsTftClassifierTestCase (c2, LteTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 9, 3489, 0, 1));
AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 3456, 0, 1));
AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 3457, 0, 1));
AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 3489, 0, 1));
AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 3456, 6, 0, 1));
AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 3461, 3461, 0, 1));
AddTestCase (new EpcTftClassifierTestCase (c2, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 9, 3489, 0, 1));
@@ -277,37 +277,37 @@ EpsTftClassifierTestSuite::EpsTftClassifierTestSuite ()
// check default TFT plus dedicated ones
///////////////////////////////////////////
Ptr<EpsTftClassifier> c3 = Create<EpsTftClassifier> ();
c3->Add (LteTft::Default (), 1);
Ptr<EpcTftClassifier> c3 = Create<EpcTftClassifier> ();
c3->Add (EpcTft::Default (), 1);
c3->Add (tft1_1, 2);
c3->Add (tft1_2, 3);
// ------------------------------------classifier---direction--------------src address---------------dst address---src port--dst port--ToS--TFT id
// test IP addresses
AddTestCase (new EpsTftClassifierTestCase (c3, LteTft::UPLINK, Ipv4Address ("2.2.3.4"), Ipv4Address ("1.1.1.1"), 4, 1234, 0, 2));
AddTestCase (new EpsTftClassifierTestCase (c3, LteTft::UPLINK, Ipv4Address ("2.2.3.4"), Ipv4Address ("1.0.0.0"), 2, 123, 5, 2));
AddTestCase (new EpsTftClassifierTestCase (c3, LteTft::UPLINK, Ipv4Address ("6.2.3.4"), Ipv4Address ("1.1.1.1"), 4, 1234, 0, 1));
AddTestCase (new EpsTftClassifierTestCase (c3, LteTft::DOWNLINK, Ipv4Address ("3.3.3.4"), Ipv4Address ("4.4.4.1"), 4, 1234, 0, 2));
AddTestCase (new EpsTftClassifierTestCase (c3, LteTft::DOWNLINK, Ipv4Address ("3.3.4.4"), Ipv4Address ("4.4.4.1"), 4, 1234, 0, 1));
AddTestCase (new EpsTftClassifierTestCase (c3, LteTft::UPLINK, Ipv4Address ("3.3.3.4"), Ipv4Address ("4.4.2.1"), 4, 1234, 0, 1));
AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::UPLINK, Ipv4Address ("2.2.3.4"), Ipv4Address ("1.1.1.1"), 4, 1234, 0, 2));
AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::UPLINK, Ipv4Address ("2.2.3.4"), Ipv4Address ("1.0.0.0"), 2, 123, 5, 2));
AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::UPLINK, Ipv4Address ("6.2.3.4"), Ipv4Address ("1.1.1.1"), 4, 1234, 0, 1));
AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::DOWNLINK, Ipv4Address ("3.3.3.4"), Ipv4Address ("4.4.4.1"), 4, 1234, 0, 2));
AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::DOWNLINK, Ipv4Address ("3.3.4.4"), Ipv4Address ("4.4.4.1"), 4, 1234, 0, 1));
AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::UPLINK, Ipv4Address ("3.3.3.4"), Ipv4Address ("4.4.2.1"), 4, 1234, 0, 1));
// test remote port
AddTestCase (new EpsTftClassifierTestCase (c3, LteTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1024, 0, 3));
AddTestCase (new EpsTftClassifierTestCase (c3, LteTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1025, 0, 3));
AddTestCase (new EpsTftClassifierTestCase (c3, LteTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1035, 0, 3));
AddTestCase (new EpsTftClassifierTestCase (c3, LteTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1234, 0, 1));
AddTestCase (new EpsTftClassifierTestCase (c3, LteTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1024, 0, 1));
AddTestCase (new EpsTftClassifierTestCase (c3, LteTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1025, 0, 1));
AddTestCase (new EpsTftClassifierTestCase (c3, LteTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1035, 0, 1));
AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1024, 0, 3));
AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1025, 0, 3));
AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1035, 0, 3));
AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1234, 0, 1));
AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1024, 0, 1));
AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1025, 0, 1));
AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 1035, 0, 1));
// test local port
AddTestCase (new EpsTftClassifierTestCase (c3, LteTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 3456, 0, 1));
AddTestCase (new EpsTftClassifierTestCase (c3, LteTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 3457, 0, 1));
AddTestCase (new EpsTftClassifierTestCase (c3, LteTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 3489, 0, 1));
AddTestCase (new EpsTftClassifierTestCase (c3, LteTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 3456, 6, 0, 3));
AddTestCase (new EpsTftClassifierTestCase (c3, LteTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 3461, 3461, 0, 3));
AddTestCase (new EpsTftClassifierTestCase (c3, LteTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 9, 3489, 0, 3));
AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 3456, 0, 1));
AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 3457, 0, 1));
AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 4, 3489, 0, 1));
AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 3456, 6, 0, 3));
AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 3461, 3461, 0, 3));
AddTestCase (new EpcTftClassifierTestCase (c3, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 9, 3489, 0, 3));
@@ -315,18 +315,18 @@ EpsTftClassifierTestSuite::EpsTftClassifierTestSuite ()
// check two TFTs with different ports
///////////////////////////////////////////
Ptr<EpsTftClassifier> c4 = Create<EpsTftClassifier> ();
Ptr<LteTft> tft4_1 = Create<LteTft> ();
Ptr<EpcTftClassifier> c4 = Create<EpcTftClassifier> ();
Ptr<EpcTft> tft4_1 = Create<EpcTft> ();
tft4_1->Add (pf1_2_3);
c4->Add (tft4_1, 1);
Ptr<LteTft> tft4_2 = Create<LteTft> ();
Ptr<EpcTft> tft4_2 = Create<EpcTft> ();
tft4_2->Add (pf1_2_4);
c4->Add (tft4_2, 2);
AddTestCase (new EpsTftClassifierTestCase (c4, LteTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 9, 3489, 0, 0));
AddTestCase (new EpsTftClassifierTestCase (c4, LteTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 9, 7895, 0, 1));
AddTestCase (new EpsTftClassifierTestCase (c4, LteTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 7895, 10, 0, 1));
AddTestCase (new EpsTftClassifierTestCase (c4, LteTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 9, 5897, 0, 2));
AddTestCase (new EpsTftClassifierTestCase (c4, LteTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 5897, 10, 0, 2));
AddTestCase (new EpcTftClassifierTestCase (c4, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 9, 3489, 0, 0));
AddTestCase (new EpcTftClassifierTestCase (c4, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 9, 7895, 0, 1));
AddTestCase (new EpcTftClassifierTestCase (c4, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 7895, 10, 0, 1));
AddTestCase (new EpcTftClassifierTestCase (c4, EpcTft::UPLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 9, 5897, 0, 2));
AddTestCase (new EpcTftClassifierTestCase (c4, EpcTft::DOWNLINK, Ipv4Address ("9.1.1.1"), Ipv4Address ("8.1.1.1"), 5897, 10, 0, 2));
}

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);
@@ -237,12 +237,12 @@ LteEpcE2eDataTestCase::DoRun ()
EpsBearer epsBearer (EpsBearer::NGBR_VIDEO_TCP_DEFAULT);
Ptr<LteTft> tft = Create<LteTft> ();
LteTft::PacketFilter dlpf;
Ptr<EpcTft> tft = Create<EpcTft> ();
EpcTft::PacketFilter dlpf;
dlpf.localPortStart = dlPort;
dlpf.localPortEnd = dlPort;
tft->Add (dlpf);
LteTft::PacketFilter ulpf;
EpcTft::PacketFilter ulpf;
ulpf.remotePortStart = ulPort;
ulpf.remotePortEnd = ulPort;
tft->Add (ulpf);

View File

@@ -32,11 +32,11 @@ 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',
'helper/rlc-stats-calculator.cc',
'helper/radio-bearer-stats-calculator.cc',
'helper/mac-stats-calculator.cc',
'model/ff-mac-csched-sap.cc',
'model/ff-mac-sched-sap.cc',
@@ -47,7 +47,7 @@ def build(bld):
'model/rr-ff-mac-scheduler.cc',
'model/lte-enb-mac.cc',
'model/lte-ue-mac.cc',
'model/lte-mac-tag.cc',
'model/lte-radio-bearer-tag.cc',
'model/lte-phy-tag.cc',
'model/lte-enb-phy-sap.cc',
'model/lte-ue-phy-sap.cc',
@@ -60,8 +60,8 @@ def build(bld):
'model/epc-gtpu-tunnel-endpoint.cc',
'model/epc-enb-application.cc',
'model/epc-sgw-pgw-application.cc',
'model/lte-tft.cc',
'model/eps-tft-classifier.cc',
'model/epc-tft.cc',
'model/epc-tft-classifier.cc',
]
module_test = bld.create_ns3_module_test_library('lte')
@@ -81,7 +81,7 @@ def build(bld):
'test/lte-test-rlc-um-transmitter.cc',
'test/lte-test-rlc-am-transmitter.cc',
'test/epc-test-gtpu.cc',
'test/test-eps-tft-classifier.cc',
'test/test-epc-tft-classifier.cc',
'test/epc-test-s1u-downlink.cc',
'test/epc-test-s1u-uplink.cc',
'test/test-lte-epc-e2e-data.cc',
@@ -118,12 +118,12 @@ 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',
'helper/mac-stats-calculator.h',
'helper/rlc-stats-calculator.h',
'helper/radio-bearer-stats-calculator.h',
'model/ff-mac-common.h',
'model/ff-mac-csched-sap.h',
'model/ff-mac-sched-sap.h',
@@ -134,7 +134,7 @@ def build(bld):
'model/rr-ff-mac-scheduler.h',
'model/lte-enb-mac.h',
'model/lte-ue-mac.h',
'model/lte-mac-tag.h',
'model/lte-radio-bearer-tag.h',
'model/lte-phy-tag.h',
'model/lte-enb-phy-sap.h',
'model/lte-ue-phy-sap.h',
@@ -160,8 +160,8 @@ def build(bld):
'test/lte-test-rlc-am-transmitter.h',
'test/lte-test-pathloss-model.h',
'test/epc-test-gtpu.h',
'model/lte-tft.h',
'model/eps-tft-classifier.h',
'model/epc-tft.h',
'model/epc-tft-classifier.h',
]
if (bld.env['ENABLE_EXAMPLES']):