Book contents
- Frontmatter
- Contents
- Preface
- List of abbreviations
- Part I Preparation for OPNET Modeling
- Part II Modeling Custom Networks and Protocols
- 4 OPNET programming interfaces
- 5 Creating and simulating custom models using OPNET APIs
- 6 High-level wrapper APIs
- 7 Modeling with high-level wrapper APIs
- Part III Modeling and Modifying Standard Networks and Protocols
- Part IV OPNET Modeling Facilities
- References
- Index
4 - OPNET programming interfaces
from Part II - Modeling Custom Networks and Protocols
Published online by Cambridge University Press: 05 February 2012
- Frontmatter
- Contents
- Preface
- List of abbreviations
- Part I Preparation for OPNET Modeling
- Part II Modeling Custom Networks and Protocols
- 4 OPNET programming interfaces
- 5 Creating and simulating custom models using OPNET APIs
- 6 High-level wrapper APIs
- 7 Modeling with high-level wrapper APIs
- Part III Modeling and Modifying Standard Networks and Protocols
- Part IV OPNET Modeling Facilities
- References
- Index
Summary
This chapter covers OPNET API (application programming interface) packages and provides an in-depth discussion on a number of commonly used APIs. Practical examples are provided to explain the studied OPNET APIs. If the reader is familiar with OPNET APIs and programming OPNET models, this chapter can be skipped.
Introduction to OPNET programming
The programming language for writing OPNET Models is called Proto-C. There are not many syntax differences between programming in C and Proto-C, since Proto-C preserves generality by incorporating all the capabilities of the C/C++ programming language, i.e., you can program OPNET models in the same way as you program C/C++ applications. The major difference is the methodology adopted by Proto-C to program models. Unlike programming standalone C/C++ applications, Proto-C is designed to handle OPNET predefined data types via an existing simulation engine, which can be regarded as a half-done application in a standalone C/C++ application. This simulation engine needs to incorporate the Proto-C model code to generate a final runnable and debuggable standalone simulation application. The simulation engine can be regarded as pre-written skeleton or framework which is the kernel in every simulation application. Your OPNET model code is the custom part of the simulation application. Your OPNET model code is inserted into the designated positions of the simulation engine framework to generate the final complete source files. These files will be compiled and linked into a normal C/C++ application.
- Type
- Chapter
- Information
- Unlocking the Power of OPNET Modeler , pp. 43 - 57Publisher: Cambridge University PressPrint publication year: 2012