Skip to main content Accessibility help
×
Hostname: page-component-77c89778f8-5wvtr Total loading time: 0 Render date: 2024-07-23T11:27:55.901Z Has data issue: false hasContentIssue false

12 - OPNET programming in C++

from Part IV - OPNET Modeling Facilities

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 briefly describes the differences between Proto-C, C, and C++ languages and shows how to configure OPNET to program models in C++. A case study is also provided to help the reader grasp the important points on programming OPNET models in C++. If you are intending to program only in C style, this chapter can be ignored. If you are familiar with C++ and are interested in programming models in object-oriented C++ style, you may read this chapter. The chapter requires basic knowledge of generic C++ programming.

Proto-C, C, and C++: language and library differences

OPNET provides a programming language called Proto-C to allow users to model various systems. Proto-C preserves generality by incorporating all the capabilities of the C/C++ programming language, i.e., a user can program in Proto-C in a similar way to in C/C++, and in Proto-C you can use the libraries that are accessible to C/C++ as well. On the other hand, Proto-C provides a set of its own APIs to model communication networks. Proto-C supports modeling with the state transition diagram (STD) method, which makes it possible to accurately describe most systems. Figure 12.1 shows that Proto-C allows you to use both C/C++ and Proto-C libraries and write models in both C and C++ styles.

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 in C++
  • 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.013
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 in C++
  • 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.013
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 in C++
  • 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.013
Available formats
×