Building Controls Virtual Test Bed
slblocks.m
Go to the documentation of this file.
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'];
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 % $Revision: 1.20.2.7 $
52 
53 %
54 % Name of the subsystem which will show up in the Simulink Blocksets
55 % and Toolboxes subsystem.
56 %
57 blkStruct.Name = ['BCVTB'];
58 
59 %
60 % The function that will be called when the user double-clicks on
61 % this icon.
62 %
63 blkStruct.OpenFcn = 'simulink_extras';
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 %
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 = 'BCVTB';
79 Browser(1).Name = 'BCVTB';
80 Browser(1).IsFlat = 1;% Is this library "flat" (i.e. no subsystems)?
81 
82 %Browser(2).Library = 'bcvtb_extras';
83 %Browser(2).Name = 'BCVTB Extras';
84 %Browser(2).IsFlat = 1;% Is this library "flat" (i.e. no subsystems)?
85 
87 clear Browser;
88 
89 %
90 % Define information about Signal Viewers
91 %
92 Viewer(1).Library = 'simviewers';
93 Viewer(1).Name = 'BCVTB';
94 
96 clear Viewer;
97 
98 %
99 % Define information about Signal Generators
100 %
101 Generator(1).Library = 'simgens';
102 Generator(1).Name = 'BCVTB';
103 
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 
for i
Definition: compile.m:69
clear Browser
Definition: slblocks.m:87
function described below The Simulink Library Browser needs to know which libraries in your Blockset it should and what names to give them To provide this information
Definition: slblocks.m:1
blkStruct Generator
Definition: slblocks.m:104
blkStruct ModelUpdaterMethods fhUpdateModel
Definition: slblocks.m:109
function described below The Simulink Library Browser needs to know which libraries in your Blockset it should and what names to give them To provide this define an array of Browser data structures with one array element for each library to display in the Simulink Library Browser Each array element has two fields
Definition: slblocks.m:1
program first
Definition: f90client.f90:1
This file compiles the BSD socket interface for Simulink It is called by ant On it requires the Microsoft compiler Note
Definition: compile.m:5
function blkStruct
Definition: slblocks.m:1
end Establish the socket connection if and(libisloaded(BCVTBLIB),(status==1)) sockfd
This file compiles the BSD socket interface for Simulink It is called by ant On it requires the Microsoft compiler since matlab requires the size of output arrays to be fixed If more elements are required
Definition: compile.m:5
if(strcmp(os,'windows'))%have Windows LIBBCVTB
blkStruct OpenFcn
Definition: slblocks.m:37
blkStruct Viewer
Definition: slblocks.m:95
function[retVal, flaRea, simTimRea, dblValRea]
Define information for model updater blkStruct ModelUpdaterMethods fhDetermineBrokenLinks
Definition: slblocks.m:108
blkStruct MaskDisplay
Definition: slblocks.m:38
Define the Browser structure array
Definition: slblocks.m:74
function described below The Simulink Library Browser needs to know which libraries in your Blockset it should show
Definition: slblocks.m:1
id simulink_extras()
The argument to be set as the Mask Display for the subsystem You may comment this line out if no specific mask is desired Example
Definition: slblocks.m:68
Is this library flat(i.e.no subsystems)?%Browser(2).Library
disp('***Generating mex file') legacy_code('sfcn_cmex_generate'
The argument to be set as the Mask Display for the subsystem You may comment this line out if no specific mask is desired sin([0:2 *pi]))
See also FINDBLIB
Definition: slblocks.m:48