关闭

The great idea of NS2

558人阅读 评论(0) 收藏 举报
Here is my understanding about ns2. Just my understanding!!!!

Ok, NS2 is a good combination of C++ and OTCL(OTCL is an object-oriented TCL). In fact, high-efficient C/C++ language can be used to simulate the complexity of data exchange between different ISO layers, also can be used compuatation. However, its' interactivity is bad. If you have change a parameter, you'll have to compile the whole package, then run it. Oh, it will be very time-consuming. For example, it'll cost 15 minutes to 'make' the ns2 source in my X31 laptop.
So what's tcl? As I understand, it's a script language like shell language, such as bash, command(DOS). It is interactive. You input something, it'll reponse you immediately. Yeah, you may be thought of something.

Yeah, how about we combine them together. This is what the elites of ns2 developer have done. Their great effort creates the NS2.

In the above scenario, when you input a parameter, TCL interpreter will transfer it to the C++ code, then C++ code will run with the parameter and return the result. So you have to connect with tcl interferace, C++ code will do the next.

In fact, when you run ns2, it's looks like a tcl interpreter.
0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:700186次
    • 积分:8984
    • 等级:
    • 排名:第2076名
    • 原创:214篇
    • 转载:49篇
    • 译文:7篇
    • 评论:68条
    最新评论
    技术类网站