function configHarnessForSLDV(srcModelH, harnessH, sldvDataAnalysisOptions)
%

%   Copyright 2015-2018 The MathWorks, Inc.

fromMdlFlag = false;

% Copy the configset from the original model
Sldv.utils.copyConfigSet(srcModelH, harnessH);

% copy stateflow targets and Debug settings for chart if sf is installed
Sldv.utils.copySfTargetsDebugSettings(srcModelH, harnessH);

componentUnderTest = getComponentUnderTest(get_param(harnessH, 'Name'));
modelRefHarness = Simulink.SubsystemType.isModelBlock(componentUnderTest);

% update config sets
Sldv.utils.configureSourceAndHarnessModelCoverage(srcModelH, harnessH, ...
    fromMdlFlag, modelRefHarness, ...
    sldvDataAnalysisOptions, componentUnderTest);

end

% helper to get the CUT from the BD harnesses
function componentUnderTest = getComponentUnderTest(hName)

componentUnderTest = Simulink.ID.getFullName([hName ':1']);

end
