Home Forums GENERAL Co Simulation Library Reply To: Co Simulation Library

#33516
Profile Photo
Ranjeet Kumar
Participant

Thank you everyone for sharing such important and wonderful information.
as from above links i have come across the following informations:

OptiSystem’s Cpp Component allows users to create their own custom components in C++ for use in OptiSystem in a similar manner to the MATLAB component. The user can also create their own internal graphs and results that can be displayed within OptiSystem.
The project is large with many classes available to the user. Due to the number of configuration settings involved, it is recommended to create a copy of this default project and add code to it for each component the user wishes to define. The user may add as many classes as they wish to this project but it is not recommended that they remove or alter the classes already provided other than at the defined entry point: Calculate_API() in class DS_SystemManager.cpp.
The component can be configured in two modes:
Release mode. The component project is compiled as a dynamic link library (.dll). OptiSystem will load this “.dll” in during runtime. The signal data is passed directly from OptiSystem to the “.dll” and then, after processing, from the “.dll” back to OptiSystem. This is the mode to use when you wish to run OptiSystem and your C++ component within it.
Debug mode. The component project is compiled as a stand-alone application (.exe). Running the component project from within the developer environment will allow the user to enter the code, set breakpoints and examine their data. OptiSystem creates copies of the signal data in various text files which will be loaded by the project. The project knows where to obtain these files and their formatting by an XML data file it loads at runtime.
The project has been set up so that very little changes must be made to switch between the two modes. The user will not need to alter any of their code, just change some configuration settings and add a line of code to tell the project where to find the XML file mentioned above. The two different modes are explained in detail in Tutorial 1: Binary Signal Manipulation.
The most effective way to learn how to use the Cpp component is to follow the tutorials in the documentation. They will teach the user how to access and manipulate the basic data structures, configure the project for release and debug mode, and use many of the convenience functions built into the project. It is recommended that the user create a copy of the default project available at http:/optiwave.com/?p=28551 for each tutorial, then follow along for the manipulations of the C++ code and the creation of the OptiSystem project.

http:/optiwave.com/?p=28551

Categories