1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) DIGITEO - 2010-2010 - Clément DAVID <clement.david@scilab.org>
3//
4// This file is distributed under the same license as the Scilab package.
5
6// <-- XCOS TEST -->
7//
8// <-- Short Description -->
9// Check that all computational function are available.
10
11//
12// load the source file list for languages
13//
14
15ilib_verbose(0);
16
17BLOCKS_C = [
18"absblk",
19"absolute_value",
20"acos_blk",
21"acosh_blk",
22"affich2",
23"andlog",
24"asin_blk",
25"asinh_blk",
26"assignment",
27"atan_blk",
28"atanh_blk",
29"automat",
30"backlash",
31"bidon",
32"bit_clear_16",
33"bit_clear_32",
34"bit_clear_8",
35"bit_set_16",
36"bit_set_32",
37"bit_set_8",
38"bounce_ball",
39"bouncexy",
40"canimxy",
41"canimxy3d",
42"cdummy",
43"cevscpe",
44"cfscope",
45"cmat3d",
46"cmatview",
47"cmscope",
48"constraint_c",
49"convert",
50"cosblk",
51"cos_blk",
52"cosh_blk",
53"counter",
54"cscope",
55"cscopxy",
56"cscopxy3d",
57"csslti4",
58"cstblk4",
59"cstblk4_m",
60"cumsum_c",
61"cumsum_m",
62"cumsum_r",
63"cumsumz_c",
64"cumsumz_m",
65"cumsumz_r",
66"curve_c",
67"dband",
68"deadband",
69"delay4",
70"delay4_i16",
71"delay4_i32",
72"delay4_i8",
73"delay4_ui16",
74"delay4_ui32",
75"delay4_ui8",
76"deriv",
77"diffblk_c",
78"dmmul",
79"dmmul1",
80"dollar4",
81"dollar4_m",
82"dsslti4",
83"edgetrig",
84"evaluate_expr",
85"evtdly4",
86"evtvardly",
87"expblk_m",
88"extdiag",
89"extdiagz",
90"extract",
91"extract_bit_16_LH",
92"extract_bit_16_LSB",
93"extract_bit_16_MSB0",
94"extract_bit_16_MSB1",
95"extract_bit_16_RB0",
96"extract_bit_16_RB1",
97"extract_bit_16_UH0",
98"extract_bit_16_UH1",
99"extract_bit_32_LH",
100"extract_bit_32_LSB",
101"extract_bit_32_MSB0",
102"extract_bit_32_MSB1",
103"extract_bit_32_RB0",
104"extract_bit_32_RB1",
105"extract_bit_32_UH0",
106"extract_bit_32_UH1",
107"extract_bit_8_LH",
108"extract_bit_8_LSB",
109"extract_bit_8_MSB0",
110"extract_bit_8_MSB1",
111"extract_bit_8_RB0",
112"extract_bit_8_RB1",
113"extract_bit_8_UH0",
114"extract_bit_8_UH1",
115"extract_bit_u16_MSB1",
116"extract_bit_u16_RB1",
117"extract_bit_u16_UH1",
118"extract_bit_u32_MSB1",
119"extract_bit_u32_RB1",
120"extract_bit_u32_UH1",
121"extract_bit_u8_MSB1",
122"extract_bit_u8_RB1",
123"extract_bit_u8_UH1",
124"extractor",
125"extractz",
126"exttril",
127"exttrilz",
128"exttriu",
129"exttriuz",
130"foriterator",
131"fromws_c",
132"gain",
133"gainblk",
134"gainblk_i16e",
135"gainblk_i16n",
136"gainblk_i16s",
137"gainblk_i32e",
138"gainblk_i32n",
139"gainblk_i32s",
140"gainblk_i8e",
141"gainblk_i8n",
142"gainblk_i8s",
143"gainblk_ui16e",
144"gainblk_ui16n",
145"gainblk_ui16s",
146"gainblk_ui32e",
147"gainblk_ui32n",
148"gainblk_ui32s",
149"gainblk_ui8e",
150"gainblk_ui8n",
151"gainblk_ui8s",
152"hystheresis",
153"integral_func",
154"integralz_func",
155"invblk4",
156"logic",
157"logicalop",
158"logicalop_i16",
159"logicalop_i32",
160"logicalop_i8",
161"logicalop_m",
162"logicalop_ui16",
163"logicalop_ui32",
164"logicalop_ui8",
165"lookup2d",
166"lookup_c",
167"mat_bksl",
168"matbyscal",
169"matbyscal_e",
170"matbyscal_s",
171"mat_cath",
172"mat_catv",
173"mat_det",
174"mat_diag",
175"mat_div",
176"mat_expm",
177"mathermit_m",
178"mat_inv",
179"mat_lu",
180"matmul2_e",
181"matmul2_m",
182"matmul2_s",
183"matmul_i16e",
184"matmul_i16n",
185"matmul_i16s",
186"matmul_i32e",
187"matmul_i32n",
188"matmul_i32s",
189"matmul_i8e",
190"matmul_i8n",
191"matmul_i8s",
192"matmul_m",
193"matmul_ui16e",
194"matmul_ui16n",
195"matmul_ui16s",
196"matmul_ui32e",
197"matmul_ui32n",
198"matmul_ui32s",
199"matmul_ui8e",
200"matmul_ui8n",
201"matmul_ui8s",
202"mat_pinv",
203"mat_reshape",
204"mat_sing",
205"mat_sqrt",
206"mat_sum",
207"mat_sumc",
208"mat_suml",
209"mat_svd",
210"mattran_m",
211"mat_vps",
212"mat_vpv",
213"matz_abs",
214"matz_absc",
215"matz_bksl",
216"matz_cath",
217"matz_catv",
218"matz_conj",
219"matz_det",
220"matz_diag",
221"matz_div",
222"matz_expm",
223"matz_inv",
224"matz_lu",
225"matzmul2_m",
226"matzmul_m",
227"matz_pinv",
228"matz_reim",
229"matz_reimc",
230"matz_reshape",
231"matz_sing",
232"matz_sqrt",
233"matz_sum",
234"matz_sumc",
235"matz_suml",
236"matz_svd",
237"matztran_m",
238"matz_vps",
239"matz_vpv",
240"m_frequ",
241"minmax",
242"modulo_count",
243"mswitch",
244"multiplex",
245"plusblk",
246"prod",
247"product",
248"ramp",
249"ratelimiter",
250"readau",
251"readc",
252"relationalop",
253"relational_op",
254"relational_op_i16",
255"relational_op_i32",
256"relational_op_i8",
257"relational_op_ui16",
258"relational_op_ui32",
259"relational_op_ui8",
260"relay",
261"ricc_m",
262"rndblk_m",
263"rndblkz_m",
264"root_coef",
265"rootz_coef",
266"samphold4",
267"samphold4_m",
268"satur",
269"scalar2vector",
270"scicosexit",
271"selector",
272"selector_m",
273"shift_16_LA",
274"shift_16_LC",
275"shift_16_RA",
276"shift_16_RC",
277"shift_32_LA",
278"shift_32_LC",
279"shift_32_RA",
280"shift_32_RC",
281"shift_8_LA",
282"shift_8_LC",
283"shift_8_RA",
284"shift_8_RC",
285"shift_u16_RA",
286"shift_u32_RA",
287"shift_u8_RA",
288"signum",
289"sin_blk",
290"sinh_blk",
291"step_func",
292"submat",
293"submatz",
294"sum",
295"summation",
296"summation_i16e",
297"summation_i16n",
298"summation_i16s",
299"summation_i32e",
300"summation_i32n",
301"summation_i32s",
302"summation_i8e",
303"summation_i8n",
304"summation_i8s",
305"summation_ui16e",
306"summation_ui16n",
307"summation_ui16s",
308"summation_ui32e",
309"summation_ui32n",
310"summation_ui32s",
311"summation_ui8e",
312"summation_ui8n",
313"summation_ui8s",
314"summation_z",
315"switch2",
316"switch2_m",
317"switchn",
318"tablex2d_c",
319"tan_blk",
320"tanh_blk",
321"tcslti4",
322"tcsltj4",
323"time_delay",
324"tows_c",
325"variable_delay",
326"whileiterator",
327"writeau",
328"writec",
329"zcross2",
330];
331
332BLOCKS_FORTRAN = [
333"csslti",
334"cstblk",
335"delay",
336"delayv",
337"demux",
338"diffblk",
339"dlradp",
340"dollar",
341"dsslti",
342"eselect",
343"evtdly",
344"expblk",
345"forblk",
346"fsv",
347"gensin",
348"gensqr",
349"hltblk",
350"ifthel",
351"integr",
352"intplt",
353"intpol",
354"intrp2",
355"intrpl",
356"invblk",
357"iocopy",
358"logblk",
359"lookup",
360"lsplit",
361"lusat",
362"maxblk",
363"memo",
364"mfclck",
365"minblk",
366"mux",
367"pload",
368"powblk",
369"qzcel",
370"qzflr",
371"qzrnd",
372"qztrn",
373"readf",
374"rndblk",
375"samphold",
376"sawtth",
377"sciblk",
378"selblk",
379"sinblk",
380"sqrblk",
381"sum2",
382"sum3",
383"tanblk",
384"tcslti",
385"tcsltj",
386"timblk",
387"trash",
388"writef",
389"zcross",
390];
391
392BLOCKS_CPP = [
393"affich2",
394];
395
396//
397// load the scicos libs
398//
399
400//
401// Link them
402//
403
404// binary case or source case
405if getos() <> "Windows" then
406    LIB = SCI + "/../../lib/scilab/libsciscicos_blocks" + getdynlibext();
407    if ~isfile(LIB) then
408        LIB = SCI + "/modules/scicos_blocks/.libs/libsciscicos_blocks" + getdynlibext();
409        if ~isfile(LIB) then pause, end
410    end
411    if execstr("link(LIB, BLOCKS_C, ""c"");", "errcatch") <> 0 then pause, end
412    if execstr("link(LIB, BLOCKS_FORTRAN, ""f"");", "errcatch") <> 0 then pause, end
413    if execstr("link(LIB, BLOCKS_CPP, ""c"");", "errcatch") <> 0 then pause, end
414
415else
416    LIBCCPP = SCI + "/bin/scicos_blocks" + getdynlibext();
417    LIBFOR = SCI + "/bin/scicos_blocks_f" + getdynlibext();
418    if ~isfile(LIBCCPP) then pause, end
419    if ~isfile(LIBFOR) then pause, end
420
421    if execstr("link(LIBCCPP, BLOCKS_C, ""c"");", "errcatch") <> 0 then pause, end
422    if execstr("link(LIBCCPP, BLOCKS_CPP, ""c"");", "errcatch") <> 0 then pause, end
423    if execstr("link(LIBFOR, BLOCKS_FORTRAN, ""f"");", "errcatch") <> 0 then pause, end
424end
425
426ulink();
427