Introduction
NS2 consists of two languages: C++ and OTcl. For most of the time, you would configure (e.g., "$ns duplex-link ... ", "$ns attach-agent ...") a network in OTcl. But the real simulation is running in C++. If you are having troubles grasping the concepts of the linkage, stick around. I hope I can help enlighten you guys :)
Outline
Here is the outline of this series.
- Why Two Languages?
- Creating C++ and OTcl classes.
- Class Binding
- Variable binding
- OTcl command: Invoking C++ statements from the OTcl domain
- Eval and result: Invoking OTcl statements from the C++ domain
- Object binding and object construction process.
I believe the above are all you need to understand the binding process. If you like it, please stick around and perhaps tell your friends about it. I will blog about them one by one. If you have any comments or suggestions, please place them on my facebook fan page [ click here ].
=======================================================
For more information about C++ and OTcl linkage see Chapter 3 in the following book from Springer:
T. Issaraiyakul and E. Hossain, “Introduction to Network Simulator NS2”, Springer 2009.
You may also find lecture notes and other resource at the following website: http://www.ece.ubc.ca/~teerawat/NS2.htm
No comments:
Post a Comment