主要内容

生成代码接口

使用 C API 接口和代码描述符接口在生成的代码和外部应用程序代码之间交换数据

一些应用程序必须在生成的代码和外部应用程序代码之间交换数据。使用 MATLAB 代码描述符 API 获取有关生成代码的元数据。使用 C API 在运行时与生成的代码对接,并在目标平台上执行模型代码期间监控并调节模型元素。

全部展开

coder.codedescriptor.CodeDescriptor返回有关生成代码的信息
coder.descriptor.DataInterfaceReturn information about different types of data interfaces
coder.descriptor.FunctionInterfaceReturn information about entry-point functions
coder.descriptor.LookupTableDataInterfaceReturn information about Lookup Table blocks that have tunable parameters
coder.descriptor.BreakpointDataInterfaceReturn information about tunable breakpoint set data for a lookup table that has tunable parameters
coder.descriptor.SignalOfInterestReturn information about signals of interest in generated code (自 R2025a 起)
coder.descriptor.DataImplementationReturn information about implementation of data in generated code (自 R2025a 起)
coder.descriptor.TypedRegionReturn information about implementation of typed data in generated code (自 R2025a 起)
coder.descriptor.types.AggregateReturn information about variable of aggregate type (自 R2024a 起)
coder.descriptor.types.AggregateElementReturn information about element of aggregate type (自 R2024a 起)
coder.descriptor.types.ArgumentReturn information about argument associated with function or method in generated code (自 R2024a 起)
coder.descriptor.types.BoolReturn information about variable of Boolean type (自 R2024a 起)
coder.descriptor.types.CharReturn information about variable of character type (自 R2024a 起)
coder.descriptor.types.ComplexReturn information about variable of complex type (自 R2024a 起)
coder.descriptor.types.DoubleReturn information about variable of double-precision type (自 R2024a 起)
coder.descriptor.types.EnumReturn information about variable of enum type (自 R2024b 起)
coder.descriptor.types.FixedReturn information about variable of fixed-point type (自 R2024a 起)
coder.descriptor.types.HalfReturn information about variable of half-precision type (自 R2024a 起)
coder.descriptor.types.IntegerReturn information about variable of integer type (自 R2024a 起)
coder.descriptor.types.MatrixReturn information about variable of matrix type (自 R2024a 起)
coder.descriptor.types.NumericReturn information about variable of numeric type (自 R2024a 起)
coder.descriptor.types.PointerReturn information about variable of pointer type (自 R2024a 起)
coder.descriptor.types.PrototypeReturn information about function prototype in generated code (自 R2024a 起)
coder.descriptor.types.ReferenceReturn information about variable of reference type (自 R2024a 起)
coder.descriptor.types.ScalarReturn information about variable of scalar type (自 R2024a 起)
coder.descriptor.types.SingleReturn information about variable of single-precision type (自 R2024a 起)
coder.descriptor.types.StructReturn information about variable of struct type (自 R2024a 起)
coder.descriptor.types.TypeReturn information about data type of modeling element or corresponding variable in generated code (自 R2024a 起)
coder.descriptor.types.UnionReturn information about variable of union type (自 R2024a 起)
coder.descriptor.types.VoidRepresent base type of void pointer (自 R2024a 起)

函数

全部展开

getCodeDescriptorCreate coder.codedescriptor.CodeDescriptor object for model

主题

C API 接口

代码描述符接口