主要内容

删除

删除AUTOSAR元素

描述

例子

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

例子

全部折叠

删除收发接口Interface1从AUTOSAR配置的模型。

目录(fullfile (matlabroot,' / / autosarblockset /主要的例子));hModel =“autosar_swc_expfcns”;open_system (hModel);arProps = autosar.api.getAUTOSARProperties(hModel);添加接口3addPackageableElement (arProps“SenderReceiverInterface”,' / pkg /如果',“Interface3”);ifPaths = find(arProps,[],“SenderReceiverInterface”,“PathType”,“FullyQualified”
ifPaths = 1×3 cell array {'/pkg/if/Interface1'} {'/pkg/if/Interface2'} {'/pkg/if/Interface3'}
找到AUTOSAR DataReceiverPort并将其接口从Interface1更改为Interface3arPortType =“DataReceiverPort”;aswcPath = find(arProps,[],“AtomicComponent”,“PathType”,“FullyQualified”);rPorts = find(arProps,aswcPath{1},arPortType,“PathType”,“FullyQualified”);rPort = rPorts{1};集(arProps rPort,“界面”,“Interface3”删除接口1删除(arProps,“Interface1”);ifPaths = find(arProps,[],“SenderReceiverInterface”,“PathType”,“FullyQualified”
ifPaths = 1×2 cell array {'/pkg/if/Interface2'} {'/pkg/if/Interface3'}

输入参数

全部折叠

先前返回的模型的AUTOSAR属性信息arProps= autosar.api.getAUTOSARProperties (模型模型表示模型名称的句柄、字符向量或字符串标量。

例子:arProps

要删除的AUTOSAR元素的路径。

例子:“输入”

版本历史

在R2013b中介绍