Import user created C function as a block
Library
Library can be specified after you create the Library Function block.
Description
The Library Function block allows you to bring C or C++ models into Model
Composer for block simulation and code generation. The block I/O interface is determined by
the function declaration, which is auto-discovered by the tool. The Library function block
is created when you run the xmcImportFunction
script to
specify the library function sources files and header search paths.
Data Type Support
You can import functions that have scalar, vectors, or matrices as function parameters. All data types, including fixed-point are supported. Complex values, real, and imaginary components, and phase angles are not supported.
Parameters
The block parameters dialog box for the Library Function block is shown below:
- Function name
- Include files
- Source files
- Compiler include directories
You cannot change these settings from the dialog box. To change these
settings, you will have to recreate the block using the xmcImportFunction
command.