Main Content

slvnvharnessopts

Generate default options for slvnvmakeharness

Description

harnessopts = slvnvharnessopts generates the default configuration for running slvnvmakeharness.

Output Arguments

collapse all

Default harness options, returned as a structure. The harnessopts structure has the following fields. If you do not specify any values, default values are used.

FieldDescription
harnessFilePath

Specifies the file path for creating the harness model. If an invalid path is specified, slvnvmakeharness does not save the harness model, but it creates and opens the harness model. If you do not specify this option, slvnvmakeharness generates a new harness model and saves it in the MATLAB® current folder.

Default: ''

modelRefHarness

Generates the test harness model that includes model in a Model block. When false, the test harness model includes a copy of model.

Default: true

usedSignalsOnly

When true, the Signal Builder block in the harness model has signals only for input signals in the model. You must have the Simulink® Design Verifier™ software and model must be compatible with that software to detect the input signals.

Default: false

Examples

Create a Coverage Harness with Default Options

This example shows how to set harness options for a coverage harness.

Move the current MATLAB® directory to the location that contains the example files.

openExample('slcoverage/CreateACoverageHarnessWithDefaultOptionsExample');

Open the model using open_system.

open_system('slvnvdemo_counter')

Create the harness options object using slvnvharnessopts.

harnessOpts = slvnvharnessopts
harnessOpts = 

  struct with fields:

    harnessFilePath: ''
    modelRefHarness: 1
    usedSignalsOnly: 0
      harnessSource: 'Signal Builder'

Use the harnessOpts to create the harness file using slvnvmakeharness.

harnessFile = slvnvmakeharness('slvnvdemo_counter', ...
              '', harnessOpts);

Introduced in R2010b