Main Content


Specify value, data type, code generation options, other properties of parameter

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.


With this class, you can create workspace objects for modeling AUTOSAR calibration parameters. You can create an AUTOSAR.Parameter object in the base MATLAB® workspace.

This class extends the Simulink.Parameter class. With parameter objects, you can specify the value of a parameter and other information about the parameter, such as its purpose, its dimensions, or its minimum and maximum values. Some Simulink products use this information, for example, to determine whether the parameter is tunable (see Tune and Experiment with Block Parameter Values).

Simulink performs range checking of parameter values. The software alerts you when the parameter object value lies outside a range that corresponds to its specified minimum and maximum values and data type. For more information, see the Simulink.Parameter reference page.

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

arParam = AUTOSAR.Parameter;

Open the workspace object to view and modify its properties.

Property Dialog Box

The Simulink.Parameter reference page describes the parameter attributes in detail. The AUTOSAR.Parameter class extends the Simulink.Parameter class with the following additional selections for the Storage class attribute:

  • CalPrm — Calibration parameters belong to a calibration component, which can be accessed by multiple AUTOSAR software components. Selecting this storage class enables the custom attributes HeaderFile, ElementName, PortName, InterfacePath, CalibrationComponent, and ProviderPortName.

    • HeaderFile allows you to optionally specify the name of the AUTOSAR software component header file that declares the calibration parameter.

    • ElementName, PortName, and InterfacePath allow you to associate the calibration parameter with a specific AUTOSAR element, AUTOSAR port, and AUTOSAR interface. Specify an element name, a port name, and an interface path. For example, element K, port rCounter, and interface rCounter/CalibrationComponents/counter_if.

    • CalibrationComponent and ProviderPortName allow you to configure the calibration parameter to be exported in an AUTOSAR calibration component (ParameterSwComponent). Calibration parameters exported in a calibration component can be accessed by multiple AUTOSAR software components, using the calibration component name and associated provider port name. CalibrationComponent specifies the qualified name of the calibration component to be exported, and ProviderPortName specifies the short name of the associated provider port. For example, calibration component /CalibrationComponents/counter_swc/counter and provider port pCounter.

  • InternalCalPrm — Internal calibration parameters are defined and accessed by only one AUTOSAR software component. Selecting this storage class enables the custom attributes HeaderFile and PerInstanceBehavior.

    • HeaderFile allows you to optionally specify the name of the AUTOSAR software component header file that declares the calibration parameter.

    • PerInstanceBehavior allows you to specify Parameter shared by all instances of the Software Component or Each instance of the Software Component has its own copy of the parameter.

  • SystemConstant — Allows you to control the storage of a systemwide constant in generated code.

For more information, see:

Introduced in R2013b