summaryrefslogtreecommitdiff
path: root/js/Branching
diff options
context:
space:
mode:
Diffstat (limited to 'js/Branching')
-rw-r--r--js/Branching/CLKFROM.js6
-rw-r--r--js/Branching/CLKFROM.pickle6
-rw-r--r--js/Branching/CLKGOTO.js12
-rw-r--r--js/Branching/CLKGOTO.pickle8
-rw-r--r--js/Branching/CLKGotoTagVisibility.js6
-rw-r--r--js/Branching/CLKGotoTagVisibility.pickle6
-rw-r--r--js/Branching/DEMUX.js28
-rw-r--r--js/Branching/DEMUX.pickle6
-rw-r--r--js/Branching/DEMUX_f.js28
-rw-r--r--js/Branching/DEMUX_f.pickle6
-rw-r--r--js/Branching/ESELECT_f.js34
-rw-r--r--js/Branching/ESELECT_f.pickle10
-rw-r--r--js/Branching/EXTRACTOR.js16
-rw-r--r--js/Branching/EXTRACTOR.pickle8
-rw-r--r--js/Branching/FROM.js6
-rw-r--r--js/Branching/FROM.pickle6
-rw-r--r--js/Branching/FROMMO.js6
-rw-r--r--js/Branching/FROMMO.pickle6
-rw-r--r--js/Branching/GOTO.js12
-rw-r--r--js/Branching/GOTO.pickle8
-rw-r--r--js/Branching/GOTOMO.js12
-rw-r--r--js/Branching/GOTOMO.pickle8
-rw-r--r--js/Branching/GotoTagVisibility.js6
-rw-r--r--js/Branching/GotoTagVisibility.pickle6
-rw-r--r--js/Branching/GotoTagVisibilityMO.js6
-rw-r--r--js/Branching/GotoTagVisibilityMO.pickle6
-rw-r--r--js/Branching/ISELECT_f.js16
-rw-r--r--js/Branching/ISELECT_f.pickle8
-rw-r--r--js/Branching/ISELECT_m.js26
-rw-r--r--js/Branching/ISELECT_m.pickle10
-rw-r--r--js/Branching/MUX.js28
-rw-r--r--js/Branching/MUX.pickle6
-rw-r--r--js/Branching/MUX_f.js28
-rw-r--r--js/Branching/MUX_f.pickle6
-rw-r--r--js/Branching/M_SWITCH.js26
-rw-r--r--js/Branching/M_SWITCH.pickle10
-rw-r--r--js/Branching/NRMSOM_f.js8
-rw-r--r--js/Branching/NRMSOM_f.pickle6
-rw-r--r--js/Branching/RELAY_f.js12
-rw-r--r--js/Branching/RELAY_f.pickle8
-rw-r--r--js/Branching/SCALAR2VECTOR.js14
-rw-r--r--js/Branching/SCALAR2VECTOR.pickle6
-rw-r--r--js/Branching/SELECT_f.js16
-rw-r--r--js/Branching/SELECT_f.pickle8
-rw-r--r--js/Branching/SELECT_m.js26
-rw-r--r--js/Branching/SELECT_m.pickle10
-rw-r--r--js/Branching/SWITCH2.js24
-rw-r--r--js/Branching/SWITCH2.pickle10
-rw-r--r--js/Branching/SWITCH2_m.js32
-rw-r--r--js/Branching/SWITCH2_m.pickle12
-rw-r--r--js/Branching/SWITCH_f.js12
-rw-r--r--js/Branching/SWITCH_f.pickle8
52 files changed, 368 insertions, 276 deletions
diff --git a/js/Branching/CLKFROM.js b/js/Branching/CLKFROM.js
index ec4053c5..b49997ff 100644
--- a/js/Branching/CLKFROM.js
+++ b/js/Branching/CLKFROM.js
@@ -24,15 +24,15 @@ function CLKFROM() {
model = arg1.model;
exprs = graphics.exprs;
while (true) {
- [ok,tag,exprs] = scicos_getvalue("Set block parameters","Tag",list("str",-1),exprs);
+ [ok,this.tag,exprs] = scicos_getvalue("Set block parameters","Tag",list("str",-1),exprs);
if (!ok) {
break;
}
- if (model.opar!=list(tag)) {
+ if (model.opar!=list(this.tag)) {
needcompile = 4;
y = needcompile;
}
- model.opar = list(tag);
+ model.opar = list(this.tag);
model.evtout = 1;
model.firing = -1;
graphics.exprs = exprs;
diff --git a/js/Branching/CLKFROM.pickle b/js/Branching/CLKFROM.pickle
index 0d1dde24..ef920dcc 100644
--- a/js/Branching/CLKFROM.pickle
+++ b/js/Branching/CLKFROM.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'tag'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Branching/CLKGOTO.js b/js/Branching/CLKGOTO.js
index 6a058dff..d01fd341 100644
--- a/js/Branching/CLKGOTO.js
+++ b/js/Branching/CLKGOTO.js
@@ -25,22 +25,22 @@ function CLKGOTO() {
model = arg1.model;
exprs = graphics.exprs;
while (true) {
- [ok,tag,tagvis,exprs] = scicos_getvalue("Set block parameters",[["Tag"],["Tag Visibility (1=Local 2=Scoped 3=Global)"]],list("str",-1,"vec",1),exprs);
+ [ok,this.tag,this.tagvis,exprs] = scicos_getvalue("Set block parameters",[["Tag"],["Tag Visibility (1=Local 2=Scoped 3=Global)"]],list("str",-1,"vec",1),exprs);
if (!ok) {
break;
}
- if (((tagvis<1)||(tagvis>3))) {
+ if (((this.tagvis<1)||(this.tagvis>3))) {
message("Tag Visibility must be between 1 and 3");
ok = false;
}
- tagvis = int(tagvis);
+ this.tagvis = int(this.tagvis);
if (ok) {
- if (((model.opar!=list(tag))||(model.ipar!=tagvis))) {
+ if (((model.opar!=list(this.tag))||(model.ipar!=this.tagvis))) {
needcompile = 4;
y = needcompile;
}
- model.opar = list(tag);
- model.ipar = tagvis;
+ model.opar = list(this.tag);
+ model.ipar = this.tagvis;
model.evtin = 1;
model.firing = -1;
graphics.exprs = exprs;
diff --git a/js/Branching/CLKGOTO.pickle b/js/Branching/CLKGOTO.pickle
index 0d1dde24..84d200d9 100644
--- a/js/Branching/CLKGOTO.pickle
+++ b/js/Branching/CLKGOTO.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'tag'
+p3
+aS'tagvis'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Branching/CLKGotoTagVisibility.js b/js/Branching/CLKGotoTagVisibility.js
index dbcb0514..5c73f47a 100644
--- a/js/Branching/CLKGotoTagVisibility.js
+++ b/js/Branching/CLKGotoTagVisibility.js
@@ -30,17 +30,17 @@ function CLKGotoTagVisibility() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,tag,exprs] = scicos_getvalue("Set parameters",["GotoTag"],list("str",-1),exprs);
+ [ok,this.tag,exprs] = scicos_getvalue("Set parameters",["GotoTag"],list("str",-1),exprs);
if (!ok) {
break;
}
if (ok) {
- if (model.opar!=list(tag)) {
+ if (model.opar!=list(this.tag)) {
needcompile = 4;
y = needcompile;
}
graphics.exprs = exprs;
- model.opar = list(tag);
+ model.opar = list(this.tag);
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Branching/CLKGotoTagVisibility.pickle b/js/Branching/CLKGotoTagVisibility.pickle
index 0d1dde24..ef920dcc 100644
--- a/js/Branching/CLKGotoTagVisibility.pickle
+++ b/js/Branching/CLKGotoTagVisibility.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'tag'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Branching/DEMUX.js b/js/Branching/DEMUX.js
index 6f9fc546..84c105d6 100644
--- a/js/Branching/DEMUX.js
+++ b/js/Branching/DEMUX.js
@@ -1,16 +1,16 @@
/* autogenerated from "macros/Branching/DEMUX.sci" */
function DEMUX() {
DEMUX.prototype.define = function DEMUX() {
- out = 2;
+ this.out = 2;
model = scicos_model();
model.sim = list("multiplex",4);
model.in1 = 0;
- model.out = -transpose([1:out]);
- model.ipar = out;
+ model.out = -transpose([1:this.out]);
+ model.ipar = this.out;
model.blocktype = "c";
model.firing = [];
model.dep_ut = [true,false];
- exprs = string(out);
+ exprs = string(this.out);
gr_i = [];
this.x = standard_define([.5,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -26,36 +26,36 @@ function DEMUX() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,out,exprs] = scicos_getvalue("Set DEMUX block parameters",["number of output ports or vector of sizes"],list("intvec",-1),exprs);
+ [ok,this.out,exprs] = scicos_getvalue("Set DEMUX block parameters",["number of output ports or vector of sizes"],list("intvec",-1),exprs);
if (!ok) {
break;
}
- if (size(out,"*")==1) {
- if (out<2||out>31) {
+ if (size(this.out,"*")==1) {
+ if (this.out<2||this.out>31) {
message("Block must have at least 2 and at most 31 output ports");
ok = false;
} else {
- [model,graphics,ok] = check_io(model,graphics,0,-transpose([1:out]),[],[]);
+ [model,graphics,ok] = check_io(model,graphics,0,-transpose([1:this.out]),[],[]);
}
} else {
- if (size(out,"*")<2||or(out==0)||size(out,"*")>31) {
+ if (size(this.out,"*")<2||or(this.out==0)||size(this.out,"*")>31) {
message([["Block must have at least 2 and at most 31 output ports"],["size 0 is not allowed"]]);
ok = false;
} else {
- if (min(out)<0) {
+ if (min(this.out)<0) {
nin = 0;
} else {
- nin = sum(out);
+ nin = sum(this.out);
}
- [model,graphics,ok] = check_io(model,graphics,nin,out.slice(),[],[]);
+ [model,graphics,ok] = check_io(model,graphics,nin,this.out.slice(),[],[]);
if (ok) {
- out = size(out,"*");
+ this.out = size(this.out,"*");
}
}
}
if (ok) {
graphics.exprs = exprs;
- model.ipar = out;
+ model.ipar = this.out;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Branching/DEMUX.pickle b/js/Branching/DEMUX.pickle
index 0d1dde24..42592b12 100644
--- a/js/Branching/DEMUX.pickle
+++ b/js/Branching/DEMUX.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'out'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Branching/DEMUX_f.js b/js/Branching/DEMUX_f.js
index 3092c9ae..3a67be31 100644
--- a/js/Branching/DEMUX_f.js
+++ b/js/Branching/DEMUX_f.js
@@ -1,16 +1,16 @@
/* autogenerated from "macros/Branching/DEMUX_f.sci" */
function DEMUX_f() {
DEMUX_f.prototype.define = function DEMUX_f() {
- out = 2;
+ this.out = 2;
model = scicos_model();
model.sim = list("demux",1);
model.in1 = 0;
- model.out = -transpose([1:out]);
- model.ipar = out;
+ model.out = -transpose([1:this.out]);
+ model.ipar = this.out;
model.blocktype = "c";
model.firing = [];
model.dep_ut = [true,false];
- exprs = string(out);
+ exprs = string(this.out);
gr_i = [];
this.x = standard_define([.5,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -26,36 +26,36 @@ function DEMUX_f() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,out,exprs] = scicos_getvalue("Set DEMUX block parameters",["number of output ports or vector of sizes"],list("vec",-1),exprs);
+ [ok,this.out,exprs] = scicos_getvalue("Set DEMUX block parameters",["number of output ports or vector of sizes"],list("vec",-1),exprs);
if (!ok) {
break;
}
- if (size(out,"*")==1) {
- if (out<2||out>8) {
+ if (size(this.out,"*")==1) {
+ if (this.out<2||this.out>8) {
message("Block must have at least 2 and at most 8 output ports");
ok = false;
} else {
- [model,graphics,ok] = check_io(model,graphics,0,-transpose([1:out]),[],[]);
+ [model,graphics,ok] = check_io(model,graphics,0,-transpose([1:this.out]),[],[]);
}
} else {
- if (size(out,"*")<2||size(out,"*")>8||or(out==0)) {
+ if (size(this.out,"*")<2||size(this.out,"*")>8||or(this.out==0)) {
message([["Block must have at least 2 and at most 8 output ports"],["and size 0 is not allowed"]]);
ok = false;
} else {
- if (min(out)<0) {
+ if (min(this.out)<0) {
nin = 0;
} else {
- nin = sum(out);
+ nin = sum(this.out);
}
- [model,graphics,ok] = check_io(model,graphics,nin,out.slice(),[],[]);
+ [model,graphics,ok] = check_io(model,graphics,nin,this.out.slice(),[],[]);
if (ok) {
- out = size(out,"*");
+ this.out = size(this.out,"*");
}
}
}
if (ok) {
graphics.exprs = exprs;
- model.ipar = out;
+ model.ipar = this.out;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Branching/DEMUX_f.pickle b/js/Branching/DEMUX_f.pickle
index 0d1dde24..42592b12 100644
--- a/js/Branching/DEMUX_f.pickle
+++ b/js/Branching/DEMUX_f.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'out'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Branching/ESELECT_f.js b/js/Branching/ESELECT_f.js
index 09fc13c5..31a020ab 100644
--- a/js/Branching/ESELECT_f.js
+++ b/js/Branching/ESELECT_f.js
@@ -1,21 +1,21 @@
/* autogenerated from "macros/Branching/ESELECT_f.sci" */
function ESELECT_f() {
ESELECT_f.prototype.define = function ESELECT_f() {
- out = 2;
+ this.out = 2;
model = scicos_model();
model.sim = list("eselect",-2);
model.in1 = 1;
model.in2 = 1;
model.intyp = -1;
model.evtin = 1;
- model.evtout = ones(out,1);
+ model.evtout = ones(this.out,1);
model.blocktype = "l";
- model.firing = -ones(out,1);
+ model.firing = -ones(this.out,1);
model.dep_ut = [true,false];
model.nmode = 0;
model.nzcross = 0;
gr_i = [];
- exprs = [[string(out)],[string(1)],[string(model.nmode)]];
+ exprs = [[string(this.out)],[string(1)],[string(model.nmode)]];
this.x = standard_define([4,2],model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -36,30 +36,30 @@ function ESELECT_f() {
}
model = arg1.model;
while (true) {
- [ok,out,inh,nmod,exprs] = scicos_getvalue("Set ESELECT block parameters",[["number of output event ports"],["Inherit (1: no, 0: yes)"],["zero-crossing (0: no, 1: yes)"]],list("vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.out,this.inh,this.nmod,exprs] = scicos_getvalue("Set ESELECT block parameters",[["number of output event ports"],["Inherit (1: no, 0: yes)"],["zero-crossing (0: no, 1: yes)"]],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- if (nmod!=0) {
- nmod = 1;
+ if (this.nmod!=0) {
+ this.nmod = 1;
}
- if (inh==0) {
- inh = [];
+ if (this.inh==0) {
+ this.inh = [];
} else {
- inh = 1;
+ this.inh = 1;
}
- out = int(out);
- if (out<2) {
+ this.out = int(this.out);
+ if (this.out<2) {
message("Block must have at least two output ports");
} else {
- [model,graphics,ok] = check_io(model,graphics,1,[],inh,[ones(out,1)]);
+ [model,graphics,ok] = check_io(model,graphics,1,[],this.inh,[ones(this.out,1)]);
if (ok) {
graphics.exprs = exprs;
- model.evtout = ones(out,1);
- model.firing = -ones(out,1);
+ model.evtout = ones(this.out,1);
+ model.firing = -ones(this.out,1);
this.x.graphics = graphics;
- model.nmode = nmod;
- model.nzcross = nmod;
+ model.nmode = this.nmod;
+ model.nzcross = this.nmod;
this.x.model = model;
break;
}
diff --git a/js/Branching/ESELECT_f.pickle b/js/Branching/ESELECT_f.pickle
index 0d1dde24..43774097 100644
--- a/js/Branching/ESELECT_f.pickle
+++ b/js/Branching/ESELECT_f.pickle
@@ -4,6 +4,12 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'inh'
+p3
+aS'nmod'
+p4
+aS'out'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/Branching/EXTRACTOR.js b/js/Branching/EXTRACTOR.js
index 7df96459..b34bd597 100644
--- a/js/Branching/EXTRACTOR.js
+++ b/js/Branching/EXTRACTOR.js
@@ -1,15 +1,15 @@
/* autogenerated from "macros/Branching/EXTRACTOR.sci" */
function EXTRACTOR() {
EXTRACTOR.prototype.define = function EXTRACTOR() {
- ind = 1;
+ this.ind = 1;
model = scicos_model();
model.sim = list("extractor",4);
model.in1 = -1;
model.out = 1;
model.blocktype = "c";
model.dep_ut = [true,false];
- model.ipar = ind;
- exprs = [sci2exp(ind)];
+ model.ipar = this.ind;
+ exprs = [sci2exp(this.ind)];
gr_i = [];
this.x = standard_define([3,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -25,15 +25,15 @@ function EXTRACTOR() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,ind,exprs] = scicos_getvalue("Set block parameters",["indices to extract"],list("vec",-1),exprs);
+ [ok,this.ind,exprs] = scicos_getvalue("Set block parameters",["indices to extract"],list("vec",-1),exprs);
if (!ok) {
break;
}
- ind = int(ind);
- ind = ind.slice();
- [model,graphics,ok] = check_io(model,graphics,[-1],size(ind,1),[],[]);
+ this.ind = int(this.ind);
+ this.ind = this.ind.slice();
+ [model,graphics,ok] = check_io(model,graphics,[-1],size(this.ind,1),[],[]);
if (ok) {
- model.ipar = ind;
+ model.ipar = this.ind;
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Branching/EXTRACTOR.pickle b/js/Branching/EXTRACTOR.pickle
index 0d1dde24..9485edee 100644
--- a/js/Branching/EXTRACTOR.pickle
+++ b/js/Branching/EXTRACTOR.pickle
@@ -2,8 +2,10 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'ind'
p2
-atp3
-Rp4
+aS'x'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Branching/FROM.js b/js/Branching/FROM.js
index 716fc793..2fd6c169 100644
--- a/js/Branching/FROM.js
+++ b/js/Branching/FROM.js
@@ -30,17 +30,17 @@ function FROM() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,tag,exprs] = scicos_getvalue("Set parameters",["Tag"],list("str",-1),exprs);
+ [ok,this.tag,exprs] = scicos_getvalue("Set parameters",["Tag"],list("str",-1),exprs);
if (!ok) {
break;
}
if (ok) {
- if (model.opar!=list(tag)) {
+ if (model.opar!=list(this.tag)) {
needcompile = 4;
y = needcompile;
}
graphics.exprs = exprs;
- model.opar = list(tag);
+ model.opar = list(this.tag);
this.x.model = model;
this.x.graphics = graphics;
break;
diff --git a/js/Branching/FROM.pickle b/js/Branching/FROM.pickle
index 0d1dde24..ef920dcc 100644
--- a/js/Branching/FROM.pickle
+++ b/js/Branching/FROM.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'tag'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Branching/FROMMO.js b/js/Branching/FROMMO.js
index bbf770a3..0848ff5b 100644
--- a/js/Branching/FROMMO.js
+++ b/js/Branching/FROMMO.js
@@ -33,17 +33,17 @@ function FROMMO() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,tag,exprs] = scicos_getvalue("Set parameters",["Tag"],list("str",-1),exprs);
+ [ok,this.tag,exprs] = scicos_getvalue("Set parameters",["Tag"],list("str",-1),exprs);
if (!ok) {
break;
}
if (ok) {
- if (model.opar!=list(tag)) {
+ if (model.opar!=list(this.tag)) {
needcompile = 4;
y = needcompile;
}
graphics.exprs = exprs;
- model.opar = list(tag);
+ model.opar = list(this.tag);
this.x.model = model;
this.x.graphics = graphics;
break;
diff --git a/js/Branching/FROMMO.pickle b/js/Branching/FROMMO.pickle
index 0d1dde24..ef920dcc 100644
--- a/js/Branching/FROMMO.pickle
+++ b/js/Branching/FROMMO.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'tag'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Branching/GOTO.js b/js/Branching/GOTO.js
index 7c2de99e..52abc035 100644
--- a/js/Branching/GOTO.js
+++ b/js/Branching/GOTO.js
@@ -30,23 +30,23 @@ function GOTO() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,tag,tagvis,exprs] = scicos_getvalue("Set parameters",[["Tag"],["Tag Visibility(1=Local 2=scoped 3= global)"]],list("str",-1,"vec",1),exprs);
+ [ok,this.tag,this.tagvis,exprs] = scicos_getvalue("Set parameters",[["Tag"],["Tag Visibility(1=Local 2=scoped 3= global)"]],list("str",-1,"vec",1),exprs);
if (!ok) {
break;
}
- tagvis = int(tagvis);
- if (((tagvis<1)||(tagvis>3))) {
+ this.tagvis = int(this.tagvis);
+ if (((this.tagvis<1)||(this.tagvis>3))) {
message("Tag Visibility must be between 1 and 3");
ok = false;
}
if (ok) {
- if (((model.ipar!=tagvis)||(model.opar!=list(tag)))) {
+ if (((model.ipar!=this.tagvis)||(model.opar!=list(this.tag)))) {
needcompile = 4;
y = needcompile;
}
graphics.exprs = exprs;
- model.opar = list(tag);
- model.ipar = tagvis;
+ model.opar = list(this.tag);
+ model.ipar = this.tagvis;
this.x.model = model;
this.x.graphics = graphics;
arg1 = this.x;
diff --git a/js/Branching/GOTO.pickle b/js/Branching/GOTO.pickle
index 0d1dde24..84d200d9 100644
--- a/js/Branching/GOTO.pickle
+++ b/js/Branching/GOTO.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'tag'
+p3
+aS'tagvis'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Branching/GOTOMO.js b/js/Branching/GOTOMO.js
index 76e1d633..b4d615bf 100644
--- a/js/Branching/GOTOMO.js
+++ b/js/Branching/GOTOMO.js
@@ -33,23 +33,23 @@ function GOTOMO() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,tag,tagvis,exprs] = scicos_getvalue("Set parameters",[["Tag"],["Tag Visibility(1=Local 2=scoped 3= global)"]],list("str",-1,"vec",1),exprs);
+ [ok,this.tag,this.tagvis,exprs] = scicos_getvalue("Set parameters",[["Tag"],["Tag Visibility(1=Local 2=scoped 3= global)"]],list("str",-1,"vec",1),exprs);
if (!ok) {
break;
}
- tagvis = int(tagvis);
- if (((tagvis<1)||(tagvis>3))) {
+ this.tagvis = int(this.tagvis);
+ if (((this.tagvis<1)||(this.tagvis>3))) {
message("Tag Visibility must be between 1 and 3");
ok = false;
}
if (ok) {
- if (((model.ipar!=tagvis)||(model.opar!=list(tag)))) {
+ if (((model.ipar!=this.tagvis)||(model.opar!=list(this.tag)))) {
needcompile = 4;
y = needcompile;
}
graphics.exprs = exprs;
- model.opar = list(tag);
- model.ipar = tagvis;
+ model.opar = list(this.tag);
+ model.ipar = this.tagvis;
this.x.model = model;
this.x.graphics = graphics;
arg1 = this.x;
diff --git a/js/Branching/GOTOMO.pickle b/js/Branching/GOTOMO.pickle
index 0d1dde24..84d200d9 100644
--- a/js/Branching/GOTOMO.pickle
+++ b/js/Branching/GOTOMO.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'tag'
+p3
+aS'tagvis'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Branching/GotoTagVisibility.js b/js/Branching/GotoTagVisibility.js
index 44a3386a..d0713180 100644
--- a/js/Branching/GotoTagVisibility.js
+++ b/js/Branching/GotoTagVisibility.js
@@ -30,17 +30,17 @@ function GotoTagVisibility() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,tag,exprs] = scicos_getvalue("Set parameters",["GotoTag"],list("str",-1),exprs);
+ [ok,this.tag,exprs] = scicos_getvalue("Set parameters",["GotoTag"],list("str",-1),exprs);
if (!ok) {
break;
}
if (ok) {
- if (model.opar!=list(tag)) {
+ if (model.opar!=list(this.tag)) {
needcompile = 4;
y = needcompile;
}
graphics.exprs = exprs;
- model.opar = list(tag);
+ model.opar = list(this.tag);
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Branching/GotoTagVisibility.pickle b/js/Branching/GotoTagVisibility.pickle
index 0d1dde24..ef920dcc 100644
--- a/js/Branching/GotoTagVisibility.pickle
+++ b/js/Branching/GotoTagVisibility.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'tag'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Branching/GotoTagVisibilityMO.js b/js/Branching/GotoTagVisibilityMO.js
index 51cacc0c..5e5c3555 100644
--- a/js/Branching/GotoTagVisibilityMO.js
+++ b/js/Branching/GotoTagVisibilityMO.js
@@ -30,17 +30,17 @@ function GotoTagVisibilityMO() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,tag,exprs] = scicos_getvalue("Set parameters",["GotoTag"],list("str",-1),exprs);
+ [ok,this.tag,exprs] = scicos_getvalue("Set parameters",["GotoTag"],list("str",-1),exprs);
if (!ok) {
break;
}
if (ok) {
- if (model.opar!=list(tag)) {
+ if (model.opar!=list(this.tag)) {
needcompile = 4;
y = needcompile;
}
graphics.exprs = exprs;
- model.opar = list(tag);
+ model.opar = list(this.tag);
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Branching/GotoTagVisibilityMO.pickle b/js/Branching/GotoTagVisibilityMO.pickle
index 0d1dde24..ef920dcc 100644
--- a/js/Branching/GotoTagVisibilityMO.pickle
+++ b/js/Branching/GotoTagVisibilityMO.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'tag'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Branching/ISELECT_f.js b/js/Branching/ISELECT_f.js
index 3352c1d5..c61fb391 100644
--- a/js/Branching/ISELECT_f.js
+++ b/js/Branching/ISELECT_f.js
@@ -1,18 +1,18 @@
/* autogenerated from "macros/Branching/ISELECT_f.sci" */
function ISELECT_f() {
ISELECT_f.prototype.define = function ISELECT_f() {
- z0 = 0;
+ this.z0 = 0;
out = [[-1],[-1]];
- nout = 2;
+ this.nout = 2;
model = scicos_model();
model.sim = list("selector",2);
model.in1 = -1;
model.out = out;
model.evtin = ones(out);
- model.dstate = z0;
+ model.dstate = this.z0;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [[string(nout)],[string(z0+1)]];
+ exprs = [[string(this.nout)],[string(this.z0+1)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -28,17 +28,17 @@ function ISELECT_f() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,nout,z0,exprs] = scicos_getvalue("Set parameters",[["number of outputs"],["initial connected output"]],list("vec",1,"vec",1),exprs);
+ [ok,this.nout,this.z0,exprs] = scicos_getvalue("Set parameters",[["number of outputs"],["initial connected output"]],list("vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- if (z0>nout||z0<=0) {
+ if (this.z0>this.nout||this.z0<=0) {
message("initial connected input is not a valid input port number");
} else {
- [model,graphics,ok] = check_io(model,graphics,-1,-ones(nout,1),ones(nout,1),[]);
+ [model,graphics,ok] = check_io(model,graphics,-1,-ones(this.nout,1),ones(this.nout,1),[]);
if (ok) {
graphics.exprs = exprs;
- model.dstate = z0-1;
+ model.dstate = this.z0-1;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Branching/ISELECT_f.pickle b/js/Branching/ISELECT_f.pickle
index 0d1dde24..0c984dbf 100644
--- a/js/Branching/ISELECT_f.pickle
+++ b/js/Branching/ISELECT_f.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'z0'
+p3
+aS'nout'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Branching/ISELECT_m.js b/js/Branching/ISELECT_m.js
index 2d9555f0..e9ed58ef 100644
--- a/js/Branching/ISELECT_m.js
+++ b/js/Branching/ISELECT_m.js
@@ -1,8 +1,8 @@
/* autogenerated from "macros/Branching/ISELECT_m.sci" */
function ISELECT_m() {
ISELECT_m.prototype.define = function ISELECT_m() {
- z0 = 1;
- nout = 2;
+ this.z0 = 1;
+ this.nout = 2;
model = scicos_model();
model.sim = list("selector_m",4);
model.out = [[-1],[-1]];
@@ -16,11 +16,11 @@ function ISELECT_m() {
model.rpar = [];
model.ipar = [];
model.firing = [];
- model.evtin = ones(nout,1);
- model.dstate = z0;
+ model.evtin = ones(this.nout,1);
+ model.dstate = this.z0;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [[sci2exp(1)],[sci2exp(nout)],[sci2exp(z0)]];
+ exprs = [[sci2exp(1)],[sci2exp(this.nout)],[sci2exp(this.z0)]];
gr_i = [];
this.x = standard_define([3,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -36,25 +36,25 @@ function ISELECT_m() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,typ,nout,z0,exprs] = scicos_getvalue("Set parameters",[["Datatype(1= real double 2=Complex 3=int32 ...)"],["number of outputs"],["initial connected output"]],list("vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.typ,this.nout,this.z0,exprs] = scicos_getvalue("Set parameters",[["Datatype(1= real double 2=Complex 3=int32 ...)"],["number of outputs"],["initial connected output"]],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- if (z0>nout||z0<=0) {
+ if (this.z0>this.nout||this.z0<=0) {
message("initial connected input is not a valid input port number");
- } else if (((typ<1)||(typ>8))) {
+ } else if (((this.typ<1)||(this.typ>8))) {
message("Datatype is not supported");
ok = false;
} else {
- it = typ;
- ot = typ*ones(1,nout);
+ it = this.typ;
+ ot = this.typ*ones(1,this.nout);
if (ok) {
- out = [-ones(nout,1),-2*ones(nout,1)];
+ out = [-ones(this.nout,1),-2*ones(this.nout,1)];
in1 = [-1,-2];
- [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),ones(nout,1),[]);
+ [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),ones(this.nout,1),[]);
if (ok) {
graphics.exprs = exprs;
- model.dstate = z0;
+ model.dstate = this.z0;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Branching/ISELECT_m.pickle b/js/Branching/ISELECT_m.pickle
index 0d1dde24..2404a121 100644
--- a/js/Branching/ISELECT_m.pickle
+++ b/js/Branching/ISELECT_m.pickle
@@ -4,6 +4,12 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'z0'
+p3
+aS'typ'
+p4
+aS'nout'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/Branching/MUX.js b/js/Branching/MUX.js
index c0cdd611..cd23e5d7 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() {
- in1 = 2;
+ this.in1 = 2;
model = scicos_model();
model.sim = list("multiplex",4);
- model.in1 = -transpose([1:in1]);
+ model.in1 = -transpose([1:this.in1]);
model.out = 0;
- model.ipar = in1;
+ model.ipar = this.in1;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = string(in1);
+ exprs = string(this.in1);
gr_i = [];
this.x = standard_define([.5,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -25,36 +25,36 @@ function MUX() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,in1,exprs] = scicos_getvalue("Set MUX block parameters","number of input ports or vector of sizes",list("intvec",-1),exprs);
+ [ok,this.in1,exprs] = scicos_getvalue("Set MUX block parameters","number of input ports or vector of sizes",list("intvec",-1),exprs);
if (!ok) {
break;
}
- if (size(in1,"*")==1) {
- if (in1<2||in1>31) {
+ if (size(this.in1,"*")==1) {
+ if (this.in1<2||this.in1>31) {
message("Block must have at least two input ports and at most 31");
ok = false;
} else {
- [model,graphics,ok] = check_io(model,graphics,-transpose([1:in1]),0,[],[]);
+ [model,graphics,ok] = check_io(model,graphics,-transpose([1:this.in1]),0,[],[]);
}
} else {
- if (size(in1,"*")<2||or(in1==0)||size(in1,"*")>31) {
+ if (size(this.in1,"*")<2||or(this.in1==0)||size(this.in1,"*")>31) {
message([["Block must have at least two input ports"],["and at most 31. Size 0 is not allowed. "]]);
ok = false;
} else {
- if (min(in1)<0) {
+ if (min(this.in1)<0) {
nout = 0;
} else {
- nout = sum(in1);
+ nout = sum(this.in1);
}
- [model,graphics,ok] = check_io(model,graphics,in1.slice(),nout,[],[]);
+ [model,graphics,ok] = check_io(model,graphics,this.in1.slice(),nout,[],[]);
if (ok) {
- in1 = size(in1,"*");
+ this.in1 = size(this.in1,"*");
}
}
}
if (ok) {
graphics.exprs = exprs;
- model.ipar = in1;
+ model.ipar = this.in1;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Branching/MUX.pickle b/js/Branching/MUX.pickle
index 0d1dde24..2935e0d2 100644
--- a/js/Branching/MUX.pickle
+++ b/js/Branching/MUX.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'in1'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Branching/MUX_f.js b/js/Branching/MUX_f.js
index 66384c50..a501fc28 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() {
- in1 = 2;
+ this.in1 = 2;
model = scicos_model();
model.sim = list("mux",1);
- model.in1 = -transpose([1:in1]);
+ model.in1 = -transpose([1:this.in1]);
model.out = 0;
- model.ipar = in1;
+ model.ipar = this.in1;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = string(in1);
+ exprs = string(this.in1);
gr_i = [];
this.x = standard_define([0.5,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -25,36 +25,36 @@ function MUX_f() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,in1,exprs] = scicos_getvalue("Set MUX block parameters","number of input ports or vector of sizes",list("vec",-1),exprs);
+ [ok,this.in1,exprs] = scicos_getvalue("Set MUX block parameters","number of input ports or vector of sizes",list("vec",-1),exprs);
if (!ok) {
break;
}
- if (size(in1,"*")==1) {
- if (in1<2||in1>8) {
+ if (size(this.in1,"*")==1) {
+ if (this.in1<2||this.in1>8) {
message("Block must have at least two input ports and at most eight");
ok = false;
} else {
- [model,graphics,ok] = check_io(model,graphics,-transpose([1:in1]),0,[],[]);
+ [model,graphics,ok] = check_io(model,graphics,-transpose([1:this.in1]),0,[],[]);
}
} else {
- if (size(in1,"*")<2||size(in1,"*")>8||or(in1==0)) {
+ if (size(this.in1,"*")<2||size(this.in1,"*")>8||or(this.in1==0)) {
message([["Block must have at least two input ports"],["and at most eight, and size 0 is not allowed. "]]);
ok = false;
} else {
- if (min(in1)<0) {
+ if (min(this.in1)<0) {
nout = 0;
} else {
- nout = sum(in1);
+ nout = sum(this.in1);
}
- [model,graphics,ok] = check_io(model,graphics,in1.slice(),nout,[],[]);
+ [model,graphics,ok] = check_io(model,graphics,this.in1.slice(),nout,[],[]);
if (ok) {
- in1 = size(in1,"*");
+ this.in1 = size(this.in1,"*");
}
}
}
if (ok) {
graphics.exprs = exprs;
- model.ipar = in1;
+ model.ipar = this.in1;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Branching/MUX_f.pickle b/js/Branching/MUX_f.pickle
index 0d1dde24..2935e0d2 100644
--- a/js/Branching/MUX_f.pickle
+++ b/js/Branching/MUX_f.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'in1'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Branching/M_SWITCH.js b/js/Branching/M_SWITCH.js
index 827d71cc..ce6429b2 100644
--- a/js/Branching/M_SWITCH.js
+++ b/js/Branching/M_SWITCH.js
@@ -3,7 +3,7 @@ function M_SWITCH() {
M_SWITCH.prototype.define = function M_SWITCH() {
in1 = [[1],[-1],[-1]];
ipar = [[1],[3]];
- nin = 2;
+ this.nin = 2;
model = scicos_model();
model.sim = list("mswitch",4);
model.in1 = in1;
@@ -11,7 +11,7 @@ function M_SWITCH() {
model.ipar = ipar;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [[string(nin)],[string(ipar)]];
+ exprs = [[string(this.nin)],[string(ipar)]];
gr_i = [];
this.x = standard_define([2.5,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -27,34 +27,34 @@ function M_SWITCH() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,nin,base,rule,exprs] = scicos_getvalue("Set parameters",[["number of inputs"],["zero base indexing (0), otherwise 1"],["rounding rule: int (0), round (1), ceil (2), floor (3)"]],list("vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.nin,this.base,this.rule,exprs] = scicos_getvalue("Set parameters",[["number of inputs"],["zero base indexing (0), otherwise 1"],["rounding rule: int (0), round (1), ceil (2), floor (3)"]],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- nin = int(nin);
- base = int(base);
- if (nin<1) {
+ this.nin = int(this.nin);
+ this.base = int(this.base);
+ if (this.nin<1) {
message("Number of inputs must be >=1 ");
- } else if (!((base==1)||(base==0))) {
+ } else if (!((this.base==1)||(this.base==0))) {
message("base indexing must be 1 or 0");
- } else if (!((rule==1)||(rule==0)||(rule==2)||(rule==3))) {
+ } else if (!((this.rule==1)||(this.rule==0)||(this.rule==2)||(this.rule==3))) {
message("incorrect rounding rule");
} else {
- if (nin==1) {
+ if (this.nin==1) {
in1 = [[1,1],[-1,1]];
out = [1,1];
} else {
- in1 = [[1],[-ones(nin,1)]];
- in2 = [[1],[-2*ones(nin,1)]];
+ in1 = [[1],[-ones(this.nin,1)]];
+ in2 = [[1],[-2*ones(this.nin,1)]];
in1 = [in1,in2];
out = [-1,-2];
}
- it = [[-1],[-2*ones(nin,1)]];
+ it = [[-1],[-2*ones(this.nin,1)]];
ot = -2;
[model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),[],[]);
if (ok) {
graphics.exprs = exprs;
- model.ipar = [[base],[rule]];
+ model.ipar = [[this.base],[this.rule]];
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Branching/M_SWITCH.pickle b/js/Branching/M_SWITCH.pickle
index 0d1dde24..7eff286e 100644
--- a/js/Branching/M_SWITCH.pickle
+++ b/js/Branching/M_SWITCH.pickle
@@ -4,6 +4,12 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'base'
+p3
+aS'nin'
+p4
+aS'rule'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/Branching/NRMSOM_f.js b/js/Branching/NRMSOM_f.js
index a00aab56..5b76e535 100644
--- a/js/Branching/NRMSOM_f.js
+++ b/js/Branching/NRMSOM_f.js
@@ -2,14 +2,14 @@
function NRMSOM_f() {
NRMSOM_f.prototype.define = function NRMSOM_f() {
in1 = [[-1],[-1]];
- nin = 2;
+ this.nin = 2;
model = scicos_model();
model.sim = "junk";
model.in1 = in1;
model.out = -1;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [string(nin)];
+ exprs = [string(this.nin)];
gr_i = [];
this.x = standard_define([.2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -25,11 +25,11 @@ function NRMSOM_f() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,nin,exprs] = scicos_getvalue("Set parameters",["number of inputs"],list("vec",1),exprs);
+ [ok,this.nin,exprs] = scicos_getvalue("Set parameters",["number of inputs"],list("vec",1),exprs);
if (!ok) {
break;
}
- [model,graphics,ok] = check_io(model,graphics,-ones(nin,1),-1,[],[]);
+ [model,graphics,ok] = check_io(model,graphics,-ones(this.nin,1),-1,[],[]);
if (ok) {
graphics.exprs = exprs;
this.x.graphics = graphics;
diff --git a/js/Branching/NRMSOM_f.pickle b/js/Branching/NRMSOM_f.pickle
index 0d1dde24..5a153cc3 100644
--- a/js/Branching/NRMSOM_f.pickle
+++ b/js/Branching/NRMSOM_f.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'nin'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Branching/RELAY_f.js b/js/Branching/RELAY_f.js
index 91977b51..1fc495dd 100644
--- a/js/Branching/RELAY_f.js
+++ b/js/Branching/RELAY_f.js
@@ -3,7 +3,7 @@ function RELAY_f() {
RELAY_f.prototype.define = function RELAY_f() {
i0 = 0;
in1 = [[-1],[-1]];
- nin = 2;
+ this.nin = 2;
model = scicos_model();
model.sim = list("relay",2);
model.in1 = in1;
@@ -13,7 +13,7 @@ function RELAY_f() {
model.blocktype = "c";
model.firing = [];
model.dep_ut = [true,true];
- exprs = [[string(nin)],[string(i0+1)]];
+ exprs = [[string(this.nin)],[string(i0+1)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -30,17 +30,17 @@ function RELAY_f() {
model = arg1.model;
ipar = model.ipar;
while (true) {
- [ok,nin,z0,exprs] = scicos_getvalue("Set parameters",[["number of inputs"],["initial connected input"]],list("vec",1,"vec",1),exprs);
+ [ok,this.nin,this.z0,exprs] = scicos_getvalue("Set parameters",[["number of inputs"],["initial connected input"]],list("vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- if (z0>nin||z0<=0) {
+ if (this.z0>this.nin||this.z0<=0) {
message("initial connected input is not a valid input port number");
} else {
- [model,graphics,ok] = check_io(model,graphics,-ones(nin,1),-1,ones(nin,1),[]);
+ [model,graphics,ok] = check_io(model,graphics,-ones(this.nin,1),-1,ones(this.nin,1),[]);
if (ok) {
graphics.exprs = exprs;
- model.dstate = z0-1;
+ model.dstate = this.z0-1;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Branching/RELAY_f.pickle b/js/Branching/RELAY_f.pickle
index 0d1dde24..bbbb798b 100644
--- a/js/Branching/RELAY_f.pickle
+++ b/js/Branching/RELAY_f.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'z0'
+p3
+aS'nin'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Branching/SCALAR2VECTOR.js b/js/Branching/SCALAR2VECTOR.js
index e849edef..2ca90c29 100644
--- a/js/Branching/SCALAR2VECTOR.js
+++ b/js/Branching/SCALAR2VECTOR.js
@@ -1,14 +1,14 @@
/* autogenerated from "macros/Branching/SCALAR2VECTOR.sci" */
function SCALAR2VECTOR() {
SCALAR2VECTOR.prototype.define = function SCALAR2VECTOR() {
- nout = -1;
+ this.nout = -1;
model = scicos_model();
model.sim = list("scalar2vector",4);
- model.out = nout;
+ model.out = this.nout;
model.in1 = 1;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [string([nout])];
+ exprs = [string([this.nout])];
gr_i = [];
this.x = standard_define([3,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -24,17 +24,17 @@ function SCALAR2VECTOR() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,nout,exprs] = scicos_getvalue("Set block parameters",["size of output (-1: if don\'t know)"],list("vec",1),exprs);
+ [ok,this.nout,exprs] = scicos_getvalue("Set block parameters",["size of output (-1: if don\'t know)"],list("vec",1),exprs);
if (!ok) {
break;
}
- nout = int(nout);
- if ((nout!=-1&&(nout<=0))) {
+ this.nout = int(this.nout);
+ if ((this.nout!=-1&&(this.nout<=0))) {
message("size of output must be -1 or >0");
ok = false;
}
if (ok) {
- [model,graphics,ok] = check_io(model,graphics,[1],nout,[],[]);
+ [model,graphics,ok] = check_io(model,graphics,[1],this.nout,[],[]);
}
if (ok) {
graphics.exprs = exprs;
diff --git a/js/Branching/SCALAR2VECTOR.pickle b/js/Branching/SCALAR2VECTOR.pickle
index 0d1dde24..18e545bb 100644
--- a/js/Branching/SCALAR2VECTOR.pickle
+++ b/js/Branching/SCALAR2VECTOR.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'nout'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Branching/SELECT_f.js b/js/Branching/SELECT_f.js
index b949158c..028c2dac 100644
--- a/js/Branching/SELECT_f.js
+++ b/js/Branching/SELECT_f.js
@@ -1,18 +1,18 @@
/* autogenerated from "macros/Branching/SELECT_f.sci" */
function SELECT_f() {
SELECT_f.prototype.define = function SELECT_f() {
- z0 = 0;
+ this.z0 = 0;
in1 = [[-1],[-1]];
- nin = 2;
+ this.nin = 2;
model = scicos_model();
model.sim = list("selector",2);
model.in1 = in1;
model.out = -1;
model.evtin = ones(in1);
- model.dstate = z0;
+ model.dstate = this.z0;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [[string(nin)],[string(z0+1)]];
+ exprs = [[string(this.nin)],[string(this.z0+1)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -28,17 +28,17 @@ function SELECT_f() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,nin,z0,exprs] = scicos_getvalue("Set parameters",[["number of inputs"],["initial connected input"]],list("vec",1,"vec",1),exprs);
+ [ok,this.nin,this.z0,exprs] = scicos_getvalue("Set parameters",[["number of inputs"],["initial connected input"]],list("vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- if (z0>nin||z0<=0) {
+ if (this.z0>this.nin||this.z0<=0) {
message("initial connected input is not a valid input port number");
} else {
- [model,graphics,ok] = check_io(model,graphics,-ones(nin,1),-1,ones(nin,1),[]);
+ [model,graphics,ok] = check_io(model,graphics,-ones(this.nin,1),-1,ones(this.nin,1),[]);
if (ok) {
graphics.exprs = exprs;
- model.dstate = z0-1;
+ model.dstate = this.z0-1;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Branching/SELECT_f.pickle b/js/Branching/SELECT_f.pickle
index 0d1dde24..bbbb798b 100644
--- a/js/Branching/SELECT_f.pickle
+++ b/js/Branching/SELECT_f.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'z0'
+p3
+aS'nin'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Branching/SELECT_m.js b/js/Branching/SELECT_m.js
index c91c2eeb..73d5eff0 100644
--- a/js/Branching/SELECT_m.js
+++ b/js/Branching/SELECT_m.js
@@ -1,8 +1,8 @@
/* autogenerated from "macros/Branching/SELECT_m.sci" */
function SELECT_m() {
SELECT_m.prototype.define = function SELECT_m() {
- z0 = 1;
- nin = 2;
+ this.z0 = 1;
+ this.nin = 2;
model = scicos_model();
model.sim = list("selector_m",4);
model.in1 = [[-1],[-1]];
@@ -16,11 +16,11 @@ function SELECT_m() {
model.rpar = [];
model.ipar = [];
model.firing = [];
- model.evtin = ones(nin,1);
- model.dstate = z0;
+ model.evtin = ones(this.nin,1);
+ model.dstate = this.z0;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [[sci2exp(1)],[sci2exp(nin)],[sci2exp(z0)]];
+ exprs = [[sci2exp(1)],[sci2exp(this.nin)],[sci2exp(this.z0)]];
gr_i = [];
this.x = standard_define([3,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -36,25 +36,25 @@ function SELECT_m() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,typ,nin,z0,exprs] = scicos_getvalue("Set parameters",[["Datatype(1= real double 2=Complex 3=int32 ..)"],["number of inputs"],["initial connected input"]],list("vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.typ,this.nin,this.z0,exprs] = scicos_getvalue("Set parameters",[["Datatype(1= real double 2=Complex 3=int32 ..)"],["number of inputs"],["initial connected input"]],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- if (z0>nin||z0<=0) {
+ if (this.z0>this.nin||this.z0<=0) {
message("initial connected input is not a valid input port number");
- } else if (((typ<1)||(typ>8))&&(typ!=-1)) {
+ } else if (((this.typ<1)||(this.typ>8))&&(this.typ!=-1)) {
message("Datatype is not supported");
ok = false;
} else {
- it = typ*ones(1,nin);
- ot = typ;
+ it = this.typ*ones(1,this.nin);
+ ot = this.typ;
if (ok) {
- in1 = [-ones(nin,1),-2*ones(nin,1)];
+ in1 = [-ones(this.nin,1),-2*ones(this.nin,1)];
out = [-1,-2];
- [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),ones(nin,1),[]);
+ [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),ones(this.nin,1),[]);
if (ok) {
graphics.exprs = exprs;
- model.dstate = z0;
+ model.dstate = this.z0;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Branching/SELECT_m.pickle b/js/Branching/SELECT_m.pickle
index 0d1dde24..4b9fbdd0 100644
--- a/js/Branching/SELECT_m.pickle
+++ b/js/Branching/SELECT_m.pickle
@@ -4,6 +4,12 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'z0'
+p3
+aS'typ'
+p4
+aS'nin'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/Branching/SWITCH2.js b/js/Branching/SWITCH2.js
index 1c8a4fb8..f3b2b4c7 100644
--- a/js/Branching/SWITCH2.js
+++ b/js/Branching/SWITCH2.js
@@ -3,7 +3,7 @@ function SWITCH2() {
SWITCH2.prototype.define = function SWITCH2() {
in1 = [[-1],[1],[-1]];
ipar = [0];
- nzz = 1;
+ this.nzz = 1;
rpar = 0;
model = scicos_model();
model.sim = list("switch2",4);
@@ -11,11 +11,11 @@ function SWITCH2() {
model.out = -1;
model.ipar = ipar;
model.rpar = rpar;
- model.nzcross = nzz;
+ model.nzcross = this.nzz;
model.nmode = 1;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [[string(ipar)],[string(rpar)],[string(nzz)]];
+ exprs = [[string(ipar)],[string(rpar)],[string(this.nzz)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -31,21 +31,21 @@ function SWITCH2() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,rule,thra,nzz,exprs] = scicos_getvalue("Set parameters",[["pass first input if: u2>=a (0), u2>a (1), u2~=a (2)"],["threshold a"],["use zero crossing: yes (1), no (0)"]],list("vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.rule,this.thra,this.nzz,exprs] = scicos_getvalue("Set parameters",[["pass first input if: u2>=a (0), u2>a (1), u2~=a (2)"],["threshold a"],["use zero crossing: yes (1), no (0)"]],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- rule = int(rule);
- if ((rule<0)) {
- rule = 0;
+ this.rule = int(this.rule);
+ if ((this.rule<0)) {
+ this.rule = 0;
}
- if ((rule>2)) {
- rule = 2;
+ if ((this.rule>2)) {
+ this.rule = 2;
}
graphics.exprs = exprs;
- model.ipar = rule;
- model.rpar = thra;
- if (nzz!=0) {
+ model.ipar = this.rule;
+ model.rpar = this.thra;
+ if (this.nzz!=0) {
model.nmode = 1;
model.nzcross = 1;
} else {
diff --git a/js/Branching/SWITCH2.pickle b/js/Branching/SWITCH2.pickle
index 0d1dde24..baba8ef7 100644
--- a/js/Branching/SWITCH2.pickle
+++ b/js/Branching/SWITCH2.pickle
@@ -4,6 +4,12 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'nzz'
+p3
+aS'rule'
+p4
+aS'thra'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/Branching/SWITCH2_m.js b/js/Branching/SWITCH2_m.js
index 04dfaa1c..3031d8f5 100644
--- a/js/Branching/SWITCH2_m.js
+++ b/js/Branching/SWITCH2_m.js
@@ -2,7 +2,7 @@
function SWITCH2_m() {
SWITCH2_m.prototype.define = function SWITCH2_m() {
ipar = [0];
- nzz = 1;
+ this.nzz = 1;
rpar = 0;
model = scicos_model();
model.sim = list("switch2_m",4);
@@ -14,11 +14,11 @@ function SWITCH2_m() {
model.outtyp = 1;
model.ipar = ipar;
model.rpar = rpar;
- model.nzcross = nzz;
+ model.nzcross = this.nzz;
model.nmode = 1;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [[sci2exp(1)],[string(ipar)],[string(rpar)],[string(nzz)]];
+ exprs = [[sci2exp(1)],[string(ipar)],[string(rpar)],[string(this.nzz)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -34,38 +34,38 @@ function SWITCH2_m() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,ot,rule,thra,nzz,exprs] = scicos_getvalue("Set parameters",[["Datatype (1=real double 2=complex 3=int32 ...)"],["pass first input if: u2>=a (0), u2>a (1), u2~=a (2)"],["threshold a"],["use zero crossing: yes (1), no (0)"]],list("vec",1,"vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.ot,this.rule,this.thra,this.nzz,exprs] = scicos_getvalue("Set parameters",[["Datatype (1=real double 2=complex 3=int32 ...)"],["pass first input if: u2>=a (0), u2>a (1), u2~=a (2)"],["threshold a"],["use zero crossing: yes (1), no (0)"]],list("vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- rule = int(rule);
- if ((rule<0)) {
- rule = 0;
+ this.rule = int(this.rule);
+ if ((this.rule<0)) {
+ this.rule = 0;
}
- if ((rule>2)) {
- rule = 2;
+ if ((this.rule>2)) {
+ this.rule = 2;
}
graphics.exprs = exprs;
- model.ipar = rule;
- model.rpar = thra;
- if (nzz!=0) {
+ model.ipar = this.rule;
+ model.rpar = this.thra;
+ if (this.nzz!=0) {
model.nmode = 1;
model.nzcross = 1;
} else {
model.nmode = 0;
model.nzcross = 0;
}
- if (((ot<1)||(ot>8))&&(ot!=-1)) {
+ if (((this.ot<1)||(this.ot>8))&&(this.ot!=-1)) {
message("Datatype is not supported");
ok = false;
}
if (ok) {
- it[1-1] = ot;
+ it[1-1] = this.ot;
it[2-1] = 1;
- it[3-1] = ot;
+ it[3-1] = this.ot;
in1 = [model.in1,model.in2];
out = [model.out,model.out2];
- [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),[],[]);
+ [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,this.ot),[],[]);
}
if (ok) {
this.x.graphics = graphics;
diff --git a/js/Branching/SWITCH2_m.pickle b/js/Branching/SWITCH2_m.pickle
index 0d1dde24..43d95ccf 100644
--- a/js/Branching/SWITCH2_m.pickle
+++ b/js/Branching/SWITCH2_m.pickle
@@ -4,6 +4,14 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'ot'
+p3
+aS'nzz'
+p4
+aS'rule'
+p5
+aS'thra'
+p6
+atp7
+Rp8
. \ No newline at end of file
diff --git a/js/Branching/SWITCH_f.js b/js/Branching/SWITCH_f.js
index 4d1d8ff8..ffc73ce1 100644
--- a/js/Branching/SWITCH_f.js
+++ b/js/Branching/SWITCH_f.js
@@ -3,7 +3,7 @@ function SWITCH_f() {
SWITCH_f.prototype.define = function SWITCH_f() {
i0 = 0;
in1 = [[-1],[-1]];
- nin = 2;
+ this.nin = 2;
model = scicos_model();
model.sim = list("switchn",2);
model.in1 = in1;
@@ -12,7 +12,7 @@ function SWITCH_f() {
model.blocktype = "c";
model.firing = [];
model.dep_ut = [true,true];
- exprs = [[string(nin)],[string(i0+1)]];
+ exprs = [[string(this.nin)],[string(i0+1)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -29,17 +29,17 @@ function SWITCH_f() {
model = arg1.model;
ipar = model.ipar;
while (true) {
- [ok,nin,z0,exprs] = scicos_getvalue("Set switch parameters",[["number of inputs"],["connected input"]],list("vec",1,"vec",1),exprs);
+ [ok,this.nin,this.z0,exprs] = scicos_getvalue("Set switch parameters",[["number of inputs"],["connected input"]],list("vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- if (z0>nin||z0<=0) {
+ if (this.z0>this.nin||this.z0<=0) {
message("initial connected input is not a valid input port number");
} else {
- [model,graphics,ok] = check_io(model,graphics,-ones(nin,1),-1,[],[]);
+ [model,graphics,ok] = check_io(model,graphics,-ones(this.nin,1),-1,[],[]);
if (ok) {
graphics.exprs = exprs;
- model.ipar = z0-1;
+ model.ipar = this.z0-1;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Branching/SWITCH_f.pickle b/js/Branching/SWITCH_f.pickle
index 0d1dde24..bbbb798b 100644
--- a/js/Branching/SWITCH_f.pickle
+++ b/js/Branching/SWITCH_f.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'z0'
+p3
+aS'nin'
+p4
+atp5
+Rp6
. \ No newline at end of file