function blkStruct = slblocks
%SLBLOCKS Defines the block library for a specific Toolbox.

%   Copyright 1996-2018 The MathWorks, Inc.

blkStruct.Name = sprintf('Comm\nSystem\nToolbox');
blkStruct.OpenFcn = 'commlib';
blkStruct.MaskInitialization = '';

x = exp(1i*[-45:-8:-215, -45]/180*pi);
x1 = x * 20 + 20 + 1i*35;
x2 = -x*10 + 60 +1i*75;

p_str = ['plot(',...
          mat2str(real(x1),2), ',', mat2str(imag(x1),2), ',', ...
         '[0 15 ', mat2str(real(x1(10:13)),2),' 0],[0 0 ', mat2str(imag(x1(10:13)),2),' 0],', ...
         mat2str(real(x2),2), ',', mat2str(imag(x2),2), ',', ...
         '[19 40 35 52 40 49 60],[34 55 65 50 70 64 75],', ...
         '[74.5 70 65 74],[84.5 80 85 94],',...
         '[66 65 70.5 71], [86 99 97 91],',...
         '[75 74 79 80 75], [81 94 92 79 81],',...
         '[74.5 73], [87 87],',...
         '-10, 0, 100, 100);'];

blkStruct.MaskDisplay = p_str;

% Define the library list for the Simulink Library browser.
% Return the name of the library model and the name for it

Browser(1).Library = 'commlibv2';
Browser(1).Name    = 'Communications Toolbox';

% add HDL library
Browser(2).Library = 'commhdllib';
Browser(2).Name    = 'Communications Toolbox HDL Support';
Browser(2).IsFlat  = 0;% Is this library "flat" (i.e. no subsystems)?

blkStruct.Browser = Browser;

% Define information for model updater for re-linking broken links
blkStruct.ModelUpdaterMethods.fhDetermineBrokenLinks = @commblksBrokenLinksMapping;

% Define information for model updater for updating obsolete blocks
blkStruct.ModelUpdaterMethods.fhSeparatedChecks = @commblksSlupdateHelper;

% [EOF]

% LocalWords:  commlibv
