Класс: slreq. ReqSet
Пакет: slreq
Поиск требований в наборе требований, имеющих соответствующие значения атрибутов
myReq = find(rs, 'PropertyName', 'PropertyValue')
находит и возвращает myReq = find(rs, 'PropertyName', 'PropertyValue')slreq.Requirement объект myReq в наборе требований rs задается сопоставлением свойств PropertyName и PropertyValue. Сопоставление имен свойств не учитывает регистр.
% Load a requirements set file rs = slreq.load('C:\MATLAB\My_Requirements_Set_1.slreqx'); % Find all editable requirements in the requirement set allReqs = find(rs, 'Type', 'Requirement'); % Find all referenced requirements in the requirement set allRefs = find(rs, 'Type', 'Reference'); % Find all requirements with a certain ID matchedReqs = find(rs, 'ID', 'R1.1');
Можно искать требования в наборах требований, создавая шаблоны поиска регулярных выражений с помощью символа тильды (~).
% Load a requirements set file rs = slreq.load('C:\MATLAB\My_Requirements_Set_1.slreqx'); % Find all requirements that correspond to the controller controllerReqs = find(rs, 'Type', 'Requirement', 'Summary', '~Controller(?i)\w*') controllerReqs = 1×19 Requirement array with properties: Id Summary Keywords Description Rationale SID CreatedBy CreatedOn ModifiedBy ModifiedOn FileRevision Dirty Comments