Generated Code Interfacing
Some applications must exchange data between generated code and external application code. Use the ASAP2 and CDF interface to establish a communication channel between development and target computers, export an ASAP2 file containing description format of the internal ECU variables, or export a Calibration Data Format (CDF) file containing the information about parameters in a machine-readable format. Use the C API to exchange data between generated code and external code.
To obtain metadata about the generated code, use the code descriptor programming interface (see Get Code Description of Generated Code).
Tools
Generate Calibration Files | Generate ASAP2 and CDF files (Since R2021b) |
Classes
Functions
Topics
ASAP2 and CDF Interface
- Parameter Data Types in the Generated Code
Optimize the generated code and generate code for specific processors by controlling the data types that store parameter data in computer memory. - Create Tunable Calibration Parameter in the Generated Code
In the generated code, create tunable parameter data that you can access during rapid prototyping and calibration. - Calibrate Generated Code and Monitor Signals
Generate XCP external mode target application and ASAP2 file that describes the XCP server configuration. - Generate ASAP2 and CDF Calibration Files
Generate ASAP2 and CDF files according to ASAM MCD-2 MC and ASAM AE CDF standards respectively. - Customize Generated ASAP2 File
Customize the ASAP2 file generated from a Simulink® model. - Create and Add Custom Data Elements
Add custom data elements to an ASAP2 file. - Customize Using Base Files
Use the base class and files to customize the ASAP2 fields Simulink model. - Configure Model Data Elements for ASAP2 File Generation
Set measurement and calibration properties for model data elements.
C API Interface
- Exchange Data Between Generated and External Code Using C API
Write host-based or target-based application code that interacts with generated model code. - Use C API to Access Model Parameters
Write application code to interact with model parameters. - Use C API to Access Model Signals and States
Write application code to interact with model signals and states.
Code Descriptor Interface
- Get Code Description of Generated Code
Obtain metadata about the generated code. - Get Generated Type and Name of Inport Structures
Obtain metadata about the inport structures in generated code.