Main Content

Configure AUTOSAR Adaptive Data for Run-Time Calibration and Measurement

R2026b

AUTOSAR Blockset enables you to configure run-time calibration of adaptive application data based on XCP server communication and ASAP2 (A2L) file generation. The XCP and ASAP2 capabilities are defined outside the Adaptive Platform (AP) specification, which as of Release 19-11 does not address data calibration.

As part of generating and deploying adaptive code, you can configure interfaces for XCP server communication in the generated C++ code and export A2L files containing model data for calibration and measurement.

Before deploying adaptive code:

  • Use the linux.setXCPServiceConfiguration (Embedded Coder) function to enable XCP service for the model and generate XCP server function calls in adaptive C++ code.

  • In the Share gallery under the AUTOSAR tab of the model, use Generate Calibration Files to generate ASAP2 (A2L) files that contain model data for calibration and measurement.

Configure XCP Communication Interface in Generated Code

To enable XCP communication capability for an AUTOSAR adaptive model, use the linux.setXCPServiceConfiguration (Embedded Coder) function. When the XCP service is enabled, Simulink® adds XCP server function calls to the generated C++ code.

Before using the linux.setXCPServiceConfiguration function, you must:

Use the linux.setXCPServiceConfiguration function to:

  • Enable or disable the XCP service for a model.

  • Specify the TCP port number for XCP connections. You can use the port for only one application.

  • Select a target computer for the XCP service.

For example, to enable the XCP service and set the TCP port and target computer:

linux.setXCPServiceConfiguration("myModel", Enabled=true, TCPPort=12345, Target="LinuxTarget3");

To retrieve the current XCP service configuration for a model, use the linux.getXCPServiceConfiguration (Embedded Coder) function.

To generate ASAP2 (A2L) files, use Generate Calibration Files from the Share gallery under the AUTOSAR tab of the model. For more information, see Generate ASAP2 and CDF Calibration Files (Simulink Coder).

See Also

(Simulink Coder) | (Embedded Coder) | (Embedded Coder)