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

HOW TO IMPORT BASIC ENERGY SOURCE.H PACKAGES IN NS3

To import BASIC-ENERGY-SOURCE.H PACKAGES IN NS3 . Stay connected to ns3simulation.com, where we share the best project ideas for scholars.

The BasicEnergySource class offers fundamental features for overseeing the energy supply of devices. It includes capabilities for establishing initial energy levels, tracking energy usage according to device activities, and keeping an eye on the remaining energy. This class enables the simulation of situations with battery-powered devices by monitoring energy consumption and controlling power states. It plays a vital role in simulations that emphasize energy efficiency and battery longevity, providing a simple framework for incorporating energy management into network simulations. Familiarity with basic-energy-source.h is important for assessing the energy-related factors of network devices in NS-3.

Read out the exciting article that are required for the installation of Basic-energy-source.h.

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/examples/energy folder:

Screenshot:

Locate to the ns3-examples-energy folder

2.Copy the energy-model-with-harvesting-example.cc file to scratch folder:

Next, we need to copy the energy-model-with-harvesting-example.cc file from ns3.35/examples/energy folder to the ns3/scratch folder.

Screenshot:

Copy the energy-model-with-harvesting-example.cc file to scratch folder

Next, we need to paste the energy-model-with-harvesting-example.cc file to the ns3/scratch folder.

Screenshot:

Copy the energy-model-with-harvesting-example.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

NS-3.35 Configuration && Building Process

NS-3.35 Configuration && Building Process

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:

Importing Basic-energy-source.h

Screenshot:

Importing Basic-energy-source.h

5.Importing Basic-energy-source.h:

Here we imported the Basic-energy-source.h header file in this example program.

Screenshot:

Importing Basic-energy-source.h

Screenshot:

Importing Basic-energy-source.h

Here we will show the header file by opening basic-energy-source.h file to show the class imported from the Basic-energy-source.h in the example code.

Screenshot:

Executing the Example Basic-energy-source Program

6.Executing the Example Basic-energy-source Program:

Then we need to run the Example Basic-energy-source program to view output of the program.

Command:      “./waf –run energy-model-with-harvesting-example –vis”

Screenshot:

Executing the Example Basic-energy-source Program

Here we shown the output of the example Basic-energy-source program by using Basic-energy-source.h.

Screenshot:

Executing the Example Basic-energy-source Program

Screenshot:

Executing the Example Basic-energy-source Program

If you are facing more difficulties after reading the instructions then reach us out, we will share you more project ideas ad how it will be served out.