summaryrefslogtreecommitdiff
path: root/js/Sinks
diff options
context:
space:
mode:
authorSunil Shetye2018-06-26 14:59:47 +0530
committerSunil Shetye2018-06-26 14:59:47 +0530
commiteb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00 (patch)
tree6378935263fe5cafd389b6893ac3b37a1dd4b1a7 /js/Sinks
parentafed64f1a0eab0b2d742088186d7bc340a2c895b (diff)
downloadsci2js-eb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00.tar.gz
sci2js-eb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00.tar.bz2
sci2js-eb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00.zip
add return value from scicos_getvalue to global vars
Diffstat (limited to 'js/Sinks')
-rw-r--r--js/Sinks/AFFICH_m.js46
-rw-r--r--js/Sinks/AFFICH_m.pickle20
-rw-r--r--js/Sinks/BARXY.js22
-rw-r--r--js/Sinks/BARXY.pickle16
-rw-r--r--js/Sinks/CANIMXY.js60
-rw-r--r--js/Sinks/CANIMXY.pickle28
-rw-r--r--js/Sinks/CANIMXY3D.js72
-rw-r--r--js/Sinks/CANIMXY3D.pickle28
-rw-r--r--js/Sinks/CEVENTSCOPE.js52
-rw-r--r--js/Sinks/CEVENTSCOPE.pickle18
-rw-r--r--js/Sinks/CFSCOPE.js58
-rw-r--r--js/Sinks/CFSCOPE.pickle24
-rw-r--r--js/Sinks/CLKOUTV_f.js20
-rw-r--r--js/Sinks/CLKOUTV_f.pickle12
-rw-r--r--js/Sinks/CLKOUT_f.js14
-rw-r--r--js/Sinks/CLKOUT_f.pickle6
-rw-r--r--js/Sinks/CMAT3D.js26
-rw-r--r--js/Sinks/CMAT3D.pickle18
-rw-r--r--js/Sinks/CMATVIEW.js24
-rw-r--r--js/Sinks/CMATVIEW.pickle12
-rw-r--r--js/Sinks/CMSCOPE.js84
-rw-r--r--js/Sinks/CMSCOPE.pickle28
-rw-r--r--js/Sinks/CSCOPE.js58
-rw-r--r--js/Sinks/CSCOPE.pickle26
-rw-r--r--js/Sinks/CSCOPXY.js60
-rw-r--r--js/Sinks/CSCOPXY.pickle28
-rw-r--r--js/Sinks/CSCOPXY3D.js70
-rw-r--r--js/Sinks/CSCOPXY3D.pickle28
-rw-r--r--js/Sinks/OUTIMPL_f.js18
-rw-r--r--js/Sinks/OUTIMPL_f.pickle6
-rw-r--r--js/Sinks/OUT_f.js20
-rw-r--r--js/Sinks/OUT_f.pickle6
-rw-r--r--js/Sinks/TOWS_c.js24
-rw-r--r--js/Sinks/TOWS_c.pickle12
-rw-r--r--js/Sinks/WFILE_f.js52
-rw-r--r--js/Sinks/WFILE_f.pickle16
-rw-r--r--js/Sinks/WRITEAU_f.js28
-rw-r--r--js/Sinks/WRITEAU_f.pickle8
-rw-r--r--js/Sinks/WRITEC_f.js60
-rw-r--r--js/Sinks/WRITEC_f.pickle20
40 files changed, 732 insertions, 496 deletions
diff --git a/js/Sinks/AFFICH_m.js b/js/Sinks/AFFICH_m.js
index 509db8be..094da4c1 100644
--- a/js/Sinks/AFFICH_m.js
+++ b/js/Sinks/AFFICH_m.js
@@ -1,27 +1,27 @@
/* autogenerated from "macros/Sinks/AFFICH_m.sci" */
function AFFICH_m() {
AFFICH_m.prototype.define = function AFFICH_m() {
- font = 1;
- fontsize = 1;
- colr = 1;
- nt = 5;
- nd = 1;
- in1 = [1,1];
+ this.font = 1;
+ this.fontsize = 1;
+ this.colr = 1;
+ this.nt = 5;
+ this.nd = 1;
+ this.in1 = [1,1];
model = scicos_model();
model.sim = list("affich2",4);
- model.in1 = in1[1-1][1-1];
- model.in2 = in1[1-1][2-1];
+ model.in1 = this.in1[1-1][1-1];
+ model.in2 = this.in1[1-1][2-1];
model.evtin = 1;
- model.dstate = [[-1],[0],[0],[1],[1],[0],[zeros(in1[1-1][1-1]*in1[1-1][2-1],1)]];
- model.ipar = [[font],[fontsize],[colr],[1000],[nt],[nd],[in1[1-1][1-1]]];
+ model.dstate = [[-1],[0],[0],[1],[1],[0],[zeros(this.in1[1-1][1-1]*this.in1[1-1][2-1],1)]];
+ model.ipar = [[this.font],[this.fontsize],[this.colr],[1000],[this.nt],[this.nd],[this.in1[1-1][1-1]]];
model.blocktype = "c";
model.firing = [];
model.dep_ut = [true,false];
model.label = "";
- exprs = [[sci2exp([model.in1,model.in2])],[string(font)],[string(fontsize)],[string(colr)],[string(nt)],[string(nd)],[string(0)]];
+ exprs = [[sci2exp([model.in1,model.in2])],[string(this.font)],[string(this.fontsize)],[string(this.colr)],[string(this.nt)],[string(this.nd)],[string(0)]];
gr_i = [];
this.x = standard_define([3,2],model,exprs,gr_i);
- return new BasicBlock(this.x);
+ return new AfficheBlock(this.x);
}
AFFICH_m.prototype.details = function AFFICH_m() {
return this.x;
@@ -34,31 +34,31 @@ function AFFICH_m() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,in1,font,fontsize,colr,nt,nd,herit,exprs] = scicos_getvalue("Set parameters",[["Input Size","Font number"],["Font size"],["Color"],["Total number of digits"],["Number of rational part digits"],["Block inherits (1) or not (0)"]],list("mat",[1,2],"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.in1,this.font,this.fontsize,this.colr,this.nt,this.nd,this.herit,exprs] = scicos_getvalue("Set parameters",[["Input Size","Font number"],["Font size"],["Color"],["Total number of digits"],["Number of rational part digits"],["Block inherits (1) or not (0)"]],list("mat",[1,2],"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
mess = [];
- if (font<=0) {
+ if (this.font<=0) {
mess = [[mess],["Font number must be positive"],[" "]];
ok = false;
}
- if (fontsize<=0) {
+ if (this.fontsize<=0) {
mess = [[mess],["Font size must be positive"],[" "]];
ok = false;
}
- if (nt<=3) {
+ if (this.nt<=3) {
mess = [[mess],["Total number of digits must be greater than 3"],[" "]];
ok = false;
}
- if (nd<0) {
+ if (this.nd<0) {
mess = [[mess],["Number of rational part digits must be ","greater or equal 0"],[" "]];
ok = false;
}
if (!ok) {
message([["Some specified values are inconsistent:"],[" "],[mess]]);
}
- if (!or(herit==[0,1])) {
+ if (!or(this.herit==[0,1])) {
mess = [[mess],["Accept inherited values are 0 and 1"],[" "]];
ok = false;
}
@@ -66,18 +66,18 @@ function AFFICH_m() {
message([["Some specified values are inconsistent:"],[" "],[mess]]);
}
if (ok) {
- [model,graphics,ok] = set_io(model,graphics,list(in1,1),list(),ones(1-herit,1),[]);
+ [model,graphics,ok] = set_io(model,graphics,list(this.in1,1),list(),ones(1-this.herit,1),[]);
}
if (ok) {
- model.ipar = [[font],[fontsize],[colr],[nt],[nd],[in1[1-1][1-1]]];
- model.dstate = [[-1],[0],[0],[1],[1],[0],[zeros(in1[1-1][1-1]*in1[1-1][2-1],1)]];
- model.evtin = ones(1-herit,1);
+ model.ipar = [[this.font],[this.fontsize],[this.colr],[this.nt],[this.nd],[this.in1[1-1][1-1]]];
+ model.dstate = [[-1],[0],[0],[1],[1],[0],[zeros(this.in1[1-1][1-1]*this.in1[1-1][2-1],1)]];
+ model.evtin = ones(1-this.herit,1);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
break;
}
}
- return new BasicBlock(this.x);
+ return new AfficheBlock(this.x);
}
}
diff --git a/js/Sinks/AFFICH_m.pickle b/js/Sinks/AFFICH_m.pickle
index 0d1dde24..7e2f574c 100644
--- a/js/Sinks/AFFICH_m.pickle
+++ b/js/Sinks/AFFICH_m.pickle
@@ -2,8 +2,22 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'herit'
p2
-atp3
-Rp4
+aS'nd'
+p3
+aS'colr'
+p4
+aS'in1'
+p5
+aS'fontsize'
+p6
+aS'x'
+p7
+aS'font'
+p8
+aS'nt'
+p9
+atp10
+Rp11
. \ No newline at end of file
diff --git a/js/Sinks/BARXY.js b/js/Sinks/BARXY.js
index 4ef60a20..e932c6a1 100644
--- a/js/Sinks/BARXY.js
+++ b/js/Sinks/BARXY.js
@@ -2,10 +2,10 @@
function BARXY() {
BARXY.prototype.define = function BARXY() {
model = scicos_model();
- xmin = -15;
- xmax = 15;
- ymin = -15;
- ymax = 15;
+ this.xmin = -15;
+ this.xmax = 15;
+ this.ymin = -15;
+ this.ymax = 15;
model.sim = list("BARXY_sim",5);
model.blocktype = "d";
model.dep_ut = [true,false];
@@ -13,7 +13,7 @@ function BARXY() {
model.intyp = [1];
model.out = [];
model.evtin = [1];
- model.rpar = [[xmin],[xmax],[ymin],[ymax]];
+ model.rpar = [[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
model.ipar = 1;
this.x = standard_define([2,2],model,[],[]);
this.x.graphics.in_implicit = ["E","E"];
@@ -32,28 +32,28 @@ function BARXY() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,xmin,xmax,ymin,ymax,thickness,exprs] = scicos_getvalue("Set Scope parameters",[["Xmin"],["Xmax"],["Ymin"],["Ymax"],["Segs Thickness"]],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.xmin,this.xmax,this.ymin,this.ymax,this.thickness,exprs] = scicos_getvalue("Set Scope parameters",[["Xmin"],["Xmax"],["Ymin"],["Ymax"],["Segs Thickness"]],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
mess = [];
- if (ymin>=ymax) {
+ if (this.ymin>=this.ymax) {
mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
ok = false;
}
- if (xmin>=xmax) {
+ if (this.xmin>=this.xmax) {
mess = [[mess],["Xmax must be greater than Xmin"],[" "]];
ok = false;
}
- if (thickness<=0) {
+ if (this.thickness<=0) {
mess = [[mess],["Thickness must be strictly positive."]];
ok = false;
}
if (!ok) {
message(mess);
} else {
- model.rpar = [[xmin],[xmax],[ymin],[ymax]];
- model.ipar = thickness;
+ model.rpar = [[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
+ model.ipar = this.thickness;
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Sinks/BARXY.pickle b/js/Sinks/BARXY.pickle
index 0d1dde24..a233ad1e 100644
--- a/js/Sinks/BARXY.pickle
+++ b/js/Sinks/BARXY.pickle
@@ -2,8 +2,18 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'ymax'
p2
-atp3
-Rp4
+aS'thickness'
+p3
+aS'xmax'
+p4
+aS'xmin'
+p5
+aS'x'
+p6
+aS'ymin'
+p7
+atp8
+Rp9
. \ No newline at end of file
diff --git a/js/Sinks/CANIMXY.js b/js/Sinks/CANIMXY.js
index 9313c826..cd972516 100644
--- a/js/Sinks/CANIMXY.js
+++ b/js/Sinks/CANIMXY.js
@@ -1,29 +1,29 @@
/* autogenerated from "macros/Sinks/CANIMXY.sci" */
function CANIMXY() {
CANIMXY.prototype.define = function CANIMXY() {
- win = -1;
- clrs = -4;
- N = 2;
- siz = 1;
- wpos = [[-1],[-1]];
- wdim = [[-1],[-1]];
- xmin = -15;
- xmax = 15;
- ymin = -15;
- ymax = +15;
- nbr_curves = 1;
+ this.win = -1;
+ this.clrs = -4;
+ this.N = 2;
+ this.siz = 1;
+ this.wpos = [[-1],[-1]];
+ this.wdim = [[-1],[-1]];
+ this.xmin = -15;
+ this.xmax = 15;
+ this.ymin = -15;
+ this.ymax = +15;
+ this.nbr_curves = 1;
model = scicos_model();
model.sim = list("canimxy",4);
model.in1 = [[1],[1]];
model.in2 = [[1],[1]];
model.intyp = [[1],[1]];
model.evtin = 1;
- model.rpar = [[xmin],[xmax],[ymin],[ymax]];
- model.ipar = [[win],[1],[N],[clrs],[siz],[0],[wpos.slice()],[wdim.slice()],[nbr_curves]];
+ model.rpar = [[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
+ model.ipar = [[this.win],[1],[this.N],[this.clrs],[this.siz],[0],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]];
model.blocktype = "d";
model.firing = [];
model.dep_ut = [false,false];
- exprs = [[string(nbr_curves)],[string(clrs)],[string(siz)],[string(win)],["[]"],["[]"],[string(xmin)],[string(xmax)],[string(ymin)],[string(ymax)],[string(N)]];
+ exprs = [[string(this.nbr_curves)],[string(this.clrs)],[string(this.siz)],[string(this.win)],["[]"],["[]"],[string(this.xmin)],[string(this.xmax)],[string(this.ymin)],[string(this.ymax)],[string(this.N)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -39,57 +39,57 @@ function CANIMXY() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,nbr_curves,clrs,siz,win,wpos,wdim,xmin,xmax,ymin,ymax,N,exprs] = scicos_getvalue("Set Scope parameters",[["Number of Curves"],["color (>0) or mark (<0)"],["line or mark size"],["Output window number (-1 for automatic)"],["Output window position"],["Output window sizes"],["Xmin"],["Xmax"],["Ymin"],["Ymax"],["Buffer size"]],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",-1,"vec",-1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.nbr_curves,this.clrs,this.siz,this.win,this.wpos,this.wdim,this.xmin,this.xmax,this.ymin,this.ymax,this.N,exprs] = scicos_getvalue("Set Scope parameters",[["Number of Curves"],["color (>0) or mark (<0)"],["line or mark size"],["Output window number (-1 for automatic)"],["Output window position"],["Output window sizes"],["Xmin"],["Xmax"],["Ymin"],["Ymax"],["Buffer size"]],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",-1,"vec",-1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
mess = [];
- if (size(wpos,"*")!=0&&size(wpos,"*")!=2) {
+ if (size(this.wpos,"*")!=0&&size(this.wpos,"*")!=2) {
mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
ok = false;
}
- if (size(wdim,"*")!=0&&size(wdim,"*")!=2) {
+ if (size(this.wdim,"*")!=0&&size(this.wdim,"*")!=2) {
mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
ok = false;
}
- if (win<-1) {
+ if (this.win<-1) {
mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
ok = false;
}
- if (nbr_curves<=0) {
+ if (this.nbr_curves<=0) {
mess = [[mess],["Number of curves cannot be negative or null"],[" "]];
ok = false;
}
- if (N<1) {
+ if (this.N<1) {
mess = [[mess],["Buffer size must be at least 1"],[" "]];
ok = false;
}
- if (N==1&&clrs>0) {
+ if (this.N==1&&this.clrs>0) {
mess = [[mess],["Buffer size must be at least 2"],[" "]];
ok = false;
}
- if (ymin>=ymax) {
+ if (this.ymin>=this.ymax) {
mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
ok = false;
}
- if (xmin>=xmax) {
+ if (this.xmin>=this.xmax) {
mess = [[mess],["Xmax must be greater than Xmin"],[" "]];
ok = false;
}
if (!ok) {
message(mess);
} else {
- in1 = nbr_curves*ones(2,1);
+ in1 = this.nbr_curves*ones(2,1);
in2 = ones(2,1);
[model,graphics,ok] = set_io(model,graphics,list([in1,in2],ones(2,1)),list(),ones(1,1),[]);
- if (wpos==[]) {
- wpos = [[-1],[-1]];
+ if (this.wpos==[]) {
+ this.wpos = [[-1],[-1]];
}
- if (wdim==[]) {
- wdim = [[-1],[-1]];
+ if (this.wdim==[]) {
+ this.wdim = [[-1],[-1]];
}
- rpar = [[xmin],[xmax],[ymin],[ymax]];
- ipar = [[win],[1],[N],[clrs],[siz],[0],[wpos.slice()],[wdim.slice()],[nbr_curves]];
+ rpar = [[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
+ ipar = [[this.win],[1],[this.N],[this.clrs],[this.siz],[0],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]];
model.rpar = rpar;
model.ipar = ipar;
graphics.exprs = exprs;
diff --git a/js/Sinks/CANIMXY.pickle b/js/Sinks/CANIMXY.pickle
index 0d1dde24..a365a644 100644
--- a/js/Sinks/CANIMXY.pickle
+++ b/js/Sinks/CANIMXY.pickle
@@ -2,8 +2,30 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'clrs'
p2
-atp3
-Rp4
+aS'ymin'
+p3
+aS'ymax'
+p4
+aS'wpos'
+p5
+aS'win'
+p6
+aS'wdim'
+p7
+aS'N'
+p8
+aS'xmax'
+p9
+aS'siz'
+p10
+aS'xmin'
+p11
+aS'x'
+p12
+aS'nbr_curves'
+p13
+atp14
+Rp15
. \ No newline at end of file
diff --git a/js/Sinks/CANIMXY3D.js b/js/Sinks/CANIMXY3D.js
index d382af70..86dba457 100644
--- a/js/Sinks/CANIMXY3D.js
+++ b/js/Sinks/CANIMXY3D.js
@@ -1,29 +1,29 @@
/* autogenerated from "macros/Sinks/CANIMXY3D.sci" */
function CANIMXY3D() {
CANIMXY3D.prototype.define = function CANIMXY3D() {
- win = -1;
- N = 2;
- clrs = [[1],[2],[3],[4],[5],[6],[7],[13]];
- siz = [[1],[1],[1],[1],[1],[1],[1],[1]];
- wpos = [[-1],[-1]];
- wdim = [[-1],[-1]];
- param3ds = [[50],[280]];
- vec_x = [[-15],[15]];
- vec_y = [[-15],[15]];
- vec_z = [[-15],[15]];
- nbr_curves = 1;
+ this.win = -1;
+ this.N = 2;
+ this.clrs = [[1],[2],[3],[4],[5],[6],[7],[13]];
+ this.siz = [[1],[1],[1],[1],[1],[1],[1],[1]];
+ this.wpos = [[-1],[-1]];
+ this.wdim = [[-1],[-1]];
+ this.param3ds = [[50],[280]];
+ this.vec_x = [[-15],[15]];
+ this.vec_y = [[-15],[15]];
+ this.vec_z = [[-15],[15]];
+ this.nbr_curves = 1;
model = scicos_model();
model.sim = list("canimxy3d",4);
model.in1 = [[1],[1],[1]];
model.evtin = 1;
model.in2 = [[1],[1],[1]];
model.intyp = [[1],[1],[1]];
- model.rpar = [[vec_x.slice()],[vec_y.slice()],[vec_z.slice()],[param3ds.slice()]];
- model.ipar = [[win],[8],[N],[clrs.slice()],[siz.slice()],[8],[wpos.slice()],[wdim.slice()],[nbr_curves]];
+ model.rpar = [[this.vec_x.slice()],[this.vec_y.slice()],[this.vec_z.slice()],[this.param3ds.slice()]];
+ model.ipar = [[this.win],[8],[this.N],[this.clrs.slice()],[this.siz.slice()],[8],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]];
model.blocktype = "d";
model.firing = [];
model.dep_ut = [false,false];
- exprs = [[string(nbr_curves)],[strcat(string(clrs)," ")],[strcat(string(siz)," ")],[string(win)],["[]"],["[]"],[strcat(string(vec_x)," ")],[strcat(string(vec_y)," ")],[strcat(string(vec_z)," ")],[strcat(string(param3ds)," ")],[string(N)]];
+ exprs = [[string(this.nbr_curves)],[strcat(string(this.clrs)," ")],[strcat(string(this.siz)," ")],[string(this.win)],["[]"],["[]"],[strcat(string(this.vec_x)," ")],[strcat(string(this.vec_y)," ")],[strcat(string(this.vec_z)," ")],[strcat(string(this.param3ds)," ")],[string(this.N)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -39,74 +39,74 @@ function CANIMXY3D() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,nbr_curves,clrs,siz,win,wpos,wdim,vec_x,vec_y,vec_z,param3ds,N,exprs] = scicos_getvalue("Set Scope parameters",[["Number of curves"],["color (>0) or mark (<0)"],["line or mark size"],["Output window number (-1 for automatic)"],["Output window position"],["Output window sizes"],["Xmin and Xmax"],["Ymin and Ymax"],["Zmin and Zmax"],["Alpha and Theta"],["Buffer size"]],list("vec",1,"vec",-1,"vec",-1,"vec",1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",1),exprs);
+ [ok,this.nbr_curves,this.clrs,this.siz,this.win,this.wpos,this.wdim,this.vec_x,this.vec_y,this.vec_z,this.param3ds,this.N,exprs] = scicos_getvalue("Set Scope parameters",[["Number of curves"],["color (>0) or mark (<0)"],["line or mark size"],["Output window number (-1 for automatic)"],["Output window position"],["Output window sizes"],["Xmin and Xmax"],["Ymin and Ymax"],["Zmin and Zmax"],["Alpha and Theta"],["Buffer size"]],list("vec",1,"vec",-1,"vec",-1,"vec",1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",1),exprs);
if (!ok) {
break;
}
mess = [];
- if (size(wpos,"*")!=0&&size(wpos,"*")!=2) {
+ if (size(this.wpos,"*")!=0&&size(this.wpos,"*")!=2) {
mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
ok = false;
}
- if (size(wdim,"*")!=0&&size(wdim,"*")!=2) {
+ if (size(this.wdim,"*")!=0&&size(this.wdim,"*")!=2) {
mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
ok = false;
}
- if (win<-1) {
+ if (this.win<-1) {
mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
ok = false;
}
- if (size(clrs,"*")!=size(siz,"*")) {
+ if (size(this.clrs,"*")!=size(this.siz,"*")) {
mess = [[mess],["Colors and Size must have same size"],[" "]];
ok = false;
}
- if (nbr_curves<=0) {
+ if (this.nbr_curves<=0) {
mess = [[mess],["Number of curves cannot be negative or null"],[" "]];
ok = false;
}
- if (size(clrs,"*")<nbr_curves) {
+ if (size(this.clrs,"*")<this.nbr_curves) {
mess = [[mess],["You must have at least same size for clrs and the number of curves"],[" "]];
ok = false;
}
- if (N<1) {
+ if (this.N<1) {
mess = [[mess],["Buffer size must be at least 1"],[" "]];
ok = false;
}
- if (N<2) {
- for (i=1;i<=nbr_curves;i+=1) {
- if (clrs[i-1]>0) {
+ if (this.N<2) {
+ for (i=1;i<=this.nbr_curves;i+=1) {
+ if (this.clrs[i-1]>0) {
mess = [[mess],["Buffer size must be at least 2 or Change a color (must be <0)"],[" "]];
ok = false;
}
}
}
- if (vec_y[1-1]>=vec_y[2-1]) {
+ if (this.vec_y[1-1]>=this.vec_y[2-1]) {
mess = [[mess],["Ymax must be higher than Ymin"],[" "]];
ok = false;
}
- if (vec_x[1-1]>=vec_x[2-1]) {
+ if (this.vec_x[1-1]>=this.vec_x[2-1]) {
mess = [[mess],["Xmax must be higher than Xmin"],[" "]];
ok = false;
}
- if (vec_z[1-1]>=vec_z[2-1]) {
+ if (this.vec_z[1-1]>=this.vec_z[2-1]) {
mess = [[mess],["Zmax must be higher than Zmin"],[" "]];
ok = false;
}
if (!ok) {
message(mess);
} else {
- in1 = nbr_curves*ones(3,1);
+ in1 = this.nbr_curves*ones(3,1);
in2 = ones(3,1);
[model,graphics,ok] = set_io(model,graphics,list([in1,in2],ones(3,1)),list(),ones(1,1),[]);
- if (wpos==[]) {
- wpos = [[-1],[-1]];
+ if (this.wpos==[]) {
+ this.wpos = [[-1],[-1]];
}
- if (wdim==[]) {
- wdim = [[-1],[-1]];
+ if (this.wdim==[]) {
+ this.wdim = [[-1],[-1]];
}
- rpar = [[vec_x.slice()],[vec_y.slice()],[vec_z.slice()],[param3ds.slice()]];
- size_siz = size(siz,"*");
- ipar = [[win],[size_siz],[N],[clrs.slice()],[siz.slice()],[1],[wpos.slice()],[wdim.slice()],[nbr_curves]];
+ rpar = [[this.vec_x.slice()],[this.vec_y.slice()],[this.vec_z.slice()],[this.param3ds.slice()]];
+ size_siz = size(this.siz,"*");
+ ipar = [[this.win],[size_siz],[this.N],[this.clrs.slice()],[this.siz.slice()],[1],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]];
model.rpar = rpar;
model.ipar = ipar;
graphics.exprs = exprs;
diff --git a/js/Sinks/CANIMXY3D.pickle b/js/Sinks/CANIMXY3D.pickle
index 0d1dde24..410ab478 100644
--- a/js/Sinks/CANIMXY3D.pickle
+++ b/js/Sinks/CANIMXY3D.pickle
@@ -2,8 +2,30 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'clrs'
p2
-atp3
-Rp4
+aS'vec_y'
+p3
+aS'wpos'
+p4
+aS'vec_z'
+p5
+aS'win'
+p6
+aS'vec_x'
+p7
+aS'wdim'
+p8
+aS'param3ds'
+p9
+aS'N'
+p10
+aS'siz'
+p11
+aS'x'
+p12
+aS'nbr_curves'
+p13
+atp14
+Rp15
. \ No newline at end of file
diff --git a/js/Sinks/CEVENTSCOPE.js b/js/Sinks/CEVENTSCOPE.js
index 91f4758d..9adb4f6f 100644
--- a/js/Sinks/CEVENTSCOPE.js
+++ b/js/Sinks/CEVENTSCOPE.js
@@ -1,20 +1,20 @@
/* autogenerated from "macros/Sinks/CEVENTSCOPE.sci" */
function CEVENTSCOPE() {
CEVENTSCOPE.prototype.define = function CEVENTSCOPE() {
- nclock = 1;
- win = -1;
- clrs = [[1],[3],[5],[7],[9],[11],[13],[15]];
- wdim = [[600],[400]];
- wpos = [[-1],[-1]];
- per = 30;
+ this.nclock = 1;
+ this.win = -1;
+ this.clrs = [[1],[3],[5],[7],[9],[11],[13],[15]];
+ this.wdim = [[600],[400]];
+ this.wpos = [[-1],[-1]];
+ this.per = 30;
model = scicos_model();
model.sim = list("cevscpe",4);
model.evtin = 1;
- model.rpar = per;
- model.ipar = [[win],[1],[clrs[nclock-1]],[wpos.slice()],[wdim.slice()]];
+ model.rpar = this.per;
+ model.ipar = [[this.win],[1],[this.clrs[this.nclock-1]],[this.wpos.slice()],[this.wdim.slice()]];
model.blocktype = "d";
model.dep_ut = [false,false];
- exprs = [[sci2exp(nclock)],[strcat(sci2exp(clrs[nclock-1])," ")],[string(win)],[sci2exp([])],[sci2exp(wdim)],[string(per)]];
+ exprs = [[sci2exp(this.nclock)],[strcat(sci2exp(this.clrs[this.nclock-1])," ")],[string(this.win)],[sci2exp([])],[sci2exp(this.wdim)],[string(this.per)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -30,52 +30,52 @@ function CEVENTSCOPE() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,nclock,clrs,win,wpos,wdim,per,exprs] = scicos_getvalue("Set Scope parameters",[["Number of event inputs"],["colors c (>0) or mark (<0)"],["Output window number (-1 for automatic)"],["Output window position"],["Output window sizes"],["Refresh period"]],list("vec",1,"vec",-1,"vec",1,"vec",-1,"vec",-1,"vec",1),exprs);
- nclock = int(nclock);
- clrs = int(clrs);
- win = int(win);
+ [ok,this.nclock,this.clrs,this.win,this.wpos,this.wdim,this.per,exprs] = scicos_getvalue("Set Scope parameters",[["Number of event inputs"],["colors c (>0) or mark (<0)"],["Output window number (-1 for automatic)"],["Output window position"],["Output window sizes"],["Refresh period"]],list("vec",1,"vec",-1,"vec",1,"vec",-1,"vec",-1,"vec",1),exprs);
+ this.nclock = int(this.nclock);
+ this.clrs = int(this.clrs);
+ this.win = int(this.win);
if (!ok) {
break;
}
mess = [];
- if (size(wpos,"*")!=0&&size(wpos,"*")!=2) {
+ if (size(this.wpos,"*")!=0&&size(this.wpos,"*")!=2) {
mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
ok = false;
}
- if (size(wdim,"*")!=0&&size(wdim,"*")!=2) {
+ if (size(this.wdim,"*")!=0&&size(this.wdim,"*")!=2) {
mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
ok = false;
}
- if (nclock<=0) {
+ if (this.nclock<=0) {
mess = [[mess],["Block must have at least one input event"],[" "]];
ok = false;
}
- if (size(clrs,"*")!=nclock) {
+ if (size(this.clrs,"*")!=this.nclock) {
mess = [[mess],["Inputs color c size must be equal to Number of inputs"],[" "]];
ok = false;
}
- if (win<-1) {
+ if (this.win<-1) {
mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
ok = false;
}
- if (per<=0) {
+ if (this.per<=0) {
mess = [[mess],["Refresh period must be positive"],[" "]];
ok = false;
}
if (ok) {
- [model,graphics,ok] = set_io(model,graphics,list(),list(),ones(nclock,1),[]);
+ [model,graphics,ok] = set_io(model,graphics,list(),list(),ones(this.nclock,1),[]);
} else {
message([["Some specified values are inconsistent:"],[" "],[mess]]);
}
if (ok) {
- if (wpos==[]) {
- wpos = [[-1],[-1]];
+ if (this.wpos==[]) {
+ this.wpos = [[-1],[-1]];
}
- if (wdim==[]) {
- wdim = [[-1],[-1]];
+ if (this.wdim==[]) {
+ this.wdim = [[-1],[-1]];
}
- rpar = per;
- ipar = [[win],[1],[clrs.slice()],[wpos.slice()],[wdim.slice()]];
+ rpar = this.per;
+ ipar = [[this.win],[1],[this.clrs.slice()],[this.wpos.slice()],[this.wdim.slice()]];
model.rpar = rpar;
model.ipar = ipar;
graphics.exprs = exprs;
diff --git a/js/Sinks/CEVENTSCOPE.pickle b/js/Sinks/CEVENTSCOPE.pickle
index 0d1dde24..18ac5c07 100644
--- a/js/Sinks/CEVENTSCOPE.pickle
+++ b/js/Sinks/CEVENTSCOPE.pickle
@@ -2,8 +2,20 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'clrs'
p2
-atp3
-Rp4
+aS'wpos'
+p3
+aS'win'
+p4
+aS'per'
+p5
+aS'wdim'
+p6
+aS'x'
+p7
+aS'nclock'
+p8
+atp9
+Rp10
. \ No newline at end of file
diff --git a/js/Sinks/CFSCOPE.js b/js/Sinks/CFSCOPE.js
index 9a11f6eb..bc828b73 100644
--- a/js/Sinks/CFSCOPE.js
+++ b/js/Sinks/CFSCOPE.js
@@ -1,22 +1,22 @@
/* autogenerated from "macros/Sinks/CFSCOPE.sci" */
function CFSCOPE() {
CFSCOPE.prototype.define = function CFSCOPE() {
- win = -1;
- wdim = [[600],[400]];
- wpos = [[-1],[-1]];
- clrs = [[1],[3],[5],[7],[9],[11],[13],[15]];
- N = 2;
- ymin = -15;
- ymax = +15;
- per = 30;
+ this.win = -1;
+ this.wdim = [[600],[400]];
+ this.wpos = [[-1],[-1]];
+ this.clrs = [[1],[3],[5],[7],[9],[11],[13],[15]];
+ this.N = 2;
+ this.ymin = -15;
+ this.ymax = +15;
+ this.per = 30;
model = scicos_model();
model.sim = list("cfscope",4);
model.evtin = 1;
- model.rpar = [[0],[ymin],[ymax],[per]];
- model.ipar = [[win],[1],[N],[clrs],[wpos],[wdim],[1],[1]];
+ model.rpar = [[0],[this.ymin],[this.ymax],[this.per]];
+ model.ipar = [[this.win],[1],[this.N],[this.clrs],[this.wpos],[this.wdim],[1],[1]];
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [[strcat(string(clrs)," ")],[string(win)],[sci2exp([])],[sci2exp(wdim)],[string(ymin)],[string(ymax)],[string(per)],[string(N)],[string([1])]];
+ exprs = [[strcat(string(this.clrs)," ")],[string(this.win)],[sci2exp([])],[sci2exp(this.wdim)],[string(this.ymin)],[string(this.ymax)],[string(this.per)],[string(this.N)],[string([1])]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -32,36 +32,36 @@ function CFSCOPE() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,clrs,win,wpos,wdim,ymin,ymax,per,N,wu,exprs] = scicos_getvalue("Set Scope parameters",[["Color (>0) or mark (<0) vector (8 entries)"],["Output window number (-1 for automatic)"],["Output window position"],["Output window sizes"],["Ymin"],["Ymax"],["Refresh period"],["Buffer size","Links to view"]],list("vec",8,"vec",1,"vec",-1,"vec",-1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",-1),exprs);
+ [ok,this.clrs,this.win,this.wpos,this.wdim,this.ymin,this.ymax,this.per,this.N,this.wu,exprs] = scicos_getvalue("Set Scope parameters",[["Color (>0) or mark (<0) vector (8 entries)"],["Output window number (-1 for automatic)"],["Output window position"],["Output window sizes"],["Ymin"],["Ymax"],["Refresh period"],["Buffer size","Links to view"]],list("vec",8,"vec",1,"vec",-1,"vec",-1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",-1),exprs);
if (!ok) {
break;
}
mess = [];
- if (size(wpos,"*")!=0&&size(wpos,"*")!=2) {
+ if (size(this.wpos,"*")!=0&&size(this.wpos,"*")!=2) {
mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
ok = false;
}
- if (size(wdim,"*")!=0&&size(wdim,"*")!=2) {
+ if (size(this.wdim,"*")!=0&&size(this.wdim,"*")!=2) {
mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
ok = false;
}
- if (win<-1) {
+ if (this.win<-1) {
mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
ok = false;
}
- if (per<=0) {
+ if (this.per<=0) {
mess = [[mess],["Refresh period must be positive"],[" "]];
ok = false;
}
- if (N<2) {
+ if (this.N<2) {
mess = [[mess],["Buffer size must be at least 2"],[" "]];
ok = false;
}
- if (ymin>=ymax) {
+ if (this.ymin>=this.ymax) {
mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
ok = false;
}
- if (wu<0) {
+ if (this.wu<0) {
mess = [[mess],["Link to view must be positive"],[" "]];
ok = false;
}
@@ -69,20 +69,20 @@ function CFSCOPE() {
message([["Some specified values are inconsistent:"],[" "],[mess]]);
}
if (ok) {
- if (wpos==[]) {
- wpos = [[-1],[-1]];
+ if (this.wpos==[]) {
+ this.wpos = [[-1],[-1]];
}
- if (wdim==[]) {
- wdim = [[-1],[-1]];
+ if (this.wdim==[]) {
+ this.wdim = [[-1],[-1]];
}
- rpar = [[0],[ymin],[ymax],[per]];
- if (size(clrs,"*")>8) {
- clrs = clrs.slice(1-1,8);
+ rpar = [[0],[this.ymin],[this.ymax],[this.per]];
+ if (size(this.clrs,"*")>8) {
+ this.clrs = this.clrs.slice(1-1,8);
}
- if (size(clrs,"*")<8) {
- clrs[8-1] = 0;
+ if (size(this.clrs,"*")<8) {
+ this.clrs[8-1] = 0;
}
- ipar = [[win],[1],[N],[clrs.slice()],[wpos.slice()],[wdim.slice()],[size(wu,"*")],[wu.slice()]];
+ ipar = [[this.win],[1],[this.N],[this.clrs.slice()],[this.wpos.slice()],[this.wdim.slice()],[size(this.wu,"*")],[this.wu.slice()]];
model.rpar = rpar;
model.ipar = ipar;
model.firing = [];
diff --git a/js/Sinks/CFSCOPE.pickle b/js/Sinks/CFSCOPE.pickle
index 0d1dde24..f87307b1 100644
--- a/js/Sinks/CFSCOPE.pickle
+++ b/js/Sinks/CFSCOPE.pickle
@@ -2,8 +2,26 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'clrs'
p2
-atp3
-Rp4
+aS'ymax'
+p3
+aS'wpos'
+p4
+aS'win'
+p5
+aS'per'
+p6
+aS'N'
+p7
+aS'wu'
+p8
+aS'wdim'
+p9
+aS'x'
+p10
+aS'ymin'
+p11
+atp12
+Rp13
. \ No newline at end of file
diff --git a/js/Sinks/CLKOUTV_f.js b/js/Sinks/CLKOUTV_f.js
index 1f703fd2..84fe7ade 100644
--- a/js/Sinks/CLKOUTV_f.js
+++ b/js/Sinks/CLKOUTV_f.js
@@ -1,17 +1,17 @@
/* autogenerated from "macros/Sinks/CLKOUTV_f.sci" */
function CLKOUTV_f() {
CLKOUTV_f.prototype.define = function CLKOUTV_f() {
- prt = 1;
+ this.prt = 1;
model = scicos_model();
model.sim = "output";
model.evtin = 1;
- model.ipar = prt;
+ model.ipar = this.prt;
model.blocktype = "d";
model.firing = [];
model.dep_ut = [false,false];
- exprs = string(prt);
+ exprs = string(this.prt);
this.x = standard_define([1,1],model,exprs," ");
- return new BasicBlock(this.x);
+ return new EventOutBlock(this.x);
}
CLKOUTV_f.prototype.details = function CLKOUTV_f() {
return this.x;
@@ -24,15 +24,15 @@ function CLKOUTV_f() {
model = arg1.model;
exprs = graphics.exprs;
while (true) {
- [ok,prt,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"CLKOUTV_f")],[" "],[gettext("Event output port")]],gettext("Port number"),list("vec",1),exprs);
+ [ok,this.prt,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"CLKOUTV_f")],[" "],[gettext("Event output port")]],gettext("Port number"),list("vec",1),exprs);
if (!ok) {
break;
}
- prt = int(prt);
- if (prt<=0) {
- block_parameter_error(msprintf(gettext("Wrong value for \'Port Number\' parameter: %d."),prt),gettext("Strictly positive integer expected."));
+ this.prt = int(this.prt);
+ if (this.prt<=0) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'Port Number\' parameter: %d."),this.prt),gettext("Strictly positive integer expected."));
} else {
- model.ipar = prt;
+ model.ipar = this.prt;
model.evtin = 1;
graphics.exprs = exprs;
this.x.graphics = graphics;
@@ -40,6 +40,6 @@ function CLKOUTV_f() {
break;
}
}
- return new BasicBlock(this.x);
+ return new EventOutBlock(this.x);
}
}
diff --git a/js/Sinks/CLKOUTV_f.pickle b/js/Sinks/CLKOUTV_f.pickle
index 658c6188..dc34bcd7 100644
--- a/js/Sinks/CLKOUTV_f.pickle
+++ b/js/Sinks/CLKOUTV_f.pickle
@@ -8,12 +8,14 @@ aS'diag'
p3
aS'default_color'
p4
-aS'x'
+aS'prt'
p5
-aS'type'
+aS'x'
p6
-aS'options'
+aS'type'
p7
-atp8
-Rp9
+aS'options'
+p8
+atp9
+Rp10
. \ No newline at end of file
diff --git a/js/Sinks/CLKOUT_f.js b/js/Sinks/CLKOUT_f.js
index a26f8d6b..f8dfa5b7 100644
--- a/js/Sinks/CLKOUT_f.js
+++ b/js/Sinks/CLKOUT_f.js
@@ -1,15 +1,15 @@
/* autogenerated from "macros/Sinks/CLKOUT_f.sci" */
function CLKOUT_f() {
CLKOUT_f.prototype.define = function CLKOUT_f() {
- prt = 1;
+ this.prt = 1;
model = scicos_model();
model.sim = "output";
model.evtin = 1;
- model.ipar = prt;
+ model.ipar = this.prt;
model.blocktype = "d";
model.firing = [];
model.dep_ut = [false,false];
- exprs = string(prt);
+ exprs = string(this.prt);
this.x = standard_define([1,1],model,exprs," ");
return new BasicBlock(this.x);
}
@@ -25,15 +25,15 @@ function CLKOUT_f() {
exprs = graphics.exprs;
exprs = exprs[1-1];
while (true) {
- [ok,prt,exprs] = scicos_getvalue("Set Event Output block parameters","Port number",list("vec",1),exprs);
+ [ok,this.prt,exprs] = scicos_getvalue("Set Event Output block parameters","Port number",list("vec",1),exprs);
if (!ok) {
break;
}
- prt = int(prt);
- if (prt<=0) {
+ this.prt = int(this.prt);
+ if (this.prt<=0) {
message("Port number must be a positive integer");
} else {
- model.ipar = prt;
+ model.ipar = this.prt;
model.evtin = 1;
model.firing = [];
graphics.exprs = exprs;
diff --git a/js/Sinks/CLKOUT_f.pickle b/js/Sinks/CLKOUT_f.pickle
index 0d1dde24..48ee82e7 100644
--- a/js/Sinks/CLKOUT_f.pickle
+++ b/js/Sinks/CLKOUT_f.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'prt'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Sinks/CMAT3D.js b/js/Sinks/CMAT3D.js
index 6c89a28f..602b50f1 100644
--- a/js/Sinks/CMAT3D.js
+++ b/js/Sinks/CMAT3D.js
@@ -1,9 +1,9 @@
/* autogenerated from "macros/Sinks/CMAT3D.sci" */
function CMAT3D() {
CMAT3D.prototype.define = function CMAT3D() {
- cmin = 0;
- cmax = 100;
- colormap = this.jetcolormap[25-1];
+ this.cmin = 0;
+ this.cmax = 100;
+ this.colormap = this.jetcolormap[25-1];
size_c = 25;
this.x = -1;
y = -1;
@@ -15,11 +15,11 @@ function CMAT3D() {
model.in2 = -2;
model.intyp = 1;
model.evtin = 1;
- model.ipar = [[cmin],[cmax],[size_c],[size_x],[size_y]];
- model.rpar = [[colormap.slice()],[this.x],[y]];
+ model.ipar = [[this.cmin],[this.cmax],[size_c],[size_x],[size_y]];
+ model.rpar = [[this.colormap.slice()],[this.x],[y]];
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [[strcat(string(this.x)," ")],[strcat(string(y)," ")],[string("jetcolormap(25)")],[string(cmin)],[string(cmax)]];
+ exprs = [[strcat(string(this.x)," ")],[strcat(string(y)," ")],[string("jetcolormap(25)")],[string(this.cmin)],[string(this.cmax)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -35,16 +35,16 @@ function CMAT3D() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,vec_x,vec_y,colormap,cmin,cmax,exprs] = scicos_getvalue("Set Scope parameters",[["Bounds Vector X (-1 for standard)"],["Bounds Vector Y (-1 for standard)"],["ColorMap"],["Zmin"],["Zmax"]],list("vec",-1,"vec",-1,"vec",-1,"vec",1,"vec",1),exprs);
+ [ok,this.vec_x,this.vec_y,this.colormap,this.cmin,this.cmax,exprs] = scicos_getvalue("Set Scope parameters",[["Bounds Vector X (-1 for standard)"],["Bounds Vector Y (-1 for standard)"],["ColorMap"],["Zmin"],["Zmax"]],list("vec",-1,"vec",-1,"vec",-1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
mess = [];
- if (size(vec_x,"*")!=size(vec_y,"*")) {
+ if (size(this.vec_x,"*")!=size(this.vec_y,"*")) {
mess = [[mess],["Vector X and Vector Y must have the same size"],[" "]];
ok = false;
}
- if (cmax<=cmin) {
+ if (this.cmax<=this.cmin) {
mess = [[mess],["Error with minimum and maximum value"],[" "]];
ok = false;
}
@@ -52,10 +52,10 @@ function CMAT3D() {
message([["Some specified values are inconsistent:"],[" "],[mess]]);
}
if (ok) {
- size_x = size(vec_x,"*");
- size_c = size(colormap.slice(),1);
- ipar = [[cmin],[cmax],[size_c],[size_x]];
- rpar = [[colormap.slice()],[vec_x.slice()],[vec_y.slice()]];
+ size_x = size(this.vec_x,"*");
+ size_c = size(this.colormap.slice(),1);
+ ipar = [[this.cmin],[this.cmax],[size_c],[size_x]];
+ rpar = [[this.colormap.slice()],[this.vec_x.slice()],[this.vec_y.slice()]];
model.ipar = ipar;
model.rpar = rpar;
graphics.exprs = exprs;
diff --git a/js/Sinks/CMAT3D.pickle b/js/Sinks/CMAT3D.pickle
index 3467fd44..8ae2ae8c 100644
--- a/js/Sinks/CMAT3D.pickle
+++ b/js/Sinks/CMAT3D.pickle
@@ -2,10 +2,20 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'colormap'
p2
-aS'jetcolormap'
+aS'vec_x'
p3
-atp4
-Rp5
+aS'vec_y'
+p4
+aS'jetcolormap'
+p5
+aS'x'
+p6
+aS'cmax'
+p7
+aS'cmin'
+p8
+atp9
+Rp10
. \ No newline at end of file
diff --git a/js/Sinks/CMATVIEW.js b/js/Sinks/CMATVIEW.js
index 338b249b..12e1cb51 100644
--- a/js/Sinks/CMATVIEW.js
+++ b/js/Sinks/CMATVIEW.js
@@ -1,10 +1,10 @@
/* autogenerated from "macros/Sinks/CMATVIEW.sci" */
function CMATVIEW() {
CMATVIEW.prototype.define = function CMATVIEW() {
- cmin = 0;
- cmax = 100;
+ this.cmin = 0;
+ this.cmax = 100;
size_c = 25;
- colormap = this.jetcolormap[size_c-1];
+ this.colormap = this.jetcolormap[size_c-1];
alpha_c = 0.24;
beta_c = 1;
model = scicos_model();
@@ -13,11 +13,11 @@ function CMATVIEW() {
model.in2 = -2;
model.intyp = 1;
model.evtin = 1;
- model.ipar = [[cmin],[cmax],[size_c]];
- model.rpar = [[alpha_c],[beta_c],[colormap.slice()]];
+ model.ipar = [[this.cmin],[this.cmax],[size_c]];
+ model.rpar = [[alpha_c],[beta_c],[this.colormap.slice()]];
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [[string("jetcolormap(25)")],[string(cmin)],[string(cmax)]];
+ exprs = [[string("jetcolormap(25)")],[string(this.cmin)],[string(this.cmax)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -33,12 +33,12 @@ function CMATVIEW() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,colormap,cmin,cmax,exprs] = scicos_getvalue("Set Scope parameters",[["ColorMap"],["Minimum level range"],["Maximum level range"]],list("vec",-1,"vec",1,"vec",1),exprs);
+ [ok,this.colormap,this.cmin,this.cmax,exprs] = scicos_getvalue("Set Scope parameters",[["ColorMap"],["Minimum level range"],["Maximum level range"]],list("vec",-1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
mess = [];
- if (cmax<=cmin) {
+ if (this.cmax<=this.cmin) {
mess = [[mess],["Error with minimum and maximum value"],[" "]];
ok = false;
}
@@ -46,12 +46,12 @@ function CMATVIEW() {
message([["Some specified values are inconsistent:"],[" "],[mess]]);
}
if (ok) {
- size_c = size(colormap.slice(),1);
- sol = inv([[cmin,1],[cmax,1]])*[[1],[size_c/3]];
+ size_c = size(this.colormap.slice(),1);
+ sol = inv([[this.cmin,1],[this.cmax,1]])*[[1],[size_c/3]];
alpha_c = sol[1-1];
beta_c = sol[2-1];
- ipar = [[cmin],[cmax],[size_c]];
- rpar = [[alpha_c],[beta_c],[colormap.slice()]];
+ ipar = [[this.cmin],[this.cmax],[size_c]];
+ rpar = [[alpha_c],[beta_c],[this.colormap.slice()]];
model.ipar = ipar;
model.rpar = rpar;
graphics.exprs = exprs;
diff --git a/js/Sinks/CMATVIEW.pickle b/js/Sinks/CMATVIEW.pickle
index 3467fd44..86b5cbfe 100644
--- a/js/Sinks/CMATVIEW.pickle
+++ b/js/Sinks/CMATVIEW.pickle
@@ -4,8 +4,14 @@ p0
((lp1
S'x'
p2
-aS'jetcolormap'
+aS'cmax'
p3
-atp4
-Rp5
+aS'jetcolormap'
+p4
+aS'colormap'
+p5
+aS'cmin'
+p6
+atp7
+Rp8
. \ No newline at end of file
diff --git a/js/Sinks/CMSCOPE.js b/js/Sinks/CMSCOPE.js
index 2b210dcf..f437da92 100644
--- a/js/Sinks/CMSCOPE.js
+++ b/js/Sinks/CMSCOPE.js
@@ -1,28 +1,28 @@
/* autogenerated from "macros/Sinks/CMSCOPE.sci" */
function CMSCOPE() {
CMSCOPE.prototype.define = function CMSCOPE() {
- win = -1;
- in1 = [[1],[1]];
- wdim = [[-1],[-1]];
- wpos = [[-1],[-1]];
- clrs = [[1],[3],[5],[7],[9],[11],[13],[15]];
- N = 20;
- ymin = [[-1],[-5]];
- ymax = [[1],[5]];
- per = [[30],[30]];
- yy = [[transpose(ymin.slice())],[transpose(ymax.slice())]];
- period = transpose(per.slice());
+ this.win = -1;
+ this.in1 = [[1],[1]];
+ this.wdim = [[-1],[-1]];
+ this.wpos = [[-1],[-1]];
+ this.clrs = [[1],[3],[5],[7],[9],[11],[13],[15]];
+ this.N = 20;
+ this.ymin = [[-1],[-5]];
+ this.ymax = [[1],[5]];
+ this.per = [[30],[30]];
+ yy = [[transpose(this.ymin.slice())],[transpose(this.ymax.slice())]];
+ period = transpose(this.per.slice());
model = scicos_model();
model.sim = list("cmscope",4);
- model.in1 = in1;
+ model.in1 = this.in1;
model.in2 = [[1],[1]];
model.intyp = [[1],[1]];
model.evtin = 1;
model.rpar = [[0],[period.slice()],[yy.slice()]];
- model.ipar = [[win],[size(in1,"*")],[N],[wpos.slice()],[wdim.slice()],[in1.slice()],[clrs.slice(1-1,sum(in1))]];
+ model.ipar = [[this.win],[size(this.in1,"*")],[this.N],[this.wpos.slice()],[this.wdim.slice()],[this.in1.slice()],[this.clrs.slice(1-1,sum(this.in1))]];
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [[strcat(string(in1)," ")],[strcat(string(clrs)," ")],[string(win)],[sci2exp([])],[sci2exp([])],[strcat(string(ymin)," ")],[strcat(string(ymax)," ")],[strcat(string(per)," ")],[string(N)],[string(0)],[emptystr()]];
+ exprs = [[strcat(string(this.in1)," ")],[strcat(string(this.clrs)," ")],[string(this.win)],[sci2exp([])],[sci2exp([])],[strcat(string(this.ymin)," ")],[strcat(string(this.ymax)," ")],[strcat(string(this.per)," ")],[string(this.N)],[string(0)],[emptystr()]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -38,54 +38,54 @@ function CMSCOPE() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,in1,clrs,win,wpos,wdim,ymin,ymax,per,N,heritance,nom,exprs] = scicos_getvalue("Set Scope parameters",[["Input ports sizes"],["Drawing colors (>0) or mark (<0)"],["Output window number (-1 for automatic)"],["Output window position"],["Output window sizes"],["Ymin vector"],["Ymax vector"],["Refresh period"],["Buffer size"],["Accept herited events 0/1","Name of Scope (label&Id)"]],list("vec",-1,"vec",-1,"vec",1,"vec",-1,"vec",-1,"vec","size(%1,\'*\')","vec","size(%1,\'*\')","vec","size(%1,\'*\')","vec",1,"vec",1,"str",1),exprs);
+ [ok,this.in1,this.clrs,this.win,this.wpos,this.wdim,this.ymin,this.ymax,this.per,this.N,this.heritance,this.nom,exprs] = scicos_getvalue("Set Scope parameters",[["Input ports sizes"],["Drawing colors (>0) or mark (<0)"],["Output window number (-1 for automatic)"],["Output window position"],["Output window sizes"],["Ymin vector"],["Ymax vector"],["Refresh period"],["Buffer size"],["Accept herited events 0/1","Name of Scope (label&Id)"]],list("vec",-1,"vec",-1,"vec",1,"vec",-1,"vec",-1,"vec","size(%1,\'*\')","vec","size(%1,\'*\')","vec","size(%1,\'*\')","vec",1,"vec",1,"str",1),exprs);
if (!ok) {
break;
}
mess = [];
- if (size(in1,"*")<=0) {
+ if (size(this.in1,"*")<=0) {
mess = [[mess],["Block must have at least one input port"],[" "]];
ok = false;
}
- if (min(in1)<=0) {
+ if (min(this.in1)<=0) {
mess = [[mess],["Port sizes must be positive"],[" "]];
ok = false;
}
- if (size(clrs,"*")<sum(in1)) {
- mess = [[mess],["Not enough colors defined (at least "+string(sum(in1))+")"],[" "]];
+ if (size(this.clrs,"*")<sum(this.in1)) {
+ mess = [[mess],["Not enough colors defined (at least "+string(sum(this.in1))+")"],[" "]];
ok = false;
}
- if (size(wpos,"*")!=0&&size(wpos,"*")!=2) {
+ if (size(this.wpos,"*")!=0&&size(this.wpos,"*")!=2) {
mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
ok = false;
}
- if (size(wdim,"*")!=0&&size(wdim,"*")!=2) {
+ if (size(this.wdim,"*")!=0&&size(this.wdim,"*")!=2) {
mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
ok = false;
}
- if (win<-1) {
+ if (this.win<-1) {
mess = [[mess],["Window number can\'t be < -1"],[" "]];
ok = false;
}
- if (size(per,"*")!=size(ymin,"*")) {
+ if (size(this.per,"*")!=size(this.ymin,"*")) {
mess = [[mess],["Size of Refresh Period must equal size of Ymin/Ymax vector"],[" "]];
ok = false;
}
- for (i=1;i<=size(per,"*");i+=1) {
- if ((per[i-1]<=0)) {
+ for (i=1;i<=size(this.per,"*");i+=1) {
+ if ((this.per[i-1]<=0)) {
mess = [[mess],["Refresh Period must be positive"],[" "]];
ok = false;
}
}
- if (N<2) {
+ if (this.N<2) {
mess = [[mess],["Buffer size must be at least 2"],[" "]];
ok = false;
}
- if (or(ymin>=ymax)) {
+ if (or(this.ymin>=this.ymax)) {
mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
ok = false;
}
- if (!or(heritance==[0,1])) {
+ if (!or(this.heritance==[0,1])) {
mess = [[mess],["Accept herited events must be 0 or 1"],[" "]];
ok = false;
}
@@ -93,30 +93,30 @@ function CMSCOPE() {
message([["Some specified values are inconsistent:"],[" "],[mess]]);
}
if (ok) {
- in1 = in1.slice();
- a = size(in1,1);
+ this.in1 = this.in1.slice();
+ a = size(this.in1,1);
in2 = ones(a,1);
- [model,graphics,ok] = set_io(model,graphics,list([in1,in2],ones(a,1)),list(),ones(1-heritance,1),[]);
+ [model,graphics,ok] = set_io(model,graphics,list([this.in1,in2],ones(a,1)),list(),ones(1-this.heritance,1),[]);
}
if (ok) {
- if (wpos==[]) {
- wpos = [[-1],[-1]];
+ if (this.wpos==[]) {
+ this.wpos = [[-1],[-1]];
}
- if (wdim==[]) {
- wdim = [[-1],[-1]];
+ if (this.wdim==[]) {
+ this.wdim = [[-1],[-1]];
}
if (ok) {
- period = transpose(per.slice());
- yy = [[transpose(ymin.slice())],[transpose(ymax.slice())]];
+ period = transpose(this.per.slice());
+ yy = [[transpose(this.ymin.slice())],[transpose(this.ymax.slice())]];
rpar = [[0],[period.slice()],[yy.slice()]];
- clrs = clrs.slice(1-1,sum(in1));
- ipar = [[win],[size(in1,"*")],[N],[wpos.slice()],[wdim.slice()],[in1.slice()],[clrs.slice()],[heritance]];
- model.evtin = ones(1-heritance,1);
+ this.clrs = this.clrs.slice(1-1,sum(this.in1));
+ ipar = [[this.win],[size(this.in1,"*")],[this.N],[this.wpos.slice()],[this.wdim.slice()],[this.in1.slice()],[this.clrs.slice()],[this.heritance]];
+ model.evtin = ones(1-this.heritance,1);
model.dstate = [];
model.rpar = rpar;
model.ipar = ipar;
- model.label = nom;
- graphics.id = nom;
+ model.label = this.nom;
+ graphics.id = this.nom;
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Sinks/CMSCOPE.pickle b/js/Sinks/CMSCOPE.pickle
index 0d1dde24..b479aaa0 100644
--- a/js/Sinks/CMSCOPE.pickle
+++ b/js/Sinks/CMSCOPE.pickle
@@ -2,8 +2,30 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'clrs'
p2
-atp3
-Rp4
+aS'nom'
+p3
+aS'ymax'
+p4
+aS'wpos'
+p5
+aS'win'
+p6
+aS'in1'
+p7
+aS'per'
+p8
+aS'N'
+p9
+aS'wdim'
+p10
+aS'x'
+p11
+aS'ymin'
+p12
+aS'heritance'
+p13
+atp14
+Rp15
. \ No newline at end of file
diff --git a/js/Sinks/CSCOPE.js b/js/Sinks/CSCOPE.js
index f0b1699e..788b497e 100644
--- a/js/Sinks/CSCOPE.js
+++ b/js/Sinks/CSCOPE.js
@@ -1,24 +1,24 @@
/* autogenerated from "macros/Sinks/CSCOPE.sci" */
function CSCOPE() {
CSCOPE.prototype.define = function CSCOPE() {
- win = -1;
- wdim = [[600],[400]];
- wpos = [[-1],[-1]];
- clrs = [[1],[3],[5],[7],[9],[11],[13],[15]];
- N = 20;
- ymin = -15;
- ymax = +15;
- per = 30;
+ this.win = -1;
+ this.wdim = [[600],[400]];
+ this.wpos = [[-1],[-1]];
+ this.clrs = [[1],[3],[5],[7],[9],[11],[13],[15]];
+ this.N = 20;
+ this.ymin = -15;
+ this.ymax = +15;
+ this.per = 30;
model = scicos_model();
model.sim = list("cscope",4);
model.in1 = -1;
model.in2 = 1;
model.evtin = 1;
- model.rpar = [[0],[ymin],[ymax],[per]];
- model.ipar = [[win],[1],[N],[clrs],[wpos],[wdim]];
+ model.rpar = [[0],[this.ymin],[this.ymax],[this.per]];
+ model.ipar = [[this.win],[1],[this.N],[this.clrs],[this.wpos],[this.wdim]];
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [[strcat(string(clrs)," ")],[string(win)],[sci2exp([])],[sci2exp(wdim)],[string(ymin)],[string(ymax)],[string(per)],[string(N)],[transpose(string(0))],[emptystr()]];
+ exprs = [[strcat(string(this.clrs)," ")],[string(this.win)],[sci2exp([])],[sci2exp(this.wdim)],[string(this.ymin)],[string(this.ymax)],[string(this.per)],[string(this.N)],[transpose(string(0))],[emptystr()]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -34,36 +34,36 @@ function CSCOPE() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,clrs,win,wpos,wdim,ymin,ymax,per,N,heritance,nom,exprs] = scicos_getvalue("Set Scope parameters",[["Color (>0) or mark (<0) vector (8 entries)"],["Output window number (-1 for automatic)"],["Output window position"],["Output window sizes"],["Ymin"],["Ymax"],["Refresh period"],["Buffer size","Accept herited events 0/1","Name of Scope (label&Id)"]],list("vec",8,"vec",1,"vec",-1,"vec",-1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"str",1),exprs);
+ [ok,this.clrs,this.win,this.wpos,this.wdim,this.ymin,this.ymax,this.per,this.N,this.heritance,this.nom,exprs] = scicos_getvalue("Set Scope parameters",[["Color (>0) or mark (<0) vector (8 entries)"],["Output window number (-1 for automatic)"],["Output window position"],["Output window sizes"],["Ymin"],["Ymax"],["Refresh period"],["Buffer size","Accept herited events 0/1","Name of Scope (label&Id)"]],list("vec",8,"vec",1,"vec",-1,"vec",-1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"str",1),exprs);
if (!ok) {
break;
}
mess = [];
- if (size(wpos,"*")!=0&&size(wpos,"*")!=2) {
+ if (size(this.wpos,"*")!=0&&size(this.wpos,"*")!=2) {
mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
ok = false;
}
- if (size(wdim,"*")!=0&&size(wdim,"*")!=2) {
+ if (size(this.wdim,"*")!=0&&size(this.wdim,"*")!=2) {
mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
ok = false;
}
- if (win<-1) {
+ if (this.win<-1) {
mess = [[mess],["Window number can\'t be < -1"],[" "]];
ok = false;
}
- if (per<=0) {
+ if (this.per<=0) {
mess = [[mess],["Refresh period must be positive"],[" "]];
ok = false;
}
- if (N<2) {
+ if (this.N<2) {
mess = [[mess],["Buffer size must be at least 2"],[" "]];
ok = false;
}
- if (ymin>=ymax) {
+ if (this.ymin>=this.ymax) {
mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
ok = false;
}
- if (!or(heritance==[0,1])) {
+ if (!or(this.heritance==[0,1])) {
mess = [[mess],["Accept herited events must be 0 or 1"],[" "]];
ok = false;
}
@@ -71,22 +71,22 @@ function CSCOPE() {
message([["Some specified values are inconsistent:"],[" "],[mess]]);
}
if (ok) {
- [model,graphics,ok] = set_io(model,graphics,list([-1,1],1),list(),ones(1-heritance,1),[]);
+ [model,graphics,ok] = set_io(model,graphics,list([-1,1],1),list(),ones(1-this.heritance,1),[]);
}
if (ok) {
- if (wpos==[]) {
- wpos = [[-1],[-1]];
+ if (this.wpos==[]) {
+ this.wpos = [[-1],[-1]];
}
- if (wdim==[]) {
- wdim = [[-1],[-1]];
+ if (this.wdim==[]) {
+ this.wdim = [[-1],[-1]];
}
- rpar = [[0],[ymin],[ymax],[per]];
- ipar = [[win],[1],[N],[clrs.slice()],[wpos.slice()],[wdim.slice()]];
+ rpar = [[0],[this.ymin],[this.ymax],[this.per]];
+ ipar = [[this.win],[1],[this.N],[this.clrs.slice()],[this.wpos.slice()],[this.wdim.slice()]];
model.rpar = rpar;
model.ipar = ipar;
- model.evtin = ones(1-heritance,1);
- model.label = nom;
- graphics.id = nom;
+ model.evtin = ones(1-this.heritance,1);
+ model.label = this.nom;
+ graphics.id = this.nom;
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Sinks/CSCOPE.pickle b/js/Sinks/CSCOPE.pickle
index 0d1dde24..e1bcefc3 100644
--- a/js/Sinks/CSCOPE.pickle
+++ b/js/Sinks/CSCOPE.pickle
@@ -2,8 +2,28 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'clrs'
p2
-atp3
-Rp4
+aS'nom'
+p3
+aS'ymax'
+p4
+aS'wpos'
+p5
+aS'win'
+p6
+aS'per'
+p7
+aS'N'
+p8
+aS'wdim'
+p9
+aS'x'
+p10
+aS'ymin'
+p11
+aS'heritance'
+p12
+atp13
+Rp14
. \ No newline at end of file
diff --git a/js/Sinks/CSCOPXY.js b/js/Sinks/CSCOPXY.js
index 769fe395..0b2e9b80 100644
--- a/js/Sinks/CSCOPXY.js
+++ b/js/Sinks/CSCOPXY.js
@@ -1,28 +1,28 @@
/* autogenerated from "macros/Sinks/CSCOPXY.sci" */
function CSCOPXY() {
CSCOPXY.prototype.define = function CSCOPXY() {
- win = -1;
- clrs = 4;
- siz = 1;
- wdim = [[600],[400]];
- wpos = [[-1],[-1]];
- N = 2;
- xmin = -15;
- xmax = 15;
- ymin = -15;
- ymax = +15;
- nbr_curves = 1;
+ this.win = -1;
+ this.clrs = 4;
+ this.siz = 1;
+ this.wdim = [[600],[400]];
+ this.wpos = [[-1],[-1]];
+ this.N = 2;
+ this.xmin = -15;
+ this.xmax = 15;
+ this.ymin = -15;
+ this.ymax = +15;
+ this.nbr_curves = 1;
model = scicos_model();
model.sim = list("cscopxy",4);
model.in1 = [[1],[1]];
model.in2 = [[1],[1]];
model.intyp = [[1],[1]];
model.evtin = 1;
- model.rpar = [[xmin],[xmax],[ymin],[ymax]];
- model.ipar = [[win],[1],[N],[clrs],[siz],[1],[wpos.slice()],[wdim.slice()],[nbr_curves]];
+ model.rpar = [[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
+ model.ipar = [[this.win],[1],[this.N],[this.clrs],[this.siz],[1],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]];
model.blocktype = "d";
model.dep_ut = [false,false];
- exprs = [[string(nbr_curves)],[sci2exp(clrs)],[sci2exp(siz)],[string(win)],[sci2exp([])],[sci2exp(wdim)],[string(xmin)],[string(xmax)],[string(ymin)],[string(ymax)],[string(N)]];
+ exprs = [[string(this.nbr_curves)],[sci2exp(this.clrs)],[sci2exp(this.siz)],[string(this.win)],[sci2exp([])],[sci2exp(this.wdim)],[string(this.xmin)],[string(this.xmax)],[string(this.ymin)],[string(this.ymax)],[string(this.N)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -38,57 +38,57 @@ function CSCOPXY() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,nbr_curves,clrs,siz,win,wpos,wdim,xmin,xmax,ymin,ymax,N,exprs] = scicos_getvalue("Set Scope parameters",[["Number of Curves"],["color (>0) or mark (<0)"],["line or mark size"],["Output window number (-1 for automatic)"],["Output window position"],["Output window sizes"],["Xmin"],["Xmax"],["Ymin"],["Ymax"],["Buffer size"]],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",-1,"vec",-1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.nbr_curves,this.clrs,this.siz,this.win,this.wpos,this.wdim,this.xmin,this.xmax,this.ymin,this.ymax,this.N,exprs] = scicos_getvalue("Set Scope parameters",[["Number of Curves"],["color (>0) or mark (<0)"],["line or mark size"],["Output window number (-1 for automatic)"],["Output window position"],["Output window sizes"],["Xmin"],["Xmax"],["Ymin"],["Ymax"],["Buffer size"]],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",-1,"vec",-1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
mess = [];
- if (size(wpos,"*")!=0&&size(wpos,"*")!=2) {
+ if (size(this.wpos,"*")!=0&&size(this.wpos,"*")!=2) {
mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
ok = false;
}
- if (size(wdim,"*")!=0&&size(wdim,"*")!=2) {
+ if (size(this.wdim,"*")!=0&&size(this.wdim,"*")!=2) {
mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
ok = false;
}
- if (nbr_curves<=0) {
+ if (this.nbr_curves<=0) {
mess = [[mess],["Number of Curves cannot be negative or null"],[" "]];
ok = false;
}
- if (win<-1) {
+ if (this.win<-1) {
mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
ok = false;
}
- if (N<1) {
+ if (this.N<1) {
mess = [[mess],["Buffer size must be at least 1"],[" "]];
ok = false;
}
- if (N==1&&clrs>0) {
+ if (this.N==1&&this.clrs>0) {
mess = [[mess],["Buffer size must be at least 2"],[" "]];
ok = false;
}
- if (ymin>=ymax) {
+ if (this.ymin>=this.ymax) {
mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
ok = false;
}
- if (xmin>=xmax) {
+ if (this.xmin>=this.xmax) {
mess = [[mess],["Xmax must be greater than Xmin"],[" "]];
ok = false;
}
if (!ok) {
message(mess);
} else {
- in1 = nbr_curves*ones(2,1);
+ in1 = this.nbr_curves*ones(2,1);
in2 = ones(2,1);
[model,graphics,ok] = set_io(model,graphics,list([in1,in2],ones(2,1)),list(),ones(1,1),[]);
- if (wpos==[]) {
- wpos = [[-1],[-1]];
+ if (this.wpos==[]) {
+ this.wpos = [[-1],[-1]];
}
- if (wdim==[]) {
- wdim = [[-1],[-1]];
+ if (this.wdim==[]) {
+ this.wdim = [[-1],[-1]];
}
- rpar = [[xmin],[xmax],[ymin],[ymax]];
- ipar = [[win],[1],[N],[clrs],[siz],[1],[wpos.slice()],[wdim.slice()],[nbr_curves]];
+ rpar = [[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
+ ipar = [[this.win],[1],[this.N],[this.clrs],[this.siz],[1],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]];
model.rpar = rpar;
model.ipar = ipar;
graphics.exprs = exprs;
diff --git a/js/Sinks/CSCOPXY.pickle b/js/Sinks/CSCOPXY.pickle
index 0d1dde24..a365a644 100644
--- a/js/Sinks/CSCOPXY.pickle
+++ b/js/Sinks/CSCOPXY.pickle
@@ -2,8 +2,30 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'clrs'
p2
-atp3
-Rp4
+aS'ymin'
+p3
+aS'ymax'
+p4
+aS'wpos'
+p5
+aS'win'
+p6
+aS'wdim'
+p7
+aS'N'
+p8
+aS'xmax'
+p9
+aS'siz'
+p10
+aS'xmin'
+p11
+aS'x'
+p12
+aS'nbr_curves'
+p13
+atp14
+Rp15
. \ No newline at end of file
diff --git a/js/Sinks/CSCOPXY3D.js b/js/Sinks/CSCOPXY3D.js
index 6a08003e..af7af449 100644
--- a/js/Sinks/CSCOPXY3D.js
+++ b/js/Sinks/CSCOPXY3D.js
@@ -1,28 +1,28 @@
/* autogenerated from "macros/Sinks/CSCOPXY3D.sci" */
function CSCOPXY3D() {
CSCOPXY3D.prototype.define = function CSCOPXY3D() {
- win = -1;
- clrs = [[1],[2],[3],[4],[5],[6],[7],[13]];
- siz = [[1],[1],[1],[1],[1],[1],[1],[1]];
- wdim = [[600],[400]];
- wpos = [[-1],[-1]];
- N = 2;
- param3ds = [[50],[280]];
- vec_x = [[-15],[15]];
- vec_y = [[-15],[15]];
- vec_z = [[-15],[15]];
- nbr_curves = 1;
+ this.win = -1;
+ this.clrs = [[1],[2],[3],[4],[5],[6],[7],[13]];
+ this.siz = [[1],[1],[1],[1],[1],[1],[1],[1]];
+ this.wdim = [[600],[400]];
+ this.wpos = [[-1],[-1]];
+ this.N = 2;
+ this.param3ds = [[50],[280]];
+ this.vec_x = [[-15],[15]];
+ this.vec_y = [[-15],[15]];
+ this.vec_z = [[-15],[15]];
+ this.nbr_curves = 1;
model = scicos_model();
model.sim = list("cscopxy3d",4);
model.in1 = [[1],[1],[1]];
model.in2 = [[1],[1],[1]];
model.intyp = [[1],[1],[1]];
model.evtin = 1;
- model.rpar = [[vec_x.slice()],[vec_y.slice()],[vec_z.slice()],[param3ds.slice()]];
- model.ipar = [[win],[8],[N],[clrs.slice()],[siz.slice()],[8],[wpos.slice()],[wdim.slice()],[nbr_curves]];
+ model.rpar = [[this.vec_x.slice()],[this.vec_y.slice()],[this.vec_z.slice()],[this.param3ds.slice()]];
+ model.ipar = [[this.win],[8],[this.N],[this.clrs.slice()],[this.siz.slice()],[8],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]];
model.blocktype = "d";
model.dep_ut = [false,false];
- exprs = [[string(nbr_curves)],[strcat(string(clrs)," ")],[strcat(string(siz)," ")],[string(win)],[sci2exp([])],[sci2exp(wdim)],[strcat(string(vec_x)," ")],[strcat(string(vec_y)," ")],[strcat(string(vec_z)," ")],[strcat(string(param3ds)," ")],[string(N)]];
+ exprs = [[string(this.nbr_curves)],[strcat(string(this.clrs)," ")],[strcat(string(this.siz)," ")],[string(this.win)],[sci2exp([])],[sci2exp(this.wdim)],[strcat(string(this.vec_x)," ")],[strcat(string(this.vec_y)," ")],[strcat(string(this.vec_z)," ")],[strcat(string(this.param3ds)," ")],[string(this.N)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -38,68 +38,68 @@ function CSCOPXY3D() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,nbr_curves,clrs,siz,win,wpos,wdim,vec_x,vec_y,vec_z,param3ds,N,exprs] = scicos_getvalue("Set Scope parameters",[["Number of curves"],["color (>0) or mark (<0)"],["Line or Mark Size"],["Output window number (-1 for automatic)"],["Output window position"],["Output window sizes"],["Xmin and Xmax"],["Ymin and Ymax"],["Zmin and Zmax"],["Alpha and Theta"],["Buffer size"]],list("vec",1,"vec",-1,"vec",-1,"vec",1,"vec",-1,"vec",-1,"vec",2,"vec",2,"vec",2,"vec",2,"vec",1),exprs);
+ [ok,this.nbr_curves,this.clrs,this.siz,this.win,this.wpos,this.wdim,this.vec_x,this.vec_y,this.vec_z,this.param3ds,this.N,exprs] = scicos_getvalue("Set Scope parameters",[["Number of curves"],["color (>0) or mark (<0)"],["Line or Mark Size"],["Output window number (-1 for automatic)"],["Output window position"],["Output window sizes"],["Xmin and Xmax"],["Ymin and Ymax"],["Zmin and Zmax"],["Alpha and Theta"],["Buffer size"]],list("vec",1,"vec",-1,"vec",-1,"vec",1,"vec",-1,"vec",-1,"vec",2,"vec",2,"vec",2,"vec",2,"vec",1),exprs);
if (!ok) {
break;
}
mess = [];
- if (size(wpos,"*")!=0&&size(wpos,"*")!=2) {
+ if (size(this.wpos,"*")!=0&&size(this.wpos,"*")!=2) {
mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
ok = false;
}
- if (size(wdim,"*")!=0&&size(wdim,"*")!=2) {
+ if (size(this.wdim,"*")!=0&&size(this.wdim,"*")!=2) {
mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
ok = false;
}
- if (size(clrs,"*")!=size(siz,"*")) {
+ if (size(this.clrs,"*")!=size(this.siz,"*")) {
mess = [[mess],["Colors and Size must have same size"],[" "]];
ok = false;
}
- if (nbr_curves<=0) {
+ if (this.nbr_curves<=0) {
mess = [[mess],["Number of curves cannot be negative or null"],[" "]];
ok = false;
}
- if (win<-1) {
+ if (this.win<-1) {
mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
ok = false;
}
- if (N<1) {
+ if (this.N<1) {
mess = [[mess],["Buffer size must be at least 1"],[" "]];
ok = false;
}
- if (N<2) {
- for (i=1;i<=size(clrs,"*");i+=1) {
- if (clrs[i-1]>0) {
+ if (this.N<2) {
+ for (i=1;i<=size(this.clrs,"*");i+=1) {
+ if (this.clrs[i-1]>0) {
mess = [[mess],["Buffer size must be at least 2 or Change a color (must be >0)"],[" "]];
ok = false;
}
}
}
- if (vec_y[1-1]>=vec_y[2-1]) {
+ if (this.vec_y[1-1]>=this.vec_y[2-1]) {
mess = [[mess],["Ymax must be higher than Ymin"],[" "]];
ok = false;
}
- if (vec_x[1-1]>=vec_x[2-1]) {
+ if (this.vec_x[1-1]>=this.vec_x[2-1]) {
mess = [[mess],["Xmax must be higher than Xmin"],[" "]];
ok = false;
}
- if (vec_z[1-1]>=vec_z[2-1]) {
+ if (this.vec_z[1-1]>=this.vec_z[2-1]) {
mess = [[mess],["Zmax must be higher than Zmin"],[" "]];
ok = false;
}
if (ok) {
- in1 = nbr_curves*ones(3,1);
+ in1 = this.nbr_curves*ones(3,1);
in2 = ones(3,1);
[model,graphics,ok] = set_io(model,graphics,list([in1,in2],ones(3,1)),list(),ones(1,1),[]);
- if (wpos==[]) {
- wpos = [[-1],[-1]];
+ if (this.wpos==[]) {
+ this.wpos = [[-1],[-1]];
}
- if (wdim==[]) {
- wdim = [[-1],[-1]];
+ if (this.wdim==[]) {
+ this.wdim = [[-1],[-1]];
}
- rpar = [[vec_x.slice()],[vec_y.slice()],[vec_z.slice()],[param3ds.slice()]];
- size_siz = size(siz,"*");
- ipar = [[win],[size_siz],[N],[clrs.slice()],[siz.slice()],[1],[wpos.slice()],[wdim.slice()],[nbr_curves]];
+ rpar = [[this.vec_x.slice()],[this.vec_y.slice()],[this.vec_z.slice()],[this.param3ds.slice()]];
+ size_siz = size(this.siz,"*");
+ ipar = [[this.win],[size_siz],[this.N],[this.clrs.slice()],[this.siz.slice()],[1],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]];
model.rpar = rpar;
model.ipar = ipar;
graphics.exprs = exprs;
diff --git a/js/Sinks/CSCOPXY3D.pickle b/js/Sinks/CSCOPXY3D.pickle
index 0d1dde24..410ab478 100644
--- a/js/Sinks/CSCOPXY3D.pickle
+++ b/js/Sinks/CSCOPXY3D.pickle
@@ -2,8 +2,30 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'clrs'
p2
-atp3
-Rp4
+aS'vec_y'
+p3
+aS'wpos'
+p4
+aS'vec_z'
+p5
+aS'win'
+p6
+aS'vec_x'
+p7
+aS'wdim'
+p8
+aS'param3ds'
+p9
+aS'N'
+p10
+aS'siz'
+p11
+aS'x'
+p12
+aS'nbr_curves'
+p13
+atp14
+Rp15
. \ No newline at end of file
diff --git a/js/Sinks/OUTIMPL_f.js b/js/Sinks/OUTIMPL_f.js
index fb003f2c..10bd39f0 100644
--- a/js/Sinks/OUTIMPL_f.js
+++ b/js/Sinks/OUTIMPL_f.js
@@ -4,7 +4,7 @@ function OUTIMPL_f() {
model = scicos_model();
model.in1 = [-1];
model.in2 = [1];
- prt = 1;
+ this.prt = 1;
model.sim = "outimpl";
model.ipar = [1];
model.blocktype = "c";
@@ -17,7 +17,7 @@ function OUTIMPL_f() {
gr_i = [];
this.x = standard_define([1,1],model,exprs,gr_i);
this.x.graphics.in_implicit = ["I"];
- return new BasicBlock(this.x);
+ return new ImplicitOutBlock(this.x);
}
OUTIMPL_f.prototype.details = function OUTIMPL_f() {
return this.x;
@@ -33,25 +33,25 @@ function OUTIMPL_f() {
exprs = exprs[1-1];
}
while (true) {
- [ok,prt,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"OUTIMPL_f")],[" "],[gettext("Implicit output port")]],gettext("Port number"),list("vec",1),exprs);
+ [ok,this.prt,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"OUTIMPL_f")],[" "],[gettext("Implicit output port")]],gettext("Port number"),list("vec",1),exprs);
if (!ok) {
break;
}
- prt = int(prt);
- if (prt<=0) {
- block_parameter_error(msprintf(gettext("Wrong value for \'Port Number\' parameter: %d."),prt),gettext("Strictly positive integer expected."));
+ this.prt = int(this.prt);
+ if (this.prt<=0) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'Port Number\' parameter: %d."),this.prt),gettext("Strictly positive integer expected."));
} else {
- if (model.ipar!=prt) {
+ if (model.ipar!=this.prt) {
needcompile = 4;
y = needcompile;
}
- model.ipar = prt;
+ model.ipar = this.prt;
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
break;
}
}
- return new BasicBlock(this.x);
+ return new ImplicitOutBlock(this.x);
}
}
diff --git a/js/Sinks/OUTIMPL_f.pickle b/js/Sinks/OUTIMPL_f.pickle
index 0d1dde24..48ee82e7 100644
--- a/js/Sinks/OUTIMPL_f.pickle
+++ b/js/Sinks/OUTIMPL_f.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'prt'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Sinks/OUT_f.js b/js/Sinks/OUT_f.js
index 7a5ef710..d18c01bf 100644
--- a/js/Sinks/OUT_f.js
+++ b/js/Sinks/OUT_f.js
@@ -2,19 +2,19 @@
function OUT_f() {
OUT_f.prototype.define = function OUT_f() {
n = -1;
- prt = 1;
+ this.prt = 1;
model = scicos_model();
model.sim = "output";
model.in1 = -1;
model.in2 = -2;
model.intyp = -1;
- model.ipar = prt;
+ model.ipar = this.prt;
model.blocktype = "c";
model.dep_ut = [false,false];
- exprs = string(prt);
+ exprs = string(this.prt);
gr_i = [];
this.x = standard_define([1,1],model,exprs,gr_i);
- return new BasicBlock(this.x);
+ return new ExplicitOutBlock(this.x);
}
OUT_f.prototype.details = function OUT_f() {
return this.x;
@@ -30,21 +30,21 @@ function OUT_f() {
exprs = exprs[1-1];
}
while (true) {
- [ok,prt,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"OUT_f")],[" "],[gettext("Regular output port")]],gettext("Port number"),list("vec",1),exprs);
+ [ok,this.prt,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"OUT_f")],[" "],[gettext("Regular output port")]],gettext("Port number"),list("vec",1),exprs);
if (!ok) {
break;
}
- prt = int(prt);
- if (prt<=0) {
- block_parameter_error(msprintf(gettext("Wrong value for \'Port Number\' parameter: %d."),prt),gettext("Strictly positive integer expected."));
+ this.prt = int(this.prt);
+ if (this.prt<=0) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'Port Number\' parameter: %d."),this.prt),gettext("Strictly positive integer expected."));
} else {
- model.ipar = prt;
+ model.ipar = this.prt;
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
break;
}
}
- return new BasicBlock(this.x);
+ return new ExplicitOutBlock(this.x);
}
}
diff --git a/js/Sinks/OUT_f.pickle b/js/Sinks/OUT_f.pickle
index 0d1dde24..48ee82e7 100644
--- a/js/Sinks/OUT_f.pickle
+++ b/js/Sinks/OUT_f.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'prt'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Sinks/TOWS_c.js b/js/Sinks/TOWS_c.js
index 790c2021..4e0ad0a6 100644
--- a/js/Sinks/TOWS_c.js
+++ b/js/Sinks/TOWS_c.js
@@ -2,9 +2,9 @@
function TOWS_c() {
TOWS_c.prototype.define = function TOWS_c() {
nu = -1;
- nz = 128;
- varnam = "A";
- herit = 0;
+ this.nz = 128;
+ this.varnam = "A";
+ this.herit = 0;
model = scicos_model();
model.sim = list("tows_c",4);
model.in1 = [nu];
@@ -14,12 +14,12 @@ function TOWS_c() {
model.evtin = [1];
model.evtout = [];
model.rpar = [];
- model.ipar = [[nz],[length(varnam)],[transpose(this.ascii[varnam-1])]];
+ model.ipar = [[this.nz],[length(this.varnam)],[transpose(this.ascii[this.varnam-1])]];
model.blocktype = "d";
model.firing = [];
model.dep_ut = [false,false];
gr_i = [];
- exprs = [[string(nz)],[string(varnam)],[string(herit)]];
+ exprs = [[string(this.nz)],[string(this.varnam)],[string(this.herit)]];
this.x = standard_define([4,2],model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -34,29 +34,29 @@ function TOWS_c() {
model = arg1.model;
exprs = graphics.exprs;
while (true) {
- [ok,nz,varnam,herit,exprs] = scicos_getvalue("Set Xcos buffer block",[["Size of buffer"],["Scilab variable name"],["Inherit (no:0, yes:1)"]],list("vec",1,"str",1,"vec",1),exprs);
+ [ok,this.nz,this.varnam,this.herit,exprs] = scicos_getvalue("Set Xcos buffer block",[["Size of buffer"],["Scilab variable name"],["Inherit (no:0, yes:1)"]],list("vec",1,"str",1,"vec",1),exprs);
if (!ok) {
break;
}
- if ((nz<=0)) {
+ if ((this.nz<=0)) {
message("Size of buffer must be positive");
ok = false;
}
r = false;
ierr = execstr("r = validvar(varnam)","errcatch");
- if (!r||ierr!=0||length(varnam)>19) {
+ if (!r||ierr!=0||length(this.varnam)>19) {
message([["Invalid variable name."],["Please choose another variable name."]]);
ok = false;
}
- execstr("if type("+varnam+") <> 17 | or(fieldnames("+varnam+") <> [\"values\"; \"time\"]) then"+" message([\"Protected variable name.\"; \"Please choose another variable name.\"]);"+" ok = %f;"+" end","errcatch");
+ execstr("if type("+this.varnam+") <> 17 | or(fieldnames("+this.varnam+") <> [\"values\"; \"time\"]) then"+" message([\"Protected variable name.\"; \"Please choose another variable name.\"]);"+" ok = %f;"+" end","errcatch");
if (ok) {
- [model,graphics,ok] = set_io(model,graphics,list([-1,-2],-1),list(),ones(1-herit,1),[]);
- if (herit==1) {
+ [model,graphics,ok] = set_io(model,graphics,list([-1,-2],-1),list(),ones(1-this.herit,1),[]);
+ if (this.herit==1) {
model.blocktype = "x";
} else {
model.blocktype = "d";
}
- model.ipar = [[nz],[length(varnam)],[transpose(this.ascii[varnam-1])]];
+ model.ipar = [[this.nz],[length(this.varnam)],[transpose(this.ascii[this.varnam-1])]];
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Sinks/TOWS_c.pickle b/js/Sinks/TOWS_c.pickle
index 62d608a3..7f1fb191 100644
--- a/js/Sinks/TOWS_c.pickle
+++ b/js/Sinks/TOWS_c.pickle
@@ -4,8 +4,14 @@ p0
((lp1
S'x'
p2
-aS'ascii'
+aS'nz'
p3
-atp4
-Rp5
+aS'herit'
+p4
+aS'ascii'
+p5
+aS'varnam'
+p6
+atp7
+Rp8
. \ No newline at end of file
diff --git a/js/Sinks/WFILE_f.js b/js/Sinks/WFILE_f.js
index 05259e11..2fa50583 100644
--- a/js/Sinks/WFILE_f.js
+++ b/js/Sinks/WFILE_f.js
@@ -1,21 +1,21 @@
/* autogenerated from "macros/Sinks/WFILE_f.sci" */
function WFILE_f() {
WFILE_f.prototype.define = function WFILE_f() {
- in1 = 1;
- nin = sum(in1);
+ this.in1 = 1;
+ nin = sum(this.in1);
frmt = "(7(e10.3,1x))";
fname = "foo";
lunit = 0;
- N = 2;
+ this.N = 2;
model = scicos_model();
model.sim = "writef";
- model.in1 = in1;
+ model.in1 = this.in1;
model.evtin = 1;
- model.dstate = [[-1],[lunit],[zeros((nin+1)*N,1)]];
- model.ipar = [[length(fname)],[length(frmt)],[0],[N],[this._str2code[fname-1]],[this._str2code[frmt-1]]];
+ model.dstate = [[-1],[lunit],[zeros((nin+1)*this.N,1)]];
+ model.ipar = [[length(fname)],[length(frmt)],[0],[this.N],[this._str2code[fname-1]],[this._str2code[frmt-1]]];
model.blocktype = "d";
model.dep_ut = [true,false];
- exprs = [[sci2exp(in1)],[fname],[frmt],[string(N)]];
+ exprs = [[sci2exp(this.in1)],[fname],[frmt],[string(this.N)]];
gr_i = [];
this.x = standard_define([3,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -40,43 +40,43 @@ function WFILE_f() {
fname = exprs[2-1];
frmt = exprs[3-1];
while (true) {
- [ok,in1,fname1,frmt1,N,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"WFILE_f")],[" "],[gettext("Write to output file")],[" "],[gettext("Write is done on:")],[gettext("&nbsp; - A binary file if no format given")],[gettext("&nbsp; - A formatted text file if a format (Fortran type) is given")]],[[gettext("Input Size")],[gettext("Output File Name")],[gettext("Output Format")],[gettext("Buffer Size")]],list("vec",1,"str",1,"str",1,"vec",1),exprs);
+ [ok,this.in1,this.fname1,this.frmt1,this.N,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"WFILE_f")],[" "],[gettext("Write to output file")],[" "],[gettext("Write is done on:")],[gettext("&nbsp; - A binary file if no format given")],[gettext("&nbsp; - A formatted text file if a format (Fortran type) is given")]],[[gettext("Input Size")],[gettext("Output File Name")],[gettext("Output Format")],[gettext("Buffer Size")]],list("vec",1,"str",1,"str",1,"vec",1),exprs);
if (!ok) {
break;
}
- in1 = int(in1);
- nin = in1;
- fname1 = pathconvert(stripblanks(fname1),false,true);
- frmt1 = stripblanks(frmt1);
- if (lunit>0&&min(length(frmt),1)!=min(length(frmt1),1)) {
+ this.in1 = int(this.in1);
+ nin = this.in1;
+ this.fname1 = pathconvert(stripblanks(this.fname1),false,true);
+ this.frmt1 = stripblanks(this.frmt1);
+ if (lunit>0&&min(length(frmt),1)!=min(length(this.frmt1),1)) {
block_parameter_error(gettext("Simulation running !!! You cannot switch<br />between formatted and unformatted when running"),gettext("End current simulation first."));
ok = false;
- } else if (lunit>0&&fname1!=fname) {
+ } else if (lunit>0&&this.fname1!=fname) {
block_parameter_error(gettext("You cannot modify \'Output File Name\' when running."),gettext("End current simulation first."));
ok = false;
- } else if (fname1=="") {
+ } else if (this.fname1=="") {
block_parameter_error(gettext("Wrong value for \'Output File Name\' parameter"),gettext("You must provide a filename."));
ok = false;
- } else if (fileparts(fname1)!="") {
- [pa,fn,ex] = fileparts(fname1);
+ } else if (fileparts(this.fname1)!="") {
+ [pa,fn,ex] = fileparts(this.fname1);
if (!this.isdir[pa-1]) {
block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter."),gettext("Output File Name")),msprintf(gettext("Directory \'%s\' does not exist"),pa));
ok = false;
}
- } else if (frmt1!=""&&(part(frmt1,1)!="("||part(frmt1,length(frmt1))!=")")) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %s."),gettext("Input Format"),frmt1),gettext("You must enclose the format\'s string between parentheses."));
+ } else if (this.frmt1!=""&&(part(this.frmt1,1)!="("||part(this.frmt1,length(this.frmt1))!=")")) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %s."),gettext("Input Format"),this.frmt1),gettext("You must enclose the format\'s string between parentheses."));
ok = false;
- } else if (N<2) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Buffer Size"),N),gettext("Must be greater than 1."));
+ } else if (this.N<2) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Buffer Size"),this.N),gettext("Must be greater than 1."));
ok = false;
- } else if (in1<=0) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Input Size"),in1),gettext("Strictly positive integer expected."));
+ } else if (this.in1<=0) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Input Size"),this.in1),gettext("Strictly positive integer expected."));
ok = false;
}
if (ok) {
- ipar = [[length(fname1)],[length(frmt1)],[0],[N],[this._str2code[fname1-1]],[this._str2code[frmt1-1]]];
- if (prod(size(dstate))!=(nin+1)*N+2) {
- dstate = [[-1],[lunit],[zeros((nin+1)*N,1)]];
+ ipar = [[length(this.fname1)],[length(this.frmt1)],[0],[this.N],[this._str2code[this.fname1-1]],[this._str2code[this.frmt1-1]]];
+ if (prod(size(dstate))!=(nin+1)*this.N+2) {
+ dstate = [[-1],[lunit],[zeros((nin+1)*this.N,1)]];
}
model.in1 = nin;
model.dstate = dstate;
diff --git a/js/Sinks/WFILE_f.pickle b/js/Sinks/WFILE_f.pickle
index 0cb2ae6e..45771d89 100644
--- a/js/Sinks/WFILE_f.pickle
+++ b/js/Sinks/WFILE_f.pickle
@@ -4,10 +4,18 @@ p0
((lp1
S'isdir'
p2
-aS'x'
-p3
aS'_str2code'
+p3
+aS'in1'
p4
-atp5
-Rp6
+aS'fname1'
+p5
+aS'N'
+p6
+aS'frmt1'
+p7
+aS'x'
+p8
+atp9
+Rp10
. \ No newline at end of file
diff --git a/js/Sinks/WRITEAU_f.js b/js/Sinks/WRITEAU_f.js
index 3adafd3e..b644a076 100644
--- a/js/Sinks/WRITEAU_f.js
+++ b/js/Sinks/WRITEAU_f.js
@@ -5,18 +5,18 @@ function WRITEAU_f() {
nin = sum(in1);
frmt = "uc ";
fname = "/dev/audio";
- swap = 0;
+ this.swap = 0;
lunit = 0;
- N = 2;
+ this.N = 2;
model = scicos_model();
model.sim = list("writeau",2);
model.in1 = in1;
model.evtin = 1;
- model.dstate = [[-1],[lunit],[zeros((nin+1)*N,1)]];
- model.ipar = [[length(fname)],[this._str2code[frmt-1]],[N],[swap],[this._str2code[fname-1]]];
+ model.dstate = [[-1],[lunit],[zeros((nin+1)*this.N,1)]];
+ model.ipar = [[length(fname)],[this._str2code[frmt-1]],[this.N],[this.swap],[this._str2code[fname-1]]];
model.blocktype = "d";
model.dep_ut = [true,false];
- exprs = [string(N),string(swap)];
+ exprs = [string(this.N),string(this.swap)];
gr_i = [];
this.x = standard_define([4,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -35,28 +35,28 @@ function WRITEAU_f() {
dstate = model.dstate;
lunit = dstate[2-1];
while (true) {
- [ok,N,swap,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"WRITEAU_f")],[" "],[gettext("Write \'.au\' sound file on audio device")]],[[gettext("Buffer Size")],[gettext("Swap Mode (0:No, 1:Yes)")]],list("vec",1,"vec",1),exprs);
+ [ok,this.N,this.swap,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"WRITEAU_f")],[" "],[gettext("Write \'.au\' sound file on audio device")]],[[gettext("Buffer Size")],[gettext("Swap Mode (0:No, 1:Yes)")]],list("vec",1,"vec",1),exprs);
if (!ok) {
break;
}
nin = 1;
fname1 = "/dev/audio";
frmt1 = "uc ";
- if (this.alreadyran&&(N!=ipar[5-1])) {
+ if (this.alreadyran&&(this.N!=ipar[5-1])) {
block_parameter_error(msprintf(gettext("You cannot modify \'%s\' when running."),gettext("Buffer Size")),gettext("End current simulation first"));
ok = false;
- } else if (N<1) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Buffer Size"),N),gettext("Strictly positive integer expected."));
+ } else if (this.N<1) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Buffer Size"),this.N),gettext("Strictly positive integer expected."));
ok = false;
}
- if (swap!=0&&swap!=1) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Swap Mode"),swap),msprintf(gettext("Must be in the interval %s."),"[0, 1]"));
+ if (this.swap!=0&&this.swap!=1) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Swap Mode"),this.swap),msprintf(gettext("Must be in the interval %s."),"[0, 1]"));
ok = false;
}
if (ok) {
- ipar = [[length(fname1)],[this._str2code[frmt1-1]],[N],[swap],[this._str2code[fname1-1]]];
- if (prod(size(dstate))!=(nin+1)*N+2) {
- dstate = [[-1],[lunit],[zeros((nin+1)*N,1)]];
+ ipar = [[length(fname1)],[this._str2code[frmt1-1]],[this.N],[this.swap],[this._str2code[fname1-1]]];
+ if (prod(size(dstate))!=(nin+1)*this.N+2) {
+ dstate = [[-1],[lunit],[zeros((nin+1)*this.N,1)]];
}
model.in1 = 1;
model.dstate = dstate;
diff --git a/js/Sinks/WRITEAU_f.pickle b/js/Sinks/WRITEAU_f.pickle
index 8a32035f..b377a7a6 100644
--- a/js/Sinks/WRITEAU_f.pickle
+++ b/js/Sinks/WRITEAU_f.pickle
@@ -8,6 +8,10 @@ aS'x'
p3
aS'alreadyran'
p4
-atp5
-Rp6
+aS'swap'
+p5
+aS'N'
+p6
+atp7
+Rp8
. \ No newline at end of file
diff --git a/js/Sinks/WRITEC_f.js b/js/Sinks/WRITEC_f.js
index 0b61f273..f78b9c0d 100644
--- a/js/Sinks/WRITEC_f.js
+++ b/js/Sinks/WRITEC_f.js
@@ -1,22 +1,22 @@
/* autogenerated from "macros/Sinks/WRITEC_f.sci" */
function WRITEC_f() {
WRITEC_f.prototype.define = function WRITEC_f() {
- in1 = 1;
- nin = sum(in1);
+ this.in1 = 1;
+ nin = sum(this.in1);
frmt = "c ";
fname = "foo";
- swap = 0;
+ this.swap = 0;
lunit = 0;
- N = 2;
+ this.N = 2;
model = scicos_model();
model.sim = list("writec",2);
- model.in1 = in1;
+ model.in1 = this.in1;
model.evtin = 1;
- model.dstate = [[-1],[lunit],[zeros((nin+1)*N,1)]];
- model.ipar = [[length(fname)],[this._str2code[frmt-1]],[N],[swap],[this._str2code[fname-1]]];
+ model.dstate = [[-1],[lunit],[zeros((nin+1)*this.N,1)]];
+ model.ipar = [[length(fname)],[this._str2code[frmt-1]],[this.N],[this.swap],[this._str2code[fname-1]]];
model.blocktype = "d";
model.dep_ut = [true,false];
- exprs = [[sci2exp(in1)],[fname],[frmt],[string(N),string(swap)]];
+ exprs = [[sci2exp(this.in1)],[fname],[frmt],[string(this.N),string(this.swap)]];
gr_i = [];
this.x = standard_define([4,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -37,47 +37,47 @@ function WRITEC_f() {
fname = exprs[2-1];
frmt = exprs[3-1];
while (true) {
- [ok,in1,fname1,frmt1,N,swap,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"WRITEC_f")],[" "],[gettext("Write to C binary file")]],[[gettext("Input Size")],[gettext("Output File Name")],[gettext("Output Format")],[gettext("Buffer Size")],[gettext("Swap Mode (0:No, 1:Yes)")]],list("vec",1,"str",1,"str",1,"vec",1,"vec",1),exprs);
+ [ok,this.in1,this.fname1,this.frmt1,this.N,this.swap,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"WRITEC_f")],[" "],[gettext("Write to C binary file")]],[[gettext("Input Size")],[gettext("Output File Name")],[gettext("Output Format")],[gettext("Buffer Size")],[gettext("Swap Mode (0:No, 1:Yes)")]],list("vec",1,"str",1,"str",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- in1 = int(in1);
- nin = in1;
- fname1 = pathconvert(stripblanks(fname1),false,true);
- frmt1 = stripblanks(frmt1);
+ this.in1 = int(this.in1);
+ nin = this.in1;
+ this.fname1 = pathconvert(stripblanks(this.fname1),false,true);
+ this.frmt1 = stripblanks(this.frmt1);
fmts = ["s","l","d","f","c","us","ul","uc","ull","uls","ubl","ubs","dl","fl","ll","sl","db","fb","lb","sb"];
- if (and(frmt1!=fmts)) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %s."),gettext("Input Format"),frmt1),gettext("Valid formats are: "+strcat(fmts,", ")));
+ if (and(this.frmt1!=fmts)) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %s."),gettext("Input Format"),this.frmt1),gettext("Valid formats are: "+strcat(fmts,", ")));
ok = false;
- } else if (this.alreadyran&&fname1!=fname) {
+ } else if (this.alreadyran&&this.fname1!=fname) {
block_parameter_error(msprintf(gettext("You cannot modify \'%s\' when running"),gettext("Input Format")),gettext("End current simulation first."));
ok = false;
- } else if (this.alreadyran&&N!=ipar[5-1]) {
+ } else if (this.alreadyran&&this.N!=ipar[5-1]) {
block_parameter_error(msprintf(gettext("You cannot modify \'Buffer Size\' when running."),gettext("Buffer Size")),gettext("End current simulation first"));
ok = false;
- } else if (fname1=="") {
+ } else if (this.fname1=="") {
block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter."),gettext("Output File Name")),gettext("You must provide a filename."));
- } else if (fileparts(fname1)!="") {
- [pa,fn,ex] = fileparts(fname1);
+ } else if (fileparts(this.fname1)!="") {
+ [pa,fn,ex] = fileparts(this.fname1);
if (!this.isdir[pa-1]) {
block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter."),gettext("Output File Name")),msprintf(gettext("Directory \'%s\' does not exist"),pa));
ok = false;
}
- } else if (N<1) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Buffer Size"),N),gettext("Strictly positive integer expected."));
+ } else if (this.N<1) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Buffer Size"),this.N),gettext("Strictly positive integer expected."));
ok = false;
- } else if (in1<=0) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Input Size"),in1),gettext("Strictly positive integer expected."));
+ } else if (this.in1<=0) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Input Size"),this.in1),gettext("Strictly positive integer expected."));
ok = false;
- } else if (swap!=0&&swap!=1) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Swap Mode"),swap),msprintf(gettext("Must be in the interval %s."),"[0, 1]"));
+ } else if (this.swap!=0&&this.swap!=1) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Swap Mode"),this.swap),msprintf(gettext("Must be in the interval %s."),"[0, 1]"));
ok = false;
}
- frmt1 = part(frmt1,1,3);
+ this.frmt1 = part(this.frmt1,1,3);
if (ok) {
- ipar = [[length(fname1)],[this._str2code[frmt1-1]],[N],[swap],[this._str2code[fname1-1]]];
- if (prod(size(dstate))!=(nin+1)*N+2) {
- dstate = [[-1],[lunit],[zeros((nin+1)*N,1)]];
+ ipar = [[length(this.fname1)],[this._str2code[this.frmt1-1]],[this.N],[this.swap],[this._str2code[this.fname1-1]]];
+ if (prod(size(dstate))!=(nin+1)*this.N+2) {
+ dstate = [[-1],[lunit],[zeros((nin+1)*this.N,1)]];
}
model.in1 = nin;
model.dstate = dstate;
diff --git a/js/Sinks/WRITEC_f.pickle b/js/Sinks/WRITEC_f.pickle
index b0c10e53..1d281f84 100644
--- a/js/Sinks/WRITEC_f.pickle
+++ b/js/Sinks/WRITEC_f.pickle
@@ -4,12 +4,22 @@ p0
((lp1
S'isdir'
p2
-aS'x'
-p3
aS'_str2code'
+p3
+aS'in1'
p4
-aS'alreadyran'
+aS'fname1'
p5
-atp6
-Rp7
+aS'N'
+p6
+aS'frmt1'
+p7
+aS'swap'
+p8
+aS'x'
+p9
+aS'alreadyran'
+p10
+atp11
+Rp12
. \ No newline at end of file