Main Content

systemcomposer.rptgen.finder.ComponentResult class

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

Search result for components

Since R2022b

Description

Search result object for information about a component in a System Composer™ architecture model.

The systemcomposer.rptgen.finder.ComponentResult class is a handle class.

Creation

result = ComponentResult creates a search result object for a component found by a systemcomposer.rptgen.finder.ComponentFinder object.

Note

The find method of the systemcomposer.rptgen.finder.ComponentFinder class creates objects of this type for each component that it finds. You do not need to create this object yourself.

Properties

expand all

Universal unique identifier (UUID) of result element, returned as a string.

Data Types: string

Name of component, returned as a string.

Data Types: string

Parent of component, returned as a string.

Data Types: string

Children of component, returned as an array of systemcomposer.rptgen.finder.ComponentResult objects.

Ports on component, returned as an array of systemcomposer.arch.ComponentPort objects.

Reference model name used by component, returned as a string.

Data Types: string

Kind of AUTOSAR component, returned as a string.

Data Types: string

Tag to associate with result, specified as a string. This property allows you to attach additional information to a result. You can set this property to any value that meets your requirements.

Data Types: string

Methods

expand all

Examples

collapse all

Use the ComponentFinder and ComponentResult classes to generate a report.

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

rpt = slreportgen.report.Report(output="ComponentResultReport",...
CompileModelBeforeReporting=false);
add(rpt,TitlePage("Title","Components"));
add(rpt,TableOfContents);
chapter = Chapter("Title","Components");

componentFinder = ComponentFinder("mTestModel");
componentFinder.Query = AnyComponent;
result = find(componentFinder);

for i = result
    reporter = getReporter(i);
    reporter.IncludeProperties = false;
    reporter.IncludeSnapshot = false;
    add(chapter,reporter);
end

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

Version History

Introduced in R2022b