from Part II - Modeling Custom Networks and Protocols
Published online by Cambridge University Press: 05 February 2012
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.
To save this book to your Kindle, first ensure no-reply@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
Find out more about the Kindle Personal Document Service.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.