function callbackStateAttributes(blk, Prefix)
% CALLBACKSTATEATTRIBUTES controls the enabled and visible state of dialog
% fields on the State Attributes tab for PID 1DOF and 2DOF blocks.  Default
% settings will be pushed to the dialog when a field is not enabled.
%
%   blk: the masked subsystem of the PID 1dof or 2dof block
%   Prefix: either 'Integrator' or 'Filter'

%   Copyright 2017-2020 The MathWorks, Inc.

% Do not run initialization code if model is running
if ~strcmpi(get_param(bdroot(blk),'SimulationStatus'),'stopped')
    return
end

% Get Current Mask Parameter Enable and Visibility Status
dlgSett = pidpack.PIDConfig.utilGetDialogSettings(blk);

% State Attribute Visibilities
pidpack.PIDConfig.utilStateAttributes(blk,dlgSett, Prefix);

end
