Main Content

このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。

delete

説明

delete(arProps,elementPath) は、elementPath の AUTOSAR 要素を削除します。

すべて折りたたむ

モデルの AUTOSAR の構成から送信側/受信側インターフェイス Interface1 を削除します。

hModel = 'autosar_swc_expfcns';
openExample(hModel);
arProps = autosar.api.getAUTOSARProperties(hModel);

% Add Interface3
addPackageableElement(arProps,'SenderReceiverInterface','/pkg/if','Interface3');
ifPaths = find(arProps,[],'SenderReceiverInterface','PathType','FullyQualified')
ifPaths =
  1×3 cell array
    {'/pkg/if/Interface1'}    {'/pkg/if/Interface2'}    {'/pkg/if/Interface3'}
% Find AUTOSAR DataReceiverPort and change its interface from Interface1 to Interface3
arPortType = 'DataReceiverPort';
aswcPath = find(arProps,[],'AtomicComponent','PathType','FullyQualified');
rPorts = find(arProps,aswcPath{1},arPortType,'PathType','FullyQualified');
rPort = rPorts{1};
set(arProps,rPort,'Interface','Interface3')

% Delete Interface1
delete(arProps,'Interface1');
ifPaths = find(arProps,[],'SenderReceiverInterface','PathType','FullyQualified')
ifPaths =
  1×2 cell array
    {'/pkg/if/Interface2'}    {'/pkg/if/Interface3'}

入力引数

すべて折りたたむ

事前に arProps = autosar.api.getAUTOSARProperties(model) によって返されたモデルの AUTOSAR プロパティの情報。model は、モデル名を表すハンドル、文字ベクトル、または string スカラーです。

例: arProps

削除する AUTOSAR 要素のパス。

例: 'Input'

バージョン履歴

R2013b で導入