mapLookupTable

Map Simulink lookup table to AUTOSAR parameter

Description

example

mapLookupTable(slMap,slParam,arParameterAccessMode,arPortName,arParameterData) maps the Simulink® lookup table slParam to the AUTOSAR parameter data item arParameterData and, if defined, AUTOSAR parameter receiver port arPortName. The AUTOSAR parameter access mode for the parameter is set to arParameterAccessMode.

Examples

collapse all

Set AUTOSAR mapping information for Simulink lookup tables. The model has lookup tables named L_4x6_single and L_4_single. This example:

  • Maps Simulink lookup table L_4x6_single 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.

  • Maps Simulink lookup table L_4_single 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');
mapLookupTable(slMap,'L_4x6_single','Shared','','L_4x6_single_ar');
[arParameterAccessMode,arPortName,arParameterData]=getLookupTable(slMap,'L_4x6_single')
arParameterAccessmode =
Shared

arPortName =
''

arParameterData =
L_4x6_single_ar
mapLookupTable(slMap,'L_4_single','PortParameter','prmRPort1','prmDE1');
[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 set AUTOSAR mapping information.

Example: 'L_4x6_single'

Value of the AUTOSAR parameter access mode to which to map the specified Simulink lookup table. The value can be PortParameter, Shared, PerInstance, or Const.

Example: 'Shared'

Name of the AUTOSAR parameter receiver port to which to map the specified Simulink lookup table. If the parameter is internal to the AUTOSAR software component, and not associated with a port-based parameter interface, specify ''.

Example: 'PrmRPort1'

Name of the AUTOSAR parameter data item to which to map the specified Simulink lookup table. The parameter can be internal to the AUTOSAR software component or associated with a port-based parameter interface.

Example: 'prmDE1'

Introduced in R2016b