Main Content

systemcomposer.rptgen.finder.InterfaceResult Class

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

Search result for interfaces

Since R2022b

Description

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

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

Creation

result = InterfaceResult creates a search result object for an interface that you find by using a systemcomposer.rptgen.finder.InterfaceFinder object.

Note

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

Data Types: string

Elements of interface, returned as a structure.

These fields for data elements are returned as strings:

  • Name

  • Type

  • Description

  • Complexity

  • Dimensions

  • Maximum

  • Minimum

These fields for value types are returned as strings:

  • Name

  • DataType

  • Description

  • Complexity

  • Dimensions

  • Maximum

  • Minimum

These fields for service interfaces are returned as strings:

  • Name

  • FunctionPrototype

  • FunctionArgument, returned as a structure with fields that are returned as strings:

    • Name

    • Type

    • Dimensions

    • Description

Data Types: struct

Ports information, returned as a structure with fields:

  • InterfaceName

  • PortName

  • FullPortName

  • Direction

Data Types: struct

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 InterfaceFinder and InterfaceResult 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="InterfaceResultReport",...
CompileModelBeforeReporting=false);
add(rpt,TitlePage("Title",sprintf('Interfaces in %s Model',model_name)));
add(rpt,TableOfContents);
chapter = Chapter("Title","Interfaces");

intfFinder = InterfaceFinder(model_name);
result = find(intfFinder);
for i=1:length(result)
    reporter = getReporter(result(i));
    add(chapter,reporter);
end

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

Version History

Introduced in R2022b