slreq.convertAnnotation
将注释转换为需求对象
语法
说明
将 Simulink® 或 Stateflow® 注释 myReq
= slreq.convertAnnotation(myAnnotation
,myDestination
)myAnnotation
转换为需求 myReq
并将其存储在目标实体 myDestination
中。
将 Simulink 或 Stateflow 注释 myReq
= slreq.convertAnnotation(myAnnotation
,myDestination
,Name,Value
)myAnnotation
转换为需求 myReq
,并使用一个或多个 Name, Value
对参量指定的附加选项将其存储在目标实体 myDestination
中。
示例
将 Simulink 注释转换为需求
% Find all annotations in a Simulink model allAnnotations = find_system('controller_Model', 'FindAll', ... 'on', 'type', 'annotation'); % Create a new requirement set newReqSet = slreq.new('myNewReqSet'); % Convert one annotation into a requirement newReq % and add it to newReqSet newReq = slreq.convertAnnotation(allAnnotations(1), ... newReqSet);
输入参数
输出参量
版本历史记录
在 R2018a 中推出