function freblkCallbackBodePlot(blk)
%   Callback function of FRE block

%   Author: R. Chen
%   Copyright 2018 The MathWorks, Inc.

IsOnlineEstimation = strcmpi(get_param(blk,'EstimationMode'),slsvInternal('slsvGetEnStringFromCatalog','Slcontrol:onlinefre:rbtnElementOnline'));
% switch bode plot settings depending on checkbox selection (online only)
if IsOnlineEstimation && strcmp(get_param(bdroot(blk),'SimulationStatus'),'stopped')
    maskObj = Simulink.Mask.get(blk);
    objectG = maskObj.Parameters.findobj('Name','BaselinePlant');
    objectTs = maskObj.Parameters.findobj('Name','PlotRefreshFactor');
    UseBodePlot = strcmpi(get_param(blk,'UseBodePlot'),'on');
    if UseBodePlot
        objectG.Enabled = 'on';
        objectTs.Enabled = 'on';
    else
        objectG.Enabled = 'off';
        objectTs.Enabled = 'off';
    end
end