Main Content

next

Class: systemcomposer.rptgen.finder.ConnectorFinder
Package: systemcomposer.rptgen.finder

Get next connector search result

Syntax

result = next(finder)

Description

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

Input Arguments

expand all

Connector finder, specified as a systemcomposer.rptgen.finder.ConnectorFinder object.

Output Arguments

expand all

Connector result, returned as a systemcomposer.rptgen.finder.ConnectorResult object.

Examples

expand all

Use the ConnectorFinder and ConnectorResult 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="ConnectorFinderReport",...
CompileModelBeforeReporting=false);
add(rpt,TitlePage("Title",sprintf('Connectors in %s Model',model_name)));
add(rpt,TableOfContents);

connectorFinder = ConnectorFinder(model_name);
connectorFinder.ComponentName = "scExampleSmallUAVModel/Flight Support Components/GPS Module";
connectorFinder.Filter = "Component";
chapter = Chapter("Title","Connectors");
while hasNext(connectorFinder)
    connector = next(connectorFinder);
    sect = Section("Title",connector.Name);
    add(sect,connector);
    add(chapter,sect);
end

add(rpt,chapter);
close(rpt);
rptview(rpt);

Version History

Introduced in R2022b