target.API クラス
パッケージ: target
説明
API は、ソフトウェア アプリケーションまたはサービスの操作に関する一連のエントリポイント関数を定義します。target.API
オブジェクトを使用して、ターゲット定義に関する API の詳細を提供します。target.APIImplementation
を指定してこのクラスを使用し、API を使用してターゲット ハードウェアにビルドする方法について記述します。
target.API
オブジェクトの作成には関数 target.create
を使用します。
プロパティ
Name
— API 名
文字ベクトル | string
API の名前。
例: timerApi.Name = 'Linux Timer API';
属性:
GetAccess | public |
SetAccess | public |
Language
— API 言語
target.Language
オブジェクト
API 実装のプログラミング言語。
属性:
GetAccess | public |
SetAccess | public |
Functions
— API 関数
target.Function
オブジェクト ベクトル
API を構成するエントリポイント関数のセットについて記述する target.Function
オブジェクトのベクトル。
属性:
GetAccess | public |
SetAccess | public |
例
rtiostream
C API の記述
この例では、rtiostream
C API の実装の詳細を提供します。
apiImp = target.create('APIImplementation', 'Name', ... 'x86 rtiostream Implementation'); apiImp.API = target.create('API', 'Name', 'rtiostream'); apiImp.BuildDependencies = target.create('BuildDependencies'); apiImp.BuildDependencies.SourceFiles = ... {fullfile('$(MATLAB_ROOT)', 'toolbox', ... 'coder', 'rtiostream','src', ... 'rtiostreamtcpip', 'rtiostream_tcpip.c')}; apiImp.MainFunction = target.create('MainFunction', ... 'Name', 'TCP RtIOStream Main'); apiImp.MainFunction.Arguments = {'-blocking', '1', '-port', '0'};
バージョン履歴
R2020b で導入
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)