Main Content

getParameter

Get AUTOSAR mapping information for Simulink model workspace parameter

Description

example

arValue = getParameter(slMap,slParameter) returns the type of AUTOSAR parameter mapped to Simulink® model workspace parameter slParameter. AUTOSAR parameter types include SharedParameter, PerInstanceParameter, ConstantMemory, and PortParameter.

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

Examples

collapse all

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

hModel = 'autosar_swc_counter';
openExample(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 by slMap = autosar.api.getSimulinkMapping(model). model is 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 include SwAddrMethod, SwCalibrationAccess, DisplayFormat, and LongName. For ConstantMemory, you can also specify C type qualifier properties IsConst, IsVolatile, or Qualifier (AUTOSAR additional native type qualifier). For PortParameter, you can also specify Port or DataElement. For property descriptions, see mapParameter.

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