ヘルプ センターヘルプ センター
AUTOSAR 要素の検索
paths = find(arProps,rootPath,category)
paths = find(arProps,rootPath,category,'PathType',value)
paths = find(arProps,rootPath,category,property,value)
paths = find(arProps,rootPath,category) は、category に一致する AUTOSAR 要素の paths (パス rootPath から始まる) を返します。
paths
arProps
rootPath
category
例
paths = find(arProps,rootPath,category,'PathType',value) では、返される paths が完全修飾か部分修飾かを指定します。
'PathType',value
paths = find(arProps,rootPath,category,property,value) では、指定された category の要素のプロパティに対する制約値を指定し、検索を絞り込みます。
property,value
すべて折りたたむ
モデルで、プロパティ IsService が false である送信側/受信側インターフェイスを検索し、完全修飾パスを返します。
IsService
false
hModel = 'autosar_swc_expfcns'; open_system(hModel); arProps = autosar.api.getAUTOSARProperties(hModel); ifPaths = find(arProps,[],'SenderReceiverInterface',... 'IsService',false,'PathType','FullyQualified')
ifPaths = 1x2 cell {'/pkg/if/Interface1'} {'/pkg/if/Interface2'}
モデルにモード スイッチ インターフェイスを追加し、find を使用してモデル内のモード スイッチ インターフェイスのパスを一覧表示します。
find
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'}
事前に arProps = autosar.api.getAUTOSARProperties(model) によって返されたモデルの AUTOSAR プロパティの情報。model は、モデル名を表すハンドル、文字ベクトル、または string スカラーです。
arProps = autosar.api.getAUTOSARProperties(model)
model
例: arProps
[]
指定したタイプの AUTOSAR 要素を検索する開始点を指定するパス。[] はコンポーネントのルートを示します。
例: []
パスを返す AUTOSAR 要素のタイプ。
例: 'SenderReceiverInterface'
'SenderReceiverInterface'
'PartiallyQualified'
'FullyQualified'
完全修飾パスを返すには FullyQualified を指定します。
FullyQualified
例: 'PathType','FullyQualified'
'PathType','FullyQualified'
指定したカテゴリの要素の有効なプロパティと、検索でそのプロパティに一致させる値。表AUTOSAR 要素のプロパティに、AUTOSAR 要素に関連付けられているプロパティを示しています。プロパティの詳細については、AUTOSAR Element Propertiesを参照してください。
例: 'IsService',true
'IsService',true
AUTOSAR 要素へのパスを返す変数。
例: ifPaths
ifPaths
R2013b で導入
autosar.api.getAUTOSARProperties | add | delete | get | set
autosar.api.getAUTOSARProperties
add
delete
get
set
次の 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:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office