Tuesday, May 25, 2010

C++ and OTcl Linkage

Note: The content in this series is extracted from the book, Introduction to Network Simulator NS2. You may have to read chapter 3 of the book for better understanding.

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.
  1. Why Two Languages?
  2. Creating C++ and OTcl classes.
  3. Class Binding
  4. Variable binding
  5. OTcl command: Invoking C++ statements from the OTcl domain
  6. Eval and result: Invoking OTcl statements from the C++ domain
  7. Object binding and object construction process.
Do you like it?

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: