%

%   Copyright 2015-2021 The MathWorks, Inc.
function configureInportExportFormatOnHarnessModel(srcModelH, harnessH,srcHasRootLvlOutBEP)
    if srcHasRootLvlOutBEP 
        % If the model has bus element out ports, we have to set
        % 'SaveFormat' parameter to 'DataSet' of the harness inorder to
        % simulate and produce coverage
        set_param(harnessH, 'SaveFormat', 'Dataset');
    elseif strcmp(get_param(srcModelH, 'SaveFormat'), 'Dataset')
        % As a part of g2287930, making this setting between harness model
        % consistent with design model. For many constructs, dataset seems
        % to be default format.The code could have been simplified by
        % merging above two cases. 
        set_param(harnessH, 'SaveFormat', 'Dataset');
    else
        % Set the save format to Struct with Time       
        set_param(harnessH, 'SaveFormat', 'StructureWithTime');
    end
    % Turn off external inputs to the root level inports
    set_param(harnessH, 'LoadExternalInput', 'off');
end
