classdef SubsystemLogger < Sldv.SignalLogger
    %

    %   Copyright 2014-2015 The MathWorks, Inc.

    properties
        % Coverage Data obtained by signal logging simulation
        covData = [];
        
        % Start time of coverage recording
        intervalStartTime = [];

        % Stop time of coverage recording
        intervalStopTime = [];
        
        % Subsystem Port I/O information of the subsystem
        % This can be given by out
        subsystemIO = [];

        % Handles to Data Store Memory blocks inside of the subsystem 
        dsmHsToLog = [];
        
        % Global signals to log. Caches the usage and the map
        % to prior writers
        globalDsmData = [];

        % SimState to be used for non-zero start time subsystem slicing
        SimState;
        
        % Flag to enable/disable coverage measurement
        recordCoverage = false;
    end
    
    methods (Access = public)
        function obj = SubsystemLogger(varargin)
            % Requires SLDV license
            if nargin < 1
                utilname = 'sldvlogsignals';
            else
                %For use by other clients like Slicer.
                utilname = varargin{1};
            end
            obj = obj@Sldv.SignalLogger(utilname);
        end
        data = logInputSignals(obj, varargin);
    end
    
    methods (Access = protected)
        runTests(obj,sldvData);
        setModelLoggingInfo(obj);
        sldvData = generateDataForLogging(obj);
        currentTest = deriveFunctionalTestCase(obj, topLevelLogger, dsmLogger, tcIdx);
        restoreLoggers(obj, modelHIncludingLoggers);
    end
    methods (Static = true, Access = public, Hidden = true)
        % These static functions should be accessed by outsiders.
        checkUnsupportedSystem(sysH, varargin);
        subsystemIO = deriveSubsystemPortInfo(sysH);
        dsmMap = deriveDSWExecPriorToSubsystem(sysH);
    end
end
