Main Content

生成代码接口

使用 ASAP2 和 C API 接口调节参数和测量信号数据,并查看生成的代码元数据

一些应用程序必须在生成的代码和外部应用程序代码之间交换数据。请使用 ASAP2 和 CDF 接口在开发计算机和目标计算机之间建立通信信道,导出一个包含内部 ECU 变量描述格式的 ASAP2 文件,或导出一个标定数据格式 (CDF) 文件,其中包含机读格式的参数信息。使用 C API 在生成的代码和外部代码之间交换数据。

要获得有关生成代码的元数据,请使用代码描述符编程接口。

Sample Target Environment Service Implementations of Data Communication Methods 显示目标环境服务如何实现三种类型的数据通信方法的示例:直接访问、执行期外和执行期间。

工具

生成标定文件Generate ASAP2 and CDF files (自 R2021b 起)

全部展开

coder.asap2.AxisInfoSet values for axis to describe lookup table (自 R2022b 起)
coder.asap2.CharacteristicCreate characteristic object (自 R2022b 起)
coder.asap2.CompuMethodCreate compu method object (自 R2022b 起)
coder.asap2.FunctionCreate function object (自 R2022b 起)
coder.asap2.GroupCreate group object (自 R2023b 起)
coder.asap2.MeasurementCreate measurement object (自 R2022b 起)
coder.asap2.RecordLayoutCreate record layout object (自 R2023a 起)
coder.asap2.UserCustomizeBaseCustomize project and module settings (自 R2022b 起)
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 (自 R2020a 起)
coder.descriptor.BreakpointDataInterfaceReturn information about tunable breakpoint set data for a lookup table that has tunable parameters (自 R2020a 起)
coder.descriptor.DataTransferElementReturn information about data transfer signal (自 R2022b 起)
coder.descriptor.DataTransferFunctionReturn information about function prototypes for data transfer service interfaces (自 R2022b 起)
coder.descriptor.DataTransferServiceInterfaceReturn information about data transfer service interface (自 R2022b 起)
coder.descriptor.MeasurementServiceInterfaceReturn information about measurement service interfaces (自 R2023a 起)
coder.descriptor.ParameterTuningServiceInterfaceReturn information about parameter tuning service interfaces (自 R2023a 起)
coder.descriptor.ParameterArgumentTuningServiceInterfaceReturn information about parameter argument tuning service interfaces (自 R2023a 起)
coder.descriptor.SenderReceiverServiceInterfaceReturn information about sender and receiver service interfaces (自 R2022b 起)
coder.descriptor.ServiceFunctionsReturn list of service functions that entry-point function calls (自 R2022b 起)
coder.descriptor.ServiceInterfaceReturn service interface information required to generate service functions (自 R2022b 起)
coder.descriptor.TimerFunctionRetrieve information about function prototypes for timer services (自 R2022b 起)
coder.descriptor.TimerServiceInterfaceReturn information about timer service interface (自 R2022b 起)
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.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 起)

函数

全部展开

coder.asap2.export根据 ASAM MCD-2 MC 标准生成 ASAP2 (A2L) 文件 (自 R2021a 起)
coder.asap2.getEcuDescriptions模型的 ECU 描述对象 (自 R2022b 起)
coder.asap2.merge合并多个 ASAP2 (A2L) 文件中的数据元素 (自 R2023a 起)
coder.cdf.exportGenerate CDF (Calibration Data Format) file according to ASAM AE CDF standards (自 R2021a 起)
getCodeDescriptorCreate coder.codedescriptor.CodeDescriptor object for model

主题

ASAP2 和 CDF 接口

C API 接口

代码描述符接口