target.mainfunction类
包裹:目标
提供C和C ++依赖性主要的
目标硬件应用程序的功能
描述
使用target.mainfunction
提供的课程主要的
应用程序的功能依赖性主要的
在目标硬件上运行的功能。例如,C和C ++初始化和终止代码,包括
预处理器指令和规格主要的
该应用程序的函数参数。
To create atarget.mainfunction
对象,使用target。创建
功能。
特性
姓名
-依赖收集
角色向量|细绳
集合的名称主要的
依赖性。
属性:
GetAccess |
public
|
setAccess |
public
|
依赖性
-建立依赖性
target.builddendencies
目的
Compiler build tool dependencies of the主要的
功能,包括标头文件,源文件和库。
属性:
GetAccess |
public
|
setAccess |
public
|
参数
-命令行参数
字符串数组
捕获运行时命令行参数依赖项。
属性:
GetAccess |
public
|
setAccess |
public
|
IncludeFiles
-#包括
files
字符串数组
Array of header files that must be included in a target主要的
通过使用预处理器指令的功能#include“ path-spec”
。
属性:
GetAccess |
public
|
setAccess |
public
|
系统IncludeFiles
-系统#包括
files
字符串数组
Array of header files that must be included in a target主要的
通过使用预处理器指令的功能#包括
。
属性:
GetAccess |
public
|
setAccess |
受保护
|
初始化码
-目标主要的
初始化
角色向量|细绳
C或C ++代码的格式字符串主要的
功能用于初始化目标资源。
属性:
GetAccess |
public
|
setAccess |
public
|
终端码
-目标主要的
终止
角色向量|细绳
C或C ++代码的格式字符串主要的
功能用于终止目标资源。
属性:
GetAccess |
public
|
setAccess |
public
|
例子
指定特定目标主要的
函数依赖关系
创建一个target.mainfunction
对象并将其与target.board对象
,捕获主要的
Arduino的功能依赖性®木板。工作流程(例如在循环中的处理器(PIL))在生成一个信息时可以使用此信息主要的
在目标硬件上运行的应用程序的功能。
美国银行rd = target.create('木板',,,,'姓名',,,,“ Arduino董事会”)mainfunction = target.greate('主功能');mainfunction.name =“ Arduino主要依赖性”;mainfunction.includefiles = {'arduino.h'};mainfunction.initializationcode = fileread('arduino_main_initialization.c');board.mainfunctions = mainfunction;
In the code snippet,arduino_main_initialization.c
包含C代码。例如:
/*初始化系统*/在里面();
指定主要的
功能运行时参数
此代码片段来自通过使用目标包装设置PIL连接性shows how you can create and use atarget.mainfunction
目的to specify主要的
API实现所需的函数参数。
comms = target.create(“通信接口”);comms.name =“ Linux TCP接口”;comms.channel ='tcpchannel';comms.apiimplementations = target.greate(“ APIIMPLENTIONT”,,,,...'姓名',,,,'x86 rtiostream实现');comms.apiimplement.api = target.greate('api',,,,'姓名',,,,'rtiosstream');comms.apiimplement.builddepentencies = target.greate(“构建依赖性”);comms.APIImplementations.BuildDependencies.SourceFiles =...{fullfile('$(matlabroot)'',,,,...“工具箱”,,,,...'coder',,,,...'rtiosstream',,,,...'src',,,,...'rtiostreamtcpip',,,,...'rtiostream_tcpip.c')};comms.apiimplement.mainfunction = target.create('主功能',,,,...'姓名',,,,'TCP RtIOStream Main');comms.apiimplement.mainfunction.arguments = {“利用”,,,,'1',,,,'-港口',,,,'0'};hosttarget.communicationinterfaces = comm;
matlab命令
您单击了与此MATLAB命令相对应的链接:
通过在MATLAB命令窗口中输入该命令。Web浏览器不支持MATLAB命令。金宝app
您还可以从以下列表中选择一个网站:
如何获得最佳网站性能
选择中国网站(中文或英语)以获得最佳场地性能。其他Mathworks乡村网站未针对您所在的访问进行优化。
美洲
- América Latina(Español)
- 加拿大(英语)
- 美国(英语)