summaryrefslogtreecommitdiff
path: root/js/Events
diff options
context:
space:
mode:
Diffstat (limited to 'js/Events')
-rw-r--r--js/Events/ANDBLK.js1
-rw-r--r--js/Events/ANDLOG_f.js1
-rw-r--r--js/Events/CLKSOMV_f.js1
-rw-r--r--js/Events/CLKSOM_f.js1
-rw-r--r--js/Events/CLKSPLIT_f.js1
-rw-r--r--js/Events/END_c.js3
-rw-r--r--js/Events/EVTDLY_c.js3
-rw-r--r--js/Events/EVTDLY_f.js3
-rw-r--r--js/Events/EVTGEN_f.js3
-rw-r--r--js/Events/EVTVARDLY.js5
-rw-r--r--js/Events/EVTVARDLY.pickle26
-rw-r--r--js/Events/HALT_f.js3
-rw-r--r--js/Events/IFTHEL_f.js7
-rw-r--r--js/Events/IFTHEL_f.pickle66
-rw-r--r--js/Events/MCLOCK_f.js5
-rw-r--r--js/Events/MFCLCK_f.js3
-rw-r--r--js/Events/M_freq.js3
-rw-r--r--js/Events/VirtualCLK0.js1
-rw-r--r--js/Events/freq_div.js7
19 files changed, 50 insertions, 93 deletions
diff --git a/js/Events/ANDBLK.js b/js/Events/ANDBLK.js
index e98bb7ec..8a270c17 100644
--- a/js/Events/ANDBLK.js
+++ b/js/Events/ANDBLK.js
@@ -76,7 +76,6 @@ function ANDBLK() {
return options;
}
ANDBLK.prototype.set = function ANDBLK() {
- this.x = arg1;
return new BasicBlock(this.x);
}
}
diff --git a/js/Events/ANDLOG_f.js b/js/Events/ANDLOG_f.js
index 57909073..447c5063 100644
--- a/js/Events/ANDLOG_f.js
+++ b/js/Events/ANDLOG_f.js
@@ -21,7 +21,6 @@ function ANDLOG_f() {
return options;
}
ANDLOG_f.prototype.set = function ANDLOG_f() {
- this.x = arg1;
return new BasicBlock(this.x);
}
}
diff --git a/js/Events/CLKSOMV_f.js b/js/Events/CLKSOMV_f.js
index 4eefd652..2535c6ff 100644
--- a/js/Events/CLKSOMV_f.js
+++ b/js/Events/CLKSOMV_f.js
@@ -21,7 +21,6 @@ function CLKSOMV_f() {
return options;
}
CLKSOMV_f.prototype.set = function CLKSOMV_f() {
- this.x = arg1;
return new BasicBlock(this.x);
}
}
diff --git a/js/Events/CLKSOM_f.js b/js/Events/CLKSOM_f.js
index 0c561a9d..766a2f00 100644
--- a/js/Events/CLKSOM_f.js
+++ b/js/Events/CLKSOM_f.js
@@ -21,7 +21,6 @@ function CLKSOM_f() {
return options;
}
CLKSOM_f.prototype.set = function CLKSOM_f() {
- this.x = arg1;
return new BasicBlock(this.x);
}
}
diff --git a/js/Events/CLKSPLIT_f.js b/js/Events/CLKSPLIT_f.js
index 477c849d..8611e847 100644
--- a/js/Events/CLKSPLIT_f.js
+++ b/js/Events/CLKSPLIT_f.js
@@ -20,7 +20,6 @@ function CLKSPLIT_f() {
return options;
}
CLKSPLIT_f.prototype.set = function CLKSPLIT_f() {
- this.x = arg1;
return new BasicBlock(this.x);
}
}
diff --git a/js/Events/END_c.js b/js/Events/END_c.js
index 107988e7..98c39318 100644
--- a/js/Events/END_c.js
+++ b/js/Events/END_c.js
@@ -26,10 +26,7 @@ function END_c() {
END_c.prototype.set = function END_c() {
this.tf = parseFloat(arguments[0]["tf"])
this.exprs = arguments[0]["exprs"]
- this.x = arg1;
- this.graphics = arg1.graphics;
this.exprs = this.graphics.exprs;
- this.model = arg1.model;
while (true) {
[ok,this.tf,this.exprs] = scicos_getvalue("Set final simulation time",["Final simulation time"],list("vec",1),this.exprs);
if (!ok) {
diff --git a/js/Events/EVTDLY_c.js b/js/Events/EVTDLY_c.js
index f3bf27b8..871a83f4 100644
--- a/js/Events/EVTDLY_c.js
+++ b/js/Events/EVTDLY_c.js
@@ -30,10 +30,7 @@ function EVTDLY_c() {
this.dt = parseFloat(arguments[0]["dt"])
this.ff = parseFloat(arguments[0]["ff"])
this.exprs = arguments[0]["exprs"]
- this.x = arg1;
- this.graphics = arg1.graphics;
this.exprs = this.graphics.exprs;
- this.model = arg1.model;
while (true) {
[ok,this.dt,this.ff,this.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),this.exprs);
if (!ok) {
diff --git a/js/Events/EVTDLY_f.js b/js/Events/EVTDLY_f.js
index b3e8f166..21dce7f6 100644
--- a/js/Events/EVTDLY_f.js
+++ b/js/Events/EVTDLY_f.js
@@ -30,10 +30,7 @@ function EVTDLY_f() {
this.dt = parseFloat(arguments[0]["dt"])
this.ff = parseFloat(arguments[0]["ff"])
this.exprs = arguments[0]["exprs"]
- this.x = arg1;
- this.graphics = arg1.graphics;
this.exprs = this.graphics.exprs;
- this.model = arg1.model;
while (true) {
[ok,this.dt,this.ff,this.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),this.exprs);
if (!ok) {
diff --git a/js/Events/EVTGEN_f.js b/js/Events/EVTGEN_f.js
index 297b0784..7080757c 100644
--- a/js/Events/EVTGEN_f.js
+++ b/js/Events/EVTGEN_f.js
@@ -25,10 +25,7 @@ function EVTGEN_f() {
EVTGEN_f.prototype.set = function EVTGEN_f() {
this.tt = parseFloat(arguments[0]["tt"])
this.exprs = arguments[0]["exprs"]
- this.x = arg1;
- this.graphics = arg1.graphics;
this.exprs = this.graphics.exprs;
- this.model = arg1.model;
while (true) {
[ok,this.tt,this.exprs] = scicos_getvalue("Set Event time",["Event Time"],list("vec",1),this.exprs);
if (!ok) {
diff --git a/js/Events/EVTVARDLY.js b/js/Events/EVTVARDLY.js
index 8b95fda9..364b4be4 100644
--- a/js/Events/EVTVARDLY.js
+++ b/js/Events/EVTVARDLY.js
@@ -3,7 +3,7 @@ function EVTVARDLY() {
EVTVARDLY.prototype.define = function EVTVARDLY() {
this.model = scicos_model();
this.model.sim = list(new ScilabString(["evtvardly"]), new ScilabDouble([4]));
- this.model.in1 = new ScilabDouble([1]);
+ this.model.in = new ScilabDouble([1]);
this.model.evtin = new ScilabDouble([1]);
this.model.evtout = new ScilabDouble([1]);
this.model.blocktype = new ScilabString(["d"]);
@@ -26,10 +26,7 @@ function EVTVARDLY() {
EVTVARDLY.prototype.set = function EVTVARDLY() {
this.fir = arguments[0]["fir"]
this.exprs = arguments[0]["exprs"]
- this.x = arg1;
- this.graphics = arg1.graphics;
this.exprs = this.graphics.exprs;
- this.model = arg1.model;
while (true) {
[ok,this.fir,this.exprs] = scicos_getvalue("Set parameter of variable event delay","Initial event firing time (<0 if absent)",list("vec",1),this.exprs);
if (!ok) {
diff --git a/js/Events/EVTVARDLY.pickle b/js/Events/EVTVARDLY.pickle
index 06641b49..388357c2 100644
--- a/js/Events/EVTVARDLY.pickle
+++ b/js/Events/EVTVARDLY.pickle
@@ -21,7 +21,7 @@ S'model.sim'
p1
S'list'
p2
-sS'model.in1'
+sS'model.evtout'
p3
S'double'
p4
@@ -37,28 +37,28 @@ p8
g7
sS'graphics.exprs'
p9
-NsS'model.evtout'
+NsS'model.dep_ut'
p10
-g4
-sS'model.dep_ut'
-p11
S'vector'
-p12
+p11
sS'exprs'
-p13
+p12
S'string'
-p14
+p13
sS'x.model'
-p15
+p14
NsS'gr_i'
+p15
+g11
+sS'model.in'
p16
-g12
+g4
sS'graphics'
p17
g7
sS'y'
p18
-g12
+g11
sS'x'
p19
g4
@@ -67,11 +67,11 @@ p20
g7
sS'typ'
p21
-g12
+g11
sS'model.firing'
p22
g4
sS'model.blocktype'
p23
-g14
+g13
s. \ No newline at end of file
diff --git a/js/Events/HALT_f.js b/js/Events/HALT_f.js
index 18a45667..f1b8662b 100644
--- a/js/Events/HALT_f.js
+++ b/js/Events/HALT_f.js
@@ -26,10 +26,7 @@ function HALT_f() {
HALT_f.prototype.set = function HALT_f() {
this.n = parseFloat(arguments[0]["n"])
this.exprs = arguments[0]["exprs"]
- this.x = arg1;
- this.graphics = arg1.graphics;
this.exprs = this.graphics.exprs;
- this.model = arg1.model;
while (true) {
[ok,this.n,this.exprs] = scicos_getvalue("Set Halt block parameters",["State on halt"],list("vec",1),this.exprs);
if (!ok) {
diff --git a/js/Events/IFTHEL_f.js b/js/Events/IFTHEL_f.js
index e489695e..952bbe7e 100644
--- a/js/Events/IFTHEL_f.js
+++ b/js/Events/IFTHEL_f.js
@@ -3,7 +3,7 @@ function IFTHEL_f() {
IFTHEL_f.prototype.define = function IFTHEL_f() {
this.model = scicos_model();
this.model.sim = list(new ScilabString(["ifthel"]), new ScilabDouble([-1]));
- this.model.in1 = new ScilabDouble([1]);
+ this.model.in = new ScilabDouble([1]);
this.model.in2 = new ScilabDouble([1]);
this.model.intyp = new ScilabDouble([-1]);
this.model.evtin = new ScilabDouble([1]);
@@ -14,7 +14,7 @@ function IFTHEL_f() {
this.model.nmode = new ScilabDouble([1]);
this.model.nzcross = new ScilabDouble([1]);
this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"IFTHEL_f\",sz(1),sz(2));"]);
- this.exprs = [[string(this.model.in1)],[string(this.model.nmode)]];
+ this.exprs = [[string(this.model.in)],[string(this.model.nmode)]];
this.x = standard_define([3,3],this.model,this.exprs,this.gr_i);
return new BasicBlock(this.x);
}
@@ -32,10 +32,7 @@ function IFTHEL_f() {
this.inh = inverse(arguments[0]["inh"])
this.nmod = parseFloat(arguments[0]["nmod"])
this.exprs = arguments[0]["exprs"]
- this.x = arg1;
- this.graphics = arg1.graphics;
this.exprs = this.graphics.exprs;
- this.model = arg1.model;
if (this.exprs==[]) {
this.exprs = string(1);
}
diff --git a/js/Events/IFTHEL_f.pickle b/js/Events/IFTHEL_f.pickle
index d83faa7a..b9315ab4 100644
--- a/js/Events/IFTHEL_f.pickle
+++ b/js/Events/IFTHEL_f.pickle
@@ -28,77 +28,77 @@ p3
g2
sS'x.model'
p4
-NsS'model.intyp'
+NsS'inh'
p5
-S'double'
+S'vector'
p6
-sS'inh'
+sS'nmod'
p7
-S'vector'
+S'double'
p8
-sS'nmod'
-p9
-g6
sS'model.in2'
+p9
+g8
+sS'model.intyp'
p10
-g6
-sS'model.in1'
-p11
-g6
+g8
sS'x.graphics'
-p12
+p11
g2
sS'typ'
+p12
+g6
+sS'model.evtin'
p13
g8
-sS'model.evtin'
-p14
-g6
sS'exprs[2-1]'
-p15
+p14
S'string'
-p16
+p15
sS'model.firing'
-p17
-g8
+p16
+g6
sS'model.sim'
-p18
+p17
S'list'
-p19
+p18
sS'model.evtout'
-p20
+p19
S'matrix'
-p21
+p20
sS'model.nmode'
+p21
+g8
+sS'model.in'
p22
-g6
+g8
sS'graphics.exprs'
p23
-g16
+g15
sS'model.nzcross'
p24
-g6
+g8
sS'model.blocktype'
p25
-g16
+g15
sS'model.sim[2-1]'
p26
-g6
+g8
sS'model.dep_ut'
p27
-g8
+g6
sS'exprs'
p28
-g21
+g20
sS'gr_i'
p29
-g8
+g6
sS'y'
p30
-g8
+g6
sS'x'
p31
-g6
+g8
sS'model'
p32
g2
diff --git a/js/Events/MCLOCK_f.js b/js/Events/MCLOCK_f.js
index 564d5370..14fed50b 100644
--- a/js/Events/MCLOCK_f.js
+++ b/js/Events/MCLOCK_f.js
@@ -78,8 +78,6 @@ function MCLOCK_f() {
return options;
}
MCLOCK_f.prototype.set = function MCLOCK_f() {
- for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
- var o = arg1.model.rpar.objs[i-1];
if (typeof(o)=="Block"&&o.gui=="MFCLCK_f") {
var path = i;
break;
@@ -87,13 +85,10 @@ function MCLOCK_f() {
}
var newpar = list();
var spath = list("model","rpar","objs",path);
- var xx = arg1[spath-1];
execstr("xxn="+xx.gui+"(\'set\',xx)");
if (or(this.xxn!=xx)) {
- arg1[spath-1] = this.xxn;
newpar[size(newpar)+1-1] = path;
}
- this.x = arg1;
var y = 0;
var typ = newpar;
return new BasicBlock(this.x);
diff --git a/js/Events/MFCLCK_f.js b/js/Events/MFCLCK_f.js
index 3836c88e..89a580df 100644
--- a/js/Events/MFCLCK_f.js
+++ b/js/Events/MFCLCK_f.js
@@ -32,10 +32,7 @@ function MFCLCK_f() {
this.dt = parseFloat(arguments[0]["dt"])
this.nn = parseFloat(arguments[0]["nn"])
this.exprs = arguments[0]["exprs"]
- this.x = arg1;
- this.graphics = arg1.graphics;
this.exprs = this.graphics.exprs;
- this.model = arg1.model;
[ok,this.dt,this.nn,this.exprs] = scicos_getvalue("Set Multifrequency clock parameters",["basic period (1/f)","multiply by (n)"],list("vec",1,"vec",1),this.exprs);
if (ok) {
this.model.ipar = new ScilabDouble([this.nn]);
diff --git a/js/Events/M_freq.js b/js/Events/M_freq.js
index 36cb2254..e3a33535 100644
--- a/js/Events/M_freq.js
+++ b/js/Events/M_freq.js
@@ -29,9 +29,6 @@ function M_freq() {
this.frequ = inverse(arguments[0]["frequ"])
this.offset = inverse(arguments[0]["offset"])
this.exprs = arguments[0]["exprs"]
- this.x = arg1;
- this.graphics = arg1.graphics;
- this.model = arg1.model;
this.exprs = this.graphics.exprs;
while (true) {
[ok,this.frequ,this.offset,this.exprs] = scicos_getvalue("Set block parameters",["Sample time","Offset"],list("vec",-1,"vec",-1),this.exprs);
diff --git a/js/Events/VirtualCLK0.js b/js/Events/VirtualCLK0.js
index 50b68b16..85cc3d75 100644
--- a/js/Events/VirtualCLK0.js
+++ b/js/Events/VirtualCLK0.js
@@ -22,7 +22,6 @@ function VirtualCLK0() {
return options;
}
VirtualCLK0.prototype.set = function VirtualCLK0() {
- this.x = arg1;
return new BasicBlock(this.x);
}
}
diff --git a/js/Events/freq_div.js b/js/Events/freq_div.js
index d49a8486..01cc316e 100644
--- a/js/Events/freq_div.js
+++ b/js/Events/freq_div.js
@@ -121,8 +121,6 @@ function freq_div() {
%ph = parseFloat(arguments[0]["%ph"])
%df = parseFloat(arguments[0]["%df"])
this.exprs = inverse(arguments[0]["exprs"])
- for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
- var o = arg1.model.rpar.objs[i-1];
if (typeof(o)=="Block"&&o.gui=="Modulo_Count") {
var path = i;
break;
@@ -135,7 +133,6 @@ function freq_div() {
spath[$+1-1] = "rpar";
spath[$+1-1] = "objs";
spath[$+1-1] = path;
- var xx = arg1[spath-1];
var xxn = xx;
this.graphics = xx.graphics;
this.exprs = this.graphics.exprs;
@@ -166,7 +163,7 @@ function freq_div() {
var model_n = xxn.model;
if (!is_modelica_block(xx)) {
var modified = or(this.model.sim!=model_n.sim)||!isequal(this.model.state,model_n.state)||!isequal(this.model.dstate,model_n.dstate)||!isequal(this.model.rpar,model_n.rpar)||!isequal(this.model.ipar,model_n.ipar)||!isequal(this.model.label,model_n.label);
- if (or(this.model.in1!=model_n.in1)||or(this.model.out!=model_n.out)) {
+ if (or(this.model.in!=model_n.in)||or(this.model.out!=model_n.out)) {
var needcompile = 1;
}
if (or(this.model.firing!=model_n.firing)) {
@@ -198,11 +195,9 @@ function freq_div() {
var needcompile = 4;
}
}
- arg1[spath-1] = xxn;
newpar[size(newpar)+1-1] = 1;
var y = max(y,needcompile);
}
- this.x = arg1;
var typ = newpar;
return new BasicBlock(this.x);
}