Main Content


Get AUTOSAR mapping information for Simulink data store



arValue = getDataStore(slMap,slBlockHandle)returns the type of AUTOSAR variable mapped to Simulink® data store memory block slBlockHandle. AUTOSAR variable types include ArTypedPerInstanceMemory and StaticMemory for classic models and Persistency for adaptive models.

arValue = getDataStore(slMap,slBlockHandle,arProperty) returns the value of property arProperty for the AUTOSAR variable that the Simulink data store is mapped to.


collapse all

Get AUTOSAR mapping and property information for the Simulink data store memory block Data Store Memory in example model autosar_bsw_sensor1.

hModel = 'autosar_bsw_sensor1';
hBlock = 'autosar_bsw_sensor1/Data Store Memory';

slMap = autosar.api.getSimulinkMapping(hModel);
arMappedTo = getDataStore(slMap,hBlock)
arNvram = getDataStore(slMap,hBlock,'NeedsNVRAMAccess')
arMappedTo =

arNvram =

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 or handle of Simulink data store memory block for which to return AUTOSAR mapping information.

Example: 'autosar_bsw_sensor1/Data Store Memory'

Name of AUTOSAR variable property.

For AUTOSAR classic models, valid property names include ShortName, SwAddrMethod, SwCalibrationAccess, DisplayFormat, and LongName. For ArTypedPerInstancememory, you can specify NeedsNVRAMAccess. For StaticMemory, you can specify C type qualifier properties IsVolatile or Qualifier (AUTOSAR additional native type qualifier).

For AUTOSAR adaptive models, valid property names include Port and DataElement.

For property descriptions, see mapDataStore.

Example: 'SwCalibrationAccess'

Output Arguments

collapse all

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

Example: arValue

Version History

Introduced in R2019a