-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdiscon.tlc
184 lines (159 loc) · 7.12 KB
/
discon.tlc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
%% SYSTLC: DISCON DLL Target (for use with GH BLADED) \
%% TMF: grt_default_tmf MAKE: make_rtw EXTMODE: ext_comm
%% SYSTLC: Create Visual C/C++ Solution File for Simulink Coder\
%% TMF: discon_vc.tmf MAKE: make_rtw EXTMODE: ext_comm
%%
%%
%%
%%
%%
%% Copyright 1994-2016 The MathWorks, Inc.
%% Abstract: Generic real-time system target file.
%%
%selectfile NULL_FILE
%assign TargetType = "RT"
%assign Language = "C"
%assign GenRTModel = 1
%assign _GRT_ = 1
%assign TargetRegistMutexOp = 1
%assign TargetRegistSynchroOp = 1
%include "codegenentry.tlc"
%% The contents between 'BEGIN_RTW_OPTIONS' and 'END_RTW_OPTIONS' in this file
%% are used to maintain backward compatibility to R13 and preR13 custom target
%% file only. If you want to use this file as a template to develop your
%% own system target file, you need to remove the 'CONFIGSET_TARGET_COMPONENT'
%% section at the end of this file.
%%
/%
BEGIN_RTW_OPTIONS
% second page of category item
rtwoptions(1).prompt = 'DISCON code generation options';
rtwoptions(1).type = 'Category';
rtwoptions(1).enable = 'on';
rtwoptions(1).default = 2; % number of items under this category
% excluding this one.
rtwoptions(1).popupstrings = '';
rtwoptions(1).tlcvariable = '';
rtwoptions(1).tooltip = '';
rtwoptions(1).callback = '';
rtwoptions(1).opencallback = '';
rtwoptions(1).closecallback = '';
rtwoptions(1).makevariable = '';
rtwoptions(2).prompt = 'MAT-file variable name modifier';
rtwoptions(2).type = 'Popup';
rtwoptions(2).default = 'rt_';
rtwoptions(2).popupstrings = 'rt_|_rt|none';
rtwoptions(2).tlcvariable = 'LogVarNameModifier';
rtwoptions(2).tooltip = ...
['prefix rt_ to variable name,', sprintf('\n'), ...
'append _rt to variable name,', sprintf('\n'), ...
'or no modification'];
rtwoptions(3).prompt = 'Ignore custom storage classes';
rtwoptions(3).type = 'Checkbox';
rtwoptions(3).default = 'on';
rtwoptions(3).tlcvariable = 'IgnoreCustomStorageClasses';
rtwoptions(3).tooltip = ['Treat custom storage classes as ''Auto''.'];
rtwoptions(3).opencallback = [ ...
'objTag = ''Ignore custom storage classes_CheckboxTag'';', ...
'obj = findobj(DialogFig,''Tag'',objTag);', ...
'set(obj, ''Enable'', sl(''onoff'',ecoderinstalled));'];
rtwoptions(4).prompt = 'External Mode code generation options';
rtwoptions(4).type = 'Category';
rtwoptions(4).enable = 'on';
rtwoptions(4).default = 5; % number of items under this category
% excluding this one.
rtwoptions(4).popupstrings = '';
rtwoptions(4).tlcvariable = '';
rtwoptions(4).tooltip = '';
rtwoptions(4).callback = '';
rtwoptions(4).opencallback = '';
rtwoptions(4).closecallback = '';
rtwoptions(4).makevariable = '';
rtwoptions(5).prompt = 'External mode';
rtwoptions(5).type = 'Checkbox';
rtwoptions(5).default = 'off';
rtwoptions(5).tlcvariable = 'ExtMode';
rtwoptions(5).makevariable = 'EXT_MODE';
rtwoptions(5).tooltip = ...
['Adds communication support',sprintf('\n'), ...
'for use with Simulink external mode'];
% Enable/disable other external mode controls.
rtwoptions(5).callback = [ ...
'DialogFig = get(gcbo,''Parent'');',...
'sl(''extmodecallback'', ''extmode_checkbox_callback'', DialogFig);', ...
];
rtwoptions(6).prompt = 'Transport';
rtwoptions(6).type = 'Popup';
rtwoptions(6).default = 'tcpip';
rtwoptions(6).popupstrings = ['tcpip|', ...
'serial'];
rtwoptions(6).tlcvariable = 'ExtModeTransport';
rtwoptions(6).makevariable = 'EXTMODE_TRANSPORT';
rtwoptions(6).tooltip = ...
['Chooses transport mechanism for external mode'];
% Synchronize with "External mode" checkbox option
rtwoptions(6).opencallback = [ ...
'ExtModeTable = {''tcpip'' ''ext_comm'';', ...
'''serial'' ''ext_serial_win32_comm''};', ...
'ud = DialogUserData;', ...
'ud = extmodecallback(''transport_popup_opencallback'',model,DialogFig,ud,ExtModeTable);', ...
'DialogUserData = ud;', ...
];
% Set extmode mex-file according to extmode transport mechanism.
rtwoptions(6).closecallback = [ ...
'ExtModeTable = {''tcpip'' ''ext_comm'';', ...
'''serial'' ''ext_serial_win32_comm''};', ...
'ud = DialogUserData;', ...
'ud = extmodecallback(''transport_popup_closecallback'',model,DialogFig,ud,ExtModeTable);', ...
'DialogUserData = ud;', ...
];
rtwoptions(7).prompt = 'Static memory allocation';
rtwoptions(7).type = 'Checkbox';
rtwoptions(7).default = 'off';
rtwoptions(7).tlcvariable = 'ExtModeStaticAlloc';
rtwoptions(7).makevariable = 'EXTMODE_STATIC_ALLOC';
rtwoptions(7).tooltip = ...
['Forces external mode to use static',sprintf('\n'), ...
'instead of dynamic memory allocation'];
% Enable/disable external mode static allocation size selection.
rtwoptions(7).callback = [ ...
'DialogFig = get(gcbo,''Parent'');',...
'sl(''extmodecallback'', ''staticmem_checkbox_callback'', DialogFig);', ...
];
% Synchronize with "External mode" checkbox option
rtwoptions(7).opencallback = [ ...
'extmodecallback(''staticmem_checkbox_opencallback'',DialogFig);', ...
];
rtwoptions(8).prompt = 'Static memory buffer size';
rtwoptions(8).type = 'Edit';
rtwoptions(8).default = '1000000';
rtwoptions(8).tlcvariable = 'ExtModeStaticAllocSize';
rtwoptions(8).makevariable = 'EXTMODE_STATIC_ALLOC_SIZE';
rtwoptions(8).tooltip = ...
['Size of external mode static allocation buffer'];
% Synchronize with "External mode static allocation" option
rtwoptions(8).opencallback = [ ...
'extmodecallback(''staticmemsize_edit_opencallback'',DialogFig);', ...
];
rtwoptions(9).prompt = 'External mode testing';
rtwoptions(9).type = 'NonUI';
rtwoptions(9).default = '0';
rtwoptions(9).tlcvariable = 'ExtModeTesting';
rtwoptions(9).makevariable = 'TMW_EXTMODE_TESTING';
rtwoptions(9).tooltip = ...
['Internal testing flag for Simulink external mode'];
%----------------------------------------%
% Configure RTW code generation settings %
%----------------------------------------%
rtwgensettings.BuildDirSuffix = '_discon_rtw';
END_RTW_OPTIONS
%/
%% The content between 'BEGIN_CONFIGSET_TARGET_COMPONENT' and
%% 'END_CONFIGSET_TARGET_COMPONENT' is for the MathWorks internal use
%% only. You must remove this section if you intend to use this file
%% as a template for your own system target development.
/%
BEGIN_CONFIGSET_TARGET_COMPONENT
targetComponentClass = 'Simulink.GRTTargetCC';
END_CONFIGSET_TARGET_COMPONENT
%/