summaryrefslogtreecommitdiff
path: root/js/Branching
diff options
context:
space:
mode:
authorSunil Shetye2018-09-18 17:38:01 +0530
committerSunil Shetye2018-10-08 11:24:12 +0530
commitf6d537573102a160601aa5c070f63455204d5f9d (patch)
tree7d61bbc8303725a3f9b0ab4e9662ab1ce962565d /js/Branching
parentf389f174481df676c841ebcc87a7b8b313921bbc (diff)
downloadsci2js-master.tar.gz
sci2js-master.tar.bz2
sci2js-master.zip
use this.in instead of this.in1HEADmaster
Diffstat (limited to 'js/Branching')
-rw-r--r--js/Branching/MUX.js34
-rw-r--r--js/Branching/MUX.pickle45
-rw-r--r--js/Branching/MUX_f.js34
-rw-r--r--js/Branching/MUX_f.pickle45
4 files changed, 78 insertions, 80 deletions
diff --git a/js/Branching/MUX.js b/js/Branching/MUX.js
index c42892d9..9a601e8f 100644
--- a/js/Branching/MUX.js
+++ b/js/Branching/MUX.js
@@ -1,15 +1,15 @@
/* autogenerated from "macros/Branching/MUX.sci" */
function MUX() {
MUX.prototype.define = function MUX() {
- this.in1 = 2;
+ this.in = 2;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["multiplex"]), new ScilabDouble([4]));
- this.model.in = new ScilabDouble(-transpose([1:this.in1]));
+ this.model.in = new ScilabDouble(-transpose([1:this.in]));
this.model.out = new ScilabDouble([0]);
- this.model.ipar = new ScilabDouble([this.in1]);
+ this.model.ipar = new ScilabDouble([this.in]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = new ScilabBoolean([true,false]);
- var exprs = string(this.in1);
+ var exprs = string(this.in);
var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MUX\",sz(1),sz(2));"]);
this.x = new standard_define(new ScilabDouble([.5,2]),this.model,new ScilabString([exprs]),gr_i);
return new BasicBlock(this.x);
@@ -21,7 +21,7 @@ function MUX() {
var exprs = this.graphics.exprs;
this.set_param_popup_title = "Set MUX block parameters";
var options = {
- in1:["number of input ports or vector of sizes",this.in1],
+ in:["number of input ports or vector of sizes",this.in],
}
return options;
}
@@ -29,45 +29,45 @@ function MUX() {
var exprs = this.graphics.exprs;
while (true) {
var ok = true;
- this.in1 = parseFloat(arguments[0]["in1"]);
- var exprs = [arguments[0]["in1"]];
+ this.in = parseFloat(arguments[0]["in"]);
+ var exprs = [arguments[0]["in"]];
if (!ok) {
break;
}
- if (size(this.in1,"*")==1) {
- if (this.in1<2||this.in1>31) {
+ if (size(this.in,"*")==1) {
+ if (this.in<2||this.in>31) {
message("Block must have at least two input ports and at most 31");
throw "user error";
var ok = false;
} else {
- var tmpvar0 = check_io(this.model,this.graphics,-transpose([1:this.in1]),0,[],[]);
+ var tmpvar0 = check_io(this.model,this.graphics,-transpose([1:this.in]),0,[],[]);
this.model = tmpvar0[0];
this.graphics = tmpvar0[1];
var ok = tmpvar0[2];
}
} else {
- if (size(this.in1,"*")<2||or(this.in1==0)||size(this.in1,"*")>31) {
+ if (size(this.in,"*")<2||or(this.in==0)||size(this.in,"*")>31) {
message([["Block must have at least two input ports"],["and at most 31. Size 0 is not allowed. "]]);
throw "user error";
var ok = false;
} else {
- if (min(this.in1)<0) {
+ if (min(this.in)<0) {
var nout = 0;
} else {
- var nout = sum(this.in1);
+ var nout = sum(this.in);
}
- var tmpvar1 = check_io(this.model,this.graphics,this.in1.slice(),nout,[],[]);
+ var tmpvar1 = check_io(this.model,this.graphics,this.in.slice(),nout,[],[]);
this.model = tmpvar1[0];
this.graphics = tmpvar1[1];
var ok = tmpvar1[2];
if (ok) {
- this.in1 = size(this.in1,"*");
+ this.in = size(this.in,"*");
}
}
}
if (ok) {
this.graphics.exprs = new ScilabDouble([exprs]);
- this.model.ipar = new ScilabDouble([this.in1]);
+ this.model.ipar = new ScilabDouble([this.in]);
this.x.graphics = this.graphics;
this.x.model = this.model;
break;
@@ -81,7 +81,7 @@ function MUX() {
MUX.prototype.importset = function MUX() {
var graphics = this.x.graphics;
var ary = getData(graphics.exprs);
- this.in1 = ary[0];
+ this.in = ary[0];
}
MUX.prototype.getContainer = function MUX() { return new BasicBlock(this.x); }
}
diff --git a/js/Branching/MUX.pickle b/js/Branching/MUX.pickle
index 101416ce..dbcaa8bc 100644
--- a/js/Branching/MUX.pickle
+++ b/js/Branching/MUX.pickle
@@ -25,54 +25,53 @@ sS'ok'
p5
S'boolean'
p6
-sS'model.blocktype'
+sS'model.in'
p7
-S'string'
+S'vector'
p8
sS'x.graphics'
p9
S'object'
p10
-sS'graphics.exprs'
+sS'in'
p11
-NsS'in1'
-p12
g4
sS'model.dep_ut'
-p13
+p12
S'vector_boolean'
-p14
+p13
sS'exprs'
+p14
+S'string'
p15
-g8
sS'x.model'
p16
NsS'gr_i'
p17
-S'vector'
+g8
+sS'graphics.exprs'
p18
-sS'model.in'
+NsS'graphics'
p19
-g18
-sS'graphics'
-p20
g10
sS'y'
-p21
-g18
+p20
+g8
sS'x'
-p22
-g18
+p21
+g8
sS'model'
-p23
+p22
g10
sS'model.ipar'
+p23
+NsS'typ'
p24
-g4
-sS'typ'
-p25
-g18
+g8
sS'nout'
-p26
+p25
g4
+sS'model.blocktype'
+p26
+g15
s. \ No newline at end of file
diff --git a/js/Branching/MUX_f.js b/js/Branching/MUX_f.js
index 274150dd..8e50d327 100644
--- a/js/Branching/MUX_f.js
+++ b/js/Branching/MUX_f.js
@@ -1,15 +1,15 @@
/* autogenerated from "macros/Branching/MUX_f.sci" */
function MUX_f() {
MUX_f.prototype.define = function MUX_f() {
- this.in1 = 2;
+ this.in = 2;
this.model = scicos_model();
this.model.sim = list(new ScilabString(["mux"]), new ScilabDouble([1]));
- this.model.in = new ScilabDouble(-transpose([1:this.in1]));
+ this.model.in = new ScilabDouble(-transpose([1:this.in]));
this.model.out = new ScilabDouble([0]);
- this.model.ipar = new ScilabDouble([this.in1]);
+ this.model.ipar = new ScilabDouble([this.in]);
this.model.blocktype = new ScilabString(["c"]);
this.model.dep_ut = new ScilabBoolean([true,false]);
- var exprs = string(this.in1);
+ var exprs = string(this.in);
var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"MUX_f\",sz(1),sz(2));"]);
this.x = new standard_define(new ScilabDouble([0.5,2]),this.model,new ScilabString([exprs]),gr_i);
return new BasicBlock(this.x);
@@ -21,7 +21,7 @@ function MUX_f() {
var exprs = this.graphics.exprs;
this.set_param_popup_title = "Set MUX block parameters";
var options = {
- in1:["number of input ports or vector of sizes",this.in1],
+ in:["number of input ports or vector of sizes",this.in],
}
return options;
}
@@ -29,45 +29,45 @@ function MUX_f() {
var exprs = this.graphics.exprs;
while (true) {
var ok = true;
- this.in1 = parseFloat(arguments[0]["in1"]);
- var exprs = [arguments[0]["in1"]];
+ this.in = parseFloat(arguments[0]["in"]);
+ var exprs = [arguments[0]["in"]];
if (!ok) {
break;
}
- if (size(this.in1,"*")==1) {
- if (this.in1<2||this.in1>8) {
+ if (size(this.in,"*")==1) {
+ if (this.in<2||this.in>8) {
message("Block must have at least two input ports and at most eight");
throw "user error";
var ok = false;
} else {
- var tmpvar0 = check_io(this.model,this.graphics,-transpose([1:this.in1]),0,[],[]);
+ var tmpvar0 = check_io(this.model,this.graphics,-transpose([1:this.in]),0,[],[]);
this.model = tmpvar0[0];
this.graphics = tmpvar0[1];
var ok = tmpvar0[2];
}
} else {
- if (size(this.in1,"*")<2||size(this.in1,"*")>8||or(this.in1==0)) {
+ if (size(this.in,"*")<2||size(this.in,"*")>8||or(this.in==0)) {
message([["Block must have at least two input ports"],["and at most eight, and size 0 is not allowed. "]]);
throw "user error";
var ok = false;
} else {
- if (min(this.in1)<0) {
+ if (min(this.in)<0) {
var nout = 0;
} else {
- var nout = sum(this.in1);
+ var nout = sum(this.in);
}
- var tmpvar1 = check_io(this.model,this.graphics,this.in1.slice(),nout,[],[]);
+ var tmpvar1 = check_io(this.model,this.graphics,this.in.slice(),nout,[],[]);
this.model = tmpvar1[0];
this.graphics = tmpvar1[1];
var ok = tmpvar1[2];
if (ok) {
- this.in1 = size(this.in1,"*");
+ this.in = size(this.in,"*");
}
}
}
if (ok) {
this.graphics.exprs = new ScilabDouble([exprs]);
- this.model.ipar = new ScilabDouble([this.in1]);
+ this.model.ipar = new ScilabDouble([this.in]);
this.x.graphics = this.graphics;
this.x.model = this.model;
break;
@@ -81,7 +81,7 @@ function MUX_f() {
MUX_f.prototype.importset = function MUX_f() {
var graphics = this.x.graphics;
var ary = getData(graphics.exprs);
- this.in1 = ary[0];
+ this.in = ary[0];
}
MUX_f.prototype.getContainer = function MUX_f() { return new BasicBlock(this.x); }
}
diff --git a/js/Branching/MUX_f.pickle b/js/Branching/MUX_f.pickle
index 101416ce..dbcaa8bc 100644
--- a/js/Branching/MUX_f.pickle
+++ b/js/Branching/MUX_f.pickle
@@ -25,54 +25,53 @@ sS'ok'
p5
S'boolean'
p6
-sS'model.blocktype'
+sS'model.in'
p7
-S'string'
+S'vector'
p8
sS'x.graphics'
p9
S'object'
p10
-sS'graphics.exprs'
+sS'in'
p11
-NsS'in1'
-p12
g4
sS'model.dep_ut'
-p13
+p12
S'vector_boolean'
-p14
+p13
sS'exprs'
+p14
+S'string'
p15
-g8
sS'x.model'
p16
NsS'gr_i'
p17
-S'vector'
+g8
+sS'graphics.exprs'
p18
-sS'model.in'
+NsS'graphics'
p19
-g18
-sS'graphics'
-p20
g10
sS'y'
-p21
-g18
+p20
+g8
sS'x'
-p22
-g18
+p21
+g8
sS'model'
-p23
+p22
g10
sS'model.ipar'
+p23
+NsS'typ'
p24
-g4
-sS'typ'
-p25
-g18
+g8
sS'nout'
-p26
+p25
g4
+sS'model.blocktype'
+p26
+g15
s. \ No newline at end of file