Retrieve execution coverage information from cvdata
object
coverage = executioninfo(cvdo, object)
coverage = executioninfo(cvdo, object, mode)
coverage = executioninfo(cvdo, object, ignore_descendants)
[coverage, description]
= executioninfo(cvdo, object)
returns
execution coverage results from the coverage
= executioninfo(cvdo
, object
)cvdata
object cvdo
for
the model component specified by object
.
returns
execution coverage results from the coverage
= executioninfo(cvdo
, object
, mode
)cvdata
object cvdo
for
the model component specified by object
for the
simulation mode mode
.
returns
execution coverage results for coverage
= executioninfo(cvdo
, object
, ignore_descendants
)object
, depending
on the value of ignore_descendants
.
[
returns
execution coverage results and text descriptions of execution points
associated with coverage
, description
]
= executioninfo(cvdo
, object
)object
.
|
| ||||||||||||||||||||||||||||||||||||
|
The
When specifying an S-function block, valid values for
For coverage data collected during Software-in-the-Loop (SIL)
mode or Processor-in-the-Loop (PIL) simulation mode, valid values
for
| ||||||||||||||||||||||||||||||||||||
|
The
| ||||||||||||||||||||||||||||||||||||
|
Specifies to ignore the coverage of descendant objects if |
|
The value of
| ||||||||||
|
|
Open the slvnvdemo_cv_small_controller
model
and create the test specification object testObj
.
Enable execution coverage for slvnvdemo_cv_small_controller
and
execute testObj
using cvsim
.
Use executioninfo
to retrieve the execution coverage
results for the Saturation block and determine the percentage of execution
outcomes covered:
mdl = 'slvnvdemo_cv_small_controller'; open_system(mdl) testObj = cvtest(mdl) data = cvsim(testObj) blk_handle = get_param([mdl, '/Saturation'], 'Handle'); cov = executioninfo(data, blk_handle) percent_cov = 100 * cov(1) / cov(2)
Use the coverage settings to collect and display execution coverage results:
Open the model.
In the Model Editor, select Model Settings on the Modeling tab.
On the Coverage pane of the Configuration Parameters dialog box, select Enable coverage analysis.
Under Coverage metrics, select Block Execution as the structural coverage level.
Click OK to close the Configuration Parameters dialog box and save your changes.
Simulate the model by clicking the Run button and review the results.
complexityinfo
| conditioninfo
| cvsim
| decisioninfo
| getCoverageInfo
| mcdcinfo
| overflowsaturationinfo
| sigrangeinfo
| sigsizeinfo
| tableinfo