cvdata Properties

Store Simulink Coverage data for use in other coverage functions

cvdata objects store model coverage data. A cvdata object is generated automatically when you simulate a model that has coverage enabled. The coverage data can be accessed by other coverage functions. The cvdata object becomes invalid if its parent model is closed or modified.

Properties

expand all

This property is read-only.

Coverage data origin release, returned as a character array.

Data Types: char

This property is read-only.

Internal coverage data ID, returned as a scalar.

Data Types: double

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

This property is read-only.

Test data, returned as a cvtest object. This property describes the coverage configuration.

Data Types: cvtest

This property is read-only.

Internal root ID, returned as a scalar.

Data Types: double

This property is read-only.

Coverage data checksum, returned as a struct. 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

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

modelVersion

Version of the model analyzed for coverage.

character array containing version number

creator

Original creator of the model.

System name or organization name

lastModifiedDate

Date and time the model was last modified.

character array containing date and time

defaultParameterBehavior

Indicates the default parameter behavior setting.

'Tunable' | 'Inlined'

blockReductionStatus

Indicates whether Block Reduction is enabled.

See Block Reduction for more information.

'off' | 'on'

conditionallyExecuteInputs

Conditional input execution switch. A value of 1 is 'on', and a value of 0 is 'off'.

1 | 0

mdcdMode

Definition used for modified condition decision coverage (MCDC) analysis. A value of 1 indicates the model used the masking definition of MCDC and a value of 0 indicates the model used the unique-cause definition of MCDC.

For more information, see Modified Condition and Decision Coverage (MCDC) Definitions in Simulink Coverage.

1 | 0

analyzedModel

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.

character array

reducedBlocks

List of blocks reduced by the block reduction parameter, if it is enabled and any blocks are reduced.

character array

ownerModel

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

ownerBlock

If the model includes a subsystem harness, this is the subsystem that the harness is testing.

character array

harnessModel

Harness model name. If you have data aggregated from multiple test runs, where each run used a different harness with the same ownerModel, this field shows Not Unique.

character array

logicBlkShortcircuit

Indicates whether the short-circuiting option is enabled.

0 | 1

Data Types: struct

System time at simulation start, returned as a character array.

Data Types: char

System time at simulation stop, returned as a character array.

Data Types: char

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

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

Coverage metric data, returned as a struct.

This parameter is for internal use only. Access the coverage data for specific coverage metrics by using one of the Simulink® Coverage™ information functions. See Retrieve Coverage Details from Results for more information. You can also access the coverage data by using cvhtml.

Data Types: struct

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

Simulation mode, returned as a character array. For more information, see Simulation mode.

Data Types: char

Introduced before R2006a