target.API 类
命名空间: target
描述
API 定义一组入口函数,用于与软件应用程序或服务进行交互。使用 target.API
对象为目标定义提供 API 详细信息。使用此类和 target.APIImplementation
来描述如何在目标硬件上使用和编译 API。
使用 target.create
函数创建 target.API
对象。
属性
Name
— API 名称
字符向量 | 字符串
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)