Main Content

systemcomposer.rptgen.finder.AllocationListFinder Class

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

Find allocations

Since R2022b

Description

The systemcomposer.rptgen.finder.AllocationListFinder class searches for all the components to and from which a particular component has been allocated in a System Composer™ architecture model.

Creation

finder = AllocationListFinder(Container) creates a finder that finds all allocations to and from the component defined by the ComponentName property.

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

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

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

Data Types: string

Component to and from which to find allocations, specified as a string of the full path.

Example: f.ComponentName = "mTestModel/Component1"

Attributes:

GetAccess
public
SetAccess
public

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 AllocationListFinder and AllocationListResult classes to generate a report.

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

rpt = slreportgen.report.Report(output="AllocationListFinderReport",...
CompileModelBeforeReporting=false);
add(rpt,TitlePage("Title","Allocations"));
add(rpt,TableOfContents);

allocationListFinder = AllocationListFinder("AllocationSet.mldatx");
allocationListFinder.ComponentName = "mTestModel/Component1";
chapter = Chapter("Title","Allocations");
while hasNext(allocationListFinder)
    allocations = next(allocationListFinder);
    sect = Section("Title",allocationListFinder.ComponentName);
    add(sect,allocations);
    add(chapter,sect);
end

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

Version History

Introduced in R2022b