Main Content

AUTOSAR.Signal

Specify data type, code generation options, other attributes of signal

For run-time calibration of AUTOSAR data, R2018b and R2019a introduced graphical mapping of model elements to AUTOSAR component parameters and variables. In the Code Mappings editor, you select a Simulink® model-workspace parameter or internal signal, state, or data store. You map the selected element to an AUTOSAR component parameter or variable and modify its AUTOSAR calibration attributes. If you currently model AUTOSAR parameters or variables by using AUTOSAR parameter or signal objects in the base workspace, consider migrating to the Code Mappings editor workflow. For more information, see Map AUTOSAR Elements for Code Generation.

Description

With this class, you can create workspace objects for modeling per-instance memory for AUTOSAR runnables. You can create an AUTOSAR.Signal object in the base MATLAB® workspace.

This class extends the Simulink.Signal class. With signal objects, you can assign or validate the attributes of a signal or discrete state, such as its data type, numeric type, dimensions, and so on. For more information, see the Simulink.Signal reference page.

To define an AUTOSAR.Signal object, in the MATLAB Command Window, instantiate the object and assign it a name.

arSig = AUTOSAR.Signal;

Open the workspace object to view and modify its properties.

Property Dialog Box

The Simulink.Signal reference page describes the signal attributes in detail. The AUTOSAR.Signal class extends the Simulink.Signal class with the following additional selection for the Storage class attribute:

  • PerInstanceMemory — AUTOSAR per-instance memory is instance-specific global memory within an AUTOSAR software component. An AUTOSAR run-time environment generator allocates this memory and provides an API through which you access this memory. Selecting this storage class enables the custom attributes needsNVRAMAccess and IsArTypedPerInstanceMemory.

    • needsNVRAMAccess allows you to specify whether the AUTOSAR signal needs access to nonvolatile RAM on a processor. Depending on the AUTOSAR schema selected for your model, this setting potentially impacts the XML output for your model.

    • IsArTypedPerInstanceMemory allows you to specify whether to use AUTOSAR-typed per-instance memory rather than C-typed per-instance memory.

After you create an AUTOSAR.Signal object, you can reference it in a Data Store Memory block. For more information, see

Introduced in R2013b