slreportgen.report.CCaller Class
Namespace: slreportgen.report
Superclasses: slreportgen.report.Reporter
Description
Use objects of the slreportgen.report.CCaller class to report on C Caller
blocks in your Simulink® model.
By default, a CCaller reporter object reports:
The name of the C function called by the C Caller block
The Description parameter and any custom mask parameters
The port properties associated with the C Caller block
The C code that the C Caller block invokes
Use the CCaller reporter properties to exclude or modify the
reported information.
Note
To use a CCaller reporter in your report, you must create the
report using the slreportgen.report.Report class.
The slreportgen.report.CCaller class is a handle class.
Creation
Description
creates an empty C Caller block reporter with default property values. Use the object
properties to specify report options.cCallerReporter = slreportgen.report.CCaller
Note
Adding an empty CCaller object to a report causes an
error.
creates a reporter for the given C Caller block object and sets the Object
property to cCallerReporter = slreportgen.report.CCaller(Object)Object.
Include this reporter in your report to add information about the C Caller block name, available functions, and port specifications. Update the properties of the object to change the display options for the reporter.
sets properties by using name-value arguments. Specify multiple name-value arguments in
any order.cCallerReporter = slreportgen.report.CCaller(Name=Value)
Properties
C Caller block to report, specified as a character vector or string scalar that
contains the name of a C Caller block, a C Caller block handle, or a
slreportgen.report.BlockResult object.
Attributes:
GetAccess | public |
SetAccess | public |
Include a table of block properties in the report, specified as a logical 1
(true) or 0 (false). When you
specify:
1(true) — Include a table of block properties in the report.0(false) — Omit a table of block properties from the report.
This table displays all block dialog parameters except the function name, available functions, and port specifications. If all other dialog parameters are empty, the table is not displayed.
To format this table and the included properties, edit the ObjectPropertiesReporter property.
Attributes:
GetAccess | public |
SetAccess | public |
Data Types: logical
Include a list of other available functions in the report, specified as a logical 1
(true) or 0 (false). When you
specify:
1(true) — Include a list of other available functions in the report.0(false) — Omit a list of other available functions from the report.
This list displays the functions that the C Caller block can call.
Attributes:
GetAccess | public |
SetAccess | public |
Data Types: logical
Whether to include the C code of the C Caller block in the report, specified as a logical 1
(true) or 0 (false). When you
specify:
1(true) — Include the C code of the C Caller block in the report.0(false) — Omit the C code of the C Caller block from the report.
Attributes:
GetAccess | public |
SetAccess | public |
Data Types: logical
Properties for the block properties table, specified as an slreportgen.report.SimulinkObjectProperties object. The default value for
this is an empty slreportgen.report.SimulinkObjectProperties object.
Specify the properties to display in the Properties property of the
SimulinkObjectProperties object. If Properties
is empty, the reporter automatically determines which properties to display.
Attributes:
GetAccess | public |
SetAccess | public |
Format the port properties of the C Caller block to report, specified as an mlreportgen.report.BaseTable object. The default value for this property is
an empty mlreportgen.report.BaseTable object with the
StyleName property set to
"CCallerPortSpecificationTable". Customize the appearance of the
table by modifying the properties of the default BaseTable
object.
Attributes:
GetAccess | public |
SetAccess | public |
Paragraph format for the function name title, specified as an mlreportgen.dom.Paragraph object. The default value is an empty mlreportgen.dom.Paragraph object with StyleName set to
"CCallerFunctionNameTitle".
Customize the appearance of the title by modifying the properties of the default
object or by replacing it with another Paragraph object.
Attributes:
GetAccess | public |
SetAccess | public |
Paragraph format for the function name, specified as an mlreportgen.dom.Paragraph object. The default value is an empty mlreportgen.dom.Paragraph object with StyleName set to
"CCallerFunctionName".
Customize the appearance of the function name by modifying the properties of the
default object or by replacing it with another Paragraph
object.
Attributes:
GetAccess | public |
SetAccess | public |
Paragraph format for the title of the available functions list, specified as an
mlreportgen.dom.Paragraph object. The
default value is an empty mlreportgen.dom.Paragraph object with
StyleName set to
"CCallerAvailableFunctionsTitle".
Customize the appearance of the title by modifying the properties of the default
object or by replacing it with another Paragraph object.
Attributes:
GetAccess | public |
SetAccess | public |
List of available functions, specified as an mlreportgen.dom.UnorderedList or mlreportgen.dom.OrderedList object.
The default value is a mlreportgen.dom.UnorderedList object.
Customize the appearance of the list by modifying the properties of the default object
or by replacing it with another object that does not contain any children.
Attributes:
GetAccess | public |
SetAccess | public |
Paragraph format for the title of the C code for the C Caller block, specified as an
mlreportgen.dom.Paragraph object. The
default value is an empty mlreportgen.dom.Paragraph object with the
property StyleName set to "CCallerCodeTitle".
Customize the appearance of the title by modifying the properties of the default
object or by replacing it with another Paragraph object. Any content
added to the Paragraph object in this property appears before the
code title in the report.
Attributes:
GetAccess | public |
SetAccess | public |
Format the C code included in your reporter, specified as an mlreportgen.dom.Preformatted object.
The default value for this property is an empty
mlreportgen.dom.Preformatted object with StyleName
property set to "CCallerCode". Customize the appearance of the code
by modifying the properties of the default object.
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.CCaller.createTemplate |
Create reporter template
Input Arguments
Return Values
For more information, see the method
for the |
slreportgen.report.CCaller.customizeReporter |
Create reporter from
Input Arguments
Return Values
For more information, see the method
for the |
slreportgen.report.CCaller.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 shows how to add information about C Caller blocks in your Simulink® model to a report.
Create a PDF report and load the required model.
import mlreportgen.report.* import slreportgen.report.* import slreportgen.finder.* rpt = slreportgen.report.Report("CCallerReport","pdf"); rpt.CompileModelBeforeReporting = false; model_name = 'ExampleModelSLR'; load_system(model_name); % Create a chapter for the C Caller block information add(rpt,TitlePage(... Title=sprintf('C Caller Blocks in %s', model_name),Author="")); add(rpt, TableOfContents);
Create a SystemDiagramFinder object to return the diagrams for each C Caller block in the model.
diagFinder = SystemDiagramFinder(model_name);
Iterate through the results of the finder object and find the associated C Caller blocks.
while hasNext(diagFinder) diagram = next(diagFinder); chapter = Chapter(... Title=mlreportgen.utils.normalizeString(diagram.Name)); add(chapter, diagram); finder = BlockFinder(diagram.Object); finder.BlockTypes = "CCaller"; results = find(finder); for result = results rptr = CCaller(result); rptr.IncludeAvailableFunctions = true; add(chapter,rptr); end add(rpt, chapter); end close(rpt); close_system(model_name); rptview(rpt);
Version History
Introduced in R2022a
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)