Learning tcl/tk jutsu

NS simulator is based on two languages : an object oriented simulator, written in C++, and a OTcl (an object oriented extension of Tcl) interpreter, used to execute user’s command scripts. Tcl is used to configure the topology, the nodes, the channel, to schedule the event,etc. C++ is used to implement the protocol.

so, the first step is you must understand what Tcl/tk jutsu is.

1. check Already have Tcl/Tk?
Tcl and Tk come preinstalled on most Unix systems, as well as on Mac OS X, so it may well be worth a quick look.
However, if it is there, you’ll want to check if you’ve got a recent version. To check, start Tcl/Tk (usually via running “tclsh” or “wish” from a command line), and typing “info patchlevel”. This will tell you what version you’re running.

2. install emacs to modify tcl file.
if you use debian or ubuntu, just type command “apt-get install emacs”.

3. create tcl file, for example ‘hello.tcl’
$ touch hello.tcl

4. use emacs to open hello.tcl, then write code.

5.run tcl file

$ tclsh hello.tcl –> if output in command line
$ wish hello.tcl –> if output use window GUI
result examples



References :

  1. http://www.bin-co.com/tcl/tutorial/index.php
  2. http://www.tcl.tk/man/tcl8.5/tutorial/tcltutorial.html
  3. http://wiki.tcl.tk/
  4. emacs : http://en.wikipedia.org/wiki/Emacshttp://www.emacswiki.org/cgi-bin/wiki

Next step : NS simulator for beginner and ns manual

may Allah SWT always love both of you wherever you are

February 09 2008
Taipei City
High Speed Network Lab

Udin Harun

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: