slreportgen.report.SystemIO Class
Namespace: slreportgen.report
Superclasses: slreportgen.report.Reporter
Simulink system input and output signal reporter
Description
Create a reporter that reports on signals entering or leaving a Simulink® model or subsystem.
Note
To use a SystemIO reporter in a report, you must create the report using
the slreportgen.report.Report class.
The slreportgen.report.SystemIO class is a handle class.
Creation
Description
slreportgen.report.SystemIO creates an empty
slreportgen.report.SystemIO reporter object. Use the
Object property to specify the model or subsystem to be reported.
By default, the reporter generates summary tables for the system inputs and outputs. The
input summary table lists the sources of the input signals. The output summary table lists
the destinations of the output signals. The reporter also generates a signal details
section that lists the properties of the input and output ports. Use the reporter
properties to customize the content and appearance of the generated report. For example,
use the DetailsReporter property to customize the content and
appearance of the signal details section.
slreportgen.report.SystemIO(
creates a reporter for the model or subsystem specified by object)object.
See the Object
property.
slreportgen.report.SystemIO(
sets the reporter properties using name-value arguments. You can specify multiple name-value arguments in any order.PropertyName=Value)
Properties
Simulink model or subsystem to be reported, specified as a character vector or
string scalar that contains the path to the model or subsystem, as a handle to the model
or subsystem, as an slreportgen.finder.DiagramResult object, or as an slreportgen.finder.BlockResult object.
Attributes:
GetAccess | public |
SetAccess | public |
List of properties to report for each input, specified as a string array or a cell
array of character vectors. By default, the list includes Port,
Inport Block, Source, Name,
and DataType. The value reported for Inport Block
is the name of the Inport block that corresponds to the input signal in
the system. Valid signal properties are:
"Port""Source""Name""Description""DataType""Complexity""Dimensions""Min""Max""SampleTime""Units"
You also can specify these block properties of the corresponding Inport block:
"Inport Block""Inport Block Description"
Attributes:
GetAccess | public |
SetAccess | public |
Data Types: char | string
List of properties to report for each output, specified as a string array or a cell
array of character vectors. By default, the list includes Port,
Outport Block, Destination,
Name, and DataType. The value reported for
Outport Block is the name of the Outport block that
corresponds to the output signal in the system. Valid signal properties are:
"Port""Destination""Name""Description""DataType""Complexity""Dimensions""Min""Max""SampleTime""Units"
You also can specify these block properties of the corresponding Outport block:
"Outport Block""Outport Block Description"
Attributes:
GetAccess | public |
SetAccess | public |
Data Types: char | string
Whether to show a table that summarizes the inputs to the subsystem or model,
specified as a logical 1
(true) or 0 (false). When you
specify:
1(true) — Include input summary table in the report0(false) — Omit input summary table in the report
The InputSummaryProperties property determines
which input properties the table includes.
Attributes:
GetAccess | public |
SetAccess | public |
Data Types: logical
Whether to show a table that summarizes the outputs from the subsystem or model,
specified as a logical 1
(true) or 0 (false). When you
specify:
1(true) — Include output summary table in the report0(false) — Omit input summary table in the report
The OutputSummaryProperties property determines
which output properties the table includes.
Attributes:
GetAccess | public |
SetAccess | public |
Data Types: logical
Whether to show details for each input or output, specified as a logical 1
(true) or 0 (false). When you
specify:
1(true) — The reporter insertsslreportgen.report.SimulinkObjectPropertiesreporters after the input and output summary tables. IfObjectis a model, details about the input or output blocks are included. IfObjectis a subsystem, details about the input or output ports are included. The port numbers in the summary tables link to the correspondingSimulinkObjectPropertiesreporter for that port.0(false) — Omit details about the input and output blocks in the report.
Attributes:
GetAccess | public |
SetAccess | public |
Data Types: logical
Whether to include empty columns in summary tables, specified as a logical 1
(true) or 0 (false). When you
specify:
1(true) — Include empty columns in summary tables0(false) — Omit empty columns in summary tables
If ShowEmptyColumns is true, the
summary tables include columns that do not have data.
Attributes:
GetAccess | public |
SetAccess | public |
Data Types: logical
Table formatter for input summary tables, specified as an mlreportgen.report.BaseTable reporter. The default value is a
BaseTable reporter. To customize the appearance of the table, modify
the properties of the default table reporter or replace it with a customized table
reporter. If you add content to the Title property of the default
or customized table reporter, the content appears in front of the table title in the
generated report.
Note
To customize the input summary table title, customize the
SystemIOHierNumberedTitle and
SystemIONumberedTitle templates in the
docpart_templates folder in the main template of the
SystemIO reporter.
Attributes:
GetAccess | public |
SetAccess | public |
Table formatter for output summary tables, specified as an mlreportgen.report.BaseTable reporter. The default value is a
BaseTable reporter. To customize the appearance of the table, modify
the properties of the default table reporter or replace it with a customized table
reporter. If you add content to the Title property of the default
or customized table reporter, the content appears in front of the table title in the
generated report.
Note
To customize the output summary table title, customize the
SystemIOHierNumberedTitle and
SystemIONumberedTitle templates in the
docpart_templates folder in the main template of the
SystemIO reporter.
Attributes:
GetAccess | public |
SetAccess | public |
Formatter for detail tables, specified as an slreportgen.report.SimulinkObjectProperties reporter. The default value is an
SimulinkObjectProperties reporter. To customize the appearance of the
detail tables, modify the properties of the default
SimulinkObjectProperties reporter or replace it with a customized
SimulinkObjectProperties reporter.
Attributes:
GetAccess | public |
SetAccess | public |
List formatter for the source and destination lists, specified as an
mlreportgen.dom.UnorderedList or
mlreportgen.dom.OrderedList object. The source list is the list of
blocks to which an input signal is connected. The destination list is the list of blocks
to which an output signal is connected. The default formatter is an
UnorderedList object. To customize the appearance of the list, modify
the properties of the default list formatter or replace it with a customized list object
that does not contain any children.
Attributes:
GetAccess | public |
SetAccess | public |
Source of the template for this reporter, specified in one of these ways:
Character vector or string scalar that specifies the path of the file that contains the template for this reporter
Reporter or report whose template this reporter uses or whose template library contains the template for this reporter
Document Object Model (DOM) document or document part whose template this reporter uses or whose template library contains the template for this reporter
The specified template must be the same type as the report to which you
append this reporter. For example, for a Microsoft® Word report, TemplateSrc must be a Word reporter template.
If the TemplateSrc property is empty, this reporter uses the
default reporter template for the output type of the report.
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Dependent | true |
Name of the template for this reporter, specified as a character vector or string scalar.
The template for this reporter must be in the template library of the template specified by
the TemplateSrc property of this reporter.
Attributes:
GetAccess | public |
SetAccess | public |
Data Types: char | string
Hyperlink target for this reporter, specified as a character vector or string scalar
that specifies the link target ID, or an mlreportgen.dom.LinkTarget object. A character vector or string scalar
value converts to a LinkTarget object. The link target immediately
precedes the content of this reporter in the output report.
Attributes:
GetAccess | public |
SetAccess | public |
Methods
| Method | Purpose |
|---|---|
slreportgen.report.SystemIO.createTemplate |
Create reporter template
Input Arguments
Return Values
For more information, see the method
for the |
slreportgen.report.SystemIO.customizeReporter |
Create reporter from
Input Arguments
Return Values
For more information, see the method
for the |
slreportgen.report.SystemIO.getClassFolder |
Get location of folder that contains
Return Values
For more information, see the method
for the |
copy |
Create copy of reporter object and make deep copies of property values
Input Arguments
Return Values
For more information, see the method
for the |
getImpl |
Get implementation of reporter
Note You cannot add content to the reporter after calling this method. Input Arguments
Return Values
For more information, see the method
for the |
Examples
This example uses an slreportgen.report.SystemIO reporter to report on the inputs and outputs of a model and its subsystems.
model_name = "f14";
load_system(model_name);Create a Simulink report.
rpt = slreportgen.report.Report("SystemIO_example","docx");
Create finder to find all diagrams in model.
finder = slreportgen.finder.DiagramFinder(model_name);
Report inputs and outputs of each diagram. Create SystemIO reporter and add to report.
ch = mlreportgen.report.Chapter("Diagrams"); while hasNext(finder) result = next(finder); if strcmpi(result.Type,"Simulink.SubSystem") ... || strcmpi(result.Type,"Simulink.BlockDiagram") sect = mlreportgen.report.Section(result.Name); add(sect,result); ioRptr = slreportgen.report.SystemIO(result); add(sect,ioRptr); add(ch,sect); end end
Add chapter to report and close report.
add(rpt,ch); close(rpt); rptview(rpt);
Tips
The input and output signal properties reported by the
SystemIOreporter correspond to Simulink properties, which you can query by usingget_param. For example, theDataTypeandDimensionsproperties correspond to the SimulinkCompiledPortDataTypeandCompiledPortDimensionsproperties of the port handles.For bus signals, Simulink determines the values of the
CompiledPortDataTypeandCompiledPortDimensionsproperties based on whether the signal is a nonvirtual or virtual bus.
Version History
Introduced in R2020aStarting in R2021b, the default value of the InputSummaryProperties
property is ["Port" "Inport Block" "Source" "Name" "DataType"] and the
default value of the OutputSummaryProperties property is
["Port" "Outport Block" "Destination" "Name" "DataType"]. Before
R2021b, the default value of the InputSummaryProperties was
["Source" "Name" "DataType"] and the default value of the
OutputSummaryProperties was ["Destination" "Name"
"DataType"].
Before R2021b, a SystemIO object always reported the
Inport or Outport block for a model signal and the port
number for a subsystem signal, regardless of the values of the
InputSummaryProperties or
OutputSummaryProperties properties. Starting in R2021b, to report
the Inport or Outport block for either a model or subsystem
signal, you must include Inport Block or Outport Block
in the property list in the InputSummaryProperties or
OutputSummaryProperties property. To report the port number, you must
include Port in the property list.
Starting in R2021b, you can specify Inport Block instead of
Inport Block Name in the InputSummaryProperties
property and you can specify Outport Block instead of Outport
Block Name in the OutputSummaryProperties property.
Inport Block Name and Outport Block Name are still
valid.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
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)