Main Content

next

Class: systemcomposer.rptgen.finder.InterfaceFinder
Namespace: systemcomposer.rptgen.finder

Get next interface search result

Since R2022b

Syntax

result = next(finder)

Description

result = next(finder) gets the next Interface search result.

Input Arguments

expand all

Interface finder, specified as a systemcomposer.rptgen.finder.InterfaceFinder object.

Output Arguments

expand all

Interface result, returned as a systemcomposer.rptgen.finder.InterfaceResult object.

Examples

expand all

Use the InterfaceFinder and InterfaceResult classes to generate a report.

import mlreportgen.report.*
import slreportgen.report.*
import systemcomposer.rptgen.finder.*

scExampleSmallUAV
model_name = "scExampleSmallUAVModel";
model = systemcomposer.loadModel(model_name);
rpt = slreportgen.report.Report(output="InterfaceFinderReport",...
CompileModelBeforeReporting=false);
add(rpt,TitlePage("Title",sprintf('Interfaces in %s Model',model_name)));
add(rpt,TableOfContents);
 
intfFinder = InterfaceFinder(model_name);

chapter = Chapter("Title","Interfaces");
while hasNext(intfFinder)
    interface = next(intfFinder);
    sect = Section("Title",interface.InterfaceName);
    add(sect,interface);
    add(chapter,sect);
end
 
add(rpt,chapter);
close(rpt);
rptview(rpt);

Version History

Introduced in R2022b