comparison m-toolbox/m/gui/gltpda/slblocks.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 function blkStruct = slblocks
2 %SLBLOCKS Defines the block library for a specific Toolbox or Blockset.
3 % SLBLOCKS returns information about a Blockset to Simulink. The
4 % information returned is in the form of a BlocksetStruct with the
5 % following fields:
6 %
7 % Name Name of the Blockset in the Simulink block library
8 % Blocksets & Toolboxes subsystem.
9 % OpenFcn MATLAB expression (function) to call when you
10 % double-click on the block in the Blocksets & Toolboxes
11 % subsystem.
12 % MaskDisplay Optional field that specifies the Mask Display commands
13 % to use for the block in the Blocksets & Toolboxes
14 % subsystem.
15 % Browser Array of Simulink Library Browser structures, described
16 % below.
17 %
18 % The Simulink Library Browser needs to know which libraries in your
19 % Blockset it should show, and what names to give them. To provide
20 % this information, define an array of Browser data structures with one
21 % array element for each library to display in the Simulink Library
22 % Browser. Each array element has two fields:
23 %
24 % Library File name of the library (mdl-file) to include in the
25 % Library Browser.
26 % Name Name displayed for the library in the Library Browser
27 % window. Note that the Name is not required to be the
28 % same as the mdl-file name.
29 %
30 % Example:
31 %
32 % %
33 % % Define the BlocksetStruct for the Simulink block libraries
34 % % Only simulink_extras shows up in Blocksets & Toolboxes
35 % %
36 % blkStruct.Name = ['Simulink' sprintf('\n') 'Extras'];
37 % blkStruct.OpenFcn = simulink_extras;
38 % blkStruct.MaskDisplay = disp('Simulink\nExtras');
39 %
40 % %
41 % % Both simulink and simulink_extras show up in the Library Browser.
42 % %
43 % blkStruct.Browser(1).Library = 'simulink';
44 % blkStruct.Browser(1).Name = 'Simulink';
45 % blkStruct.Browser(2).Library = 'simulink_extras';
46 % blkStruct.Browser(2).Name = 'Simulink Extras';
47 %
48 % See also FINDBLIB, LIBBROWSE.
49
50 % Copyright 1990-2006 The MathWorks, Inc.
51 % $Id: slblocks.m,v 1.1 2008/03/01 13:43:20 nicola Exp $
52
53 %
54 % Name of the subsystem which will show up in the Simulink Blocksets
55 % and Toolboxes subsystem.
56 %
57 blkStruct.Name = ['LTPDA' sprintf('\n') 'Package'];
58
59 %
60 % The function that will be called when the user double-clicks on
61 % this icon.
62 %
63 blkStruct.OpenFcn = 'ltpdalib';
64
65 %
66 % The argument to be set as the Mask Display for the subsystem. You
67 % may comment this line out if no specific mask is desired.
68 % Example: blkStruct.MaskDisplay = 'plot([0:2*pi],sin([0:2*pi]));';
69 % No display for Simulink Extras.
70 %
71 %blkStruct.MaskDisplay = '';
72
73 %
74 % Define the Browser structure array, the first element contains the
75 % information for the Simulink block library and the second for the
76 % Simulink Extras block library.
77 %
78 % Browser(1).Library = 'simulink';
79 % Browser(1).Name = 'Simulink';
80 % Browser(1).IsFlat = 0;% Is this library "flat" (i.e. no subsystems)?
81
82 Browser(2).Library = 'ltpda_library';
83 Browser(2).Name = 'LTPDA Library';
84 Browser(2).IsFlat = 0;
85
86 blkStruct.Browser = Browser;
87 clear Browser;
88
89 %
90 % Define information about Signal Viewers
91 %
92 Viewer(1).Library = 'simviewers';
93 Viewer(1).Name = 'Simulink';
94
95 blkStruct.Viewer = Viewer;
96 clear Viewer;
97
98 %
99 % Define information about Signal Generators
100 %
101 Generator(1).Library = 'simgens';
102 Generator(1).Name = 'Simulink';
103
104 blkStruct.Generator = Generator;
105 clear Generator;
106
107 % Define information for model updater
108 %blkStruct.ModelUpdaterMethods.fhDetermineBrokenLinks = @UpdateSimulinkBrokenLinksMappingHelper;
109 blkStruct.ModelUpdaterMethods.fhUpdateModel = @UpdateSimulinkBlocksHelper;
110
111 % End of slblocks
112
113