summaryrefslogtreecommitdiff
path: root/js/Events
diff options
context:
space:
mode:
authorSunil Shetye2018-07-09 11:43:39 +0530
committerSunil Shetye2018-07-09 12:16:25 +0530
commit62b1d7dd9183ed75733b44104890586b03818214 (patch)
tree9859e9ca295df98df945bd5fcccc3a264e8bede1 /js/Events
parent5c011853630a1b466ef4789d5b600dd530d0a3ec (diff)
downloadsci2js-62b1d7dd9183ed75733b44104890586b03818214.tar.gz
sci2js-62b1d7dd9183ed75733b44104890586b03818214.tar.bz2
sci2js-62b1d7dd9183ed75733b44104890586b03818214.zip
support ScilabBoolean, ScilabDouble, ScilabString
Diffstat (limited to 'js/Events')
-rw-r--r--js/Events/ANDLOG_f.js16
-rw-r--r--js/Events/ANDLOG_f.pickle6
-rw-r--r--js/Events/CLKSOMV_f.js16
-rw-r--r--js/Events/CLKSOMV_f.pickle6
-rw-r--r--js/Events/CLKSOM_f.js16
-rw-r--r--js/Events/CLKSOM_f.pickle6
-rw-r--r--js/Events/CLKSPLIT_f.js16
-rw-r--r--js/Events/CLKSPLIT_f.pickle6
-rw-r--r--js/Events/END_c.js22
-rw-r--r--js/Events/END_c.pickle6
-rw-r--r--js/Events/EVTDLY_c.js26
-rw-r--r--js/Events/EVTDLY_c.pickle10
-rw-r--r--js/Events/EVTDLY_f.js26
-rw-r--r--js/Events/EVTDLY_f.pickle10
-rw-r--r--js/Events/EVTGEN_f.js22
-rw-r--r--js/Events/EVTGEN_f.pickle8
-rw-r--r--js/Events/EVTVARDLY.js28
-rw-r--r--js/Events/EVTVARDLY.pickle6
-rw-r--r--js/Events/HALT_f.js22
-rw-r--r--js/Events/HALT_f.pickle8
-rw-r--r--js/Events/IFTHEL_f.js44
-rw-r--r--js/Events/IFTHEL_f.pickle26
-rw-r--r--js/Events/MFCLCK_f.js34
-rw-r--r--js/Events/MFCLCK_f.pickle10
-rw-r--r--js/Events/M_freq.js30
-rw-r--r--js/Events/M_freq.pickle16
-rw-r--r--js/Events/VirtualCLK0.js18
-rw-r--r--js/Events/VirtualCLK0.pickle6
-rw-r--r--js/Events/freq_div.js72
-rw-r--r--js/Events/freq_div.pickle10
30 files changed, 289 insertions, 259 deletions
diff --git a/js/Events/ANDLOG_f.js b/js/Events/ANDLOG_f.js
index 8e71e1d9..31deaa17 100644
--- a/js/Events/ANDLOG_f.js
+++ b/js/Events/ANDLOG_f.js
@@ -1,15 +1,15 @@
/* autogenerated from "macros/Events/ANDLOG_f.sci" */
function ANDLOG_f() {
ANDLOG_f.prototype.define = function ANDLOG_f() {
- model = scicos_model();
- model.sim = "andlog";
- model.out = 1;
- model.evtin = [[1],[1]];
- model.blocktype = "d";
- model.firing = [];
- model.dep_ut = [false,false];
+ this.model = scicos_model();
+ this.model.sim = new ScilabString("andlog");
+ this.model.out = new ScilabDouble(1);
+ this.model.evtin = [[1],[1]];
+ this.model.blocktype = new ScilabString("d");
+ this.model.firing = [];
+ this.model.dep_ut = [false,false];
gr_i = [];
- this.x = standard_define([3,3],model,[],gr_i);
+ this.x = standard_define([3,3],this.model,[],gr_i);
return new BasicBlock(this.x);
}
ANDLOG_f.prototype.details = function ANDLOG_f() {
diff --git a/js/Events/ANDLOG_f.pickle b/js/Events/ANDLOG_f.pickle
index 497f51ed..27c4e0b1 100644
--- a/js/Events/ANDLOG_f.pickle
+++ b/js/Events/ANDLOG_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/Events/CLKSOMV_f.js b/js/Events/CLKSOMV_f.js
index baea70e3..093e9ece 100644
--- a/js/Events/CLKSOMV_f.js
+++ b/js/Events/CLKSOMV_f.js
@@ -1,15 +1,15 @@
/* autogenerated from "macros/Events/CLKSOMV_f.sci" */
function CLKSOMV_f() {
CLKSOMV_f.prototype.define = function CLKSOMV_f() {
- model = scicos_model();
- model.sim = "sum";
- model.evtin = [[1],[1],[1]];
- model.evtout = 1;
- model.blocktype = "d";
- model.firing = -1;
- model.dep_ut = [false,false];
+ this.model = scicos_model();
+ this.model.sim = new ScilabString("sum");
+ this.model.evtin = [[1],[1],[1]];
+ this.model.evtout = new ScilabDouble(1);
+ this.model.blocktype = new ScilabString("d");
+ this.model.firing = new ScilabDouble(-1);
+ this.model.dep_ut = [false,false];
gr_i = [];
- this.x = standard_define([2,2],model,[],gr_i);
+ this.x = standard_define([2,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
CLKSOMV_f.prototype.details = function CLKSOMV_f() {
diff --git a/js/Events/CLKSOMV_f.pickle b/js/Events/CLKSOMV_f.pickle
index 8958249b..b77c7073 100644
--- a/js/Events/CLKSOMV_f.pickle
+++ b/js/Events/CLKSOMV_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/Events/CLKSOM_f.js b/js/Events/CLKSOM_f.js
index 74a102a3..2f2c9c3b 100644
--- a/js/Events/CLKSOM_f.js
+++ b/js/Events/CLKSOM_f.js
@@ -1,15 +1,15 @@
/* autogenerated from "macros/Events/CLKSOM_f.sci" */
function CLKSOM_f() {
CLKSOM_f.prototype.define = function CLKSOM_f() {
- model = scicos_model();
- model.sim = "sum";
- model.evtin = [[1],[1],[1]];
- model.evtout = 1;
- model.blocktype = "d";
- model.firing = -1;
- model.dep_ut = [false,false];
+ this.model = scicos_model();
+ this.model.sim = new ScilabString("sum");
+ this.model.evtin = [[1],[1],[1]];
+ this.model.evtout = new ScilabDouble(1);
+ this.model.blocktype = new ScilabString("d");
+ this.model.firing = new ScilabDouble(-1);
+ this.model.dep_ut = [false,false];
gr_i = [];
- this.x = standard_define([1,1]/1.2,model,[],gr_i);
+ this.x = standard_define([1,1]/1.2,this.model,[],gr_i);
return new BasicBlock(this.x);
}
CLKSOM_f.prototype.details = function CLKSOM_f() {
diff --git a/js/Events/CLKSOM_f.pickle b/js/Events/CLKSOM_f.pickle
index 8958249b..b77c7073 100644
--- a/js/Events/CLKSOM_f.pickle
+++ b/js/Events/CLKSOM_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/Events/CLKSPLIT_f.js b/js/Events/CLKSPLIT_f.js
index b16b6b61..222bd91f 100644
--- a/js/Events/CLKSPLIT_f.js
+++ b/js/Events/CLKSPLIT_f.js
@@ -1,14 +1,14 @@
/* autogenerated from "macros/Events/CLKSPLIT_f.sci" */
function CLKSPLIT_f() {
CLKSPLIT_f.prototype.define = function CLKSPLIT_f() {
- model = scicos_model();
- model.sim = "split";
- model.evtin = 1;
- model.evtout = [[1],[1]];
- model.blocktype = "d";
- model.firing = [false,false,false];
- model.dep_ut = [false,false];
- this.x = standard_define([1,1]/3,model,[],[]);
+ this.model = scicos_model();
+ this.model.sim = new ScilabString("split");
+ this.model.evtin = new ScilabDouble(1);
+ this.model.evtout = [[1],[1]];
+ this.model.blocktype = new ScilabString("d");
+ this.model.firing = [false,false,false];
+ this.model.dep_ut = [false,false];
+ this.x = standard_define([1,1]/3,this.model,[],[]);
return new BasicBlock(this.x);
}
CLKSPLIT_f.prototype.details = function CLKSPLIT_f() {
diff --git a/js/Events/CLKSPLIT_f.pickle b/js/Events/CLKSPLIT_f.pickle
index 8d8dc46f..1c54c2e8 100644
--- a/js/Events/CLKSPLIT_f.pickle
+++ b/js/Events/CLKSPLIT_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/Events/END_c.js b/js/Events/END_c.js
index c9d0dec4..ec7627e1 100644
--- a/js/Events/END_c.js
+++ b/js/Events/END_c.js
@@ -2,16 +2,16 @@
function END_c() {
END_c.prototype.define = function END_c() {
this.tf = 100000000;
- model = scicos_model();
- model.sim = list("scicosexit",4);
- model.evtin = 1;
- model.evtout = 1;
- model.firing = this.tf;
- model.blocktype = "d";
- model.dep_ut = [false,false];
+ this.model = scicos_model();
+ this.model.sim = list("scicosexit",4);
+ this.model.evtin = new ScilabDouble(1);
+ this.model.evtout = new ScilabDouble(1);
+ this.model.firing = new ScilabDouble(this.tf);
+ this.model.blocktype = new ScilabString("d");
+ this.model.dep_ut = [false,false];
exprs = string(this.tf);
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);
}
END_c.prototype.details = function END_c() {
@@ -28,7 +28,7 @@ function END_c() {
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
- model = arg1.model;
+ this.model = arg1.model;
while (true) {
[ok,this.tf,exprs] = scicos_getvalue("Set final simulation time",["Final simulation time"],list("vec",1),exprs);
if (!ok) {
@@ -36,9 +36,9 @@ function END_c() {
}
if (ok) {
graphics.exprs = exprs;
- model.firing = this.tf;
+ this.model.firing = new ScilabDouble(this.tf);
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}
diff --git a/js/Events/END_c.pickle b/js/Events/END_c.pickle
index 98f3289d..84e9ac57 100644
--- a/js/Events/END_c.pickle
+++ b/js/Events/END_c.pickle
@@ -6,8 +6,10 @@ S'tf'
p2
aS'x'
p3
-atp4
-Rp5
+aS'model'
+p4
+atp5
+Rp6
.(dp0
S'model.sim'
p1
diff --git a/js/Events/EVTDLY_c.js b/js/Events/EVTDLY_c.js
index 75989e4e..8d659cdc 100644
--- a/js/Events/EVTDLY_c.js
+++ b/js/Events/EVTDLY_c.js
@@ -3,17 +3,17 @@ function EVTDLY_c() {
EVTDLY_c.prototype.define = function EVTDLY_c() {
this.dt = 0.1;
this.ff = 0.0;
- model = scicos_model();
- model.sim = list("evtdly4",4);
- model.evtin = 1;
- model.evtout = 1;
- model.rpar = [[this.dt],[this.ff]];
- model.blocktype = "d";
- model.firing = this.ff;
- model.dep_ut = [false,false];
+ this.model = scicos_model();
+ this.model.sim = list("evtdly4",4);
+ this.model.evtin = new ScilabDouble(1);
+ this.model.evtout = new ScilabDouble(1);
+ this.model.rpar = [[this.dt],[this.ff]];
+ this.model.blocktype = new ScilabString("d");
+ this.model.firing = new ScilabDouble(this.ff);
+ this.model.dep_ut = [false,false];
exprs = [[string(this.dt)],[sci2exp(this.ff)]];
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);
}
EVTDLY_c.prototype.details = function EVTDLY_c() {
@@ -32,7 +32,7 @@ function EVTDLY_c() {
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
- model = arg1.model;
+ this.model = arg1.model;
while (true) {
[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) {
@@ -44,10 +44,10 @@ function EVTDLY_c() {
}
if (ok) {
graphics.exprs = exprs;
- model.rpar = [[this.dt],[this.ff]];
- model.firing = this.ff;
+ this.model.rpar = [[this.dt],[this.ff]];
+ this.model.firing = new ScilabDouble(this.ff);
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}
diff --git a/js/Events/EVTDLY_c.pickle b/js/Events/EVTDLY_c.pickle
index 722994a2..cc0b23ac 100644
--- a/js/Events/EVTDLY_c.pickle
+++ b/js/Events/EVTDLY_c.pickle
@@ -4,12 +4,14 @@ p0
((lp1
S'x'
p2
-aS'dt'
+aS'model'
p3
-aS'ff'
+aS'dt'
p4
-atp5
-Rp6
+aS'ff'
+p5
+atp6
+Rp7
.(dp0
S'model.sim'
p1
diff --git a/js/Events/EVTDLY_f.js b/js/Events/EVTDLY_f.js
index 6086f551..80e0455b 100644
--- a/js/Events/EVTDLY_f.js
+++ b/js/Events/EVTDLY_f.js
@@ -3,17 +3,17 @@ function EVTDLY_f() {
EVTDLY_f.prototype.define = function EVTDLY_f() {
this.dt = 0.1;
this.ff = this.dt;
- model = scicos_model();
- model.sim = "evtdly";
- model.evtin = 1;
- model.evtout = 1;
- model.rpar = this.dt;
- model.blocktype = "d";
- model.firing = this.ff;
- model.dep_ut = [false,false];
+ this.model = scicos_model();
+ this.model.sim = new ScilabString("evtdly");
+ this.model.evtin = new ScilabDouble(1);
+ this.model.evtout = new ScilabDouble(1);
+ this.model.rpar = new ScilabDouble(this.dt);
+ this.model.blocktype = new ScilabString("d");
+ this.model.firing = new ScilabDouble(this.ff);
+ this.model.dep_ut = [false,false];
exprs = [[string(this.dt)],[sci2exp(this.ff)]];
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);
}
EVTDLY_f.prototype.details = function EVTDLY_f() {
@@ -32,7 +32,7 @@ function EVTDLY_f() {
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
- model = arg1.model;
+ this.model = arg1.model;
while (true) {
[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) {
@@ -44,10 +44,10 @@ function EVTDLY_f() {
}
if (ok) {
graphics.exprs = exprs;
- model.rpar = this.dt;
- model.firing = this.ff;
+ this.model.rpar = new ScilabDouble(this.dt);
+ this.model.firing = new ScilabDouble(this.ff);
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}
diff --git a/js/Events/EVTDLY_f.pickle b/js/Events/EVTDLY_f.pickle
index dff4286c..9668c749 100644
--- a/js/Events/EVTDLY_f.pickle
+++ b/js/Events/EVTDLY_f.pickle
@@ -4,12 +4,14 @@ p0
((lp1
S'x'
p2
-aS'dt'
+aS'model'
p3
-aS'ff'
+aS'dt'
p4
-atp5
-Rp6
+aS'ff'
+p5
+atp6
+Rp7
.(dp0
S'model.sim'
p1
diff --git a/js/Events/EVTGEN_f.js b/js/Events/EVTGEN_f.js
index 88f22b4a..4bb35f72 100644
--- a/js/Events/EVTGEN_f.js
+++ b/js/Events/EVTGEN_f.js
@@ -2,15 +2,15 @@
function EVTGEN_f() {
EVTGEN_f.prototype.define = function EVTGEN_f() {
this.tt = 0;
- model = scicos_model();
- model.sim = "trash";
- model.evtout = 1;
- model.blocktype = "d";
- model.firing = this.tt;
- model.dep_ut = [false,false];
+ this.model = scicos_model();
+ this.model.sim = new ScilabString("trash");
+ this.model.evtout = new ScilabDouble(1);
+ this.model.blocktype = new ScilabString("d");
+ this.model.firing = new ScilabDouble(this.tt);
+ this.model.dep_ut = [false,false];
exprs = string(this.tt);
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);
}
EVTGEN_f.prototype.details = function EVTGEN_f() {
@@ -27,18 +27,18 @@ function EVTGEN_f() {
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
- model = arg1.model;
+ this.model = arg1.model;
while (true) {
[ok,this.tt,exprs] = scicos_getvalue("Set Event time",["Event Time"],list("vec",1),exprs);
if (!ok) {
break;
}
graphics.exprs = exprs;
- if (model.firing!=this.tt) {
- model.firing = this.tt;
+ if (this.model.firing!=this.tt) {
+ this.model.firing = new ScilabDouble(this.tt);
}
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
return new BasicBlock(this.x);
diff --git a/js/Events/EVTGEN_f.pickle b/js/Events/EVTGEN_f.pickle
index d2e715ce..b39db62c 100644
--- a/js/Events/EVTGEN_f.pickle
+++ b/js/Events/EVTGEN_f.pickle
@@ -4,10 +4,12 @@ p0
((lp1
S'x'
p2
-aS'tt'
+aS'model'
p3
-atp4
-Rp5
+aS'tt'
+p4
+atp5
+Rp6
.(dp0
S'model.sim'
p1
diff --git a/js/Events/EVTVARDLY.js b/js/Events/EVTVARDLY.js
index 8ec13eb1..5d66c02e 100644
--- a/js/Events/EVTVARDLY.js
+++ b/js/Events/EVTVARDLY.js
@@ -1,18 +1,18 @@
/* autogenerated from "macros/Events/EVTVARDLY.sci" */
function EVTVARDLY() {
EVTVARDLY.prototype.define = function EVTVARDLY() {
- model = scicos_model();
- model.sim = list("evtvardly",4);
- model.in1 = 1;
- model.evtin = 1;
- model.evtout = 1;
- model.blocktype = "d";
- model.firing = -1;
- model.blocktype = "c";
- model.dep_ut = [true,false];
- exprs = string(model.firing);
+ this.model = scicos_model();
+ this.model.sim = list("evtvardly",4);
+ this.model.in1 = new ScilabDouble(1);
+ this.model.evtin = new ScilabDouble(1);
+ this.model.evtout = new ScilabDouble(1);
+ this.model.blocktype = new ScilabString("d");
+ this.model.firing = new ScilabDouble(-1);
+ this.model.blocktype = new ScilabString("c");
+ this.model.dep_ut = [true,false];
+ exprs = string(this.model.firing);
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);
}
EVTVARDLY.prototype.details = function EVTVARDLY() {
@@ -28,16 +28,16 @@ function EVTVARDLY() {
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
- model = arg1.model;
+ this.model = arg1.model;
while (true) {
[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 = this.fir;
+ this.model.firing = new ScilabDouble(this.fir);
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
return new BasicBlock(this.x);
diff --git a/js/Events/EVTVARDLY.pickle b/js/Events/EVTVARDLY.pickle
index 62147d8d..107dea5b 100644
--- a/js/Events/EVTVARDLY.pickle
+++ b/js/Events/EVTVARDLY.pickle
@@ -6,8 +6,10 @@ S'fir'
p2
aS'x'
p3
-atp4
-Rp5
+aS'model'
+p4
+atp5
+Rp6
.(dp0
S'model.sim'
p1
diff --git a/js/Events/HALT_f.js b/js/Events/HALT_f.js
index 91f1f1dd..efea87ed 100644
--- a/js/Events/HALT_f.js
+++ b/js/Events/HALT_f.js
@@ -2,16 +2,16 @@
function HALT_f() {
HALT_f.prototype.define = function HALT_f() {
this.n = 0;
- model = scicos_model();
- model.sim = "hltblk";
- model.evtin = 1;
- model.dstate = 0;
- model.ipar = 0;
- model.blocktype = "d";
- model.dep_ut = [false,false];
+ this.model = scicos_model();
+ this.model.sim = new ScilabString("hltblk");
+ this.model.evtin = new ScilabDouble(1);
+ this.model.dstate = new ScilabDouble(0);
+ this.model.ipar = new ScilabDouble(0);
+ this.model.blocktype = new ScilabString("d");
+ this.model.dep_ut = [false,false];
exprs = 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);
}
HALT_f.prototype.details = function HALT_f() {
@@ -28,7 +28,7 @@ function HALT_f() {
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
- model = arg1.model;
+ this.model = arg1.model;
while (true) {
[ok,this.n,exprs] = scicos_getvalue("Set Halt block parameters",["State on halt"],list("vec",1),exprs);
if (!ok) {
@@ -36,9 +36,9 @@ function HALT_f() {
}
if (ok) {
graphics.exprs = exprs;
- model.ipar = this.n;
+ this.model.ipar = new ScilabDouble(this.n);
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}
diff --git a/js/Events/HALT_f.pickle b/js/Events/HALT_f.pickle
index 0d272b1c..eea3c5a5 100644
--- a/js/Events/HALT_f.pickle
+++ b/js/Events/HALT_f.pickle
@@ -4,10 +4,12 @@ p0
((lp1
S'x'
p2
-aS'n'
+aS'model'
p3
-atp4
-Rp5
+aS'n'
+p4
+atp5
+Rp6
.(dp0
S'model.sim'
p1
diff --git a/js/Events/IFTHEL_f.js b/js/Events/IFTHEL_f.js
index 0f74c9f1..ad55f013 100644
--- a/js/Events/IFTHEL_f.js
+++ b/js/Events/IFTHEL_f.js
@@ -1,21 +1,21 @@
/* autogenerated from "macros/Events/IFTHEL_f.sci" */
function IFTHEL_f() {
IFTHEL_f.prototype.define = function IFTHEL_f() {
- model = scicos_model();
- model.sim = list("ifthel",-1);
- model.in1 = 1;
- model.in2 = 1;
- model.intyp = -1;
- model.evtin = 1;
- model.evtout = [[1],[1]];
- model.blocktype = "l";
- model.firing = [-1,-1];
- model.dep_ut = [true,false];
- model.nmode = 1;
- model.nzcross = 1;
+ this.model = scicos_model();
+ this.model.sim = list("ifthel",-1);
+ this.model.in1 = new ScilabDouble(1);
+ this.model.in2 = new ScilabDouble(1);
+ this.model.intyp = new ScilabDouble(-1);
+ this.model.evtin = new ScilabDouble(1);
+ this.model.evtout = [[1],[1]];
+ this.model.blocktype = new ScilabString("l");
+ this.model.firing = [-1,-1];
+ this.model.dep_ut = [true,false];
+ this.model.nmode = new ScilabDouble(1);
+ this.model.nzcross = new ScilabDouble(1);
gr_i = [];
- exprs = [[string(model.in1)],[string(model.nmode)]];
- this.x = standard_define([3,3],model,exprs,gr_i);
+ exprs = [[string(this.model.in1)],[string(this.model.nmode)]];
+ this.x = standard_define([3,3],this.model,exprs,gr_i);
return new BasicBlock(this.x);
}
IFTHEL_f.prototype.details = function IFTHEL_f() {
@@ -34,7 +34,7 @@ function IFTHEL_f() {
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
- model = arg1.model;
+ this.model = arg1.model;
if (exprs==[]) {
exprs = string(1);
}
@@ -46,22 +46,22 @@ function IFTHEL_f() {
if (!ok) {
break;
}
- model.dep_ut = [true,false];
+ this.model.dep_ut = [true,false];
if (this.nmod!=0) {
this.nmod = 1;
}
if (this.inh!=1) {
this.inh = [];
}
- [model,graphics,ok] = check_io(model,graphics,1,[],this.inh,[[1],[1]]);
+ [model,graphics,ok] = check_io(this.model,graphics,1,[],this.inh,[[1],[1]]);
if (ok) {
graphics.exprs = exprs;
- model.evtin = this.inh;
- model.sim[2-1] = -1;
- model.nmode = this.nmod;
- model.nzcross = this.nmod;
+ this.model.evtin = this.inh;
+ this.model.sim[('2', 'double')] = new ScilabDouble(-1);
+ this.model.nmode = new ScilabDouble(this.nmod);
+ this.model.nzcross = new ScilabDouble(this.nmod);
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}
diff --git a/js/Events/IFTHEL_f.pickle b/js/Events/IFTHEL_f.pickle
index 41611e51..ed2f956d 100644
--- a/js/Events/IFTHEL_f.pickle
+++ b/js/Events/IFTHEL_f.pickle
@@ -4,12 +4,14 @@ p0
((lp1
S'x'
p2
-aS'inh'
+aS'model'
p3
-aS'nmod'
+aS'inh'
p4
-atp5
-Rp6
+aS'nmod'
+p5
+atp6
+Rp7
.(dp0
S'arg1'
p1
@@ -60,24 +62,24 @@ sS'model.evtout'
p19
S'matrix'
p20
-sS'model.nmode'
+sS"model.sim[('2', 'double')]"
p21
g6
-sS'graphics.exprs'
+sS'model.nmode'
p22
+g6
+sS'graphics.exprs'
+p23
g16
sS'model.nzcross'
-p23
+p24
g6
sS'[model,graphics,ok]'
-p24
+p25
g6
sS'model.blocktype'
-p25
-g16
-sS'model.sim[2-1]'
p26
-g6
+g16
sS'model.dep_ut'
p27
g8
diff --git a/js/Events/MFCLCK_f.js b/js/Events/MFCLCK_f.js
index e3b49352..e529ebb3 100644
--- a/js/Events/MFCLCK_f.js
+++ b/js/Events/MFCLCK_f.js
@@ -3,19 +3,19 @@ function MFCLCK_f() {
MFCLCK_f.prototype.define = function MFCLCK_f() {
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 = this.dt;
- model.ipar = this.nn;
- model.blocktype = "d";
- model.firing = [-1,0];
- model.dep_ut = [false,false];
+ this.model = scicos_model();
+ this.model.sim = new ScilabString("mfclck");
+ this.model.evtin = new ScilabDouble(1);
+ this.model.evtout = [[1],[1]];
+ this.model.dstate = new ScilabDouble(0);
+ this.model.rpar = new ScilabDouble(this.dt);
+ this.model.ipar = new ScilabDouble(this.nn);
+ this.model.blocktype = new ScilabString("d");
+ this.model.firing = [-1,0];
+ this.model.dep_ut = [false,false];
exprs = [[string(this.dt)],[string(this.nn)]];
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);
}
MFCLCK_f.prototype.details = function MFCLCK_f() {
@@ -34,17 +34,17 @@ function MFCLCK_f() {
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
- model = arg1.model;
+ this.model = arg1.model;
[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 = this.nn;
- model.rpar = this.dt;
- hh = model.firing;
+ this.model.ipar = new ScilabDouble(this.nn);
+ this.model.rpar = new ScilabDouble(this.dt);
+ hh = this.model.firing;
hh[2-1] = 0;
- model.firing = hh;
+ this.model.firing = hh;
graphics.exprs = exprs;
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
}
return new BasicBlock(this.x);
}
diff --git a/js/Events/MFCLCK_f.pickle b/js/Events/MFCLCK_f.pickle
index cfe24411..ef1a472e 100644
--- a/js/Events/MFCLCK_f.pickle
+++ b/js/Events/MFCLCK_f.pickle
@@ -4,12 +4,14 @@ p0
((lp1
S'x'
p2
-aS'dt'
+aS'model'
p3
-aS'nn'
+aS'dt'
p4
-atp5
-Rp6
+aS'nn'
+p5
+atp6
+Rp7
.(dp0
S'model.dstate'
p1
diff --git a/js/Events/M_freq.js b/js/Events/M_freq.js
index 9d9d7da7..56413dab 100644
--- a/js/Events/M_freq.js
+++ b/js/Events/M_freq.js
@@ -1,18 +1,18 @@
/* autogenerated from "macros/Events/M_freq.sci" */
function M_freq() {
M_freq.prototype.define = function M_freq() {
- model = scicos_model();
- model.sim = list("m_frequ",4);
- model.evtout = [[1],[1],[1]];
- model.evtin = 1;
- model.rpar = [];
- model.opar = list([[1,1,0],[1,1,1],[1,3,2]],1,0,0);
- model.blocktype = "d";
- model.firing = [0,-1,-1];
- model.dep_ut = [false,false];
+ this.model = scicos_model();
+ this.model.sim = list("m_frequ",4);
+ this.model.evtout = [[1],[1],[1]];
+ this.model.evtin = new ScilabDouble(1);
+ this.model.rpar = [];
+ this.model.opar = list([[1,1,0],[1,1,1],[1,3,2]],1,0,0);
+ this.model.blocktype = new ScilabString("d");
+ this.model.firing = [0,-1,-1];
+ this.model.dep_ut = [false,false];
exprs = [[sci2exp([[1],[2]])],[sci2exp([[0],[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 BasicBlock(this.x);
}
M_freq.prototype.details = function M_freq() {
@@ -30,7 +30,7 @@ function M_freq() {
this.offset = inverse(arguments[0]["offset"])
this.x = arg1;
graphics = arg1.graphics;
- model = arg1.model;
+ this.model = arg1.model;
exprs = graphics.exprs;
while (true) {
[ok,this.frequ,this.offset,exprs] = scicos_getvalue("Set block parameters",["Sample time","Offset"],list("vec",-1,"vec",-1),exprs);
@@ -53,18 +53,18 @@ function M_freq() {
[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);
+ this.model.opar = list(m,double(den),off,count);
mn = (2^size(m1,"*"))-1;
- [model,graphics,ok] = set_io(model,graphics,list(),list(),1,ones(mn,1));
+ [model,graphics,ok] = set_io(this.model,graphics,list(),list(),1,ones(mn,1));
if (mn>3) {
graphics.sz = [40+(mn-3)*10,40];
} else {
graphics.sz = [50,40];
}
- model.firing = fir;
+ this.model.firing = new ScilabDouble(fir);
graphics.exprs = exprs;
this.x.graphics = graphics;
- this.x.model = model;
+ this.x.model = this.model;
break;
}
}
diff --git a/js/Events/M_freq.pickle b/js/Events/M_freq.pickle
index d7305484..22f23762 100644
--- a/js/Events/M_freq.pickle
+++ b/js/Events/M_freq.pickle
@@ -2,18 +2,20 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'fr'
p2
-aS'frequ'
-p3
aS'of'
+p3
+aS'frequ'
p4
-aS'fr'
-p5
aS'offset'
+p5
+aS'x'
p6
-atp7
-Rp8
+aS'model'
+p7
+atp8
+Rp9
.(dp0
S'arg1'
p1
diff --git a/js/Events/VirtualCLK0.js b/js/Events/VirtualCLK0.js
index 15757f71..f3040a9b 100644
--- a/js/Events/VirtualCLK0.js
+++ b/js/Events/VirtualCLK0.js
@@ -1,16 +1,16 @@
/* autogenerated from "macros/Events/VirtualCLK0.sci" */
function VirtualCLK0() {
VirtualCLK0.prototype.define = function VirtualCLK0() {
- model = scicos_model();
- model.sim = "vrtclk0";
- model.evtin = 1;
- model.opar = list();
- model.ipar = [];
- model.blocktype = "d";
- model.firing = -1;
- model.dep_ut = [false,false];
+ this.model = scicos_model();
+ this.model.sim = new ScilabString("vrtclk0");
+ this.model.evtin = new ScilabDouble(1);
+ this.model.opar = list();
+ this.model.ipar = [];
+ this.model.blocktype = new ScilabString("d");
+ this.model.firing = new ScilabDouble(-1);
+ this.model.dep_ut = [false,false];
exprs = [];
- this.x = standard_define([2,2],model,exprs," ");
+ this.x = standard_define([2,2],this.model,exprs," ");
return new BasicBlock(this.x);
}
VirtualCLK0.prototype.details = function VirtualCLK0() {
diff --git a/js/Events/VirtualCLK0.pickle b/js/Events/VirtualCLK0.pickle
index 2afe7018..4665ec16 100644
--- a/js/Events/VirtualCLK0.pickle
+++ b/js/Events/VirtualCLK0.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/Events/freq_div.js b/js/Events/freq_div.js
index 50719b16..ca64c706 100644
--- a/js/Events/freq_div.js
+++ b/js/Events/freq_div.js
@@ -14,61 +14,61 @@ function freq_div() {
scs_m_1.objs[10-1] = scicos_link();
blk = scs_m_1.objs[1-1];
graphics = blk.graphics;
- model = blk.model;
+ this.model = blk.model;
graphics.orig = [0,-100];
graphics.sz = [60,40];
graphics.exprs = [["0"],["3"]];
- model.dstate = 3;
- model.ipar = 3;
+ this.model.dstate = new ScilabDouble(3);
+ this.model.ipar = new ScilabDouble(3);
graphics.pout = 7;
graphics.pein = 10;
blk.graphics = graphics;
- blk.model = model;
+ blk.model = this.model;
scs_m_1.objs[1-1] = blk;
blk = scs_m_1.objs[2-1];
graphics = blk.graphics;
- model = blk.model;
+ this.model = blk.model;
graphics.orig = [120,0];
graphics.sz = [20,20];
graphics.exprs = ["1"];
- model.ipar = 1;
+ this.model.ipar = new ScilabDouble(1);
graphics.peout = 6;
blk.graphics = graphics;
- blk.model = model;
+ blk.model = this.model;
scs_m_1.objs[2-1] = blk;
blk = scs_m_1.objs[3-1];
graphics = blk.graphics;
- model = blk.model;
+ this.model = blk.model;
graphics.orig = [130,-160];
graphics.sz = [20,20];
graphics.exprs = ["1"];
- model.ipar = 1;
+ this.model.ipar = new ScilabDouble(1);
graphics.pein = 8;
blk.graphics = graphics;
- blk.model = model;
+ blk.model = this.model;
scs_m_1.objs[3-1] = blk;
blk = scs_m_1.objs[4-1];
graphics = blk.graphics;
- model = blk.model;
+ this.model = blk.model;
graphics.orig = [100,-100];
graphics.sz = [60,40];
graphics.exprs = [["1"],["0"]];
- model.ipar = 1;
+ this.model.ipar = new ScilabDouble(1);
graphics.pin = 7;
graphics.pein = 9;
graphics.peout = [[0],[8]];
blk.graphics = graphics;
- blk.model = model;
+ blk.model = this.model;
scs_m_1.objs[4-1] = blk;
blk = scs_m_1.objs[5-1];
graphics = blk.graphics;
- model = blk.model;
+ this.model = blk.model;
graphics.orig = [127,-33];
graphics.sz = [7,7];
graphics.pein = 6;
graphics.peout = [[9],[10]];
blk.graphics = graphics;
- blk.model = model;
+ blk.model = this.model;
scs_m_1.objs[5-1] = blk;
lnk = scs_m_1.objs[6-1];
lnk.ct = [5,-1];
@@ -98,13 +98,13 @@ function freq_div() {
scs_m_1.objs[10-1] = lnk;
blk={};
lnk={};
- model = scicos_model();
- model.sim = "csuper";
- model.evtin = 1;
- model.evtout = 1;
- model.rpar = scs_m_1;
+ this.model = scicos_model();
+ this.model.sim = new ScilabString("csuper");
+ this.model.evtin = new ScilabDouble(1);
+ this.model.evtout = new ScilabDouble(1);
+ this.model.rpar = scs_m_1;
gr_i = [];
- this.x = standard_define([3,2],model,[],gr_i);
+ this.x = standard_define([3,2],this.model,[],gr_i);
return new BasicBlock(this.x);
}
freq_div.prototype.details = function freq_div() {
@@ -138,7 +138,7 @@ function freq_div() {
xxn = xx;
graphics = xx.graphics;
exprs = graphics.exprs;
- model = xx.model;
+ this.model = xx.model;
while (true) {
[ok,%ph,%df,exprs] = scicos_getvalue("Set frequency division block parameters",["Phase (0 to division factor -1)","Division factor"],list("vec",1,"vec",1),exprs);
if (!ok) {
@@ -153,45 +153,45 @@ function freq_div() {
%ph = %df-1;
}
graphics.exprs = exprs;
- model.ipar = %df;
- model.dstate = %ph;
+ this.model.ipar = new ScilabDouble(%df);
+ this.model.dstate = new ScilabDouble(%ph);
xxn.graphics = graphics;
- xxn.model = model;
+ xxn.model = this.model;
break;
}
}
if (diffobjs(xxn,xx)) {
- model = xx.model;
+ this.model = xx.model;
model_n = 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)) {
+ 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)) {
needcompile = 1;
}
- if (or(model.firing!=model_n.firing)) {
+ if (or(this.model.firing!=model_n.firing)) {
needcompile = 2;
}
- if (model.sim=="input"||model.sim=="output") {
- if (model.ipar!=model_n.ipar) {
+ if (this.model.sim=="input"||this.model.sim=="output") {
+ if (this.model.ipar!=model_n.ipar) {
needcompile = 4;
}
}
- if (or(model.blocktype!=model_n.blocktype)||or(model.dep_ut!=model_n.dep_ut)) {
+ if (or(this.model.blocktype!=model_n.blocktype)||or(this.model.dep_ut!=model_n.dep_ut)) {
needcompile = 4;
}
- if ((model.nzcross!=model_n.nzcross)||(model.nmode!=model_n.nmode)) {
+ if ((this.model.nzcross!=model_n.nzcross)||(this.model.nmode!=model_n.nmode)) {
needcompile = 4;
}
if (prod(size(model_n.sim))>1) {
if (model_n.sim[2-1]>1000) {
- if (model.sim[1-1]!=model_n.sim[1-1]) {
+ if (this.model.sim[1-1]!=model_n.sim[1-1]) {
needcompile = 4;
}
}
}
} else {
- modified = or(model_n!=model);
- eq = model.equations;
+ modified = or(model_n!=this.model);
+ eq = this.model.equations;
eqn = model_n.equations;
if (or(eq.model!=eqn.model)||or(eq.inputs!=eqn.inputs)||or(eq.outputs!=eqn.outputs)) {
needcompile = 4;
diff --git a/js/Events/freq_div.pickle b/js/Events/freq_div.pickle
index 871373c9..9960bc07 100644
--- a/js/Events/freq_div.pickle
+++ b/js/Events/freq_div.pickle
@@ -4,12 +4,14 @@ p0
((lp1
S'x'
p2
-aS'%df'
+aS'model'
p3
-aS'%ph'
+aS'%df'
p4
-atp5
-Rp6
+aS'%ph'
+p5
+atp6
+Rp7
.(dp0
S'lnk.ct'
p1