Skip to main content

Creation of a New Agent in ns2 - NS2 Tutorial # 10

We know that the file is stored in the folder
~ns-2.35/pradeep/tspagent.cc

Open the file ns-2.35/Makefile.in
and make an entry of your own file (in this case, it is tspagent.cc

Find a vairable inside the Makefile.in called
OBJ_CC=
and make an entry there as shown below

pradeep/tspagent.o \


Save the file and open a terminal, go to the folder ~ns-2.35/ and execute the command one by one

$] ./configure
$] make

Correct any mistakes or errors in your .cc file and run the above commands.

Successful OTcl and C++ linkages....

Thank you and Stay tuned for more lectures

Next lecture will be on AODV protocol and its modification.

Refer my website nsnam.com for downloading the source code and refer my videos at
youtube.com/tspradeepkumar
share and subscribe.

Thank you......






 
Subscribe to My Youtube Channel - Engineering Clinic

Comments

Popular posts from this blog

Electrical Machine Design (equations)

FactorsDC Machine Transformers Induction Machines Synchronous MachinesOutput EquationPa=CoD2Ln, where Pa=P/h for generators, Pa=P for motorsFor Single Phase
Q=2.22 f Bm Ai Kw Aw d10-3
For Three Phase
Q=3.33 f Bm Ai Kw Aw d 10-3Q=CoD2 L ns
KVA Input Q=
HP * 0.746 / Cos f * hQ=CoD2 L ns
KVA Input Q=
HP * 0.746 / Cos f * h
For Turbo alternators
Q=1.11Bavac KwsVa2 L 10-3/nsOutput CoefficientCo=Bav ac* 10-3where Bav-magnetic loading and ac - electric loadingDNACo=11 Kws Bav ac 10-3Co=11 Kws Bav ac 10-3 Choice of Magnetic LoadingFlux Density in Teeth Frequency of Flux Reversals Size of machineDNAMagnetizing current, Flux Density, Iron lossIron loss, Stability, Voltage Rating, Parallel Operation, Transient ShortCircuit current Choice of Electric LoadingTemperature rise,
speed of machine, Voltage, Armature reaction, CommutationDNAOverload Capacity, Copper losses, Temperature rise, Leakage ReactanceCopper loss, Synchronous reactance, Temperature rise, Stray Load losses,
Voltage rating Flux …

How to Access MOODLE in Intranet and Internet

When Moodle is accessed either in Intranet or internet, there will not be any issue. But occasions when the MOODLE Site has to be accessed both in the intranet and in the Internet, here is a simple trick
Server Used: IBM Blade Servers
Operating system: Windows Server 2008
Moodle Version: 2.4
WAMP Server is used.
Number of Users: 3000 (Students) + 200 (Faculty)
Open the config.php from ~/moodle/config.php
include these lines
$CFG->wwwroot = 'http://'.$server_id.'/vitcc';
$CFG->dataroot  = 'C:\\wamp\\moodledata';
before the following line
$CFG->directorypermissions = 07xx;
Restart the WAMP Server and you can Check MOODLE Site both in Internet and Intranet.

The above Image tells the intranet Link and the internet link can be opened outside the campus network

Virtual Host in Bitnami Lampstack

IF you have a website that runs with an IP address and you decide to move it to a domain, then here is the clear step.  Also this post will be helpful to you if you are running a same website by two different IP Address (One in campus and another outside the campus)
Prerequisites:

Your IP Address (Example): 172.16.1.10/site (Internal IP)
Your IP Address (Example): 28.45.34.101/site (External IP)

You want to move it to: example.com (instead of example.com/site)

Step 1:
Open the file /opt/lampstack-5.5.31-0/apache/conf/bitnami/bitnami.conf
In the above file, Change these lines  (The bold lines are the changed ones)

<VirtualHost _default_:80>
DocumentRoot “/opt/lampstack-5.5.31-0/apache2/htdocs/site”
<Directory “/opt/lampstack-5.5.31-0/apache2/htdocs”>
Options Indexes FollowSymLinks
AllowOverride All
<IfVersion < 2.3 >
Order allow,deny
Allow from all
</IfVersion>
<IfVersion >= 2.3 >
Require all granted
</IfVersion>
</Directory>
to
<VirtualHost _def…