主要内容

删除

删除AUTOSAR元素

描述

例子

删除(arProps,elementPath)删除AUTOSAR元素elementPath

例子

全部折叠

删除sender-receiver接口Interface1AUTOSAR配置的一个模型。

hModel =“autosar_swc_expfcns”;openExample (hModel);arProps = autosar.api.getAUTOSARProperties (hModel);%添加Interface3addPackageableElement (arProps“SenderReceiverInterface”,' / pkg /如果',“Interface3”);ifPaths =找到(arProps [],“SenderReceiverInterface”,“PathType”,“FullyQualified”)
ifPaths = 1×3单元阵列{/ pkg /如果/ Interface1 '} {/ pkg /如果/ Interface2 '} {/ pkg /如果/ Interface3 '}
%找到AUTOSAR DataReceiverPort和改变其界面Interface1 Interface3arPortType =“DataReceiverPort”;aswcPath =找到(arProps [],“AtomicComponent”,“PathType”,“FullyQualified”);rPorts =找到(arProps aswcPath {1}, arPortType,“PathType”,“FullyQualified”);rPort = rPorts {1};集(arProps rPort,“界面”,“Interface3”)%删除Interface1删除(arProps,“Interface1”);ifPaths =找到(arProps [],“SenderReceiverInterface”,“PathType”,“FullyQualified”)
ifPaths = 1×2单元阵列{/ pkg /如果/ Interface2 '} {/ pkg /如果/ Interface3 '}

输入参数

全部折叠

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

例子:arProps

路径AUTOSAR元素删除。

例子:“输入”

版本历史

介绍了R2013b