Simulink.sfunction.analyzer.BuildInfo Class
Namespace: Simulink.sfunction.analyzer
Superclasses:
Create an object to represent build information
Description
A 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
creates a bdInfo
= Simulink.sfunction.analyzer.BuildInfo('SfcnFile
')Simulink.sfunction.analyzer.BuildInfo
object for the
S-function source file SfcnFile
.
specifies options using one or more name-value arguments. For example, to create a
bdInfo
= Simulink.sfunction.analyzer.BuildInfo('SfcnFile
',Name=Value
)Simulink.sfunction.analyzer.BuildInfo
object for a C-MEX S-function
source file and list of extra objective code files, set ObjFileList
to {objfilelist}
.
Input Arguments
S-function source file, specified as a string or a character vector. The S-function source file must have the same name as the S-function.
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Example: bdInfo =
Simulink.sfunction.analyzer.BuildInfo('slexBadSFcn.c',ExtraSrcFileList={'slexBadSFcn_wrapper.c'},SrcPaths={pwd});
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
Example: bdInfo =
Simulink.sfunction.analyzer.BuildInfo('slexBadSFcn.c','ExtraSrcFileList',{'slexBadSFcn_wrapper.c'},'SrcPaths',{pwd});
,
Search paths to extra S-function source files that are referenced by
SfcnFile
, specified as a cell array of
character vectors or as a string. Use this argument together with
ExtraSrcFileList
.
Example: bdInfo =
Simulink.sfunction.analyzer.BuildInfo('SfcnFile',SrcPath={'path'},ExtraSrcFileList={'srcfilelist'})
creates a Simulink.sfunction.analyzer.BuildInfo
object
for a C-MEX S-function source files and a list of extra source files
located in the specified path.
Data Types: char
| string
| cell
List of extra S-function source files, specified as a cell array of
character vectors or as a string. Use this argument together with
SrcPath
.
Example: bdInfo =
Simulink.sfunction.analyzer.BuildInfo('SfcnFile',SrcPath={'path'},ExtraSrcFileList={'srcfilelist'})
creates a Simulink.sfunction.analyzer.BuildInfo
object
for a C-MEX S-function source file and a list of extra source files
located in the specified path.
Data Types: char
| string
| cell
List of objective files used for building, specified as a cell array of character vectors.
Example: bdInfo =
Simulink.sfunction.analyzer.BuildInfo('SfcnFile',ObjFileList={'objfilelist'})
creates a Simulink.sfunction.analyzer.BuildInfo
object
for a C-MEX S-function source file and list of extra objective code
files.
Data Types: char
| cell
Specify paths to include folders for header files, specified as a cell array of character vectors or as a string.
Example: bdInfo =
Simulink.sfunction.analyzer.BuildInfo('SfcnFile',IncPaths={'incpathslist'})
creates a Simulink.sfunction.analyzer.BuildInfo
object
for a C-MEX S-function source file and paths to the folders including
header files.
Data Types: char
| string
| cell
List of external library files used for building, specified as a cell
array of character vectors or as a string. Use this argument together
with LibPaths
.
Example: bdInfo =
Simulink.sfunction.analyzer.BuildInfo('SfcnFile',LibFileList={'libfilelist'},LibPaths={'libpaths'})
creates a Simulink.sfunction.analyzer.BuildInfo
object
for a C-MEX S-function source file and library files and library file
paths used for building.
Data Types: char
| string
| cell
Search paths for external library files used for building, specified
as a cell array of character vectors or as a string. Use this argument
together with LibFileList
.
Example: bdInfo =
Simulink.sfunction.analyzer.BuildInfo('SfcnFile',LibFileList={'libfilelist'},LibPaths={'libpaths'})
creates a Simulink.sfunction.analyzer.BuildInfo
object
for a C-MEX S-function source file and library files and library file
paths used for building.
Data Types: char
| string
| cell
List of the preprocessor directives, specified as a cell array of character vectors or as a string.
Example: bdInfo =
Simulink.sfunction.analyzer.BuildInfo('SfcnFile',
PreProcDefList={'preprocdir'})
creates a
Simulink.sfunction.analyzer.BuildInfo
object for a
C-MEX S-function source file and preprocessor directives
list.
Data Types: char
| string
| cell
Output Arguments
Build information, returned as a
Simulink.sfunction.analyzer.BuildInfo
object.
Examples
Create a
Simulink.sfunction.analyzer.BuildInfo
object named
bdInfo
to store basic build information for an S-function
named mysfun
that includes a source file named
mysfun.c
.
bdInfo = Simulink.sfunction.analyzer.BuildInfo("mysfun.c")
bdInfo = BuildInfo with properties: SfcnFile: 'mysfun.c' SfcnName: 'mysfun' SrcType: 'C' SrcPaths: {} ExtraSrcFileList: {} ObjFileList: {} IncPaths: {} LibFileList: {} LibPaths: {} PreProcDefList: {}
Create a
Simulink.sfunction.analyzer.BuildInfo
object named
bdInfo
to store build information for the S-function
named mysfun
that includes a source file
mysfun.c
and also includes:
Store this build information for the S-function mysfun
in
the BuildInfo
object by using name-value arguments to specify
each piece of additional build information.
Additional source files named
extra1.c
andextra2.c
Paths to source file directories
Objective files named
o1.obj
ando2.obj
Library files named
l1.lib
andl2.lib
Paths to library directories
The
-DEBUG
pre-processor running directive
Simulink.sfunction.analyzer.BuildInfo("mysfun.c",... ExtraSrcFileList={'extra1.c','extra2.c'},... SrcPaths={'/path1','/path2'},... ObjFileList={'o1.obj','o2.obj'},... LibFileList={'l1.lib','l2.lib'},... LibPaths={'/libpath1'},... PreProcDefList={DEBUG});
Version History
Introduced in R2017b
See Also
Classes
Functions
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Seleccione un país/idioma
Seleccione un país/idioma para obtener contenido traducido, si está disponible, y ver eventos y ofertas de productos y servicios locales. Según su ubicación geográfica, recomendamos que seleccione: .
También puede seleccionar uno de estos países/idiomas:
Cómo obtener el mejor rendimiento
Seleccione China (en idioma chino o inglés) para obtener el mejor rendimiento. Los sitios web de otros países no están optimizados para ser accedidos desde su ubicación geográfica.
América
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)