diff options
author | Sunil Shetye | 2018-06-16 02:25:21 +0530 |
---|---|---|
committer | Sunil Shetye | 2018-06-16 02:25:21 +0530 |
commit | 1c39ed809c3870b5922bf9b66938b6346eeaa318 (patch) | |
tree | 42312190d9bf7092d1232359647f387b31828238 /js/Events | |
parent | ca2285f5d4f7acbd4b19ea4d8d685b3d21db0743 (diff) | |
download | sci2js-1c39ed809c3870b5922bf9b66938b6346eeaa318.tar.gz sci2js-1c39ed809c3870b5922bf9b66938b6346eeaa318.tar.bz2 sci2js-1c39ed809c3870b5922bf9b66938b6346eeaa318.zip |
support numbers of format 1.0d10
Diffstat (limited to 'js/Events')
-rw-r--r-- | js/Events/ANDBLK.js | 77 | ||||
-rw-r--r-- | js/Events/MCLOCK_f.js | 96 |
2 files changed, 169 insertions, 4 deletions
diff --git a/js/Events/ANDBLK.js b/js/Events/ANDBLK.js index 380a7d3e..f6fe020e 100644 --- a/js/Events/ANDBLK.js +++ b/js/Events/ANDBLK.js @@ -1,3 +1,76 @@ -Syntax error in input LexToken(ASSIGNMENT,'=',1,2555) /* autogenerated from "macros/Events/ANDBLK.sci" */ -None +function ANDBLK() { +ANDBLK.prototype.get = function ANDBLK() { +} +ANDBLK.prototype.set = function ANDBLK() { +x=arg1; +} +ANDBLK.prototype.define = function ANDBLK() { +andlog=ANDLOG_f("define"); +andlog.graphics.orig=[194,133]; +andlog.graphics.sz=[60,60]; +andlog.graphics.flip=true; +andlog.graphics.pout=9; +andlog.graphics.pein=[4,11]; +input_port1=CLKIN_f("define"); +input_port1.graphics.orig=[149,287]; +input_port1.graphics.sz=[20,20]; +input_port1.graphics.flip=true; +input_port1.graphics.exprs="1"; +input_port1.graphics.peout=4; +input_port1.model.ipar=1; +output_port=CLKOUT_f("define"); +output_port.graphics.orig=[450,83]; +output_port.graphics.sz=[20,20]; +output_port.graphics.flip=true; +output_port.graphics.exprs="1"; +output_port.graphics.pein=8; +output_port.model.ipar=1; +input_port2=CLKIN_f("define"); +input_port2.graphics.orig=[141,330]; +input_port2.graphics.sz=[20,20]; +input_port2.graphics.flip=true; +input_port2.graphics.exprs="2"; +input_port2.graphics.peout=6; +input_port2.model.ipar=2; +ifthel=IFTHEL_f("define"); +ifthel.graphics.orig=[331,137]; +ifthel.graphics.sz=[60,60]; +ifthel.graphics.flip=true; +ifthel.graphics.pin=9; +ifthel.graphics.pein=12; +ifthel.graphics.peout=[8,0]; +split=CLKSPLIT_f("define"); +split.graphics.orig=[234,275.78348]; +split.graphics.pein=6; +split.graphics.peout=[11,12]; +diagram=scicos_diagram(); +diagram.objs[1-1]=andlog; +diagram.objs[2-1]=input_port1; +diagram.objs[3-1]=output_port; +diagram.objs[4-1]=scicos_link(xx=[169,214,214],yy=[297,297,198.71],ct=[5,-1],from=[2,1],to=[1,1]); +diagram.objs[5-1]=input_port2; +diagram.objs[6-1]=scicos_link(xx=[161,234,234],yy=[340,340,275.78],ct=[5,-1],from=[5,1],to=[10,1]); +diagram.objs[7-1]=ifthel; +diagram.objs[8-1]=scicos_link(xx=[351,351,450],yy=[131.29,93,93],ct=[5,-1],from=[7,1],to=[3,1]); +diagram.objs[9-1]=scicos_link(xx=[262.57,322.43],yy=[163,167],ct=[1,1],from=[1,1],to=[7,1]); +diagram.objs[10-1]=split; +diagram.objs[11-1]=scicos_link(xx=[234,234],yy=[275.78,198.71],ct=[5,-1],from=[10,1],to=[1,2]); +diagram.objs[12-1]=scicos_link(xx=[234,361,361],yy=[275.78,275.78,202.71],ct=[5,-1],from=[10,2],to=[7,1]); +x=scicos_block(); +x.gui="ANDBLK"; +x.graphics.sz=[2,2]; +x.graphics.gr_i=[]; +x.graphics.pein=[0,0]; +x.graphics.peout=0; +x.model.sim="csuper"; +x.model.evtin=[1,1]; +x.model.evtout=1; +x.model.blocktype="h"; +x.model.firing=None; +x.model.dep_ut=[None,None]; +x.model.rpar=diagram; +} +ANDBLK.prototype.details = function ANDBLK() { +} +} diff --git a/js/Events/MCLOCK_f.js b/js/Events/MCLOCK_f.js index a455e0e7..10706233 100644 --- a/js/Events/MCLOCK_f.js +++ b/js/Events/MCLOCK_f.js @@ -1,3 +1,95 @@ -Syntax error in input LexToken(ASSIGNMENT,'=',1,3309) /* autogenerated from "macros/Events/MCLOCK_f.sci" */ -None +function MCLOCK_f() { +MCLOCK_f.prototype.get = function MCLOCK_f() { +} +MCLOCK_f.prototype.set = function MCLOCK_f() { +for(i=1;i<=length(arg1.model.rpar.objs);i+=1) { +o=arg1.model.rpar.objs(i); +if (typeof(o)=="Block"&&o.gui=="MFCLCK_f") { +path=i; +break +} +} +newpar=list(); +spath=list("model","rpar","objs",path); +xx=arg1(spath); +execstr("xxn="+xx.gui+"(\'set\',xx)"); +if (or(xxn!=xx)) { +arg1[spath-1]=xxn; +newpar[size(newpar)+1-1]=path; +} +x=arg1; +y=0; +typ=newpar; +} +MCLOCK_f.prototype.define = function MCLOCK_f() { +nn=2; +dt=0.1; +exprs=[string(dt),string(nn)]; +mfclck=MFCLCK_f("define"); +mfclck.graphics.orig=[334,199]; +mfclck.graphics.sz=[40,40]; +mfclck.graphics.flip=true; +mfclck.graphics.exprs=exprs; +mfclck.graphics.pein=12; +mfclck.graphics.peout=[4,3]; +mfclck.model.rpar=0.1; +mfclck.model.ipar=nn; +mfclck.model.firing=[-1,0]; +clksom=CLKSOM_f("define"); +clksom.graphics.orig=[457,161]; +clksom.graphics.sz=[16.666667,16.666667]; +clksom.graphics.flip=true; +clksom.graphics.exprs=["0.1","0.1"]; +clksom.graphics.pein=[4,9,0]; +clksom.graphics.peout=5; +output_port1=CLKOUT_f("define"); +output_port1.graphics.orig=[509,261]; +output_port1.graphics.sz=[20,20]; +output_port1.graphics.flip=true; +output_port1.graphics.exprs="1"; +output_port1.graphics.pein=10; +output_port1.model.ipar=1; +output_port2=CLKOUT_f("define"); +output_port2.graphics.orig=[509,142]; +output_port2.graphics.sz=[20,20]; +output_port2.graphics.flip=true; +output_port2.graphics.exprs="2"; +output_port2.graphics.pein=13; +output_port2.model.ipar=2; +split1=CLKSPLIT_f("define"); +split1.graphics.orig=[411.92504,169.33333]; +split1.graphics.pein=3; +split1.graphics.peout=[9,10]; +split2=CLKSPLIT_f("define"); +split2.graphics.orig=[482.45315,169.33333]; +split2.graphics.pein=5; +split2.graphics.peout=[12,13]; +gr_i=[]; +diagram=scicos_diagram(); +diagram.objs[1-1]=mfclck; +diagram.objs[2-1]=clksom; +diagram.objs[3-1]=scicos_link(xx=[360.7,360.7,411.9],yy=[193.3,169.3,169.3],ct=[10,-1],from=[1,2],to=[8,1]); +diagram.objs[4-1]=scicos_link(xx=[347.3,347.3,461.8,461.8],yy=[193.3,155.5,155.5,161],ct=[10,-1],from=[1,1],to=[2,1]); +diagram.objs[5-1]=scicos_link(xx=[468.9,482.5],yy=[169.3,169.3],ct=[10,-1],from=[2,1],to=[11,1]); +diagram.objs[6-1]=output_port1; +diagram.objs[7-1]=output_port2; +diagram.objs[8-1]=split1; +diagram.objs[9-1]=scicos_link(xx=[411.9,457],yy=[169.3,169.3],ct=[10,-1],from=[8,1],to=[2,2]); +diagram.objs[10-1]=scicos_link(xx=[411.9,411.9,509],yy=[169.3,271,271],ct=[10,-1],from=[8,2],to=[6,1]); +diagram.objs[11-1]=split2; +diagram.objs[12-1]=scicos_link(xx=[482.5,489.6,489.6,354,354],yy=[169.3,169.3,338.3,338.3,244.7],ct=[10,-1],from=[11,1],to=[1,1]); +diagram.objs[13-1]=scicos_link(xx=[482.4,482.4,509],yy=[169.3,152,152],ct=[10,-1],from=[11,2],to=[7,1]); +x=scicos_block(); +x.gui="MCLOCK_f"; +x.graphics.sz=[3,2]; +x.graphics.gr_i=gr_i; +x.model.sim="csuper"; +x.model.evtout=[1,1]; +x.model.blocktype="h"; +x.model.rpar=diagram; +x.graphics.peout=[0,0]; +} +MCLOCK_f.prototype.details = function MCLOCK_f() { +} +} |