MATLAB 帮助中心
将元素添加到模型中的 AUTOSAR 包
addPackageableElement(arProps,category,package,name)
addPackageableElement(arProps,category,package,name,property,value)
addPackageableElement(arProps,category,package,name) 将指定的 category 的元素 name 添加到针对 AUTOSAR 配置的模型中的指定 AUTOSAR package 中。
arProps
category
package
name
addPackageableElement(arProps,category,package,name,property,value) 设置所添加元素的一个指定属性的值。
property,value
示例
全部折叠
IsService
使用完全限定路径,将发送方-接收方接口添加到接口包中,并将 IsService 属性设置为 true。
true
hModel = 'autosar_swc_expfcns'; openExample(hModel); arProps = autosar.api.getAUTOSARProperties(hModel); addPackageableElement(arProps,'SenderReceiverInterface','/pkg/if','Interface3',... 'IsService',true); ifPaths = find(arProps,[],'SenderReceiverInterface',... 'IsService',true,'PathType','FullyQualified')
ifPaths = 1×1 cell array {'/pkg/if/Interface3'}
模型的 AUTOSAR 属性信息,以前由 arProps = autosar.api.getAUTOSARProperties(model) 返回。model 是一个表示模型名称的句柄、字符向量或字符串标量。
arProps = autosar.api.getAUTOSARProperties(model)
model
示例: arProps
要添加的元素的类别。有效的类别值为 'ClientServerInterface'、'DataTypeMappingSet'、'ModeDeclarationGroup'、'ModeSwitchInterface'、'Package'、'ParameterComponent'、'ParameterInterface'、'SenderReceiverInterface'、'SwAddrMethod' 和 'SystemConst'。
'ClientServerInterface'
'DataTypeMappingSet'
'ModeDeclarationGroup'
'ModeSwitchInterface'
'Package'
'ParameterComponent'
'ParameterInterface'
'SenderReceiverInterface'
'SwAddrMethod'
'SystemConst'
示例: 'SenderReceiverInterface'
元素包的完全限定路径。
示例: '/pkg/if'
'/pkg/if'
要添加的元素的名称。
示例: 'Interface3'
'Interface3'
用于设置元素属性值的属性/值对组。表 AUTOSAR 元素的属性 列出了与 AUTOSAR 元素相关联的属性。
示例: 'IsService',true
'IsService',true
在 R2014b 中推出
autosar.api.getAUTOSARProperties | delete
autosar.api.getAUTOSARProperties
delete
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处