Generally, TCL is an abbreviation of the name “Tool Command Language”and it is a scripting language for controlling and extending software applications. Through this article you can get to know about the compiling process of TCL script.
Compile TCL
To compile details, execute the below commands,
cd ~/ns-allinone-2.35/tcl8.5.10/unix
./configure
make
make test
make install
Create a TCL script
Once you compile TCL, then you have to create a new TCL script in your project directory with your needed process,
The sample code in the TCL script for OLSR configuration,
set ns [new Simulator]
Agent/OLSR set use_mac_ true
Agent/OLSR set debug_ false
Agent/OLSR set willingness 3
Agent/OLSR set hello_ival_ 2
Agent/OLSR set tc_ival_ 5
The following code is for performance calculation.
Cbrval $startval $stopval $startval1 $stopval1
energycalc $startval2
Broadcast $startval3
relay $startval4
routeSelection $startval5
packetTrans $startval6
Compile TCL script
After executed the code for performance calculation, then you have to install TCL interpreter by using the following command
,sudo apt-get install tcl8.4
Next, you have to execute the following command line to compile a TCL script in the Ubuntu terminal,
cd /home/research/Desktop/Tcl_Script
tclsh Main.tcl
We hope that our provided information about compiling of TCL script is easy to understand and a best guide for you. If you have any further queries, please reach us.