slreportgen.report.CCaller class
Package: slreportgen.report
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
Object
— C Caller block to report
C Caller block handle | string scalar | character vector | slreportgen.report.BlockResult
object
C Caller block to report, specified as a string scalar or character vector 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 |
IncludeObjectProperties
— Include block property table
true
(default) | false
Include a table of block properties in the report, specified as
true
or false
. 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 |
IncludeAvailableFunctions
— Include block functions table
false
(default) | true
Include a list of other available functions in the report, specified as
true
or false
. This list displays the functions
that the C Caller block can call.
Attributes:
GetAccess | public |
SetAccess | public |
IncludeCode
— Include C Caller block code
true
(default) | false
Include the C code of the C Caller block in the report, specified as
true
or false
.
Attributes:
GetAccess | public |
SetAccess | public |
ObjectPropertiesReporter
— Properties for block properties table
slreportgen.report.SimulinkObjectProperties
object
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 |
PortSpecificationsReporter
— Format for port properties
mlreportgen.report.BaseTable
object
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 |
FunctionNameTitleReporter
— Paragraph format for function name title
mlreportgen.dom.Paragraph
object
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 |
FunctionNameReporter
— Paragraph format for function name
mlreportgen.dom.Paragraph
object
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 |
AvailableFunctionsTitleFormatter
— Paragraph format for available functions titles
mlreportgen.dom.Paragraph
object
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 |
AvailableFunctionsListFormatter
— Format for list of available functions
mlreportgen.dom.UnorderedList
object (default) | mlreportgen.dom.OrderedList
object
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 |
CodeTitleFormatter
— Paragraph format for code section title
mlreportgen.dom.Paragraph
object
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 |
CodeFormatter
— Format for included C code
mlreportgen.dom.Preformatted
object
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 |
TemplateSrc
— Source of template for this reporter
[]
(default) | character vector | string scalar | reporter or report | DOM document or document part
Source of the template for this reporter, specified as one of these options:
Character vector or string scalar that specifies the path of the file that contains the template for this reporter
Reporter or report whose template is used for this reporter or whose template library contains the template for this reporter
DOM document or document part whose template is used for this reporter or whose template library contains the template for this reporter
The specified template must be the same type as the report to which this
reporter is appended. 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.
TemplateName
— Name of template for this reporter
character vector | string scalar
Name of 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 source
(TemplateSrc
) for this reporter.
LinkTarget
— Hyperlink target for this reporter
[]
(default) | character vector | string scalar | mlreportgen.dom.LinkTarget
object
Hyperlink target for this reporter, specified as a character vector or string scalar
that specifies the link target ID or as an mlreportgen.dom.LinkTarget
object. A character vector or string scalar
value is converted to a LinkTarget
object. The link target immediately
precedes the content of this reporter in the output report.
Methods
Public Methods
slreportgen.report.CCaller.createTemplate | Create C Caller block reporter template |
slreportgen.report.CCaller.getClassFolder | Get location of folder containing slreportgen.report.CCaller
class definition file |
slreportgen.report.CCaller.customizeReporter | Create class derived from C Caller block reporter class |
getImpl | Get implementation of reporter |
copy | Create copy of a Simulink reporter object and make deep copies of certain property values |
Examples
Add C Caller Block Reporter to Report
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 = 'ExampleModel'; 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=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
Open Example
You have a modified version of this example. Do you want to open this example with your edits?
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)