source
类: slreq.Link
命名空间: slreq
获取链接源
输入参数
myLink
— 链接对象
slreq.Link
对象
链接,指定为 slreq.Link
对象。
输出参量
src
— 链接来源
struct
链接源,以包含以下字段的 MATLAB® 结构体返回:
domain
artifact
id
示例
获取链接源
此示例显示如何从链接对象获取链接源。
加载crs_req
需求文件,其中包含巡航控制系统的链接。
slreq.load("crs_req"); slreq.load("crs_req_func_spec");
找到crs_req
链接集。
myLinkSet = slreq.find(Type="LinkSet",Description="crs_req");
从链接集中获取链接。
myLinks = getLinks(myLinkSet)
myLinks=1×12 Link array with properties:
Type
Description
Keywords
Rationale
CreatedOn
CreatedBy
ModifiedOn
ModifiedBy
Revision
SID
Comments
获取其中一个链接的链接源结构体。
src = source(myLinks(1));
将链接源结构体转换为对象。
srcObj = slreq.structToObj(src);
提示
要获取与链接目标结构体关联的对象,请使用
slreq.structToObj
。要检查链接源是否已解析,请使用
isResolvedSource
。
版本历史记录
在 R2018a 中推出
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)