设置并使用在生成的代码和外部应用程序代码之间交换数据的方法和功能。
数据接口可用于在生成的代码和外部代码或数据之间交换数据。使用 C API 编写要与生成的代码进行交互的代码。为测量、标定和诊断系统导出 ASAP2 文件。
要在执行生成的代码的过程中将数据记录到 MAT 文件中,请参阅Log Program Execution Results。
addCoderXCPInfo | Create ASAP2 file with IF_DATA XCP block that describes the Simulink Coder XCP slave configuration |
rtw.asap2SetAddress | Set ECU address in A2L file |
rtw.asap2MergeMdlRefs | Generate single A2L file for model by merging A2L files generated for top model and referenced models |
编写基于主机或基于目标的应用程序代码,与生成的模型代码进行交互。
Use C API to Access Model Signals and States
Write application code to interact with model signals and states.
Use C API to Access Model Parameters
Write application code to interact with model parameters.
为 ASAP2 文件生成配置模型。
Calibrate Generated Code and Monitor Signals
Generate XCP external mode target application and ASAP2 file that describes XCP slave configuration.
Customize Generated ASAP2 File
Edit Target Language Compiler (TLC) files to customize the ASAP2 file generated from a Simulink® model.