Documentation

Simulink.sfunction.analyzer.BuildInfo class

Package: Simulink.sfunction.analyzer
Superclasses:

Create an object to represent build information

Description

Simulink.sfunction.analyzer.BuildInfo object captures the build information for S-functions, such as source files, header files, and linking libraries, for use with the Simulink.sfunction.Analyzer class.

Construction

bdInfo= Simulink.sfunction.analyzer.BuildInfo(SfcnFile) creates a Simulink.sfunction.analyzer.BuildInfo object.

bdInfo = Simulink.sfunction.analyzer.BuildInfo(SfcnFile, 'SrcPath',{srcpaths}, 'ExtraSrcFileList', {srcfilelist}) creates a Simulink.sfunction.analyzer.BuildInfo object for a C-MEX S-function source file, a list of extra source files located in the specified path.

bdInfo = Simulink.sfunction.analyzer.BuildInfo(SfcnFile, 'ObjFileList',{objfilelist}) creates a Simulink.sfunction.analyzer.BuildInfo object for C-MEX S-function source file and list of extra objective code files.

bdInfo = Simulink.sfunction.analyzer.BuildInfo(SfcnFile, 'IncPaths',{incpathslist}) creates a Simulink.sfunction.analyzer.BuildInfo object for C-MEX S-function source file and paths to the folders including header files.

bdInfo = Simulink.sfunction.analyzer.BuildInfo(SfcnFile, 'LibFileList',{libfilelist}, 'LibPaths',{libpaths}) creates a Simulink.sfunction.analyzer.BuildInfo object for C-MEX S-function source file and library files and library file paths used for building.

bdInfo = Simulink.sfunction.analyzer.BuildInfo(SfcnFile, 'PreProcDefList',{preprocdir}) creates a Simulink.sfunction.analyzer.BuildInfo object for C-MEX S-function source file and pre-processor directives list.

Input Arguments

expand all

S-function source file having the same name as the S-function.

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: 'SrcPath', {srcpath}

expand all

Search paths to extra S-function source files that are referenced by SfcnFile, specified as a cell array.

List of extra S-function source files, specified as a cell array.

List of objective files used for building, specified as a cell array.

Specify paths to include folders for header files, specified as a cell array.

List of external library files used for building, specified as a cell array.

Search paths for external library files used for building, specified as a cell array.

List of the preprocessor directives, specified as a cell array.

Output Arguments

expand all

Build information for the S-functions supplied to the S-function analyzer. Returns a simulink.sfunction.analyzer.BuildInfo object.

Examples

Create a bdInfo object for an S-function mysfun that includes a source file mysfun.c:

Basic Use

bdInfo = Simulink.sfunction.analyzer.BuildInfo('mysfun.c');

The output bdInfo has the following fields:

bdInfo = 

  BuildInfo with properties:

            SfcnFile: 'mysfun.c'
            SfcnName: 'mysfun'
             SrcType: 'C'
            SrcPaths: {}
    ExtraSrcFileList: {}
         ObjFileList: {}
            IncPaths: {}
         LibFileList: {}
            LibPaths: {}
      PreProcDefList: {}

Advanced Use

Create a bdInfo object for an S-function mysfun that includes a source file mysfun.c and also includes:

  • List of extra source files, extra1.c and extra2.c

  • Paths to source file folders, /path1 and /path2.

  • List of objective files, o1.obj and o2.obj.

  • List of library files, l1.lib and l2.lib.

  • Library paths, /libpath1.

  • Pre-processor running directives, -DDEBUG.

Simulink.sfunction.analyzer.BuildInfo('mysfun.c',...                                      
                                      'ExtraSrcFileList',{extra1.c,extra2.c},... %specify extra source files, eg: extra1.c, extra2.c                                       
                                      'SrcPaths',{/path1,/path2},...             %specify paths to source file folders, eg: /path1, /path2                                      
                                      'ObjFileList',{o1.obj,o2.obj},...          %specify objective files, eg: o1.obj, o2.obj                                      
                                      'LibFileList',{l1.lib,l2.lib},...          %specify library files, eg: l1.lib, l2.lib                                      
                                      'LibPaths',{/libpath1},...                 %specify library path folders, eg: /libpath1                                      
                                      'PreProcDefList',{DEBUG});                 %specify preprocessor directives, eg: -DDEBUG

Introduced in R2017b

Was this topic helpful?