summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--blocks/BIGSOM_f.svg4
-rw-r--r--blocks/CEVENTSCOPE.svg39
-rw-r--r--blocks/CMSCOPE.svg31
-rw-r--r--blocks/INTEGRAL_m.svg14
-rw-r--r--blocks/LOOKUP_f.svg39
-rw-r--r--blocks/SELF_SWITCH.svg11
-rw-r--r--blocks/SUMMATION.svg4
-rw-r--r--blocks/SWITCH2_m.svg11
-rw-r--r--combined.js1668
-rw-r--r--data_structures_correct/FROM.js29
-rw-r--r--data_structures_correct/GAINBLK_f.js26
-rw-r--r--data_structures_correct/INTRP2BLK_f.js27
-rw-r--r--data_structures_correct/SRFLIPFLOP.js439
-rw-r--r--data_structures_correct/SUM_f.js25
-rw-r--r--data_structures_correct/SampleCLK.js22
-rw-r--r--data_structures_correct/Sigbuilder.js272
-rw-r--r--data_structures_correct/scifunc_block_m.js43
-rw-r--r--dependencies.js4
-rw-r--r--details.js26
-rw-r--r--index.html163
20 files changed, 2606 insertions, 291 deletions
diff --git a/blocks/BIGSOM_f.svg b/blocks/BIGSOM_f.svg
deleted file mode 100644
index f76cc1c..0000000
--- a/blocks/BIGSOM_f.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg width="40" xmlns="http://www.w3.org/2000/svg" version="1.1" height="40">
- <text y="30" x="14" font-size="30" font-family="serif" fill="black">Σ</text>
-</svg>
diff --git a/blocks/CEVENTSCOPE.svg b/blocks/CEVENTSCOPE.svg
deleted file mode 100644
index a489ba7..0000000
--- a/blocks/CEVENTSCOPE.svg
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg id="svg11300" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="44.822" width="41.062" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/">
- <metadata id="metadata39">
- <rdf:RDF>
- <cc:Work rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <title id="title3289">base scilan</title>
- <defs id="defs3">
- <radialGradient id="radialGradient20899" gradientUnits="userSpaceOnUse" cy="32.267" cx="23.994" gradientTransform="matrix(2.2986117,0,0,1.8027614,-75.446386,-24.554065)" r="19.089">
- <stop id="stop2224" stop-color="#5187d6" offset="0"/>
- <stop id="stop2227" stop-color="#1e4580" offset="1"/>
- </radialGradient>
- <linearGradient id="linearGradient2854" y2="24.238" gradientUnits="userSpaceOnUse" x2="12.499" gradientTransform="matrix(0,-5.2061514,2.5688251,0,-79.265723,164.6207)" y1="12.538" x1="8.8208">
- <stop id="stop2182" stop-color="#FFF" offset="0"/>
- <stop id="stop2184" stop-color="#FFF" stop-opacity="0" offset="1"/>
- </linearGradient>
- </defs>
- <g id="layer1" transform="translate(-2.8842799e-7,-3.1783548)">
- <g id="layer1-0" transform="matrix(0,0.68137179,-0.68137179,0,39.302853,7.826163)">
- <g id="g9544" transform="translate(-2.0023665,2.2530854)">
- <g id="g9570" transform="translate(0.34662852,-1.7289484)">
- <g id="g28489" transform="translate(2.3098495,0.12996954)">
- <g id="g20882" transform="translate(51.47752,-82.884097)">
- <rect id="rect1314" stroke-linejoin="round" style="stroke-dasharray:none;" transform="matrix(0,-0.99999997,0.99999997,0,-49.042742,89.574337)" fill-rule="evenodd" stroke-dashoffset="0" rx="2.2025" ry="2.2025" height="37.631" width="48.319" stroke="#173562" stroke-linecap="round" stroke-miterlimit="4" y="2.4454" x="-44.453" stroke-width="1.4676" fill="url(#radialGradient20899)"/>
- <path id="path28138" stroke-linejoin="round" d="M8.6382,35.758c27.557-0.173,27.904-0.173,27.904-0.173l0.17331-33.97" transform="translate(-49.042742,89.574337)" stroke="#000" stroke-linecap="round" stroke-width="1.46762753px" fill="none"/>
- <path id="rect2178" opacity="0.43181817" d="m-45.868,133.4,12.954,0c1.0099-5.0153,1.5849-10.576,1.5849-16.442,0-12.211-2.4433-23.147-6.2788-30.45h-8.2599v46.892z" fill-rule="evenodd" fill="url(#linearGradient2854)"/>
- </g>
- </g>
- </g>
- </g>
- </g>
- </g>
- <path id="path2188" stroke-linejoin="round" style="stroke-dasharray:none;" d="m13.665,29.974,4.7566-10.919,5.7799,10.589,6.8184-5.8677,0.06242-4.1123-6.3304,5.6237-6.5406-11.928-6.0101,14.643,1.4637,1.9713z" fill-rule="evenodd" stroke="#8ae234" stroke-linecap="round" stroke-miterlimit="10" stroke-width="0.91817689" fill="#73d216"/>
-</svg>
diff --git a/blocks/CMSCOPE.svg b/blocks/CMSCOPE.svg
deleted file mode 100644
index bd06723..0000000
--- a/blocks/CMSCOPE.svg
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg id="svg11300" xmlns="http://www.w3.org/2000/svg" height="44.822" width="41.062" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink">
- <title id="title3289">base scilan</title>
- <defs id="defs3">
- <radialGradient id="radialGradient20899" gradientUnits="userSpaceOnUse" cy="32.267" cx="23.994" gradientTransform="matrix(2.2986117,0,0,1.8027614,-75.446386,-24.554065)" r="19.089">
- <stop id="stop2224" stop-color="#5187d6" offset="0"/>
- <stop id="stop2227" stop-color="#1e4580" offset="1"/>
- </radialGradient>
- <linearGradient id="linearGradient2854" y2="24.238" gradientUnits="userSpaceOnUse" x2="12.499" gradientTransform="matrix(0,-5.2061514,2.5688251,0,-79.265723,164.6207)" y1="12.538" x1="8.8208">
- <stop id="stop2182" stop-color="#FFF" offset="0"/>
- <stop id="stop2184" stop-color="#FFF" stop-opacity="0" offset="1"/>
- </linearGradient>
- </defs>
- <g id="layer1" transform="translate(-2.8842799e-7,-3.1783548)">
- <g id="layer1-0" transform="matrix(0,0.68137179,-0.68137179,0,39.302853,7.826163)">
- <g id="g9544" transform="translate(-2.0023665,2.2530854)">
- <g id="g9570" transform="translate(0.34662852,-1.7289484)">
- <g id="g28489" transform="translate(2.3098495,0.12996954)">
- <g id="g20882" transform="translate(51.47752,-82.884097)">
- <rect id="rect1314" stroke-linejoin="round" style="stroke-dasharray:none;" transform="matrix(0,-0.99999997,0.99999997,0,-49.042742,89.574337)" fill-rule="evenodd" stroke-dashoffset="0" rx="2.2025" ry="2.2025" height="37.631" width="48.319" stroke="#173562" stroke-linecap="round" stroke-miterlimit="4" y="2.4454" x="-44.453" stroke-width="1.4676" fill="url(#radialGradient20899)"/>
- <path id="path28138" stroke-linejoin="round" d="M8.6382,35.758c27.557-0.173,27.904-0.173,27.904-0.173l0.17331-33.97" transform="translate(-49.042742,89.574337)" stroke="#000" stroke-linecap="round" stroke-width="1.46762753px" fill="none"/>
- <path id="rect2178" opacity="0.43181817" d="m-45.868,133.4,12.954,0c1.0099-5.0153,1.5849-10.576,1.5849-16.442,0-12.211-2.4433-23.147-6.2788-30.45h-8.2599v46.892z" fill-rule="evenodd" fill="url(#linearGradient2854)"/>
- <path id="path18808" stroke-linejoin="round" style="stroke-dasharray:none;" d="m-27.782,121.73-0.57149-0.2893-0.56662-0.28848-0.55952-0.28909-0.55222-0.2893-1.0738-0.57777-0.51996-0.2893-0.50637-0.28828-0.49217-0.28929-0.47533-0.28849-0.4597-0.28929-0.44064-0.2893-0.42156-0.28909-0.40027-0.28848-0.37957-0.2893-0.35726-0.28929-0.33372-0.28848-0.30979-0.2893-0.28524-0.28828-0.25927-0.28929-0.2329-0.2893-0.20612-0.28848-0.17913-0.2893-0.15053-0.28909-0.12274-0.28848-0.09433-0.28929-0.06513-0.2893-0.03713-0.28848-0.0071-0.2893,0.0213-0.28909,0.05072-0.28848,0.07932-0.2893,0.10772-0.28929,0.13633-0.28848,0.16473-0.2891,0.19192-0.28929,0.2195-0.28849,0.24568-0.28929,0.27185-0.28929,0.29619-0.28849,0.32175-0.28909,0.34569-0.28929,0.36761-0.28849,0.39073-0.28929,0.41041-0.28909,0.4311-0.28849,0.44936-0.2893,0.46762-0.28929,0.48344-0.28848,0.49927-0.2893,0.51267-0.28828,0.52623-0.28929,0.5372-0.2893,0.54674-0.28929,0.55566-0.28849,0.56338-0.28909,0.56905-0.28848,0.57291-0.28929,0.57616-0.2893,0.57758-0.28848,0.57778-0.2893,0.57696-0.28909,0.57291-0.28848,0.56905-0.2893,0.56337-0.28929,0.55628-0.28849,0.54775-0.2891,0.53721-0.28929,0.52625-0.28848,0.51347-0.2893,0.49927-0.28929,0.48486-0.28849,0.46762-0.28909,0.45017-0.28929,0.43191-0.28849,0.41122-0.28929,0.39073-0.2893,0.36923-0.28827,0.34549-0.2893,0.32257-0.28848,0.29802-0.2893,0.27266-0.28929,0.24649-0.28909,0.22032-0.28849,0.19334-0.28929,0.16473-0.2893,0.13795-0.28848,0.10854-0.28909,0.08075-0.28849,0.05152-0.28929,0.02229-0.28929-0.0065-0.2893-0.03551-0.28849-0.06431-0.28908-0.09352-0.28849-0.12111-0.2893-0.15073-0.28929" stroke="#ef2929" stroke-linecap="round" stroke-miterlimit="4" stroke-width="2.93525505" fill="none"/>
- </g>
- </g>
- </g>
- </g>
- </g>
- </g>
-</svg>
diff --git a/blocks/INTEGRAL_m.svg b/blocks/INTEGRAL_m.svg
deleted file mode 100644
index 6d5a898..0000000
--- a/blocks/INTEGRAL_m.svg
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg id="svg2" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="385" width="240" version="1.0" xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/">
- <metadata id="metadata7">
- <rdf:RDF>
- <cc:Work rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs id="defs5"></defs>
- <path id="path1873" d="M137,156.68c2-28,9.75-78.68,10.25-82.43s3.5-19.75,13.25-31.75,25.75-16.25,25.75-16.25c0.25,0-4,0.75-4,11.5s12.75,18.25,20.75,18.25,22-7,22-19-16.5-19-23-19-17,0-26,3.5-29.38,16.5-37.88,33.5-13.12,37-17.62,67-9.5,77.37-11.5,105.37-11.25,80.5-11.75,84.25-3.5,19.75-13.25,31.75-25.75,16.25-25.75,16.25c-0.25,0,4-0.75,4-11.5s-12.75-18.25-20.75-18.25-22,7-22,19,16.5,19,23,19,17,0,26-3.5,29.375-16.5,37.88-33.5c8.5-17,13.12-37,17.62-67,2.02-13.5,11-85.19,13-107.19z" fill-rule="evenodd" fill="#000"/>
-</svg>
diff --git a/blocks/LOOKUP_f.svg b/blocks/LOOKUP_f.svg
deleted file mode 100644
index a489ba7..0000000
--- a/blocks/LOOKUP_f.svg
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg id="svg11300" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="44.822" width="41.062" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/">
- <metadata id="metadata39">
- <rdf:RDF>
- <cc:Work rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <title id="title3289">base scilan</title>
- <defs id="defs3">
- <radialGradient id="radialGradient20899" gradientUnits="userSpaceOnUse" cy="32.267" cx="23.994" gradientTransform="matrix(2.2986117,0,0,1.8027614,-75.446386,-24.554065)" r="19.089">
- <stop id="stop2224" stop-color="#5187d6" offset="0"/>
- <stop id="stop2227" stop-color="#1e4580" offset="1"/>
- </radialGradient>
- <linearGradient id="linearGradient2854" y2="24.238" gradientUnits="userSpaceOnUse" x2="12.499" gradientTransform="matrix(0,-5.2061514,2.5688251,0,-79.265723,164.6207)" y1="12.538" x1="8.8208">
- <stop id="stop2182" stop-color="#FFF" offset="0"/>
- <stop id="stop2184" stop-color="#FFF" stop-opacity="0" offset="1"/>
- </linearGradient>
- </defs>
- <g id="layer1" transform="translate(-2.8842799e-7,-3.1783548)">
- <g id="layer1-0" transform="matrix(0,0.68137179,-0.68137179,0,39.302853,7.826163)">
- <g id="g9544" transform="translate(-2.0023665,2.2530854)">
- <g id="g9570" transform="translate(0.34662852,-1.7289484)">
- <g id="g28489" transform="translate(2.3098495,0.12996954)">
- <g id="g20882" transform="translate(51.47752,-82.884097)">
- <rect id="rect1314" stroke-linejoin="round" style="stroke-dasharray:none;" transform="matrix(0,-0.99999997,0.99999997,0,-49.042742,89.574337)" fill-rule="evenodd" stroke-dashoffset="0" rx="2.2025" ry="2.2025" height="37.631" width="48.319" stroke="#173562" stroke-linecap="round" stroke-miterlimit="4" y="2.4454" x="-44.453" stroke-width="1.4676" fill="url(#radialGradient20899)"/>
- <path id="path28138" stroke-linejoin="round" d="M8.6382,35.758c27.557-0.173,27.904-0.173,27.904-0.173l0.17331-33.97" transform="translate(-49.042742,89.574337)" stroke="#000" stroke-linecap="round" stroke-width="1.46762753px" fill="none"/>
- <path id="rect2178" opacity="0.43181817" d="m-45.868,133.4,12.954,0c1.0099-5.0153,1.5849-10.576,1.5849-16.442,0-12.211-2.4433-23.147-6.2788-30.45h-8.2599v46.892z" fill-rule="evenodd" fill="url(#linearGradient2854)"/>
- </g>
- </g>
- </g>
- </g>
- </g>
- </g>
- <path id="path2188" stroke-linejoin="round" style="stroke-dasharray:none;" d="m13.665,29.974,4.7566-10.919,5.7799,10.589,6.8184-5.8677,0.06242-4.1123-6.3304,5.6237-6.5406-11.928-6.0101,14.643,1.4637,1.9713z" fill-rule="evenodd" stroke="#8ae234" stroke-linecap="round" stroke-miterlimit="10" stroke-width="0.91817689" fill="#73d216"/>
-</svg>
diff --git a/blocks/SELF_SWITCH.svg b/blocks/SELF_SWITCH.svg
deleted file mode 100644
index 0344da7..0000000
--- a/blocks/SELF_SWITCH.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg width="40" stroke="#000" xmlns="http://www.w3.org/2000/svg" version="1.1" height="40">
- <g id="base" stroke-linejoin="round" stroke-linecap="round" stroke-width="2px" fill="none">
- <path d="M2,30h9l16-10"/>
- <path d="M30,30h8"/>
- </g>
- <g id="command">
- <polygon fill-opacity="0.1" width="1px" points="18,5,22,5,20,10" fill="#000"/>
- <path stroke-width="1px" stroke-dasharray="1,1" d="M20,10v28"/>
- </g>
-</svg>
diff --git a/blocks/SUMMATION.svg b/blocks/SUMMATION.svg
deleted file mode 100644
index f76cc1c..0000000
--- a/blocks/SUMMATION.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg width="40" xmlns="http://www.w3.org/2000/svg" version="1.1" height="40">
- <text y="30" x="14" font-size="30" font-family="serif" fill="black">Σ</text>
-</svg>
diff --git a/blocks/SWITCH2_m.svg b/blocks/SWITCH2_m.svg
deleted file mode 100644
index 0344da7..0000000
--- a/blocks/SWITCH2_m.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg width="40" stroke="#000" xmlns="http://www.w3.org/2000/svg" version="1.1" height="40">
- <g id="base" stroke-linejoin="round" stroke-linecap="round" stroke-width="2px" fill="none">
- <path d="M2,30h9l16-10"/>
- <path d="M30,30h8"/>
- </g>
- <g id="command">
- <polygon fill-opacity="0.1" width="1px" points="18,5,22,5,20,10" fill="#000"/>
- <path stroke-width="1px" stroke-dasharray="1,1" d="M20,10v28"/>
- </g>
-</svg>
diff --git a/combined.js b/combined.js
index 02297e2..4df956e 100644
--- a/combined.js
+++ b/combined.js
@@ -399,53 +399,53 @@ function BIGSOM_f() {
return this.x;
}
}
-function BITCLEAR() {
- BITCLEAR.prototype.define = function BITCLEAR() {
- var model = scicos_model();
- model.sim = list(new ScilabString(["bit_clear_32"]), new ScilabDouble([4]));
- model.in = new ScilabDouble([1]);
- model.in2 = new ScilabDouble([1]);
- model.out = new ScilabDouble([1]);
- model.out2 = new ScilabDouble([1]);
- model.intyp = new ScilabDouble([3]);
- model.outtyp = new ScilabDouble([3]);
- model.opar = list(int32([0]));
- model.blocktype = new ScilabString(["c"]);
- model.dep_ut = new ScilabBoolean([true, false]);
-
- var exprs = new ScilabString([sci2exp(3)], [sci2exp(0)]);
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"BITCLEAR\",sz(1),sz(2));"]);
- this.x = new standard_define(new ScilabDouble([4, 2]), model, exprs, gr_i);
- return new BasicBlock(this.x);
- }
- BITCLEAR.prototype.details = function BITCLEAR() {
- return this.x;
- }
-}
-function BITSET() {
-
- BITSET.prototype.define = function BITSET() {
- var model = scicos_model();
- model.sim = list(new ScilabString(["bit_set_32"]), new ScilabDouble([4]));
- model.in = new ScilabDouble([1]);
- model.in2 = new ScilabDouble([1]);
- model.out = new ScilabDouble([1]);
- model.out2 = new ScilabDouble([1]);
- model.intyp = new ScilabDouble([3]);
- model.outtyp = new ScilabDouble([3]);
- model.opar = list(uint32([0]));
- model.blocktype = new ScilabString(["c"]);
- model.dep_ut = new ScilabBoolean([true, false]);
-
- var exprs = new ScilabString([sci2exp(3)], [sci2exp(0)]);
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"BITSET\",sz(1),sz(2));"]);
- this.x = new standard_define(new ScilabDouble([4, 2]), model, exprs, gr_i);
- return new BasicBlock(this.x);
- }
- BITSET.prototype.details = function BITSET() {
- return this.x;
- }
-}
+function BITCLEAR() {
+ BITCLEAR.prototype.define = function BITCLEAR() {
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["bit_clear_32"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble([1]);
+ model.in2 = new ScilabDouble([1]);
+ model.out = new ScilabDouble([1]);
+ model.out2 = new ScilabDouble([1]);
+ model.intyp = new ScilabDouble([3]);
+ model.outtyp = new ScilabDouble([3]);
+ model.opar = list(int32([0]));
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([sci2exp(3)], [sci2exp(0)]);
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"BITCLEAR\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([4, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ BITCLEAR.prototype.details = function BITCLEAR() {
+ return this.x;
+ }
+}
+function BITSET() {
+
+ BITSET.prototype.define = function BITSET() {
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["bit_set_32"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble([1]);
+ model.in2 = new ScilabDouble([1]);
+ model.out = new ScilabDouble([1]);
+ model.out2 = new ScilabDouble([1]);
+ model.intyp = new ScilabDouble([3]);
+ model.outtyp = new ScilabDouble([3]);
+ model.opar = list(uint32([0]));
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([sci2exp(3)], [sci2exp(0)]);
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"BITSET\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([4, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ BITSET.prototype.details = function BITSET() {
+ return this.x;
+ }
+}
function BOUNCE() {
BOUNCE.prototype.define = function BOUNCE() {
@@ -1745,40 +1745,40 @@ function CVS() {
return this.x;
}
}
-function c_block() {
-
- c_block.prototype.define = function c_block() {
-
- this.in1 = 1;
- this.out = 1;
- this.rpar = [];
- this.typ = "c";
- this.funam = "toto";
-
- var model = scicos_model();
- model.sim = list(new ScilabString([" "]), new ScilabDouble([2001]));
- model.in = new ScilabDouble([this.in1]);
- model.out = new ScilabDouble([this.out]);
- model.evtin = new ScilabDouble();
- model.evtout = new ScilabDouble();
- model.state = new ScilabDouble();
- model.dstate = new ScilabDouble();
- model.rpar = new ScilabDouble();
- model.ipar = new ScilabDouble([0]);
- model.blocktype = new ScilabString([this.typ]);
- model.firing = new ScilabDouble();
- model.dep_ut = new ScilabBoolean([true, false]);
-
- var label = list(new ScilabString([sci2exp(this.in1)], [sci2exp(this.out)], [sci2exp(this.rpar)], [this.funam]), list(new ScilabDouble()));
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"c_block\",sz(1),sz(2));"]);
- this.x = new standard_define(new ScilabDouble([3, 2]), model, label, gr_i);
- return new BasicBlock(this.x);
- }
- c_block.prototype.details = function c_block() {
-
- return this.x;
- }
-}
+function c_block() {
+
+ c_block.prototype.define = function c_block() {
+
+ this.in1 = 1;
+ this.out = 1;
+ this.rpar = [];
+ this.typ = "c";
+ this.funam = "toto";
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString([" "]), new ScilabDouble([2001]));
+ model.in = new ScilabDouble([this.in1]);
+ model.out = new ScilabDouble([this.out]);
+ model.evtin = new ScilabDouble();
+ model.evtout = new ScilabDouble();
+ model.state = new ScilabDouble();
+ model.dstate = new ScilabDouble();
+ model.rpar = new ScilabDouble();
+ model.ipar = new ScilabDouble([0]);
+ model.blocktype = new ScilabString([this.typ]);
+ model.firing = new ScilabDouble();
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var label = list(new ScilabString([sci2exp(this.in1)], [sci2exp(this.out)], [sci2exp(this.rpar)], [this.funam]), list(new ScilabDouble()));
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"c_block\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, label, gr_i);
+ return new BasicBlock(this.x);
+ }
+ c_block.prototype.details = function c_block() {
+
+ return this.x;
+ }
+}
function DEADBAND() {
DEADBAND.prototype.define = function DEADBAND() {
@@ -4152,6 +4152,38 @@ function DLR() {
}
}
+function DLRADAPT_f() {
+
+ DLRADAPT_f.prototype.define = function DLRADAPT_f() {
+ this.p = [[0], [1]];
+ this.rn = [];
+ this.rd = [[math.complex(0.2, 0.8), math.complex(0.2, -0.8)], [math.complex(0.3, 0.7), math.complex(0.3, -0.7)]];
+ this.g = [[1], [1]];
+ this.last_u = [];
+ this.last_y = [[0], [0]];
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["dlradp"]);
+ model.in = new ScilabDouble([1], [1]);
+ model.out = new ScilabDouble([1]);
+ model.evtin = new ScilabDouble([1]);
+ model.dstate = new ScilabDouble(...this.last_y);
+ model.rpar = new ScilabDouble(...this.p, ...real(colon_operator(this.rd)), ...math.im(colon_operator(this.rd)), ...this.g);
+ model.ipar = new ScilabDouble([0], [2], [2]);
+ model.blocktype = new ScilabString(["d"]);
+ model.firing = new ScilabDouble();
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([sci2exp(this.p)], [sci2exp(this.rn)], [sci2exp(this.rd, 0)], [sci2exp(this.g)], [sci2exp(this.last_u)], [sci2exp(this.last_y)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"DLRADAPT_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ DLRADAPT_f.prototype.details = function DLRADAPT_f() {
+ return this.x;
+ }
+}
function DLSS() {
DLSS.prototype.define = function DLSS() {
@@ -6812,6 +6844,51 @@ function MAX_f() {
return this.x;
}
}
+function MBLOCK() {
+
+ MBLOCK.prototype.define = function MBLOCK() {
+ this.in1 = ["u1"];
+ this.intype = ["I"];
+ this.out = [["y1"],["y2"]];
+ this.outtype = [["I"],["E"]];
+ this.param = [["R"],["L"]];
+ this.paramv = list(new ScilabDouble([0.1]), new ScilabDouble([0.0001]));
+ this.pprop = [[0],[0]];
+ this.nameF = "generic";
+
+ var exprs = tlist(["MBLOCK", "in", "intype", "out", "outtype", "param", "paramv", "pprop", "nameF", "funtxt"], new ScilabString(["MBLOCK", "in", "intype", "out", "outtype", "param", "paramv", "pprop", "nameF", "funtxt"]), new ScilabString([sci2exp(this.in1)]), new ScilabString([sci2exp(this.intype)]), new ScilabString([sci2exp(this.out)]), new ScilabString([sci2exp(this.outtype)]), new ScilabString([sci2exp(this.param)]), list(new ScilabString([0.1]), new ScilabString([0.0001])), new ScilabString([sci2exp(this.pprop)]), new ScilabString([this.nameF]), new ScilabDouble());
+
+ var model = scicos_model();
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([false, true]);
+ model.rpar = [];
+
+ for (var i = 0; i < this.paramv.length; i++) {
+ model.rpar.push(getData(this.paramv[i]));
+ }
+
+ model.rpar = new ScilabDouble(...model.rpar);
+ var mo = modelica();
+ mo.model = new ScilabString([this.nameF]);
+ mo.parameters = list(new ScilabString(...this.param), this.paramv);
+ model.sim = list(mo.model, new ScilabDouble([30004]));
+ mo.inputs = new ScilabString(this.in1);
+ mo.outputs = new ScilabString(...this.out);
+ model.in = new ScilabDouble(...ones(size(getData(mo.inputs), "r"), 1));
+ model.out = new ScilabDouble(...ones(size(getData(mo.outputs), "r"), 1));
+ model.equations = mo;
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MBLOCK\",sz(1),sz(2));"]);
+
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, exprs, gr_i);
+ this.x.graphics.in_implicit = new ScilabString(this.intype);
+ this.x.graphics.out_implicit = new ScilabString(...this.outtype);
+ return new BasicBlock(this.x);
+ }
+
+ MBLOCK.prototype.details = function MBLOCK() {
+ return this.x;
+ }
+}
function MCLOCK_f() {
MCLOCK_f.prototype.define = function MCLOCK_f() {
@@ -8314,6 +8391,126 @@ function PuitsP() {
}
}
+function QUANT_f() {
+
+ QUANT_f.prototype.define = function QUANT_f() {
+ this.pas = 0.1;
+ this.meth = 1;
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["qzrnd"]);
+ model.in = new ScilabDouble([-1]);
+ model.out = new ScilabDouble([-1]);
+ model.rpar = new ScilabDouble([this.pas]);
+ model.ipar = new ScilabDouble([this.meth]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([this.pas], [this.meth]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"QUANT_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ QUANT_f.prototype.details = function QUANT_f() {
+ return this.x;
+ }
+}
+
+function RAMP() {
+
+ RAMP.prototype.define = function RAMP() {
+ this.slope = 0;
+ this.iout = 0;
+ this.stt = 0;
+ this.rpar = [[this.slope], [this.stt], [this.iout]];
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["ramp"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble();
+ model.out = new ScilabDouble([1]);
+ model.rpar = new ScilabDouble(...this.rpar);
+ model.blocktype = new ScilabString(["c"]);
+ model.nmode = new ScilabDouble([1]);
+ model.nzcross = new ScilabDouble([1]);
+ model.dep_ut = new ScilabBoolean([false, true]);
+
+ var exprs = new ScilabString(...this.rpar);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"RAMP\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ RAMP.prototype.details = function RAMP() {
+ return this.x;
+ }
+}
+
+function RAND_m() {
+
+ RAND_m.prototype.define = function RAND_m() {
+ this.a = 0;
+ this.b = 1;
+ this.dt = 0;
+ this.flag = 0;
+ this.function_name = "rndblk_m";
+ this.funtyp = 4;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString([this.function_name]), new ScilabDouble([this.funtyp]));
+ model.in = new ScilabDouble();
+ model.in2 = new ScilabDouble();
+ model.intyp = new ScilabDouble();
+ model.out = new ScilabDouble([1]);
+ model.out2 = new ScilabDouble([1]);
+ model.outtyp = new ScilabDouble([1]);
+ model.evtin = new ScilabDouble([1]);
+ model.evtout = new ScilabDouble();
+ model.state = new ScilabDouble();
+ model.dstate = new ScilabDouble([parseInt(Math.random() * 10000000)], [0 * this.a]);
+ model.rpar = new ScilabDouble([this.a, this.b]);
+ model.ipar = new ScilabDouble([this.flag]);
+ model.blocktype = new ScilabString(["d"]);
+ model.firing = new ScilabDouble();
+ model.dep_ut = new ScilabBoolean([false, false]);
+
+ var exprs = new ScilabString([sci2exp(1)], [this.flag], [sci2exp([this.a])], [sci2exp([this.b])], [sci2exp([parseInt(getData(model.dstate)[0]), parseInt(Math.random() * 10000000)])]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"RAND_m\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ RAND_m.prototype.details = function RAND_m() {
+ return this.x;
+ }
+}
+
+function RATELIMITER() {
+
+ RATELIMITER.prototype.define = function RATELIMITER() {
+ this.minp = -1;
+ this.maxp = 1;
+ this.rpar = [[this.maxp], [this.minp]];
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["ratelimiter"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble([1]);
+ model.out = new ScilabDouble([1]);
+ model.rpar = new ScilabDouble(...this.rpar);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([this.maxp], [this.minp]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"RATELIMITER\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3.5, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ RATELIMITER.prototype.details = function RATELIMITER() {
+ return this.x;
+ }
+}
+
function READAU_f() {
READAU_f.prototype.define = function READAU_f() {
@@ -8440,6 +8637,93 @@ function REGISTER_f () {
return block;
}
}
+function RELATIONALOP() {
+
+ RELATIONALOP.prototype.define = function RELATIONALOP() {
+ this.ipar = 2;
+ this.label = "&lt";
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["relationalop"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble([1], [1]);
+ model.out = new ScilabDouble([1]);
+ model.ipar = new ScilabDouble([this.ipar]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([this.ipar], [0]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"RELATIONALOP\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ this.x.graphics.style = new ScilabString(["fontSize=13;fontStyle=1;displayedLabel=" + label]);
+ return new BasicBlock(this.x);
+ }
+ RELATIONALOP.prototype.details = function RELATIONALOP() {
+ return this.x;
+ }
+}
+
+function RELAY_f() {
+
+ RELAY_f.prototype.define = function RELAY_f() {
+ this.i0 = 0;
+ this.in1 = [[-1], [-1]];
+ this.nin = 2;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["relay"]), new ScilabDouble([2]));
+ model.in = new ScilabDouble(...this.in1);
+ model.out = new ScilabDouble([-1]);
+ model.evtin = new ScilabDouble(...ones(this.in1));
+ model.dstate = new ScilabDouble([this.i0]);
+ model.blocktype = new ScilabString(["c"]);
+ model.firing = new ScilabDouble();
+ model.dep_ut = new ScilabBoolean([true, true]);
+
+ var exprs = new ScilabString([this.nin], [this.i0 + 1]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"RELAY_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ RELAY_f.prototype.details = function RELAY_f() {
+ return this.x;
+ }
+}
+
+function Resistor() {
+
+ Resistor.prototype.define = function Resistor() {
+ this.R = 0.01;
+
+ var model = scicos_model();
+ model.rpar = new ScilabDouble([this.R]);
+ model.sim = new ScilabString(["resistor"]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var mo = modelica();
+ mo.model = new ScilabString(["Resistor"]);
+ mo.inputs = new ScilabString(["p"]);
+ mo.outputs = new ScilabString(["n"]);
+ mo.parameters = list(new ScilabString(["R"]), list(new ScilabDouble([this.R])));
+ model.equations = mo;
+ model.in = new ScilabDouble(...ones(size(getData(mo.inputs), "*"), 1));
+ model.out = new ScilabDouble(...ones(size(getData(mo.outputs), "*"), 1));
+
+ var exprs = new ScilabString([this.R]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"Resistor\",sz(1),sz(2));"]);
+ this.x = standard_define([2, 1], model, exprs, list(gr_i, 0));
+ this.x.graphics.in_implicit = new ScilabString(["I"]);
+ this.x.graphics.out_implicit = new ScilabString(["I"]);
+ return new BasicBlock(this.x);
+ }
+ Resistor.prototype.details = function Resistor() {
+ return this.x;
+ }
+}
+
function RFILE_f() {
RFILE_f.prototype.define = function RFILE_f() {
@@ -8476,3 +8760,1225 @@ function RFILE_f() {
return this.x;
}
}
+function RICC() {
+
+ RICC.prototype.define = function RICC() {
+ this.function_name = "ricc_m";
+ this.funtyp = 4;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString([this.function_name]), new ScilabDouble([this.funtyp]));
+ model.in = new ScilabDouble([-1], [-1], [-1]);
+ model.in2 = new ScilabDouble([-1], [-1], [-1]);
+ model.intyp = new ScilabDouble([1, 1, 1]);
+ model.out = new ScilabDouble([-1]);
+ model.out2 = new ScilabDouble([-1]);
+ model.outtyp = new ScilabDouble([1]);
+ model.evtin = new ScilabDouble();
+ model.evtout = new ScilabDouble();
+ model.state = new ScilabDouble();
+ model.dstate = new ScilabDouble();
+ model.rpar = new ScilabDouble();
+ model.ipar = new ScilabDouble([1], [1]);
+ model.blocktype = new ScilabString(["c"]);
+ model.firing = new ScilabDouble();
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var label = new ScilabString([sci2exp(1)], [sci2exp(1)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"RICC\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, label, gr_i);
+ return new BasicBlock(this.x);
+ }
+ RICC.prototype.details = function RICC() {
+ return this.x;
+ }
+}
+
+function ROOTCOEF() {
+
+ ROOTCOEF.prototype.define = function ROOTCOEF() {
+ this.function_name = "root_coef";
+ this.funtyp = 4;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString([this.function_name]), new ScilabDouble([this.funtyp]));
+ model.in = new ScilabDouble([-1]);
+ model.in2 = new ScilabDouble([1]);
+ model.intyp = new ScilabDouble([1]);
+ model.out = new ScilabDouble([-2]);
+ model.out2 = new ScilabDouble([1]);
+ model.outtyp = new ScilabDouble([1]);
+ model.evtin = new ScilabDouble();
+ model.evtout = new ScilabDouble();
+ model.state = new ScilabDouble();
+ model.dstate = new ScilabDouble();
+ model.rpar = new ScilabDouble();
+ model.ipar = new ScilabDouble();
+ model.blocktype = new ScilabString(["c"]);
+ model.firing = new ScilabDouble();
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var label = new ScilabString([sci2exp(1)], [sci2exp(1)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"ROOTCOEF\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, label, gr_i);
+ return new BasicBlock(this.x);
+ }
+ ROOTCOEF.prototype.details = function ROOTCOEF() {
+ return this.x;
+ }
+}
+
+function SAMPHOLD_m() {
+
+ SAMPHOLD_m.prototype.define = function SAMPHOLD_m() {
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["samphold4_m"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble([-1]);
+ model.in2 = new ScilabDouble([-2]);
+ model.intyp = new ScilabDouble([1]);
+ model.outtyp = new ScilabDouble([1]);
+ model.out = new ScilabDouble([-1]);
+ model.out2 = new ScilabDouble([-2]);
+ model.evtin = new ScilabDouble([1]);
+ model.blocktype = new ScilabString(["d"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var label = [sci2exp(1)];
+
+ var gr_i = ["xstringb(orig(1),orig(2),\"SAMPHOLD_m\",sz(1),sz(2));"];
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, label, gr_i);
+ return new BasicBlock(this.x);
+
+ }
+
+ SAMPHOLD_m.prototype.details = function SAMPHOLD_m() {
+ return this.x;
+ }
+}
+function SATURATION() {
+
+ SATURATION.prototype.define = function SATURATION() {
+ this.minp = -1;
+ this.maxp = 1;
+ this.rpar = [[this.maxp], [this.minp]];
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["satur"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble([1]);
+ model.nzcross = new ScilabDouble([2]);
+ model.nmode = new ScilabDouble([1]);
+ model.out = new ScilabDouble([1]);
+ model.rpar = new ScilabDouble(...this.rpar);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([this.maxp], [this.minp], [parseInt(getData(model.nmode)[0])]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SATURATION\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ SATURATION.prototype.details = function SATURATION() {
+ return this.x;
+ }
+}
+
+function SAWTOOTH_f() {
+
+ SAWTOOTH_f.prototype.define = function SAWTOOTH_f() {
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["sawtth"]);
+ model.out = new ScilabDouble([1]);
+ model.evtin = new ScilabDouble([1]);
+ model.dstate = new ScilabDouble([0]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([false, true]);
+
+ var exprs = new ScilabString([" "]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SAWTOOTH_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+
+ SAWTOOTH_f.prototype.details = function SAWTOOTH_f() {
+ return this.x;
+ }
+}
+function SCALAR2VECTOR() {
+
+ SCALAR2VECTOR.prototype.define = function SCALAR2VECTOR() {
+ this.nout = -1;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["scalar2vector"]), new ScilabDouble([4]));
+ model.out = new ScilabDouble([this.nout]);
+ model.in = new ScilabDouble([1]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([this.nout]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SCALAR2VECTOR\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ SCALAR2VECTOR.prototype.details = function SCALAR2VECTOR() {
+ return this.x;
+ }
+}
+
+function scifunc_block_m() {
+
+ scifunc_block_m.prototype.define = function scifunc_block_m() {
+ this.in1 = 1;
+ this.out = 1;
+ this.clkin = [];
+ this.clkout = [];
+ this.x0 = [];
+ this.z0 = [];
+ this.typ = "c";
+ this.auto = [];
+ this.rpar = [];
+ this.it = 1;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["scifunc"]), new ScilabDouble([3]));
+ model.in = new ScilabDouble([this.in1]);
+ model.in2 = new ScilabDouble([this.in1]);
+ model.intyp = new ScilabDouble([this.it]);
+ model.out = new ScilabDouble([this.out]);
+ model.out2 = new ScilabDouble([this.out]);
+ model.outtyp = new ScilabDouble([this.it]);
+ model.evtin = new ScilabDouble();
+ model.evtout = new ScilabDouble();
+ model.state = new ScilabDouble();
+ model.dstate = new ScilabDouble();
+ model.rpar = new ScilabDouble();
+ model.ipar = new ScilabDouble([0]);
+ model.opar = list();
+ model.blocktype = new ScilabString([this.typ]);
+ model.firing = new ScilabDouble();
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = list(new ScilabString([sci2exp([this.in1, this.in1])], [sci2exp([this.out, this.out])], [sci2exp(this.clkin)], [sci2exp(this.clkout)], [sci2exp(this.x0)], [sci2exp(this.z0)], [sci2exp(this.rpar)], [sci2exp(this.auto)], [sci2exp(0)]), list(new ScilabString(["y1=sin(u1)"]), new ScilabString([" "]), new ScilabString([" "]), new ScilabString(["y1=sin(u1)"]), new ScilabString([" "]), new ScilabString([" "]), new ScilabString([" "])));
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"scifunc_block_m\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([4, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ scifunc_block_m.prototype.details = function scifunc_block_m() {
+ return this.x;
+ }
+}
+function SELECT_m() {
+
+ SELECT_m.prototype.define = function SELECT_m() {
+ this.z0 = 1;
+ this.nin = 2;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["selector_m"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble([-1], [-1]);
+ model.in2 = new ScilabDouble([-2], [-2]);
+ model.intyp = new ScilabDouble([1]);
+ model.out = new ScilabDouble([-1]);
+ model.out2 = new ScilabDouble([-2]);
+ model.outtyp = new ScilabDouble([1]);
+ model.evtout = new ScilabDouble();
+ model.state = new ScilabDouble();
+ model.rpar = new ScilabDouble();
+ model.ipar = new ScilabDouble();
+ model.firing = new ScilabDouble();
+ model.evtin = new ScilabDouble(...ones(this.nin, 1));
+ model.dstate = new ScilabDouble([this.z0]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([sci2exp(1)], [sci2exp([this.nin])], [sci2exp([this.z0])]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SELECT_m\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ SELECT_m.prototype.details = function SELECT_m() {
+ return this.x;
+ }
+}
+
+function SHIFT() {
+
+ SHIFT.prototype.define = function SHIFT() {
+ this.sgn = [[0],[0]];
+ this.OPER = 0;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["shift_32_LA"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble([-1]);
+ model.out = new ScilabDouble([-1]);
+ model.in2 = new ScilabDouble([-2]);
+ model.out2 = new ScilabDouble([-2]);
+ model.intyp = new ScilabDouble([3]);
+ model.outtyp = new ScilabDouble([3]);
+ model.rpar = new ScilabDouble();
+ model.ipar = new ScilabDouble(...this.sgn);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([sci2exp(3)], [sci2exp(0)], [sci2exp(0)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SHIFT\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+
+ SHIFT.prototype.details = function SHIFT() {
+ return this.x;
+ }
+}
+function Sigbuilder() {
+
+ Sigbuilder.prototype.define = function Sigbuilder() {
+ var scs_m_1 = scicos_diagram({
+ version: new ScilabString(["scicos4.2"]),
+ props: scicos_params({
+ wpar: new ScilabDouble([600, 450, 0, 0, 450, 600]),
+ Title: new ScilabString(["Sigbuilder"]),
+ tol: new ScilabDouble([0.0001], [0.000001], [Math.pow(10, -10)], [100001], [0], [0], [0]),
+ tf: new ScilabDouble([100]),
+ context: new ScilabString([" "]),
+ void1: new ScilabDouble(),
+ options: tlist(["scsopt", "3D", "Background", "Link", "ID", "Cmap"], new ScilabString(["scsopt", "3D", "Background", "Link", "ID", "Cmap"]), list(new ScilabBoolean([true]), new ScilabDouble([33])), new ScilabDouble([8, 1]), new ScilabDouble([1, 5]), list(new ScilabDouble([5, 1]), new ScilabDouble([4, 1])), new ScilabDouble([0.8, 0.8, 0.8])),
+ void2: new ScilabDouble(),
+ void3: new ScilabDouble(),
+ doc: list()
+ })
+ });
+ scs_m_1.objs.push(scicos_block({
+ gui: new ScilabString(["CURVE_c"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([329.63473, 606.18517]),
+ sz: new ScilabDouble([40, 40]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabString(["3"], ["[0,1,2]"], ["[10,20,-30]"], ["y"], ["n"]),
+ pin: new ScilabDouble(),
+ pout: new ScilabDouble([6]),
+ pein: new ScilabDouble([4]),
+ peout: new ScilabDouble([2]),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;CURVE_c&quot;,sz(1),sz(2));"]), new ScilabDouble([8])),
+ id: new ScilabString([""]),
+ in_implicit: new ScilabDouble(),
+ out_implicit: new ScilabString(["E"]),
+ out_style: new ScilabString(["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"]),
+ out_label: new ScilabString([""]),
+ style: new ScilabString(["CURVE_c"])
+ }),
+ model: scicos_model({
+ sim: list(new ScilabString(["curve_c"]), new ScilabDouble([4])),
+ in: new ScilabDouble(),
+ in2: new ScilabDouble(),
+ intyp: new ScilabDouble(),
+ out: new ScilabDouble([1]),
+ out2: new ScilabDouble([1]),
+ outtyp: new ScilabDouble([1]),
+ evtin: new ScilabDouble([1]),
+ evtout: new ScilabDouble([1]),
+ state: new ScilabDouble(),
+ dstate: new ScilabDouble(),
+ odstate: list(),
+ rpar: new ScilabDouble([0], [1], [2], [10], [20], [-30]),
+ ipar: new ScilabDouble([3], [3], [1]),
+ opar: list(),
+ blocktype: new ScilabString(["c"]),
+ firing: new ScilabDouble([0]),
+ dep_ut: new ScilabBoolean([false, true]),
+ label: new ScilabString([""]),
+ nzcross: new ScilabDouble([0]),
+ nmode: new ScilabDouble([0]),
+ equations: list(),
+ uid: new ScilabString([count])
+ }),
+ doc: list(new ScilabString([count++]))
+ }));
+ scs_m_1.objs.push(scicos_block({
+ gui: new ScilabString(["CLKSPLIT_f"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([349.49528, 565.10704]),
+ sz: new ScilabDouble([0.3333333, 0.3333333]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabDouble(),
+ pin: new ScilabDouble(),
+ pout: new ScilabDouble(),
+ pein: new ScilabDouble([2]),
+ peout: new ScilabDouble([8], [4]),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;CLKSPLIT_f&quot;,sz(1),sz(2));"]), new ScilabDouble([8])),
+ id: new ScilabString([""]),
+ in_implicit: new ScilabDouble(),
+ out_implicit: new ScilabDouble(),
+ style: new ScilabString(["CLKSPLIT_f"])
+ }),
+ model: scicos_model({
+ sim: new ScilabString(["split"]),
+ in: new ScilabDouble(),
+ in2: new ScilabDouble(),
+ intyp: new ScilabDouble(),
+ out: new ScilabDouble(),
+ out2: new ScilabDouble(),
+ outtyp: new ScilabDouble(),
+ evtin: new ScilabDouble([1]),
+ evtout: new ScilabDouble([1], [1]),
+ state: new ScilabDouble(),
+ dstate: new ScilabDouble(),
+ odstate: list(),
+ rpar: new ScilabDouble(),
+ ipar: new ScilabDouble(),
+ opar: list(),
+ blocktype: new ScilabString(["d"]),
+ firing: new ScilabBoolean([-1], [-1]),
+ dep_ut: new ScilabBoolean([false, false]),
+ label: new ScilabString([""]),
+ nzcross: new ScilabDouble([0]),
+ nmode: new ScilabDouble([0]),
+ equations: list(),
+ uid: new ScilabString([count])
+ }),
+ doc: list(new ScilabString([count++]))
+ }));
+ scs_m_1.objs.push(scicos_block({
+ gui: new ScilabString(["OUT_f"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([398.20616, 616.18517]),
+ sz: new ScilabDouble([20, 20]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabString(["1"]),
+ pin: new ScilabDouble([6]),
+ pout: new ScilabDouble(),
+ pein: new ScilabDouble(),
+ peout: new ScilabDouble(),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;OUT_f&quot;,sz(1),sz(2));"]), new ScilabDouble([8])),
+ id: new ScilabString([""]),
+ in_implicit: new ScilabString(["E"]),
+ out_implicit: new ScilabDouble(),
+ in_style: new ScilabString(["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"]),
+ in_label: new ScilabString([""]),
+ style: new ScilabString(["OUT_f"])
+ }),
+ model: scicos_model({
+ sim: new ScilabString(["output"]),
+ in: new ScilabDouble([-1]),
+ in2: new ScilabDouble([-2]),
+ intyp: new ScilabDouble([-1]),
+ out: new ScilabDouble(),
+ out2: new ScilabDouble(),
+ outtyp: new ScilabDouble(),
+ evtin: new ScilabDouble(),
+ evtout: new ScilabDouble(),
+ state: new ScilabDouble(),
+ dstate: new ScilabDouble(),
+ odstate: list(),
+ rpar: new ScilabDouble(),
+ ipar: new ScilabDouble([1]),
+ opar: list(),
+ blocktype: new ScilabString(["c"]),
+ firing: new ScilabDouble(),
+ dep_ut: new ScilabBoolean([false, false]),
+ label: new ScilabString([""]),
+ nzcross: new ScilabDouble([0]),
+ nmode: new ScilabDouble([0]),
+ equations: list(),
+ uid: new ScilabString([count])
+ }),
+ doc: list(new ScilabString([count++]))
+ }));
+ scs_m_1.objs.push(scicos_block({
+ gui: new ScilabString(["CLKOUTV_f"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([339.49528, 505.10704]),
+ sz: new ScilabDouble([20, 30]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabString(["1"]),
+ pin: new ScilabDouble(),
+ pout: new ScilabDouble(),
+ pein: new ScilabDouble([8]),
+ peout: new ScilabDouble(),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;CLKOUTV_f&quot;,sz(1),sz(2));"]), new ScilabDouble([8])),
+ id: new ScilabString([""]),
+ in_implicit: new ScilabDouble(),
+ out_implicit: new ScilabDouble(),
+ style: new ScilabString(["CLKOUTV_f"])
+ }),
+ model: scicos_model({
+ sim: new ScilabString(["output"]),
+ in: new ScilabDouble(),
+ in2: new ScilabDouble(),
+ intyp: new ScilabDouble(),
+ out: new ScilabDouble(),
+ out2: new ScilabDouble(),
+ outtyp: new ScilabDouble(),
+ evtin: new ScilabDouble([1]),
+ evtout: new ScilabDouble(),
+ state: new ScilabDouble(),
+ dstate: new ScilabDouble(),
+ odstate: list(),
+ rpar: new ScilabDouble(),
+ ipar: new ScilabDouble([1]),
+ opar: list(),
+ blocktype: new ScilabString(["d"]),
+ firing: new ScilabDouble(),
+ dep_ut: new ScilabBoolean([false, false]),
+ label: new ScilabString([""]),
+ nzcross: new ScilabDouble([0]),
+ nmode: new ScilabDouble([0]),
+ equations: list(),
+ uid: new ScilabString([count])
+ }),
+ doc: list(new ScilabString([count++]))
+ }));
+ scs_m_1.objs.push(scicos_link({
+ xx: new ScilabDouble([349.63473], [349.49528]),
+ yy: new ScilabDouble([600.47089], [565.10704]),
+ id: new ScilabString(["drawlink"]),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([5, -1]),
+ from: new ScilabDouble([1, 1, 0]),
+ to: new ScilabDouble([3, 1, 1])
+ }));
+ scs_m_1.objs.push(scicos_link({
+ xx: new ScilabDouble([349.49528], [266.69602], [266.69602], [270.35525], [342.80795], [342.80795], [349.63473]),
+ yy: new ScilabDouble([565.10704], [565.10704], [680.99483], [680.99483], [680.99483], [651.89946], [651.89946]),
+ id: new ScilabString(["drawlink"]),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([5, -1]),
+ from: new ScilabDouble([3, 2, 0]),
+ to: new ScilabDouble([1, 1, 1])
+ }));
+ scs_m_1.objs.push(scicos_link({
+ xx: new ScilabDouble([378.20616], [398.20616]),
+ yy: new ScilabDouble([626.18517], [626.18517]),
+ id: new ScilabString(["drawlink"]),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([1, 1]),
+ from: new ScilabDouble([1, 1, 0]),
+ to: new ScilabDouble([5, 1, 1])
+ }));
+ scs_m_1.objs.push(scicos_link({
+ xx: new ScilabDouble([349.49528], [349.49528]),
+ yy: new ScilabDouble([565.10704], [535.10704]),
+ id: new ScilabString(["drawlink"]),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([5, -1]),
+ from: new ScilabDouble([3, 1, 0]),
+ to: new ScilabDouble([7, 1, 1])
+ }));
+
+ var model = scicos_model({
+ sim: new ScilabString(["csuper"]),
+ in: new ScilabDouble(),
+ in2: new ScilabDouble(),
+ intyp: new ScilabDouble(),
+ out: new ScilabDouble([-1]),
+ out2: new ScilabDouble([1]),
+ outtyp: new ScilabDouble([1]),
+ evtin: new ScilabDouble(),
+ evtout: new ScilabDouble([1]),
+ state: new ScilabDouble(),
+ dstate: new ScilabDouble(),
+ odstate: list(),
+ rpar: scs_m_1,
+ ipar: new ScilabDouble(),
+ opar: list(),
+ blocktype: new ScilabString(["h"]),
+ firing: new ScilabDouble(),
+ dep_ut: new ScilabBoolean([false, false]),
+ label: new ScilabString([""]),
+ nzcross: new ScilabDouble([0]),
+ nmode: new ScilabDouble([0]),
+ equations: list()
+ });
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"Sigbuilder\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, new ScilabDouble(), gr_i);
+ return new BasicBlock(this.x);
+ }
+ Sigbuilder.prototype.details = function Sigbuilder() {
+ return this.x;
+ }
+}
+function SIGNUM() {
+
+ SIGNUM.prototype.define = function SIGNUM() {
+ this.nu = -1;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["signum"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble([this.nu]);
+ model.out = new ScilabDouble([this.nu]);
+ model.nzcross = new ScilabDouble([this.nu]);
+ model.nmode = new ScilabDouble([this.nu]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([1]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SIGNUM\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ SIGNUM.prototype.details = function SIGNUM() {
+ return this.x;
+ }
+}
+
+function SINBLK_f() {
+
+ SINBLK_f.prototype.define = function SINBLK_f() {
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["sinblk"]);
+ model.in = new ScilabDouble([-1]);
+ model.out = new ScilabDouble([-1]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([" "]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SINBLK_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ SINBLK_f.prototype.details = function SINBLK_f() {
+ return this.x;
+ }
+}
+
+function SineVoltage() {
+
+ SineVoltage.prototype.define = function SineVoltage() {
+ var model = scicos_model();
+ model.in = new ScilabDouble([1]);
+ model.out = new ScilabDouble([1]);
+
+ this.V = 1;
+ this.ph = 0;
+ this.frq = 1;
+ this.offset = 0;
+ this.start = 0;
+
+ model.rpar = new ScilabDouble([this.V], [this.ph], [this.frq], [this.offset], [this.start]);
+ model.sim = new ScilabString(["SineVoltage"]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var mo = modelica();
+ mo.model = new ScilabString(["SineVoltage"]);
+ mo.inputs = new ScilabString(["p"]);
+ mo.outputs = new ScilabString(["n"]);
+ mo.parameters = list(new ScilabString(["V"], ["phase"], ["freqHz"], ["offset"], ["startTime"]), list(new ScilabDouble([this.V]), new ScilabDouble([this.ph]), new ScilabDouble([this.frq]), new ScilabDouble([this.offset]), new ScilabDouble([this.start])));
+ model.equations = mo;
+
+ var exprs = new ScilabString([this.V], [this.ph], [this.frq], [this.offset], [this.start]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SineVoltage\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ this.x.graphics.in_implicit = new ScilabString(["I"]);
+ this.x.graphics.out_implicit = new ScilabString(["I"]);
+ return new BasicBlock(this.x);
+ }
+
+ SineVoltage.prototype.details = function SineVoltage() {
+ return this.x;
+ }
+}
+function SOM_f() {
+
+ SOM_f.prototype.define = function SOM_f() {
+ this.sgn = [[1], [1], [1]];
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["sum"]), new ScilabDouble([2]));
+ model.in = new ScilabDouble([-1], [-1], [-1]);
+ model.out = new ScilabDouble([-1]);
+ model.rpar = new ScilabDouble(...this.sgn);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([sci2exp(1)], [sci2exp(this.sgn)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SOM_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2,2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+
+ SINBLK_f.prototype.details = function SINBLK_f() {
+ return this.x;
+ }
+}
+function SourceP() {
+
+ SourceP.prototype.define = function SourceP() {
+ var model = scicos_model();
+
+ this.P0 = 300000;
+ this.T0 = 290;
+ this.H0 = 100000;
+ this.option_temperature = 1;
+
+ model.rpar = new ScilabDouble([this.P0], [this.T0], [this.H0], [this.option_temperature]);
+ model.sim = new ScilabString(["Source"]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var mo = modelica();
+ mo.model = new ScilabString(["Source"]);
+ mo.inputs = new ScilabDouble();
+ mo.outputs = new ScilabString(["C"]);
+ mo.parameters = list(new ScilabString(["P0"], ["T0"], ["H0"], ["option_temperature"]), new ScilabDouble([this.P0], [this.T0], [this.H0], [this.option_temperature]));
+ model.equations = mo;
+ model.in = new ScilabDouble(...ones(size(getData(mo.inputs), "*"), 1));
+ model.out = new ScilabDouble(...ones(size(getData(mo.outputs), "*"), 1));
+
+ var exprs = new ScilabString([this.P0], [this.T0], [this.H0], [this.option_temperature]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SourceP\",sz(1),sz(2));"]);
+ this.x = new standard_define([2.5, 2], model, exprs, list(gr_i, new ScilabDouble([0])));
+ this.x.graphics.out_implicit = new ScilabString(["I"]);
+ return new BasicBlock(this.x);
+ }
+
+ SourceP.prototype.details = function SourceP() {
+ return this.x;
+ }
+}
+function SQRT() {
+
+ SQRT.prototype.define = function SQRT() {
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["mat_sqrt"]), new ScilabDouble([4]));
+ model.in = new ScilabDouble([-1]);
+ model.in2 = new ScilabDouble([-2]);
+ model.intyp = new ScilabDouble([1]);
+ model.outtyp = new ScilabDouble([1]);
+ model.out = new ScilabDouble([-1]);
+ model.out2 = new ScilabDouble([-2]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var label = new ScilabString([sci2exp(1)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SQRT\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, label, gr_i);
+ return new BasicBlock(this.x);
+ }
+
+ SQRT.prototype.details = function SQRT() {
+ return this.x;
+ }
+}
+function SRFLIPFLOP() {
+
+ SRFLIPFLOP.prototype.define = function SRFLIPFLOP() {
+ var scs_m = scicos_diagram({
+ version: new ScilabString(["scicos4.2"]),
+ props: scicos_params({
+ wpar: new ScilabDouble([600, 450, 0, 0, 450, 600]),
+ Title: new ScilabString(["SRFLIPFLOP"]),
+ tol: new ScilabDouble([0.0001], [0.000001], [Math.pow(10, -10)], [100001], [0], [0], [0]),
+ tf: new ScilabDouble([100000]),
+ context: new ScilabString([" "]),
+ void1: new ScilabDouble(),
+ options: tlist(["scsopt", "3D", "Background", "Link", "ID", "Cmap"], new ScilabString(["scsopt", "3D", "Background", "Link", "ID", "Cmap"]), list(new ScilabBoolean([true]), new ScilabDouble([33])), new ScilabDouble([8, 1]), new ScilabDouble([1, 5]), list(new ScilabDouble([5, 1]), new ScilabDouble([4, 1])), new ScilabDouble([0.8, 0.8, 0.8])),
+ void2: new ScilabDouble(),
+ void3: new ScilabDouble(),
+ doc: list()
+ })
+ });
+ scs_m.objs.push(scicos_block({
+ gui: new ScilabString(["LOGIC"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([298.504, 201.45067]),
+ sz: new ScilabDouble([40, 40]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabString(["[0 1;1 0;1 0;1 0;0 1;0 1;0 0;0 0]"], ["1"]),
+ pin: new ScilabDouble([4], [10], [12]),
+ pout: new ScilabDouble([3], [8]),
+ pein: new ScilabDouble(),
+ peout: new ScilabDouble(),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;LOGIC&quot;,sz(1),sz(2));"]), new ScilabDouble([8])),
+ id: new ScilabString([""]),
+ in_implicit: new ScilabString(["E"], ["E"], ["E"]),
+ out_implicit: new ScilabString(["E"], ["E"]),
+ in_style: new ScilabString(["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"], ["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"], ["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"]),
+ out_style: new ScilabString(["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"], ["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"]),
+ in_label: new ScilabString([""], [""], [""]),
+ out_label: new ScilabString([""], [""]),
+ style: new ScilabString(["LOGIC"])
+ }),
+ model: scicos_model({
+ sim: list(new ScilabString(["logic"]), new ScilabDouble([4])),
+ in: new ScilabDouble([1], [1], [1]),
+ in2: new ScilabDouble([1], [1], [1]),
+ intyp: new ScilabDouble([5], [5], [5]),
+ out: new ScilabDouble([1], [1]),
+ out2: new ScilabDouble([1], [1]),
+ outtyp: new ScilabDouble([5], [5]),
+ evtin: new ScilabDouble(),
+ evtout: new ScilabDouble(),
+ state: new ScilabDouble(),
+ dstate: new ScilabDouble(),
+ odstate: list(),
+ rpar: new ScilabDouble(),
+ ipar: new ScilabDouble(),
+ opar: list(int8([0, 1], [1, 0], [1, 0], [1, 0], [0, 1], [0, 1], [0, 0], [0, 0])),
+ blocktype: new ScilabString(["c"]),
+ firing: new ScilabBoolean([false]),
+ dep_ut: new ScilabBoolean([true, false]),
+ label: new ScilabString([""]),
+ nzcross: new ScilabDouble([0]),
+ nmode: new ScilabDouble([0]),
+ equations: list(),
+ uid: new ScilabString([count])
+ }),
+ doc: list(new ScilabString([count++]))
+ }));
+ scs_m.objs.push(scicos_block({
+ gui: new ScilabString(["DOLLAR_m"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([299.23733, 254.25067]),
+ sz: new ScilabDouble([40, 40]),
+ flip: new ScilabBoolean([false]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabString(["int8(0)"], ["1"]),
+ pin: new ScilabDouble([6]),
+ pout: new ScilabDouble([4]),
+ pein: new ScilabDouble(),
+ peout: new ScilabDouble(),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;DOLLAR_m&quot;,sz(1),sz(2));"]), new ScilabDouble([8])),
+ id: new ScilabString([""]),
+ in_implicit: new ScilabString(["E"]),
+ out_implicit: new ScilabString(["E"]),
+ in_style: new ScilabString(["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"]),
+ out_style: new ScilabString(["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"]),
+ in_label: new ScilabString([""]),
+ out_label: new ScilabString([""]),
+ style: new ScilabString(["DOLLAR_m"])
+ }),
+ model: scicos_model({
+ sim: list(new ScilabString(["dollar4_m"]), new ScilabDouble([4])),
+ in: new ScilabDouble([1]),
+ in2: new ScilabDouble([1]),
+ intyp: new ScilabDouble([5]),
+ out: new ScilabDouble([1]),
+ out2: new ScilabDouble([1]),
+ outtyp: new ScilabDouble([5]),
+ evtin: new ScilabDouble(),
+ evtout: new ScilabDouble(),
+ state: new ScilabDouble(),
+ dstate: new ScilabDouble(),
+ odstate: list(int8([0])),
+ rpar: new ScilabDouble(),
+ ipar: new ScilabDouble(),
+ opar: list(),
+ blocktype: new ScilabString(["d"]),
+ firing: new ScilabDouble(),
+ dep_ut: new ScilabBoolean([false, false]),
+ label: new ScilabString([""]),
+ nzcross: new ScilabDouble([0]),
+ nmode: new ScilabDouble([0]),
+ equations: list(),
+ uid: new ScilabString([count])
+ }),
+ doc: list(new ScilabString([count++]))
+ }));
+ scs_m.objs.push(scicos_block({
+ gui: new ScilabString(["SPLIT_f"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([363.03733, 248.584]),
+ sz: new ScilabDouble([0.3333333, 0.3333333]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabDouble(),
+ pin: new ScilabDouble([3]),
+ pout: new ScilabDouble([10], [14], [0]),
+ pein: new ScilabDouble(),
+ peout: new ScilabDouble(),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;SPLIT_f&quot;,sz(1),sz(2));"]), new ScilabDouble([8])),
+ id: new ScilabString([""]),
+ in_implicit: new ScilabString(["E"]),
+ out_implicit: new ScilabString(["E"], ["E"], ["E"]),
+ in_style: new ScilabString(["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"]),
+ out_style: new ScilabString(["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"], ["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"], ["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"]),
+ in_label: new ScilabString([""]),
+ out_label: new ScilabString([""], [""], [""]),
+ style: new ScilabString(["SPLIT_f"])
+ }),
+ model: scicos_model({
+ sim: new ScilabString(["lsplit"]),
+ in: new ScilabDouble([-1]),
+ in2: new ScilabDouble([1]),
+ intyp: new ScilabDouble([1]),
+ out: new ScilabDouble([-1], [-1], [-1]),
+ out2: new ScilabDouble([1], [1], [1]),
+ outtyp: new ScilabDouble([1], [1], [1]),
+ evtin: new ScilabDouble(),
+ evtout: new ScilabDouble(),
+ state: new ScilabDouble(),
+ dstate: new ScilabDouble(),
+ odstate: list(),
+ rpar: new ScilabDouble(),
+ ipar: new ScilabDouble(),
+ opar: list(),
+ blocktype: new ScilabString(["c"]),
+ firing: new ScilabDouble(),
+ dep_ut: new ScilabBoolean([true, false]),
+ label: new ScilabString([""]),
+ nzcross: new ScilabDouble([0]),
+ nmode: new ScilabDouble([0]),
+ equations: list(),
+ uid: new ScilabString([count])
+ }),
+ doc: list(new ScilabString([count++]))
+ }));
+ scs_m.objs.push(scicos_block({
+ gui: new ScilabString(["OUT_f"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([367.07543, 204.784]),
+ sz: new ScilabDouble([20, 20]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabString(["2"]),
+ pin: new ScilabDouble([8]),
+ pout: new ScilabDouble(),
+ pein: new ScilabDouble(),
+ peout: new ScilabDouble(),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;OUT_f&quot;,sz(1),sz(2));"]), new ScilabDouble([8])),
+ id: new ScilabString([""]),
+ in_implicit: new ScilabString(["E"]),
+ out_implicit: new ScilabDouble(),
+ in_style: new ScilabString(["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"]),
+ in_label: new ScilabString([""]),
+ style: new ScilabString(["OUT_f"])
+ }),
+ model: scicos_model({
+ sim: new ScilabString(["output"]),
+ in: new ScilabDouble([-1]),
+ in2: new ScilabDouble([1]),
+ intyp: new ScilabDouble([-1]),
+ out: new ScilabDouble(),
+ out2: new ScilabDouble(),
+ outtyp: new ScilabDouble(),
+ evtin: new ScilabDouble(),
+ evtout: new ScilabDouble(),
+ state: new ScilabDouble(),
+ dstate: new ScilabDouble(),
+ odstate: list(),
+ rpar: new ScilabDouble(),
+ ipar: new ScilabDouble([2]),
+ opar: list(),
+ blocktype: new ScilabString(["c"]),
+ firing: new ScilabDouble(),
+ dep_ut: new ScilabBoolean([false, false]),
+ label: new ScilabString([""]),
+ nzcross: new ScilabDouble([0]),
+ nmode: new ScilabDouble([0]),
+ equations: list(),
+ uid: new ScilabString([count])
+ }),
+ doc: list(new ScilabString([count++]))
+ }));
+ scs_m.objs.push(scicos_block({
+ gui: new ScilabString(["IN_f"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([249.93257, 211.45067]),
+ sz: new ScilabDouble([20, 20]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabString(["1"]),
+ pin: new ScilabDouble(),
+ pout: new ScilabDouble([10]),
+ pein: new ScilabDouble(),
+ peout: new ScilabDouble(),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;IN_f&quot;,sz(1),sz(2));"]), new ScilabDouble([8])),
+ id: new ScilabString([""]),
+ in_implicit: new ScilabDouble(),
+ out_implicit: new ScilabString(["E"]),
+ out_style: new ScilabString(["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"]),
+ out_label: new ScilabString([""]),
+ style: new ScilabString(["IN_f"])
+ }),
+ model: scicos_model({
+ sim: new ScilabString(["input"]),
+ in: new ScilabDouble(),
+ in2: new ScilabDouble(),
+ intyp: new ScilabDouble(),
+ out: new ScilabDouble([-1]),
+ out2: new ScilabDouble([1]),
+ outtyp: new ScilabDouble([-1]),
+ evtin: new ScilabDouble(),
+ evtout: new ScilabDouble(),
+ state: new ScilabDouble(),
+ dstate: new ScilabDouble(),
+ odstate: list(),
+ rpar: new ScilabDouble(),
+ ipar: new ScilabDouble([1]),
+ opar: list(),
+ blocktype: new ScilabString(["c"]),
+ firing: new ScilabDouble(),
+ dep_ut: new ScilabBoolean([false, false]),
+ label: new ScilabString([""]),
+ nzcross: new ScilabDouble([0]),
+ nmode: new ScilabDouble([0]),
+ equations: list(),
+ uid: new ScilabString([count])
+ }),
+ doc: list(new ScilabString([count++]))
+ }));
+ scs_m.objs.push(scicos_block({
+ gui: new ScilabString(["IN_f"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([249.93257, 201.45067]),
+ sz: new ScilabDouble([20, 20]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabString(["2"]),
+ pin: new ScilabDouble(),
+ pout: new ScilabDouble([12]),
+ pein: new ScilabDouble(),
+ peout: new ScilabDouble(),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;IN_f&quot;,sz(1),sz(2));"]), new ScilabDouble([8])),
+ id: new ScilabString([""]),
+ in_implicit: new ScilabDouble(),
+ out_implicit: new ScilabString(["E"]),
+ out_style: new ScilabString(["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"]),
+ out_label: new ScilabString([""]),
+ style: new ScilabString(["IN_f"])
+ }),
+ model: scicos_model({
+ sim: new ScilabString(["input"]),
+ in: new ScilabDouble(),
+ in2: new ScilabDouble(),
+ intyp: new ScilabDouble(),
+ out: new ScilabDouble([-1]),
+ out2: new ScilabDouble([1]),
+ outtyp: new ScilabDouble([-1]),
+ evtin: new ScilabDouble(),
+ evtout: new ScilabDouble(),
+ state: new ScilabDouble(),
+ dstate: new ScilabDouble(),
+ odstate: list(),
+ rpar: new ScilabDouble(),
+ ipar: new ScilabDouble([2]),
+ opar: list(),
+ blocktype: new ScilabString(["c"]),
+ firing: new ScilabDouble(),
+ dep_ut: new ScilabBoolean([false, false]),
+ label: new ScilabString([""]),
+ nzcross: new ScilabDouble([0]),
+ nmode: new ScilabDouble([0]),
+ equations: list(),
+ uid: new ScilabString([count])
+ }),
+ doc: list(new ScilabString([count++]))
+ }));
+ scs_m.objs.push(scicos_block({
+ gui: new ScilabString(["OUT_f"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([383.03733, 238.584]),
+ sz: new ScilabDouble([20, 20]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabString(["1"]),
+ pin: new ScilabDouble([14]),
+ pout: new ScilabDouble(),
+ pein: new ScilabDouble(),
+ peout: new ScilabDouble(),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;OUT_f&quot;,sz(1),sz(2));"]), new ScilabDouble([8])),
+ id: new ScilabString([""]),
+ in_implicit: new ScilabString(["E"]),
+ out_implicit: new ScilabDouble(),
+ in_style: new ScilabString(["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"]),
+ in_label: new ScilabString([""]),
+ style: new ScilabString(["OUT_f"])
+ }),
+ model: scicos_model({
+ sim: new ScilabString(["output"]),
+ in: new ScilabDouble([-1]),
+ in2: new ScilabDouble([1]),
+ intyp: new ScilabDouble([-1]),
+ out: new ScilabDouble(),
+ out2: new ScilabDouble(),
+ outtyp: new ScilabDouble(),
+ evtin: new ScilabDouble(),
+ evtout: new ScilabDouble(),
+ state: new ScilabDouble(),
+ dstate: new ScilabDouble(),
+ odstate: list(),
+ rpar: new ScilabDouble(),
+ ipar: new ScilabDouble([1]),
+ opar: list(),
+ blocktype: new ScilabString(["c"]),
+ firing: new ScilabDouble(),
+ dep_ut: new ScilabBoolean([false, false]),
+ label: new ScilabString([""]),
+ nzcross: new ScilabDouble([0]),
+ nmode: new ScilabDouble([0]),
+ equations: list(),
+ uid: new ScilabString([count])
+ }),
+ doc: list(new ScilabString([count++]))
+ }));
+
+ scs_m.objs.push(scicos_link({
+ xx: new ScilabDouble([347.07543], [363.03733], [363.03733]),
+ yy: new ScilabDouble([228.11733], [228.11733], [248.584]),
+ id: new ScilabString(['drawlink']),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([1, 1]),
+ from: new ScilabDouble([1, 1, 0]),
+ to: new ScilabDouble([5, 1, 1])
+ }));
+ scs_m.objs.push(scicos_link({
+ xx: new ScilabDouble([290.6659], [272.104], [272.104], [289.93257]),
+ yy: new ScilabDouble([274.25067], [274.25067], [231.45067], [231.45067]),
+ id: new ScilabString(['drawlink']),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([1, 1]),
+ from: new ScilabDouble([2, 1, 0]),
+ to: new ScilabDouble([1, 1, 1])
+ }));
+ scs_m.objs.push(scicos_link({
+ xx: new ScilabDouble([363.03733], [363.03733], [344.95162]),
+ yy: new ScilabDouble([248.584], [274.25067], [274.25067]),
+ id: new ScilabString(['drawlink']),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([1, 1]),
+ from: new ScilabDouble([5, 1, 0]),
+ to: new ScilabDouble([2, 1, 1])
+ }));
+ scs_m.objs.push(scicos_link({
+ xx: new ScilabDouble([347.07543], [367.07543]),
+ yy: new ScilabDouble([214.784], [214.784]),
+ id: new ScilabString(['drawlink']),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([1, 1]),
+ from: new ScilabDouble([1, 2, 0]),
+ to: new ScilabDouble([7, 1, 1])
+ }));
+ scs_m.objs.push(scicos_link({
+ xx: new ScilabDouble([269.93257], [289.93257]),
+ yy: new ScilabDouble([221.45067], [221.45067]),
+ id: new ScilabString(['drawlink']),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([1, 1]),
+ from: new ScilabDouble([9, 1, 0]),
+ to: new ScilabDouble([1, 2, 1])
+ }));
+ scs_m.objs.push(scicos_link({
+ xx: new ScilabDouble([269.93257], [289.93257]),
+ yy: new ScilabDouble([211.45067], [221.45067]),
+ id: new ScilabString(['drawlink']),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([1, 1]),
+ from: new ScilabDouble([11, 1, 0]),
+ to: new ScilabDouble([1, 3, 1])
+ }));
+ scs_m.objs.push(scicos_link({
+ xx: new ScilabDouble([363.03733], [383.03733]),
+ yy: new ScilabDouble([248.584], [248.584]),
+ id: new ScilabString(['drawlink']),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([1, 1]),
+ from: new ScilabDouble([5, 2, 0]),
+ to: new ScilabDouble([13, 1, 1])
+ }));
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["csuper"]);
+ model.in = new ScilabDouble([1], [1]);
+ model.in2 = new ScilabDouble([1], [1]);
+ model.out = new ScilabDouble([1], [1]);
+ model.out2 = new ScilabDouble([1], [1]);
+ model.intyp = new ScilabDouble([5, 5]);
+ model.outtyp = new ScilabDouble([5, 5]);
+ model.blocktype = new ScilabString(["h"]);
+ model.firing = new ScilabBoolean([false]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+ model.rpar = scs_m;
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SRFLIPFLOP\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 3]), model, new ScilabDouble(), gr_i);
+ return new BasicBlock(this.x);
+ }
+ SRFLIPFLOP.prototype.details = function SRFLIPFLOP() {
+ return this.x;
+ }
+}
+function SUBMAT() {
+
+ SUBMAT.prototype.define = function SUBMAT() {
+ var model = scicos_model();
+
+ this.function_name = new ScilabString(["submat"]);
+
+ this.funtyp = new ScilabDouble([4]);
+ model.sim = list(this.function_name, this.funtyp);
+ model.in = new ScilabDouble([-1]);
+ model.in2 = new ScilabDouble([-2]);
+ model.intyp = new ScilabDouble([1]);
+ model.out = new ScilabDouble([-1]);
+ model.out2 = new ScilabDouble([-2]);
+ model.outtyp = new ScilabDouble([1]);
+ model.evtin = new ScilabDouble();
+ model.evtout = new ScilabDouble();
+ model.state = new ScilabDouble();
+ model.dstate = new ScilabDouble();
+ model.rpar = new ScilabDouble();
+ model.ipar = new ScilabDouble([1], [1], [1], [1]);
+ model.blocktype = new ScilabString(["c"]);
+ model.firing = new ScilabDouble();
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ this.label = new ScilabString([sci2exp(1)], [sci2exp(1)], [sci2exp(1)], [sci2exp(1)], [sci2exp(1)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SUBMAT\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2.5, 2]), model, this.label, gr_i);
+
+ return new BasicBlock(this.x);
+
+ }
+ SUBMAT.prototype.details = function SUBMAT() {
+ return this.x;
+
+ }
+}
+function SUM_f() {
+
+ SUM_f.prototype.define = function SUM_f() {
+ var model = scicos_model();
+
+ model.sim = list(new ScilabString(["plusblk"]), new ScilabDouble([2]));
+ model.in = new ScilabDouble([-1], [-1], [-1]);
+ model.out = new ScilabDouble([-1]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SUM_f\",sz(1),sz(2));"]);
+ var exprs = new ScilabString();
+
+ this.x = new standard_define(new ScilabDouble([1, 1]), model, exprs, gr_i);
+
+ return new RoundBlock(this.x);
+
+ }
+
+ SUM_f.prototype.details = function SUM_f() {
+ return this.x;
+
+ }
+}
diff --git a/data_structures_correct/FROM.js b/data_structures_correct/FROM.js
new file mode 100644
index 0000000..f6002b2
--- /dev/null
+++ b/data_structures_correct/FROM.js
@@ -0,0 +1,29 @@
+function FROM() {
+
+ FROM.prototype.define = function FROM() {
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["from"]);
+ model.in = new ScilabDouble();
+ model.in2 = new ScilabDouble();
+ model.intyp = new ScilabDouble([1]);
+ model.out = new ScilabDouble([-1]);
+ model.out2 = new ScilabDouble([-2]);
+ model.outtyp = new ScilabDouble([-1]);
+ model.ipar = new ScilabDouble();
+ model.opar = list(new ScilabString(["A"]));
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([false, false]);
+
+ var exprs = new ScilabString(["A"]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"FROM\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 1]), model, exprs, gr_i);
+ this.x.graphics.id = new ScilabString(["From"]);
+ return new BasicBlock(this.x);
+ }
+ FROM.prototype.details = function FROM() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/GAINBLK_f.js b/data_structures_correct/GAINBLK_f.js
new file mode 100644
index 0000000..1e0ae00
--- /dev/null
+++ b/data_structures_correct/GAINBLK_f.js
@@ -0,0 +1,26 @@
+function GAINBLK_f() {
+
+ GAINBLK_f.prototype.define = function GAINBLK_f() {
+ this.gain = 1;
+ this.in1 = 1;
+ this.out = 1;
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["gain"]);
+ model.in = new ScilabDouble([this.in1]);
+ model.out = new ScilabDouble([this.out]);
+ model.rpar = new ScilabDouble([this.gain]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([sci2exp(this.gain)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"GAINBLK_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ GAINBLK_f.prototype.details = function GAINBLK_f() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/INTRP2BLK_f.js b/data_structures_correct/INTRP2BLK_f.js
new file mode 100644
index 0000000..6d002ab
--- /dev/null
+++ b/data_structures_correct/INTRP2BLK_f.js
@@ -0,0 +1,27 @@
+function INTRP2BLK_f() {
+
+ INTRP2BLK_f.prototype.define = function INTRP2BLK_f() {
+ this.a = [[0],[1]];
+ this.b = [[0],[1]];
+ this.c = [[0,1],[1,2]];
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["intrp2"]), new ScilabDouble([1]));
+ model.in = new ScilabDouble([1], [1]);
+ model.out = new ScilabDouble([1]);
+ model.rpar = new ScilabDouble(...this.a,...this.b,...colon_operator(this.c));
+ model.ipar = new ScilabDouble([2], [2]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([sci2exp(this.a)],[sci2exp(this.b)],[sci2exp(this.c)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"INTRP2BLK_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ INTRP2BLK_f.prototype.details = function INTRP2BLK_f() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/SRFLIPFLOP.js b/data_structures_correct/SRFLIPFLOP.js
new file mode 100644
index 0000000..439fc4a
--- /dev/null
+++ b/data_structures_correct/SRFLIPFLOP.js
@@ -0,0 +1,439 @@
+function SRFLIPFLOP() {
+
+ SRFLIPFLOP.prototype.define = function SRFLIPFLOP() {
+ var scs_m = scicos_diagram({
+ version: new ScilabString(["scicos4.2"]),
+ props: scicos_params({
+ wpar: new ScilabDouble([600, 450, 0, 0, 450, 600]),
+ Title: new ScilabString(["SRFLIPFLOP"]),
+ tol: new ScilabDouble([0.0001], [0.000001], [Math.pow(10, -10)], [100001], [0], [0], [0]),
+ tf: new ScilabDouble([100000]),
+ context: new ScilabString([" "]),
+ void1: new ScilabDouble(),
+ options: tlist(["scsopt", "3D", "Background", "Link", "ID", "Cmap"], new ScilabString(["scsopt", "3D", "Background", "Link", "ID", "Cmap"]), list(new ScilabBoolean([true]), new ScilabDouble([33])), new ScilabDouble([8, 1]), new ScilabDouble([1, 5]), list(new ScilabDouble([5, 1]), new ScilabDouble([4, 1])), new ScilabDouble([0.8, 0.8, 0.8])),
+ void2: new ScilabDouble(),
+ void3: new ScilabDouble(),
+ doc: list()
+ })
+ });
+ scs_m.objs.push(scicos_block({
+ gui: new ScilabString(["LOGIC"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([298.504, 201.45067]),
+ sz: new ScilabDouble([40, 40]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabString(["[0 1;1 0;1 0;1 0;0 1;0 1;0 0;0 0]"], ["1"]),
+ pin: new ScilabDouble([4], [10], [12]),
+ pout: new ScilabDouble([3], [8]),
+ pein: new ScilabDouble(),
+ peout: new ScilabDouble(),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;LOGIC&quot;,sz(1),sz(2));"]), new ScilabDouble([8])),
+ id: new ScilabString([""]),
+ in_implicit: new ScilabString(["E"], ["E"], ["E"]),
+ out_implicit: new ScilabString(["E"], ["E"]),
+ in_style: new ScilabString(["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"], ["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"], ["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"]),
+ out_style: new ScilabString(["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"], ["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"]),
+ in_label: new ScilabString([""], [""], [""]),
+ out_label: new ScilabString([""], [""]),
+ style: new ScilabString(["LOGIC"])
+ }),
+ model: scicos_model({
+ sim: list(new ScilabString(["logic"]), new ScilabDouble([4])),
+ in: new ScilabDouble([1], [1], [1]),
+ in2: new ScilabDouble([1], [1], [1]),
+ intyp: new ScilabDouble([5], [5], [5]),
+ out: new ScilabDouble([1], [1]),
+ out2: new ScilabDouble([1], [1]),
+ outtyp: new ScilabDouble([5], [5]),
+ evtin: new ScilabDouble(),
+ evtout: new ScilabDouble(),
+ state: new ScilabDouble(),
+ dstate: new ScilabDouble(),
+ odstate: list(),
+ rpar: new ScilabDouble(),
+ ipar: new ScilabDouble(),
+ opar: list(int8([0, 1], [1, 0], [1, 0], [1, 0], [0, 1], [0, 1], [0, 0], [0, 0])),
+ blocktype: new ScilabString(["c"]),
+ firing: new ScilabBoolean([false]),
+ dep_ut: new ScilabBoolean([true, false]),
+ label: new ScilabString([""]),
+ nzcross: new ScilabDouble([0]),
+ nmode: new ScilabDouble([0]),
+ equations: list(),
+ uid: new ScilabString([count])
+ }),
+ doc: list(new ScilabString([count++]))
+ }));
+ scs_m.objs.push(scicos_block({
+ gui: new ScilabString(["DOLLAR_m"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([299.23733, 254.25067]),
+ sz: new ScilabDouble([40, 40]),
+ flip: new ScilabBoolean([false]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabString(["int8(0)"], ["1"]),
+ pin: new ScilabDouble([6]),
+ pout: new ScilabDouble([4]),
+ pein: new ScilabDouble(),
+ peout: new ScilabDouble(),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;DOLLAR_m&quot;,sz(1),sz(2));"]), new ScilabDouble([8])),
+ id: new ScilabString([""]),
+ in_implicit: new ScilabString(["E"]),
+ out_implicit: new ScilabString(["E"]),
+ in_style: new ScilabString(["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"]),
+ out_style: new ScilabString(["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"]),
+ in_label: new ScilabString([""]),
+ out_label: new ScilabString([""]),
+ style: new ScilabString(["DOLLAR_m"])
+ }),
+ model: scicos_model({
+ sim: list(new ScilabString(["dollar4_m"]), new ScilabDouble([4])),
+ in: new ScilabDouble([1]),
+ in2: new ScilabDouble([1]),
+ intyp: new ScilabDouble([5]),
+ out: new ScilabDouble([1]),
+ out2: new ScilabDouble([1]),
+ outtyp: new ScilabDouble([5]),
+ evtin: new ScilabDouble(),
+ evtout: new ScilabDouble(),
+ state: new ScilabDouble(),
+ dstate: new ScilabDouble(),
+ odstate: list(int8([0])),
+ rpar: new ScilabDouble(),
+ ipar: new ScilabDouble(),
+ opar: list(),
+ blocktype: new ScilabString(["d"]),
+ firing: new ScilabDouble(),
+ dep_ut: new ScilabBoolean([false, false]),
+ label: new ScilabString([""]),
+ nzcross: new ScilabDouble([0]),
+ nmode: new ScilabDouble([0]),
+ equations: list(),
+ uid: new ScilabString([count])
+ }),
+ doc: list(new ScilabString([count++]))
+ }));
+ scs_m.objs.push(scicos_block({
+ gui: new ScilabString(["SPLIT_f"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([363.03733, 248.584]),
+ sz: new ScilabDouble([0.3333333, 0.3333333]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabDouble(),
+ pin: new ScilabDouble([3]),
+ pout: new ScilabDouble([10], [14], [0]),
+ pein: new ScilabDouble(),
+ peout: new ScilabDouble(),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;SPLIT_f&quot;,sz(1),sz(2));"]), new ScilabDouble([8])),
+ id: new ScilabString([""]),
+ in_implicit: new ScilabString(["E"]),
+ out_implicit: new ScilabString(["E"], ["E"], ["E"]),
+ in_style: new ScilabString(["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"]),
+ out_style: new ScilabString(["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"], ["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"], ["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"]),
+ in_label: new ScilabString([""]),
+ out_label: new ScilabString([""], [""], [""]),
+ style: new ScilabString(["SPLIT_f"])
+ }),
+ model: scicos_model({
+ sim: new ScilabString(["lsplit"]),
+ in: new ScilabDouble([-1]),
+ in2: new ScilabDouble([1]),
+ intyp: new ScilabDouble([1]),
+ out: new ScilabDouble([-1], [-1], [-1]),
+ out2: new ScilabDouble([1], [1], [1]),
+ outtyp: new ScilabDouble([1], [1], [1]),
+ evtin: new ScilabDouble(),
+ evtout: new ScilabDouble(),
+ state: new ScilabDouble(),
+ dstate: new ScilabDouble(),
+ odstate: list(),
+ rpar: new ScilabDouble(),
+ ipar: new ScilabDouble(),
+ opar: list(),
+ blocktype: new ScilabString(["c"]),
+ firing: new ScilabDouble(),
+ dep_ut: new ScilabBoolean([true, false]),
+ label: new ScilabString([""]),
+ nzcross: new ScilabDouble([0]),
+ nmode: new ScilabDouble([0]),
+ equations: list(),
+ uid: new ScilabString([count])
+ }),
+ doc: list(new ScilabString([count++]))
+ }));
+ scs_m.objs.push(scicos_block({
+ gui: new ScilabString(["OUT_f"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([367.07543, 204.784]),
+ sz: new ScilabDouble([20, 20]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabString(["2"]),
+ pin: new ScilabDouble([8]),
+ pout: new ScilabDouble(),
+ pein: new ScilabDouble(),
+ peout: new ScilabDouble(),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;OUT_f&quot;,sz(1),sz(2));"]), new ScilabDouble([8])),
+ id: new ScilabString([""]),
+ in_implicit: new ScilabString(["E"]),
+ out_implicit: new ScilabDouble(),
+ in_style: new ScilabString(["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"]),
+ in_label: new ScilabString([""]),
+ style: new ScilabString(["OUT_f"])
+ }),
+ model: scicos_model({
+ sim: new ScilabString(["output"]),
+ in: new ScilabDouble([-1]),
+ in2: new ScilabDouble([1]),
+ intyp: new ScilabDouble([-1]),
+ out: new ScilabDouble(),
+ out2: new ScilabDouble(),
+ outtyp: new ScilabDouble(),
+ evtin: new ScilabDouble(),
+ evtout: new ScilabDouble(),
+ state: new ScilabDouble(),
+ dstate: new ScilabDouble(),
+ odstate: list(),
+ rpar: new ScilabDouble(),
+ ipar: new ScilabDouble([2]),
+ opar: list(),
+ blocktype: new ScilabString(["c"]),
+ firing: new ScilabDouble(),
+ dep_ut: new ScilabBoolean([false, false]),
+ label: new ScilabString([""]),
+ nzcross: new ScilabDouble([0]),
+ nmode: new ScilabDouble([0]),
+ equations: list(),
+ uid: new ScilabString([count])
+ }),
+ doc: list(new ScilabString([count++]))
+ }));
+ scs_m.objs.push(scicos_block({
+ gui: new ScilabString(["IN_f"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([249.93257, 211.45067]),
+ sz: new ScilabDouble([20, 20]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabString(["1"]),
+ pin: new ScilabDouble(),
+ pout: new ScilabDouble([10]),
+ pein: new ScilabDouble(),
+ peout: new ScilabDouble(),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;IN_f&quot;,sz(1),sz(2));"]), new ScilabDouble([8])),
+ id: new ScilabString([""]),
+ in_implicit: new ScilabDouble(),
+ out_implicit: new ScilabString(["E"]),
+ out_style: new ScilabString(["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"]),
+ out_label: new ScilabString([""]),
+ style: new ScilabString(["IN_f"])
+ }),
+ model: scicos_model({
+ sim: new ScilabString(["input"]),
+ in: new ScilabDouble(),
+ in2: new ScilabDouble(),
+ intyp: new ScilabDouble(),
+ out: new ScilabDouble([-1]),
+ out2: new ScilabDouble([1]),
+ outtyp: new ScilabDouble([-1]),
+ evtin: new ScilabDouble(),
+ evtout: new ScilabDouble(),
+ state: new ScilabDouble(),
+ dstate: new ScilabDouble(),
+ odstate: list(),
+ rpar: new ScilabDouble(),
+ ipar: new ScilabDouble([1]),
+ opar: list(),
+ blocktype: new ScilabString(["c"]),
+ firing: new ScilabDouble(),
+ dep_ut: new ScilabBoolean([false, false]),
+ label: new ScilabString([""]),
+ nzcross: new ScilabDouble([0]),
+ nmode: new ScilabDouble([0]),
+ equations: list(),
+ uid: new ScilabString([count])
+ }),
+ doc: list(new ScilabString([count++]))
+ }));
+ scs_m.objs.push(scicos_block({
+ gui: new ScilabString(["IN_f"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([249.93257, 201.45067]),
+ sz: new ScilabDouble([20, 20]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabString(["2"]),
+ pin: new ScilabDouble(),
+ pout: new ScilabDouble([12]),
+ pein: new ScilabDouble(),
+ peout: new ScilabDouble(),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;IN_f&quot;,sz(1),sz(2));"]), new ScilabDouble([8])),
+ id: new ScilabString([""]),
+ in_implicit: new ScilabDouble(),
+ out_implicit: new ScilabString(["E"]),
+ out_style: new ScilabString(["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"]),
+ out_label: new ScilabString([""]),
+ style: new ScilabString(["IN_f"])
+ }),
+ model: scicos_model({
+ sim: new ScilabString(["input"]),
+ in: new ScilabDouble(),
+ in2: new ScilabDouble(),
+ intyp: new ScilabDouble(),
+ out: new ScilabDouble([-1]),
+ out2: new ScilabDouble([1]),
+ outtyp: new ScilabDouble([-1]),
+ evtin: new ScilabDouble(),
+ evtout: new ScilabDouble(),
+ state: new ScilabDouble(),
+ dstate: new ScilabDouble(),
+ odstate: list(),
+ rpar: new ScilabDouble(),
+ ipar: new ScilabDouble([2]),
+ opar: list(),
+ blocktype: new ScilabString(["c"]),
+ firing: new ScilabDouble(),
+ dep_ut: new ScilabBoolean([false, false]),
+ label: new ScilabString([""]),
+ nzcross: new ScilabDouble([0]),
+ nmode: new ScilabDouble([0]),
+ equations: list(),
+ uid: new ScilabString([count])
+ }),
+ doc: list(new ScilabString([count++]))
+ }));
+ scs_m.objs.push(scicos_block({
+ gui: new ScilabString(["OUT_f"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([383.03733, 238.584]),
+ sz: new ScilabDouble([20, 20]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabString(["1"]),
+ pin: new ScilabDouble([14]),
+ pout: new ScilabDouble(),
+ pein: new ScilabDouble(),
+ peout: new ScilabDouble(),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;OUT_f&quot;,sz(1),sz(2));"]), new ScilabDouble([8])),
+ id: new ScilabString([""]),
+ in_implicit: new ScilabString(["E"]),
+ out_implicit: new ScilabDouble(),
+ in_style: new ScilabString(["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"]),
+ in_label: new ScilabString([""]),
+ style: new ScilabString(["OUT_f"])
+ }),
+ model: scicos_model({
+ sim: new ScilabString(["output"]),
+ in: new ScilabDouble([-1]),
+ in2: new ScilabDouble([1]),
+ intyp: new ScilabDouble([-1]),
+ out: new ScilabDouble(),
+ out2: new ScilabDouble(),
+ outtyp: new ScilabDouble(),
+ evtin: new ScilabDouble(),
+ evtout: new ScilabDouble(),
+ state: new ScilabDouble(),
+ dstate: new ScilabDouble(),
+ odstate: list(),
+ rpar: new ScilabDouble(),
+ ipar: new ScilabDouble([1]),
+ opar: list(),
+ blocktype: new ScilabString(["c"]),
+ firing: new ScilabDouble(),
+ dep_ut: new ScilabBoolean([false, false]),
+ label: new ScilabString([""]),
+ nzcross: new ScilabDouble([0]),
+ nmode: new ScilabDouble([0]),
+ equations: list(),
+ uid: new ScilabString([count])
+ }),
+ doc: list(new ScilabString([count++]))
+ }));
+
+ scs_m.objs.push(scicos_link({
+ xx: new ScilabDouble([347.07543], [363.03733], [363.03733]),
+ yy: new ScilabDouble([228.11733], [228.11733], [248.584]),
+ id: new ScilabString(['drawlink']),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([1, 1]),
+ from: new ScilabDouble([1, 1, 0]),
+ to: new ScilabDouble([5, 1, 1])
+ }));
+ scs_m.objs.push(scicos_link({
+ xx: new ScilabDouble([290.6659], [272.104], [272.104], [289.93257]),
+ yy: new ScilabDouble([274.25067], [274.25067], [231.45067], [231.45067]),
+ id: new ScilabString(['drawlink']),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([1, 1]),
+ from: new ScilabDouble([2, 1, 0]),
+ to: new ScilabDouble([1, 1, 1])
+ }));
+ scs_m.objs.push(scicos_link({
+ xx: new ScilabDouble([363.03733], [363.03733], [344.95162]),
+ yy: new ScilabDouble([248.584], [274.25067], [274.25067]),
+ id: new ScilabString(['drawlink']),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([1, 1]),
+ from: new ScilabDouble([5, 1, 0]),
+ to: new ScilabDouble([2, 1, 1])
+ }));
+ scs_m.objs.push(scicos_link({
+ xx: new ScilabDouble([347.07543], [367.07543]),
+ yy: new ScilabDouble([214.784], [214.784]),
+ id: new ScilabString(['drawlink']),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([1, 1]),
+ from: new ScilabDouble([1, 2, 0]),
+ to: new ScilabDouble([7, 1, 1])
+ }));
+ scs_m.objs.push(scicos_link({
+ xx: new ScilabDouble([269.93257], [289.93257]),
+ yy: new ScilabDouble([221.45067], [221.45067]),
+ id: new ScilabString(['drawlink']),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([1, 1]),
+ from: new ScilabDouble([9, 1, 0]),
+ to: new ScilabDouble([1, 2, 1])
+ }));
+ scs_m.objs.push(scicos_link({
+ xx: new ScilabDouble([269.93257], [289.93257]),
+ yy: new ScilabDouble([211.45067], [221.45067]),
+ id: new ScilabString(['drawlink']),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([1, 1]),
+ from: new ScilabDouble([11, 1, 0]),
+ to: new ScilabDouble([1, 3, 1])
+ }));
+ scs_m.objs.push(scicos_link({
+ xx: new ScilabDouble([363.03733], [383.03733]),
+ yy: new ScilabDouble([248.584], [248.584]),
+ id: new ScilabString(['drawlink']),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([1, 1]),
+ from: new ScilabDouble([5, 2, 0]),
+ to: new ScilabDouble([13, 1, 1])
+ }));
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["csuper"]);
+ model.in = new ScilabDouble([1], [1]);
+ model.in2 = new ScilabDouble([1], [1]);
+ model.out = new ScilabDouble([1], [1]);
+ model.out2 = new ScilabDouble([1], [1]);
+ model.intyp = new ScilabDouble([5, 5]);
+ model.outtyp = new ScilabDouble([5, 5]);
+ model.blocktype = new ScilabString(["h"]);
+ model.firing = new ScilabBoolean([false]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+ model.rpar = scs_m;
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SRFLIPFLOP\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 3]), model, new ScilabDouble(), gr_i);
+ return new BasicBlock(this.x);
+ }
+ SRFLIPFLOP.prototype.details = function SRFLIPFLOP() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/SUM_f.js b/data_structures_correct/SUM_f.js
new file mode 100644
index 0000000..6677eac
--- /dev/null
+++ b/data_structures_correct/SUM_f.js
@@ -0,0 +1,25 @@
+function SUM_f() {
+
+ SUM_f.prototype.define = function SUM_f() {
+ var model = scicos_model();
+
+ model.sim = list(new ScilabString(["plusblk"]), new ScilabDouble([2]));
+ model.in = new ScilabDouble([-1], [-1], [-1]);
+ model.out = new ScilabDouble([-1]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"SUM_f\",sz(1),sz(2));"]);
+ var exprs = new ScilabString();
+
+ this.x = new standard_define(new ScilabDouble([1, 1]), model, exprs, gr_i);
+
+ return new RoundBlock(this.x);
+
+ }
+
+ SUM_f.prototype.details = function SUM_f() {
+ return this.x;
+
+ }
+}
diff --git a/data_structures_correct/SampleCLK.js b/data_structures_correct/SampleCLK.js
new file mode 100644
index 0000000..5568e10
--- /dev/null
+++ b/data_structures_correct/SampleCLK.js
@@ -0,0 +1,22 @@
+function SampleCLK() {
+
+ SampleCLK.prototype.define = function SampleCLK() {
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["sampleclk"]);
+ model.evtout = new ScilabDouble([1]);
+ model.rpar = new ScilabDouble([1, 0]);
+ model.blocktype = new ScilabString(["d"]);
+ model.firing = new ScilabDouble([-1]);
+ model.dep_ut = new ScilabBoolean([false, false]);
+
+ var exprs = new ScilabString([sci2exp(1)], [sci2exp(0)]);
+
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, ["xstringb(orig(1),orig(2),\"SampleCLK\",sz(1),sz(2));"]);
+ return new BasicBlock(this.x);
+ }
+ SampleCLK.prototype.details = function SampleCLK() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/Sigbuilder.js b/data_structures_correct/Sigbuilder.js
new file mode 100644
index 0000000..15b6da0
--- /dev/null
+++ b/data_structures_correct/Sigbuilder.js
@@ -0,0 +1,272 @@
+function Sigbuilder() {
+
+ Sigbuilder.prototype.define = function Sigbuilder() {
+ var scs_m_1 = scicos_diagram({
+ version: new ScilabString(["scicos4.2"]),
+ props: scicos_params({
+ wpar: new ScilabDouble([600, 450, 0, 0, 450, 600]),
+ Title: new ScilabString(["Sigbuilder"]),
+ tol: new ScilabDouble([0.0001], [0.000001], [Math.pow(10, -10)], [100001], [0], [0], [0]),
+ tf: new ScilabDouble([100]),
+ context: new ScilabString([" "]),
+ void1: new ScilabDouble(),
+ options: tlist(["scsopt", "3D", "Background", "Link", "ID", "Cmap"], new ScilabString(["scsopt", "3D", "Background", "Link", "ID", "Cmap"]), list(new ScilabBoolean([true]), new ScilabDouble([33])), new ScilabDouble([8, 1]), new ScilabDouble([1, 5]), list(new ScilabDouble([5, 1]), new ScilabDouble([4, 1])), new ScilabDouble([0.8, 0.8, 0.8])),
+ void2: new ScilabDouble(),
+ void3: new ScilabDouble(),
+ doc: list()
+ })
+ });
+ scs_m_1.objs.push(scicos_block({
+ gui: new ScilabString(["CURVE_c"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([329.63473, 606.18517]),
+ sz: new ScilabDouble([40, 40]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabString(["3"], ["[0,1,2]"], ["[10,20,-30]"], ["y"], ["n"]),
+ pin: new ScilabDouble(),
+ pout: new ScilabDouble([6]),
+ pein: new ScilabDouble([4]),
+ peout: new ScilabDouble([2]),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;CURVE_c&quot;,sz(1),sz(2));"]), new ScilabDouble([8])),
+ id: new ScilabString([""]),
+ in_implicit: new ScilabDouble(),
+ out_implicit: new ScilabString(["E"]),
+ out_style: new ScilabString(["ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0"]),
+ out_label: new ScilabString([""]),
+ style: new ScilabString(["CURVE_c"])
+ }),
+ model: scicos_model({
+ sim: list(new ScilabString(["curve_c"]), new ScilabDouble([4])),
+ in: new ScilabDouble(),
+ in2: new ScilabDouble(),
+ intyp: new ScilabDouble(),
+ out: new ScilabDouble([1]),
+ out2: new ScilabDouble([1]),
+ outtyp: new ScilabDouble([1]),
+ evtin: new ScilabDouble([1]),
+ evtout: new ScilabDouble([1]),
+ state: new ScilabDouble(),
+ dstate: new ScilabDouble(),
+ odstate: list(),
+ rpar: new ScilabDouble([0], [1], [2], [10], [20], [-30]),
+ ipar: new ScilabDouble([3], [3], [1]),
+ opar: list(),
+ blocktype: new ScilabString(["c"]),
+ firing: new ScilabDouble([0]),
+ dep_ut: new ScilabBoolean([false, true]),
+ label: new ScilabString([""]),
+ nzcross: new ScilabDouble([0]),
+ nmode: new ScilabDouble([0]),
+ equations: list(),
+ uid: new ScilabString([count])
+ }),
+ doc: list(new ScilabString([count++]))
+ }));
+ scs_m_1.objs.push(scicos_block({
+ gui: new ScilabString(["CLKSPLIT_f"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([349.49528, 565.10704]),
+ sz: new ScilabDouble([0.3333333, 0.3333333]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabDouble(),
+ pin: new ScilabDouble(),
+ pout: new ScilabDouble(),
+ pein: new ScilabDouble([2]),
+ peout: new ScilabDouble([8], [4]),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;CLKSPLIT_f&quot;,sz(1),sz(2));"]), new ScilabDouble([8])),
+ id: new ScilabString([""]),
+ in_implicit: new ScilabDouble(),
+ out_implicit: new ScilabDouble(),
+ style: new ScilabString(["CLKSPLIT_f"])
+ }),
+ model: scicos_model({
+ sim: new ScilabString(["split"]),
+ in: new ScilabDouble(),
+ in2: new ScilabDouble(),
+ intyp: new ScilabDouble(),
+ out: new ScilabDouble(),
+ out2: new ScilabDouble(),
+ outtyp: new ScilabDouble(),
+ evtin: new ScilabDouble([1]),
+ evtout: new ScilabDouble([1], [1]),
+ state: new ScilabDouble(),
+ dstate: new ScilabDouble(),
+ odstate: list(),
+ rpar: new ScilabDouble(),
+ ipar: new ScilabDouble(),
+ opar: list(),
+ blocktype: new ScilabString(["d"]),
+ firing: new ScilabBoolean([-1], [-1]),
+ dep_ut: new ScilabBoolean([false, false]),
+ label: new ScilabString([""]),
+ nzcross: new ScilabDouble([0]),
+ nmode: new ScilabDouble([0]),
+ equations: list(),
+ uid: new ScilabString([count])
+ }),
+ doc: list(new ScilabString([count++]))
+ }));
+ scs_m_1.objs.push(scicos_block({
+ gui: new ScilabString(["OUT_f"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([398.20616, 616.18517]),
+ sz: new ScilabDouble([20, 20]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabString(["1"]),
+ pin: new ScilabDouble([6]),
+ pout: new ScilabDouble(),
+ pein: new ScilabDouble(),
+ peout: new ScilabDouble(),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;OUT_f&quot;,sz(1),sz(2));"]), new ScilabDouble([8])),
+ id: new ScilabString([""]),
+ in_implicit: new ScilabString(["E"]),
+ out_implicit: new ScilabDouble(),
+ in_style: new ScilabString(["ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0"]),
+ in_label: new ScilabString([""]),
+ style: new ScilabString(["OUT_f"])
+ }),
+ model: scicos_model({
+ sim: new ScilabString(["output"]),
+ in: new ScilabDouble([-1]),
+ in2: new ScilabDouble([-2]),
+ intyp: new ScilabDouble([-1]),
+ out: new ScilabDouble(),
+ out2: new ScilabDouble(),
+ outtyp: new ScilabDouble(),
+ evtin: new ScilabDouble(),
+ evtout: new ScilabDouble(),
+ state: new ScilabDouble(),
+ dstate: new ScilabDouble(),
+ odstate: list(),
+ rpar: new ScilabDouble(),
+ ipar: new ScilabDouble([1]),
+ opar: list(),
+ blocktype: new ScilabString(["c"]),
+ firing: new ScilabDouble(),
+ dep_ut: new ScilabBoolean([false, false]),
+ label: new ScilabString([""]),
+ nzcross: new ScilabDouble([0]),
+ nmode: new ScilabDouble([0]),
+ equations: list(),
+ uid: new ScilabString([count])
+ }),
+ doc: list(new ScilabString([count++]))
+ }));
+ scs_m_1.objs.push(scicos_block({
+ gui: new ScilabString(["CLKOUTV_f"]),
+ graphics: scicos_graphics({
+ orig: new ScilabDouble([339.49528, 505.10704]),
+ sz: new ScilabDouble([20, 30]),
+ flip: new ScilabBoolean([true]),
+ theta: new ScilabDouble([0]),
+ exprs: new ScilabString(["1"]),
+ pin: new ScilabDouble(),
+ pout: new ScilabDouble(),
+ pein: new ScilabDouble([8]),
+ peout: new ScilabDouble(),
+ gr_i: list(new ScilabString(["xstringb(orig(1),orig(2),&quot;CLKOUTV_f&quot;,sz(1),sz(2));"]), new ScilabDouble([8])),
+ id: new ScilabString([""]),
+ in_implicit: new ScilabDouble(),
+ out_implicit: new ScilabDouble(),
+ style: new ScilabString(["CLKOUTV_f"])
+ }),
+ model: scicos_model({
+ sim: new ScilabString(["output"]),
+ in: new ScilabDouble(),
+ in2: new ScilabDouble(),
+ intyp: new ScilabDouble(),
+ out: new ScilabDouble(),
+ out2: new ScilabDouble(),
+ outtyp: new ScilabDouble(),
+ evtin: new ScilabDouble([1]),
+ evtout: new ScilabDouble(),
+ state: new ScilabDouble(),
+ dstate: new ScilabDouble(),
+ odstate: list(),
+ rpar: new ScilabDouble(),
+ ipar: new ScilabDouble([1]),
+ opar: list(),
+ blocktype: new ScilabString(["d"]),
+ firing: new ScilabDouble(),
+ dep_ut: new ScilabBoolean([false, false]),
+ label: new ScilabString([""]),
+ nzcross: new ScilabDouble([0]),
+ nmode: new ScilabDouble([0]),
+ equations: list(),
+ uid: new ScilabString([count])
+ }),
+ doc: list(new ScilabString([count++]))
+ }));
+ scs_m_1.objs.push(scicos_link({
+ xx: new ScilabDouble([349.63473], [349.49528]),
+ yy: new ScilabDouble([600.47089], [565.10704]),
+ id: new ScilabString(["drawlink"]),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([5, -1]),
+ from: new ScilabDouble([1, 1, 0]),
+ to: new ScilabDouble([3, 1, 1])
+ }));
+ scs_m_1.objs.push(scicos_link({
+ xx: new ScilabDouble([349.49528], [266.69602], [266.69602], [270.35525], [342.80795], [342.80795], [349.63473]),
+ yy: new ScilabDouble([565.10704], [565.10704], [680.99483], [680.99483], [680.99483], [651.89946], [651.89946]),
+ id: new ScilabString(["drawlink"]),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([5, -1]),
+ from: new ScilabDouble([3, 2, 0]),
+ to: new ScilabDouble([1, 1, 1])
+ }));
+ scs_m_1.objs.push(scicos_link({
+ xx: new ScilabDouble([378.20616], [398.20616]),
+ yy: new ScilabDouble([626.18517], [626.18517]),
+ id: new ScilabString(["drawlink"]),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([1, 1]),
+ from: new ScilabDouble([1, 1, 0]),
+ to: new ScilabDouble([5, 1, 1])
+ }));
+ scs_m_1.objs.push(scicos_link({
+ xx: new ScilabDouble([349.49528], [349.49528]),
+ yy: new ScilabDouble([565.10704], [535.10704]),
+ id: new ScilabString(["drawlink"]),
+ thick: new ScilabDouble([0, 0]),
+ ct: new ScilabDouble([5, -1]),
+ from: new ScilabDouble([3, 1, 0]),
+ to: new ScilabDouble([7, 1, 1])
+ }));
+
+ var model = scicos_model({
+ sim: new ScilabString(["csuper"]),
+ in: new ScilabDouble(),
+ in2: new ScilabDouble(),
+ intyp: new ScilabDouble(),
+ out: new ScilabDouble([-1]),
+ out2: new ScilabDouble([1]),
+ outtyp: new ScilabDouble([1]),
+ evtin: new ScilabDouble(),
+ evtout: new ScilabDouble([1]),
+ state: new ScilabDouble(),
+ dstate: new ScilabDouble(),
+ odstate: list(),
+ rpar: scs_m_1,
+ ipar: new ScilabDouble(),
+ opar: list(),
+ blocktype: new ScilabString(["h"]),
+ firing: new ScilabDouble(),
+ dep_ut: new ScilabBoolean([false, false]),
+ label: new ScilabString([""]),
+ nzcross: new ScilabDouble([0]),
+ nmode: new ScilabDouble([0]),
+ equations: list()
+ });
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"Sigbuilder\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, new ScilabDouble(), gr_i);
+ return new BasicBlock(this.x);
+ }
+ Sigbuilder.prototype.details = function Sigbuilder() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/scifunc_block_m.js b/data_structures_correct/scifunc_block_m.js
new file mode 100644
index 0000000..a15ee4a
--- /dev/null
+++ b/data_structures_correct/scifunc_block_m.js
@@ -0,0 +1,43 @@
+function scifunc_block_m() {
+
+ scifunc_block_m.prototype.define = function scifunc_block_m() {
+ this.in1 = 1;
+ this.out = 1;
+ this.clkin = [];
+ this.clkout = [];
+ this.x0 = [];
+ this.z0 = [];
+ this.typ = "c";
+ this.auto = [];
+ this.rpar = [];
+ this.it = 1;
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["scifunc"]), new ScilabDouble([3]));
+ model.in = new ScilabDouble([this.in1]);
+ model.in2 = new ScilabDouble([this.in1]);
+ model.intyp = new ScilabDouble([this.it]);
+ model.out = new ScilabDouble([this.out]);
+ model.out2 = new ScilabDouble([this.out]);
+ model.outtyp = new ScilabDouble([this.it]);
+ model.evtin = new ScilabDouble();
+ model.evtout = new ScilabDouble();
+ model.state = new ScilabDouble();
+ model.dstate = new ScilabDouble();
+ model.rpar = new ScilabDouble();
+ model.ipar = new ScilabDouble([0]);
+ model.opar = list();
+ model.blocktype = new ScilabString([this.typ]);
+ model.firing = new ScilabDouble();
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = list(new ScilabString([sci2exp([this.in1, this.in1])], [sci2exp([this.out, this.out])], [sci2exp(this.clkin)], [sci2exp(this.clkout)], [sci2exp(this.x0)], [sci2exp(this.z0)], [sci2exp(this.rpar)], [sci2exp(this.auto)], [sci2exp(0)]), list(new ScilabString(["y1=sin(u1)"]), new ScilabString([" "]), new ScilabString([" "]), new ScilabString(["y1=sin(u1)"]), new ScilabString([" "]), new ScilabString([" "]), new ScilabString([" "])));
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"scifunc_block_m\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([4, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ scifunc_block_m.prototype.details = function scifunc_block_m() {
+ return this.x;
+ }
+}
diff --git a/dependencies.js b/dependencies.js
index 69b0f4c..e00887d 100644
--- a/dependencies.js
+++ b/dependencies.js
@@ -1,5 +1,4 @@
$.getScript('math.js');
-$.getScript('combined.js');
// @Adhitya: 02-07-2016: Commented Jitesh's work to call Data Structures individually,
// and combined all of them into combined.js using combine_script.bat
@@ -1038,8 +1037,7 @@ function _check() {
return str;
}
else if(typeof param == "string") {
- // needs to be changed later
- return param;
+ return '&quot;'+param+'&quot;';
}
else {
return param;
diff --git a/details.js b/details.js
index 9e3d0ed..452d336 100644
--- a/details.js
+++ b/details.js
@@ -305,37 +305,43 @@ function ScilabInteger() {
}
function int32() {
- var int = new ScilabInteger(arguments[0]);
+ var args = Array.prototype.slice.call(arguments);
+ var int = new ScilabInteger(...args);
int.intPrecision = "sci_int32";
return int;
}
function int16() {
- var int = new ScilabInteger(arguments[0]);
+ var args = Array.prototype.slice.call(arguments);
+ var int = new ScilabInteger(...args);
int.intPrecision = "sci_int16";
return int;
}
function int8() {
- var int = new ScilabInteger(arguments[0]);
+ var args = Array.prototype.slice.call(arguments);
+ var int = new ScilabInteger(...args);
int.intPrecision = "sci_int8";
return int;
}
function uint32() {
- var int = new ScilabInteger(arguments[0]);
+ var args = Array.prototype.slice.call(arguments);
+ var int = new ScilabInteger(...args);
int.intPrecision = "sci_uint32";
return int;
}
function uint16() {
- var int = new ScilabInteger(arguments[0]);
+ var args = Array.prototype.slice.call(arguments);
+ var int = new ScilabInteger(...args);
int.intPrecision = "sci_uint16";
return int;
}
function uint8() {
- var int = new ScilabInteger(arguments[0]);
+ var args = Array.prototype.slice.call(arguments);
+ var int = new ScilabInteger(...args);
int.intPrecision = "sci_uint8";
return int;
}
@@ -558,12 +564,12 @@ function sci2exp(c) {
return "list()";
}
} else if (typeof c.length === "undefined") {
- return c.toString();
+ return _check(c);
} else if (c.length == 0) {
return "[]";
- } else if (c.length == 1)
- return c.toString();
- else {
+ } else if (c.length == 1) {
+ return _check(c[0]);
+ } else {
var result = "[";
for (var i = 0; i < c.length; i++) {
if (typeof c[i].length === 'undefined') {
diff --git a/index.html b/index.html
index d0fe017..554ff15 100644
--- a/index.html
+++ b/index.html
@@ -15,6 +15,7 @@
<script type="text/javascript" src="details.js"></script>
<script type="text/javascript" src="setup.js"></script>
+ <script type="text/javascript" src="combined.js"></script>
<script type="text/javascript">
// Stores edgeState for every recently created edge in updateFixedTerminalPoint() function
@@ -365,9 +366,6 @@
// Source edge is replaced with first edge and futureSource edges
cell.name = 'SPLIT_f';
- var firstEdge = graph.insertEdge(parent, null, '', cell.getChildAt(1), sourceTarget);
- var thirdEdge = graph.insertEdge(parent, null, '', cell.getChildAt(2), target);
- var futureSource = graph.insertEdge(parent, null, '', source.source, cell.getChildAt(0));
// Hide all the ports of a split-block
cell.getChildAt(0).setVisible(false);
@@ -377,9 +375,6 @@
// Remove the current source
graph.removeCells([source], true);
- // Set the newly made futureSource as the source
- source = futureSource;
-
/*
* If there are any waypoints, divide them for the two newly created edges.
* The two newly created edges are inherited from the source edge
@@ -394,9 +389,6 @@
for(var i = seg; i < waypoints.length; i++) {
waypoints2.push(waypoints[i]);
}
-
- source.geometry.points = waypoints1;
- firstEdge.geometry.points = waypoints2;
}
// Find the waypoints of the current edge, and set the waypoints for the new thirdEdge
@@ -406,7 +398,13 @@
waypoints3.pop();
}
- thirdEdge.geometry.points = waypoints3;
+ // Create three edges associated with the split-block
+ var firstEdge = createEdgeObject(graph, cell.getChildAt(1), sourceTarget, waypoints2);
+ var thirdEdge = createEdgeObject(graph, cell.getChildAt(2), target, waypoints3);
+ var futureSource = createEdgeObject(graph, source.source, cell.getChildAt(0), waypoints1);
+
+ // Set the newly made futureSource as the source
+ source = futureSource;
// Connectable for the ports and the split-block should be false
cell.getChildAt(0).setConnectable(false);
@@ -515,9 +513,6 @@
// Source edge is replaced with first edge and futureSource edges
cell.name = 'SPLIT_f';
- var firstEdge = graph.insertEdge(parent, null, '', cell.getChildAt(1), sourceTarget);
- var thirdEdge = graph.insertEdge(parent, null, '', cell.getChildAt(2), source);
- var futureSource = graph.insertEdge(parent, null, '', target.source, cell.getChildAt(0));
// Hide all the ports of a split-block
cell.getChildAt(0).setVisible(false);
@@ -526,7 +521,6 @@
// Remove the current source
graph.removeCells([target], true);
- target = futureSource;
/*
* If there are any waypoints, divide them for the two newly created edges.
@@ -542,9 +536,6 @@
for(var i = seg; i < waypoints.length; i++) {
waypoints2.push(waypoints[i]);
}
-
- target.geometry.points = waypoints1;
- firstEdge.geometry.points = waypoints2;
}
// Find the waypoints of the current edge, and set the waypoints for the new thirdEdge
@@ -552,8 +543,15 @@
if(waypoints3 != null && waypoints3.length > 1) {
waypoints3.pop();
}
- waypoints3.reverse();
- thirdEdge.geometry.points = waypoints3;
+ waypoints3.reverse();
+
+ // Create three edges associated with the split-block
+ var firstEdge = createEdgeObject(graph, cell.getChildAt(1), sourceTarget, waypoints2);
+ var thirdEdge = createEdgeObject(graph, cell.getChildAt(2), source, waypoints3);
+ var futureSource = createEdgeObject(graph, target.source, cell.getChildAt(0), waypoints1);
+
+ // Set the newly made futureSource as the source
+ target = futureSource;
// Connectable for the ports and the split-block should be false
cell.getChildAt(0).setConnectable(false);
@@ -640,26 +638,14 @@
if((source.value.indexOf('Input') != -1 && target.value.indexOf('Output') != -1)
|| (target.value == 'CommandPort' && source.value == 'ControlPort')) {
- // Begin graph DOM update
- graph.getModel().beginUpdate();
-
- try {
+ // Get points for the current edge from the global edgeState object
+ var waypoints = edgeState.absolutePoints;
- // Insert new edge in place of current edge
- var newEdge = graph.insertEdge(parent, null, '', target, source);
+ // Reverse waypoint array
+ waypoints.reverse();
- // Get points for the current edge from the global edgeState object
- var waypoints = edgeState.absolutePoints;
-
- // Reverse waypoint array
- waypoints.reverse();
-
- // Set the points for the new edge
- newEdge.geometry.points = waypoints;
- }
- finally {
- graph.getModel().endUpdate();
- }
+ // Create a new edge
+ var newEdge = createEdgeObject(graph, target, source, waypoints);
// Return null for the current edge,
@@ -1571,6 +1557,53 @@
};
/*
+ * @jiteshjha
+ * createEdgeObject(@parameters) creates an edge on the graph DOM
+ * @Parameters :
+ * source -> source object for the edge
+ * target -> destination object for the edge
+ * points -> waypoints to be inserted in the geometry
+ */
+ function createEdgeObject(graph, source, target, points) {
+
+ // Start the update on the graph
+ graph.getModel().beginUpdate();
+
+ try {
+
+ // Create an edge from the given source object and target object
+ var edge = graph.insertEdge(graph.getDefaultParent(), null, '', source, target);
+
+ // Get geometry of the edge
+ var geometry = graph.getModel().getGeometry(edge);
+
+ /*
+ * Clone the geometry object
+ * NOTE: Direct manipulation of the geometry object may not be
+ * registered as an action for some cases, hence we clone the
+ * geometry, manipulate it and set the geometry.
+ */
+ var cloneGeometry = geometry.clone();
+
+ // Add points in the cloned geometry
+ cloneGeometry.points = points;
+
+ // Set the changed geometry for the edge
+ graph.getModel().setGeometry(edge, cloneGeometry);
+
+ // Refresh to reflect changes made
+ graph.refresh();
+ }
+ finally {
+
+ // End the update
+ graph.getModel().endUpdate();
+ }
+
+ return edge;
+ }
+
+ /*
@jiteshjha
Creates a dialog box related to the edge label properties.
The properties implemented are : edge label, label fontStyle,
@@ -2151,6 +2184,55 @@
var enc = new mxCodec(mxUtils.createXmlDocument());
var node = enc.encode(details);
var temp = enc.encode(parent);
+
+ /*
+ * @jiteshjha
+ */
+
+ // Get the stylesheet for the graph
+ var stylesheet = graph.getStylesheet();
+
+ // From the stylesheet, get the style of the particular block
+ var style = stylesheet.styles[name];
+
+ /*
+ * When a particular block is loaded for the first time,
+ * the image in the style of the block will be a path to the image.
+ * Set the label in the style property of the block has a html image,
+ * and set the image in the style property as null
+ *
+ * NOTE: Since the image of any block need not be changed for
+ * for every movement of that block, the image must be
+ * set only once.
+ */
+ if(style != null && style['image'] != null) {
+
+ // Make label as a image html element
+ var label = '<img src="' + style['image'] + '" height="80" width="80">';
+
+ // Set label
+ style['label'] = label;
+
+ // Set image as null
+ style['image'] = null;
+
+ // Add the label as a part of node
+ node.setAttribute('label', label);
+ }
+
+ /*
+ * If a particular block with image tag in it's style property
+ * has been invoked already, the image tag would be null for any
+ * successive instances of the same block. Hence, set the label
+ * from the label tag in style which was set when that blockModel
+ * was invoked on the first time.
+ */
+ if(style!= null && style['label'] != null) {
+
+ // Set label from the label field in the style property
+ node.setAttribute('label', style['label']);
+ }
+
node.setAttribute('parent', temp.getAttribute('id'));
var i, arr = [];
var blockModel = details_instance.x.model;
@@ -2321,13 +2403,6 @@
var root = req.getDocumentElement();
var dec = new mxCodec(root.ownerDocument);
dec.decode(root, graph.stylesheet);
-
- // Set the width and height of image for all blocks to 80 (height) x 80 (width)
- var style = new Object();
- style[mxConstants.STYLE_IMAGE_WIDTH] = '80';
- style[mxConstants.STYLE_IMAGE_HEIGHT] = '80';
- style['imageAlign'] = 'center';
- graph.getStylesheet().putDefaultVertexStyle(style);
};
</script>
<!--