Main Content

getReporter

Class: systemcomposer.rptgen.finder.InterfaceResult
Namespace: systemcomposer.rptgen.finder

Get interface reporter

Since R2022b

Syntax

reporter = getReporter(result)

Description

reporter = getReporter(result) returns a reporter that you can use to include information about interfaces in a model. You can use this reporter to customize what information to include and how to format the information. See systemcomposer.rptgen.report.Interface for more information on how to customize the reporter.

Input Arguments

expand all

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

Output Arguments

expand all

Interface reporter, returned as a systemcomposer.rptgen.report.Interface 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="InterfaceResultReport",...
CompileModelBeforeReporting=false);
add(rpt,TitlePage("Title",sprintf('Interfaces in %s Model',model_name)));
add(rpt,TableOfContents);
chapter = Chapter("Title","Interfaces");

intfFinder = InterfaceFinder(model_name);
result = find(intfFinder);
for i=1:length(result)
    reporter = getReporter(result(i));
    add(chapter,reporter);
end

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

Version History

Introduced in R2022b