diff options
Diffstat (limited to 'js/Events')
-rw-r--r-- | js/Events/ANDBLK.js | 3 | ||||
-rw-r--r-- | js/Events/ANDLOG_f.js | 3 | ||||
-rw-r--r-- | js/Events/CLKSOMV_f.js | 3 | ||||
-rw-r--r-- | js/Events/CLKSOM_f.js | 3 | ||||
-rw-r--r-- | js/Events/CLKSPLIT_f.js | 3 | ||||
-rw-r--r-- | js/Events/END_c.js | 5 | ||||
-rw-r--r-- | js/Events/EVTDLY_c.js | 5 | ||||
-rw-r--r-- | js/Events/EVTDLY_f.js | 5 | ||||
-rw-r--r-- | js/Events/EVTGEN_f.js | 5 | ||||
-rw-r--r-- | js/Events/EVTVARDLY.js | 5 | ||||
-rw-r--r-- | js/Events/HALT_f.js | 5 | ||||
-rw-r--r-- | js/Events/IFTHEL_f.js | 11 | ||||
-rw-r--r-- | js/Events/MCLOCK_f.js | 3 | ||||
-rw-r--r-- | js/Events/MFCLCK_f.js | 5 | ||||
-rw-r--r-- | js/Events/M_freq.js | 5 | ||||
-rw-r--r-- | js/Events/VirtualCLK0.js | 3 | ||||
-rw-r--r-- | js/Events/freq_div.js | 20 |
17 files changed, 58 insertions, 34 deletions
diff --git a/js/Events/ANDBLK.js b/js/Events/ANDBLK.js index 0c205368..015e942d 100644 --- a/js/Events/ANDBLK.js +++ b/js/Events/ANDBLK.js @@ -77,7 +77,6 @@ function ANDBLK() { return new BasicBlock(this.x); } ANDBLK.prototype.get_popup_title = function ANDBLK() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Events/ANDLOG_f.js b/js/Events/ANDLOG_f.js index 8b6e9a76..e6dc330b 100644 --- a/js/Events/ANDLOG_f.js +++ b/js/Events/ANDLOG_f.js @@ -22,7 +22,6 @@ function ANDLOG_f() { return new BasicBlock(this.x); } ANDLOG_f.prototype.get_popup_title = function ANDLOG_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Events/CLKSOMV_f.js b/js/Events/CLKSOMV_f.js index 3078020f..e8c6f920 100644 --- a/js/Events/CLKSOMV_f.js +++ b/js/Events/CLKSOMV_f.js @@ -22,7 +22,6 @@ function CLKSOMV_f() { return new RoundBlock(this.x); } CLKSOMV_f.prototype.get_popup_title = function CLKSOMV_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Events/CLKSOM_f.js b/js/Events/CLKSOM_f.js index 7b8c17e6..4fc541d7 100644 --- a/js/Events/CLKSOM_f.js +++ b/js/Events/CLKSOM_f.js @@ -22,7 +22,6 @@ function CLKSOM_f() { return new BasicBlock(this.x); } CLKSOM_f.prototype.get_popup_title = function CLKSOM_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Events/CLKSPLIT_f.js b/js/Events/CLKSPLIT_f.js index 2a561cd1..6b00da1f 100644 --- a/js/Events/CLKSPLIT_f.js +++ b/js/Events/CLKSPLIT_f.js @@ -21,7 +21,6 @@ function CLKSPLIT_f() { return new BasicBlock(this.x); } CLKSPLIT_f.prototype.get_popup_title = function CLKSPLIT_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Events/END_c.js b/js/Events/END_c.js index fc571da0..dbef2db3 100644 --- a/js/Events/END_c.js +++ b/js/Events/END_c.js @@ -18,6 +18,8 @@ function END_c() { return this.x; } END_c.prototype.get = function END_c() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set final simulation time"; var options = { tf:["Final simulation time",this.tf], } @@ -43,7 +45,6 @@ function END_c() { return new BasicBlock(this.x); } END_c.prototype.get_popup_title = function END_c() { - var set_param_popup_title = "Set final simulation time"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Events/EVTDLY_c.js b/js/Events/EVTDLY_c.js index b3e357bd..3c8e398f 100644 --- a/js/Events/EVTDLY_c.js +++ b/js/Events/EVTDLY_c.js @@ -20,6 +20,8 @@ function EVTDLY_c() { return this.x; } EVTDLY_c.prototype.get = function EVTDLY_c() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set Event Delay block parameters"; var options = { dt:["Delay",this.dt], ff:["Date of initial output event",this.ff], @@ -53,7 +55,6 @@ function EVTDLY_c() { return new BasicBlock(this.x); } EVTDLY_c.prototype.get_popup_title = function EVTDLY_c() { - var set_param_popup_title = "Set Event Delay block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Events/EVTDLY_f.js b/js/Events/EVTDLY_f.js index bb61d74c..b9ae3462 100644 --- a/js/Events/EVTDLY_f.js +++ b/js/Events/EVTDLY_f.js @@ -20,6 +20,8 @@ function EVTDLY_f() { return this.x; } EVTDLY_f.prototype.get = function EVTDLY_f() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set Event Delay block parameters"; var options = { dt:["Delay",this.dt], ff:["Date of initial output event",this.ff], @@ -53,7 +55,6 @@ function EVTDLY_f() { return new BasicBlock(this.x); } EVTDLY_f.prototype.get_popup_title = function EVTDLY_f() { - var set_param_popup_title = "Set Event Delay block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Events/EVTGEN_f.js b/js/Events/EVTGEN_f.js index eb946208..38f785c0 100644 --- a/js/Events/EVTGEN_f.js +++ b/js/Events/EVTGEN_f.js @@ -17,6 +17,8 @@ function EVTGEN_f() { return this.x; } EVTGEN_f.prototype.get = function EVTGEN_f() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set Event time"; var options = { tt:["Event Time",this.tt], } @@ -42,7 +44,6 @@ function EVTGEN_f() { return new BasicBlock(this.x); } EVTGEN_f.prototype.get_popup_title = function EVTGEN_f() { - var set_param_popup_title = "Set Event time"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Events/EVTVARDLY.js b/js/Events/EVTVARDLY.js index 3053ec4d..dea4f4e1 100644 --- a/js/Events/EVTVARDLY.js +++ b/js/Events/EVTVARDLY.js @@ -19,6 +19,8 @@ function EVTVARDLY() { return this.x; } EVTVARDLY.prototype.get = function EVTVARDLY() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set parameter of variable event delay"; var options = { fir:["Initial event firing time (<0 if absent)",this.fir], } @@ -42,7 +44,6 @@ function EVTVARDLY() { return new BasicBlock(this.x); } EVTVARDLY.prototype.get_popup_title = function EVTVARDLY() { - var set_param_popup_title = "Set parameter of variable event delay"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Events/HALT_f.js b/js/Events/HALT_f.js index 9a255405..4fc8a9c8 100644 --- a/js/Events/HALT_f.js +++ b/js/Events/HALT_f.js @@ -18,6 +18,8 @@ function HALT_f() { return this.x; } HALT_f.prototype.get = function HALT_f() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set Halt block parameters"; var options = { n:["State on halt",this.n], } @@ -43,7 +45,6 @@ function HALT_f() { return new BasicBlock(this.x); } HALT_f.prototype.get_popup_title = function HALT_f() { - var set_param_popup_title = "Set Halt block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Events/IFTHEL_f.js b/js/Events/IFTHEL_f.js index 63d76b28..37ef1299 100644 --- a/js/Events/IFTHEL_f.js +++ b/js/Events/IFTHEL_f.js @@ -22,6 +22,14 @@ function IFTHEL_f() { return this.x; } IFTHEL_f.prototype.get = function IFTHEL_f() { + var exprs = this.graphics.exprs; + if (exprs.length==0) { + var exprs = string(1); + } + if (size(exprs,"*")==1) { + exprs[2-1] = string(1); + } + this.set_param_popup_title = "Set parameters"; var options = { inh:["Inherit (1: no, 0: yes)",this.inh], nmod:["zero-crossing (0: no, 1: yes)",this.nmod], @@ -69,7 +77,6 @@ function IFTHEL_f() { return new BasicBlock(this.x); } IFTHEL_f.prototype.get_popup_title = function IFTHEL_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Events/MCLOCK_f.js b/js/Events/MCLOCK_f.js index c3ad99c5..3292eff3 100644 --- a/js/Events/MCLOCK_f.js +++ b/js/Events/MCLOCK_f.js @@ -92,7 +92,6 @@ function MCLOCK_f() { return new BasicBlock(this.x); } MCLOCK_f.prototype.get_popup_title = function MCLOCK_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Events/MFCLCK_f.js b/js/Events/MFCLCK_f.js index b187bccc..9ba515f3 100644 --- a/js/Events/MFCLCK_f.js +++ b/js/Events/MFCLCK_f.js @@ -22,6 +22,8 @@ function MFCLCK_f() { return this.x; } MFCLCK_f.prototype.get = function MFCLCK_f() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set Multifrequency clock parameters"; var options = { dt:["basic period (1/f)",this.dt], nn:["multiply by (n)",this.nn], @@ -47,7 +49,6 @@ function MFCLCK_f() { return new BasicBlock(this.x); } MFCLCK_f.prototype.get_popup_title = function MFCLCK_f() { - var set_param_popup_title = "Set Multifrequency clock parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Events/M_freq.js b/js/Events/M_freq.js index 6a6c6be1..da2cb73e 100644 --- a/js/Events/M_freq.js +++ b/js/Events/M_freq.js @@ -19,6 +19,8 @@ function M_freq() { return this.x; } M_freq.prototype.get = function M_freq() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set block parameters"; var options = { frequ:["Sample time",this.frequ], offset:["Offset",this.offset], @@ -84,7 +86,6 @@ function M_freq() { return new BasicBlock(this.x); } M_freq.prototype.get_popup_title = function M_freq() { - var set_param_popup_title = "Set block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Events/VirtualCLK0.js b/js/Events/VirtualCLK0.js index 6808468b..fd0a5f9a 100644 --- a/js/Events/VirtualCLK0.js +++ b/js/Events/VirtualCLK0.js @@ -23,7 +23,6 @@ function VirtualCLK0() { return new BasicBlock(this.x); } VirtualCLK0.prototype.get_popup_title = function VirtualCLK0() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Events/freq_div.js b/js/Events/freq_div.js index aebf91e2..35d46012 100644 --- a/js/Events/freq_div.js +++ b/js/Events/freq_div.js @@ -111,6 +111,23 @@ function freq_div() { return this.x; } freq_div.prototype.get = function freq_div() { + if (typeof(o)=="Block"&&o.gui=="Modulo_Count") { + var path = i; + break; + } + } + var newpar = list(); + var y = 0; + var spath = list(); + spath[$+1-1] = "model"; + spath[$+1-1] = "rpar"; + spath[$+1-1] = "objs"; + spath[$+1-1] = path; + var xxn = xx; + this.graphics = xx.graphics; + var exprs = this.graphics.exprs; + this.model = xx.model; + this.set_param_popup_title = "Set frequency division block parameters"; var options = { %ph:["Phase (0 to division factor -1)",this.%ph], %df:["Division factor",this.%df], @@ -202,7 +219,6 @@ function freq_div() { return new BasicBlock(this.x); } freq_div.prototype.get_popup_title = function freq_div() { - var set_param_popup_title = "Set frequency division block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } |