Main Content

systemcomposer.rptgen.finder.ProfileFinder Class

Namespace: systemcomposer.rptgen.finder
Superclasses: mlreportgen.finder.Finder (MATLAB Report Generator)

Find profiles

Since R2022b

Description

The systemcomposer.rptgen.finder.ProfileFinder class searches for information about profiles in a given System Composer™ architecture model.

Creation

finder = ProfileFinder(Container) creates a finder that finds profiles in a given model.

Note

This finder provides these options to get search results:

  • To return the search results as an array, use the find method. Add the results directly to a report or process the results in a for-loop.

  • To iterate through the results one at a time, use the hasNext and next methods in a while-loop.

Neither option has a performance advantage.

Properties

expand all

Profile filename without the .xml extension, specified as a string.

Example: f = ProfileFinder("TestProfile")

Data Types: string

Properties of objects to find, specified as a cell array of name-value arguments. The finder returns only objects that have the specified properties with the specified values.

Example: f.Properties = {'Gain','5'}

Data Types: char

Methods

expand all

Examples

collapse all

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

profileFinder = ProfileFinder("UAVComponent");

chapter = Chapter("Title","Profiles");
while hasNext(profileFinder)
    profile = next(profileFinder);
    sect = Section("Title",profile.Name);
    add(sect,profile);
    add(chapter,sect);
end

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

Version History

Introduced in R2022b