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:
- Fresh installation of Ubuntu 22.04 LTS:
Screenshot:

2.NS-3.35 Installation:
Screenshot:

HEADER FILE VERIFICATION:
- 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:

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

3.Open the Terminal:
Next, we need to launch the terminal by right clicking the mouse in the ns3 location.
Screenshot:

Screenshot:

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:

Screenshot:

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

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:

Screenshot:

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:

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:

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