Main Content

systemcomposer.rptgen.finder.AllocationSetFinder class

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

Find allocation sets

Description

The systemcomposer.rptgen.finder.AllocationSetFinder class searches for information about a given allocation set in a System Composer™ architecture model.

Creation

finder = AllocationSetFinder(Container) creates a finder that finds information about an allocation set.

Note

This finder provides two ways to get search results:

  1. 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.

  2. 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

Allocation set file with the .mldatx extension, specified as a string.

Example: f = AllocationSetFinder("AllocationSet.mldatx")

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 AllocationSetFinder and AllocationSetResult classes to generate a report.

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

rpt = slreportgen.report.Report(output="AllocationSetFinderReport",...
CompileModelBeforeReporting=false);
add(rpt,TitlePage("Title","Allocation Sets"));
add(rpt,TableOfContents);

allocationSetFinder = AllocationSetFinder("AllocationSet.mldatx");
chapter = Chapter("Title","Allocation Set");

while hasNext(allocationSetFinder)
    allocationSets = next(allocationSetFinder);
    sect = Section(strcat("Allocations in ",allocationSets.Name));
    add(sect,allocationSets);
    add(chapter,sect);
end

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

Version History

Introduced in R2022b