diff options
Diffstat (limited to 'js/Sources')
45 files changed, 327 insertions, 46 deletions
diff --git a/js/Sources/CLKINV_f.pickle b/js/Sources/CLKINV_f.pickle new file mode 100644 index 00000000..154645d8 --- /dev/null +++ b/js/Sources/CLKINV_f.pickle @@ -0,0 +1,7 @@ +c__builtin__ +set +p0 +((lp1 +tp2 +Rp3 +.
\ No newline at end of file diff --git a/js/Sources/CLKIN_f.pickle b/js/Sources/CLKIN_f.pickle new file mode 100644 index 00000000..154645d8 --- /dev/null +++ b/js/Sources/CLKIN_f.pickle @@ -0,0 +1,7 @@ +c__builtin__ +set +p0 +((lp1 +tp2 +Rp3 +.
\ No newline at end of file diff --git a/js/Sources/CLOCK_c.js b/js/Sources/CLOCK_c.js index 598ed817..c7e6c608 100644 --- a/js/Sources/CLOCK_c.js +++ b/js/Sources/CLOCK_c.js @@ -1,7 +1,7 @@ /* autogenerated from "macros/Sources/CLOCK_c.sci" */ function CLOCK_c() { CLOCK_c.prototype.define = function CLOCK_c() { -evtdly=EVTDLY_c["define"-1]; +evtdly=this.EVTDLY_c["define"-1]; evtdly.graphics.orig=[320,232]; evtdly.graphics.sz=[40,40]; evtdly.graphics.flip=true; diff --git a/js/Sources/CLOCK_c.pickle b/js/Sources/CLOCK_c.pickle new file mode 100644 index 00000000..50891984 --- /dev/null +++ b/js/Sources/CLOCK_c.pickle @@ -0,0 +1,9 @@ +c__builtin__ +set +p0 +((lp1 +S'EVTDLY_c' +p2 +atp3 +Rp4 +.
\ No newline at end of file diff --git a/js/Sources/CLOCK_f.pickle b/js/Sources/CLOCK_f.pickle new file mode 100644 index 00000000..154645d8 --- /dev/null +++ b/js/Sources/CLOCK_f.pickle @@ -0,0 +1,7 @@ +c__builtin__ +set +p0 +((lp1 +tp2 +Rp3 +.
\ No newline at end of file diff --git a/js/Sources/CONST.pickle b/js/Sources/CONST.pickle new file mode 100644 index 00000000..154645d8 --- /dev/null +++ b/js/Sources/CONST.pickle @@ -0,0 +1,7 @@ +c__builtin__ +set +p0 +((lp1 +tp2 +Rp3 +.
\ No newline at end of file diff --git a/js/Sources/CONST_f.pickle b/js/Sources/CONST_f.pickle new file mode 100644 index 00000000..154645d8 --- /dev/null +++ b/js/Sources/CONST_f.pickle @@ -0,0 +1,7 @@ +c__builtin__ +set +p0 +((lp1 +tp2 +Rp3 +.
\ No newline at end of file diff --git a/js/Sources/CONST_m.js b/js/Sources/CONST_m.js index e234d175..14c15e6c 100644 --- a/js/Sources/CONST_m.js +++ b/js/Sources/CONST_m.js @@ -36,8 +36,8 @@ block_parameter_error(msprintf(gettext("Wrong size for \'%s\' parameter"),gettex } else { model.sim=list("cstblk4_m",4); model.opar=list(C); -if ((type[C-1]==1)) { -if (isreal[C-1]) { +if ((this.type[C-1]==1)) { +if (isreal(C)) { ot=1; } else { ot=2; diff --git a/js/Sources/CONST_m.pickle b/js/Sources/CONST_m.pickle new file mode 100644 index 00000000..0ac03d7f --- /dev/null +++ b/js/Sources/CONST_m.pickle @@ -0,0 +1,9 @@ +c__builtin__ +set +p0 +((lp1 +S'type' +p2 +atp3 +Rp4 +.
\ No newline at end of file diff --git a/js/Sources/CURVE_c.pickle b/js/Sources/CURVE_c.pickle new file mode 100644 index 00000000..8cef5b52 --- /dev/null +++ b/js/Sources/CURVE_c.pickle @@ -0,0 +1,19 @@ +c__builtin__ +set +p0 +((lp1 +S'rparin' +p2 +aS'ixy' +p3 +aS'iparin' +p4 +aS'argn' +p5 +aS'xy' +p6 +aS'curwin' +p7 +atp8 +Rp9 +.
\ No newline at end of file diff --git a/js/Sources/CURV_f.pickle b/js/Sources/CURV_f.pickle new file mode 100644 index 00000000..154645d8 --- /dev/null +++ b/js/Sources/CURV_f.pickle @@ -0,0 +1,7 @@ +c__builtin__ +set +p0 +((lp1 +tp2 +Rp3 +.
\ No newline at end of file diff --git a/js/Sources/Counter.pickle b/js/Sources/Counter.pickle new file mode 100644 index 00000000..154645d8 --- /dev/null +++ b/js/Sources/Counter.pickle @@ -0,0 +1,7 @@ +c__builtin__ +set +p0 +((lp1 +tp2 +Rp3 +.
\ No newline at end of file diff --git a/js/Sources/FROMWSB.js b/js/Sources/FROMWSB.js index d7ac7b2a..7cf0658f 100644 --- a/js/Sources/FROMWSB.js +++ b/js/Sources/FROMWSB.js @@ -35,9 +35,9 @@ spath[$+1-1]=path[k-1]; } xx=arg1[spath-1]; execstr("xxn="+xx.gui+"(\'set\',xx)"); -if (!isequalbitwise[xxn-1][xx-1]) { +if (!this.isequalbitwise[this.xxn-1][xx-1]) { model=xx.model; -model_n=xxn.model; +model_n=this.xxn.model; if (!is_modelica_block(xx)) { modified=or(model.sim!=model_n.sim)||!isequal(model.state,model_n.state)||!isequal(model.dstate,model_n.dstate)||!isequal(model.odstate,model_n.odstate)||!isequal(model.rpar,model_n.rpar)||!isequal(model.ipar,model_n.ipar)||!isequal(model.opar,model_n.opar)||!isequal(model.label,model_n.label); if (or(model.in1!=model_n.in1)||or(model.out!=model_n.out)||or(model.in2!=model_n.in2)||or(model.out2!=model_n.out2)||or(model.outtyp!=model_n.outtyp)||or(model.intyp!=model_n.intyp)) { @@ -60,7 +60,7 @@ needcompile=4; if ((model.nzcross!=model_n.nzcross)||(model.nmode!=model_n.nmode)) { needcompile=4; } -if (prod[size(model_n.sim)-1]>1) { +if (prod(size(model_n.sim))>1) { if (model_n.sim[2-1]>1000) { if (model.sim[1-1]!=model_n.sim[1-1]) { needcompile=4; @@ -75,7 +75,7 @@ if (or(eq.model!=eqn.model)||or(eq.inputs!=eqn.inputs)||or(eq.outputs!=eqn.outpu needcompile=4; } } -arg1[spath-1]=xxn; +arg1[spath-1]=this.xxn; newpar[size(newpar)+1-1]=path; y=max(y,needcompile); } diff --git a/js/Sources/FROMWSB.pickle b/js/Sources/FROMWSB.pickle new file mode 100644 index 00000000..794658bf --- /dev/null +++ b/js/Sources/FROMWSB.pickle @@ -0,0 +1,11 @@ +c__builtin__ +set +p0 +((lp1 +S'xxn' +p2 +aS'isequalbitwise' +p3 +atp4 +Rp5 +.
\ No newline at end of file diff --git a/js/Sources/FROMWS_c.js b/js/Sources/FROMWS_c.js index a166ca27..df7373cf 100644 --- a/js/Sources/FROMWS_c.js +++ b/js/Sources/FROMWS_c.js @@ -10,7 +10,7 @@ model.sim=list("fromws_c",4); model.out=-1; model.out2=-2; model.outtyp=-1; -model.ipar=[[length(varnam)],[_str2code[varnam-1]],[Method],[ZC],[OutEnd]]; +model.ipar=[[length(varnam)],[this._str2code[varnam-1]],[Method],[ZC],[OutEnd]]; model.evtin=[1]; model.evtout=[1]; model.firing=[0]; @@ -53,7 +53,7 @@ message([["Invalid variable name."],["Please choose another variable name."]]); ok=false; } if (ok) { -model.ipar=[[length(varnam)],[_str2code[varnam-1]],[Method],[ZC],[OutEnd]]; +model.ipar=[[length(varnam)],[this._str2code[varnam-1]],[Method],[ZC],[OutEnd]]; [model,graphics,ok]=set_io(model,graphics,list(),list([-1,-2],-1),1,1); if (ok) { graphics.exprs=exprs; diff --git a/js/Sources/FROMWS_c.pickle b/js/Sources/FROMWS_c.pickle new file mode 100644 index 00000000..3efc5bbe --- /dev/null +++ b/js/Sources/FROMWS_c.pickle @@ -0,0 +1,9 @@ +c__builtin__ +set +p0 +((lp1 +S'_str2code' +p2 +atp3 +Rp4 +.
\ No newline at end of file diff --git a/js/Sources/GENSIN_f.pickle b/js/Sources/GENSIN_f.pickle new file mode 100644 index 00000000..154645d8 --- /dev/null +++ b/js/Sources/GENSIN_f.pickle @@ -0,0 +1,7 @@ +c__builtin__ +set +p0 +((lp1 +tp2 +Rp3 +.
\ No newline at end of file diff --git a/js/Sources/GENSQR_f.pickle b/js/Sources/GENSQR_f.pickle new file mode 100644 index 00000000..154645d8 --- /dev/null +++ b/js/Sources/GENSQR_f.pickle @@ -0,0 +1,7 @@ +c__builtin__ +set +p0 +((lp1 +tp2 +Rp3 +.
\ No newline at end of file diff --git a/js/Sources/GEN_SQR.js b/js/Sources/GEN_SQR.js index 040f40c4..e9884602 100644 --- a/js/Sources/GEN_SQR.js +++ b/js/Sources/GEN_SQR.js @@ -54,7 +54,7 @@ x=standard_define([3,2],model,exprs,gr_i); GEN_SQR.prototype.get = function GEN_SQR() { } GEN_SQR.prototype.set = function GEN_SQR() { -y=needcompile; +y=this.needcompile; arg1.model.ipar=1; typ=list(); graphics=arg1.graphics; @@ -77,7 +77,7 @@ sblock=x.model.rpar; if (ierr==0) { [sblock,%w,needcompile2,ok]=do_eval(sblock,list()); if (ok) { -y=max(2,needcompile,needcompile2); +y=max(2,this.needcompile,needcompile2); x.graphics.exprs=exprs; x.model.rpar=sblock; break; diff --git a/js/Sources/GEN_SQR.pickle b/js/Sources/GEN_SQR.pickle new file mode 100644 index 00000000..1922e519 --- /dev/null +++ b/js/Sources/GEN_SQR.pickle @@ -0,0 +1,9 @@ +c__builtin__ +set +p0 +((lp1 +S'needcompile' +p2 +atp3 +Rp4 +.
\ No newline at end of file diff --git a/js/Sources/Ground_g.pickle b/js/Sources/Ground_g.pickle new file mode 100644 index 00000000..154645d8 --- /dev/null +++ b/js/Sources/Ground_g.pickle @@ -0,0 +1,7 @@ +c__builtin__ +set +p0 +((lp1 +tp2 +Rp3 +.
\ No newline at end of file diff --git a/js/Sources/INIMPL_f.pickle b/js/Sources/INIMPL_f.pickle new file mode 100644 index 00000000..154645d8 --- /dev/null +++ b/js/Sources/INIMPL_f.pickle @@ -0,0 +1,7 @@ +c__builtin__ +set +p0 +((lp1 +tp2 +Rp3 +.
\ No newline at end of file diff --git a/js/Sources/IN_f.js b/js/Sources/IN_f.js index 8e7695cb..b81e3518 100644 --- a/js/Sources/IN_f.js +++ b/js/Sources/IN_f.js @@ -30,17 +30,17 @@ if (size(exprs,"*")==1) { exprs=[[exprs[1-1]],["[-1 -2]"],["-1"]]; } while (true) { -[ok,prt,otsz,ot,exprs]=getvalue(_["Set Input block parameters"-1],[[_["Port number"-1]],[_["Outport size ([-1 -2] for inherit)"-1]],[_["Outport Type (-1 for inherit)"-1]]],list("vec",1,"vec",-1,"vec",1),exprs); +[ok,prt,otsz,ot,exprs]=getvalue(_("Set Input block parameters"),[[_("Port number")],[_("Outport size ([-1 -2] for inherit)")],[_("Outport Type (-1 for inherit)")]],list("vec",1,"vec",-1,"vec",1),exprs); if (!ok) { break; } prt=int(prt); if (prt<=0) { -message(_["Port number must be a positive integer"-1]); +message(_("Port number must be a positive integer")); } else if (!isequal(size(otsz,"*"),2)) { -message(_["Outport Size must be a 2 elements vector"-1]); +message(_("Outport Size must be a 2 elements vector")); } else if (((ot<1||ot>9)&&(ot!=-1))) { -message(_["Outport type must be a number between 1 and 9, or -1 for inheritance."-1]); +message(_("Outport type must be a number between 1 and 9, or -1 for inheritance.")); } else { if (model.ipar!=prt) { needcompile=4; diff --git a/js/Sources/IN_f.pickle b/js/Sources/IN_f.pickle new file mode 100644 index 00000000..154645d8 --- /dev/null +++ b/js/Sources/IN_f.pickle @@ -0,0 +1,7 @@ +c__builtin__ +set +p0 +((lp1 +tp2 +Rp3 +.
\ No newline at end of file diff --git a/js/Sources/Modulo_Count.pickle b/js/Sources/Modulo_Count.pickle new file mode 100644 index 00000000..154645d8 --- /dev/null +++ b/js/Sources/Modulo_Count.pickle @@ -0,0 +1,7 @@ +c__builtin__ +set +p0 +((lp1 +tp2 +Rp3 +.
\ No newline at end of file diff --git a/js/Sources/PULSE_SC.js b/js/Sources/PULSE_SC.js index 12f227e4..0f216f21 100644 --- a/js/Sources/PULSE_SC.js +++ b/js/Sources/PULSE_SC.js @@ -49,7 +49,7 @@ x=standard_define([3,2],model,exprs,gr_i); PULSE_SC.prototype.get = function PULSE_SC() { } PULSE_SC.prototype.set = function PULSE_SC() { -y=needcompile; +y=this.needcompile; arg1.model.ipar=1; typ=list(); graphics=arg1.graphics; @@ -72,7 +72,7 @@ sblock=x.model.rpar; if (ierr==0) { [sblock,%w,needcompile2,ok]=do_eval(sblock,list()); if (ok) { -y=max(2,needcompile,needcompile2); +y=max(2,this.needcompile,needcompile2); x.graphics.exprs=exprs; x.model.rpar=sblock; break; diff --git a/js/Sources/PULSE_SC.pickle b/js/Sources/PULSE_SC.pickle new file mode 100644 index 00000000..1922e519 --- /dev/null +++ b/js/Sources/PULSE_SC.pickle @@ -0,0 +1,9 @@ +c__builtin__ +set +p0 +((lp1 +S'needcompile' +p2 +atp3 +Rp4 +.
\ No newline at end of file diff --git a/js/Sources/RAMP.pickle b/js/Sources/RAMP.pickle new file mode 100644 index 00000000..154645d8 --- /dev/null +++ b/js/Sources/RAMP.pickle @@ -0,0 +1,7 @@ +c__builtin__ +set +p0 +((lp1 +tp2 +Rp3 +.
\ No newline at end of file diff --git a/js/Sources/RAND_f.pickle b/js/Sources/RAND_f.pickle new file mode 100644 index 00000000..154645d8 --- /dev/null +++ b/js/Sources/RAND_f.pickle @@ -0,0 +1,7 @@ +c__builtin__ +set +p0 +((lp1 +tp2 +Rp3 +.
\ No newline at end of file diff --git a/js/Sources/RAND_m.pickle b/js/Sources/RAND_m.pickle new file mode 100644 index 00000000..154645d8 --- /dev/null +++ b/js/Sources/RAND_m.pickle @@ -0,0 +1,7 @@ +c__builtin__ +set +p0 +((lp1 +tp2 +Rp3 +.
\ No newline at end of file diff --git a/js/Sources/READAU_f.js b/js/Sources/READAU_f.js index cf1be0d7..95ce25c3 100644 --- a/js/Sources/READAU_f.js +++ b/js/Sources/READAU_f.js @@ -17,7 +17,7 @@ model.sim=list("readau",2); model.out=nout; model.evtin=1; model.dstate=[[1],[1],[lunit],[zeros(N*M,1)]]; -model.ipar=[[length(fname)],[_str2code[frmt-1]],[ievt],[N],[M],[swap],[offset],[_str2code[fname-1]],[tmask],[outmask]]; +model.ipar=[[length(fname)],[this._str2code[frmt-1]],[ievt],[N],[M],[swap],[offset],[this._str2code[fname-1]],[tmask],[outmask]]; model.blocktype="d"; model.dep_ut=[false,false]; exprs=[[fname],[string(N)],[string(swap)]]; @@ -52,13 +52,13 @@ break; } fname1=stripblanks(fname1); frmt1=stripblanks(frmt1); -if (alreadyran&&fname1!=fname) { +if (this.alreadyran&&fname1!=fname) { block_parameter_error(gettext("Simulation running !!! You cannot modify Input file name"),gettext("End current simulation first.")); } else if (fname1=="") { block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter."),gettext("Input File Name")),gettext("You must provide a filename.")); } else if (N<1) { block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Buffer size"),N),msprintf(gettext("Must be greater than %d."),1)); -} else if (alreadyran&&(N!=ipar[6-1])) { +} else if (this.alreadyran&&(N!=ipar[6-1])) { block_parameter_error(msprintf(gettext("You cannot modify \'%s\' when running."),gettext("Buffer Size")),gettext("End current simulation first.")); } 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]")); @@ -66,8 +66,8 @@ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."), [model,graphics,ok]=check_io(model,graphics,[],1,1,[]); frmt1=part(frmt1,1,3); if (ok) { -ipar=[[length(fname1)],[_str2code[frmt1-1]],[0],[N],[M],[swap],[offset,_str2code[fname1-1]],[tmask1,outmask.slice()]]; -if (prod[size(dstate)-1]!=(N*M)+3) { +ipar=[[length(fname1)],[this._str2code[frmt1-1]],[0],[N],[M],[swap],[offset,this._str2code[fname1-1]],[tmask1,outmask.slice()]]; +if (prod(size(dstate))!=(N*M)+3) { dstate=[[-1],[-1],[lunit],[zeros(N*M,1)]]; } model.dstate=dstate; diff --git a/js/Sources/READAU_f.pickle b/js/Sources/READAU_f.pickle new file mode 100644 index 00000000..62a7fafc --- /dev/null +++ b/js/Sources/READAU_f.pickle @@ -0,0 +1,11 @@ +c__builtin__ +set +p0 +((lp1 +S'_str2code' +p2 +aS'alreadyran' +p3 +atp4 +Rp5 +.
\ No newline at end of file diff --git a/js/Sources/READC_f.js b/js/Sources/READC_f.js index 778d4051..35f1168f 100644 --- a/js/Sources/READC_f.js +++ b/js/Sources/READC_f.js @@ -13,14 +13,14 @@ offset=1; outmask=1; ievt=0; nout=size(outmask,"*"); -ipar=[[length(fname)],[_str2code[frmt-1]],[ievt],[N],[M],[swap],[offset],[_str2code[fname-1]],[tmask],[outmask]]; +ipar=[[length(fname)],[this._str2code[frmt-1]],[ievt],[N],[M],[swap],[offset],[this._str2code[fname-1]],[tmask],[outmask]]; model=scicos_model(); model.sim=list("readc",2); model.out=nout; model.evtin=1; model.evtout=[]; model.dstate=[[1],[1],[lunit],[zeros(N*M,1)]]; -model.ipar=[[length(fname)],[_str2code[frmt-1]],[ievt],[N],[M],[swap],[offset],[_str2code[fname-1]],[tmask],[outmask]]; +model.ipar=[[length(fname)],[this._str2code[frmt-1]],[ievt],[N],[M],[swap],[offset],[this._str2code[fname-1]],[tmask],[outmask]]; model.blocktype="d"; model.firing=-1; model.dep_ut=[false,false]; @@ -54,15 +54,15 @@ fname1=pathconvert(stripblanks(fname1),false,true); frmt1=stripblanks(frmt1); fmts=["s","l","d","f","c","us","ul","uc","ull","uls","ubl","ubs","dl","fl","ll","sl","db","fb","lb","sb"]; nout=size(outmask,"*"); -if (prod[size(tmask1)-1]>1) { +if (prod(size(tmask1))>1) { block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter."),gettext("Time Record Selection")),gettext("Must be a scalar or an empty matrix.")); } else 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,", "))); -} else if (alreadyran&&fname1!=fname) { +} else if (this.alreadyran&&fname1!=fname) { block_parameter_error(msprintf(gettext("You cannot modify \'%s\' when running"),gettext("Input File Name")),gettext("End current simulation first.")); -} else if (N!=ipar[6-1]&&alreadyran) { +} else if (N!=ipar[6-1]&&this.alreadyran) { block_parameter_error(msprintf(gettext("You cannot modify \'%s\' when running."),gettext("Buffer Size")),gettext("End current simulation first")); -} else if (alreadyran&&size(tmask1)!=size(tmask)) { +} else if (this.alreadyran&&size(tmask1)!=size(tmask)) { block_parameter_error(msprintf(gettext("You cannot modify \'%s\' when running."),gettext("Time Record Selection")),gettext("End current simulation first.")); } else if (fname1=="") { block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter."),gettext("Input File Name")),gettext("You must provide a file name.")); @@ -100,8 +100,8 @@ model.firing=-1; } else { model.firing=0; } -ipar=[[length(fname1)],[_str2code[frmt1-1]],[ievt],[N],[M],[swap],[offset],[_str2code[fname1-1]],[tmask1],[outmask.slice()]]; -if (prod[size(dstate)-1]!=(N*M)+3) { +ipar=[[length(fname1)],[this._str2code[frmt1-1]],[ievt],[N],[M],[swap],[offset],[this._str2code[fname1-1]],[tmask1],[outmask.slice()]]; +if (prod(size(dstate))!=(N*M)+3) { dstate=[[-1],[-1],[lunit],[zeros(N*M,1)]]; } model.dstate=dstate; diff --git a/js/Sources/READC_f.pickle b/js/Sources/READC_f.pickle new file mode 100644 index 00000000..62a7fafc --- /dev/null +++ b/js/Sources/READC_f.pickle @@ -0,0 +1,11 @@ +c__builtin__ +set +p0 +((lp1 +S'_str2code' +p2 +aS'alreadyran' +p3 +atp4 +Rp5 +.
\ No newline at end of file diff --git a/js/Sources/RFILE_f.js b/js/Sources/RFILE_f.js index a9fd24e6..b06b943e 100644 --- a/js/Sources/RFILE_f.js +++ b/js/Sources/RFILE_f.js @@ -10,14 +10,14 @@ N=2; rpar=[]; tmask=0; outmask=1; -ipar=[[length(fname)],[length(frmt)],[0],[N],[_str2code[fname-1]],[_str2code[frmt-1]],[tmask],[outmask]]; +ipar=[[length(fname)],[length(frmt)],[0],[N],[this._str2code[fname-1]],[this._str2code[frmt-1]],[tmask],[outmask]]; dstate=[[1],[1],[lunit],[zeros((nout)*N,1)]]; model=scicos_model(); model.sim="readf"; model.out=nout; model.evtin=1; model.dstate=dstate; -model.ipar=[[length(fname)],[length(frmt)],[0],[N],[_str2code[fname-1]],[_str2code[frmt-1]],[tmask],[outmask]]; +model.ipar=[[length(fname)],[length(frmt)],[0],[N],[this._str2code[fname-1]],[this._str2code[frmt-1]],[tmask],[outmask]]; model.blocktype="d"; model.dep_ut=[false,false]; exprs=[[sci2exp([])],[sci2exp(outmask)],[fname],[frmt],[string(N)],[sci2exp(out)]]; @@ -53,7 +53,7 @@ break; fname1=pathconvert(stripblanks(fname1),false,true); frmt1=stripblanks(frmt1); nout=size(outmask,"*"); -if (prod[size(tmask1)-1]>1) { +if (prod(size(tmask1))>1) { block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %s."),gettext("Time Record Selection"),strcat(string(tmask1.slice())," ")),gettext("Empty matrix or scalar expected.")); } else if (tmask1!=[]&&tmask1<1) { block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d"),gettext("Time Record Selection"),tmask1),gettext("Strictly positive integer expected.")); @@ -89,8 +89,8 @@ model.firing=[]; } else { model.firing=0; } -ipar=[[length(fname1)],[length(frmt1)],[ievt],[N],[_str2code[fname1-1]],[_str2code[frmt1-1]],[tmask1],[outmask.slice()]]; -if (prod[size(dstate)-1]!=(nout+ievt)*N+3) { +ipar=[[length(fname1)],[length(frmt1)],[ievt],[N],[this._str2code[fname1-1]],[this._str2code[frmt1-1]],[tmask1],[outmask.slice()]]; +if (prod(size(dstate))!=(nout+ievt)*N+3) { dstate=[[-1],[-1],[lunit],[zeros((nout+ievt)*N,1)]]; } model.dstate=dstate; diff --git a/js/Sources/RFILE_f.pickle b/js/Sources/RFILE_f.pickle new file mode 100644 index 00000000..3efc5bbe --- /dev/null +++ b/js/Sources/RFILE_f.pickle @@ -0,0 +1,9 @@ +c__builtin__ +set +p0 +((lp1 +S'_str2code' +p2 +atp3 +Rp4 +.
\ No newline at end of file diff --git a/js/Sources/SAWTOOTH_f.pickle b/js/Sources/SAWTOOTH_f.pickle new file mode 100644 index 00000000..154645d8 --- /dev/null +++ b/js/Sources/SAWTOOTH_f.pickle @@ -0,0 +1,7 @@ +c__builtin__ +set +p0 +((lp1 +tp2 +Rp3 +.
\ No newline at end of file diff --git a/js/Sources/STEP.pickle b/js/Sources/STEP.pickle new file mode 100644 index 00000000..154645d8 --- /dev/null +++ b/js/Sources/STEP.pickle @@ -0,0 +1,7 @@ +c__builtin__ +set +p0 +((lp1 +tp2 +Rp3 +.
\ No newline at end of file diff --git a/js/Sources/STEP_FUNCTION.js b/js/Sources/STEP_FUNCTION.js index 3865ec88..a417a68c 100644 --- a/js/Sources/STEP_FUNCTION.js +++ b/js/Sources/STEP_FUNCTION.js @@ -2,7 +2,7 @@ function STEP_FUNCTION() { STEP_FUNCTION.prototype.define = function STEP_FUNCTION() { scs_m_1=scicos_diagram(); -scs_m_1.objs[1-1]=STEP["define"-1]; +scs_m_1.objs[1-1]=this.STEP["define"-1]; scs_m_1.objs[2-1]=OUT_f("define"); scs_m_1.objs[3-1]=scicos_link(); scs_m_1.objs[4-1]=scicos_link(); @@ -74,9 +74,9 @@ spath[$+1-1]=path[k-1]; } xx=arg1[spath-1]; execstr("xxn="+xx.gui+"(\'set\',xx)"); -if (diffobjs(xxn,xx)) { +if (diffobjs(this.xxn,xx)) { model=xx.model; -model_n=xxn.model; +model_n=this.xxn.model; if (!is_modelica_block(xx)) { modified=or(model.sim!=model_n.sim)||!isequal(model.state,model_n.state)||!isequal(model.dstate,model_n.dstate)||!isequal(model.rpar,model_n.rpar)||!isequal(model.ipar,model_n.ipar)||!isequal(model.label,model_n.label); if (or(model.in1!=model_n.in1)||or(model.out!=model_n.out)) { @@ -96,7 +96,7 @@ needcompile=4; if ((model.nzcross!=model_n.nzcross)||(model.nmode!=model_n.nmode)) { needcompile=4; } -if (prod[size(model_n.sim)-1]>1) { +if (prod(size(model_n.sim))>1) { if (model_n.sim[2-1]>1000) { if (model.sim[1-1]!=model_n.sim[1-1]) { needcompile=4; @@ -111,7 +111,7 @@ if (or(eq.model!=eqn.model)||or(eq.inputs!=eqn.inputs)||or(eq.outputs!=eqn.outpu needcompile=4; } } -arg1[spath-1]=xxn; +arg1[spath-1]=this.xxn; newpar[size(newpar)+1-1]=path; } } diff --git a/js/Sources/STEP_FUNCTION.pickle b/js/Sources/STEP_FUNCTION.pickle new file mode 100644 index 00000000..8ecebb29 --- /dev/null +++ b/js/Sources/STEP_FUNCTION.pickle @@ -0,0 +1,11 @@ +c__builtin__ +set +p0 +((lp1 +S'STEP' +p2 +aS'xxn' +p3 +atp4 +Rp5 +.
\ No newline at end of file diff --git a/js/Sources/SampleCLK.pickle b/js/Sources/SampleCLK.pickle new file mode 100644 index 00000000..154645d8 --- /dev/null +++ b/js/Sources/SampleCLK.pickle @@ -0,0 +1,7 @@ +c__builtin__ +set +p0 +((lp1 +tp2 +Rp3 +.
\ No newline at end of file diff --git a/js/Sources/Sigbuilder.js b/js/Sources/Sigbuilder.js index b2c05ea8..47782cfb 100644 --- a/js/Sources/Sigbuilder.js +++ b/js/Sources/Sigbuilder.js @@ -28,7 +28,7 @@ break; } } newpar=list(); -y=0; +this.y=0; for (path in ppath) { np=size(path,"*"); spath=list(); @@ -40,9 +40,9 @@ spath[$+1-1]=path[k-1]; } xx=arg1[spath-1]; execstr("xxn="+xx.gui+"(\'set\',xx)"); -if (diffobjs(xxn,xx)) { +if (diffobjs(this.xxn,xx)) { model=xx.model; -model_n=xxn.model; +model_n=this.xxn.model; if (!is_modelica_block(xx)) { modified=or(model.sim!=model_n.sim)||!isequal(model.state,model_n.state)||!isequal(model.dstate,model_n.dstate)||!isequal(model.odstate,model_n.odstate)||!isequal(model.rpar,model_n.rpar)||!isequal(model.ipar,model_n.ipar)||!isequal(model.opar,model_n.opar)||!isequal(model.label,model_n.label); if (or(model.in1!=model_n.in1)||or(model.out!=model_n.out)||or(model.in2!=model_n.in2)||or(model.out2!=model_n.out2)||or(model.outtyp!=model_n.outtyp)||or(model.intyp!=model_n.intyp)) { @@ -65,7 +65,7 @@ needcompile=4; if ((model.nzcross!=model_n.nzcross)||(model.nmode!=model_n.nmode)) { needcompile=4; } -if (prod[size(model_n.sim)-1]>1) { +if (prod(size(model_n.sim))>1) { if (model_n.sim[2-1]>1000) { if (model.sim[1-1]!=model_n.sim[1-1]) { needcompile=4; @@ -80,9 +80,9 @@ if (or(eq.model!=eqn.model)||or(eq.inputs!=eqn.inputs)||or(eq.outputs!=eqn.outpu needcompile=4; } } -arg1[spath-1]=xxn; +arg1[spath-1]=this.xxn; newpar[size(newpar)+1-1]=path; -y=max(y,needcompile); +this.y=max(this.y,needcompile); } } x=arg1; diff --git a/js/Sources/Sigbuilder.pickle b/js/Sources/Sigbuilder.pickle new file mode 100644 index 00000000..52400405 --- /dev/null +++ b/js/Sources/Sigbuilder.pickle @@ -0,0 +1,17 @@ +c__builtin__ +set +p0 +((lp1 +S'y' +p2 +aS'order' +p3 +aS'ORDER2' +p4 +aS'xxn' +p5 +aS'N' +p6 +atp7 +Rp8 +.
\ No newline at end of file diff --git a/js/Sources/TIME_f.pickle b/js/Sources/TIME_f.pickle new file mode 100644 index 00000000..154645d8 --- /dev/null +++ b/js/Sources/TIME_f.pickle @@ -0,0 +1,7 @@ +c__builtin__ +set +p0 +((lp1 +tp2 +Rp3 +.
\ No newline at end of file diff --git a/js/Sources/TKSCALE.pickle b/js/Sources/TKSCALE.pickle new file mode 100644 index 00000000..154645d8 --- /dev/null +++ b/js/Sources/TKSCALE.pickle @@ -0,0 +1,7 @@ +c__builtin__ +set +p0 +((lp1 +tp2 +Rp3 +.
\ No newline at end of file |