Ns3 Projects for B.E/B.Tech M.E/M.Tech PhD Scholars.  Phone-Number:9790238391   E-mail: ns3simulation@gmail.com

HOW TO IMPORT PROPAGATION-LOSS-MODEL.H IN NS3

To import PROPAGATION-LOSS-MODEL.H packages in NS3 our developers work on various propagation loss models, such as free-space path loss, log-distance path loss, and shadowing effects.  The PropagationLossModel class simulates how signal strength decreases as it moves through different environments. It serves as a base for various models of signal loss, including free-space path loss, log-distance path loss, and shadowing effects. Subclasses create specific models to represent different wireless communication situations. Knowing about propagation-loss-model.h is important for simulating and studying signal weakening and coverage in NS-3.

PRE-REQUISITES:

  1. Fresh installation of Ubuntu 22.04 LTS:

Screenshot:

Fresh installation of Ubuntu 22_04 LTS

2.NS-3.35 Installation:

Screenshot:

NS-3.35 Installation

HEADER FILE VERIFICATION:

  1. Locate to the ns3.35/src/propagation/examples/ folder:

Screenshot:

2.Copy the main-propagation-loss.cc file to scratch folder:

Next, we need to copy the main-propagation-loss.cc file from ns3.35/src/propagation/examples/ folder to the ns3/scratch folder.

Screenshot:

Copy the main-propagation-loss.cc file to scratch folder

Next, we need to paste the main-propagation-loss.cc file to the ns3/scratch folder.

Screenshot:

Copy the main-propagation-loss.cc file to scratch folder

3.Open the Terminal:

Next, we need to launch the terminal by right clicking the mouse in the ns3 location.

Screenshot:

Open the Terminal

Screenshot:

Open the Terminal

4.NS-3.35 Configuration && Building Process:

Next, we need to configure and build the ns3 folder to make the copied files to the scratch need to store in configuration.

Command:      “./waf configure && ./waf build”

Screenshot:

NS-3.35 Configuration && Building Process

Screenshot:

5.Importing Propagation-loss-model.h:

Here we imported the Propagation-loss-model.h header file in this example program.

Screenshot:

Importing Propagation-loss-model.h

Here we highlighted the code line that PropagationLossModel class using CalcRxPower() function which is the part of the Propagation-loss-model.h that we will show class file that used in this code via propagation folder which represents propagation module.

Screenshot:

Importing Propagation-loss-model.h

Screenshot:

Importing Propagation-loss-model.h

Here we will show the header file by opening Propagation-loss-model.h file to show the class imported from the Propagation-loss-model.h in the example code.

Screenshot:

Importing Propagation-loss-model.h

6.Executing the Example Propagation-loss-model Program:

Then we need to run the Example Propagation-loss-model program to view output of the program.

Command:      “./waf –run main-propagation-loss”

Screenshot:

Executing the Example Propagation-loss-model Program

Here we shown the output of the example Propagation-loss-model program by using Propagation-loss-model.h.

Screenshot:

Executing the Example Propagation-loss-model Program