function data = slvnvlogsignals(varargin)
%SLVNVLOGSIGNALS - Log simulation input port values 
%
%   DATA = SLVNVLOGSIGNALS(MODEL_BLOCK) simulates the model that contains 
%   MODEL_BLOCK and logs the input signals to the MODEL_BLOCK block. 
%   MODEL_BLOCK must be a Simulink Model block. slvnvlogsignals records the 
%   logged data in the structure DATA.
%
%   DATA = SLVNVLOGSIGNALS(HARNESS_MODEL) simulates every test case in 
%   HARNESS_MODEL and logs the input signals to the Test Unit block in the 
%   harness model. You must generate HARNESS_MODEL using 
%   slvnvmakeharness, or Simulink Design Verifier analysis.
%
%   DATA = SLVNVLOGSIGNALS(HARNESS_MODEL, TEST_CASE_INDEX) simulates every 
%   test case in the Signal Editor block of the HARNESS_MODEL that is 
%   specified by TEST_CASE_INDEX. slvnvlogsignals logs the input signals to 
%   the Test Unit block in the harness model. If you omit TEST_CASE_INDEX, 
%   slvnvlogsignals simulates every test case in the Signal Editor. 

%   Copyright 2010-2017 The MathWorks, Inc.

    narginchk(1, 2);
    
    obj = varargin{1};

    if nargin < 2
        testCaseIndex = [];
    else
        testCaseIndex = varargin{2};
    end
    
    try 
        loggerObj = Sldv.SignalLogger(mfilename);
        data = loggerObj.logInputSignals(obj, testCaseIndex);
    catch Mex
        throw(Mex);
    end    
end
