Skip to main content Accessibility help
×
Hostname: page-component-77c89778f8-5wvtr Total loading time: 0 Render date: 2024-07-24T05:00:14.467Z Has data issue: false hasContentIssue false

6 - High-level wrapper APIs

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 demonstrates how to write your own high-level wrapper APIs which encapsulate many OPNET programming details, in order to facilitate and accelerate design and programming of OPNET models. We also provide several wrapper API packages to help users to quickly build their models. To be able to follow this chapter, you are assumed to know how to write custom models as shown in Chapter 5, and the basics of generic programming.

Why and how to use wrapper APIs

When creating a simulation model, one often needs to repetitively write code with some similar functionalities. To speed up modeling and coding, one can write some wrapper functions that implement those commonly used functionalities. These wrapper functions will save modeling time and reduce the chances of making errors. Wrapper APIs here refer to the functions that encapsulate many programming details and implement particular functionalities at higher level. Figure 6.1 shows an example of a wrapper API that is defined in a header file called “geo_topo.h”, which can be downloaded from the publisher's website.

Figure 6.1 shows that a wrapper API is simply a function that wraps some functionalities and provides a higher-level interface. To use the wrapper APIs in the process model, one needs to include the header file containing the APIs. By default, OPNET Modeler will look for header files in its installation path and in model paths.

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.

  • High-level wrapper APIs
  • 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.007
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.

  • High-level wrapper APIs
  • 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.007
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.

  • High-level wrapper APIs
  • 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.007
Available formats
×