このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。
add
AUTOSAR 要素へのプロパティの追加
説明
add(
は、arProps
,parentPath
,property
,name
)property
の指定に基づいて、name
が指定された複合子要素を、parentPath
上の AUTOSAR 要素に追加します。
add(
は、追加する子プロパティ要素の指定されたプロパティの値を設定します。arProps
,parentPath
,property
,name
,childproperty,value
)
例
送信側インターフェイスへのデータ要素の追加
送信側インターフェイス Interface1
にデータ要素 DE3
を追加します。
hModel = 'autosar_swc_expfcns'; open_system(hModel); arProps = autosar.api.getAUTOSARProperties(hModel); add(arProps,'Interface1','DataElements','DE3'); get(arProps,'Interface1','DataElements')
ans = 1x3 cell
{'Interface1/DE1'} {'Interface1/DE2'} {'Interface1/DE3'}
モード スイッチ インターフェイスへのモード グループの追加
完全修飾パスを使用してモード スイッチ インターフェイスを追加し、IsService
プロパティを true
に設定します。複合プロパティ ModeGroup
を使用して、モード スイッチ インターフェイスにモード グループ mgMode
を追加します。
hModel = 'mAutosarMsConfigAfter'; open_system(hModel); arProps=autosar.api.getAUTOSARProperties(hModel); addPackageableElement(arProps,'ModeSwitchInterface','/pkg/if','Interface3',... 'IsService',true); ifPaths = find(arProps,[],'ModeSwitchInterface','PathType','FullyQualified')
ifPaths = 1x3 cell
{'/pkg/if/myMsIf'} {'/pkg/if/MsIf2'} {'/pkg/if/Interface3'}
add(arProps,'/pkg/if/Interface3','ModeGroup','mgModes'); get(arProps,'Interface3','ModeGroup')
ans = 'Interface3/mgModes'
入力引数
arProps
— モデルの AUTOSAR プロパティの情報
ハンドル
事前に
によって返されたモデルの AUTOSAR プロパティの情報。arProps
= autosar.api.getAUTOSARProperties(model
)
は、モデル名を表すハンドル、文字ベクトル、または string スカラーです。model
例: arProps
parentPath
— 親 AUTOSAR 要素のパス
文字ベクトル | string スカラー
指定した子プロパティ要素を追加する親 AUTOSAR 要素のパス。
例: 'Input'
property
— プロパティのタイプ
文字ベクトル | string スカラー
AUTOSAR 要素の有効なプロパティのうち、追加するプロパティのタイプ。
例: 'DataElements'
name
— 子プロパティ要素の名前
文字ベクトル | string スカラー
追加する子プロパティ要素の名前。
例: 'DE1'
childproperty,value
— 子プロパティと値
名前 (文字ベクトルまたは string スカラー)、値
設定する子プロパティとその値。表AUTOSAR 要素のプロパティには、AUTOSAR 要素に関連付けられているプロパティを示しています。
例: 'Name','event1'
バージョン履歴
R2013b で導入
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)