Package: slreportgen.report
Stateflow object properties reporter
The StateflowObjectProperties
reporter generates tables that list the
properties and property values of Stateflow® objects.
Note
To use a Stateflow object properties reporter in a report, you must create the
report using the slreportgen.report.Report
class.
creates
an empty Stateflow object properties reporter. Use the properties of this reporter to specify
reporting on these Stateflow objects:reporter
= StateflowObjectProperties()
Object whose properties to report
Properties to report
Format of the reported properties
creates a reporter that generates a table listing the property values of the specified
Stateflow object. The properties included by default depend on the object type. For
example, a chart table includes the state and data of the chart. To specify a custom
list of properties to be included in the generated property table, use the
reporter
= StateflowObjectProperties(obj
)Properties
property. Use the PropertyTable
property to customize the format of the generated property table.
Note
This reporter compiles the model containing the object to be reported if the model is not already compiled. Compiling the model is necessary to propagate values to properties that are unspecified when the model has not been compiled. The model is in an uncompiled state when you close the report that contains the generated property table.
sets properties using name-value pairs. You can specify multiple name-value pair
arguments in any order. Enclose each property name in single quotes.reporter
= StateflowObjectProperties(Name,Value
)
createTemplate | Create Stateflow object properties reporter template |
customizeReporter | Create custom Stateflow object properties class |
getClassFolder | Stateflow object properties class definition file location |
Add a table that reports the properties of the shift_model
chart in slrgex_sf_car
model.
import slreportgen.report.* import mlreportgen.report.* import slreportgen.utils.* model_name = 'slrgex_sf_car'; load_system(model_name); rpt = slreportgen.report.Report('output','pdf'); chapter = Chapter(model_name); chart = block2chart('slrgex_sf_car/shift_logic'); rptr = StateflowObjectProperties(chart); add(chapter, rptr); add(rpt, chapter); close(rpt); close_system(model_name); rptview(rpt);