cvdata
Access Simulink Coverage data in the MATLAB workspace
Description
cvdata
objects store model coverage data.
Creation
A cvdata
object is generated automatically when you simulate a model that
has coverage enabled. You can access the coverage data by using coverage functions. The
cvdata
object becomes invalid if you close or modify its parent
model.
Properties
dbVersion
— Coverage data origin release
character array
This property is read-only.
Coverage data origin release, returned as a character array.
Data Types: char
id
— Internal coverage data ID
scalar
This property is read-only.
Internal coverage data ID, returned as a scalar.
Data Types: double
type
— Internal coverage data type
TEST_DATA
| DERIVED_DATA
This property is read-only.
Internal coverage type, returned as either TEST_DATA
for a single
coverage simulation, or DERIVED_DATA
for aggregated or cumulative
coverage data.
Data Types: char
test
— Test data
cvtest
object
This property is read-only.
Test data, returned as a cvtest
object. This property describes the
coverage configuration.
Data Types: cvtest
rootID
— Internal root ID
scalar
This property is read-only.
Internal root ID, returned as a scalar.
Data Types: double
checksum
— Coverage data checksum
struct
This property is read-only.
Coverage data checksum, returned as a structure. The checksum is based on the
structure of the model being analyzed. It can be used to determine if two
cvdata
objects would be compatible for data aggregation.
Data Types: struct
modelinfo
— Model information
struct
This property is read-only.
Model information, returned as a struct. This property contains metadata about the model analyzed for coverage.
cvdata.modelinfo
has the following fields:
Field | Description | Values |
---|---|---|
| Version of the model analyzed for coverage. |
|
| Original creator of the model. | System name or organization name |
| Date and time the model was last modified. |
|
| Indicates the default parameter behavior setting. |
|
| Indicates whether Block Reduction is enabled. See Block Reduction for more information. |
|
| Conditional input execution switch. A value of |
|
| Definition used for modified condition decision coverage (MCDC)
analysis. A value of For more information, see Modified Condition and Decision Coverage (MCDC) Definitions in Simulink Coverage. |
|
| Name of the analyzed model or model object. If analysis is scoped to a subsystem, Stateflow® Chart, or other model object, this is the path to that model object. |
|
| List of blocks reduced by the block reduction parameter, if it is enabled and any blocks are reduced. |
|
| Model that is or contains the component under test. If you have a block diagram harness, this is the model that the harness tests. If you have a subsystem harness, this is the model that contains that subsystem. | character array |
| If the model includes a subsystem harness, this is the subsystem that the harness is testing. |
|
| Harness model name. If you have data aggregated from multiple test
runs, where each run used a different harness with the same
| character array |
| Indicates whether the short-circuiting option is enabled. |
|
Data Types: struct
startTime
— System time at simulation start
character array
System time at simulation start, returned as a character array.
Data Types: char
stopTime
— System time at simulation stop
scalar
System time at simulation stop, returned as a character array.
Data Types: char
intervalStartTime
— Coverage interval start time
scalar
Coverage interval start time, returned as a scalar. This value comes from the
CovStartTime
parameter. For more information, see Coverage interval start time.
Data Types: double
intervalStopTime
— Coverage interval start time
scalar
Coverage interval stop time, returned as a scalar. This value comes from the
CovStopTime
parameter. For more information, see Coverage interval stop time.
Data Types: double
filter
— Coverage filter file name
character array
| cell array
Coverage filter file name, returned as a character array or a cell array of character arrays. This property contains the coverage filter file name. If there is no coverage filter, this field is empty. You can apply a coverage filter after simulation by assigning the name of a valid filter file to this property.
Data Types: char
| cell
simMode
— Simulation mode
character array
Simulation mode, returned as a character array. For more information, see Simulation mode.
Data Types: char
excludeInactiveVariants
— Whether to exclude inactive variants in coverage report
0
(default) | 1
Whether to exclude inactive variants in coverage report, specified as
0
or 1
. Set this property to
0
to report inactive variants in the coverage report, and set this
property to 1
to exclude inactive variants from the coverage
report.
This property affects only Simulink® variants with startup activation time and inactive variant configurations in Stateflow charts.
If you aggregate two or more cvdata
objects with different values
of excludeInactiveVariants
, the resulting aggregated
cvdata
object has an excludeInactiveVariants
property value of 0
.
Example: covData.excludeInactiveVariants = 1;
Data Types: double
Version History
See Also
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)