Класс: slreq. Ссылка
Пакет: slreq
Установите место назначения ссылки требования
setDestination(myLink,dest)
setDestination(
устанавливает целевой артефакт ссылки myLink
,dest
)dest
для slreq.Link
объект myLink
.
% Set the Gain block in model myModel as the destination for link myLink setDestination(myLink, 'myModel/Gain');
% Create a Simulink Test test file, test suite, and a test case myTestfile = sltest.testmanager.TestFile('my_test_file.mldatx'); myTestsuite = sltest.testmanager.TestSuite(myTestfile,'My Test Suite'); myTestcase = sltest.testmanager.TestCase(myTestsuite,'equivalence','Equivalence Test Case'); % Create a link from the test case to requirement myReq myLink = slreq.createLink(req, myTestcase); % Set the link destination to the test suite setDestination(myLink, myTestsuite);
% Get Stateflow Root Handle rt = sfroot; % Find the state with the name 'Intermediate' myState = rt.find('-isa', 'Stateflow.State', 'Name', 'Intermediate'); % Set the destination for link myLink to myState setDestination(myLink, myState);
% Get handle to Simulink data dictionary entry myDict = Simulink.data.dictionary.open('myDictionary.sldd'); dataSectObj = getSection(myDict,'Design Data'); myDictEntry = getEntry(dataSectObj,'myEntry'); % Set the destination for link myLink to myDictEntry setDestination(myLink, myDictEntry);