get
AUTOSAR 要素のプロパティの取得
説明
は、pValue
= get(arProps
,elementPath
,property
)elementPath
の AUTOSAR 要素の指定したプロパティの値を返します。
例
送信側/受信側インターフェイスの IsService
プロパティの値の取得
モデルで、送信側/受信側インターフェイス Interface1
の IsService
プロパティの値を取得します。変数 IsService
は、送信側/受信側インターフェイスがサービスでないことを示す false
(0) を返します。
hModel = 'autosar_swc_expfcns'; openExample(hModel); arProps = autosar.api.getAUTOSARProperties(hModel); isService = get(arProps,'Interface1','IsService')
isService = logical 0
コンポーネントの修飾名とランナブル記号名の取得
AUTOSAR モデルの場合、ランナブル Runnable1
の symbol
プロパティを test_symbol
に設定する準備のために、AUTOSAR コンポーネントの修飾名と既存のランナブル記号名を取得します。
hModel = 'autosar_swc_expfcns'; openExample(hModel); arProps = autosar.api.getAUTOSARProperties(hModel); compQName = get(arProps,'XmlOptions','ComponentQualifiedName'); runnables = find(arProps,compQName,'Runnable','PathType','FullyQualified'); runnables(2)
ans = 1×1 cell array {'/pkg/swc/ASWC/IB/Runnable1'}
get(arProps,runnables{2},'symbol')
ans = 'Runnable1'
set(arProps,runnables{2},'symbol','test_symbol') get(arProps,runnables{2},'symbol')
ans = 'test_symbol'
入力引数
arProps
— モデルの AUTOSAR プロパティの情報
ハンドル
事前に
によって返されたモデルの AUTOSAR プロパティの情報。arProps
= autosar.api.getAUTOSARProperties(model
)
は、モデル名を表すハンドル、文字ベクトル、または string スカラーです。model
例: arProps
elementPath
— AUTOSAR 要素のパス
文字ベクトル | string スカラー
プロパティの値を返す AUTOSAR 要素のパス。
例: 'Input'
property
— 要素プロパティ
文字ベクトル | string スカラー
AUTOSAR 要素の有効なプロパティのうち、値を返すプロパティ。
例: 'IsService'
出力引数
pValue
— プロパティの値またはパス
プロパティの値 | 複合プロパティのパスまたは他のプロパティを参照するプロパティのパス
指定した AUTOSAR プロパティの値を返す変数。複合プロパティまたは他のプロパティを参照するプロパティの場合、戻り値はそのプロパティのパスです。
例: ifPaths
バージョン履歴
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)