classdef CursorMeasurementsSpecification< AbstractMeasurementsSpecification
%CursorMeasurementsSpecification Cursor measurements properties for the
%Spectrum Analyzer.
% CursorMeasurementsSpecification contains the properties used by the
% Spectrum Analyzer CursorMeasurements property. Cursor measurements
% displays screen and waveform cursors.
%
% CursorMeasurementsSpecification properties:
%
%   Type                    - Type of the display cursors
%   ShowHorizontal          - Show horizontal screen cursors
%   ShowVertical            - Show vertical screen cursors
%   Cursor1TraceSource      - Trace number of the waveform cursor 1
%                             source
%   Cursor2TraceSource      - Trace number of the waveform cursor 2
%                             source
%   LockSpacing             - Lock spacing between cursors
%   SnapToData              - Snap cursors to data
%   XLocation               - X coordinates of the cursors
%   YLocation               - Y coordinates of the cursors
%   Enable                  - Enable cursors measurements
%
% % EXAMPLE 1: Use cursor measurements with dsp.SpectrumAnalyzer System
% % object scope
% sine = dsp.SineWave('Frequency',[98 100],'SampleRate',1000);
% sine.SamplesPerFrame = 1024;
% scope = dsp.SpectrumAnalyzer('SampleRate',sine.SampleRate, ...
%     'PlotAsTwoSidedSpectrum',false,'ShowLegend',true);
%
% % Enable cursor measurements
% scope.CursorMeasurements.Enable = true;
%
% % Set cursor measurements CursorType property
% scope.CursorMeasurements.CursorType = 'Screen cursors';
%
% for i=1:100
%     scope(sine() + 0.05*randn(1024,2));
% end
%
% release(scope);
%
% % EXAMPLE 2: Use cursor measurements with Spectrum Analyzer block
% % Create a model based on 'dsp_basic_filter' template
% [~,mdl] = fileparts(tempname);
% open_system(new_system(mdl,'FromTemplate','dsp_basic_filter'));
% saBlock = find_system(mdl,'BlockType','SpectrumAnalyzer');
%
% % Enable cursor measurements
% scopeConfig = get_param(saBlock{1},'ScopeConfiguration');
% scopeConfig.CursorMeasurements.Enable = true;
%
% % Set cursor measurements Type property
% scopeConfig.CursorMeasurements.Type = 'Screen cursors';
%
% % Run simulation
% sim(mdl,'StopTime','20');

     
    %   Copyright 2018 The MathWorks, Inc.

    methods
        function out=CursorMeasurementsSpecification
            %CursorMeasurementsSpecification Construct the
            %CursorMeasurementsSpecification class.
        end

        function getDefaultMeasurementsSpec(in) %#ok<MANU>
        end

        function getMeasurementUpdatedEventName(in) %#ok<MANU>
        end

        function getPropertyGroups(in) %#ok<MANU>
            % This method is used to selectively display public properties
            % based on values of other properties.
        end

        function set(in) %#ok<MANU>
            % Overload set() to enable tab completion of string property
            % values
        end

        function setupMeasurementObject(in) %#ok<MANU>
        end

    end
    properties
        %Cursor1TraceSource Trace number of the waveform cursor 1 source
        %   Specify the waveform cursor 1 source as a positive real scalar.
        %   This property applies when you set the Type property to
        %   'Waveform cursors'. The default Cursor1TraceSource value is 1.
        Cursor1TraceSource;

        %Cursor2TraceSource Trace number of the waveform cursor 2 source
        %   Specify the waveform cursor 2 source as a positive real scalar.
        %   This property applies when you set the Type property to
        %   'Waveform cursors'. The default Cursor2TraceSource value is 1.
        Cursor2TraceSource;

        %LockSpacing Lock spacing between cursors
        %   Set this property to true to lock the spacing between the
        %   cursors. The default is false.
        LockSpacing;

        MeasurerName;

        %ShowHorizontal Show horizontal screen cursors
        %   Set this property to true to show horizontal screen cursors.
        %   This property applies when you set the Type property to 'Screen
        %   cursors'. The default is true.
        ShowHorizontal;

        %ShowVertical Show vertical screen cursors
        %   Set this property to true to show vertical screen cursors. This
        %   property applies when you set the Type property to 'Screen
        %   cursors'. The default is true.
        ShowVertical;

        %SnapToData Snap cursors to data
        %   Set the property to true to snap the cursor to data. The
        %   default is true.
        SnapToData;

        %Type Type of the display cursors
        %   Specify the cursor type as one of 'Screen cursors' | 'Waveform
        %   cursors'. The default Type is 'Waveform cursors'.
        Type;

        %XLocation X coordinates of the cursors
        %   Specify the x coordinates of the cursors as a real vector of
        %   length equal 2. The default XLocation is [-2500 2500].
        XLocation;

        %YLocation Y coordinates of the cursors
        %   Specify the y coordinates of the cursors as a real vector of
        %   length equal 2. This property applies when you set the Type
        %   property to 'Screen cursors'. The default YLocation is [-55 5].
        YLocation;

    end
end
