主要内容

Calibrate Service-Oriented Application

R2026b

Before you begin, ensure that you have:

Embedded Coder Support Package for Service-Oriented Applications on Linux enables you to calibrate service-oriented applications. You can use the Linux Runtime Manager application to build a model, create and deploy an application package to the target, and perform calibration and measurement for the application.

To calibrate a service-oriented application, follow these steps:

  1. Open or create a software component model.

  2. Create a Simulink.Parameter object in the base workspace. In the Property Inspector or Model Explorer, set the storage class to ExportedGlobal to make it a tunable parameter.

    p1 Simulink parameter code generation properties

  3. Right-click the signal line that you want to monitor, click the Properties button , and in the Signal Properties dialog, enable Test point to make the signal measurable.

    sig1 signal properties window

  4. In the model configuration parameters, set Hardware Implementation > Hardware board to one of the following:

    • Embedded Coder Linux Docker Container for x86_64 targets.

    • Embedded Coder Linux Docker Container - ARM64 for ARM targets.

  5. Verify that Code Generation > Build Process > Toolchain is set to:

    • AUTOSAR Adaptive Linux Executable for AUTOSAR Adaptive software component models and AUTOSAR Adaptive software architecture models.

    • Embedded Coder Linux Docker Container GCC Toolchain for software component models configured with the Software Component Designer app.

  6. Enable the XCP service for the model by using the linux.setXCPServiceConfiguration function. For example, to enable the XCP service with a specific TCP port and target computer:

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

    To enable the XCP service with default settings:

    linux.setXCPServiceConfiguration("myModel");

    Note

    Ensure that the specified TCP port is not blocked by a firewall on the target machine.

  7. Generate code for the model and verify that the application package is generated.

  8. Open the Linux Runtime Manager application by entering the following command at the MATLAB command prompt.

    linuxRuntimeManager

  9. Connect to the Linux target machine by specifying the IP address, user name, and password of the target. For more information, see Set Up Linux Target Computer.

  10. Select Create & Deploy Application Package and choose the application package generated from the model to deploy it to the target.

  11. After the application is deployed, in the Signals tab, select the check boxes for the signals that you want to instrument.

  12. Select Monitor & Tune to start calibrating the application.

  13. In the Parameters tab, modify the value of the tunable parameter. The new value takes effect immediately on the running application.

  14. Open the Simulation Data Inspector to verify that the parameter change is reflected in the monitored signals.

See Also

| |

Topics