Main Content

getLookupTable

Get AUTOSAR mapping information for Simulink base workspace lookup table or breakpoint object

For run-time calibration of AUTOSAR parameters and lookup tables, R2019a introduced graphical mapping of model workspace parameters to AUTOSAR component parameters by using the Code Mappings editor. If you currently model AUTOSAR lookup tables by using AUTOSAR base-workspace parameters with the mapping functions getLookupTable and mapLookupTable, consider switching to using Simulink® model-workspace parameters with either the Code Mappings editor Parameters tab or the mapping functions getParameter and mapParameter. For more information, see Map Model Workspace Parameters to AUTOSAR Component Parameters and Configure Lookup Tables for AUTOSAR Calibration and Measurement.

Description

example

[arParameterAccessMode,arPortName,arParameterData] = getLookupTable(slMap,slParam) returns the values of the AUTOSAR parameter access mode arParameterAccessMode, AUTOSAR parameter receiver port arPortName, and AUTOSAR parameter data item arParameterData mapped to Simulink lookup table slParam.

Use this function only for lookup tables described by Simulink lookup table and breakpoint data objects in the base workspace.

Examples

collapse all

Get AUTOSAR mapping information for Simulink lookup tables. The model has lookup tables named L_4x6_single and L_4_single.

  • Simulink lookup table L_4x6_single is mapped to AUTOSAR parameter data item L_4x6_single_ar, which the AUTOSAR software component defines and accesses internally. (The parameter is not associated with a port-based parameter interface.) Parameter L_4x6_single_ar uses Shared parameter access mode.

  • Simulink lookup table L_4_single is mapped to AUTOSAR parameter data item prmDE1, which is a data element associated with AUTOSAR parameter receiver port prmRPort1. Parameter prmDE1 uses PortParameter parameter access mode.

open_system('mySWC')
slMap=autosar.api.getSimulinkMapping('mySWC');
[arParameterAccessMode,arPortName,arParameterData]=getLookupTable(slMap,'L_4x6_single')
arParameterAccessmode =
Shared

arPortName =
''

arParameterData =
L_4x6_single_ar
[arParameterAccessMode,arPortName,arParameterData]=getLookupTable(slMap,'L_4_single')
arParameterAccessmode =
PortParameter

arPortName =
prmRPort1

arParameterData =
prmDE1

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 the Simulink lookup table for which to return AUTOSAR mapping information.

Example: 'L_4x6_single'

Output Arguments

collapse all

Variable that returns the value of the AUTOSAR parameter access mode mapped to the specified Simulink lookup table. The value can be PortParameter, Shared, PerInstance, or Const.

Example: arParameterAccessMode

Variable that returns the name of the AUTOSAR parameter receiver port mapped to the specified Simulink lookup table. If the parameter returned by arParameterData is internal to the AUTOSAR software component, and not associated with a port-based parameter interface, arPortName returns an empty character vector.

Example: arPortName

Variable that returns the name of the AUTOSAR parameter data item mapped to the specified Simulink lookup table. The parameter can be internal to the AUTOSAR software component or associated with a port-based parameter interface.

Example: arParameterData

Version History

Introduced in R2016b