summaryrefslogtreecommitdiff
path: root/js/Events
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/Events
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/Events')
-rw-r--r--js/Events/END_c.js10
-rw-r--r--js/Events/END_c.pickle8
-rw-r--r--js/Events/EVTDLY_c.js18
-rw-r--r--js/Events/EVTDLY_c.pickle8
-rw-r--r--js/Events/EVTDLY_f.js18
-rw-r--r--js/Events/EVTDLY_f.pickle8
-rw-r--r--js/Events/EVTGEN_f.js12
-rw-r--r--js/Events/EVTGEN_f.pickle6
-rw-r--r--js/Events/EVTVARDLY.js4
-rw-r--r--js/Events/EVTVARDLY.pickle8
-rw-r--r--js/Events/HALT_f.js8
-rw-r--r--js/Events/HALT_f.pickle6
-rw-r--r--js/Events/IFTHEL_f.js18
-rw-r--r--js/Events/IFTHEL_f.pickle8
-rw-r--r--js/Events/MFCLCK_f.js16
-rw-r--r--js/Events/MFCLCK_f.pickle8
-rw-r--r--js/Events/M_freq.js14
-rw-r--r--js/Events/M_freq.pickle10
-rw-r--r--js/Events/freq_div.pickle8
19 files changed, 114 insertions, 82 deletions
diff --git a/js/Events/END_c.js b/js/Events/END_c.js
index 26041f2a..d0ff0d9b 100644
--- a/js/Events/END_c.js
+++ b/js/Events/END_c.js
@@ -1,15 +1,15 @@
/* autogenerated from "macros/Events/END_c.sci" */
function END_c() {
END_c.prototype.define = function END_c() {
- tf = 100000000;
+ this.tf = 100000000;
model = scicos_model();
model.sim = list("scicosexit",4);
model.evtin = 1;
model.evtout = 1;
- model.firing = tf;
+ model.firing = this.tf;
model.blocktype = "d";
model.dep_ut = [false,false];
- exprs = string(tf);
+ exprs = string(this.tf);
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -25,13 +25,13 @@ function END_c() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,tf,exprs] = scicos_getvalue("Set final simulation time",["Final simulation time"],list("vec",1),exprs);
+ [ok,this.tf,exprs] = scicos_getvalue("Set final simulation time",["Final simulation time"],list("vec",1),exprs);
if (!ok) {
break;
}
if (ok) {
graphics.exprs = exprs;
- model.firing = tf;
+ model.firing = this.tf;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Events/END_c.pickle b/js/Events/END_c.pickle
index 0d1dde24..b83057e2 100644
--- a/js/Events/END_c.pickle
+++ b/js/Events/END_c.pickle
@@ -2,8 +2,10 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'tf'
p2
-atp3
-Rp4
+aS'x'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Events/EVTDLY_c.js b/js/Events/EVTDLY_c.js
index 1fae97ea..2579a9e7 100644
--- a/js/Events/EVTDLY_c.js
+++ b/js/Events/EVTDLY_c.js
@@ -1,17 +1,17 @@
/* autogenerated from "macros/Events/EVTDLY_c.sci" */
function EVTDLY_c() {
EVTDLY_c.prototype.define = function EVTDLY_c() {
- dt = 0.1;
- ff = 0.0;
+ this.dt = 0.1;
+ this.ff = 0.0;
model = scicos_model();
model.sim = list("evtdly4",4);
model.evtin = 1;
model.evtout = 1;
- model.rpar = [[dt],[ff]];
+ model.rpar = [[this.dt],[this.ff]];
model.blocktype = "d";
- model.firing = ff;
+ model.firing = this.ff;
model.dep_ut = [false,false];
- exprs = [[string(dt)],[sci2exp(ff)]];
+ exprs = [[string(this.dt)],[sci2exp(this.ff)]];
gr_i = [];
this.x = standard_define([3,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -27,18 +27,18 @@ function EVTDLY_c() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,dt,ff,exprs] = scicos_getvalue([["Set Event Delay block parameters"],["Delay is the delay between an input event "],[" and the generated output event"],["Block may initially generate an output event before "],[" any input event. \"Date of initial output event\""],[" gives the date of this event. Set a negative value"],[" to disable any output event."]],[["Delay"],["Date of initial output event"]],list("vec",1,"vec",1),exprs);
+ [ok,this.dt,this.ff,exprs] = scicos_getvalue([["Set Event Delay block parameters"],["Delay is the delay between an input event "],[" and the generated output event"],["Block may initially generate an output event before "],[" any input event. \"Date of initial output event\""],[" gives the date of this event. Set a negative value"],[" to disable any output event."]],[["Delay"],["Date of initial output event"]],list("vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- if (dt<=0) {
+ if (this.dt<=0) {
message("Delay must be positive");
ok = false;
}
if (ok) {
graphics.exprs = exprs;
- model.rpar = [[dt],[ff]];
- model.firing = ff;
+ model.rpar = [[this.dt],[this.ff]];
+ model.firing = this.ff;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Events/EVTDLY_c.pickle b/js/Events/EVTDLY_c.pickle
index 0d1dde24..c7aedd0b 100644
--- a/js/Events/EVTDLY_c.pickle
+++ b/js/Events/EVTDLY_c.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'dt'
+p3
+aS'ff'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Events/EVTDLY_f.js b/js/Events/EVTDLY_f.js
index 010d429b..d0a9cf99 100644
--- a/js/Events/EVTDLY_f.js
+++ b/js/Events/EVTDLY_f.js
@@ -1,17 +1,17 @@
/* autogenerated from "macros/Events/EVTDLY_f.sci" */
function EVTDLY_f() {
EVTDLY_f.prototype.define = function EVTDLY_f() {
- dt = 0.1;
- ff = dt;
+ this.dt = 0.1;
+ this.ff = this.dt;
model = scicos_model();
model.sim = "evtdly";
model.evtin = 1;
model.evtout = 1;
- model.rpar = dt;
+ model.rpar = this.dt;
model.blocktype = "d";
- model.firing = ff;
+ model.firing = this.ff;
model.dep_ut = [false,false];
- exprs = [[string(dt)],[sci2exp(ff)]];
+ exprs = [[string(this.dt)],[sci2exp(this.ff)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -27,18 +27,18 @@ function EVTDLY_f() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,dt,ff,exprs] = scicos_getvalue([["Set Event Delay block parameters"],["Delay is the delay between an input event "],[" and the generated output event"],["Block may initially generate an output event before "],[" any input event. \"Date of initial output event\""],[" gives the date of this event. Set a negative value"],[" if no initial event required"]],[["Delay"],["Date of initial output event"]],list("vec",1,"vec",1),exprs);
+ [ok,this.dt,this.ff,exprs] = scicos_getvalue([["Set Event Delay block parameters"],["Delay is the delay between an input event "],[" and the generated output event"],["Block may initially generate an output event before "],[" any input event. \"Date of initial output event\""],[" gives the date of this event. Set a negative value"],[" if no initial event required"]],[["Delay"],["Date of initial output event"]],list("vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- if (dt<=0) {
+ if (this.dt<=0) {
message("Delay must be positive");
ok = false;
}
if (ok) {
graphics.exprs = exprs;
- model.rpar = dt;
- model.firing = ff;
+ model.rpar = this.dt;
+ model.firing = this.ff;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Events/EVTDLY_f.pickle b/js/Events/EVTDLY_f.pickle
index 0d1dde24..c7aedd0b 100644
--- a/js/Events/EVTDLY_f.pickle
+++ b/js/Events/EVTDLY_f.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'dt'
+p3
+aS'ff'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Events/EVTGEN_f.js b/js/Events/EVTGEN_f.js
index 804c5a0c..361a1529 100644
--- a/js/Events/EVTGEN_f.js
+++ b/js/Events/EVTGEN_f.js
@@ -1,14 +1,14 @@
/* autogenerated from "macros/Events/EVTGEN_f.sci" */
function EVTGEN_f() {
EVTGEN_f.prototype.define = function EVTGEN_f() {
- tt = 0;
+ this.tt = 0;
model = scicos_model();
model.sim = "trash";
model.evtout = 1;
model.blocktype = "d";
- model.firing = tt;
+ model.firing = this.tt;
model.dep_ut = [false,false];
- exprs = string(tt);
+ exprs = string(this.tt);
gr_i = [];
this.x = standard_define([3,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -24,13 +24,13 @@ function EVTGEN_f() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,tt,exprs] = scicos_getvalue("Set Event time",["Event Time"],list("vec",1),exprs);
+ [ok,this.tt,exprs] = scicos_getvalue("Set Event time",["Event Time"],list("vec",1),exprs);
if (!ok) {
break;
}
graphics.exprs = exprs;
- if (model.firing!=tt) {
- model.firing = tt;
+ if (model.firing!=this.tt) {
+ model.firing = this.tt;
}
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Events/EVTGEN_f.pickle b/js/Events/EVTGEN_f.pickle
index 0d1dde24..4b394121 100644
--- a/js/Events/EVTGEN_f.pickle
+++ b/js/Events/EVTGEN_f.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'tt'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Events/EVTVARDLY.js b/js/Events/EVTVARDLY.js
index 57e9cc92..a86b6ab2 100644
--- a/js/Events/EVTVARDLY.js
+++ b/js/Events/EVTVARDLY.js
@@ -26,12 +26,12 @@ function EVTVARDLY() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,fir,exprs] = scicos_getvalue("Set parameter of variable event delay","Initial event firing time (<0 if absent)",list("vec",1),exprs);
+ [ok,this.fir,exprs] = scicos_getvalue("Set parameter of variable event delay","Initial event firing time (<0 if absent)",list("vec",1),exprs);
if (!ok) {
break;
}
graphics.exprs = exprs;
- model.firing = fir;
+ model.firing = this.fir;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Events/EVTVARDLY.pickle b/js/Events/EVTVARDLY.pickle
index 0d1dde24..33f74726 100644
--- a/js/Events/EVTVARDLY.pickle
+++ b/js/Events/EVTVARDLY.pickle
@@ -2,8 +2,10 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'fir'
p2
-atp3
-Rp4
+aS'x'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Events/HALT_f.js b/js/Events/HALT_f.js
index 408678a0..d9e2d28d 100644
--- a/js/Events/HALT_f.js
+++ b/js/Events/HALT_f.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Events/HALT_f.sci" */
function HALT_f() {
HALT_f.prototype.define = function HALT_f() {
- n = 0;
+ this.n = 0;
model = scicos_model();
model.sim = "hltblk";
model.evtin = 1;
@@ -9,7 +9,7 @@ function HALT_f() {
model.ipar = 0;
model.blocktype = "d";
model.dep_ut = [false,false];
- exprs = string(n);
+ exprs = string(this.n);
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -25,13 +25,13 @@ function HALT_f() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,n,exprs] = scicos_getvalue("Set Halt block parameters",["State on halt"],list("vec",1),exprs);
+ [ok,this.n,exprs] = scicos_getvalue("Set Halt block parameters",["State on halt"],list("vec",1),exprs);
if (!ok) {
break;
}
if (ok) {
graphics.exprs = exprs;
- model.ipar = n;
+ model.ipar = this.n;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Events/HALT_f.pickle b/js/Events/HALT_f.pickle
index 0d1dde24..464ee4ce 100644
--- a/js/Events/HALT_f.pickle
+++ b/js/Events/HALT_f.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'n'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Events/IFTHEL_f.js b/js/Events/IFTHEL_f.js
index 5dd2d712..b99577ec 100644
--- a/js/Events/IFTHEL_f.js
+++ b/js/Events/IFTHEL_f.js
@@ -35,24 +35,24 @@ function IFTHEL_f() {
exprs[2-1] = string(1);
}
while (true) {
- [ok,inh,nmod,exprs] = scicos_getvalue("Set parameters",[["Inherit (1: no, 0: yes)"],["zero-crossing (0: no, 1: yes)"]],list("vec",1,"vec",1),exprs);
+ [ok,this.inh,this.nmod,exprs] = scicos_getvalue("Set parameters",[["Inherit (1: no, 0: yes)"],["zero-crossing (0: no, 1: yes)"]],list("vec",1,"vec",1),exprs);
if (!ok) {
break;
}
model.dep_ut = [true,false];
- if (nmod!=0) {
- nmod = 1;
+ if (this.nmod!=0) {
+ this.nmod = 1;
}
- if (inh!=1) {
- inh = [];
+ if (this.inh!=1) {
+ this.inh = [];
}
- [model,graphics,ok] = check_io(model,graphics,1,[],inh,[[1],[1]]);
+ [model,graphics,ok] = check_io(model,graphics,1,[],this.inh,[[1],[1]]);
if (ok) {
graphics.exprs = exprs;
- model.evtin = inh;
+ model.evtin = this.inh;
model.sim[2-1] = -1;
- model.nmode = nmod;
- model.nzcross = nmod;
+ model.nmode = this.nmod;
+ model.nzcross = this.nmod;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Events/IFTHEL_f.pickle b/js/Events/IFTHEL_f.pickle
index 0d1dde24..8dc8965a 100644
--- a/js/Events/IFTHEL_f.pickle
+++ b/js/Events/IFTHEL_f.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'inh'
+p3
+aS'nmod'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Events/MFCLCK_f.js b/js/Events/MFCLCK_f.js
index 517bf43c..4330cafe 100644
--- a/js/Events/MFCLCK_f.js
+++ b/js/Events/MFCLCK_f.js
@@ -1,19 +1,19 @@
/* autogenerated from "macros/Events/MFCLCK_f.sci" */
function MFCLCK_f() {
MFCLCK_f.prototype.define = function MFCLCK_f() {
- nn = 2;
- dt = 0.1;
+ this.nn = 2;
+ this.dt = 0.1;
model = scicos_model();
model.sim = "mfclck";
model.evtin = 1;
model.evtout = [[1],[1]];
model.dstate = 0;
- model.rpar = dt;
- model.ipar = nn;
+ model.rpar = this.dt;
+ model.ipar = this.nn;
model.blocktype = "d";
model.firing = [-1,0];
model.dep_ut = [false,false];
- exprs = [[string(dt)],[string(nn)]];
+ exprs = [[string(this.dt)],[string(this.nn)]];
gr_i = [];
this.x = standard_define([3,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -28,10 +28,10 @@ function MFCLCK_f() {
graphics = arg1.graphics;
exprs = graphics.exprs;
model = arg1.model;
- [ok,dt,nn,exprs] = scicos_getvalue("Set Multifrequency clock parameters",[["basic period (1/f)"],["multiply by (n)"]],list("vec",1,"vec",1),exprs);
+ [ok,this.dt,this.nn,exprs] = scicos_getvalue("Set Multifrequency clock parameters",[["basic period (1/f)"],["multiply by (n)"]],list("vec",1,"vec",1),exprs);
if (ok) {
- model.ipar = nn;
- model.rpar = dt;
+ model.ipar = this.nn;
+ model.rpar = this.dt;
hh = model.firing;
hh[2-1] = 0;
model.firing = hh;
diff --git a/js/Events/MFCLCK_f.pickle b/js/Events/MFCLCK_f.pickle
index 0d1dde24..2d9860f5 100644
--- a/js/Events/MFCLCK_f.pickle
+++ b/js/Events/MFCLCK_f.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'dt'
+p3
+aS'nn'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Events/M_freq.js b/js/Events/M_freq.js
index 9b42b389..b5990283 100644
--- a/js/Events/M_freq.js
+++ b/js/Events/M_freq.js
@@ -26,24 +26,24 @@ function M_freq() {
model = arg1.model;
exprs = graphics.exprs;
while (true) {
- [ok,frequ,offset,exprs] = scicos_getvalue("Set block parameters",[["Sample time"],["Offset"]],list("vec",-1,"vec",-1),exprs);
+ [ok,this.frequ,this.offset,exprs] = scicos_getvalue("Set block parameters",[["Sample time"],["Offset"]],list("vec",-1,"vec",-1),exprs);
if (!ok) {
break;
}
- offset = offset.slice();
- frequ = frequ.slice();
- if ((size(frequ,"*"))!=(size(offset,"*"))) {
+ this.offset = this.offset.slice();
+ this.frequ = this.frequ.slice();
+ if ((size(this.frequ,"*"))!=(size(this.offset,"*"))) {
message("offset and frequency must have the same size");
ok = false;
- } else if (or(frequ<0)) {
+ } else if (or(this.frequ<0)) {
message("Frequency must be a positif number");
ok = false;
- } else if (or(abs(offset)>frequ)) {
+ } else if (or(abs(this.offset)>this.frequ)) {
message("The |Offset| must be less than the Frequency");
ok = false;
}
if (ok) {
- [m,den,off,count,m1,fir,frequ,offset,ok] = mfrequ_clk(frequ,offset);
+ [m,den,off,count,m1,fir,this.frequ,this.offset,ok] = mfrequ_clk(this.frequ,this.offset);
}
if (ok) {
model.opar = list(m,double(den),off,count);
diff --git a/js/Events/M_freq.pickle b/js/Events/M_freq.pickle
index 0bdf24af..7b8e31da 100644
--- a/js/Events/M_freq.pickle
+++ b/js/Events/M_freq.pickle
@@ -4,10 +4,14 @@ p0
((lp1
S'x'
p2
-aS'fr'
+aS'frequ'
p3
aS'of'
p4
-atp5
-Rp6
+aS'fr'
+p5
+aS'offset'
+p6
+atp7
+Rp8
. \ No newline at end of file
diff --git a/js/Events/freq_div.pickle b/js/Events/freq_div.pickle
index 0d1dde24..af4590e3 100644
--- a/js/Events/freq_div.pickle
+++ b/js/Events/freq_div.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'%df'
+p3
+aS'%ph'
+p4
+atp5
+Rp6
. \ No newline at end of file