diff --git a/src/lte/doc/Makefile b/src/lte/doc/Makefile index 1cb85a944..782363d3a 100644 --- a/src/lte/doc/Makefile +++ b/src/lte/doc/Makefile @@ -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} diff --git a/src/lte/doc/source/conf.py b/src/lte/doc/source/conf.py index 5a278dfc0..7a4f74148 100644 --- a/src/lte/doc/source/conf.py +++ b/src/lte/doc/source/conf.py @@ -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. diff --git a/src/lte/doc/source/phy.seqdiag b/src/lte/doc/source/figures/phy.seqdiag similarity index 100% rename from src/lte/doc/source/phy.seqdiag rename to src/lte/doc/source/figures/phy.seqdiag diff --git a/src/lte/doc/source/helpers.seqdiag b/src/lte/doc/source/helpers.seqdiag index cbd9042ae..8ae874d4f 100644 --- a/src/lte/doc/source/helpers.seqdiag +++ b/src/lte/doc/source/helpers.seqdiag @@ -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"]; diff --git a/src/lte/doc/source/index.rst b/src/lte/doc/source/index.rst index 5688cd8e6..0efcc886a 100644 --- a/src/lte/doc/source/index.rst +++ b/src/lte/doc/source/index.rst @@ -1,3 +1,6 @@ + +.. orphan:: + .. only:: html or latex ns-3 LTE module documentation diff --git a/src/lte/doc/source/lte-design.rst b/src/lte/doc/source/lte-design.rst index 7e8aa9d24..32f4849dd 100644 --- a/src/lte/doc/source/lte-design.rst +++ b/src/lte/doc/source/lte-design.rst @@ -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 diff --git a/src/lte/doc/source/lte-references.rst b/src/lte/doc/source/lte-references.rst index fcc8789e8..4d97a1c17 100644 --- a/src/lte/doc/source/lte-references.rst +++ b/src/lte/doc/source/lte-references.rst @@ -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 diff --git a/src/lte/doc/source/lte-rlc-design.rst b/src/lte/doc/source/lte-rlc-design.rst index 638f6bf5b..0cbb1bdc7 100644 --- a/src/lte/doc/source/lte-rlc-design.rst +++ b/src/lte/doc/source/lte-rlc-design.rst @@ -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 ++++++++++++++++++ diff --git a/src/lte/doc/source/lte-testing.rst b/src/lte/doc/source/lte-testing.rst index abd3ff597..9cab00393 100644 --- a/src/lte/doc/source/lte-testing.rst +++ b/src/lte/doc/source/lte-testing.rst @@ -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 ------------------------------------------- diff --git a/src/lte/doc/source/lte-user.rst b/src/lte/doc/source/lte-user.rst index 447e0ed19..85b605875 100644 --- a/src/lte/doc/source/lte-user.rst +++ b/src/lte/doc/source/lte-user.rst @@ -27,7 +27,7 @@ following steps: 1. *Define the scenario* to be simulated 2. *Write a simulation program* that recreates the desired scenario topology/architecture. This is done accessing the ns-3 LTE model - library using the ``ns3::LenaHelper`` API defined in ``src/lte/helper/lena-helper.h``. + library using the ``ns3::LteHelper`` API defined in ``src/lte/helper/lte-helper.h``. 3. *Specify configuration parameters* of the objects that are being used for the simulation. This can be done using input files (via the ``ns3::ConfigStore``) or directly within the simulation program. @@ -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 lena = CreateObject (); + Ptr lteHelper = CreateObject (); 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 lena = CreateObject (); + Ptr lteHelper = CreateObject (); // 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 lena = CreateObject (); - lena->SetFadingModel("ns3::TraceFadingLossModel"); + Ptr lteHelper = CreateObject (); + lteHelper->SetFadingModel("ns3::TraceFadingLossModel"); And for setting the parameters:: - lena->SetFadingModelAttribute ("TraceFilename", StringValue ("src/lte/model/fading-traces/fading_trace_EPA_3kmph.fad")); - lena->SetFadingModelAttribute ("TraceLength", TimeValue (Seconds (10.0))); - lena->SetFadingModelAttribute ("SamplesNum", UintegerValue (10000)); - lena->SetFadingModelAttribute ("WindowSize", TimeValue (Seconds (0.5))); - lena->SetFadingModelAttribute ("RbNum", UintegerValue (100)); + lteHelper->SetFadingModelAttribute ("TraceFilename", StringValue ("src/lte/model/fading-traces/fading_trace_EPA_3kmph.fad")); + lteHelper->SetFadingModelAttribute ("TraceLength", TimeValue (Seconds (10.0))); + lteHelper->SetFadingModelAttribute ("SamplesNum", UintegerValue (10000)); + lteHelper->SetFadingModelAttribute ("WindowSize", TimeValue (Seconds (0.5))); + lteHelper->SetFadingModelAttribute ("RbNum", UintegerValue (100)); It has to be noted that, ``TraceFilename`` does not have a default value, therefore is has to be always set explicitly. @@ -355,16 +356,16 @@ We now explain by examples how to use the buildings model (in particular, the `` #. Pathloss model selection:: - Ptr lena = CreateObject (); + Ptr lteHelper = CreateObject (); - lena->SetAttribute ("PathlossModel", StringValue ("ns3::BuildingsPropagationLossModel")); + lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::BuildingsPropagationLossModel")); #. EUTRA Band Selection The selection of the working frequency of the propagation model has to be done with the standard ns-3 attribute system as described in the correspond section ("Configuration of LTE model parameters") by means of the DlEarfcn and UlEarfcn parameters, for instance:: - lena->SetEnbDeviceAttribute ("DlEarfcn", UintegerValue (100)); - lena->SetEnbDeviceAttribute ("UlEarfcn", UintegerValue (18100)); + lteHelper->SetEnbDeviceAttribute ("DlEarfcn", UintegerValue (100)); + lteHelper->SetEnbDeviceAttribute ("UlEarfcn", UintegerValue (18100)); It is to be noted that using other means to configure the frequency used by the propagation model (i.e., configuring the corresponding BuildingsPropagationLossModel attributes directly) might generates conflicts in the frequencies definition in the modules during the simulation, and is therefore not advised. @@ -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 mm = enbNodes.Get (0)->GetObject (); 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 lena = CreateObject (); + Ptr lteHelper = CreateObject (); Ptr epcHelper = CreateObject (); Then, you need to tell the LTE helper that the EPC will be used:: - lena->SetEpcHelper (epcHelper); + lteHelper->SetEpcHelper (epcHelper); the above step is necessary so that the LTE helper will trigger the appropriate EPC configuration in correspondance with some important @@ -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. diff --git a/src/lte/examples/lena-cqi-threshold.cc b/src/lte/examples/lena-cqi-threshold.cc index 047da76af..0d9b02225 100644 --- a/src/lte/examples/lena-cqi-threshold.cc +++ b/src/lte/examples/lena-cqi-threshold.cc @@ -77,10 +77,10 @@ int main (int argc, char *argv[]) // parse again so you can override default values from the command line cmd.Parse (argc, argv); - Ptr lena = CreateObject (); - lena->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel")); + Ptr lteHelper = CreateObject (); + lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel")); // Uncomment to enable logging - //lena->EnableLogComponents (); + //lteHelper->EnableLogComponents (); // Create Nodes: eNodeB and UE NodeContainer enbNodes; @@ -98,17 +98,17 @@ int main (int argc, char *argv[]) // Create Devices and install them in the Nodes (eNB and UE) NetDeviceContainer enbDevs; NetDeviceContainer ueDevs; -// lena->SetSchedulerType ("ns3::RrFfMacScheduler"); - lena->SetSchedulerType ("ns3::PfFfMacScheduler"); - lena->SetSchedulerAttribute ("CqiTimerThreshold", UintegerValue (3)); - enbDevs = lena->InstallEnbDevice (enbNodes); - ueDevs = lena->InstallUeDevice (ueNodes); +// lteHelper->SetSchedulerType ("ns3::RrFfMacScheduler"); + lteHelper->SetSchedulerType ("ns3::PfFfMacScheduler"); + lteHelper->SetSchedulerAttribute ("CqiTimerThreshold", UintegerValue (3)); + enbDevs = lteHelper->InstallEnbDevice (enbNodes); + ueDevs = lteHelper->InstallUeDevice (ueNodes); - lena->EnableRlcTraces(); - lena->EnableMacTraces(); + lteHelper->EnableRlcTraces(); + lteHelper->EnableMacTraces(); // Attach a UE to a eNB - lena->Attach (ueDevs, enbDevs.Get (0)); + lteHelper->Attach (ueDevs, enbDevs.Get (0)); Simulator::Schedule (Seconds (0.010), &ChangePosition, ueNodes.Get (0)); Simulator::Schedule (Seconds (0.020), &ChangePosition, ueNodes.Get (0)); @@ -116,7 +116,7 @@ int main (int argc, char *argv[]) // Activate an EPS bearer enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE; EpsBearer bearer (q); - lena->ActivateEpsBearer (ueDevs, bearer, LteTft::Default ()); + lteHelper->ActivateEpsBearer (ueDevs, bearer, EpcTft::Default ()); Simulator::Stop (Seconds (0.030)); diff --git a/src/lte/examples/lena-fading.cc b/src/lte/examples/lena-fading.cc index d7d60e388..26bdebbb2 100644 --- a/src/lte/examples/lena-fading.cc +++ b/src/lte/examples/lena-fading.cc @@ -47,24 +47,24 @@ int main (int argc, char *argv[]) // parse again so you can override default values from the command line //cmd.Parse (argc, argv); - Ptr lena = CreateObject (); + Ptr lteHelper = CreateObject (); // Uncomment to enable logging - //lena->EnableLogComponents (); + //lteHelper->EnableLogComponents (); - lena->SetAttribute ("FadingModel", StringValue ("ns3::TraceFadingLossModel")); + lteHelper->SetAttribute ("FadingModel", StringValue ("ns3::TraceFadingLossModel")); std::ifstream ifTraceFile; ifTraceFile.open ("../../src/lte/model/fading-traces/fading_trace_EPA_3kmph.fad", std::ifstream::in); if (ifTraceFile.good ()) { // script launched by test.py - lena->SetFadingModelAttribute ("TraceFilename", StringValue ("../../src/lte/model/fading-traces/fading_trace_EPA_3kmph.fad")); + lteHelper->SetFadingModelAttribute ("TraceFilename", StringValue ("../../src/lte/model/fading-traces/fading_trace_EPA_3kmph.fad")); } else { // script launched as an example - lena->SetFadingModelAttribute ("TraceFilename", StringValue ("src/lte/model/fading-traces/fading_trace_EPA_3kmph.fad")); + lteHelper->SetFadingModelAttribute ("TraceFilename", StringValue ("src/lte/model/fading-traces/fading_trace_EPA_3kmph.fad")); } // these parameters have to setted only in case of the trace format @@ -73,10 +73,10 @@ int main (int argc, char *argv[]) // - 10,000 samples // - 0.5 seconds for window size // - 100 RB - lena->SetFadingModelAttribute ("TraceLength", TimeValue (Seconds (10.0))); - lena->SetFadingModelAttribute ("SamplesNum", UintegerValue (10000)); - lena->SetFadingModelAttribute ("WindowSize", TimeValue (Seconds (0.5))); - lena->SetFadingModelAttribute ("RbNum", UintegerValue (100)); + lteHelper->SetFadingModelAttribute ("TraceLength", TimeValue (Seconds (10.0))); + lteHelper->SetFadingModelAttribute ("SamplesNum", UintegerValue (10000)); + lteHelper->SetFadingModelAttribute ("WindowSize", TimeValue (Seconds (0.5))); + lteHelper->SetFadingModelAttribute ("RbNum", UintegerValue (100)); // Create Nodes: eNodeB and UE NodeContainer enbNodes; @@ -94,16 +94,16 @@ int main (int argc, char *argv[]) // Create Devices and install them in the Nodes (eNB and UE) NetDeviceContainer enbDevs; NetDeviceContainer ueDevs; - enbDevs = lena->InstallEnbDevice (enbNodes); - ueDevs = lena->InstallUeDevice (ueNodes); + enbDevs = lteHelper->InstallEnbDevice (enbNodes); + ueDevs = lteHelper->InstallUeDevice (ueNodes); // Attach a UE to a eNB - lena->Attach (ueDevs, enbDevs.Get (0)); + lteHelper->Attach (ueDevs, enbDevs.Get (0)); // Activate an EPS bearer enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE; EpsBearer bearer (q); - lena->ActivateEpsBearer (ueDevs, bearer, LteTft::Default ()); + lteHelper->ActivateEpsBearer (ueDevs, bearer, EpcTft::Default ()); Simulator::Stop (Seconds (0.005)); diff --git a/src/lte/examples/lena-intercell-interference.cc b/src/lte/examples/lena-intercell-interference.cc index b99f0e2dc..42a88d856 100644 --- a/src/lte/examples/lena-intercell-interference.cc +++ b/src/lte/examples/lena-intercell-interference.cc @@ -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 #include @@ -68,9 +68,9 @@ int main (int argc, char *argv[]) << "_numUes" << std::setw (3) << std::setfill ('0') << numUes << "_rngRun" << std::setw (3) << std::setfill ('0') << runValue.Get () ; - Ptr lena = CreateObject (); + Ptr lteHelper = CreateObject (); - lena->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel")); + lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel")); // Create Nodes: eNodeB and UE NodeContainer enbNodes; @@ -112,19 +112,19 @@ int main (int argc, char *argv[]) NetDeviceContainer enbDevs; NetDeviceContainer ueDevs1; NetDeviceContainer ueDevs2; - enbDevs = lena->InstallEnbDevice (enbNodes); - ueDevs1 = lena->InstallUeDevice (ueNodes1); - ueDevs2 = lena->InstallUeDevice (ueNodes2); + enbDevs = lteHelper->InstallEnbDevice (enbNodes); + ueDevs1 = lteHelper->InstallUeDevice (ueNodes1); + ueDevs2 = lteHelper->InstallUeDevice (ueNodes2); // Attach UEs to a eNB - lena->Attach (ueDevs1, enbDevs.Get (0)); - lena->Attach (ueDevs2, enbDevs.Get (1)); + lteHelper->Attach (ueDevs1, enbDevs.Get (0)); + lteHelper->Attach (ueDevs2, enbDevs.Get (1)); // Activate an EPS bearer on all UEs enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE; EpsBearer bearer (q); - lena->ActivateEpsBearer (ueDevs1, bearer, LteTft::Default ()); - lena->ActivateEpsBearer (ueDevs2, bearer, LteTft::Default ()); + lteHelper->ActivateEpsBearer (ueDevs1, bearer, 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 (); diff --git a/src/lte/examples/lena-pathloss-traces.cc b/src/lte/examples/lena-pathloss-traces.cc index db1f6d0ed..db1f62bb3 100644 --- a/src/lte/examples/lena-pathloss-traces.cc +++ b/src/lte/examples/lena-pathloss-traces.cc @@ -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 #include @@ -158,7 +158,7 @@ int main (int argc, char *argv[]) << "_numUes" << std::setw (3) << std::setfill ('0') << numUes << "_rngRun" << std::setw (3) << std::setfill ('0') << runValue.Get () ; - Ptr lena = CreateObject (); + Ptr lteHelper = CreateObject (); // NOTE: the PropagationLoss trace source of the SpectrumChannel @@ -174,7 +174,7 @@ int main (int argc, char *argv[]) // but it WON'T work if you ONLY use SpectrumPropagationLossModels such as: // ns3::FriisSpectrumPropagationLossModel // ns3::ConstantSpectrumPropagationLossModel - lena->SetAttribute ("PathlossModel", StringValue ("ns3::Cost231PropagationLossModel")); + lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::Cost231PropagationLossModel")); // Create Nodes: eNodeB and UE @@ -215,19 +215,19 @@ int main (int argc, char *argv[]) NetDeviceContainer enbDevs; NetDeviceContainer ueDevs1; NetDeviceContainer ueDevs2; - enbDevs = lena->InstallEnbDevice (enbNodes); - ueDevs1 = lena->InstallUeDevice (ueNodes1); - ueDevs2 = lena->InstallUeDevice (ueNodes2); + enbDevs = lteHelper->InstallEnbDevice (enbNodes); + ueDevs1 = lteHelper->InstallUeDevice (ueNodes1); + ueDevs2 = lteHelper->InstallUeDevice (ueNodes2); // Attach UEs to a eNB - lena->Attach (ueDevs1, enbDevs.Get (0)); - lena->Attach (ueDevs2, enbDevs.Get (1)); + lteHelper->Attach (ueDevs1, enbDevs.Get (0)); + lteHelper->Attach (ueDevs2, enbDevs.Get (1)); // Activate an EPS bearer on all UEs enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE; EpsBearer bearer (q); - lena->ActivateEpsBearer (ueDevs1, bearer, LteTft::Default ()); - lena->ActivateEpsBearer (ueDevs2, bearer, LteTft::Default ()); + lteHelper->ActivateEpsBearer (ueDevs1, bearer, 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)); diff --git a/src/lte/examples/lena-profiling.cc b/src/lte/examples/lena-profiling.cc index bff661964..52c0c8a7d 100644 --- a/src/lte/examples/lena-profiling.cc +++ b/src/lte/examples/lena-profiling.cc @@ -66,18 +66,18 @@ main (int argc, char *argv[]) uint32_t nRooms = ceil (sqrt (nEnbPerFloor)); uint32_t nEnb; - Ptr < LenaHelper > lena = CreateObject (); - //lena->EnableLogComponents (); + Ptr < LteHelper > lteHelper = CreateObject (); + //lteHelper->EnableLogComponents (); //LogComponentEnable ("BuildingsPropagationLossModel", LOG_LEVEL_ALL); if (nFloors == 0) { - lena->SetAttribute("PathlossModel", + lteHelper->SetAttribute("PathlossModel", StringValue("ns3::FriisPropagationLossModel")); nEnb = nEnbPerFloor; } else { - lena->SetAttribute("PathlossModel", + lteHelper->SetAttribute("PathlossModel", StringValue("ns3::BuildingsPropagationLossModel")); nEnb = nFloors * nEnbPerFloor; } @@ -191,21 +191,21 @@ main (int argc, char *argv[]) // Create Devices and install them in the Nodes (eNB and UE) NetDeviceContainer enbDevs; vector < NetDeviceContainer > ueDevs; - enbDevs = lena->InstallEnbDevice(enbNodes); + enbDevs = lteHelper->InstallEnbDevice(enbNodes); for (uint32_t i = 0; i < nEnb; i++) { - NetDeviceContainer ueDev = lena->InstallUeDevice(ueNodes[i]); + NetDeviceContainer ueDev = lteHelper->InstallUeDevice(ueNodes[i]); ueDevs.push_back(ueDev); - lena->Attach(ueDev, enbDevs.Get(i)); + lteHelper->Attach(ueDev, enbDevs.Get(i)); enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE; EpsBearer bearer(q); - lena->ActivateEpsBearer(ueDev, bearer, LteTft::Default ()); + lteHelper->ActivateEpsBearer(ueDev, bearer, EpcTft::Default ()); } Simulator::Stop(Seconds(simTime)); - lena->SetTraceDirectory(traceDirectory); - lena->EnableRlcTraces(); - lena->EnableMacTraces(); + lteHelper->SetTraceDirectory(traceDirectory); + lteHelper->EnableRlcTraces(); + lteHelper->EnableMacTraces(); Simulator::Run(); diff --git a/src/lte/examples/lena-rlc-traces.cc b/src/lte/examples/lena-rlc-traces.cc index 8aa1c54d7..a57c2ef87 100644 --- a/src/lte/examples/lena-rlc-traces.cc +++ b/src/lte/examples/lena-rlc-traces.cc @@ -41,12 +41,12 @@ int main (int argc, char *argv[]) // parse again so you can override default values from the command line cmd.Parse (argc, argv); - Ptr lena = CreateObject (); + Ptr lteHelper = CreateObject (); - lena->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel")); + lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel")); // Enable LTE log components - //lena->EnableLogComponents (); - lena->EnableRlcTraces(); + //lteHelper->EnableLogComponents (); + lteHelper->EnableRlcTraces(); // Create Nodes: eNodeB and UE NodeContainer enbNodes; @@ -64,21 +64,21 @@ int main (int argc, char *argv[]) // Create Devices and install them in the Nodes (eNB and UE) NetDeviceContainer enbDevs; NetDeviceContainer ueDevs; - enbDevs = lena->InstallEnbDevice (enbNodes); - ueDevs = lena->InstallUeDevice (ueNodes); + enbDevs = lteHelper->InstallEnbDevice (enbNodes); + ueDevs = lteHelper->InstallUeDevice (ueNodes); // Attach a UE to a eNB - lena->Attach (ueDevs, enbDevs.Get (0)); + lteHelper->Attach (ueDevs, enbDevs.Get (0)); // Activate an EPS bearer enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE; EpsBearer bearer (q); - lena->ActivateEpsBearer (ueDevs, bearer, LteTft::Default ()); + lteHelper->ActivateEpsBearer (ueDevs, bearer, EpcTft::Default ()); Simulator::Stop (Seconds (2)); - lena->EnableMacTraces (); - lena->EnableRlcTraces (); + lteHelper->EnableMacTraces (); + lteHelper->EnableRlcTraces (); double distance_temp [] = { 10000,10000,10000}; diff --git a/src/lte/examples/lena-simple-epc.cc b/src/lte/examples/lena-simple-epc.cc index 0607b6d62..1e039b49e 100644 --- a/src/lte/examples/lena-simple-epc.cc +++ b/src/lte/examples/lena-simple-epc.cc @@ -18,7 +18,7 @@ * Author: Jaume Nin */ -#include "ns3/lena-helper.h" +#include "ns3/lte-helper.h" #include "ns3/epc-helper.h" #include "ns3/core-module.h" #include "ns3/network-module.h" @@ -55,7 +55,7 @@ main (int argc, char *argv[]) cmd.AddValue("simTime", "Total duration of the simulation (in seconds)",simTime); cmd.Parse(argc, argv); - Ptr lteHelper = CreateObject (); + Ptr lteHelper = CreateObject (); Ptr epcHelper = CreateObject (); lteHelper->SetEpcHelper (epcHelper); lteHelper->SetSchedulerType("ns3::RrFfMacScheduler"); @@ -130,7 +130,7 @@ main (int argc, char *argv[]) Ptr ueStaticRouting = ipv4RoutingHelper.GetStaticRouting (ueNode->GetObject ()); 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 diff --git a/src/lte/examples/lena-simple.cc b/src/lte/examples/lena-simple.cc index ad27f0012..05c40d7b5 100644 --- a/src/lte/examples/lena-simple.cc +++ b/src/lte/examples/lena-simple.cc @@ -45,10 +45,10 @@ int main (int argc, char *argv[]) // Parse again so you can override default values from the command line cmd.Parse (argc, argv); - Ptr lena = CreateObject (); + Ptr lteHelper = CreateObject (); // Uncomment to enable logging - //lena->EnableLogComponents (); + //lteHelper->EnableLogComponents (); // Create Nodes: eNodeB and UE NodeContainer enbNodes; @@ -67,18 +67,18 @@ int main (int argc, char *argv[]) NetDeviceContainer enbDevs; NetDeviceContainer ueDevs; // Default scheduler is PF, uncomment to use RR - //lena->SetSchedulerType ("ns3::RrFfMacScheduler"); + //lteHelper->SetSchedulerType ("ns3::RrFfMacScheduler"); - enbDevs = lena->InstallEnbDevice (enbNodes); - ueDevs = lena->InstallUeDevice (ueNodes); + enbDevs = lteHelper->InstallEnbDevice (enbNodes); + ueDevs = lteHelper->InstallUeDevice (ueNodes); // Attach a UE to a eNB - lena->Attach (ueDevs, enbDevs.Get (0)); + lteHelper->Attach (ueDevs, enbDevs.Get (0)); // Activate an EPS bearer enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE; EpsBearer bearer (q); - lena->ActivateEpsBearer (ueDevs, bearer, LteTft::Default ()); + lteHelper->ActivateEpsBearer (ueDevs, bearer, EpcTft::Default ()); Simulator::Stop (Seconds (0.005)); diff --git a/src/lte/helper/epc-helper.cc b/src/lte/helper/epc-helper.cc index 3d6bdfca4..1b7ec9595 100644 --- a/src/lte/helper/epc-helper.cc +++ b/src/lte/helper/epc-helper.cc @@ -186,7 +186,7 @@ EpcHelper::AddEnb (Ptr enb, Ptr lteEnbNetDevice) void -EpcHelper::ActivateEpsBearer (Ptr ueLteDevice, Ptr enbLteDevice, Ptr tft, uint16_t rnti, uint8_t lcid) +EpcHelper::ActivateEpsBearer (Ptr ueLteDevice, Ptr enbLteDevice, Ptr tft, uint16_t rnti, uint8_t lcid) { Ptr ueNode = ueLteDevice->GetNode (); Ptr ueIpv4 = ueNode->GetObject (); diff --git a/src/lte/helper/epc-helper.h b/src/lte/helper/epc-helper.h index 7066add83..5cde2b006 100644 --- a/src/lte/helper/epc-helper.h +++ b/src/lte/helper/epc-helper.h @@ -25,7 +25,7 @@ #include #include #include -#include +#include 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 ueLteDevice, Ptr enbLteDevice, Ptr tft, uint16_t rnti, uint8_t lcid); + void ActivateEpsBearer (Ptr ueLteDevice, Ptr enbLteDevice, Ptr tft, uint16_t rnti, uint8_t lcid); /** diff --git a/src/lte/helper/lena-helper.cc b/src/lte/helper/lte-helper.cc similarity index 90% rename from src/lte/helper/lena-helper.cc rename to src/lte/helper/lte-helper.cc index a0b7c5476..9fff6b159 100644 --- a/src/lte/helper/lena-helper.cc +++ b/src/lte/helper/lte-helper.cc @@ -20,7 +20,7 @@ */ -#include "lena-helper.h" +#include "lte-helper.h" #include #include #include @@ -49,20 +49,20 @@ #include -NS_LOG_COMPONENT_DEFINE ("LenaHelper"); +NS_LOG_COMPONENT_DEFINE ("LteHelper"); namespace ns3 { -NS_OBJECT_ENSURE_REGISTERED (LenaHelper); +NS_OBJECT_ENSURE_REGISTERED (LteHelper); -LenaHelper::LenaHelper (void) +LteHelper::LteHelper (void) { NS_LOG_FUNCTION (this); m_enbNetDeviceFactory.SetTypeId (LteEnbNetDevice::GetTypeId ()); } void -LenaHelper::DoStart (void) +LteHelper::DoStart (void) { NS_LOG_FUNCTION (this); m_downlinkChannel = CreateObject (); @@ -109,47 +109,47 @@ LenaHelper::DoStart (void) m_macStats = CreateObject (); m_macStats->SetDlOutputFilename("DlMacStats.csv"); m_macStats->SetUlOutputFilename("UlMacStats.csv"); - m_rlcStats = CreateObject (); + m_rlcStats = CreateObject (); m_rlcStats->SetDlOutputFilename("DlRlcStats.csv"); m_rlcStats->SetUlOutputFilename("UlRlcStats.csv"); - m_pdcpStats = CreateObject (); + m_pdcpStats = CreateObject (); 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 () - .AddConstructor () + .AddConstructor () .AddAttribute ("Scheduler", "The type of scheduler to be used for eNBs", StringValue ("ns3::PfFfMacScheduler"), - MakeStringAccessor (&LenaHelper::SetSchedulerType), + MakeStringAccessor (&LteHelper::SetSchedulerType), MakeStringChecker ()) .AddAttribute ("PathlossModel", "The type of pathloss model to be used", StringValue ("ns3::FriisPropagationLossModel"), - MakeStringAccessor (&LenaHelper::SetPathlossModelType), + MakeStringAccessor (&LteHelper::SetPathlossModelType), MakeStringChecker ()) .AddAttribute ("FadingModel", "The type of fading model to be used", StringValue (""), // fake module -> no fading - MakeStringAccessor (&LenaHelper::SetFadingModel), + MakeStringAccessor (&LteHelper::SetFadingModel), MakeStringChecker ()) .AddAttribute ("EpsBearerToRlcMapping", "Specify which type of RLC will be used for each type of EPS bearer. ", EnumValue (RLC_SM_ALWAYS), - MakeEnumAccessor (&LenaHelper::m_epsBearerToRlcMapping), + MakeEnumAccessor (&LteHelper::m_epsBearerToRlcMapping), MakeEnumChecker (RLC_SM_ALWAYS, "RlcSmAlways", RLC_UM_ALWAYS, "RlcUmAlways", RLC_AM_ALWAYS, "RlcAmAlways", @@ -159,7 +159,7 @@ TypeId LenaHelper::GetTypeId (void) } void -LenaHelper::DoDispose () +LteHelper::DoDispose () { NS_LOG_FUNCTION (this); m_downlinkChannel = 0; @@ -169,7 +169,7 @@ LenaHelper::DoDispose () void -LenaHelper::SetEpcHelper (Ptr h) +LteHelper::SetEpcHelper (Ptr h) { NS_LOG_FUNCTION (this << h); m_epcHelper = h; @@ -181,7 +181,7 @@ LenaHelper::SetEpcHelper (Ptr h) } void -LenaHelper::SetSchedulerType (std::string type) +LteHelper::SetSchedulerType (std::string type) { NS_LOG_FUNCTION (this << type); m_schedulerFactory = ObjectFactory (); @@ -189,7 +189,7 @@ LenaHelper::SetSchedulerType (std::string type) } void -LenaHelper::SetSchedulerAttribute (std::string n, const AttributeValue &v) +LteHelper::SetSchedulerAttribute (std::string n, const AttributeValue &v) { NS_LOG_FUNCTION (this << n); m_schedulerFactory.Set (n, v); @@ -197,7 +197,7 @@ LenaHelper::SetSchedulerAttribute (std::string n, const AttributeValue &v) void -LenaHelper::SetPathlossModelType (std::string type) +LteHelper::SetPathlossModelType (std::string type) { NS_LOG_FUNCTION (this << type); m_dlPathlossModelFactory = ObjectFactory (); @@ -207,7 +207,7 @@ LenaHelper::SetPathlossModelType (std::string type) } void -LenaHelper::SetPathlossModelAttribute (std::string n, const AttributeValue &v) +LteHelper::SetPathlossModelAttribute (std::string n, const AttributeValue &v) { NS_LOG_FUNCTION (this << n); m_dlPathlossModelFactory.Set (n, v); @@ -215,14 +215,14 @@ LenaHelper::SetPathlossModelAttribute (std::string n, const AttributeValue &v) } void -LenaHelper::SetEnbDeviceAttribute (std::string n, const AttributeValue &v) +LteHelper::SetEnbDeviceAttribute (std::string n, const AttributeValue &v) { NS_LOG_FUNCTION (this); m_enbNetDeviceFactory.Set (n, v); } void -LenaHelper::SetFadingModel (std::string type) +LteHelper::SetFadingModel (std::string type) { NS_LOG_FUNCTION (this << type); m_fadingModelType = type; @@ -234,14 +234,14 @@ LenaHelper::SetFadingModel (std::string type) } void -LenaHelper::SetFadingModelAttribute (std::string n, const AttributeValue &v) +LteHelper::SetFadingModelAttribute (std::string n, const AttributeValue &v) { m_fadingModelFactory.Set (n, v); } NetDeviceContainer -LenaHelper::InstallEnbDevice (NodeContainer c) +LteHelper::InstallEnbDevice (NodeContainer c) { NS_LOG_FUNCTION (this); Start (); // will run DoStart () if necessary @@ -256,7 +256,7 @@ LenaHelper::InstallEnbDevice (NodeContainer c) } NetDeviceContainer -LenaHelper::InstallUeDevice (NodeContainer c) +LteHelper::InstallUeDevice (NodeContainer c) { NS_LOG_FUNCTION (this); NetDeviceContainer devices; @@ -271,7 +271,7 @@ LenaHelper::InstallUeDevice (NodeContainer c) Ptr -LenaHelper::InstallSingleEnbDevice (Ptr n) +LteHelper::InstallSingleEnbDevice (Ptr n) { Ptr dlPhy = CreateObject (); Ptr ulPhy = CreateObject (); @@ -285,7 +285,7 @@ LenaHelper::InstallSingleEnbDevice (Ptr n) ulPhy->SetChannel (m_uplinkChannel); Ptr mm = n->GetObject (); - NS_ASSERT_MSG (mm, "MobilityModel needs to be set on node before calling LenaHelper::InstallUeDevice ()"); + NS_ASSERT_MSG (mm, "MobilityModel needs to be set on node before calling LteHelper::InstallUeDevice ()"); dlPhy->SetMobility (mm); ulPhy->SetMobility (mm); m_uplinkChannel->AddRx (ulPhy); @@ -354,7 +354,7 @@ LenaHelper::InstallSingleEnbDevice (Ptr n) } Ptr -LenaHelper::InstallSingleUeDevice (Ptr n) +LteHelper::InstallSingleUeDevice (Ptr n) { NS_LOG_FUNCTION (this); Ptr dlPhy = CreateObject (); @@ -369,7 +369,7 @@ LenaHelper::InstallSingleUeDevice (Ptr n) ulPhy->SetChannel (m_uplinkChannel); Ptr mm = n->GetObject (); - NS_ASSERT_MSG (mm, "MobilityModel needs to be set on node before calling LenaHelper::InstallUeDevice ()"); + NS_ASSERT_MSG (mm, "MobilityModel needs to be set on node before calling LteHelper::InstallUeDevice ()"); dlPhy->SetMobility (mm); ulPhy->SetMobility (mm); @@ -400,7 +400,7 @@ LenaHelper::InstallSingleUeDevice (Ptr n) void -LenaHelper::Attach (NetDeviceContainer ueDevices, Ptr enbDevice) +LteHelper::Attach (NetDeviceContainer ueDevices, Ptr enbDevice) { for (NetDeviceContainer::Iterator i = ueDevices.Begin (); i != ueDevices.End (); ++i) { @@ -409,7 +409,7 @@ LenaHelper::Attach (NetDeviceContainer ueDevices, Ptr enbDevice) } void -LenaHelper::Attach (Ptr ueDevice, Ptr enbDevice) +LteHelper::Attach (Ptr ueDevice, Ptr enbDevice) { // setup RRC connection Ptr enbRrc = enbDevice->GetObject ()->GetRrc (); @@ -452,7 +452,7 @@ LenaHelper::Attach (Ptr ueDevice, Ptr enbDevice) void -LenaHelper::ActivateEpsBearer (NetDeviceContainer ueDevices, EpsBearer bearer, Ptr tft) +LteHelper::ActivateEpsBearer (NetDeviceContainer ueDevices, EpsBearer bearer, Ptr tft) { for (NetDeviceContainer::Iterator i = ueDevices.Begin (); i != ueDevices.End (); ++i) { @@ -462,7 +462,7 @@ LenaHelper::ActivateEpsBearer (NetDeviceContainer ueDevices, EpsBearer bearer, P void -LenaHelper::ActivateEpsBearer (Ptr ueDevice, EpsBearer bearer, Ptr tft) +LteHelper::ActivateEpsBearer (Ptr ueDevice, EpsBearer bearer, Ptr tft) { NS_LOG_INFO (" setting up Radio Bearer"); Ptr enbDevice = ueDevice->GetObject ()->GetTargetEnb (); @@ -482,7 +482,7 @@ LenaHelper::ActivateEpsBearer (Ptr ueDevice, EpsBearer bearer, Ptr rlcStats, std::string path, +DlTxPduCallback (Ptr 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 rlcStats, std::string path, } void -DlRxPduCallback (Ptr rlcStats, std::string path, +DlRxPduCallback (Ptr 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 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 rlcStats, std::string path, +UlTxPduCallback (Ptr 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 rlcStats, std::string path, } void -UlRxPduCallback (Ptr rlcStats, std::string path, +UlRxPduCallback (Ptr 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 macStats, } void -LenaHelper::EnableUlRlcTraces (void) +LteHelper::EnableUlRlcTraces (void) { Config::Connect ("/NodeList/*/DeviceList/*/LteUeRrc/RadioBearerMap/*/LteRlc/TxPDU", MakeBoundCallback (&UlTxPduCallback, m_rlcStats)); @@ -833,7 +833,7 @@ LenaHelper::EnableUlRlcTraces (void) } void -LenaHelper::EnableMacTraces (void) +LteHelper::EnableMacTraces (void) { EnableDlMacTraces (); EnableUlMacTraces (); @@ -841,7 +841,7 @@ LenaHelper::EnableMacTraces (void) void -LenaHelper::EnableDlMacTraces (void) +LteHelper::EnableDlMacTraces (void) { Config::Connect ("/NodeList/*/DeviceList/*/LteEnbMac/DlScheduling", MakeBoundCallback (&DlSchedulingCallback, m_macStats)); @@ -881,14 +881,14 @@ UlSchedulingCallback (Ptr macStats, std::string path, } void -LenaHelper::EnableUlMacTraces (void) +LteHelper::EnableUlMacTraces (void) { Config::Connect ("/NodeList/*/DeviceList/*/LteEnbMac/UlScheduling", MakeBoundCallback (&UlSchedulingCallback, m_macStats)); } void -LenaHelper::SetTraceDirectory (std::string path) +LteHelper::SetTraceDirectory (std::string path) { m_macStats->SetDlOutputFilename(path + m_macStats->GetDlOutputFilename()); m_macStats->SetUlOutputFilename(path + m_macStats->GetUlOutputFilename()); @@ -896,21 +896,21 @@ LenaHelper::SetTraceDirectory (std::string path) m_rlcStats->SetUlOutputFilename(path + m_rlcStats->GetUlOutputFilename()); } -Ptr -LenaHelper::GetRlcStats (void) +Ptr +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 -LenaHelper::GetPdcpStats (void) +Ptr +LteHelper::GetPdcpStats (void) { return m_pdcpStats; } diff --git a/src/lte/helper/lena-helper.h b/src/lte/helper/lte-helper.h similarity index 92% rename from src/lte/helper/lena-helper.h rename to src/lte/helper/lte-helper.h index a2ff8bc31..573376d76 100644 --- a/src/lte/helper/lena-helper.h +++ b/src/lte/helper/lte-helper.h @@ -18,8 +18,8 @@ * Author: Nicola Baldo */ -#ifndef LENA_HELPER_H -#define LENA_HELPER_H +#ifndef LTE_HELPER_H +#define LTE_HELPER_H #include #include @@ -30,8 +30,8 @@ #include #include #include -#include -#include +#include +#include #include 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 tft); + void ActivateEpsBearer (NetDeviceContainer ueDevices, EpsBearer bearer, Ptr 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 ueDevice, EpsBearer bearer, Ptr tft); + void ActivateEpsBearer (Ptr ueDevice, EpsBearer bearer, Ptr tft); /** * @@ -232,7 +232,7 @@ public: * * \return the RLC stats calculator object */ - Ptr GetRlcStats (void); + Ptr GetRlcStats (void); /** * Enable trace sinks for PDCP layer @@ -253,7 +253,7 @@ public: * * \return the PDCP stats calculator object */ - Ptr GetPdcpStats (void); + Ptr GetPdcpStats (void); protected: // inherited from Object @@ -282,8 +282,8 @@ private: Ptr m_fadingModule; Ptr m_macStats; - Ptr m_rlcStats; - Ptr m_pdcpStats; + Ptr m_rlcStats; + Ptr 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 diff --git a/src/lte/helper/rlc-stats-calculator.cc b/src/lte/helper/radio-bearer-stats-calculator.cc similarity index 86% rename from src/lte/helper/rlc-stats-calculator.cc rename to src/lte/helper/radio-bearer-stats-calculator.cc index f81b2c888..0e21f4c2f 100644 --- a/src/lte/helper/rlc-stats-calculator.cc +++ b/src/lte/helper/radio-bearer-stats-calculator.cc @@ -18,7 +18,7 @@ * Author: Jaume Nin */ -#include "rlc-stats-calculator.h" +#include "radio-bearer-stats-calculator.h" #include "ns3/string.h" #include "ns3/nstime.h" #include @@ -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 () - .AddConstructor () + .AddConstructor () .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 -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 -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 -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 -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); diff --git a/src/lte/helper/rlc-stats-calculator.h b/src/lte/helper/radio-bearer-stats-calculator.h similarity index 96% rename from src/lte/helper/rlc-stats-calculator.h rename to src/lte/helper/radio-bearer-stats-calculator.h index 5699df281..ba0831ac5 100644 --- a/src/lte/helper/rlc-stats-calculator.h +++ b/src/lte/helper/radio-bearer-stats-calculator.h @@ -18,8 +18,8 @@ * Author: Jaume Nin */ -#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 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_ */ diff --git a/src/lte/model/epc-enb-application.cc b/src/lte/model/epc-enb-application.cc index 906a311db..9e1f705f9 100644 --- a/src/lte/model/epc-enb-application.cc +++ b/src/lte/model/epc-enb-application.cc @@ -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) 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, 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); diff --git a/src/lte/model/epc-sgw-pgw-application.cc b/src/lte/model/epc-sgw-pgw-application.cc index c9528e302..02f0a1aa8 100644 --- a/src/lte/model/epc-sgw-pgw-application.cc +++ b/src/lte/model/epc-sgw-pgw-application.cc @@ -44,7 +44,7 @@ EpcSgwPgwApplication::UeInfo::UeInfo () } void -EpcSgwPgwApplication::UeInfo::AddBearer (Ptr tft, uint32_t teid) +EpcSgwPgwApplication::UeInfo::AddBearer (Ptr tft, uint32_t teid) { NS_LOG_FUNCTION (this << tft << teid); return m_tftClassifier.Add (tft, teid); @@ -57,7 +57,7 @@ EpcSgwPgwApplication::UeInfo::Classify (Ptr 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 tft) +EpcSgwPgwApplication::ActivateS1Bearer (Ipv4Address ueAddr, Ipv4Address enbAddr, Ptr tft) { NS_LOG_FUNCTION (this << ueAddr << enbAddr << tft); diff --git a/src/lte/model/epc-sgw-pgw-application.h b/src/lte/model/epc-sgw-pgw-application.h index 105869c0d..3fdd1ea53 100644 --- a/src/lte/model/epc-sgw-pgw-application.h +++ b/src/lte/model/epc-sgw-pgw-application.h @@ -31,8 +31,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -80,7 +80,7 @@ public: * * \return the TunnelEndpointIdentifier of this EPS bearer */ - uint32_t ActivateS1Bearer (Ipv4Address ueAddr, Ipv4Address enbAddr, Ptr tft); + uint32_t ActivateS1Bearer (Ipv4Address ueAddr, Ipv4Address enbAddr, Ptr 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 tft, uint32_t teid); + void AddBearer (Ptr tft, uint32_t teid); /** * @@ -169,7 +169,7 @@ private: private: - EpsTftClassifier m_tftClassifier; + EpcTftClassifier m_tftClassifier; Ipv4Address m_enbAddr; }; diff --git a/src/lte/model/eps-tft-classifier.cc b/src/lte/model/epc-tft-classifier.cc similarity index 83% rename from src/lte/model/eps-tft-classifier.cc rename to src/lte/model/epc-tft-classifier.cc index 1ce2e0b6e..cdc4b9476 100644 --- a/src/lte/model/eps-tft-classifier.cc +++ b/src/lte/model/epc-tft-classifier.cc @@ -17,8 +17,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Authors: - * Nicola Baldo (the EpsTftClassifier class) - * Giuseppe Piro (part of the code in EpsTftClassifier::Classify () + * Nicola Baldo (the EpcTftClassifier class) + * Giuseppe Piro (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 tft, uint32_t id) +EpcTftClassifier::Add (Ptr tft, uint32_t id) { NS_LOG_FUNCTION (this << tft); @@ -57,7 +57,7 @@ EpsTftClassifier::Add (Ptr 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 p, LteTft::Direction direction) +EpcTftClassifier::Classify (Ptr p, EpcTft::Direction direction) { NS_LOG_FUNCTION (this << p << direction); @@ -78,14 +78,14 @@ EpsTftClassifier::Classify (Ptr 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 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 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 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 >::const_reverse_iterator it; + std::map >::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: " << it->second); - Ptr tft = it->second; + NS_LOG_LOGIC (" Ptr: " << it->second); + Ptr tft = it->second; if (tft->Matches (direction, remoteAddress, localAddress, remotePort, localPort, tos)) { NS_LOG_LOGIC ("matches with TFT ID = " << it->first); diff --git a/src/lte/model/eps-tft-classifier.h b/src/lte/model/epc-tft-classifier.h similarity index 83% rename from src/lte/model/eps-tft-classifier.h rename to src/lte/model/epc-tft-classifier.h index f054be339..60ee81452 100644 --- a/src/lte/model/eps-tft-classifier.h +++ b/src/lte/model/epc-tft-classifier.h @@ -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 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 +class EpcTftClassifier : public SimpleRefCount { public: - EpsTftClassifier (); + EpcTftClassifier (); /** * add a TFT to the Classifier @@ -52,7 +52,7 @@ public: * \param tft the TFT to be added * */ - void Add (Ptr tft, uint32_t id); + void Add (Ptr 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 p, LteTft::Direction direction); + uint32_t Classify (Ptr p, EpcTft::Direction direction); protected: - std::map > m_tftMap; + std::map > m_tftMap; }; diff --git a/src/lte/model/lte-tft.cc b/src/lte/model/epc-tft.cc similarity index 89% rename from src/lte/model/lte-tft.cc rename to src/lte/model/epc-tft.cc index 3733979f5..bc6ff37a4 100644 --- a/src/lte/model/lte-tft.cc +++ b/src/lte/model/epc-tft.cc @@ -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::Default () +Ptr +EpcTft::Default () { - Ptr tft = Create (); - LteTft::PacketFilter defaultPacketFilter; + Ptr tft = Create (); + 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, diff --git a/src/lte/model/lte-tft.h b/src/lte/model/epc-tft.h similarity index 95% rename from src/lte/model/lte-tft.h rename to src/lte/model/epc-tft.h index 2f1ea4eaf..1ac6cb3cb 100644 --- a/src/lte/model/lte-tft.h +++ b/src/lte/model/epc-tft.h @@ -19,8 +19,8 @@ */ -#ifndef LTE_TFT_H -#define LTE_TFT_H +#ifndef EPC_TFT_H +#define EPC_TFT_H #include @@ -37,7 +37,7 @@ namespace ns3 { * which is the set of all packet filters associated with an EPS bearer. * */ -class LteTft : public SimpleRefCount +class EpcTft : public SimpleRefCount { public: @@ -48,7 +48,7 @@ public: * * \return a newly created TFT that will match any traffic */ - static Ptr Default (); + static Ptr 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 */ diff --git a/src/lte/model/lte-enb-mac.cc b/src/lte/model/lte-enb-mac.cc index 38fc0f226..e11a82854 100644 --- a/src/lte/model/lte-enb-mac.cc +++ b/src/lte/model/lte-enb-mac.cc @@ -30,7 +30,7 @@ #include "lte-ue-net-device.h" #include -#include +#include #include #include "ns3/lte-mac-sap.h" @@ -515,7 +515,7 @@ void LteEnbMac::DoReceivePhyPdu (Ptr 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 pb = CreateObject (); // pb->AddPacket (params.pdu); diff --git a/src/lte/model/lte-enb-rrc.cc b/src/lte/model/lte-enb-rrc.cc index 50efd06a8..b3ad11f6b 100644 --- a/src/lte/model/lte-enb-rrc.cc +++ b/src/lte/model/lte-enb-rrc.cc @@ -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) { 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); diff --git a/src/lte/model/lte-net-device.cc b/src/lte/model/lte-net-device.cc index 30cc5a640..5cb0617b8 100644 --- a/src/lte/model/lte-net-device.cc +++ b/src/lte/model/lte-net-device.cc @@ -32,7 +32,7 @@ #include "ns3/enum.h" #include "lte-amc.h" #include "ns3/ipv4-header.h" -#include +#include #include #include diff --git a/src/lte/model/lte-mac-tag.cc b/src/lte/model/lte-radio-bearer-tag.cc similarity index 67% rename from src/lte/model/lte-mac-tag.cc rename to src/lte/model/lte-radio-bearer-tag.cc index 40a147812..121e58129 100644 --- a/src/lte/model/lte-mac-tag.cc +++ b/src/lte/model/lte-radio-bearer-tag.cc @@ -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 () - .AddConstructor () + .AddConstructor () .AddAttribute ("rnti", "The rnti that indicates the UE which packet belongs", UintegerValue (0), - MakeUintegerAccessor (&LteMacTag::GetRnti), + MakeUintegerAccessor (&LteRadioBearerTag::GetRnti), MakeUintegerChecker ()) .AddAttribute ("lcid", "The LC id that indicates the UE which packet belongs", UintegerValue (0), - MakeUintegerAccessor (&LteMacTag::GetLcid), + MakeUintegerAccessor (&LteRadioBearerTag::GetLcid), MakeUintegerChecker ()) ; 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; } diff --git a/src/lte/model/lte-mac-tag.h b/src/lte/model/lte-radio-bearer-tag.h similarity index 84% rename from src/lte/model/lte-mac-tag.h rename to src/lte/model/lte-radio-bearer-tag.h index fdc36992d..d48672023 100644 --- a/src/lte/model/lte-mac-tag.h +++ b/src/lte/model/lte-radio-bearer-tag.h @@ -17,8 +17,8 @@ * * Author: Author: Marco Miozzo */ -#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 */ diff --git a/src/lte/model/lte-spectrum-phy.cc b/src/lte/model/lte-spectrum-phy.cc index c82f4c865..e7f64bffe 100644 --- a/src/lte/model/lte-spectrum-phy.cc +++ b/src/lte/model/lte-spectrum-phy.cc @@ -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" diff --git a/src/lte/model/lte-ue-mac.cc b/src/lte/model/lte-ue-mac.cc index c3ddc3072..781c11da7 100644 --- a/src/lte/model/lte-ue-mac.cc +++ b/src/lte/model/lte-ue-mac.cc @@ -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 #include #include @@ -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 pb = CreateObject (); // pb->AddPacket (params.pdu); @@ -325,7 +325,7 @@ LteUeMac::DoRemoveLc (uint8_t lcId) void LteUeMac::DoReceivePhyPdu (Ptr p) { - LteMacTag tag; + LteRadioBearerTag tag; p->RemovePacketTag (tag); if (tag.GetRnti () == m_rnti) { diff --git a/src/lte/model/lte-ue-rrc.cc b/src/lte/model/lte-ue-rrc.cc index 899102a3c..b793dec63 100644 --- a/src/lte/model/lte-ue-rrc.cc +++ b/src/lte/model/lte-ue-rrc.cc @@ -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 tft) +LteUeRrc::SetupRadioBearer (uint16_t rnti, EpsBearer bearer, TypeId rlcTypeId, uint8_t lcid, Ptr tft) { NS_LOG_FUNCTION (this << (uint32_t) rnti << (uint32_t) lcid); @@ -229,7 +229,7 @@ bool LteUeRrc::Send (Ptr 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; diff --git a/src/lte/model/lte-ue-rrc.h b/src/lte/model/lte-ue-rrc.h index fd2582947..ef9995b06 100644 --- a/src/lte/model/lte-ue-rrc.h +++ b/src/lte/model/lte-ue-rrc.h @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include @@ -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 tft); + void SetupRadioBearer (uint16_t rnti, EpsBearer bearer, TypeId rlcTypeId, uint8_t lcid, Ptr tft); /** @@ -182,7 +182,7 @@ private: std::map > m_rbMap; - EpsTftClassifier m_tftClassifier; + EpcTftClassifier m_tftClassifier; }; diff --git a/src/lte/model/trace-fading-loss-model.cc b/src/lte/model/trace-fading-loss-model.cc index a94b281ab..85ca7cee6 100644 --- a/src/lte/model/trace-fading-loss-model.cc +++ b/src/lte/model/trace-fading-loss-model.cc @@ -48,6 +48,15 @@ TraceFadingLossModel::TraceFadingLossModel () TraceFadingLossModel::~TraceFadingLossModel () { m_fadingTrace.clear (); + m_windowOffsetsMap.clear (); + std::map ::iterator itVar; + itVar = m_startVariableMap.begin (); + while (itVar!=m_startVariableMap.end ()) + { + delete ((*itVar).second); + itVar++; + } + m_startVariableMap.clear (); } diff --git a/src/lte/test/epc-test-s1u-downlink.cc b/src/lte/test/epc-test-s1u-downlink.cc index 6a94650fd..d6a927ae4 100644 --- a/src/lte/test/epc-test-s1u-downlink.cc +++ b/src/lte/test/epc-test-s1u-downlink.cc @@ -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); } diff --git a/src/lte/test/epc-test-s1u-uplink.cc b/src/lte/test/epc-test-s1u-uplink.cc index 8dee90747..d6d630c39 100644 --- a/src/lte/test/epc-test-s1u-uplink.cc +++ b/src/lte/test/epc-test-s1u-uplink.cc @@ -19,7 +19,7 @@ * The original version of UdpClient is by Amine Ismail * * The rest of the code (including modifying UdpClient into - * LteMacTagUdpClient) is by Nicola Baldo + * LteRadioBearerTagUdpClient) is by Nicola Baldo */ @@ -41,7 +41,7 @@ #include #include #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 () - .AddConstructor () + .AddConstructor () .AddAttribute ("MaxPackets", "The maximum number of packets the application will send", UintegerValue (100), - MakeUintegerAccessor (&LteMacTagUdpClient::m_count), + MakeUintegerAccessor (&LteRadioBearerTagUdpClient::m_count), MakeUintegerChecker ()) .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 ()) .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 (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 > ()); - 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 p = Create (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 (); Time interPacketInterval = Seconds (0.01); - Ptr client = CreateObject (enbit->ues[u].rnti, enbit->ues[u].lcid); + Ptr client = CreateObject (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; diff --git a/src/lte/test/lte-test-fading.cc b/src/lte/test/lte-test-fading.cc index 0eece5fb5..082e538c8 100644 --- a/src/lte/test/lte-test-fading.cc +++ b/src/lte/test/lte-test-fading.cc @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include "ns3/string.h" #include "ns3/double.h" @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include #include "lte-test-sinr-chunk-processor.h" @@ -83,9 +83,9 @@ LteFadingTestSuite::LteFadingTestSuite () // NS_LOG_INFO ("Creating LteDownlinkSinrTestSuite"); - Ptr lena = CreateObject (); + Ptr lteHelper = CreateObject (); - lena->SetAttribute ("PathlossModel", StringValue ("ns3::BuildingsPropagationLossModel")); + lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::BuildingsPropagationLossModel")); // Create Nodes: eNodeB, home eNB, UE and home UE (UE attached to HeNB) NodeContainer enbNodes; @@ -109,15 +109,15 @@ LteFadingTestSuite::LteFadingTestSuite () NetDeviceContainer henbDevs; NetDeviceContainer ueDevs; NetDeviceContainer hueDevs; - enbDevs = lena->InstallEnbDevice (enbNodes); - ueDevs = lena->InstallUeDevice (ueNodes); - henbDevs = lena->InstallEnbDevice (henbNodes); - hueDevs = lena->InstallUeDevice (hueNodes); + enbDevs = lteHelper->InstallEnbDevice (enbNodes); + ueDevs = lteHelper->InstallUeDevice (ueNodes); + henbDevs = lteHelper->InstallEnbDevice (henbNodes); + hueDevs = lteHelper->InstallUeDevice (hueNodes); - lena->Attach (ueDevs, enbDevs.Get (0)); - lena->Attach (hueDevs, henbDevs.Get (0)); + lteHelper->Attach (ueDevs, enbDevs.Get (0)); + lteHelper->Attach (hueDevs, henbDevs.Get (0)); // Test #1 Okumura Hata Model (150 < freq < 1500 MHz) (Macro<->UE) @@ -239,7 +239,7 @@ LteFadingTestSuite::LteFadingTestSuite () /* // LogLevel logLevel = (LogLevel)(LOG_PREFIX_FUNC | LOG_PREFIX_TIME | LOG_LEVEL_ALL); // - // LogComponentEnable ("LenaHelper", logLevel); + // LogComponentEnable ("LteHelper", logLevel); LogComponentEnable ("LteShadowingTest", LOG_LEVEL_ALL); // LogComponentEnable ("BuildingsPropagationLossModel", logLevel); // LogComponentEnable ("LteInterference", logLevel); @@ -524,11 +524,11 @@ LteShadowingSystemTestCase::DoRun (void) LogComponentEnable ("BuildingsPropagationLossModel", LOG_LEVEL_ALL); - Ptr lena = CreateObject (); - lena->EnableLogComponents (); - lena->EnableMacTraces (); - lena->EnableRlcTraces (); - lena->SetAttribute ("PropagationModel", StringValue ("ns3::BuildingsPropagationLossModel")); + Ptr lteHelper = CreateObject (); + lteHelper->EnableLogComponents (); + lteHelper->EnableMacTraces (); + lteHelper->EnableRlcTraces (); + lteHelper->SetAttribute ("PropagationModel", StringValue ("ns3::BuildingsPropagationLossModel")); //Create Nodes: eNodeB and UE NodeContainer enbNodes; @@ -545,9 +545,9 @@ LteShadowingSystemTestCase::DoRun (void) // Create Devices and install them in the Nodes (eNB and UE) NetDeviceContainer enbDevs; NetDeviceContainer ueDevs; - lena->SetSchedulerType ("ns3::RrFfMacScheduler"); - enbDevs = lena->InstallEnbDevice (enbNodes); - ueDevs = lena->InstallUeDevice (ueNodes); + lteHelper->SetSchedulerType ("ns3::RrFfMacScheduler"); + enbDevs = lteHelper->InstallEnbDevice (enbNodes); + ueDevs = lteHelper->InstallUeDevice (ueNodes); Ptr mm_enb = enbNodes.Get (0)->GetObject (); mm_enb->SetPosition (Vector (0.0, 0.0, 30.0)); @@ -567,12 +567,12 @@ LteShadowingSystemTestCase::DoRun (void) uePhy->SetAttribute ("NoiseFigure", DoubleValue (9.0)); // Attach a UE to a eNB - lena->Attach (ueDevs, enbDevs.Get (0)); + lteHelper->Attach (ueDevs, enbDevs.Get (0)); // Activate an EPS bearer enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE; EpsBearer bearer (q); - lena->ActivateEpsBearer (ueDevs, bearer); + lteHelper->ActivateEpsBearer (ueDevs, bearer); // Use testing chunk processor in the PHY layer // It will be used to test that the SNR is as intended diff --git a/src/lte/test/lte-test-interference.cc b/src/lte/test/lte-test-interference.cc index fa8cd127e..dd200427a 100644 --- a/src/lte/test/lte-test-interference.cc +++ b/src/lte/test/lte-test-interference.cc @@ -25,7 +25,7 @@ #include "ns3/double.h" #include "ns3/mobility-helper.h" -#include "ns3/lena-helper.h" +#include "ns3/lte-helper.h" #include "ns3/lte-enb-phy.h" #include "ns3/lte-enb-net-device.h" @@ -112,11 +112,11 @@ LteInterferenceTestCase::~LteInterferenceTestCase () void LteInterferenceTestCase::DoRun (void) { - Ptr lena = CreateObject (); -// lena->EnableLogComponents (); - lena->EnableMacTraces (); - lena->EnableRlcTraces (); - lena->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel")); + Ptr lteHelper = CreateObject (); +// lteHelper->EnableLogComponents (); + lteHelper->EnableMacTraces (); + lteHelper->EnableRlcTraces (); + lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel")); // Create Nodes: eNodeB and UE NodeContainer enbNodes; @@ -149,19 +149,19 @@ LteInterferenceTestCase::DoRun (void) NetDeviceContainer enbDevs; NetDeviceContainer ueDevs1; NetDeviceContainer ueDevs2; - lena->SetSchedulerType ("ns3::RrFfMacScheduler"); - enbDevs = lena->InstallEnbDevice (enbNodes); - ueDevs1 = lena->InstallUeDevice (ueNodes1); - ueDevs2 = lena->InstallUeDevice (ueNodes2); + lteHelper->SetSchedulerType ("ns3::RrFfMacScheduler"); + enbDevs = lteHelper->InstallEnbDevice (enbNodes); + ueDevs1 = lteHelper->InstallUeDevice (ueNodes1); + ueDevs2 = lteHelper->InstallUeDevice (ueNodes2); - lena->Attach (ueDevs1, enbDevs.Get (0)); - lena->Attach (ueDevs2, enbDevs.Get (1)); + lteHelper->Attach (ueDevs1, enbDevs.Get (0)); + lteHelper->Attach (ueDevs2, enbDevs.Get (1)); // Activate an EPS bearer enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE; EpsBearer bearer (q); - lena->ActivateEpsBearer (ueDevs1, bearer, LteTft::Default ()); - lena->ActivateEpsBearer (ueDevs2, bearer, LteTft::Default ()); + lteHelper->ActivateEpsBearer (ueDevs1, bearer, 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 diff --git a/src/lte/test/lte-test-link-adaptation.cc b/src/lte/test/lte-test-link-adaptation.cc index f28f5e5e1..2f1a90fb2 100644 --- a/src/lte/test/lte-test-link-adaptation.cc +++ b/src/lte/test/lte-test-link-adaptation.cc @@ -24,7 +24,7 @@ #include "ns3/double.h" #include "ns3/mobility-helper.h" -#include "ns3/lena-helper.h" +#include "ns3/lte-helper.h" #include "ns3/lte-ue-phy.h" #include "ns3/lte-ue-net-device.h" @@ -158,13 +158,13 @@ LteLinkAdaptationTestCase::DoRun (void) * Simulation Topology */ - Ptr lena = CreateObject (); -// lena->EnableLogComponents (); - lena->EnableMacTraces (); - lena->EnableRlcTraces (); - lena->SetAttribute ("PathlossModel", StringValue ("ns3::ConstantSpectrumPropagationLossModel")); + Ptr lteHelper = CreateObject (); +// lteHelper->EnableLogComponents (); + lteHelper->EnableMacTraces (); + lteHelper->EnableRlcTraces (); + lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::ConstantSpectrumPropagationLossModel")); NS_LOG_INFO ("SNR = " << m_snrDb << " LOSS = " << m_loss); - lena->SetPathlossModelAttribute ("Loss", DoubleValue (m_loss)); + lteHelper->SetPathlossModelAttribute ("Loss", DoubleValue (m_loss)); // Create Nodes: eNodeB and UE NodeContainer enbNodes; @@ -181,17 +181,17 @@ LteLinkAdaptationTestCase::DoRun (void) // Create Devices and install them in the Nodes (eNB and UE) NetDeviceContainer enbDevs; NetDeviceContainer ueDevs; - lena->SetSchedulerType ("ns3::RrFfMacScheduler"); - enbDevs = lena->InstallEnbDevice (enbNodes); - ueDevs = lena->InstallUeDevice (ueNodes); + lteHelper->SetSchedulerType ("ns3::RrFfMacScheduler"); + enbDevs = lteHelper->InstallEnbDevice (enbNodes); + ueDevs = lteHelper->InstallUeDevice (ueNodes); // Attach a UE to a eNB - lena->Attach (ueDevs, enbDevs.Get (0)); + lteHelper->Attach (ueDevs, enbDevs.Get (0)); // Activate the default EPS bearer enum EpsBearer::Qci q = EpsBearer::NGBR_VIDEO_TCP_DEFAULT; EpsBearer bearer (q); - lena->ActivateEpsBearer (ueDevs, bearer, LteTft::Default ()); + lteHelper->ActivateEpsBearer (ueDevs, bearer, EpcTft::Default ()); // Use testing chunk processor in the PHY layer // It will be used to test that the SNR is as intended diff --git a/src/lte/test/lte-test-pathloss-model.cc b/src/lte/test/lte-test-pathloss-model.cc index 33b04563f..9fcc9c09f 100644 --- a/src/lte/test/lte-test-pathloss-model.cc +++ b/src/lte/test/lte-test-pathloss-model.cc @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include "ns3/string.h" #include "ns3/double.h" @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include #include @@ -78,7 +78,7 @@ LtePathlossModelTestSuite::LtePathlossModelTestSuite () // LogLevel logLevel = (LogLevel)(LOG_PREFIX_FUNC | LOG_PREFIX_TIME | LOG_LEVEL_ALL); - // LogComponentEnable ("LenaHelper", logLevel); + // LogComponentEnable ("LteHelper", logLevel); // LogComponentEnable ("LtePathlossModelTest", logLevel); // LogComponentEnable ("BuildingsPropagationLossModel", logLevel); // LogComponentEnable ("LteInterference", logLevel); @@ -200,23 +200,23 @@ LtePathlossModelSystemTestCase::DoRun (void) // LogComponentEnable ("LteUePhy", LOG_LEVEL_ALL); // LogComponentEnable ("SingleModelSpectrumChannel", LOG_LEVEL_ALL); LogComponentEnable ("BuildingsPropagationLossModel", LOG_LEVEL_ALL); -// LogComponentEnable ("LenaHelper", LOG_LEVEL_ALL); +// LogComponentEnable ("LteHelper", LOG_LEVEL_ALL); // LogComponentDisable ("BuildingsPropagationLossModel", LOG_LEVEL_ALL); // - Ptr lena = CreateObject (); - // lena->EnableLogComponents (); - lena->EnableMacTraces (); - lena->EnableRlcTraces (); - lena->SetAttribute ("PathlossModel", StringValue ("ns3::BuildingsPropagationLossModel")); + Ptr lteHelper = CreateObject (); + // lteHelper->EnableLogComponents (); + lteHelper->EnableMacTraces (); + lteHelper->EnableRlcTraces (); + lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::BuildingsPropagationLossModel")); // set frequency. This is important because it changes the behavior of the pathloss model - lena->SetEnbDeviceAttribute ("DlEarfcn", UintegerValue (200)); + lteHelper->SetEnbDeviceAttribute ("DlEarfcn", UintegerValue (200)); // remove shadowing component - lena->SetPathlossModelAttribute ("ShadowSigmaOutdoor", DoubleValue (0.0)); - lena->SetPathlossModelAttribute ("ShadowSigmaIndoor", DoubleValue (0.0)); - lena->SetPathlossModelAttribute ("ShadowSigmaExtWalls", DoubleValue (0.0)); + lteHelper->SetPathlossModelAttribute ("ShadowSigmaOutdoor", DoubleValue (0.0)); + lteHelper->SetPathlossModelAttribute ("ShadowSigmaIndoor", DoubleValue (0.0)); + lteHelper->SetPathlossModelAttribute ("ShadowSigmaExtWalls", DoubleValue (0.0)); // Create Nodes: eNodeB and UE NodeContainer enbNodes; @@ -233,9 +233,9 @@ LtePathlossModelSystemTestCase::DoRun (void) // Create Devices and install them in the Nodes (eNB and UE) NetDeviceContainer enbDevs; NetDeviceContainer ueDevs; - lena->SetSchedulerType ("ns3::RrFfMacScheduler"); - enbDevs = lena->InstallEnbDevice (enbNodes); - ueDevs = lena->InstallUeDevice (ueNodes); + lteHelper->SetSchedulerType ("ns3::RrFfMacScheduler"); + enbDevs = lteHelper->InstallEnbDevice (enbNodes); + ueDevs = lteHelper->InstallUeDevice (ueNodes); Ptr mm_enb = enbNodes.Get (0)->GetObject (); mm_enb->SetPosition (Vector (0.0, 0.0, 30.0)); @@ -254,13 +254,13 @@ LtePathlossModelSystemTestCase::DoRun (void) // Attach a UE to a eNB - lena->Attach (ueDevs, enbDevs.Get (0)); + lteHelper->Attach (ueDevs, enbDevs.Get (0)); // Activate an EPS bearer enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE; EpsBearer bearer (q); - lena->ActivateEpsBearer (ueDevs, bearer, LteTft::Default ()); + lteHelper->ActivateEpsBearer (ueDevs, bearer, EpcTft::Default ()); // Use testing chunk processor in the PHY layer // It will be used to test that the SNR is as intended diff --git a/src/lte/test/lte-test-pf-ff-mac-scheduler.cc b/src/lte/test/lte-test-pf-ff-mac-scheduler.cc index ccbba68d0..48660cc66 100644 --- a/src/lte/test/lte-test-pf-ff-mac-scheduler.cc +++ b/src/lte/test/lte-test-pf-ff-mac-scheduler.cc @@ -31,7 +31,7 @@ #include #include #include -#include "ns3/rlc-stats-calculator.h" +#include "ns3/radio-bearer-stats-calculator.h" #include #include "ns3/lte-test-pf-ff-mac-scheduler.h" #include @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include "ns3/string.h" #include "ns3/double.h" #include @@ -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 lena = CreateObject (); + Ptr lteHelper = CreateObject (); - lena->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel")); + lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel")); // Create Nodes: eNodeB and UE NodeContainer enbNodes; @@ -259,17 +259,17 @@ LenaPfFfMacSchedulerTestCase1::DoRun (void) // Create Devices and install them in the Nodes (eNB and UE) NetDeviceContainer enbDevs; NetDeviceContainer ueDevs; - lena->SetSchedulerType ("ns3::PfFfMacScheduler"); - enbDevs = lena->InstallEnbDevice (enbNodes); - ueDevs = lena->InstallUeDevice (ueNodes); + lteHelper->SetSchedulerType ("ns3::PfFfMacScheduler"); + enbDevs = lteHelper->InstallEnbDevice (enbNodes); + ueDevs = lteHelper->InstallUeDevice (ueNodes); // Attach a UE to a eNB - lena->Attach (ueDevs, enbDevs.Get (0)); + lteHelper->Attach (ueDevs, enbDevs.Get (0)); // Activate an EPS bearer enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE; EpsBearer bearer (q); - lena->ActivateEpsBearer (ueDevs, bearer, LteTft::Default ()); + lteHelper->ActivateEpsBearer (ueDevs, bearer, EpcTft::Default ()); Ptr lteEnbDev = enbDevs.Get (0)->GetObject (); Ptr enbPhy = lteEnbDev->GetPhy (); @@ -287,13 +287,13 @@ LenaPfFfMacSchedulerTestCase1::DoRun (void) uePhy->SetAttribute ("NoiseFigure", DoubleValue (9.0)); } - lena->EnableRlcTraces (); + lteHelper->EnableRlcTraces (); double simulationTime = 1.0; double tolerance = 0.1; Simulator::Stop (Seconds (simulationTime)); - Ptr rlcStats = lena->GetRlcStats (); + Ptr rlcStats = lteHelper->GetRlcStats (); rlcStats->SetAttribute ("EpochDuration", TimeValue (Seconds (simulationTime))); Simulator::Run (); @@ -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 lena = CreateObject (); + Ptr lteHelper = CreateObject (); - lena->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel")); + lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel")); // Create Nodes: eNodeB and UE NodeContainer enbNodes; @@ -440,17 +440,17 @@ LenaPfFfMacSchedulerTestCase2::DoRun (void) // Create Devices and install them in the Nodes (eNB and UE) NetDeviceContainer enbDevs; NetDeviceContainer ueDevs; - lena->SetSchedulerType ("ns3::PfFfMacScheduler"); - enbDevs = lena->InstallEnbDevice (enbNodes); - ueDevs = lena->InstallUeDevice (ueNodes); + lteHelper->SetSchedulerType ("ns3::PfFfMacScheduler"); + enbDevs = lteHelper->InstallEnbDevice (enbNodes); + ueDevs = lteHelper->InstallUeDevice (ueNodes); // Attach a UE to a eNB - lena->Attach (ueDevs, enbDevs.Get (0)); + lteHelper->Attach (ueDevs, enbDevs.Get (0)); // Activate an EPS bearer enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE; EpsBearer bearer (q); - lena->ActivateEpsBearer (ueDevs, bearer, LteTft::Default ()); + lteHelper->ActivateEpsBearer (ueDevs, bearer, EpcTft::Default ()); Ptr lteEnbDev = enbDevs.Get (0)->GetObject (); Ptr enbPhy = lteEnbDev->GetPhy (); @@ -468,13 +468,13 @@ LenaPfFfMacSchedulerTestCase2::DoRun (void) uePhy->SetAttribute ("NoiseFigure", DoubleValue (9.0)); } - lena->EnableRlcTraces (); + lteHelper->EnableRlcTraces (); double simulationTime = 0.4; double tolerance = 0.1; Simulator::Stop (Seconds (simulationTime)); - Ptr rlcStats = lena->GetRlcStats (); + Ptr rlcStats = lteHelper->GetRlcStats (); rlcStats->SetAttribute ("EpochDuration", TimeValue (Seconds (simulationTime))); Simulator::Run (); diff --git a/src/lte/test/lte-test-rr-ff-mac-scheduler.cc b/src/lte/test/lte-test-rr-ff-mac-scheduler.cc index f5467b662..76d99c1ce 100644 --- a/src/lte/test/lte-test-rr-ff-mac-scheduler.cc +++ b/src/lte/test/lte-test-rr-ff-mac-scheduler.cc @@ -27,7 +27,7 @@ #include #include #include -#include "ns3/rlc-stats-calculator.h" +#include "ns3/radio-bearer-stats-calculator.h" #include #include "ns3/lte-test-rr-ff-mac-scheduler.h" #include @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include "ns3/string.h" #include "ns3/double.h" #include @@ -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 lena = CreateObject (); + Ptr lteHelper = CreateObject (); - lena->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel")); + lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel")); // Create Nodes: eNodeB and UE NodeContainer enbNodes; @@ -247,17 +247,17 @@ LenaRrFfMacSchedulerTestCase::DoRun (void) // Create Devices and install them in the Nodes (eNB and UE) NetDeviceContainer enbDevs; NetDeviceContainer ueDevs; - lena->SetSchedulerType ("ns3::RrFfMacScheduler"); - enbDevs = lena->InstallEnbDevice (enbNodes); - ueDevs = lena->InstallUeDevice (ueNodes); + lteHelper->SetSchedulerType ("ns3::RrFfMacScheduler"); + enbDevs = lteHelper->InstallEnbDevice (enbNodes); + ueDevs = lteHelper->InstallUeDevice (ueNodes); // Attach a UE to a eNB - lena->Attach (ueDevs, enbDevs.Get (0)); + lteHelper->Attach (ueDevs, enbDevs.Get (0)); // Activate an EPS bearer enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE; EpsBearer bearer (q); - lena->ActivateEpsBearer (ueDevs, bearer, LteTft::Default ()); + lteHelper->ActivateEpsBearer (ueDevs, bearer, EpcTft::Default ()); Ptr lteEnbDev = enbDevs.Get (0)->GetObject (); @@ -276,12 +276,12 @@ LenaRrFfMacSchedulerTestCase::DoRun (void) uePhy->SetAttribute ("NoiseFigure", DoubleValue (9.0)); } - lena->EnableRlcTraces (); + lteHelper->EnableRlcTraces (); double simulationTime = 0.4; double tolerance = 0.1; Simulator::Stop (Seconds (simulationTime)); - Ptr rlcStats = lena->GetRlcStats (); + Ptr rlcStats = lteHelper->GetRlcStats (); rlcStats->SetAttribute ("EpochDuration", TimeValue (Seconds (simulationTime))); diff --git a/src/lte/test/test-eps-tft-classifier.cc b/src/lte/test/test-epc-tft-classifier.cc similarity index 65% rename from src/lte/test/test-eps-tft-classifier.cc rename to src/lte/test/test-epc-tft-classifier.cc index b53bf9eda..79db33bf4 100644 --- a/src/lte/test/test-eps-tft-classifier.cc +++ b/src/lte/test/test-epc-tft-classifier.cc @@ -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 -NS_LOG_COMPONENT_DEFINE ("TestEpsTftClassifier"); +NS_LOG_COMPONENT_DEFINE ("TestEpcTftClassifier"); namespace ns3 { -class EpsTftClassifierTestCase : public TestCase +class EpcTftClassifierTestCase : public TestCase { public: - EpsTftClassifierTestCase (Ptr c, - LteTft::Direction d, + EpcTftClassifierTestCase (Ptr 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 m_c; - LteTft::Direction m_d; + Ptr m_c; + EpcTft::Direction m_d; uint8_t m_tftId; Ipv4Header m_ipHeader; UdpHeader m_udpHeader; TcpHeader m_tcpHeader; - static std::string BuildNameString (Ptr c, - LteTft::Direction d, + static std::string BuildNameString (Ptr c, + EpcTft::Direction d, Ipv4Address sa, Ipv4Address da, uint16_t sp, @@ -70,8 +70,8 @@ private: virtual void DoRun (void); }; -EpsTftClassifierTestCase::EpsTftClassifierTestCase (Ptr c, - LteTft::Direction d, +EpcTftClassifierTestCase::EpcTftClassifierTestCase (Ptr c, + EpcTft::Direction d, Ipv4Address sa, Ipv4Address da, uint16_t sp, @@ -93,13 +93,13 @@ EpsTftClassifierTestCase::EpsTftClassifierTestCase (Ptr c, m_udpHeader.SetDestinationPort (dp); } -EpsTftClassifierTestCase::~EpsTftClassifierTestCase () +EpcTftClassifierTestCase::~EpcTftClassifierTestCase () { } std::string -EpsTftClassifierTestCase::BuildNameString (Ptr c, - LteTft::Direction d, +EpcTftClassifierTestCase::BuildNameString (Ptr c, + EpcTft::Direction d, Ipv4Address sa, Ipv4Address da, uint16_t sp, @@ -120,7 +120,7 @@ EpsTftClassifierTestCase::BuildNameString (Ptr 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 c1 = Create (); + Ptr c1 = Create (); - Ptr tft1_1 = Create (); + Ptr tft1_1 = Create (); - 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 tft1_2 = Create (); + Ptr tft1_2 = Create (); - 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 c2 = Create (); - c2->Add (LteTft::Default (), 1); + Ptr c2 = Create (); + 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 c3 = Create (); - c3->Add (LteTft::Default (), 1); + Ptr c3 = Create (); + 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 c4 = Create (); - Ptr tft4_1 = Create (); + Ptr c4 = Create (); + Ptr tft4_1 = Create (); tft4_1->Add (pf1_2_3); c4->Add (tft4_1, 1); - Ptr tft4_2 = Create (); + Ptr tft4_2 = Create (); 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)); } diff --git a/src/lte/test/test-lte-epc-e2e-data.cc b/src/lte/test/test-lte-epc-e2e-data.cc index 9bcfcf98a..834e3a324 100644 --- a/src/lte/test/test-lte-epc-e2e-data.cc +++ b/src/lte/test/test-lte-epc-e2e-data.cc @@ -23,7 +23,7 @@ #include "ns3/simulator.h" #include "ns3/log.h" #include "ns3/test.h" -#include "ns3/lena-helper.h" +#include "ns3/lte-helper.h" #include "ns3/epc-helper.h" #include "ns3/packet-sink-helper.h" #include "ns3/udp-client-server-helper.h" @@ -107,7 +107,7 @@ void LteEpcE2eDataTestCase::DoRun () { - Ptr lteHelper = CreateObject (); + Ptr lteHelper = CreateObject (); Ptr epcHelper = CreateObject (); lteHelper->SetEpcHelper (epcHelper); @@ -237,12 +237,12 @@ LteEpcE2eDataTestCase::DoRun () EpsBearer epsBearer (EpsBearer::NGBR_VIDEO_TCP_DEFAULT); - Ptr tft = Create (); - LteTft::PacketFilter dlpf; + Ptr tft = Create (); + 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); diff --git a/src/lte/wscript b/src/lte/wscript index 47194d7f2..c59ba5b3a 100644 --- a/src/lte/wscript +++ b/src/lte/wscript @@ -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']):