Main Content

mapDataStore

地图万博1manbetxdata store to AUTOSAR variable

Description

例子

mapdatastore(SLMAP,,,,slblockhandle,,,,Arvartypemaps Simulink®数据存储存储器块slblockhandle到类型的AutoSar变量Arvartype用于汽车运行时校准。Autosar变量类型包括ArtypedperinstancememoryandStaticMemoryfor classic models and持久性for adaptive models.

mapdatastore(SLMAP,,,,slblockhandle,,,,Arvartype,,,,名称,价值指定AutoSar的其他属性Artypedperinstancememory,,,,StaticMemory, 或者持久性通过使用一个或多个可变名称,价值pair arguments.

例子

全部收缩

设置simulink数据存储内存块的autosar映射和属性信息万博1manbetxData Store Memoryin example modelautosar_bsw_sensor1

hmodel ='autosar_bsw_sensor1';addpath(fullfile(matlabroot,'/examples/autosarblockset/main'));hBlock ='autosar_bsw_sensor1/数据存储内存';Open_System(Hmodel);slmap = autosar.api.get万博1manbetxSimulinkMapping(hmodel);mapdatastore(slmap,hblock,'Artypedperinstancemory',,,,'NeedsNVRAMAccess',,,,'true');Armappapto = getDatastore(slmap,hblock)arnvram = getdatastore(slmap,hblock,'NeedsNVRAMAccess'
武装='artypedperinstancemory'arnvram ='true'

输入参数

全部收缩

万博1manbetxSimulink到AutoSar映射信息的模型,以前由SLMAP= autosar.api.get万博1manbetxSimulinkMapping(模型模型是代表模型名称的句柄,字符向量或字符串标量。

Example:SLMAP

姓名or handle of Simulink data store memory block that you set AUTOSAR mapping information for.

Example:'autosar_bsw_sensor1/数据存储内存'

Type of AUTOSAR variable that you want to map the specified Simulink data store to. Valid AUTOSAR variable types includeArtypedperinstancememory,,,,StaticMemory,,,,andAutofor classic models. Valid AUTOSAR variable types include持久性andAutofor adaptive models. To accept software mapping defaults, specifyAuto

Example:'StaticMemory'

名称值参数

指定optional pairs of arguments asname1 = value1,...,namen = valuen, 在哪里姓名是参数名称和Valueis the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

在R2021a之前,请使用逗号分隔每个名称和值,并附上姓名用引号。

Example:“ swcalibrationAccess”,“ readwrite'指定对变量进行运行时校准的读取访问。

指定的持久性端口的数据元素ssociated with the AUTOSAR adaptive variable.DataElementcan be set with港口只要。

Example:“端口”,“ perport”,“ datalement”,“ delement1'

为Autosar变量指定显示格式。AutoSar显示格式规格控制校准和测量数据的宽度和精度显示。有关更多信息,请参阅配置DisplayFormat

Example:“ displayformat”,'%2.6F'

指定是否包括C类型预选赛易挥发的在AutoSar变量的生成代码中。

Example:“ iSvolatile',“ true”

指定whether the AUTOSAR variable requires access to nonvolatile RAM on a processor. Specifytrue为了配置每种命令内存,成为特定NVRAM块的镜子块。指定RestoreatStarttrue至read data from memory at the beginning of a program. SpecifyStoreAtShutdowntrue在程序末尾将数据写入内存。

Example:'NeedsNVRAMAccess','true', 'RestoreAtStart', 'true', 'StoreAtShutdown', 'true'

指定要与Autosar自适应变量关联的持久性端口。港口can be set withDataElement只要。

Example:“端口”,“ perport”,“ datalement”,“ delement1'

可选地指定AutoSar附加类型的预选赛,以在AutoSar变量的生成代码中包含。

Example:“预选赛”,“ test_qualifier'

指定AutoSar变量的简短名称。如果未指定,ARXML导出会自动生成一个短名称,这与数据存储名称不同。

Example:'ShortName','LowSetPoint'

指定swaddrmethodname that is valid for the AUTOSAR variable. Code generation uses theswaddrmethodname to group AUTOSAR variables in a memory section for access by calibration and measurement tools. For a list of validswaddrmethod变量的值,请参阅代码映射编辑器,数据存储标签。有关更多信息,请参阅Configure SwAddrMethod

Example:“ swaddrmethod”,“ var'

指定how calibration and measurement tools can access the AUTOSAR variable. Valid access values include只读,,,,ReadWrite,,,,and无法访问。有关更多信息,请参阅配置SWCALIBRATIONACCESS

Example:“ swcalibrationAccess”,“ readwrite'

版本历史记录

在R2019a中引入