function ecblksUpdateModel(h)
% Function ecblksUpdateModel is a helper function to be called as part of
% slupdate. It is not intended to be called directly from the command line. This
% function specifies the functions that need to be called by the core slupdate
% mechanism for individual local  blocks.

%   Copyright 2010 The MathWorks, Inc.

% Slupdate blocks that require model compilation.  This includes all blocks
% involved in the frame upgrade.
if h.CheckFlags.Compiled
    [inProcList, rowConvList] = ecGetFrameUpgradeList;
    numBlksInProc       = size(inProcList,1);
    ReplaceInfoInProc   = cell(numBlksInProc, 2);
    numBlksRowConv      = size(rowConvList,1);
    ReplaceInfoRowConv  = cell(numBlksRowConv, 2);
    
    % Define the inherited option of the 'Input processing' parameter
    inpProcInhStr = ...
        'Inherited (this choice will be removed - see release notes)';
    
    % Build the ReplaceInfo array for blocks that have the 'Input processing' parameter
    for idx = 1:numBlksInProc
        ReplaceInfoInProc(idx,:) = { ...
            {'ReferenceBlock', sprintf('%s', inProcList{idx,2}), ...
            'InputProcessing', inpProcInhStr},...
            'ecInProcRegisterCompileCheck'};
    end
    
    % Build the ReplaceInfo array for blocks that support row convenience    
    for idx = 1:numBlksRowConv
        ReplaceInfoRowConv(idx,:) = {...
            {'ReferenceBlock', sprintf('%s',rowConvList{idx, 2})}, ...
            'ecRowConvRegisterCompileCheck' };
    end
    
    ReplaceInfo = [ReplaceInfoInProc;ReplaceInfoRowConv];
    
    ReplaceInfo = cell2struct(ReplaceInfo, { 'BlockDesc', 'ReplaceFcn'}, 2);
    replaceBlocks(h, ReplaceInfo);
end

% [EOF]
