getClassNamespace
説明
例
モデルのクラス名前空間へのアクセス
モデルを開きます。モデルに関連付けられたマッピング情報 slMap
にアクセスするには、関数 autosar.api.getSimulinkMapping
を使用します。
%% Open an adaptive AUTOSAR model hModel = 'autosar_LaneGuidance'; openExample(hModel); %% Access the mapping information slMap = autosar.api.getSimulinkMapping(hModel);
モデルの名前空間にアクセスするには、関数 getClassNamespace
を使用します。モデルに名前空間を指定していなかった場合、関数 getClassNamespace
は空の文字ベクトルを返します。
name = getClassNamespace(slMap)
name = 0x0 empty char array
関数 setClassNamespace
を使用してモデルの名前空間を指定します。
setClassNamespace(slMap, 'myClassNamespace');
関数 getClassNamespace
から指定したクラス名前空間が返されるようになります。
name = getClassNamespace(slMap)
name = 'myClassNamespace'
入力引数
slMap
— モデルの Simulink® から AUTOSAR へのマッピング情報
ハンドル
以前に
によって返されたモデルの Simulink から AUTOSAR へのマッピング情報。slMap
= autosar.api.getSimulinkMapping(model
)
は、モデル名を表すハンドル、文字ベクトル、または string スカラーです。model
例: slMap
出力引数
namespace
— モデルのクラス名前空間
文字ベクトル
モデルのクラス名前空間。文字ベクトルとして返されます。モデルに名前空間を指定していなかった場合、関数 getClassNamespace
は空の文字ベクトルを返します。
バージョン履歴
R2021a で導入
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)