Xcos: proper detection and handling of IFTHEL_f and ESELECT_f blocks 68/16468/4
authorPaul Bignier <paul.bignier@scilab-enterprises.com>
Tue, 12 May 2015 10:40:52 +0000 (12:40 +0200)
committerClément DAVID <clement.david@scilab-enterprises.com>
Tue, 19 May 2015 12:56:10 +0000 (14:56 +0200)
commit33fde2bb121c1b3e877d7eee5d881a96314a8608
tree6d562b4136dbae669453f0bd691766cea3a5d380
parent0072b06d0666616ce57bdc8ccca4241c43d22393
Xcos: proper detection and handling of IFTHEL_f and ESELECT_f blocks

 * These blocks are treated separately from the others because they have negative simulation function numbers (-1 and -2),
meaning their actual simulation function is defined in scicos.c (see synchro_nev())

 * Commit https://codereview.scilab.org/#/c/15883/ removes the possibility of easily detecting these 2 blocks,
so 'funtyp' needs to be altered when a magic value is found

 * Demos "Simple demo" and "Discrete controller" serve as tests for this commit,
because they use a "freq_div" superblock which has an "IFTHEL_f" inside

 * Used magic values for the simulation function numbers to clarify them

Change-Id: I0d7a7c3a48f4ab18e0ac123422635ac2599e3b80
scilab/modules/scicos/sci_gateway/cpp/sci_scicosim.cpp
scilab/modules/scicos/src/c/scicos.c