Skip to main content Accessibility help
×
Hostname: page-component-77c89778f8-gq7q9 Total loading time: 0 Render date: 2024-07-24T04:57:56.121Z Has data issue: false hasContentIssue false

4 - OPNET programming interfaces

from Part II - Modeling Custom Networks and Protocols

Published online by Cambridge University Press:  05 February 2012

Zheng Lu
Affiliation:
University of Essex
Hongji Yang
Affiliation:
De Montfort University, Leicester
Get access

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
Publisher: Cambridge University Press
Print publication year: 2012

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@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.

  • OPNET programming interfaces
  • Zheng Lu, University of Essex, Hongji Yang, De Montfort University, Leicester
  • Book: Unlocking the Power of OPNET Modeler
  • Online publication: 05 February 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9780511667572.005
Available formats
×

Save book 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 Dropbox.

  • OPNET programming interfaces
  • Zheng Lu, University of Essex, Hongji Yang, De Montfort University, Leicester
  • Book: Unlocking the Power of OPNET Modeler
  • Online publication: 05 February 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9780511667572.005
Available formats
×

Save book to Google Drive

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.

  • OPNET programming interfaces
  • Zheng Lu, University of Essex, Hongji Yang, De Montfort University, Leicester
  • Book: Unlocking the Power of OPNET Modeler
  • Online publication: 05 February 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9780511667572.005
Available formats
×