Main Content

getParameter

Get AUTOSAR mapping information for万博1manbetxmodel workspace parameter

Description

example

arValue= getParameter(slMap,slParameter)returns the type of AUTOSAR parameter mapped to Simulink®model workspace parameterslParameter. AUTOSAR parameter types includeSharedParameter,PerInstanceParameter,ConstantMemory, andPortParameter.

arValue= getParameter(slMap,slParameter,arProperty)returns the value of propertyarPropertyfor the AUTOSAR parameter to which model workspace parameterslParameteris mapped.

Examples

collapse all

Get AUTOSAR mapping and property information for Simulink model workspace parameters K and INC in example modelautosar_swc_counter.

hModel ='autosar_swc_counter'; addpath(fullfile(matlabroot,'/examples/autosarblockset/main')); open_system(hModel); slMap = autosar.api.getSimulinkMapping(hModel); mapParameter(slMap,'K','SharedParameter') arMappedTo = getParameter(slMap,'K') arValue = getParameter(slMap,'K','SwCalibrationAccess') mapParameter(slMap,'INC','ConstantMemory','SwCalibrationAccess','ReadOnly') arMappedTo = getParameter(slMap,'INC') arValue = getParameter(slMap,'INC','SwCalibrationAccess')
arMappedTo = 'SharedParameter' arValue = 'ReadWrite' arMappedTo = 'ConstantMemory' arValue = 'ReadOnly'

Input Arguments

collapse all

Simulink to AUTOSAR mapping information for a model, previously returned byslMap= autosar.api.getSimulinkMapping(model).modelis a handle, character vector, or string scalar representing the model name.

Example:slMap

Name of Simulink model workspace parameter for which to return AUTOSAR mapping information.

Example:'INC'

Name of AUTOSAR parameter property. Valid property names includeSwAddrMethod,SwCalibrationAccess, andDisplayFormat. ForConstantMemory, you can also specify C type qualifier propertiesIsConst,IsVolatile, orQualifier(AUTOSAR additional native type qualifier). ForPortParameter, you can also specifyPortorDataElement. For property descriptions, seemapParameter.

Example:'SwCalibrationAccess'

Output Arguments

collapse all

Variable that returns either the type of the mapped AUTOSAR component parameter or the value of a parameter property.

Example:arValue

Version History

Introduced in R2018b