Main Content

slreportgen.finder.EnumerationTypeResult Class

Namespace: slreportgen.finder
Superclasses: mlreportgen.finder.Result

Search results for enumeration types found within Simulink model or subsystem

Since R2023b

Description

An object of the slreportgen.finder.EnumerationTypeResult class represents a result of a search for enumeration types used by the specified Simulink® model or subsystem. You can append an EnumerationTypeResult object directly to a report. Alternatively, you can use the getReporter method to access the slreportgen.report.EnumerationType reporter for the result and then customize the reporter and append it to the report.

The slreportgen.finder.EnumerationTypeResult class is a handle class.

Class Attributes

HandleCompatible
true

For information on class attributes, see Class Attributes.

Creation

You do not create an slreportgen.finder.EnumerationTypeResult object explicitly. The slreportgen.finder.EnumerationTypeFinder find or next methods create an slreportgen.finder.EnumerationTypeResult object for each enumeration type that the methods find.

Properties

expand all

Simulink.VariableUsage object handle, returned as a Simulink.VariableUsage object.

Attributes:

SetAccess
protected
Abstract
true

Name of the found enumeration type, specified as a string scalar.

Attributes:

SetAccess
protected

Data Types: string

Name of workspace or data dictionary that defines the enumeration type returned as a cell array of string scalars.

Attributes:

SetAccess
protected

Data Types: cell

The name of the workspace or data dictionary that defines the enumeration type, specified as a string scalar.

Source TypeValueDescription
MATLAB® file"BasicColors.m"The enumerated type is defined in the MATLAB file BasicColors.m.
Dynamic class"Simulink.defineIntEnumType"The enumerated type is defined dynamically and has no source. An enumerated type is defined dynamically when you define it using the function Simulink.defineIntEnumType. With this function, you can specify enumerated types you define externally to MATLAB that you want to import for use within the Simulink environment.
Data dictionary"sldemo_fuelsys_dd_controller.sldd"The enumerated type is defined in the data dictionary named sldemo_fuelsys_dd_controller.sldd.

Attributes:

SetAccess
protected

Data Types: string

Type of source that defines the enumeration type, specified as one of the following string scalars:

  • "all"

  • "MATLAB file"

  • "dynamic class"

  • "data dictionary"

Attributes:

SetAccess
protected

Data Types: string

Additional user-defined information to add to the result, specified as any value.

Attributes:

NonCopyable
true

Methods

expand all

Examples

collapse all

This example shows you how to add enumeration types in a model to a report.

Create a Simulink Report.

rpt = slreportgen.report.Report("MyReport","pdf");

Create a chapter.

chapter = mlreportgen.report.Chapter();
chapter.Title = "EnumerationType Example";

Load the model.

model_name = "slrgex_datatypedemo";
load_system(model_name);

Create an enumeration type finder and set its properties to constrain the search.

finder = slreportgen.finder.EnumerationTypeFinder(model_name);
finder.SourceType = "MATLAB file";

Find enumeration types used by the model.

results = find(finder);

Add the results to the chapter.

append(chapter,results);

Add chapter to the report.

append(rpt,chapter);

Close and view the report.

close(rpt);
rptview(rpt);

Version History

Introduced in R2023b