From 62b1d7dd9183ed75733b44104890586b03818214 Mon Sep 17 00:00:00 2001 From: Sunil Shetye Date: Mon, 9 Jul 2018 11:43:39 +0530 Subject: support ScilabBoolean, ScilabDouble, ScilabString --- js/Sinks/AFFICH_m.js | 38 +++++++++++++++++++------------------- js/Sinks/AFFICH_m.pickle | 10 ++++++---- js/Sinks/BARXY.js | 30 +++++++++++++++--------------- js/Sinks/BARXY.pickle | 8 +++++--- js/Sinks/CANIMXY.js | 34 +++++++++++++++++----------------- js/Sinks/CANIMXY.pickle | 8 +++++--- js/Sinks/CANIMXY3D.js | 34 +++++++++++++++++----------------- js/Sinks/CANIMXY3D.pickle | 8 +++++--- js/Sinks/CEVENTSCOPE.js | 26 +++++++++++++------------- js/Sinks/CEVENTSCOPE.pickle | 8 +++++--- js/Sinks/CFSCOPE.js | 28 ++++++++++++++-------------- js/Sinks/CFSCOPE.pickle | 8 +++++--- js/Sinks/CLKOUTV_f.js | 24 ++++++++++++------------ js/Sinks/CLKOUTV_f.pickle | 10 ++++++---- js/Sinks/CLKOUT_f.js | 26 +++++++++++++------------- js/Sinks/CLKOUT_f.pickle | 8 +++++--- js/Sinks/CMAT3D.js | 30 +++++++++++++++--------------- js/Sinks/CMAT3D.pickle | 12 +++++++----- js/Sinks/CMATVIEW.js | 30 +++++++++++++++--------------- js/Sinks/CMATVIEW.pickle | 16 +++++++++------- js/Sinks/CMSCOPE.js | 38 +++++++++++++++++++------------------- js/Sinks/CMSCOPE.pickle | 10 ++++++---- js/Sinks/CSCOPE.js | 34 +++++++++++++++++----------------- js/Sinks/CSCOPE.pickle | 10 ++++++---- js/Sinks/CSCOPXY.js | 32 ++++++++++++++++---------------- js/Sinks/CSCOPXY.pickle | 8 +++++--- js/Sinks/CSCOPXY3D.js | 32 ++++++++++++++++---------------- js/Sinks/CSCOPXY3D.pickle | 8 +++++--- js/Sinks/OUTIMPL_f.js | 26 +++++++++++++------------- js/Sinks/OUTIMPL_f.pickle | 8 +++++--- js/Sinks/OUT_f.js | 24 ++++++++++++------------ js/Sinks/OUT_f.pickle | 8 +++++--- js/Sinks/TOWS_c.js | 40 ++++++++++++++++++++-------------------- js/Sinks/TOWS_c.pickle | 14 ++++++++------ js/Sinks/TRASH_f.js | 14 +++++++------- js/Sinks/TRASH_f.pickle | 6 ++++-- js/Sinks/WFILE_f.js | 32 ++++++++++++++++---------------- js/Sinks/WFILE_f.pickle | 6 ++++-- js/Sinks/WRITEAU_f.js | 32 ++++++++++++++++---------------- js/Sinks/WRITEAU_f.pickle | 12 +++++++----- js/Sinks/WRITEC_f.js | 32 ++++++++++++++++---------------- js/Sinks/WRITEC_f.pickle | 8 +++++--- 42 files changed, 436 insertions(+), 394 deletions(-) (limited to 'js/Sinks') diff --git a/js/Sinks/AFFICH_m.js b/js/Sinks/AFFICH_m.js index 3b073df5..5121a006 100644 --- a/js/Sinks/AFFICH_m.js +++ b/js/Sinks/AFFICH_m.js @@ -7,20 +7,20 @@ function AFFICH_m() { this.nt = 5; this.nd = 1; this.in1 = [1,1]; - model = scicos_model(); - model.sim = list("affich2",4); - 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(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(this.font)],[string(this.fontsize)],[string(this.colr)],[string(this.nt)],[string(this.nd)],[string(0)]]; + this.model = scicos_model(); + this.model.sim = list("affich2",4); + this.model.in1 = new ScilabDouble(this.in1[1-1][1-1]); + this.model.in2 = new ScilabDouble(this.in1[1-1][2-1]); + this.model.evtin = new ScilabDouble(1); + this.model.dstate = [[-1],[0],[0],[1],[1],[0],[zeros(this.in1[1-1][1-1]*this.in1[1-1][2-1],1)]]; + this.model.ipar = [[this.font],[this.fontsize],[this.colr],[1000],[this.nt],[this.nd],[this.in1[1-1][1-1]]]; + this.model.blocktype = new ScilabString("c"); + this.model.firing = []; + this.model.dep_ut = [true,false]; + this.model.label = new ScilabString(""); + exprs = [[sci2exp([this.model.in1,this.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); + this.x = standard_define([3,2],this.model,exprs,gr_i); return new AfficheBlock(this.x); } AFFICH_m.prototype.details = function AFFICH_m() { @@ -49,7 +49,7 @@ function AFFICH_m() { this.x = arg1; graphics = arg1.graphics; exprs = graphics.exprs; - model = arg1.model; + this.model = arg1.model; while (true) { [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) { @@ -83,15 +83,15 @@ function AFFICH_m() { message([["Some specified values are inconsistent:"],[" "],[mess]]); } if (ok) { - [model,graphics,ok] = set_io(model,graphics,list(this.in1,1),list(),ones(1-this.herit,1),[]); + [model,graphics,ok] = set_io(this.model,graphics,list(this.in1,1),list(),ones(1-this.herit,1),[]); } if (ok) { - 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); + this.model.ipar = [[this.font],[this.fontsize],[this.colr],[this.nt],[this.nd],[this.in1[1-1][1-1]]]; + this.model.dstate = [[-1],[0],[0],[1],[1],[0],[zeros(this.in1[1-1][1-1]*this.in1[1-1][2-1],1)]]; + this.model.evtin = new ScilabDouble(ones(1-this.herit,1)); graphics.exprs = exprs; this.x.graphics = graphics; - this.x.model = model; + this.x.model = this.model; break; } } diff --git a/js/Sinks/AFFICH_m.pickle b/js/Sinks/AFFICH_m.pickle index 85768c77..55f218ca 100644 --- a/js/Sinks/AFFICH_m.pickle +++ b/js/Sinks/AFFICH_m.pickle @@ -14,12 +14,14 @@ aS'fontsize' p6 aS'x' p7 -aS'font' +aS'model' p8 -aS'nt' +aS'font' p9 -atp10 -Rp11 +aS'nt' +p10 +atp11 +Rp12 .(dp0 S'model.dstate' p1 diff --git a/js/Sinks/BARXY.js b/js/Sinks/BARXY.js index 48eb2b5e..88d642d7 100644 --- a/js/Sinks/BARXY.js +++ b/js/Sinks/BARXY.js @@ -1,21 +1,21 @@ /* autogenerated from "macros/Sinks/BARXY.sci" */ function BARXY() { BARXY.prototype.define = function BARXY() { - model = scicos_model(); + this.model = scicos_model(); 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]; - model.in1 = [[-1],[-1]]; - model.intyp = [1]; - model.out = []; - model.evtin = [1]; - model.rpar = [[this.xmin],[this.xmax],[this.ymin],[this.ymax]]; - model.ipar = 1; - this.x = standard_define([2,2],model,[],[]); + this.model.sim = list("BARXY_sim",5); + this.model.blocktype = new ScilabString("d"); + this.model.dep_ut = [true,false]; + this.model.in1 = [[-1],[-1]]; + this.model.intyp = [1]; + this.model.out = []; + this.model.evtin = [1]; + this.model.rpar = [[this.xmin],[this.xmax],[this.ymin],[this.ymax]]; + this.model.ipar = new ScilabDouble(1); + this.x = standard_define([2,2],this.model,[],[]); this.x.graphics.in_implicit = ["E","E"]; this.x.graphics.out_implicit = []; this.x.graphics.exprs = [["-15"],["15"],["-15"],["15"],["1"]]; @@ -43,7 +43,7 @@ function BARXY() { this.x = arg1; graphics = arg1.graphics; exprs = graphics.exprs; - model = arg1.model; + this.model = arg1.model; while (true) { [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) { @@ -65,11 +65,11 @@ function BARXY() { if (!ok) { message(mess); } else { - model.rpar = [[this.xmin],[this.xmax],[this.ymin],[this.ymax]]; - model.ipar = this.thickness; + this.model.rpar = [[this.xmin],[this.xmax],[this.ymin],[this.ymax]]; + this.model.ipar = new ScilabDouble(this.thickness); graphics.exprs = exprs; this.x.graphics = graphics; - this.x.model = model; + this.x.model = this.model; break; } } diff --git a/js/Sinks/BARXY.pickle b/js/Sinks/BARXY.pickle index 77eef456..0716001f 100644 --- a/js/Sinks/BARXY.pickle +++ b/js/Sinks/BARXY.pickle @@ -12,10 +12,12 @@ aS'xmin' p5 aS'x' p6 -aS'ymin' +aS'model' p7 -atp8 -Rp9 +aS'ymin' +p8 +atp9 +Rp10 .(dp0 S'arg1' p1 diff --git a/js/Sinks/CANIMXY.js b/js/Sinks/CANIMXY.js index 79d741a3..6779db88 100644 --- a/js/Sinks/CANIMXY.js +++ b/js/Sinks/CANIMXY.js @@ -12,20 +12,20 @@ function CANIMXY() { 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 = [[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]; + this.model = scicos_model(); + this.model.sim = list("canimxy",4); + this.model.in1 = [[1],[1]]; + this.model.in2 = [[1],[1]]; + this.model.intyp = [[1],[1]]; + this.model.evtin = new ScilabDouble(1); + this.model.rpar = [[this.xmin],[this.xmax],[this.ymin],[this.ymax]]; + this.model.ipar = [[this.win],[1],[this.N],[this.clrs],[this.siz],[0],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]]; + this.model.blocktype = new ScilabString("d"); + this.model.firing = []; + this.model.dep_ut = [false,false]; 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); + this.x = standard_define([2,2],this.model,exprs,gr_i); return new BasicBlock(this.x); } CANIMXY.prototype.details = function CANIMXY() { @@ -62,7 +62,7 @@ function CANIMXY() { this.x = arg1; graphics = arg1.graphics; exprs = graphics.exprs; - model = arg1.model; + this.model = arg1.model; while (true) { [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) { @@ -106,7 +106,7 @@ function CANIMXY() { } else { 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),[]); + [model,graphics,ok] = set_io(this.model,graphics,list([in1,in2],ones(2,1)),list(),ones(1,1),[]); if (this.wpos==[]) { this.wpos = [[-1],[-1]]; } @@ -115,11 +115,11 @@ function CANIMXY() { } 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; + this.model.rpar = rpar; + this.model.ipar = ipar; graphics.exprs = exprs; this.x.graphics = graphics; - this.x.model = model; + this.x.model = this.model; break; } } diff --git a/js/Sinks/CANIMXY.pickle b/js/Sinks/CANIMXY.pickle index 5b769716..56da20f9 100644 --- a/js/Sinks/CANIMXY.pickle +++ b/js/Sinks/CANIMXY.pickle @@ -24,10 +24,12 @@ aS'xmin' p11 aS'x' p12 -aS'nbr_curves' +aS'model' p13 -atp14 -Rp15 +aS'nbr_curves' +p14 +atp15 +Rp16 .(dp0 S'clrs' p1 diff --git a/js/Sinks/CANIMXY3D.js b/js/Sinks/CANIMXY3D.js index ba90c709..fcbbfcf4 100644 --- a/js/Sinks/CANIMXY3D.js +++ b/js/Sinks/CANIMXY3D.js @@ -12,20 +12,20 @@ function CANIMXY3D() { 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 = [[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]; + this.model = scicos_model(); + this.model.sim = list("canimxy3d",4); + this.model.in1 = [[1],[1],[1]]; + this.model.evtin = new ScilabDouble(1); + this.model.in2 = [[1],[1],[1]]; + this.model.intyp = [[1],[1],[1]]; + this.model.rpar = [[this.vec_x.slice()],[this.vec_y.slice()],[this.vec_z.slice()],[this.param3ds.slice()]]; + this.model.ipar = [[this.win],[8],[this.N],[this.clrs.slice()],[this.siz.slice()],[8],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]]; + this.model.blocktype = new ScilabString("d"); + this.model.firing = []; + this.model.dep_ut = [false,false]; 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); + this.x = standard_define([2,2],this.model,exprs,gr_i); return new BasicBlock(this.x); } CANIMXY3D.prototype.details = function CANIMXY3D() { @@ -62,7 +62,7 @@ function CANIMXY3D() { this.x = arg1; graphics = arg1.graphics; exprs = graphics.exprs; - model = arg1.model; + this.model = arg1.model; while (true) { [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) { @@ -122,7 +122,7 @@ function CANIMXY3D() { } else { 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),[]); + [model,graphics,ok] = set_io(this.model,graphics,list([in1,in2],ones(3,1)),list(),ones(1,1),[]); if (this.wpos==[]) { this.wpos = [[-1],[-1]]; } @@ -132,11 +132,11 @@ function CANIMXY3D() { 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; + this.model.rpar = rpar; + this.model.ipar = ipar; graphics.exprs = exprs; this.x.graphics = graphics; - this.x.model = model; + this.x.model = this.model; break; } } diff --git a/js/Sinks/CANIMXY3D.pickle b/js/Sinks/CANIMXY3D.pickle index 85ea96f7..376a0c81 100644 --- a/js/Sinks/CANIMXY3D.pickle +++ b/js/Sinks/CANIMXY3D.pickle @@ -24,10 +24,12 @@ aS'siz' p11 aS'x' p12 -aS'nbr_curves' +aS'model' p13 -atp14 -Rp15 +aS'nbr_curves' +p14 +atp15 +Rp16 .(dp0 S'clrs' p1 diff --git a/js/Sinks/CEVENTSCOPE.js b/js/Sinks/CEVENTSCOPE.js index 9dcd508f..4c4319d8 100644 --- a/js/Sinks/CEVENTSCOPE.js +++ b/js/Sinks/CEVENTSCOPE.js @@ -7,16 +7,16 @@ function CEVENTSCOPE() { this.wdim = [[600],[400]]; this.wpos = [[-1],[-1]]; this.per = 30; - model = scicos_model(); - model.sim = list("cevscpe",4); - model.evtin = 1; - 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]; + this.model = scicos_model(); + this.model.sim = list("cevscpe",4); + this.model.evtin = new ScilabDouble(1); + this.model.rpar = new ScilabDouble(this.per); + this.model.ipar = [[this.win],[1],[this.clrs[this.nclock-1]],[this.wpos.slice()],[this.wdim.slice()]]; + this.model.blocktype = new ScilabString("d"); + this.model.dep_ut = [false,false]; 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); + this.x = standard_define([2,2],this.model,exprs,gr_i); return new BasicBlock(this.x); } CEVENTSCOPE.prototype.details = function CEVENTSCOPE() { @@ -43,7 +43,7 @@ function CEVENTSCOPE() { this.x = arg1; graphics = arg1.graphics; exprs = graphics.exprs; - model = arg1.model; + this.model = arg1.model; while (true) { [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); @@ -78,7 +78,7 @@ function CEVENTSCOPE() { ok = false; } if (ok) { - [model,graphics,ok] = set_io(model,graphics,list(),list(),ones(this.nclock,1),[]); + [model,graphics,ok] = set_io(this.model,graphics,list(),list(),ones(this.nclock,1),[]); } else { message([["Some specified values are inconsistent:"],[" "],[mess]]); } @@ -91,11 +91,11 @@ function CEVENTSCOPE() { } rpar = this.per; ipar = [[this.win],[1],[this.clrs.slice()],[this.wpos.slice()],[this.wdim.slice()]]; - model.rpar = rpar; - model.ipar = ipar; + this.model.rpar = new ScilabDouble(rpar); + this.model.ipar = ipar; graphics.exprs = exprs; this.x.graphics = graphics; - this.x.model = model; + this.x.model = this.model; break; } } diff --git a/js/Sinks/CEVENTSCOPE.pickle b/js/Sinks/CEVENTSCOPE.pickle index 8b6148a9..f2b60d90 100644 --- a/js/Sinks/CEVENTSCOPE.pickle +++ b/js/Sinks/CEVENTSCOPE.pickle @@ -14,10 +14,12 @@ aS'wdim' p6 aS'x' p7 -aS'nclock' +aS'model' p8 -atp9 -Rp10 +aS'nclock' +p9 +atp10 +Rp11 .(dp0 S'clrs' p1 diff --git a/js/Sinks/CFSCOPE.js b/js/Sinks/CFSCOPE.js index d30e6601..099c58b7 100644 --- a/js/Sinks/CFSCOPE.js +++ b/js/Sinks/CFSCOPE.js @@ -9,16 +9,16 @@ function CFSCOPE() { this.ymin = -15; this.ymax = 15; this.per = 30; - model = scicos_model(); - model.sim = list("cfscope",4); - model.evtin = 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]; + this.model = scicos_model(); + this.model.sim = list("cfscope",4); + this.model.evtin = new ScilabDouble(1); + this.model.rpar = [[0],[this.ymin],[this.ymax],[this.per]]; + this.model.ipar = [[this.win],[1],[this.N],[this.clrs],[this.wpos],[this.wdim],[1],[1]]; + this.model.blocktype = new ScilabString("c"); + this.model.dep_ut = [true,false]; 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); + this.x = standard_define([2,2],this.model,exprs,gr_i); return new BasicBlock(this.x); } CFSCOPE.prototype.details = function CFSCOPE() { @@ -51,7 +51,7 @@ function CFSCOPE() { this.x = arg1; graphics = arg1.graphics; exprs = graphics.exprs; - model = arg1.model; + this.model = arg1.model; while (true) { [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) { @@ -104,13 +104,13 @@ function CFSCOPE() { this.clrs[8-1] = 0; } 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 = []; - model.dep_ut = [true,false]; + this.model.rpar = rpar; + this.model.ipar = ipar; + this.model.firing = []; + this.model.dep_ut = [true,false]; graphics.exprs = exprs; this.x.graphics = graphics; - this.x.model = model; + this.x.model = this.model; break; } } diff --git a/js/Sinks/CFSCOPE.pickle b/js/Sinks/CFSCOPE.pickle index 7d3f93b7..c4ff4755 100644 --- a/js/Sinks/CFSCOPE.pickle +++ b/js/Sinks/CFSCOPE.pickle @@ -20,10 +20,12 @@ aS'wdim' p9 aS'x' p10 -aS'ymin' +aS'model' p11 -atp12 -Rp13 +aS'ymin' +p12 +atp13 +Rp14 .(dp0 S'clrs' p1 diff --git a/js/Sinks/CLKOUTV_f.js b/js/Sinks/CLKOUTV_f.js index 4e80cd28..473968a7 100644 --- a/js/Sinks/CLKOUTV_f.js +++ b/js/Sinks/CLKOUTV_f.js @@ -2,15 +2,15 @@ function CLKOUTV_f() { CLKOUTV_f.prototype.define = function CLKOUTV_f() { this.prt = 1; - model = scicos_model(); - model.sim = "output"; - model.evtin = 1; - model.ipar = this.prt; - model.blocktype = "d"; - model.firing = []; - model.dep_ut = [false,false]; + this.model = scicos_model(); + this.model.sim = new ScilabString("output"); + this.model.evtin = new ScilabDouble(1); + this.model.ipar = new ScilabDouble(this.prt); + this.model.blocktype = new ScilabString("d"); + this.model.firing = []; + this.model.dep_ut = [false,false]; exprs = string(this.prt); - this.x = standard_define([1,1],model,exprs," "); + this.x = standard_define([1,1],this.model,exprs," "); return new EventOutBlock(this.x); } CLKOUTV_f.prototype.details = function CLKOUTV_f() { @@ -25,7 +25,7 @@ function CLKOUTV_f() { this.prt = arguments[0]["prt"] this.x = arg1; graphics = arg1.graphics; - model = arg1.model; + this.model = arg1.model; exprs = graphics.exprs; while (true) { [ok,this.prt,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","CLKOUTV_f")],[" "],["Event output port"]],"Port number",list("vec",1),exprs); @@ -36,11 +36,11 @@ function CLKOUTV_f() { if (this.prt<=0) { block_parameter_error(msprintf("Wrong value for \'Port Number\' parameter: %d.",this.prt),"Strictly positive integer expected."); } else { - model.ipar = this.prt; - model.evtin = 1; + this.model.ipar = new ScilabDouble(this.prt); + this.model.evtin = new ScilabDouble(1); graphics.exprs = exprs; this.x.graphics = graphics; - this.x.model = model; + this.x.model = this.model; break; } } diff --git a/js/Sinks/CLKOUTV_f.pickle b/js/Sinks/CLKOUTV_f.pickle index 3f6a5ee8..ff26649c 100644 --- a/js/Sinks/CLKOUTV_f.pickle +++ b/js/Sinks/CLKOUTV_f.pickle @@ -12,12 +12,14 @@ aS'prt' p5 aS'x' p6 -aS'type' +aS'model' p7 -aS'options' +aS'type' p8 -atp9 -Rp10 +aS'options' +p9 +atp10 +Rp11 .(dp0 S'[this.x,y]' p1 diff --git a/js/Sinks/CLKOUT_f.js b/js/Sinks/CLKOUT_f.js index 985ef1d8..023c3d86 100644 --- a/js/Sinks/CLKOUT_f.js +++ b/js/Sinks/CLKOUT_f.js @@ -2,15 +2,15 @@ function CLKOUT_f() { CLKOUT_f.prototype.define = function CLKOUT_f() { this.prt = 1; - model = scicos_model(); - model.sim = "output"; - model.evtin = 1; - model.ipar = this.prt; - model.blocktype = "d"; - model.firing = []; - model.dep_ut = [false,false]; + this.model = scicos_model(); + this.model.sim = new ScilabString("output"); + this.model.evtin = new ScilabDouble(1); + this.model.ipar = new ScilabDouble(this.prt); + this.model.blocktype = new ScilabString("d"); + this.model.firing = []; + this.model.dep_ut = [false,false]; exprs = string(this.prt); - this.x = standard_define([1,1],model,exprs," "); + this.x = standard_define([1,1],this.model,exprs," "); return new BasicBlock(this.x); } CLKOUT_f.prototype.details = function CLKOUT_f() { @@ -25,7 +25,7 @@ function CLKOUT_f() { this.prt = parseFloat(arguments[0]["prt"]) this.x = arg1; graphics = arg1.graphics; - model = arg1.model; + this.model = arg1.model; exprs = graphics.exprs; exprs = exprs[1-1]; while (true) { @@ -37,12 +37,12 @@ function CLKOUT_f() { if (this.prt<=0) { message("Port number must be a positive integer"); } else { - model.ipar = this.prt; - model.evtin = 1; - model.firing = []; + this.model.ipar = new ScilabDouble(this.prt); + this.model.evtin = new ScilabDouble(1); + this.model.firing = []; graphics.exprs = exprs; this.x.graphics = graphics; - this.x.model = model; + this.x.model = this.model; break; } } diff --git a/js/Sinks/CLKOUT_f.pickle b/js/Sinks/CLKOUT_f.pickle index 6d7d48d4..4ffa6fb1 100644 --- a/js/Sinks/CLKOUT_f.pickle +++ b/js/Sinks/CLKOUT_f.pickle @@ -4,10 +4,12 @@ p0 ((lp1 S'x' p2 -aS'prt' +aS'model' p3 -atp4 -Rp5 +aS'prt' +p4 +atp5 +Rp6 .(dp0 S'model.sim' p1 diff --git a/js/Sinks/CMAT3D.js b/js/Sinks/CMAT3D.js index a9d7bb37..04cefb73 100644 --- a/js/Sinks/CMAT3D.js +++ b/js/Sinks/CMAT3D.js @@ -9,19 +9,19 @@ function CMAT3D() { y = -1; size_x = 1; size_y = 1; - model = scicos_model(); - model.sim = list("cmat3d",4); - model.in1 = -1; - model.in2 = -2; - model.intyp = 1; - model.evtin = 1; - 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]; + this.model = scicos_model(); + this.model.sim = list("cmat3d",4); + this.model.in1 = new ScilabDouble(-1); + this.model.in2 = new ScilabDouble(-2); + this.model.intyp = new ScilabDouble(1); + this.model.evtin = new ScilabDouble(1); + this.model.ipar = [[this.cmin],[this.cmax],[size_c],[size_x],[size_y]]; + this.model.rpar = [[this.colormap.slice()],[this.x],[y]]; + this.model.blocktype = new ScilabString("c"); + this.model.dep_ut = [true,false]; 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); + this.x = standard_define([2,2],this.model,exprs,gr_i); return new BasicBlock(this.x); } CMAT3D.prototype.details = function CMAT3D() { @@ -46,7 +46,7 @@ function CMAT3D() { this.x = arg1; graphics = arg1.graphics; exprs = graphics.exprs; - model = arg1.model; + this.model = arg1.model; while (true) { [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) { @@ -69,11 +69,11 @@ function CMAT3D() { 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; + this.model.ipar = ipar; + this.model.rpar = rpar; graphics.exprs = exprs; this.x.graphics = graphics; - this.x.model = model; + this.x.model = this.model; break; } } diff --git a/js/Sinks/CMAT3D.pickle b/js/Sinks/CMAT3D.pickle index 2c85dba8..02e065b3 100644 --- a/js/Sinks/CMAT3D.pickle +++ b/js/Sinks/CMAT3D.pickle @@ -2,7 +2,7 @@ c__builtin__ set p0 ((lp1 -S'colormap' +S'cmin' p2 aS'vec_x' p3 @@ -12,12 +12,14 @@ aS'jetcolormap' p5 aS'x' p6 -aS'cmax' +aS'model' p7 -aS'cmin' +aS'cmax' p8 -atp9 -Rp10 +aS'colormap' +p9 +atp10 +Rp11 .(dp0 S'cmin' p1 diff --git a/js/Sinks/CMATVIEW.js b/js/Sinks/CMATVIEW.js index 3789d80b..884f173d 100644 --- a/js/Sinks/CMATVIEW.js +++ b/js/Sinks/CMATVIEW.js @@ -7,19 +7,19 @@ function CMATVIEW() { this.colormap = this.jetcolormap[size_c-1]; alpha_c = 0.24; beta_c = 1; - model = scicos_model(); - model.sim = list("cmatview",4); - model.in1 = -1; - model.in2 = -2; - model.intyp = 1; - model.evtin = 1; - 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]; + this.model = scicos_model(); + this.model.sim = list("cmatview",4); + this.model.in1 = new ScilabDouble(-1); + this.model.in2 = new ScilabDouble(-2); + this.model.intyp = new ScilabDouble(1); + this.model.evtin = new ScilabDouble(1); + this.model.ipar = [[this.cmin],[this.cmax],[size_c]]; + this.model.rpar = [[alpha_c],[beta_c],[this.colormap.slice()]]; + this.model.blocktype = new ScilabString("c"); + this.model.dep_ut = [true,false]; exprs = [[string("jetcolormap(25)")],[string(this.cmin)],[string(this.cmax)]]; gr_i = []; - this.x = standard_define([2,2],model,exprs,gr_i); + this.x = standard_define([2,2],this.model,exprs,gr_i); return new BasicBlock(this.x); } CMATVIEW.prototype.details = function CMATVIEW() { @@ -40,7 +40,7 @@ function CMATVIEW() { this.x = arg1; graphics = arg1.graphics; exprs = graphics.exprs; - model = arg1.model; + this.model = arg1.model; while (true) { [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) { @@ -61,11 +61,11 @@ function CMATVIEW() { beta_c = sol[2-1]; ipar = [[this.cmin],[this.cmax],[size_c]]; rpar = [[alpha_c],[beta_c],[this.colormap.slice()]]; - model.ipar = ipar; - model.rpar = rpar; + this.model.ipar = ipar; + this.model.rpar = rpar; graphics.exprs = exprs; this.x.graphics = graphics; - this.x.model = model; + this.x.model = this.model; break; } } diff --git a/js/Sinks/CMATVIEW.pickle b/js/Sinks/CMATVIEW.pickle index ba289a81..d750e107 100644 --- a/js/Sinks/CMATVIEW.pickle +++ b/js/Sinks/CMATVIEW.pickle @@ -2,18 +2,20 @@ c__builtin__ set p0 ((lp1 -S'x' +S'colormap' p2 -aS'cmax' -p3 aS'jetcolormap' +p3 +aS'x' p4 -aS'colormap' +aS'model' p5 -aS'cmin' +aS'cmax' p6 -atp7 -Rp8 +aS'cmin' +p7 +atp8 +Rp9 .(dp0 S'cmin' p1 diff --git a/js/Sinks/CMSCOPE.js b/js/Sinks/CMSCOPE.js index f3115496..6a5670b1 100644 --- a/js/Sinks/CMSCOPE.js +++ b/js/Sinks/CMSCOPE.js @@ -12,19 +12,19 @@ function CMSCOPE() { 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 = this.in1; - model.in2 = [[1],[1]]; - model.intyp = [[1],[1]]; - model.evtin = 1; - model.rpar = [[0],[period.slice()],[yy.slice()]]; - 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]; + this.model = scicos_model(); + this.model.sim = list("cmscope",4); + this.model.in1 = this.in1; + this.model.in2 = [[1],[1]]; + this.model.intyp = [[1],[1]]; + this.model.evtin = new ScilabDouble(1); + this.model.rpar = [[0],[period.slice()],[yy.slice()]]; + this.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))]]; + this.model.blocktype = new ScilabString("c"); + this.model.dep_ut = [true,false]; 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); + this.x = standard_define([2,2],this.model,exprs,gr_i); return new BasicBlock(this.x); } CMSCOPE.prototype.details = function CMSCOPE() { @@ -61,7 +61,7 @@ function CMSCOPE() { this.x = arg1; graphics = arg1.graphics; exprs = graphics.exprs; - model = arg1.model; + this.model = arg1.model; while (true) { [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) { @@ -121,7 +121,7 @@ function CMSCOPE() { this.in1 = this.in1.slice(); a = size(this.in1,1); in2 = ones(a,1); - [model,graphics,ok] = set_io(model,graphics,list([this.in1,in2],ones(a,1)),list(),ones(1-this.heritance,1),[]); + [model,graphics,ok] = set_io(this.model,graphics,list([this.in1,in2],ones(a,1)),list(),ones(1-this.heritance,1),[]); } if (ok) { if (this.wpos==[]) { @@ -136,15 +136,15 @@ function CMSCOPE() { rpar = [[0],[period.slice()],[yy.slice()]]; 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 = this.nom; + this.model.evtin = new ScilabDouble(ones(1-this.heritance,1)); + this.model.dstate = []; + this.model.rpar = rpar; + this.model.ipar = ipar; + this.model.label = new ScilabDouble(this.nom); graphics.id = this.nom; graphics.exprs = exprs; this.x.graphics = graphics; - this.x.model = model; + this.x.model = this.model; break; } } diff --git a/js/Sinks/CMSCOPE.pickle b/js/Sinks/CMSCOPE.pickle index 5cefa80a..822ba1ff 100644 --- a/js/Sinks/CMSCOPE.pickle +++ b/js/Sinks/CMSCOPE.pickle @@ -22,12 +22,14 @@ aS'wdim' p10 aS'x' p11 -aS'ymin' +aS'model' p12 -aS'heritance' +aS'ymin' p13 -atp14 -Rp15 +aS'heritance' +p14 +atp15 +Rp16 .(dp0 S'clrs' p1 diff --git a/js/Sinks/CSCOPE.js b/js/Sinks/CSCOPE.js index 43549e3b..286de553 100644 --- a/js/Sinks/CSCOPE.js +++ b/js/Sinks/CSCOPE.js @@ -9,18 +9,18 @@ function CSCOPE() { 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],[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]; + this.model = scicos_model(); + this.model.sim = list("cscope",4); + this.model.in1 = new ScilabDouble(-1); + this.model.in2 = new ScilabDouble(1); + this.model.evtin = new ScilabDouble(1); + this.model.rpar = [[0],[this.ymin],[this.ymax],[this.per]]; + this.model.ipar = [[this.win],[1],[this.N],[this.clrs],[this.wpos],[this.wdim]]; + this.model.blocktype = new ScilabString("c"); + this.model.dep_ut = [true,false]; 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); + this.x = standard_define([2,2],this.model,exprs,gr_i); return new BasicBlock(this.x); } CSCOPE.prototype.details = function CSCOPE() { @@ -55,7 +55,7 @@ function CSCOPE() { this.x = arg1; graphics = arg1.graphics; exprs = graphics.exprs; - model = arg1.model; + this.model = arg1.model; while (true) { [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) { @@ -94,7 +94,7 @@ 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-this.heritance,1),[]); + [model,graphics,ok] = set_io(this.model,graphics,list([-1,1],1),list(),ones(1-this.heritance,1),[]); } if (ok) { if (this.wpos==[]) { @@ -105,14 +105,14 @@ function CSCOPE() { } 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-this.heritance,1); - model.label = this.nom; + this.model.rpar = rpar; + this.model.ipar = ipar; + this.model.evtin = new ScilabDouble(ones(1-this.heritance,1)); + this.model.label = new ScilabDouble(this.nom); graphics.id = this.nom; graphics.exprs = exprs; this.x.graphics = graphics; - this.x.model = model; + this.x.model = this.model; break; } } diff --git a/js/Sinks/CSCOPE.pickle b/js/Sinks/CSCOPE.pickle index cdc0fc5c..04612b4d 100644 --- a/js/Sinks/CSCOPE.pickle +++ b/js/Sinks/CSCOPE.pickle @@ -20,12 +20,14 @@ aS'wdim' p9 aS'x' p10 -aS'ymin' +aS'model' p11 -aS'heritance' +aS'ymin' p12 -atp13 -Rp14 +aS'heritance' +p13 +atp14 +Rp15 .(dp0 S'clrs' p1 diff --git a/js/Sinks/CSCOPXY.js b/js/Sinks/CSCOPXY.js index 2c7d2606..41dda84c 100644 --- a/js/Sinks/CSCOPXY.js +++ b/js/Sinks/CSCOPXY.js @@ -12,19 +12,19 @@ function CSCOPXY() { 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 = [[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]; + this.model = scicos_model(); + this.model.sim = list("cscopxy",4); + this.model.in1 = [[1],[1]]; + this.model.in2 = [[1],[1]]; + this.model.intyp = [[1],[1]]; + this.model.evtin = new ScilabDouble(1); + this.model.rpar = [[this.xmin],[this.xmax],[this.ymin],[this.ymax]]; + this.model.ipar = [[this.win],[1],[this.N],[this.clrs],[this.siz],[1],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]]; + this.model.blocktype = new ScilabString("d"); + this.model.dep_ut = [false,false]; 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); + this.x = standard_define([2,2],this.model,exprs,gr_i); return new BasicBlock(this.x); } CSCOPXY.prototype.details = function CSCOPXY() { @@ -61,7 +61,7 @@ function CSCOPXY() { this.x = arg1; graphics = arg1.graphics; exprs = graphics.exprs; - model = arg1.model; + this.model = arg1.model; while (true) { [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) { @@ -105,7 +105,7 @@ function CSCOPXY() { } else { 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),[]); + [model,graphics,ok] = set_io(this.model,graphics,list([in1,in2],ones(2,1)),list(),ones(1,1),[]); if (this.wpos==[]) { this.wpos = [[-1],[-1]]; } @@ -114,11 +114,11 @@ function CSCOPXY() { } 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; + this.model.rpar = rpar; + this.model.ipar = ipar; graphics.exprs = exprs; this.x.graphics = graphics; - this.x.model = model; + this.x.model = this.model; break; } } diff --git a/js/Sinks/CSCOPXY.pickle b/js/Sinks/CSCOPXY.pickle index 866d8dfd..ac3e7d28 100644 --- a/js/Sinks/CSCOPXY.pickle +++ b/js/Sinks/CSCOPXY.pickle @@ -24,10 +24,12 @@ aS'xmin' p11 aS'x' p12 -aS'nbr_curves' +aS'model' p13 -atp14 -Rp15 +aS'nbr_curves' +p14 +atp15 +Rp16 .(dp0 S'clrs' p1 diff --git a/js/Sinks/CSCOPXY3D.js b/js/Sinks/CSCOPXY3D.js index 7f8075d7..1a323cc1 100644 --- a/js/Sinks/CSCOPXY3D.js +++ b/js/Sinks/CSCOPXY3D.js @@ -12,19 +12,19 @@ function CSCOPXY3D() { 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 = [[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]; + this.model = scicos_model(); + this.model.sim = list("cscopxy3d",4); + this.model.in1 = [[1],[1],[1]]; + this.model.in2 = [[1],[1],[1]]; + this.model.intyp = [[1],[1],[1]]; + this.model.evtin = new ScilabDouble(1); + this.model.rpar = [[this.vec_x.slice()],[this.vec_y.slice()],[this.vec_z.slice()],[this.param3ds.slice()]]; + this.model.ipar = [[this.win],[8],[this.N],[this.clrs.slice()],[this.siz.slice()],[8],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]]; + this.model.blocktype = new ScilabString("d"); + this.model.dep_ut = [false,false]; 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); + this.x = standard_define([2,2],this.model,exprs,gr_i); return new BasicBlock(this.x); } CSCOPXY3D.prototype.details = function CSCOPXY3D() { @@ -61,7 +61,7 @@ function CSCOPXY3D() { this.x = arg1; graphics = arg1.graphics; exprs = graphics.exprs; - model = arg1.model; + this.model = arg1.model; while (true) { [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) { @@ -115,7 +115,7 @@ function CSCOPXY3D() { if (ok) { 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),[]); + [model,graphics,ok] = set_io(this.model,graphics,list([in1,in2],ones(3,1)),list(),ones(1,1),[]); if (this.wpos==[]) { this.wpos = [[-1],[-1]]; } @@ -125,11 +125,11 @@ function CSCOPXY3D() { 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; + this.model.rpar = rpar; + this.model.ipar = ipar; graphics.exprs = exprs; this.x.graphics = graphics; - this.x.model = model; + this.x.model = this.model; break; } else { message(mess); diff --git a/js/Sinks/CSCOPXY3D.pickle b/js/Sinks/CSCOPXY3D.pickle index 6c11c475..721b6b62 100644 --- a/js/Sinks/CSCOPXY3D.pickle +++ b/js/Sinks/CSCOPXY3D.pickle @@ -24,10 +24,12 @@ aS'siz' p11 aS'x' p12 -aS'nbr_curves' +aS'model' p13 -atp14 -Rp15 +aS'nbr_curves' +p14 +atp15 +Rp16 .(dp0 S'clrs' p1 diff --git a/js/Sinks/OUTIMPL_f.js b/js/Sinks/OUTIMPL_f.js index eb1aff0e..b0e9595d 100644 --- a/js/Sinks/OUTIMPL_f.js +++ b/js/Sinks/OUTIMPL_f.js @@ -1,21 +1,21 @@ /* autogenerated from "macros/Sinks/OUTIMPL_f.sci" */ function OUTIMPL_f() { OUTIMPL_f.prototype.define = function OUTIMPL_f() { - model = scicos_model(); - model.in1 = [-1]; - model.in2 = [1]; + this.model = scicos_model(); + this.model.in1 = [-1]; + this.model.in2 = [1]; this.prt = 1; - model.sim = "outimpl"; - model.ipar = [1]; - model.blocktype = "c"; - model.dep_ut = [false,false]; + this.model.sim = new ScilabString("outimpl"); + this.model.ipar = [1]; + this.model.blocktype = new ScilabString("c"); + this.model.dep_ut = [false,false]; mo = modelica(); mo.model = "PORT"; mo.inputs = "n"; - model.equations = mo; + this.model.equations = new ScilabDouble(mo); exprs = "1"; gr_i = []; - this.x = standard_define([1,1],model,exprs,gr_i); + this.x = standard_define([1,1],this.model,exprs,gr_i); this.x.graphics.in_implicit = ["I"]; return new ImplicitOutBlock(this.x); } @@ -32,7 +32,7 @@ function OUTIMPL_f() { this.x = arg1; graphics = arg1.graphics; exprs = graphics.exprs; - model = arg1.model; + this.model = arg1.model; if (size(exprs,"*")==2) { exprs = exprs[1-1]; } @@ -45,14 +45,14 @@ function OUTIMPL_f() { if (this.prt<=0) { block_parameter_error(msprintf("Wrong value for \'Port Number\' parameter: %d.",this.prt),"Strictly positive integer expected."); } else { - if (model.ipar!=this.prt) { + if (this.model.ipar!=this.prt) { needcompile = 4; y = needcompile; } - model.ipar = this.prt; + this.model.ipar = new ScilabDouble(this.prt); graphics.exprs = exprs; this.x.graphics = graphics; - this.x.model = model; + this.x.model = this.model; break; } } diff --git a/js/Sinks/OUTIMPL_f.pickle b/js/Sinks/OUTIMPL_f.pickle index 79131fd4..e5dda12a 100644 --- a/js/Sinks/OUTIMPL_f.pickle +++ b/js/Sinks/OUTIMPL_f.pickle @@ -4,10 +4,12 @@ p0 ((lp1 S'x' p2 -aS'prt' +aS'model' p3 -atp4 -Rp5 +aS'prt' +p4 +atp5 +Rp6 .(dp0 S'arg1' p1 diff --git a/js/Sinks/OUT_f.js b/js/Sinks/OUT_f.js index 4a81d71f..624915bf 100644 --- a/js/Sinks/OUT_f.js +++ b/js/Sinks/OUT_f.js @@ -3,17 +3,17 @@ function OUT_f() { OUT_f.prototype.define = function OUT_f() { n = -1; this.prt = 1; - model = scicos_model(); - model.sim = "output"; - model.in1 = -1; - model.in2 = -2; - model.intyp = -1; - model.ipar = this.prt; - model.blocktype = "c"; - model.dep_ut = [false,false]; + this.model = scicos_model(); + this.model.sim = new ScilabString("output"); + this.model.in1 = new ScilabDouble(-1); + this.model.in2 = new ScilabDouble(-2); + this.model.intyp = new ScilabDouble(-1); + this.model.ipar = new ScilabDouble(this.prt); + this.model.blocktype = new ScilabString("c"); + this.model.dep_ut = [false,false]; exprs = string(this.prt); gr_i = []; - this.x = standard_define([1,1],model,exprs,gr_i); + this.x = standard_define([1,1],this.model,exprs,gr_i); return new ExplicitOutBlock(this.x); } OUT_f.prototype.details = function OUT_f() { @@ -28,7 +28,7 @@ function OUT_f() { this.prt = parseFloat(arguments[0]["prt"]) this.x = arg1; graphics = arg1.graphics; - model = arg1.model; + this.model = arg1.model; exprs = graphics.exprs; if (size(exprs,"*")==2) { exprs = exprs[1-1]; @@ -42,10 +42,10 @@ function OUT_f() { if (this.prt<=0) { block_parameter_error(msprintf("Wrong value for \'Port Number\' parameter: %d.",this.prt),"Strictly positive integer expected."); } else { - model.ipar = this.prt; + this.model.ipar = new ScilabDouble(this.prt); graphics.exprs = exprs; this.x.graphics = graphics; - this.x.model = model; + this.x.model = this.model; break; } } diff --git a/js/Sinks/OUT_f.pickle b/js/Sinks/OUT_f.pickle index 1ba039dd..318c53a1 100644 --- a/js/Sinks/OUT_f.pickle +++ b/js/Sinks/OUT_f.pickle @@ -4,10 +4,12 @@ p0 ((lp1 S'x' p2 -aS'prt' +aS'model' p3 -atp4 -Rp5 +aS'prt' +p4 +atp5 +Rp6 .(dp0 S'model.in2' p1 diff --git a/js/Sinks/TOWS_c.js b/js/Sinks/TOWS_c.js index 67f4cf64..dea5b7ba 100644 --- a/js/Sinks/TOWS_c.js +++ b/js/Sinks/TOWS_c.js @@ -5,22 +5,22 @@ function TOWS_c() { this.nz = 128; this.varnam = "A"; this.herit = 0; - model = scicos_model(); - model.sim = list("tows_c",4); - model.in1 = [nu]; - model.in2 = -2; - model.intyp = -1; - model.out = []; - model.evtin = [1]; - model.evtout = []; - model.rpar = []; - model.ipar = [[this.nz],[length(this.varnam)],[transpose(this.ascii[this.varnam-1])]]; - model.blocktype = "d"; - model.firing = []; - model.dep_ut = [false,false]; + this.model = scicos_model(); + this.model.sim = list("tows_c",4); + this.model.in1 = [nu]; + this.model.in2 = new ScilabDouble(-2); + this.model.intyp = new ScilabDouble(-1); + this.model.out = []; + this.model.evtin = [1]; + this.model.evtout = []; + this.model.rpar = []; + this.model.ipar = [[this.nz],[length(this.varnam)],[transpose(this.ascii[this.varnam-1])]]; + this.model.blocktype = new ScilabString("d"); + this.model.firing = []; + this.model.dep_ut = [false,false]; gr_i = []; exprs = [[string(this.nz)],[string(this.varnam)],[string(this.herit)]]; - this.x = standard_define([4,2],model,exprs,gr_i); + this.x = standard_define([4,2],this.model,exprs,gr_i); return new BasicBlock(this.x); } TOWS_c.prototype.details = function TOWS_c() { @@ -40,7 +40,7 @@ function TOWS_c() { this.herit = parseFloat(arguments[0]["herit"]) this.x = arg1; graphics = arg1.graphics; - model = arg1.model; + this.model = arg1.model; exprs = graphics.exprs; while (true) { [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); @@ -59,16 +59,16 @@ function TOWS_c() { } 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-this.herit,1),[]); + [model,graphics,ok] = set_io(this.model,graphics,list([-1,-2],-1),list(),ones(1-this.herit,1),[]); if (this.herit==1) { - model.blocktype = "x"; + this.model.blocktype = new ScilabString("x"); } else { - model.blocktype = "d"; + this.model.blocktype = new ScilabString("d"); } - model.ipar = [[this.nz],[length(this.varnam)],[transpose(this.ascii[this.varnam-1])]]; + this.model.ipar = [[this.nz],[length(this.varnam)],[transpose(this.ascii[this.varnam-1])]]; graphics.exprs = exprs; this.x.graphics = graphics; - this.x.model = model; + this.x.model = this.model; break; } } diff --git a/js/Sinks/TOWS_c.pickle b/js/Sinks/TOWS_c.pickle index 3fd146ce..20e16678 100644 --- a/js/Sinks/TOWS_c.pickle +++ b/js/Sinks/TOWS_c.pickle @@ -2,18 +2,20 @@ c__builtin__ set p0 ((lp1 -S'x' +S'herit' p2 aS'nz' p3 -aS'herit' +aS'x' p4 -aS'ascii' +aS'model' p5 -aS'varnam' +aS'ascii' p6 -atp7 -Rp8 +aS'varnam' +p7 +atp8 +Rp9 .(dp0 S'arg1' p1 diff --git a/js/Sinks/TRASH_f.js b/js/Sinks/TRASH_f.js index 19c2156b..3d8a402a 100644 --- a/js/Sinks/TRASH_f.js +++ b/js/Sinks/TRASH_f.js @@ -2,15 +2,15 @@ function TRASH_f() { TRASH_f.prototype.define = function TRASH_f() { in1 = -1; - model = scicos_model(); - model.sim = "trash"; - model.in1 = in1; - model.evtin = 1; - model.blocktype = "d"; - model.dep_ut = [false,false]; + this.model = scicos_model(); + this.model.sim = new ScilabString("trash"); + this.model.in1 = new ScilabDouble(in1); + this.model.evtin = new ScilabDouble(1); + this.model.blocktype = new ScilabString("d"); + this.model.dep_ut = [false,false]; exprs = " "; gr_i = []; - this.x = standard_define([2,2],model,exprs,gr_i); + this.x = standard_define([2,2],this.model,exprs,gr_i); return new BasicBlock(this.x); } TRASH_f.prototype.details = function TRASH_f() { diff --git a/js/Sinks/TRASH_f.pickle b/js/Sinks/TRASH_f.pickle index e56faa0c..e5dde935 100644 --- a/js/Sinks/TRASH_f.pickle +++ b/js/Sinks/TRASH_f.pickle @@ -4,8 +4,10 @@ p0 ((lp1 S'x' p2 -atp3 -Rp4 +aS'model' +p3 +atp4 +Rp5 .(dp0 S'model.sim' p1 diff --git a/js/Sinks/WFILE_f.js b/js/Sinks/WFILE_f.js index 96bf2ea2..c09b1f9c 100644 --- a/js/Sinks/WFILE_f.js +++ b/js/Sinks/WFILE_f.js @@ -7,17 +7,17 @@ function WFILE_f() { fname = "foo"; lunit = 0; this.N = 2; - model = scicos_model(); - model.sim = "writef"; - model.in1 = this.in1; - model.evtin = 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]; + this.model = scicos_model(); + this.model.sim = new ScilabString("writef"); + this.model.in1 = new ScilabDouble(this.in1); + this.model.evtin = new ScilabDouble(1); + this.model.dstate = [[-1],[lunit],[zeros((nin+1)*this.N,1)]]; + this.model.ipar = [[length(fname)],[length(frmt)],[0],[this.N],[this._str2code[fname-1]],[this._str2code[frmt-1]]]; + this.model.blocktype = new ScilabString("d"); + this.model.dep_ut = [true,false]; exprs = [[sci2exp(this.in1)],[fname],[frmt],[string(this.N)]]; gr_i = []; - this.x = standard_define([3,2],model,exprs,gr_i); + this.x = standard_define([3,2],this.model,exprs,gr_i); return new BasicBlock(this.x); } WFILE_f.prototype.details = function WFILE_f() { @@ -45,8 +45,8 @@ function WFILE_f() { this.x = arg1; graphics = arg1.graphics; exprs = graphics.exprs; - model = arg1.model; - dstate = model.dstate; + this.model = arg1.model; + dstate = this.model.dstate; lunit = dstate[2-1]; fname = exprs[2-1]; frmt = exprs[3-1]; @@ -89,13 +89,13 @@ function WFILE_f() { if (prod(size(dstate))!=(nin+1)*this.N+2) { dstate = [[-1],[lunit],[zeros((nin+1)*this.N,1)]]; } - model.in1 = nin; - model.dstate = dstate; - model.ipar = ipar; - model.dep_ut = [true,false]; + this.model.in1 = new ScilabDouble(nin); + this.model.dstate = dstate; + this.model.ipar = ipar; + this.model.dep_ut = [true,false]; graphics.exprs = exprs; this.x.graphics = graphics; - this.x.model = model; + this.x.model = this.model; break; } } diff --git a/js/Sinks/WFILE_f.pickle b/js/Sinks/WFILE_f.pickle index 7bc34bab..e42167dc 100644 --- a/js/Sinks/WFILE_f.pickle +++ b/js/Sinks/WFILE_f.pickle @@ -16,8 +16,10 @@ aS'frmt1' p7 aS'x' p8 -atp9 -Rp10 +aS'model' +p9 +atp10 +Rp11 .(dp0 S'model.dstate' p1 diff --git a/js/Sinks/WRITEAU_f.js b/js/Sinks/WRITEAU_f.js index d5302a86..529703df 100644 --- a/js/Sinks/WRITEAU_f.js +++ b/js/Sinks/WRITEAU_f.js @@ -8,17 +8,17 @@ function WRITEAU_f() { this.swap = 0; lunit = 0; this.N = 2; - model = scicos_model(); - model.sim = list("writeau",2); - model.in1 = in1; - model.evtin = 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]; + this.model = scicos_model(); + this.model.sim = list("writeau",2); + this.model.in1 = new ScilabDouble(in1); + this.model.evtin = new ScilabDouble(1); + this.model.dstate = [[-1],[lunit],[zeros((nin+1)*this.N,1)]]; + this.model.ipar = [[length(fname)],[this._str2code[frmt-1]],[this.N],[this.swap],[this._str2code[fname-1]]]; + this.model.blocktype = new ScilabString("d"); + this.model.dep_ut = [true,false]; exprs = [string(this.N),string(this.swap)]; gr_i = []; - this.x = standard_define([4,2],model,exprs,gr_i); + this.x = standard_define([4,2],this.model,exprs,gr_i); return new BasicBlock(this.x); } WRITEAU_f.prototype.details = function WRITEAU_f() { @@ -37,9 +37,9 @@ function WRITEAU_f() { this.x = arg1; graphics = arg1.graphics; exprs = graphics.exprs; - model = arg1.model; - ipar = model.ipar; - dstate = model.dstate; + this.model = arg1.model; + ipar = this.model.ipar; + dstate = this.model.dstate; lunit = dstate[2-1]; while (true) { [ok,this.N,this.swap,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","WRITEAU_f")],[" "],["Write \'.au\' sound file on audio device"]],["Buffer Size","Swap Mode (0:No, 1:Yes)"],list("vec",1,"vec",1),exprs); @@ -65,12 +65,12 @@ function WRITEAU_f() { if (prod(size(dstate))!=(nin+1)*this.N+2) { dstate = [[-1],[lunit],[zeros((nin+1)*this.N,1)]]; } - model.in1 = 1; - model.dstate = dstate; - model.ipar = ipar; + this.model.in1 = new ScilabDouble(1); + this.model.dstate = dstate; + this.model.ipar = ipar; graphics.exprs = exprs; this.x.graphics = graphics; - this.x.model = model; + this.x.model = this.model; break; } } diff --git a/js/Sinks/WRITEAU_f.pickle b/js/Sinks/WRITEAU_f.pickle index 385fa47f..8829778b 100644 --- a/js/Sinks/WRITEAU_f.pickle +++ b/js/Sinks/WRITEAU_f.pickle @@ -4,16 +4,18 @@ p0 ((lp1 S'_str2code' p2 -aS'x' +aS'N' p3 aS'alreadyran' p4 -aS'swap' +aS'x' p5 -aS'N' +aS'model' p6 -atp7 -Rp8 +aS'swap' +p7 +atp8 +Rp9 .(dp0 S'model.dstate' p1 diff --git a/js/Sinks/WRITEC_f.js b/js/Sinks/WRITEC_f.js index b8be9fc4..1198b764 100644 --- a/js/Sinks/WRITEC_f.js +++ b/js/Sinks/WRITEC_f.js @@ -8,17 +8,17 @@ function WRITEC_f() { this.swap = 0; lunit = 0; this.N = 2; - model = scicos_model(); - model.sim = list("writec",2); - model.in1 = this.in1; - model.evtin = 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]; + this.model = scicos_model(); + this.model.sim = list("writec",2); + this.model.in1 = new ScilabDouble(this.in1); + this.model.evtin = new ScilabDouble(1); + this.model.dstate = [[-1],[lunit],[zeros((nin+1)*this.N,1)]]; + this.model.ipar = [[length(fname)],[this._str2code[frmt-1]],[this.N],[this.swap],[this._str2code[fname-1]]]; + this.model.blocktype = new ScilabString("d"); + this.model.dep_ut = [true,false]; exprs = [[sci2exp(this.in1)],[fname],[frmt],[string(this.N),string(this.swap)]]; gr_i = []; - this.x = standard_define([4,2],model,exprs,gr_i); + this.x = standard_define([4,2],this.model,exprs,gr_i); return new BasicBlock(this.x); } WRITEC_f.prototype.details = function WRITEC_f() { @@ -43,9 +43,9 @@ function WRITEC_f() { this.x = arg1; graphics = arg1.graphics; exprs = graphics.exprs; - model = arg1.model; - ipar = model.ipar; - dstate = model.dstate; + this.model = arg1.model; + ipar = this.model.ipar; + dstate = this.model.dstate; lunit = dstate[2-1]; fname = exprs[2-1]; frmt = exprs[3-1]; @@ -92,12 +92,12 @@ function WRITEC_f() { if (prod(size(dstate))!=(nin+1)*this.N+2) { dstate = [[-1],[lunit],[zeros((nin+1)*this.N,1)]]; } - model.in1 = nin; - model.dstate = dstate; - model.ipar = ipar; + this.model.in1 = new ScilabDouble(nin); + this.model.dstate = dstate; + this.model.ipar = ipar; graphics.exprs = exprs; this.x.graphics = graphics; - this.x.model = model; + this.x.model = this.model; break; } } diff --git a/js/Sinks/WRITEC_f.pickle b/js/Sinks/WRITEC_f.pickle index 17706b57..7a858bab 100644 --- a/js/Sinks/WRITEC_f.pickle +++ b/js/Sinks/WRITEC_f.pickle @@ -18,10 +18,12 @@ aS'swap' p8 aS'x' p9 -aS'alreadyran' +aS'model' p10 -atp11 -Rp12 +aS'alreadyran' +p11 +atp12 +Rp13 .(dp0 S'model.dstate' p1 -- cgit