summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data_structures_correct/SUPER_f.js42
-rw-r--r--dependencies.js79
2 files changed, 121 insertions, 0 deletions
diff --git a/data_structures_correct/SUPER_f.js b/data_structures_correct/SUPER_f.js
new file mode 100644
index 0000000..fb95e3a
--- /dev/null
+++ b/data_structures_correct/SUPER_f.js
@@ -0,0 +1,42 @@
+function SUPER_f() {
+
+ SUPER_f.prototype.define = function SUPER_f() {
+ var scs = scicos_diagram();
+ scs.props.title = new ScilabString(["Super_Block"]);
+
+ var in1 = new IN_f().internal();
+ in1.graphics.orig = new ScilabDouble([40, 40]);
+ in1.graphics.sz = new ScilabDouble([20, 20]);
+ in1.graphics.flip = new ScilabBoolean([true]);
+ in1.graphics.pout = new ScilabDouble([0]);
+ in1.model.uid = new ScilabString([count]);
+ in1.doc = list(new ScilabString([count++]));
+
+ var out = new OUT_f().internal();
+ out.graphics.orig = new ScilabDouble([240, 40]);
+ out.graphics.sz = new ScilabDouble([20, 20]);
+ out.graphics.flip = new ScilabBoolean([true]);
+ out.graphics.pin = new ScilabDouble([0]);
+ out.model.outtyp = new ScilabDouble();
+ out.model.uid = new ScilabString([count]);
+ out.doc = list(new ScilabString([count++]));
+ scs.objs.push(in1);
+ scs.objs.push(out);
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["super"]);
+ model.in = new ScilabDouble([1]);
+ model.out = new ScilabDouble([1]);
+ model.rpar = scs;
+ model.blocktype = new ScilabString(["h"]);
+ model.dep_ut = new ScilabBoolean([false, false]);
+
+ var gr_i = ["xstringb(orig(1),orig(2),\"SUPER_f\",sz(1),sz(2));"];
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, new ScilabDouble(), gr_i);
+ return new SuperBlock(this.x);
+ }
+
+ SUPER_f.prototype.details = function SUPER_f() {
+ return this.x;
+ }
+}
diff --git a/dependencies.js b/dependencies.js
index 8f5b078..89363d1 100644
--- a/dependencies.js
+++ b/dependencies.js
@@ -1159,6 +1159,85 @@ function Summation() {
}
}
+function SuperBlock() {
+ if (arguments.length > 0) {
+ var options = arguments[0];
+ this.angle = options.angle; // Not Known
+ this.blockType = getData(options.model.blocktype)[0];
+ this.connectable = options.connectable; // Not Known
+ var dep_ut = getData(options.model.dep_ut);
+ if (dep_ut[0] == "true")
+ this.dependsOnU = "1";
+ if (dep_ut[1] == "true")
+ this.dependsOnT = "1";
+ this.id = options.id;
+ this.interfaceFunctionName = arguments.callee.caller.name;
+ this.ordering = options.ordering;
+ this.parent = options.parent;
+ if (options.model.sim instanceof Array) {
+ this.simulationFunctionName = getData(options.model.sim[0])[0];
+ var func_type;
+ switch (getData(options.model.sim[1])[0].toString()) {
+ case "-2.0":
+ func_type = "ESELECT";
+ break;
+ case "-1.0":
+ func_type = "IFTHENELSE";
+ break;
+ case "1.0":
+ func_type = "TYPE_1";
+ break;
+ case "2.0":
+ func_type = "TYPE_2";
+ break;
+ case "3.0":
+ func_type = "TYPE_3";
+ break;
+ case "4.0":
+ func_type = "C_OR_FORTRAN";
+ break;
+ case "5.0":
+ func_type = "SCILAB";
+ break;
+ case "99.0":
+ func_type = "DEBUG";
+ break;
+ case "1001.0":
+ func_type = "DYNAMIC_FORTRAN_1";
+ break;
+ case "2001.0":
+ func_type = "DYNAMIC_C_1";
+ break;
+ case "2004.0":
+ func_type = "DYNAMIC_EXPLICIT_4";
+ break;
+ case "10001.0":
+ func_type = "OLDBLOCKS";
+ break;
+ case "10004.0":
+ func_type = "IMPLICIT_C_OR_FORTRAN";
+ break;
+ case "30004.0":
+ func_type = "MODELICA";
+ break;
+ }
+ this.simulationFunctionType = func_type;
+ } else {
+ this.simulationFunctionName = getData(options.model.sim)[0];
+ this.simulationFunctionType = "DEFAULT";
+ }
+ this.style = arguments.callee.caller.name;
+ this.value = options.value; // Not Known
+ this.vertex = options.vertex; // Not Known
+ this.visible = options.visible; // Not Known
+ this.realParameters = options.model.rpar;
+ this.oDState = list();
+ this.equations = list(); // Not Known
+ this.blockName = "SuperBlock";
+ this.blockElementName = arguments.callee.caller.name;
+ }
+}
+
function zeros() {
if (arguments.length == 0) {
return [0];