tags:

views:

16

answers:

1

how to embeded the c++ coding with tcl script:NS2

A: 

You cannot embedded C++ in TCL scripts(to the best of my knowledge, its not allowed). C++ is used to create the backend libraries of ns2 so that your simulator knows how the protocols are supposed to behave.

With the TCL script what you do is basically design a network. Pretty much the same way you would have graphically designed your network on qualnet.

I you would like to define a protocols in C++ and then use it to run your simulations, it is the same way you do it in the existing examples anyway.

Shouvik