1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2016 - Scilab Enterprises - Clement DAVID
4//
5//  This file is distributed under the same license as the Scilab package.
6// =============================================================================
7//
8// <-- CLI SHELL MODE -->
9scicos_log("INFO")
10 ans  =
11  "WARNING"
12loadXcosLibs();
13// check contained blocks interfaces
14o = CONST_m("define");
15Xcos info:    objectCreated( 1 , BLOCK )
16Xcos info:    objectCreated( 2 , PORT )
17assert_checkequal(o.graphics.pin, []);
18assert_checkequal(o.graphics.pout, 0);
19assert_checkequal(o.graphics.pein, []);
20assert_checkequal(o.graphics.peout, []);
21clear o
22Xcos info:    objectDeleted( 2 , PORT )
23Xcos info:    objectDeleted( 1 , BLOCK )
24o = TRASH_f("define");
25Xcos info:    objectCreated( 3 , BLOCK )
26Xcos info:    objectCreated( 4 , PORT )
27Xcos info:    objectCreated( 5 , PORT )
28assert_checkequal(o.graphics.pin, 0);
29assert_checkequal(o.graphics.pout, []);
30assert_checkequal(o.graphics.pein, 0);
31assert_checkequal(o.graphics.peout, []);
32clear o
33Xcos info:    objectDeleted( 4 , PORT )
34Xcos info:    objectDeleted( 5 , PORT )
35Xcos info:    objectDeleted( 3 , BLOCK )
36o = CLOCK_f("define");
37Xcos info:    objectCreated( 6 , BLOCK )
38Xcos info:    objectCreated( 7 , PORT )
39Xcos info:    objectCreated( 8 , PORT )
40Xcos info:    objectCreated( 9 , BLOCK )
41Xcos info:    objectCreated( 10 , PORT )
42Xcos info:    objectCreated( 11 , BLOCK )
43Xcos info:    objectCreated( 12 , PORT )
44Xcos info:    objectCreated( 13 , PORT )
45Xcos info:    objectCreated( 14 , PORT )
46Xcos info:    objectCreated( 15 , DIAGRAM )
47Xcos info:    objectCreated( 16 , BLOCK )
48Xcos info:    objectCloned( 9 , 16 , BLOCK )
49Xcos info:    objectCreated( 17 , PORT )
50Xcos info:    objectCloned( 10 , 17 , PORT )
51Xcos info:    objectCreated( 18 , BLOCK )
52Xcos info:    objectCloned( 6 , 18 , BLOCK )
53Xcos info:    objectCreated( 19 , PORT )
54Xcos info:    objectCloned( 7 , 19 , PORT )
55Xcos info:    objectCreated( 20 , PORT )
56Xcos info:    objectCloned( 8 , 20 , PORT )
57Xcos info:    objectCreated( 21 , LINK )
58Xcos info:    objectCreated( 22 , LINK )
59Xcos info:    objectCloned( 21 , 22 , LINK )
60Xcos info:    objectDeleted( 21 , LINK )
61Xcos info:    objectCreated( 23 , BLOCK )
62Xcos info:    objectCloned( 11 , 23 , BLOCK )
63Xcos info:    objectCreated( 24 , PORT )
64Xcos info:    objectCloned( 12 , 24 , PORT )
65Xcos info:    objectCreated( 25 , PORT )
66Xcos info:    objectCloned( 13 , 25 , PORT )
67Xcos info:    objectCreated( 26 , PORT )
68Xcos info:    objectCloned( 14 , 26 , PORT )
69Xcos info:    objectCreated( 27 , LINK )
70Xcos info:    objectCreated( 28 , LINK )
71Xcos info:    objectCloned( 27 , 28 , LINK )
72Xcos info:    objectDeleted( 27 , LINK )
73Xcos info:    objectCreated( 29 , LINK )
74Xcos info:    objectCreated( 30 , LINK )
75Xcos info:    objectCloned( 29 , 30 , LINK )
76Xcos info:    objectDeleted( 29 , LINK )
77Xcos info:    objectCreated( 31 , BLOCK )
78Xcos info:    objectCreated( 32 , PORT )
79Xcos info:    objectCreated( 33 , BLOCK )
80Xcos info:    objectCloned( 16 , 33 , BLOCK )
81Xcos info:    objectCreated( 34 , PORT )
82Xcos info:    objectCloned( 17 , 34 , PORT )
83Xcos info:    objectCreated( 35 , BLOCK )
84Xcos info:    objectCloned( 18 , 35 , BLOCK )
85Xcos info:    objectCreated( 36 , PORT )
86Xcos info:    objectCloned( 19 , 36 , PORT )
87Xcos info:    objectCreated( 37 , PORT )
88Xcos info:    objectCloned( 20 , 37 , PORT )
89Xcos info:    objectCreated( 38 , LINK )
90Xcos info:    objectCloned( 22 , 38 , LINK )
91Xcos info:    objectCreated( 39 , BLOCK )
92Xcos info:    objectCloned( 23 , 39 , BLOCK )
93Xcos info:    objectCreated( 40 , PORT )
94Xcos info:    objectCloned( 24 , 40 , PORT )
95Xcos info:    objectCreated( 41 , PORT )
96Xcos info:    objectCloned( 25 , 41 , PORT )
97Xcos info:    objectCreated( 42 , PORT )
98Xcos info:    objectCloned( 26 , 42 , PORT )
99Xcos info:    objectCreated( 43 , LINK )
100Xcos info:    objectCloned( 28 , 43 , LINK )
101Xcos info:    objectCreated( 44 , LINK )
102Xcos info:    objectCloned( 30 , 44 , LINK )
103Xcos info:    objectDeleted( 17 , PORT )
104Xcos info:    objectDeleted( 16 , BLOCK )
105Xcos info:    objectDeleted( 19 , PORT )
106Xcos info:    objectDeleted( 20 , PORT )
107Xcos info:    objectDeleted( 18 , BLOCK )
108Xcos info:    objectDeleted( 22 , LINK )
109Xcos info:    objectDeleted( 24 , PORT )
110Xcos info:    objectDeleted( 25 , PORT )
111Xcos info:    objectDeleted( 26 , PORT )
112Xcos info:    objectDeleted( 23 , BLOCK )
113Xcos info:    objectDeleted( 28 , LINK )
114Xcos info:    objectDeleted( 30 , LINK )
115Xcos info:    objectDeleted( 15 , DIAGRAM )
116Xcos info:    objectDeleted( 7 , PORT )
117Xcos info:    objectDeleted( 8 , PORT )
118Xcos info:    objectDeleted( 6 , BLOCK )
119Xcos info:    objectDeleted( 10 , PORT )
120Xcos info:    objectDeleted( 9 , BLOCK )
121Xcos info:    objectDeleted( 12 , PORT )
122Xcos info:    objectDeleted( 13 , PORT )
123Xcos info:    objectDeleted( 14 , PORT )
124Xcos info:    objectDeleted( 11 , BLOCK )
125assert_checkequal(o.graphics.pin, []);
126assert_checkequal(o.graphics.pout, []);
127assert_checkequal(o.graphics.pein, []);
128assert_checkequal(o.graphics.peout, 0);
129assert_checkequal(o.model.rpar.objs(1).graphics.pin, []);
130assert_checkequal(o.model.rpar.objs(1).graphics.pout, []);
131assert_checkequal(o.model.rpar.objs(1).graphics.pein, 5);
132assert_checkequal(o.model.rpar.objs(1).graphics.peout, []);
133assert_checkequal(o.model.rpar.objs(4).graphics.pin, []);
134assert_checkequal(o.model.rpar.objs(4).graphics.pout, []);
135assert_checkequal(o.model.rpar.objs(4).graphics.pein, 3);
136assert_checkequal(o.model.rpar.objs(4).graphics.peout, [5;6]);
137assert_checkequal(o.model.rpar.objs(2).graphics.pin, []);
138assert_checkequal(o.model.rpar.objs(2).graphics.pout, []);
139assert_checkequal(o.model.rpar.objs(2).graphics.pein, 6);
140assert_checkequal(o.model.rpar.objs(2).graphics.peout, 3);
141clear o
142Xcos info:    objectDeleted( 32 , PORT )
143Xcos info:    objectDeleted( 34 , PORT )
144Xcos info:    objectDeleted( 33 , BLOCK )
145Xcos info:    objectDeleted( 36 , PORT )
146Xcos info:    objectDeleted( 37 , PORT )
147Xcos info:    objectDeleted( 35 , BLOCK )
148Xcos info:    objectDeleted( 38 , LINK )
149Xcos info:    objectDeleted( 40 , PORT )
150Xcos info:    objectDeleted( 41 , PORT )
151Xcos info:    objectDeleted( 42 , PORT )
152Xcos info:    objectDeleted( 39 , BLOCK )
153Xcos info:    objectDeleted( 43 , LINK )
154Xcos info:    objectDeleted( 44 , LINK )
155Xcos info:    objectDeleted( 31 , BLOCK )
156// create a block and connect it
157function o = create_and_connect(fname, pin, pout, pein, peout)
158    o = fname("define");
159    if exists("pin","local") then o.graphics.pin = pin; end
160    if exists("pout","local") then o.graphics.pout = pout; end
161    if exists("pein","local") then o.graphics.pein = pein; end
162    if exists("peout","local") then o.graphics.peout = peout; end
163endfunction
164// create a valid diagram
165scs_m = scicos_diagram(objs=list( ..
166CONST_m("define"), ..
167TRASH_f("define"), ..
168CLOCK_c("define"), ..
169scicos_link(from=[1 1 0],to=[2 1 1]), ..
170scicos_link(from=[3 1 0],to=[2 1 1],ct=[5,-1])));
171Xcos info:    objectCreated( 45 , BLOCK )
172Xcos info:    objectCreated( 46 , PORT )
173Xcos info:    objectCreated( 47 , BLOCK )
174Xcos info:    objectCreated( 48 , PORT )
175Xcos info:    objectCreated( 49 , PORT )
176Xcos info:    objectCreated( 50 , BLOCK )
177Xcos info:    objectCreated( 51 , PORT )
178Xcos info:    objectCreated( 52 , PORT )
179Xcos info:    objectCreated( 53 , BLOCK )
180Xcos info:    objectCreated( 54 , PORT )
181Xcos info:    objectCreated( 55 , BLOCK )
182Xcos info:    objectCreated( 56 , PORT )
183Xcos info:    objectCreated( 57 , PORT )
184Xcos info:    objectCreated( 58 , PORT )
185Xcos info:    objectCreated( 59 , DIAGRAM )
186Xcos info:    objectCreated( 60 , BLOCK )
187Xcos info:    objectCloned( 53 , 60 , BLOCK )
188Xcos info:    objectCreated( 61 , PORT )
189Xcos info:    objectCloned( 54 , 61 , PORT )
190Xcos info:    objectCreated( 62 , BLOCK )
191Xcos info:    objectCloned( 50 , 62 , BLOCK )
192Xcos info:    objectCreated( 63 , PORT )
193Xcos info:    objectCloned( 51 , 63 , PORT )
194Xcos info:    objectCreated( 64 , PORT )
195Xcos info:    objectCloned( 52 , 64 , PORT )
196Xcos info:    objectCreated( 65 , LINK )
197Xcos info:    objectCreated( 66 , LINK )
198Xcos info:    objectCloned( 65 , 66 , LINK )
199Xcos info:    objectDeleted( 65 , LINK )
200Xcos info:    objectCreated( 67 , BLOCK )
201Xcos info:    objectCloned( 55 , 67 , BLOCK )
202Xcos info:    objectCreated( 68 , PORT )
203Xcos info:    objectCloned( 56 , 68 , PORT )
204Xcos info:    objectCreated( 69 , PORT )
205Xcos info:    objectCloned( 57 , 69 , PORT )
206Xcos info:    objectCreated( 70 , PORT )
207Xcos info:    objectCloned( 58 , 70 , PORT )
208Xcos info:    objectCreated( 71 , LINK )
209Xcos info:    objectCreated( 72 , LINK )
210Xcos info:    objectCloned( 71 , 72 , LINK )
211Xcos info:    objectDeleted( 71 , LINK )
212Xcos info:    objectCreated( 73 , LINK )
213Xcos info:    objectCreated( 74 , LINK )
214Xcos info:    objectCloned( 73 , 74 , LINK )
215Xcos info:    objectDeleted( 73 , LINK )
216Xcos info:    objectCreated( 75 , BLOCK )
217Xcos info:    objectCreated( 76 , PORT )
218Xcos info:    objectCreated( 77 , BLOCK )
219Xcos info:    objectCloned( 60 , 77 , BLOCK )
220Xcos info:    objectCreated( 78 , PORT )
221Xcos info:    objectCloned( 61 , 78 , PORT )
222Xcos info:    objectCreated( 79 , BLOCK )
223Xcos info:    objectCloned( 62 , 79 , BLOCK )
224Xcos info:    objectCreated( 80 , PORT )
225Xcos info:    objectCloned( 63 , 80 , PORT )
226Xcos info:    objectCreated( 81 , PORT )
227Xcos info:    objectCloned( 64 , 81 , PORT )
228Xcos info:    objectCreated( 82 , LINK )
229Xcos info:    objectCloned( 66 , 82 , LINK )
230Xcos info:    objectCreated( 83 , BLOCK )
231Xcos info:    objectCloned( 67 , 83 , BLOCK )
232Xcos info:    objectCreated( 84 , PORT )
233Xcos info:    objectCloned( 68 , 84 , PORT )
234Xcos info:    objectCreated( 85 , PORT )
235Xcos info:    objectCloned( 69 , 85 , PORT )
236Xcos info:    objectCreated( 86 , PORT )
237Xcos info:    objectCloned( 70 , 86 , PORT )
238Xcos info:    objectCreated( 87 , LINK )
239Xcos info:    objectCloned( 72 , 87 , LINK )
240Xcos info:    objectCreated( 88 , LINK )
241Xcos info:    objectCloned( 74 , 88 , LINK )
242Xcos info:    objectDeleted( 61 , PORT )
243Xcos info:    objectDeleted( 60 , BLOCK )
244Xcos info:    objectDeleted( 63 , PORT )
245Xcos info:    objectDeleted( 64 , PORT )
246Xcos info:    objectDeleted( 62 , BLOCK )
247Xcos info:    objectDeleted( 66 , LINK )
248Xcos info:    objectDeleted( 68 , PORT )
249Xcos info:    objectDeleted( 69 , PORT )
250Xcos info:    objectDeleted( 70 , PORT )
251Xcos info:    objectDeleted( 67 , BLOCK )
252Xcos info:    objectDeleted( 72 , LINK )
253Xcos info:    objectDeleted( 74 , LINK )
254Xcos info:    objectDeleted( 59 , DIAGRAM )
255Xcos info:    objectDeleted( 51 , PORT )
256Xcos info:    objectDeleted( 52 , PORT )
257Xcos info:    objectDeleted( 50 , BLOCK )
258Xcos info:    objectDeleted( 54 , PORT )
259Xcos info:    objectDeleted( 53 , BLOCK )
260Xcos info:    objectDeleted( 56 , PORT )
261Xcos info:    objectDeleted( 57 , PORT )
262Xcos info:    objectDeleted( 58 , PORT )
263Xcos info:    objectDeleted( 55 , BLOCK )
264Xcos info:    objectCreated( 89 , LINK )
265Xcos info:    objectCreated( 90 , LINK )
266Xcos info:    objectCreated( 91 , DIAGRAM )
267assert_checkequal(scs_m.objs(1).graphics.pout, 4);
268assert_checkequal(scs_m.objs(2).graphics.pin, 4);
269assert_checkequal(scs_m.objs(2).graphics.pein, 5);
270assert_checkequal(scs_m.objs(3).graphics.peout, 5);
271assert_checkequal(scs_m.objs(3).model.rpar.objs(1).graphics.pin, []);
272assert_checkequal(scs_m.objs(3).model.rpar.objs(1).graphics.pout, []);
273assert_checkequal(scs_m.objs(3).model.rpar.objs(1).graphics.pein, 5);
274assert_checkequal(scs_m.objs(3).model.rpar.objs(1).graphics.peout, []);
275assert_checkequal(scs_m.objs(3).model.rpar.objs(4).graphics.pin, []);
276assert_checkequal(scs_m.objs(3).model.rpar.objs(4).graphics.pout, []);
277assert_checkequal(scs_m.objs(3).model.rpar.objs(4).graphics.pein, 3);
278assert_checkequal(scs_m.objs(3).model.rpar.objs(4).graphics.peout, [5;6]);
279assert_checkequal(scs_m.objs(3).model.rpar.objs(2).graphics.pin, []);
280assert_checkequal(scs_m.objs(3).model.rpar.objs(2).graphics.pout, []);
281assert_checkequal(scs_m.objs(3).model.rpar.objs(2).graphics.pein, 6);
282assert_checkequal(scs_m.objs(3).model.rpar.objs(2).graphics.peout, 3);
283needcompile = 4;
284[scs_m, %cpr, needcompile, ok] = do_eval(scs_m, list(),struct());
285Xcos info:    objectCreated( 92 , BLOCK )
286Xcos info:    objectCloned( 45 , 92 , BLOCK )
287Xcos info:    objectCreated( 93 , PORT )
288Xcos info:    objectCloned( 46 , 93 , PORT )
289Xcos info:    objectCreated( 94 , BLOCK )
290Xcos info:    objectCloned( 77 , 94 , BLOCK )
291Xcos info:    objectCreated( 95 , PORT )
292Xcos info:    objectCloned( 78 , 95 , PORT )
293Xcos info:    objectCreated( 96 , BLOCK )
294Xcos info:    objectCloned( 79 , 96 , BLOCK )
295Xcos info:    objectCreated( 97 , PORT )
296Xcos info:    objectCloned( 80 , 97 , PORT )
297Xcos info:    objectCreated( 98 , PORT )
298Xcos info:    objectCloned( 81 , 98 , PORT )
299Xcos info:    objectCreated( 99 , BLOCK )
300Xcos info:    objectCloned( 75 , 99 , BLOCK )
301Xcos info:    objectCreated( 100 , PORT )
302Xcos info:    objectCloned( 76 , 100 , PORT )
303Xcos info:    objectCreated( 101 , BLOCK )
304Xcos info:    objectCloned( 77 , 101 , BLOCK )
305Xcos info:    objectCreated( 102 , PORT )
306Xcos info:    objectCloned( 78 , 102 , PORT )
307Xcos info:    objectCreated( 103 , BLOCK )
308Xcos info:    objectCloned( 79 , 103 , BLOCK )
309Xcos info:    objectCreated( 104 , PORT )
310Xcos info:    objectCloned( 80 , 104 , PORT )
311Xcos info:    objectCreated( 105 , PORT )
312Xcos info:    objectCloned( 81 , 105 , PORT )
313Xcos info:    objectCreated( 106 , LINK )
314Xcos info:    objectCloned( 82 , 106 , LINK )
315Xcos info:    objectCreated( 107 , BLOCK )
316Xcos info:    objectCloned( 83 , 107 , BLOCK )
317Xcos info:    objectCreated( 108 , PORT )
318Xcos info:    objectCloned( 84 , 108 , PORT )
319Xcos info:    objectCreated( 109 , PORT )
320Xcos info:    objectCloned( 85 , 109 , PORT )
321Xcos info:    objectCreated( 110 , PORT )
322Xcos info:    objectCloned( 86 , 110 , PORT )
323Xcos info:    objectCreated( 111 , LINK )
324Xcos info:    objectCloned( 87 , 111 , LINK )
325Xcos info:    objectCreated( 112 , LINK )
326Xcos info:    objectCloned( 88 , 112 , LINK )
327Xcos info:    objectCreated( 113 , LINK )
328Xcos info:    objectCloned( 82 , 113 , LINK )
329Xcos info:    objectCreated( 114 , BLOCK )
330Xcos info:    objectCloned( 83 , 114 , BLOCK )
331Xcos info:    objectCreated( 115 , PORT )
332Xcos info:    objectCloned( 84 , 115 , PORT )
333Xcos info:    objectCreated( 116 , PORT )
334Xcos info:    objectCloned( 85 , 116 , PORT )
335Xcos info:    objectCreated( 117 , PORT )
336Xcos info:    objectCloned( 86 , 117 , PORT )
337Xcos info:    objectCreated( 118 , LINK )
338Xcos info:    objectCloned( 87 , 118 , LINK )
339Xcos info:    objectCreated( 119 , LINK )
340Xcos info:    objectCloned( 88 , 119 , LINK )
341Xcos info:    objectDeleted( 102 , PORT )
342Xcos info:    objectDeleted( 101 , BLOCK )
343Xcos info:    objectDeleted( 104 , PORT )
344Xcos info:    objectDeleted( 105 , PORT )
345Xcos info:    objectDeleted( 103 , BLOCK )
346Xcos info:    objectDeleted( 106 , LINK )
347Xcos info:    objectDeleted( 108 , PORT )
348Xcos info:    objectDeleted( 109 , PORT )
349Xcos info:    objectDeleted( 110 , PORT )
350Xcos info:    objectDeleted( 107 , BLOCK )
351Xcos info:    objectDeleted( 111 , LINK )
352Xcos info:    objectDeleted( 112 , LINK )
353Xcos info:    objectCreated( 120 , BLOCK )
354Xcos info:    objectCloned( 75 , 120 , BLOCK )
355Xcos info:    objectCreated( 121 , PORT )
356Xcos info:    objectCloned( 76 , 121 , PORT )
357Xcos info:    objectCreated( 122 , BLOCK )
358Xcos info:    objectCloned( 77 , 122 , BLOCK )
359Xcos info:    objectCreated( 123 , PORT )
360Xcos info:    objectCloned( 78 , 123 , PORT )
361Xcos info:    objectCreated( 124 , BLOCK )
362Xcos info:    objectCloned( 79 , 124 , BLOCK )
363Xcos info:    objectCreated( 125 , PORT )
364Xcos info:    objectCloned( 80 , 125 , PORT )
365Xcos info:    objectCreated( 126 , PORT )
366Xcos info:    objectCloned( 81 , 126 , PORT )
367Xcos info:    objectCreated( 127 , LINK )
368Xcos info:    objectCloned( 82 , 127 , LINK )
369Xcos info:    objectCreated( 128 , BLOCK )
370Xcos info:    objectCloned( 83 , 128 , BLOCK )
371Xcos info:    objectCreated( 129 , PORT )
372Xcos info:    objectCloned( 84 , 129 , PORT )
373Xcos info:    objectCreated( 130 , PORT )
374Xcos info:    objectCloned( 85 , 130 , PORT )
375Xcos info:    objectCreated( 131 , PORT )
376Xcos info:    objectCloned( 86 , 131 , PORT )
377Xcos info:    objectCreated( 132 , LINK )
378Xcos info:    objectCloned( 87 , 132 , LINK )
379Xcos info:    objectCreated( 133 , LINK )
380Xcos info:    objectCloned( 88 , 133 , LINK )
381Xcos info:    objectCreated( 134 , BLOCK )
382Xcos info:    objectCloned( 94 , 134 , BLOCK )
383Xcos info:    objectCreated( 135 , PORT )
384Xcos info:    objectCloned( 95 , 135 , PORT )
385Xcos info:    objectCreated( 136 , BLOCK )
386Xcos info:    objectCloned( 96 , 136 , BLOCK )
387Xcos info:    objectCreated( 137 , PORT )
388Xcos info:    objectCloned( 97 , 137 , PORT )
389Xcos info:    objectCreated( 138 , PORT )
390Xcos info:    objectCloned( 98 , 138 , PORT )
391Xcos info:    objectCreated( 139 , LINK )
392Xcos info:    objectCloned( 113 , 139 , LINK )
393Xcos info:    objectCreated( 140 , BLOCK )
394Xcos info:    objectCloned( 114 , 140 , BLOCK )
395Xcos info:    objectCreated( 141 , PORT )
396Xcos info:    objectCloned( 115 , 141 , PORT )
397Xcos info:    objectCreated( 142 , PORT )
398Xcos info:    objectCloned( 116 , 142 , PORT )
399Xcos info:    objectCreated( 143 , PORT )
400Xcos info:    objectCloned( 117 , 143 , PORT )
401Xcos info:    objectCreated( 144 , LINK )
402Xcos info:    objectCloned( 118 , 144 , LINK )
403Xcos info:    objectCreated( 145 , LINK )
404Xcos info:    objectCloned( 119 , 145 , LINK )
405Xcos info:    objectDeleted( 123 , PORT )
406Xcos info:    objectDeleted( 122 , BLOCK )
407Xcos info:    objectDeleted( 125 , PORT )
408Xcos info:    objectDeleted( 126 , PORT )
409Xcos info:    objectDeleted( 124 , BLOCK )
410Xcos info:    objectDeleted( 127 , LINK )
411Xcos info:    objectDeleted( 129 , PORT )
412Xcos info:    objectDeleted( 130 , PORT )
413Xcos info:    objectDeleted( 131 , PORT )
414Xcos info:    objectDeleted( 128 , BLOCK )
415Xcos info:    objectDeleted( 132 , LINK )
416Xcos info:    objectDeleted( 133 , LINK )
417Xcos info:    objectCreated( 146 , DIAGRAM )
418Xcos info:    objectCloned( 91 , 146 , DIAGRAM )
419Xcos info:    objectCreated( 147 , BLOCK )
420Xcos info:    objectCloned( 45 , 147 , BLOCK )
421Xcos info:    objectCreated( 148 , PORT )
422Xcos info:    objectCloned( 46 , 148 , PORT )
423Xcos info:    objectCreated( 149 , BLOCK )
424Xcos info:    objectCloned( 47 , 149 , BLOCK )
425Xcos info:    objectCreated( 150 , PORT )
426Xcos info:    objectCloned( 48 , 150 , PORT )
427Xcos info:    objectCreated( 151 , PORT )
428Xcos info:    objectCloned( 49 , 151 , PORT )
429Xcos info:    objectCreated( 152 , BLOCK )
430Xcos info:    objectCloned( 75 , 152 , BLOCK )
431Xcos info:    objectCreated( 153 , PORT )
432Xcos info:    objectCloned( 76 , 153 , PORT )
433Xcos info:    objectCreated( 154 , BLOCK )
434Xcos info:    objectCloned( 77 , 154 , BLOCK )
435Xcos info:    objectCreated( 155 , PORT )
436Xcos info:    objectCloned( 78 , 155 , PORT )
437Xcos info:    objectCreated( 156 , BLOCK )
438Xcos info:    objectCloned( 79 , 156 , BLOCK )
439Xcos info:    objectCreated( 157 , PORT )
440Xcos info:    objectCloned( 80 , 157 , PORT )
441Xcos info:    objectCreated( 158 , PORT )
442Xcos info:    objectCloned( 81 , 158 , PORT )
443Xcos info:    objectCreated( 159 , LINK )
444Xcos info:    objectCloned( 82 , 159 , LINK )
445Xcos info:    objectCreated( 160 , BLOCK )
446Xcos info:    objectCloned( 83 , 160 , BLOCK )
447Xcos info:    objectCreated( 161 , PORT )
448Xcos info:    objectCloned( 84 , 161 , PORT )
449Xcos info:    objectCreated( 162 , PORT )
450Xcos info:    objectCloned( 85 , 162 , PORT )
451Xcos info:    objectCreated( 163 , PORT )
452Xcos info:    objectCloned( 86 , 163 , PORT )
453Xcos info:    objectCreated( 164 , LINK )
454Xcos info:    objectCloned( 87 , 164 , LINK )
455Xcos info:    objectCreated( 165 , LINK )
456Xcos info:    objectCloned( 88 , 165 , LINK )
457Xcos info:    objectCreated( 166 , LINK )
458Xcos info:    objectCloned( 89 , 166 , LINK )
459Xcos info:    objectCreated( 167 , LINK )
460Xcos info:    objectCloned( 90 , 167 , LINK )
461Xcos info:    objectCreated( 168 , BLOCK )
462Xcos info:    objectCloned( 47 , 168 , BLOCK )
463Xcos info:    objectCreated( 169 , PORT )
464Xcos info:    objectCloned( 48 , 169 , PORT )
465Xcos info:    objectCreated( 170 , PORT )
466Xcos info:    objectCloned( 49 , 170 , PORT )
467Xcos info:    objectCreated( 171 , LINK )
468Xcos info:    objectCloned( 89 , 171 , LINK )
469Xcos info:    objectCreated( 172 , LINK )
470Xcos info:    objectCloned( 90 , 172 , LINK )
471Xcos info:    objectDeleted( 148 , PORT )
472Xcos info:    objectDeleted( 147 , BLOCK )
473Xcos info:    objectDeleted( 150 , PORT )
474Xcos info:    objectDeleted( 151 , PORT )
475Xcos info:    objectDeleted( 149 , BLOCK )
476Xcos info:    objectDeleted( 153 , PORT )
477Xcos info:    objectDeleted( 155 , PORT )
478Xcos info:    objectDeleted( 154 , BLOCK )
479Xcos info:    objectDeleted( 157 , PORT )
480Xcos info:    objectDeleted( 158 , PORT )
481Xcos info:    objectDeleted( 156 , BLOCK )
482Xcos info:    objectDeleted( 159 , LINK )
483Xcos info:    objectDeleted( 161 , PORT )
484Xcos info:    objectDeleted( 162 , PORT )
485Xcos info:    objectDeleted( 163 , PORT )
486Xcos info:    objectDeleted( 160 , BLOCK )
487Xcos info:    objectDeleted( 164 , LINK )
488Xcos info:    objectDeleted( 165 , LINK )
489Xcos info:    objectDeleted( 152 , BLOCK )
490Xcos info:    objectDeleted( 166 , LINK )
491Xcos info:    objectDeleted( 167 , LINK )
492Xcos info:    objectDeleted( 100 , PORT )
493Xcos info:    objectDeleted( 95 , PORT )
494Xcos info:    objectDeleted( 94 , BLOCK )
495Xcos info:    objectDeleted( 97 , PORT )
496Xcos info:    objectDeleted( 98 , PORT )
497Xcos info:    objectDeleted( 96 , BLOCK )
498Xcos info:    objectDeleted( 113 , LINK )
499Xcos info:    objectDeleted( 115 , PORT )
500Xcos info:    objectDeleted( 116 , PORT )
501Xcos info:    objectDeleted( 117 , PORT )
502Xcos info:    objectDeleted( 114 , BLOCK )
503Xcos info:    objectDeleted( 118 , LINK )
504Xcos info:    objectDeleted( 119 , LINK )
505Xcos info:    objectDeleted( 99 , BLOCK )
506Xcos info:    objectDeleted( 46 , PORT )
507Xcos info:    objectDeleted( 45 , BLOCK )
508Xcos info:    objectDeleted( 48 , PORT )
509Xcos info:    objectDeleted( 49 , PORT )
510Xcos info:    objectDeleted( 47 , BLOCK )
511Xcos info:    objectDeleted( 76 , PORT )
512Xcos info:    objectDeleted( 78 , PORT )
513Xcos info:    objectDeleted( 77 , BLOCK )
514Xcos info:    objectDeleted( 80 , PORT )
515Xcos info:    objectDeleted( 81 , PORT )
516Xcos info:    objectDeleted( 79 , BLOCK )
517Xcos info:    objectDeleted( 82 , LINK )
518Xcos info:    objectDeleted( 84 , PORT )
519Xcos info:    objectDeleted( 85 , PORT )
520Xcos info:    objectDeleted( 86 , PORT )
521Xcos info:    objectDeleted( 83 , BLOCK )
522Xcos info:    objectDeleted( 87 , LINK )
523Xcos info:    objectDeleted( 88 , LINK )
524Xcos info:    objectDeleted( 75 , BLOCK )
525Xcos info:    objectDeleted( 89 , LINK )
526Xcos info:    objectDeleted( 90 , LINK )
527Xcos info:    objectDeleted( 91 , DIAGRAM )
528assert_checkequal(scs_m.objs(1).graphics.pout, 4);
529assert_checkequal(scs_m.objs(2).graphics.pin, 4);
530assert_checkequal(scs_m.objs(2).graphics.pein, 5);
531assert_checkequal(scs_m.objs(3).graphics.peout, 5);
532assert_checkequal(scs_m.objs(3).model.rpar.objs(1).graphics.pin, []);
533assert_checkequal(scs_m.objs(3).model.rpar.objs(1).graphics.pout, []);
534assert_checkequal(scs_m.objs(3).model.rpar.objs(1).graphics.pein, 5);
535assert_checkequal(scs_m.objs(3).model.rpar.objs(1).graphics.peout, []);
536assert_checkequal(scs_m.objs(3).model.rpar.objs(4).graphics.pin, []);
537assert_checkequal(scs_m.objs(3).model.rpar.objs(4).graphics.pout, []);
538assert_checkequal(scs_m.objs(3).model.rpar.objs(4).graphics.pein, 3);
539assert_checkequal(scs_m.objs(3).model.rpar.objs(4).graphics.peout, [5;6]);
540assert_checkequal(scs_m.objs(3).model.rpar.objs(2).graphics.pin, []);
541assert_checkequal(scs_m.objs(3).model.rpar.objs(2).graphics.pout, []);
542assert_checkequal(scs_m.objs(3).model.rpar.objs(2).graphics.pein, 6);
543assert_checkequal(scs_m.objs(3).model.rpar.objs(2).graphics.peout, 3);
544clear scs_m
545Xcos info:    objectDeleted( 93 , PORT )
546Xcos info:    objectDeleted( 92 , BLOCK )
547Xcos info:    objectDeleted( 169 , PORT )
548Xcos info:    objectDeleted( 170 , PORT )
549Xcos info:    objectDeleted( 168 , BLOCK )
550Xcos info:    objectDeleted( 121 , PORT )
551Xcos info:    objectDeleted( 135 , PORT )
552Xcos info:    objectDeleted( 134 , BLOCK )
553Xcos info:    objectDeleted( 137 , PORT )
554Xcos info:    objectDeleted( 138 , PORT )
555Xcos info:    objectDeleted( 136 , BLOCK )
556Xcos info:    objectDeleted( 139 , LINK )
557Xcos info:    objectDeleted( 141 , PORT )
558Xcos info:    objectDeleted( 142 , PORT )
559Xcos info:    objectDeleted( 143 , PORT )
560Xcos info:    objectDeleted( 140 , BLOCK )
561Xcos info:    objectDeleted( 144 , LINK )
562Xcos info:    objectDeleted( 145 , LINK )
563Xcos info:    objectDeleted( 120 , BLOCK )
564Xcos info:    objectDeleted( 171 , LINK )
565Xcos info:    objectDeleted( 172 , LINK )
566Xcos info:    objectDeleted( 146 , DIAGRAM )
567