主要内容

AUTOSAR的设置属性元素

描述

例子

集(arProps,elementPath,财产,价值)AUTOSAR的集指定的属性元素elementPath价值。对于参考其他元素的属性,价值是一个路径。设置XML包装选项,指定elementPath作为XmlOptions

例子

全部折叠

AUTOSAR的模型,设置IsService财产sender-receiver接口Interface1真正的(1),表明港口接口用于AUTOSAR服务。

hModel =“autosar_swc_expfcns”;openExample (hModel);arProps = autosar.api.getAUTOSARProperties (hModel);集(arProps,“Interface1”,“IsService”,真正的);isService =得到(arProps,“Interface1”,“IsService”)
isService =逻辑1

AUTOSAR的模型,设置象征财产可运行Runnable1test_symbol

hModel =“autosar_swc_expfcns”;openExample (hModel);arProps = autosar.api.getAUTOSARProperties (hModel);compQName =得到(arProps,“XmlOptions”,“ComponentQualifiedName”);可运行=找到(arProps compQName,可运行的,“PathType”,“FullyQualified”);runnable (2)
ans = 1×1单元阵列{' / pkg / swc / ASWC / IB / Runnable1 '}
得到(arProps runnable {2},“象征”)
ans = ' Runnable1 '
集(arProps runnable, {2},“象征”,“test_symbol”)得到(arProps runnable {2},“象征”)
ans = ' test_symbol '

输入参数

全部折叠

AUTOSAR属性信息模型,之前返回arProps= autosar.api.getAUTOSARProperties (模型)模型是一个处理,特征向量,或字符串标量表示模型的名字。

例子:arProps

路径的AUTOSAR元素设置一个属性。设置XML包装选项,指定XmlOptions,

例子:“输入”

属性的设置一个值,有效的AUTOSAR的属性元素之一。

例子:“IsService”

值设置为指定的属性。对于参考其他元素的属性,指定一个路径。

例子:真正的

版本历史

介绍了R2013b