diff options
Diffstat (limited to 'js/Branching/MUX_f.js')
-rw-r--r-- | js/Branching/MUX_f.js | 34 |
1 files changed, 17 insertions, 17 deletions
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); } } |