Documentation

AUTOSAR.Parameter

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

Description

使用此类,您可以创建用于建模Autosar校准参数的工作区对象。您可以创建一个AUTOSAR.Parameterobject in the base MATLAB®workspace.

This class extends theSimulink.Parameterclass. 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 (seeTune and Experiment with Block Parameter Values(Simulink)).

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 theSimulink.Parameter参考页。

To define anAUTOSAR.Parameter对象,在MATLAB命令窗口中,实例化对象并为其分配一个名称。

arParam = AUTOSAR.Parameter;

Open the workspace object to view and modify its properties.

Property Dialog Box

TheSimulink.Parameterreference page describes the parameter attributes in detail. TheAUTOSAR.Parameterclass extends theSimulink.Parameterclass with the following additional selections for the存储类attribute:

  • Calprm- 校准参数属于校准组件,可以通过多个AutoSar软件组件访问。选择此存储类启用自定义属性HeaderFile,ElementName,portname,InterfacePath,CalibrationComponent, 和ProviderPortName.

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

    • ElementName,portname, 和InterfacePathallow 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, elementK, portrcounter, 和interfacercounter/CalibrationComponents/counter_if.

    • CalibrationComponentProviderPortNameallow 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指定要导出的校准组件的合格名称,并ProviderPortNamespecifies the short name of the associated provider port. For example, calibration component/CalibrationComponents/counter_swc/counter和provider portPCONTER.

  • InternalCalPrm——内部口径tion parameters are defined and accessed by only one AUTOSAR software component. Selecting this storage class enables the custom attributesHeaderFilePerInstanceBehavior.

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

    • PerInstanceBehaviorallows you to specifyParameter shared by all instances of the Software Component或者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:

在R2013B中引入