Main Content

sltest.harness.push

Push test harness workspace entries and configuration set to model

Description

sltest.harness.push(harnessOwner,harnessName) pushes the configuration parameter set and workspace entries associated with the component under test from the test harness harnessName to the main model containing the model or component harnessOwner. Subsystem model test harnesses always push.

Examples

collapse all

Change the denominator value of the Stick Prefilter in the harness. Then, push the change in the controller_harness to the f14 model. Notice that the parameter is updated in the model.

f14;
sltest.harness.create('f14/Controller',...
    'Name','controller_harness',...
    'SynchronizationMode','SyncOnPushRebuildOnly');

sltest.harness.open('f14/Controller','controller_harness')
set_param('controller_harness/Controller/Stick Prefilter',...
    'Denominator','[Ts,2]')

blkpath = 'f14/Controller/Stick Prefilter';
disp(['Original denominator: ' get_param(blkpath,'Denominator')])

sltest.harness.push('f14/Controller','controller_harness');
disp(['Updated denominator: ' get_param(blkpath,'Denominator')])

Input Arguments

collapse all

Model or component handle, or path, specified as a character vector or double

Example: 1.9500e+03

Example: 'model_name'

Example: 'model_name/Subsystem'

The name of the harness, specified as a character vector.

Example: 'harness_name'

Introduced in R2015a