Main Content

Import Custom C/C++ Code Using the金宝appCode Importer

Create Simulink®libraries from your custom C/C++ code with the Simulink Code Importer tool

使用仿真软件代码金宝app进口国工具构建一个Sim卡ulink library from your custom C/C++ code library. The Simulink Code Importer brings custom code into a Simulink library ofC Callerblocks as callable functions, after analyzing the custom code for functions and their dependencies, including global variables and types used by the functions.

To use the Simulink Code Importer, go to theModelingtab on the Simulink toolstrip. FromDesign, chooseCode Importer. A series of screens then leads you through the process of creating a Simulink library from your custom code.

Alternatively, you can create an object of theSimulink.CodeImporterclass and run the Simulink Code Importer tool using a command-line interface.

Classes

Simulink.CodeImporter Import custom C/C++ code into金宝app
Simulink.CodeImporter.CustomCode Specify custom code settings forSimulink.CodeImporterandsltest.CodeImporterclasses
Simulink.CodeImporter.Options Specify additional import options forSimulink.CodeImporterandsltest.CodeImporterclasses
Simulink.CodeImporter.ParseInfo Information about parsed custom code
Simulink.CodeImporter.Function Access and configure detailed information about parsed custom code functions
Simulink.CodeImporter.SimulinkPortSpecification Configure port specification for imported custom code

Blocks

C Caller Integrate C code in金宝app

Topics

Import Custom Code Using the Simulink Code Importer Wizard

Use the Simulink Code Importer to create a library of C Caller blocks from your custom C/C++ code.