slreportgen.finder.SignalResult class
Package: slreportgen.finder
Superclasses: mlreportgen.finder.Result
Description
An object of the slreportgen.finder.SignalResult
class represents a result
of a search for the signals used by a model or block. You can append a
SignalResult
object directly to a report. Alternatively, you can use the
getReporter
method to access the slreportgen.report.Signal
reporter for the result and then customize the reporter and append it to the report.
The slreportgen.finder.SignalResult
class is a handle
class.
Creation
You do not create an slreportgen.finder.SignalResult
object explicitly. The
slreportgen.finder.SignalFinder
find
and next
methods create an
slreportgen.finder.SignalResult
object for each signal that is found.
Properties
Public Properties
Tag
— Additional user-defined information
[] (default) | string | character vector | object | ...
Additional user-defined information to add to the result, specified as any value.
Attributes:
NonCopyable | true |
Data Types: any
Protected Properties
Object
— Block output port
handle
Block output port that represents the found signal, specified as a handle. This property is read-only.
Name
— Name of found signal
string scalar
Name of the found signal, specified as a string scalar. This property is read-only.
Source block
— Name of source block of signal
string scalar
Name of the block that is the source of the found signal, specified as a string scalar. This property is read-only.
SourcePortNumber
— Number of output port
double
Number of the output port that represents the found signal, specified as an integer. This property is read-only.
RelatedObject
— Name of model or block that uses this signal
string scalar
Name of model or block that uses this signal, specified as a string scalar. The
value of this property corresponds to the value of the Container
property of the slreportgen.finder.SignalFinder
object used to find this signal. This
property is read-only.
Relationship
— Relationship of signal to container model or block
"Input"
| "Output"
| "Internal"
| "Control"
| "State"
Relationship of the found signal to the container model or block, specified as
"Input"
, "Output"
,
"Internal"
, "Control"
, or
"State"
. The container model or block is specified by the
RelatedObject property.
Methods
Public Methods
getDefaultSummaryProperties | propList =
getDefaultSummaryProperties(signalResult,TypeSpecificProperties) returns
the list of finder result class properties that are included by default in a summary
table. |
getDefaultSummaryTableTitle | tableTitle =
getDefaultSummaryTableTitle(signalResult,TypeSpecificTitle) returns the
default title for a summary table for a finder result object of type
resultObject . |
getDestinationPorts |
|
getVirtualDestinationPorts |
|
getPropertyValues | propVals = getPropertyValues(signalResult,propNames) returns
the values of the properties specified in propNames in a cell
array. Access the properties of the result object or the signal represented by the
finder result object by specifying the required property names in
propNames . |
getReporter |
|
getReporterLinkTargetID | targetID = getReporterLinkTargetID(signalResult) returns the
link target ID of the reporter associated with the finder result object. Use the
link target ID to add a hyperlink to the reporter from any part of the
report. |
Examples
Customize Reporter for Signal Result
Use the getReporter
method of an slreportgen.finder.SignalResult
object to access the signal reporter for the result. Then, customize the reporter by setting its properties.
Import the MATLAB and Simulink Report API packages so that you do not have to use long, fully qualified class names.
import mlreportgen.report.* import slreportgen.report.*
Create a Simulink report.
rpt = slreportgen.report.Report("MySignalReport","pdf");
Create a chapter for the signal information.
chapter = mlreportgen.report.Chapter();
chapter.Title = "Signals";
Load a model.
model_name = "slrgex_vdp";
load_system(model_name);
Create a signal finder.
finder = slreportgen.finder.SignalFinder(model_name);
Find the signals. For each found signal, get the reporter, specify that you want to report empty property values, and add the reporter to the chapter.
while hasNext(finder) result = next(finder); reporter = getReporter(result); reporter.ShowEmptyValues = true; add(chapter,reporter); end
Add the chapter to the report.
add(rpt,chapter);
Close and view the report.
close(rpt); rptview(rpt);
Version History
Introduced in R2021a
Ouvrir l'exemple
Vous possédez une version modifiée de cet exemple. Souhaitez-vous ouvrir cet exemple avec vos modifications ?
Commande MATLAB
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB :
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)