classdef ChannelMeasurementsSpecification< AbstractMeasurementsSpecification
%ChannelMeasurementsSpecification Channel measurements properties for
%the Spectrum Analyzer.
% ChannelMeasurementsSpecification contains the properties used by the
% Spectrum Analyzer ChannelMeasurements property. Channel measurements
% computes and displays the occupied bandwidth or adjacent channel
% power ratio.
%
% ChannelMeasurementsSpecification properties:
%
%   Algorithm           - Type of measurement data to display
%   FrequencySpan       - Frequency span mode
%   Span                - Frequency span over which channel
%                         measurements are computed
%   CenterFrequency     - Frequency over which span is centered
%   StartFrequency      - Start frequency over which channel
%                         measurements are computed
%   StopFrequency       - Stop frequency over which channel
%                         measurements are computed
%   PercentOccupiedBW   - Percent of power over which to compute the
%                         occupied bandwidth
%   NumOffsets          - Number of adjacent channel pairs
%   AdjacentBW          - Span of the adjacent channel
%   FilterShape         - Filter shape for both main and adjacent
%                         channels
%   FilterCoeff         - Channel filter coefficient
%   ACPROffsets         - Frequency of the adjacent channel relative to
%                         the center frequency of the main channel
%   Enable              - Enable channel measurements
%
% % EXAMPLE 1: Use channel measurement 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 channel measurements
% scope.ChannelMeasurements.Enable = true;
%
% % Set channel measurement Algorithm property
% scope.ChannelMeasurements.Algorithm = 'ACPR';
%
% for i=1:100
%     scope(sine() + 0.05*randn(1024,2));
% end
%
% release(scope);
%
% % EXAMPLE 2: Use channel 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 channel measurements
% scopeConfig = get_param(saBlock{1},'ScopeConfiguration');
% scopeConfig.ChannelMeasurements.Enable = true;
%
% % Set channel measurements Algorithm property
% scopeConfig.ChannelMeasurements.Algorithm = 'ACPR';
%
% % Run simulation
% sim(mdl,'StopTime','20');

     
    %   Copyright 2018 The MathWorks, Inc.

    methods
        function out=ChannelMeasurementsSpecification
            %ChannelMeasurementsSpecification Construct the
            %ChannelMeasurementsSpecification 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

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

    end
    properties
        %ACPROffsets Frequency of the adjacent channel relative to the
        %center frequency of the main channel
        %   Specify the ACPR offsets as a real vector of length equal to
        %   the number of offset pairs specified in NumOffsets. This
        %   property applies when you set the Algorithm property to 'ACPR'.
        %   The default ACPROffsets value is [2000 3500] Hz.
        ACPROffsets;

        %AdjacentBW Span of the adjacent channel
        %   Specify the adjacent bandwidth as a real, positive scalar. This
        %   property applies when you set the Algorithm property to 'ACPR'.
        %   The default AdjacentBW value is 1000.
        AdjacentBW;

        %Algorithm Type of measurement data to display
        %   Specify the algorithm as one of 'Occupied BW' | 'ACPR'. The
        %   default Algorithm is 'Occupied BW'.
        Algorithm;

        %CenterFrequency Frequency over which span is centered
        %   Specify the center frequency of the span over which the channel
        %   measurements are computed as a real scalar in Hertz. This
        %   property applies when you set the FrequencySpan property to
        %   'Span and center frequency'. The default CenterFrequency value
        %   is 0 Hz.
        CenterFrequency;

        %FilterCoeff Channel filter coefficient
        %   Specify the filter coefficient as a real scalar between 0 and
        %   1. This property applies when you set the Algorithm to 'ACPR'
        %   and the FilterShape to either 'Gaussian' or 'RRC'. The default
        %   FilterCoeff value is 0.5.
        FilterCoeff;

        %FilterShape Filter shape for both main and adjacent channels
        %   Specify the filter shape as one of 'None' | 'Gaussian' | 'RRC'.
        %   This property applies when you set the Algorithm property to
        %   'ACPR'. The default FilterShape is 'None'.
        FilterShape;

        %FrequencySpan Frequency span mode
        %   Specify the frequency span mode as one of 'Span and center
        %   frequency' | 'Start and stop frequencies'. The default
        %   FrequencySpan is 'Span and center frequency'.
        FrequencySpan;

        MeasurerName;

        %NumOffsets Number of adjacent channel pairs
        %   Specify the number of offsets as real, positive integer. This
        %   property applies when you set the Algorithm property to 'ACPR'.
        %   The default NumOffsets value is 2.
        NumOffsets;

        %PercentOccupiedBW Percent of power over which to compute the
        %occupied bandwidth
        %   Specify the percentage of the occupied bandwidth as positive
        %   real scalar. This property applies when you set the Algorithm
        %   property to 'Occupied BW'. The default PercentOccupiedBW value
        %   is 99.
        PercentOccupiedBW;

        %Span Frequency span over which channel measurements are computed
        %   Specify the frequency span over which the channel measurements
        %   are computed as a real, positive scalar in Hertz. This
        %   property applies when you set the FrequencySpan property to
        %   'Span and center frequency'. The default Span value is 2000 Hz.
        Span;

        %StartFrequency Start frequency over which channel measurements are
        %computed
        %   Specify the start frequency over which the which channel
        %   measurement is computed as a real scalar in Hertz. This
        %   property applies when you set the FrequencySpan property to
        %   'Start and stop frequencies'. The default StartFrequency value
        %   is -1000 Hz.
        StartFrequency;

        %StopFrequency Stop frequency over which channel measurements are
        %computed
        %   Specify the stop frequency over which the which channel
        %   measurement is computed as a real scalar in Hertz. This
        %   property applies when you set the FrequencySpan property to
        %   'Start and stop frequencies'. The default StopFrequency value
        %   is 1000 Hz.
        StopFrequency;

    end
end
