Main Content

systemcomposer.rptgen.finder.ConnectorResult Class

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

Search result for connectors

Since R2022b

Description

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

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

Creation

result = ConnectorResult creates a search result object for a connector that you find by using a systemcomposer.rptgen.finder.ConnectorFinder object.

Note

The find method of the systemcomposer.rptgen.finder.ConnectorFinder class creates a search result object for each connector 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 connector, returned as a string.

Data Types: string

Parent component of connector, returned as a string.

Data Types: string

Source port of connector, returned as a string.

Data Types: string

Destination port of connector, returned as a string.

Data Types: string

Stereotypes on connector, returned as an array of strings.

Data Types: string

Tag to associate with result, specified as a string. You can use this property 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 ConnectorFinder and ConnectorResult 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="ConnectorResultReport",...
CompileModelBeforeReporting=false);
add(rpt,TitlePage("Title",sprintf('Connectors in %s Model',model_name)));
add(rpt,TableOfContents);

connectorFinder = ConnectorFinder(model_name);
connectorFinder.Filter = "Component";
connectorFinder.ComponentName = "scExampleSmallUAVModel/Flight Support Components";
chapter = Chapter("Title","Connectors");
result = find(connectorFinder);
add(rpt,chapter);

for r = result
    reporter = getReporter(r);
    append(rpt,reporter);
end

close(rpt);
rptview(rpt)

Version History

Introduced in R2022b