diff options
Diffstat (limited to 'js')
280 files changed, 1170 insertions, 613 deletions
diff --git a/js/Branching/CLKFROM.js b/js/Branching/CLKFROM.js index ac6c74c6..92a467fe 100644 --- a/js/Branching/CLKFROM.js +++ b/js/Branching/CLKFROM.js @@ -17,6 +17,8 @@ function CLKFROM() { return this.x; } CLKFROM.prototype.get = function CLKFROM() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set block parameters"; var options = { tag:["Tag",this.tag], } @@ -47,7 +49,6 @@ function CLKFROM() { return new BasicBlock(this.x); } CLKFROM.prototype.get_popup_title = function CLKFROM() { - var set_param_popup_title = "Set block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Branching/CLKGOTO.js b/js/Branching/CLKGOTO.js index 91c29310..ee9672a0 100644 --- a/js/Branching/CLKGOTO.js +++ b/js/Branching/CLKGOTO.js @@ -18,6 +18,8 @@ function CLKGOTO() { return this.x; } CLKGOTO.prototype.get = function CLKGOTO() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set block parameters"; var options = { tag:["Tag",this.tag], tagvis:["Tag Visibility (1=Local 2=Scoped 3=Global)",this.tagvis], @@ -59,7 +61,6 @@ function CLKGOTO() { return new BasicBlock(this.x); } CLKGOTO.prototype.get_popup_title = function CLKGOTO() { - var set_param_popup_title = "Set block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Branching/CLKGotoTagVisibility.js b/js/Branching/CLKGotoTagVisibility.js index 35da9c0a..0db3370b 100644 --- a/js/Branching/CLKGotoTagVisibility.js +++ b/js/Branching/CLKGotoTagVisibility.js @@ -23,6 +23,8 @@ function CLKGotoTagVisibility() { return this.x; } CLKGotoTagVisibility.prototype.get = function CLKGotoTagVisibility() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set parameters"; var options = { tag:["GotoTag",this.tag], } @@ -53,7 +55,6 @@ function CLKGotoTagVisibility() { return new BasicBlock(this.x); } CLKGotoTagVisibility.prototype.get_popup_title = function CLKGotoTagVisibility() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Branching/DEMUX.js b/js/Branching/DEMUX.js index 92175d30..b58dbc36 100644 --- a/js/Branching/DEMUX.js +++ b/js/Branching/DEMUX.js @@ -19,6 +19,8 @@ function DEMUX() { return this.x; } DEMUX.prototype.get = function DEMUX() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set DEMUX block parameters"; var options = { out:["number of output ports or vector of sizes",this.out], } @@ -75,7 +77,6 @@ function DEMUX() { return new BasicBlock(this.x); } DEMUX.prototype.get_popup_title = function DEMUX() { - var set_param_popup_title = "Set DEMUX block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Branching/DEMUX_f.js b/js/Branching/DEMUX_f.js index 4a1f0ef8..7816a079 100644 --- a/js/Branching/DEMUX_f.js +++ b/js/Branching/DEMUX_f.js @@ -19,6 +19,8 @@ function DEMUX_f() { return this.x; } DEMUX_f.prototype.get = function DEMUX_f() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set DEMUX block parameters"; var options = { out:["number of output ports or vector of sizes",this.out], } @@ -75,7 +77,6 @@ function DEMUX_f() { return new BasicBlock(this.x); } DEMUX_f.prototype.get_popup_title = function DEMUX_f() { - var set_param_popup_title = "Set DEMUX block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Branching/ESELECT_f.js b/js/Branching/ESELECT_f.js index b8c636b0..47e27c34 100644 --- a/js/Branching/ESELECT_f.js +++ b/js/Branching/ESELECT_f.js @@ -23,6 +23,14 @@ function ESELECT_f() { return this.x; } ESELECT_f.prototype.get = function ESELECT_f() { + var exprs = this.graphics.exprs; + if (size(exprs,"*")==1) { + exprs[2-1] = string(1); + } + if (size(exprs,"*")==2) { + exprs[3-1] = string(0); + } + this.set_param_popup_title = "Set ESELECT block parameters"; var options = { out:["number of output event ports",this.out], inh:["Inherit (1: no, 0: yes)",this.inh], @@ -79,7 +87,6 @@ function ESELECT_f() { return new BasicBlock(this.x); } ESELECT_f.prototype.get_popup_title = function ESELECT_f() { - var set_param_popup_title = "Set ESELECT block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Branching/EXTRACTOR.js b/js/Branching/EXTRACTOR.js index 9f195782..b8f3d95d 100644 --- a/js/Branching/EXTRACTOR.js +++ b/js/Branching/EXTRACTOR.js @@ -18,6 +18,8 @@ function EXTRACTOR() { return this.x; } EXTRACTOR.prototype.get = function EXTRACTOR() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set block parameters"; var options = { ind:["indices to extract",this.ind], } @@ -49,7 +51,6 @@ function EXTRACTOR() { return new BasicBlock(this.x); } EXTRACTOR.prototype.get_popup_title = function EXTRACTOR() { - var set_param_popup_title = "Set block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Branching/FROM.js b/js/Branching/FROM.js index 62fef458..bc5fd14b 100644 --- a/js/Branching/FROM.js +++ b/js/Branching/FROM.js @@ -23,6 +23,8 @@ function FROM() { return this.x; } FROM.prototype.get = function FROM() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set parameters"; var options = { tag:["Tag",this.tag], } @@ -53,7 +55,6 @@ function FROM() { return new BasicBlock(this.x); } FROM.prototype.get_popup_title = function FROM() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Branching/FROMMO.js b/js/Branching/FROMMO.js index f30648f9..3007c53f 100644 --- a/js/Branching/FROMMO.js +++ b/js/Branching/FROMMO.js @@ -26,6 +26,8 @@ function FROMMO() { return this.x; } FROMMO.prototype.get = function FROMMO() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set parameters"; var options = { tag:["Tag",this.tag], } @@ -56,7 +58,6 @@ function FROMMO() { return new BasicBlock(this.x); } FROMMO.prototype.get_popup_title = function FROMMO() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Branching/GOTO.js b/js/Branching/GOTO.js index eed862a9..3ffb5a40 100644 --- a/js/Branching/GOTO.js +++ b/js/Branching/GOTO.js @@ -23,6 +23,8 @@ function GOTO() { return this.x; } GOTO.prototype.get = function GOTO() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set parameters"; var options = { tag:["Tag",this.tag], tagvis:["Tag Visibility(1=Local 2=scoped 3= global)",this.tagvis], @@ -62,7 +64,6 @@ function GOTO() { return new BasicBlock(this.x); } GOTO.prototype.get_popup_title = function GOTO() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Branching/GOTOMO.js b/js/Branching/GOTOMO.js index 643791d8..24ed6c75 100644 --- a/js/Branching/GOTOMO.js +++ b/js/Branching/GOTOMO.js @@ -26,6 +26,8 @@ function GOTOMO() { return this.x; } GOTOMO.prototype.get = function GOTOMO() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set parameters"; var options = { tag:["Tag",this.tag], tagvis:["Tag Visibility(1=Local 2=scoped 3= global)",this.tagvis], @@ -65,7 +67,6 @@ function GOTOMO() { return new BasicBlock(this.x); } GOTOMO.prototype.get_popup_title = function GOTOMO() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Branching/GotoTagVisibility.js b/js/Branching/GotoTagVisibility.js index 2549e695..7a792965 100644 --- a/js/Branching/GotoTagVisibility.js +++ b/js/Branching/GotoTagVisibility.js @@ -23,6 +23,8 @@ function GotoTagVisibility() { return this.x; } GotoTagVisibility.prototype.get = function GotoTagVisibility() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set parameters"; var options = { tag:["GotoTag",this.tag], } @@ -53,7 +55,6 @@ function GotoTagVisibility() { return new BasicBlock(this.x); } GotoTagVisibility.prototype.get_popup_title = function GotoTagVisibility() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Branching/GotoTagVisibilityMO.js b/js/Branching/GotoTagVisibilityMO.js index 610bb2cf..bc999818 100644 --- a/js/Branching/GotoTagVisibilityMO.js +++ b/js/Branching/GotoTagVisibilityMO.js @@ -23,6 +23,8 @@ function GotoTagVisibilityMO() { return this.x; } GotoTagVisibilityMO.prototype.get = function GotoTagVisibilityMO() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set parameters"; var options = { tag:["GotoTag",this.tag], } @@ -53,7 +55,6 @@ function GotoTagVisibilityMO() { return new BasicBlock(this.x); } GotoTagVisibilityMO.prototype.get_popup_title = function GotoTagVisibilityMO() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Branching/ISELECT_f.js b/js/Branching/ISELECT_f.js index 362776f3..91d0c2d5 100644 --- a/js/Branching/ISELECT_f.js +++ b/js/Branching/ISELECT_f.js @@ -21,6 +21,8 @@ function ISELECT_f() { return this.x; } ISELECT_f.prototype.get = function ISELECT_f() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set parameters"; var options = { nout:["number of outputs",this.nout], z0:["initial connected output",this.z0], @@ -57,7 +59,6 @@ function ISELECT_f() { return new BasicBlock(this.x); } ISELECT_f.prototype.get_popup_title = function ISELECT_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Branching/ISELECT_m.js b/js/Branching/ISELECT_m.js index f1591e76..8fafc3b4 100644 --- a/js/Branching/ISELECT_m.js +++ b/js/Branching/ISELECT_m.js @@ -29,6 +29,8 @@ function ISELECT_m() { return this.x; } ISELECT_m.prototype.get = function ISELECT_m() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set parameters"; var options = { typ:["Datatype(1= real double 2=Complex 3=int32 ...)",this.typ], nout:["number of outputs",this.nout], @@ -77,7 +79,6 @@ function ISELECT_m() { return new BasicBlock(this.x); } ISELECT_m.prototype.get_popup_title = function ISELECT_m() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Branching/MUX.js b/js/Branching/MUX.js index 4c69be07..be1ddfe2 100644 --- a/js/Branching/MUX.js +++ b/js/Branching/MUX.js @@ -18,6 +18,8 @@ function MUX() { return this.x; } MUX.prototype.get = function MUX() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set MUX block parameters"; var options = { in1:["number of input ports or vector of sizes",this.in1], } @@ -74,7 +76,6 @@ function MUX() { return new BasicBlock(this.x); } MUX.prototype.get_popup_title = function MUX() { - var set_param_popup_title = "Set MUX block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Branching/MUX_f.js b/js/Branching/MUX_f.js index 5162aa99..d3ca9918 100644 --- a/js/Branching/MUX_f.js +++ b/js/Branching/MUX_f.js @@ -18,6 +18,8 @@ function MUX_f() { return this.x; } MUX_f.prototype.get = function MUX_f() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set MUX block parameters"; var options = { in1:["number of input ports or vector of sizes",this.in1], } @@ -74,7 +76,6 @@ function MUX_f() { return new BasicBlock(this.x); } MUX_f.prototype.get_popup_title = function MUX_f() { - var set_param_popup_title = "Set MUX block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Branching/M_SWITCH.js b/js/Branching/M_SWITCH.js index b63c6311..a79a22b8 100644 --- a/js/Branching/M_SWITCH.js +++ b/js/Branching/M_SWITCH.js @@ -20,6 +20,8 @@ function M_SWITCH() { return this.x; } M_SWITCH.prototype.get = function M_SWITCH() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set parameters"; var options = { nin:["number of inputs",this.nin], base:["zero base indexing (0), otherwise 1",this.base], @@ -77,7 +79,6 @@ function M_SWITCH() { return new BasicBlock(this.x); } M_SWITCH.prototype.get_popup_title = function M_SWITCH() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Branching/NRMSOM_f.js b/js/Branching/NRMSOM_f.js index 58a54b1f..9cd2d219 100644 --- a/js/Branching/NRMSOM_f.js +++ b/js/Branching/NRMSOM_f.js @@ -18,6 +18,8 @@ function NRMSOM_f() { return this.x; } NRMSOM_f.prototype.get = function NRMSOM_f() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set parameters"; var options = { nin:["number of inputs",this.nin], } @@ -46,7 +48,6 @@ function NRMSOM_f() { return new BasicBlock(this.x); } NRMSOM_f.prototype.get_popup_title = function NRMSOM_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Branching/RELAY_f.js b/js/Branching/RELAY_f.js index 664e1e4c..2366b6f8 100644 --- a/js/Branching/RELAY_f.js +++ b/js/Branching/RELAY_f.js @@ -22,6 +22,9 @@ function RELAY_f() { return this.x; } RELAY_f.prototype.get = function RELAY_f() { + var exprs = this.graphics.exprs; + var ipar = this.model.ipar; + this.set_param_popup_title = "Set parameters"; var options = { nin:["number of inputs",this.nin], z0:["initial connected input",this.z0], @@ -59,7 +62,6 @@ function RELAY_f() { return new BasicBlock(this.x); } RELAY_f.prototype.get_popup_title = function RELAY_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Branching/SCALAR2VECTOR.js b/js/Branching/SCALAR2VECTOR.js index 8564a431..bfcbe004 100644 --- a/js/Branching/SCALAR2VECTOR.js +++ b/js/Branching/SCALAR2VECTOR.js @@ -17,6 +17,8 @@ function SCALAR2VECTOR() { return this.x; } SCALAR2VECTOR.prototype.get = function SCALAR2VECTOR() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set block parameters"; var options = { nout:["size of output (-1: if don\'t know)",this.nout], } @@ -53,7 +55,6 @@ function SCALAR2VECTOR() { return new BasicBlock(this.x); } SCALAR2VECTOR.prototype.get_popup_title = function SCALAR2VECTOR() { - var set_param_popup_title = "Set block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Branching/SELECT_f.js b/js/Branching/SELECT_f.js index f10ee297..68242bb4 100644 --- a/js/Branching/SELECT_f.js +++ b/js/Branching/SELECT_f.js @@ -21,6 +21,8 @@ function SELECT_f() { return this.x; } SELECT_f.prototype.get = function SELECT_f() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set parameters"; var options = { nin:["number of inputs",this.nin], z0:["initial connected input",this.z0], @@ -57,7 +59,6 @@ function SELECT_f() { return new BasicBlock(this.x); } SELECT_f.prototype.get_popup_title = function SELECT_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Branching/SELECT_m.js b/js/Branching/SELECT_m.js index eebc13cc..c565473b 100644 --- a/js/Branching/SELECT_m.js +++ b/js/Branching/SELECT_m.js @@ -29,6 +29,8 @@ function SELECT_m() { return this.x; } SELECT_m.prototype.get = function SELECT_m() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set parameters"; var options = { typ:["Datatype(1= real double 2=Complex 3=int32 ..)",this.typ], nin:["number of inputs",this.nin], @@ -77,7 +79,6 @@ function SELECT_m() { return new BasicBlock(this.x); } SELECT_m.prototype.get_popup_title = function SELECT_m() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Branching/SELF_SWITCH.js b/js/Branching/SELF_SWITCH.js index dd3697a0..1b56a13d 100644 --- a/js/Branching/SELF_SWITCH.js +++ b/js/Branching/SELF_SWITCH.js @@ -42,7 +42,6 @@ function SELF_SWITCH() { return new BasicBlock(this.x); } SELF_SWITCH.prototype.get_popup_title = function SELF_SWITCH() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Branching/SWITCH2.js b/js/Branching/SWITCH2.js index cf8ec443..a816db73 100644 --- a/js/Branching/SWITCH2.js +++ b/js/Branching/SWITCH2.js @@ -24,6 +24,8 @@ function SWITCH2() { return this.x; } SWITCH2.prototype.get = function SWITCH2() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set parameters"; var options = { rule:["pass first input if: u2>=a (0), u2>a (1), u2~=a (2)",this.rule], thra:["threshold a",this.thra], @@ -66,7 +68,6 @@ function SWITCH2() { return new BasicBlock(this.x); } SWITCH2.prototype.get_popup_title = function SWITCH2() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Branching/SWITCH2_m.js b/js/Branching/SWITCH2_m.js index e6027997..efdaac6e 100644 --- a/js/Branching/SWITCH2_m.js +++ b/js/Branching/SWITCH2_m.js @@ -27,6 +27,8 @@ function SWITCH2_m() { return this.x; } SWITCH2_m.prototype.get = function SWITCH2_m() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set parameters"; var options = { ot:["Datatype (1=real double 2=complex 3=int32 ...)",this.ot], rule:["pass first input if: u2>=a (0), u2>a (1), u2~=a (2)",this.rule], @@ -89,7 +91,6 @@ function SWITCH2_m() { return new BasicBlock(this.x); } SWITCH2_m.prototype.get_popup_title = function SWITCH2_m() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Branching/SWITCH_f.js b/js/Branching/SWITCH_f.js index 85d5a05f..32240dfd 100644 --- a/js/Branching/SWITCH_f.js +++ b/js/Branching/SWITCH_f.js @@ -21,6 +21,9 @@ function SWITCH_f() { return this.x; } SWITCH_f.prototype.get = function SWITCH_f() { + var exprs = this.graphics.exprs; + var ipar = this.model.ipar; + this.set_param_popup_title = "Set switch parameters"; var options = { nin:["number of inputs",this.nin], z0:["connected input",this.z0], @@ -58,7 +61,6 @@ function SWITCH_f() { return new BasicBlock(this.x); } SWITCH_f.prototype.get_popup_title = function SWITCH_f() { - var set_param_popup_title = "Set switch parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Electrical/CCS.js b/js/Electrical/CCS.js index 19deb542..9afa75ad 100644 --- a/js/Electrical/CCS.js +++ b/js/Electrical/CCS.js @@ -60,7 +60,6 @@ function CCS() { return new BasicBlock(this.x); } CCS.prototype.get_popup_title = function CCS() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Electrical/CVS.js b/js/Electrical/CVS.js index 6e1767c3..4ac0360b 100644 --- a/js/Electrical/CVS.js +++ b/js/Electrical/CVS.js @@ -60,7 +60,6 @@ function CVS() { return new BasicBlock(this.x); } CVS.prototype.get_popup_title = function CVS() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Electrical/Capacitor.js b/js/Electrical/Capacitor.js index e80cf10d..50e5ac3e 100644 --- a/js/Electrical/Capacitor.js +++ b/js/Electrical/Capacitor.js @@ -27,6 +27,8 @@ function Capacitor() { return this.x; } Capacitor.prototype.get = function Capacitor() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set Capacitor block parameter"; var options = { C:["C (F)",this.C], v:["Initial Voltage",this.v], @@ -53,7 +55,6 @@ function Capacitor() { return new BasicBlock(this.x); } Capacitor.prototype.get_popup_title = function Capacitor() { - var set_param_popup_title = "Set Capacitor block parameter"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Electrical/ConstantVoltage.js b/js/Electrical/ConstantVoltage.js index f9dd58a2..d1a1efb9 100644 --- a/js/Electrical/ConstantVoltage.js +++ b/js/Electrical/ConstantVoltage.js @@ -26,6 +26,8 @@ function ConstantVoltage() { return this.x; } ConstantVoltage.prototype.get = function ConstantVoltage() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set ConstantVoltage block parameter"; var options = { V:["V (volt)",this.V], } @@ -50,7 +52,6 @@ function ConstantVoltage() { return new BasicBlock(this.x); } ConstantVoltage.prototype.get_popup_title = function ConstantVoltage() { - var set_param_popup_title = "Set ConstantVoltage block parameter"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Electrical/CurrentSensor.js b/js/Electrical/CurrentSensor.js index 1f63e923..3e80c859 100644 --- a/js/Electrical/CurrentSensor.js +++ b/js/Electrical/CurrentSensor.js @@ -29,7 +29,6 @@ function CurrentSensor() { return new BasicBlock(this.x); } CurrentSensor.prototype.get_popup_title = function CurrentSensor() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Electrical/Diode.js b/js/Electrical/Diode.js index a0182582..b50e5e1c 100644 --- a/js/Electrical/Diode.js +++ b/js/Electrical/Diode.js @@ -29,6 +29,8 @@ function Diode() { return this.x; } Diode.prototype.get = function Diode() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set Diode block parameter"; var options = { Ids:["Saturation cuurent (A)",this.Ids], Vt:["Voltage equivalent to temperature (Volt)",this.Vt], @@ -59,7 +61,6 @@ function Diode() { return new BasicBlock(this.x); } Diode.prototype.get_popup_title = function Diode() { - var set_param_popup_title = "Set Diode block parameter"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Electrical/Ground.js b/js/Electrical/Ground.js index 6422b54e..da4710ca 100644 --- a/js/Electrical/Ground.js +++ b/js/Electrical/Ground.js @@ -28,7 +28,6 @@ function Ground() { return new GroundBlock(this.x); } Ground.prototype.get_popup_title = function Ground() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Electrical/Gyrator.js b/js/Electrical/Gyrator.js index 6c97cfce..71c2b2af 100644 --- a/js/Electrical/Gyrator.js +++ b/js/Electrical/Gyrator.js @@ -53,6 +53,9 @@ function Gyrator() { return this.x; } Gyrator.prototype.get = function Gyrator() { + var exprs = this.graphics.exprs; + var exprs = this.x.graphics.exprs; + this.set_param_popup_title = "Set Gyrator block parameters:"; var options = { G1:["G1",this.G1], G2:["G2",this.G2], @@ -77,7 +80,6 @@ function Gyrator() { return new BasicBlock(this.x); } Gyrator.prototype.get_popup_title = function Gyrator() { - var set_param_popup_title = "Set Gyrator block parameters:"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Electrical/IdealTransformer.js b/js/Electrical/IdealTransformer.js index d7a4c0f6..69d389e8 100644 --- a/js/Electrical/IdealTransformer.js +++ b/js/Electrical/IdealTransformer.js @@ -53,6 +53,9 @@ function IdealTransformer() { return this.x; } IdealTransformer.prototype.get = function IdealTransformer() { + var exprs = this.graphics.exprs; + var exprs = this.x.graphics.exprs; + this.set_param_popup_title = "Set Transformer block parameters:"; var options = { N:["N",this.N], } @@ -75,7 +78,6 @@ function IdealTransformer() { return new BasicBlock(this.x); } IdealTransformer.prototype.get_popup_title = function IdealTransformer() { - var set_param_popup_title = "Set Transformer block parameters:"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Electrical/Inductor.js b/js/Electrical/Inductor.js index 02e62b40..1ae39c6e 100644 --- a/js/Electrical/Inductor.js +++ b/js/Electrical/Inductor.js @@ -26,6 +26,8 @@ function Inductor() { return this.x; } Inductor.prototype.get = function Inductor() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set Inductor block parameter"; var options = { L:["L (H)",this.L], } @@ -50,7 +52,6 @@ function Inductor() { return new BasicBlock(this.x); } Inductor.prototype.get_popup_title = function Inductor() { - var set_param_popup_title = "Set Inductor block parameter"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Electrical/MOTOR.js b/js/Electrical/MOTOR.js index 85fea4fa..7c834816 100644 --- a/js/Electrical/MOTOR.js +++ b/js/Electrical/MOTOR.js @@ -24,7 +24,6 @@ function MOTOR() { return new BasicBlock(this.x); } MOTOR.prototype.get_popup_title = function MOTOR() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Electrical/NMOS.js b/js/Electrical/NMOS.js index a2cda843..79570aba 100644 --- a/js/Electrical/NMOS.js +++ b/js/Electrical/NMOS.js @@ -33,6 +33,8 @@ function NMOS() { return this.x; } NMOS.prototype.get = function NMOS() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set NMOS Transistor block parameters"; var options = { W:["Width [m]",this.W], L:["Length [m]",this.L], @@ -72,7 +74,6 @@ function NMOS() { return new BasicBlock(this.x); } NMOS.prototype.get_popup_title = function NMOS() { - var set_param_popup_title = "Set NMOS Transistor block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Electrical/NPN.js b/js/Electrical/NPN.js index 36e33963..5d38e053 100644 --- a/js/Electrical/NPN.js +++ b/js/Electrical/NPN.js @@ -53,6 +53,9 @@ function NPN() { return this.x; } NPN.prototype.get = function NPN() { + var exprs = this.graphics.exprs; + var exprs = this.x.graphics.exprs; + this.set_param_popup_title = "Set NPN block parameters:"; var options = { Bf:["Bf : Forward beta",this.Bf], Br:["Br : Reverse beta",this.Br], @@ -107,7 +110,6 @@ function NPN() { return new BasicBlock(this.x); } NPN.prototype.get_popup_title = function NPN() { - var set_param_popup_title = "Set NPN block parameters:"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Electrical/OpAmp.js b/js/Electrical/OpAmp.js index dee90c80..266c2f7e 100644 --- a/js/Electrical/OpAmp.js +++ b/js/Electrical/OpAmp.js @@ -27,6 +27,8 @@ function OpAmp() { return this.x; } OpAmp.prototype.get = function OpAmp() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set the Operational Amplifier parameters"; var options = { OLGain:["Open Loop Gain",this.OLGain], SatH:["Positive saturation voltage",this.SatH], @@ -54,7 +56,6 @@ function OpAmp() { return new BasicBlock(this.x); } OpAmp.prototype.get_popup_title = function OpAmp() { - var set_param_popup_title = "Set the Operational Amplifier parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Electrical/PMOS.js b/js/Electrical/PMOS.js index ac8c4a1a..11a1d8a0 100644 --- a/js/Electrical/PMOS.js +++ b/js/Electrical/PMOS.js @@ -33,6 +33,8 @@ function PMOS() { return this.x; } PMOS.prototype.get = function PMOS() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set PMOS Transistor parameters"; var options = { W:["Width [m]",this.W], L:["Length [m]",this.L], @@ -72,7 +74,6 @@ function PMOS() { return new BasicBlock(this.x); } PMOS.prototype.get_popup_title = function PMOS() { - var set_param_popup_title = "Set PMOS Transistor parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Electrical/PNP.js b/js/Electrical/PNP.js index 7c6fe0ed..6d660004 100644 --- a/js/Electrical/PNP.js +++ b/js/Electrical/PNP.js @@ -53,6 +53,9 @@ function PNP() { return this.x; } PNP.prototype.get = function PNP() { + var exprs = this.graphics.exprs; + var exprs = this.x.graphics.exprs; + this.set_param_popup_title = "Set PNP block parameters:"; var options = { Bf:["Bf : Forward beta",this.Bf], Br:["Br : Reverse beta",this.Br], @@ -107,7 +110,6 @@ function PNP() { return new BasicBlock(this.x); } PNP.prototype.get_popup_title = function PNP() { - var set_param_popup_title = "Set PNP block parameters:"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Electrical/PotentialSensor.js b/js/Electrical/PotentialSensor.js index e291c457..8967885a 100644 --- a/js/Electrical/PotentialSensor.js +++ b/js/Electrical/PotentialSensor.js @@ -29,7 +29,6 @@ function PotentialSensor() { return new BasicBlock(this.x); } PotentialSensor.prototype.get_popup_title = function PotentialSensor() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Electrical/Resistor.js b/js/Electrical/Resistor.js index 19fba9fa..5fb15d83 100644 --- a/js/Electrical/Resistor.js +++ b/js/Electrical/Resistor.js @@ -26,6 +26,8 @@ function Resistor() { return this.x; } Resistor.prototype.get = function Resistor() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set Resistor block parameter"; var options = { R:["R (ohm)",this.R], } @@ -50,7 +52,6 @@ function Resistor() { return new BasicBlock(this.x); } Resistor.prototype.get_popup_title = function Resistor() { - var set_param_popup_title = "Set Resistor block parameter"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Electrical/SineVoltage.js b/js/Electrical/SineVoltage.js index d91676da..b23ec90f 100644 --- a/js/Electrical/SineVoltage.js +++ b/js/Electrical/SineVoltage.js @@ -30,6 +30,8 @@ function SineVoltage() { return this.x; } SineVoltage.prototype.get = function SineVoltage() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set voltage source parameter"; var options = { V:["Amplitude (Volt)",this.V], ph:["phase (rad)",this.ph], @@ -62,7 +64,6 @@ function SineVoltage() { return new BasicBlock(this.x); } SineVoltage.prototype.get_popup_title = function SineVoltage() { - var set_param_popup_title = "Set voltage source parameter"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Electrical/Switch.js b/js/Electrical/Switch.js index 2641b80a..4126940c 100644 --- a/js/Electrical/Switch.js +++ b/js/Electrical/Switch.js @@ -29,6 +29,8 @@ function Switch() { return this.x; } Switch.prototype.get = function Switch() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set non-ideal electrical switch parameters"; var options = { Ron:["Resistance in On state (Ohm)",this.Ron], Roff:["Resistance in Off state (Ohm)",this.Roff], @@ -54,7 +56,6 @@ function Switch() { return new BasicBlock(this.x); } Switch.prototype.get_popup_title = function Switch() { - var set_param_popup_title = "Set non-ideal electrical switch parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Electrical/VVsourceAC.js b/js/Electrical/VVsourceAC.js index c0dcb9ab..8ee8ea7c 100644 --- a/js/Electrical/VVsourceAC.js +++ b/js/Electrical/VVsourceAC.js @@ -27,6 +27,8 @@ function VVsourceAC() { return this.x; } VVsourceAC.prototype.get = function VVsourceAC() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set voltage source parameter"; var options = { FR:["Frequency (Hz)",this.FR], } @@ -51,7 +53,6 @@ function VVsourceAC() { return new BasicBlock(this.x); } VVsourceAC.prototype.get_popup_title = function VVsourceAC() { - var set_param_popup_title = "Set voltage source parameter"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Electrical/VariableResistor.js b/js/Electrical/VariableResistor.js index 1a29fb02..0c6315ad 100644 --- a/js/Electrical/VariableResistor.js +++ b/js/Electrical/VariableResistor.js @@ -29,7 +29,6 @@ function VariableResistor() { return new BasicBlock(this.x); } VariableResistor.prototype.get_popup_title = function VariableResistor() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Electrical/VoltageSensor.js b/js/Electrical/VoltageSensor.js index 16bc8373..965b5c36 100644 --- a/js/Electrical/VoltageSensor.js +++ b/js/Electrical/VoltageSensor.js @@ -29,7 +29,6 @@ function VoltageSensor() { return new VoltageSensorBlock(this.x); } VoltageSensor.prototype.get_popup_title = function VoltageSensor() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Electrical/VsourceAC.js b/js/Electrical/VsourceAC.js index 79440423..6afabf23 100644 --- a/js/Electrical/VsourceAC.js +++ b/js/Electrical/VsourceAC.js @@ -27,6 +27,8 @@ function VsourceAC() { return this.x; } VsourceAC.prototype.get = function VsourceAC() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set voltage source parameter"; var options = { VA:["Amplitude (Volt)",this.VA], FR:["Frequency (Hz)",this.FR], @@ -53,7 +55,6 @@ function VsourceAC() { return new BasicBlock(this.x); } VsourceAC.prototype.get_popup_title = function VsourceAC() { - var set_param_popup_title = "Set voltage source parameter"; - return set_param_popup_title; + return this.set_param_popup_title; } } 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; } } diff --git a/js/Hydraulics/Bache.js b/js/Hydraulics/Bache.js index 2fd0be9b..39f3db38 100644 --- a/js/Hydraulics/Bache.js +++ b/js/Hydraulics/Bache.js @@ -38,6 +38,8 @@ function Bache() { return this.x; } Bache.prototype.get = function Bache() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Parametres de la bache"; var options = { Patm:["Pression dans le ciel de la bache : Patm (Pa)",this.Patm], A:["Section de la bache : A (m2)",this.A], @@ -78,7 +80,6 @@ function Bache() { return new BasicBlock(this.x); } Bache.prototype.get_popup_title = function Bache() { - var set_param_popup_title = "Parametres de la bache"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Hydraulics/Flowmeter.js b/js/Hydraulics/Flowmeter.js index 465d5682..52f64379 100644 --- a/js/Hydraulics/Flowmeter.js +++ b/js/Hydraulics/Flowmeter.js @@ -53,6 +53,9 @@ function Flowmeter() { return this.x; } Flowmeter.prototype.get = function Flowmeter() { + var exprs = this.graphics.exprs; + var exprs = this.x.graphics.exprs; + this.set_param_popup_title = "Set Flowmeter block parameters:"; var options = { Qini:["Qini",this.Qini], } @@ -75,7 +78,6 @@ function Flowmeter() { return new BasicBlock(this.x); } Flowmeter.prototype.get_popup_title = function Flowmeter() { - var set_param_popup_title = "Set Flowmeter block parameters:"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Hydraulics/PerteDP.js b/js/Hydraulics/PerteDP.js index 47ea2b33..80939bc5 100644 --- a/js/Hydraulics/PerteDP.js +++ b/js/Hydraulics/PerteDP.js @@ -33,6 +33,8 @@ function PerteDP() { return this.x; } PerteDP.prototype.get = function PerteDP() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Parametres du tuyau"; var options = { L:["Longueur du tube : L (m)",this.L], D:["Diamètre interne du tube : D (m)",this.D], @@ -67,7 +69,6 @@ function PerteDP() { return new BasicBlock(this.x); } PerteDP.prototype.get_popup_title = function PerteDP() { - var set_param_popup_title = "Parametres du tuyau"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Hydraulics/PuitsP.js b/js/Hydraulics/PuitsP.js index d1d0538e..eb2937b3 100644 --- a/js/Hydraulics/PuitsP.js +++ b/js/Hydraulics/PuitsP.js @@ -26,6 +26,8 @@ function PuitsP() { return this.x; } PuitsP.prototype.get = function PuitsP() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Paramètres du puits"; var options = { P0:["Pression de la source : P0 (Pa)",this.P0], T0:["Temperature de la source : T0 (K)",this.T0], @@ -56,7 +58,6 @@ function PuitsP() { return new BasicBlock(this.x); } PuitsP.prototype.get_popup_title = function PuitsP() { - var set_param_popup_title = "Paramètres du puits"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Hydraulics/SourceP.js b/js/Hydraulics/SourceP.js index 120c93b0..708ea843 100644 --- a/js/Hydraulics/SourceP.js +++ b/js/Hydraulics/SourceP.js @@ -28,6 +28,8 @@ function SourceP() { return this.x; } SourceP.prototype.get = function SourceP() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Paramètres du puits"; var options = { P0:["Pression de la source : P0 (Pa)",this.P0], T0:["Temperature de la source : T0 (K)",this.T0], @@ -58,7 +60,6 @@ function SourceP() { return new BasicBlock(this.x); } SourceP.prototype.get_popup_title = function SourceP() { - var set_param_popup_title = "Paramètres du puits"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Hydraulics/VanneReglante.js b/js/Hydraulics/VanneReglante.js index fef56e7b..a52ab470 100644 --- a/js/Hydraulics/VanneReglante.js +++ b/js/Hydraulics/VanneReglante.js @@ -29,6 +29,8 @@ function VanneReglante() { return this.x; } VanneReglante.prototype.get = function VanneReglante() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Paramètres de la vanne reglante"; var options = { Cvmax:["Cvmax",this.Cvmax], p_rho:["p_rho",this.p_rho], @@ -55,7 +57,6 @@ function VanneReglante() { return new BasicBlock(this.x); } VanneReglante.prototype.get_popup_title = function VanneReglante() { - var set_param_popup_title = "Paramètres de la vanne reglante"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/IntegerOp/BITCLEAR.js b/js/IntegerOp/BITCLEAR.js index 8fda742f..a22a133c 100644 --- a/js/IntegerOp/BITCLEAR.js +++ b/js/IntegerOp/BITCLEAR.js @@ -21,6 +21,8 @@ function BITCLEAR() { return this.x; } BITCLEAR.prototype.get = function BITCLEAR() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = msprintf("Set %s block parameters","BITCLEAR"); var options = { Datatype:[msprintf("Data Type %s","(3:int32, 4:int16, 5:int8, ...)"),this.Datatype], bit:["Index of Bit (0 is least significant)",this.bit], @@ -95,7 +97,6 @@ function BITCLEAR() { return new BasicBlock(this.x); } BITCLEAR.prototype.get_popup_title = function BITCLEAR() { - var set_param_popup_title = msprintf("Set %s block parameters","BITCLEAR"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/IntegerOp/BITSET.js b/js/IntegerOp/BITSET.js index 28274e36..46a5273b 100644 --- a/js/IntegerOp/BITSET.js +++ b/js/IntegerOp/BITSET.js @@ -21,6 +21,8 @@ function BITSET() { return this.x; } BITSET.prototype.get = function BITSET() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = msprintf("Set %s block parameters","BITSET"); var options = { Datatype:[msprintf("Data Type %s","(3:int32, 4:int16, 5:int8, ...)"),this.Datatype], bit:["Index of Bit (0 is least significant)",this.bit], @@ -93,7 +95,6 @@ function BITSET() { return new BasicBlock(this.x); } BITSET.prototype.get_popup_title = function BITSET() { - var set_param_popup_title = msprintf("Set %s block parameters","BITSET"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/IntegerOp/CONVERT.js b/js/IntegerOp/CONVERT.js index 7fc0d844..be253a0c 100644 --- a/js/IntegerOp/CONVERT.js +++ b/js/IntegerOp/CONVERT.js @@ -23,6 +23,8 @@ function CONVERT() { return this.x; } CONVERT.prototype.get = function CONVERT() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = msprintf("Set %s block parameters","CONVERT"); var options = { it:["Input Type (1:double, 3:int32, 4:int16, 5:int8, ...)",this.it], ot:["Output Type (1:double, 3:int32, 4:int16, 5:int8, ...)",this.ot], @@ -381,7 +383,6 @@ function CONVERT() { return new BasicBlock(this.x); } CONVERT.prototype.get_popup_title = function CONVERT() { - var set_param_popup_title = msprintf("Set %s block parameters","CONVERT"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/IntegerOp/DFLIPFLOP.js b/js/IntegerOp/DFLIPFLOP.js index 1c17a98f..e73cbdff 100644 --- a/js/IntegerOp/DFLIPFLOP.js +++ b/js/IntegerOp/DFLIPFLOP.js @@ -102,7 +102,6 @@ function DFLIPFLOP() { return new BasicBlock(this.x); } DFLIPFLOP.prototype.get_popup_title = function DFLIPFLOP() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/IntegerOp/DLATCH.js b/js/IntegerOp/DLATCH.js index 10a1b68a..3db5ca98 100644 --- a/js/IntegerOp/DLATCH.js +++ b/js/IntegerOp/DLATCH.js @@ -47,7 +47,6 @@ function DLATCH() { return new BasicBlock(this.x); } DLATCH.prototype.get_popup_title = function DLATCH() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/IntegerOp/EXTRACTBITS.js b/js/IntegerOp/EXTRACTBITS.js index c9733c28..805f0e68 100644 --- a/js/IntegerOp/EXTRACTBITS.js +++ b/js/IntegerOp/EXTRACTBITS.js @@ -22,6 +22,8 @@ function EXTRACTBITS() { return this.x; } EXTRACTBITS.prototype.get = function EXTRACTBITS() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = msprintf("Set %s block parameters","EXTRACTBITS"); var options = { Datatype:[msprintf("Data Type %s","(3:int32, 4:int16, 5:int8, ...)"),this.Datatype], rule:["Bits to extract",this.rule], @@ -242,7 +244,6 @@ function EXTRACTBITS() { return new BasicBlock(this.x); } EXTRACTBITS.prototype.get_popup_title = function EXTRACTBITS() { - var set_param_popup_title = msprintf("Set %s block parameters","EXTRACTBITS"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/IntegerOp/INTMUL.js b/js/IntegerOp/INTMUL.js index f525e597..ed5a179e 100644 --- a/js/IntegerOp/INTMUL.js +++ b/js/IntegerOp/INTMUL.js @@ -23,6 +23,8 @@ function INTMUL() { return this.x; } INTMUL.prototype.get = function INTMUL() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = msprintf("Set %s block parameters","INTMUL"); var options = { Datatype:[msprintf("Data Type %s","(3:int32, 4:int16, 5:int8, ...)"),this.Datatype], np:["Do on Overflow (0:Nothing, 1:Saturate, 2:Error)",this.np], @@ -115,7 +117,6 @@ function INTMUL() { return new BasicBlock(this.x); } INTMUL.prototype.get_popup_title = function INTMUL() { - var set_param_popup_title = msprintf("Set %s block parameters","INTMUL"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/IntegerOp/JKFLIPFLOP.js b/js/IntegerOp/JKFLIPFLOP.js index e171bcad..bdeef0a4 100644 --- a/js/IntegerOp/JKFLIPFLOP.js +++ b/js/IntegerOp/JKFLIPFLOP.js @@ -52,6 +52,16 @@ function JKFLIPFLOP() { return this.x; } JKFLIPFLOP.prototype.get = function JKFLIPFLOP() { + if (typeof(o)=="Block"&&o.gui=="DOLLAR_m") { + var path = i; + break; + } + } + var newpar = list(); + var exprs = xx.graphics.exprs[1-1]; + this.model = xx.model; + var init_old = this.model.odstate[1-1]; + this.set_param_popup_title = msprintf("Set %s block parameters","JKFLIPFLOP"); var options = { init:["Initial Value",this.init], } @@ -96,7 +106,6 @@ function JKFLIPFLOP() { return new BasicBlock(this.x); } JKFLIPFLOP.prototype.get_popup_title = function JKFLIPFLOP() { - var set_param_popup_title = msprintf("Set %s block parameters","JKFLIPFLOP"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/IntegerOp/LOGIC.js b/js/IntegerOp/LOGIC.js index 6c4b8ac3..8575f03d 100644 --- a/js/IntegerOp/LOGIC.js +++ b/js/IntegerOp/LOGIC.js @@ -24,6 +24,8 @@ function LOGIC() { return this.x; } LOGIC.prototype.get = function LOGIC() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = msprintf("Set %s block parameters","LOGIC"); var options = { mat:["Truth Table (matrix of outputs)",this.mat.toString().replace(/,/g," ")], herit:["Accepts Inherited Events (0:No, 1:Yes)",this.herit], @@ -75,7 +77,6 @@ function LOGIC() { return new BasicBlock(this.x); } LOGIC.prototype.get_popup_title = function LOGIC() { - var set_param_popup_title = msprintf("Set %s block parameters","LOGIC"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/IntegerOp/SHIFT.js b/js/IntegerOp/SHIFT.js index 60bb717e..21285d80 100644 --- a/js/IntegerOp/SHIFT.js +++ b/js/IntegerOp/SHIFT.js @@ -24,6 +24,8 @@ function SHIFT() { return this.x; } SHIFT.prototype.get = function SHIFT() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = msprintf("Set %s block parameters","SHIFT"); var options = { Datatype:[msprintf("Data Type %s","(3:int32, 4:int16, 5:int8, ...)"),this.Datatype], nb:["Number of Bits to Shift Left (Negative number to shift right)",this.nb], @@ -132,7 +134,6 @@ function SHIFT() { return new BasicBlock(this.x); } SHIFT.prototype.get_popup_title = function SHIFT() { - var set_param_popup_title = msprintf("Set %s block parameters","SHIFT"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/IntegerOp/SRFLIPFLOP.js b/js/IntegerOp/SRFLIPFLOP.js index 9172869f..31f3b6ca 100644 --- a/js/IntegerOp/SRFLIPFLOP.js +++ b/js/IntegerOp/SRFLIPFLOP.js @@ -36,6 +36,16 @@ function SRFLIPFLOP() { return this.x; } SRFLIPFLOP.prototype.get = function SRFLIPFLOP() { + if (typeof(o)=="Block"&&o.gui=="DOLLAR_m") { + var path = i; + break; + } + } + var newpar = list(); + var exprs = xx.graphics.exprs[1-1]; + this.model = xx.model; + var init_old = this.model.odstate[1-1]; + this.set_param_popup_title = msprintf("Set %s block parameters","SRFLIPFLOP"); var options = { init:["Initial Value",this.init], } @@ -80,7 +90,6 @@ function SRFLIPFLOP() { return new BasicBlock(this.x); } SRFLIPFLOP.prototype.get_popup_title = function SRFLIPFLOP() { - var set_param_popup_title = msprintf("Set %s block parameters","SRFLIPFLOP"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Linear/BIGSOM_f.js b/js/Linear/BIGSOM_f.js index 8bb727b2..82858cb8 100644 --- a/js/Linear/BIGSOM_f.js +++ b/js/Linear/BIGSOM_f.js @@ -18,6 +18,8 @@ function BIGSOM_f() { return this.x; } BIGSOM_f.prototype.get = function BIGSOM_f() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set sum block parameters"; var options = { sgn:["Inputs ports signs/gain",this.sgn.toString().replace(/,/g," ")], } @@ -48,7 +50,6 @@ function BIGSOM_f() { return new BigSom(this.x); } BIGSOM_f.prototype.get_popup_title = function BIGSOM_f() { - var set_param_popup_title = "Set sum block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Linear/CLINDUMMY_f.js b/js/Linear/CLINDUMMY_f.js index 08889e05..73e4bd95 100644 --- a/js/Linear/CLINDUMMY_f.js +++ b/js/Linear/CLINDUMMY_f.js @@ -22,7 +22,6 @@ function CLINDUMMY_f() { return new BasicBlock(this.x); } CLINDUMMY_f.prototype.get_popup_title = function CLINDUMMY_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Linear/CLR.js b/js/Linear/CLR.js index f44b534d..b39762ae 100644 --- a/js/Linear/CLR.js +++ b/js/Linear/CLR.js @@ -23,6 +23,15 @@ function CLR() { return this.x; } CLR.prototype.get = function CLR() { + var exprs = this.graphics.exprs; + var x0 = this.model.state; + var rpar = this.model.rpar; + var ns = prod(size(x0)); + var nin = 1; + var nout = 1; + var PREVAR_scicos_context = PREVAR_scicos_context; + PREVAR_scicos_context.s = %s; + this.set_param_popup_title = "Set continuous SISO transfer parameters"; var options = { num:["Numerator (s)",this.num], den:["Denominator (s)",this.den], @@ -86,7 +95,6 @@ function CLR() { return new BasicBlock(this.x); } CLR.prototype.get_popup_title = function CLR() { - var set_param_popup_title = "Set continuous SISO transfer parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Linear/CLR_f.js b/js/Linear/CLR_f.js index 45ad9962..d08a56e2 100644 --- a/js/Linear/CLR_f.js +++ b/js/Linear/CLR_f.js @@ -23,6 +23,15 @@ function CLR_f() { return this.x; } CLR_f.prototype.get = function CLR_f() { + var exprs = this.graphics.exprs; + var x0 = this.model.state; + var rpar = this.model.rpar; + var ns = prod(size(x0)); + var nin = 1; + var nout = 1; + var PREVAR_scicos_context = PREVAR_scicos_context; + PREVAR_scicos_context.s = %s; + this.set_param_popup_title = "Set continuous SISO transfer parameters"; var options = { num:["Numerator (s)",this.num], den:["Denominator (s)",this.den], @@ -86,7 +95,6 @@ function CLR_f() { return new BasicBlock(this.x); } CLR_f.prototype.get_popup_title = function CLR_f() { - var set_param_popup_title = "Set continuous SISO transfer parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Linear/CLSS.js b/js/Linear/CLSS.js index 1e4f58fb..5f732c5d 100644 --- a/js/Linear/CLSS.js +++ b/js/Linear/CLSS.js @@ -25,6 +25,11 @@ function CLSS() { return this.x; } CLSS.prototype.get = function CLSS() { + var exprs = this.graphics.exprs; + if (size(exprs,"*")==7) { + var exprs = exprs[[1:4,7]-1]; + } + this.set_param_popup_title = "Set continuous linear system parameters"; var options = { A:["A matrix",this.A], B:["B matrix",this.B], @@ -105,7 +110,6 @@ function CLSS() { return new BasicBlock(this.x); } CLSS.prototype.get_popup_title = function CLSS() { - var set_param_popup_title = "Set continuous linear system parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Linear/CLSS_f.js b/js/Linear/CLSS_f.js index 045f2abe..98eb5131 100644 --- a/js/Linear/CLSS_f.js +++ b/js/Linear/CLSS_f.js @@ -25,6 +25,11 @@ function CLSS_f() { return this.x; } CLSS_f.prototype.get = function CLSS_f() { + var exprs = this.graphics.exprs; + if (size(exprs,"*")==7) { + var exprs = exprs[[1:4,7]-1]; + } + this.set_param_popup_title = "Set continuous linear system parameters"; var options = { A:["A matrix",this.A], B:["B matrix",this.B], @@ -95,7 +100,6 @@ function CLSS_f() { return new BasicBlock(this.x); } CLSS_f.prototype.get_popup_title = function CLSS_f() { - var set_param_popup_title = "Set continuous linear system parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Linear/DELAYV_f.js b/js/Linear/DELAYV_f.js index b6cfe6fd..027adbd7 100644 --- a/js/Linear/DELAYV_f.js +++ b/js/Linear/DELAYV_f.js @@ -25,6 +25,12 @@ function DELAYV_f() { return this.x; } DELAYV_f.prototype.get = function DELAYV_f() { + var exprs = this.graphics.exprs; + this.nin = this.model.in[1-1]; + var z0 = this.model.dstate; + this.zz0 = z0.slice(1-1,$-1); + var told = z0[$-1]; + this.set_param_popup_title = "Set delay parameters"; var options = { nin:["Number of inputs",this.nin], zz0:["Register initial condition",this.zz0], @@ -75,7 +81,6 @@ function DELAYV_f() { return new BasicBlock(this.x); } DELAYV_f.prototype.get_popup_title = function DELAYV_f() { - var set_param_popup_title = "Set delay parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Linear/DELAY_f.js b/js/Linear/DELAY_f.js index 579b7823..49bed7b4 100644 --- a/js/Linear/DELAY_f.js +++ b/js/Linear/DELAY_f.js @@ -69,6 +69,24 @@ function DELAY_f() { return this.x; } DELAY_f.prototype.get = function DELAY_f() { + var ppath = list(0,0); + if (typeof(o)=="Block"&&o.gui=="REGISTER_f") { + ppath[1-1] = i; + } + if (typeof(o)=="Block"&&o.gui=="EVTDLY_f") { + ppath[2-1] = i; + } + if (and(ppath!=list(0,0))) { + break; + } + } + var newpar = list(); + var register = this.x.model.rpar.objs[ppath[1-1]-1]; + var evtdly = this.x.model.rpar.objs[ppath[2-1]-1]; + var register_exprs = register.graphics.exprs; + var evtdly_exprs = evtdly.graphics.exprs; + var exprs = [[evtdly_exprs[1-1]],[register_exprs]]; + this.set_param_popup_title = "This block implements as a discretized delay"; var options = { dt:["Discretization time step",this.dt], z0:["Register initial state",this.z0], @@ -135,7 +153,6 @@ function DELAY_f() { return new BasicBlock(this.x); } DELAY_f.prototype.get_popup_title = function DELAY_f() { - var set_param_popup_title = "This block implements as a discretized delay"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Linear/DERIV.js b/js/Linear/DERIV.js index 136a70f5..7180b6b2 100644 --- a/js/Linear/DERIV.js +++ b/js/Linear/DERIV.js @@ -22,7 +22,6 @@ function DERIV() { return new BasicBlock(this.x); } DERIV.prototype.get_popup_title = function DERIV() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Linear/DIFF_c.js b/js/Linear/DIFF_c.js index f6ee6fec..118ba2cb 100644 --- a/js/Linear/DIFF_c.js +++ b/js/Linear/DIFF_c.js @@ -18,6 +18,8 @@ function DIFF_c() { return this.x; } DIFF_c.prototype.get = function DIFF_c() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set continuous linear system parameters"; var options = { x0:["Initial state",this.x0.toString().replace(/,/g," ")], xd0:["Initial Derivative",this.xd0], @@ -62,7 +64,6 @@ function DIFF_c() { return new BasicBlock(this.x); } DIFF_c.prototype.get_popup_title = function DIFF_c() { - var set_param_popup_title = "Set continuous linear system parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Linear/DLR.js b/js/Linear/DLR.js index d80c13a2..04ada0c5 100644 --- a/js/Linear/DLR.js +++ b/js/Linear/DLR.js @@ -24,6 +24,12 @@ function DLR() { return this.x; } DLR.prototype.get = function DLR() { + var exprs = this.graphics.exprs; + var x0 = this.model.dstate; + var ns = prod(size(x0)); + var PREVAR_scicos_context = PREVAR_scicos_context; + PREVAR_scicos_context.z = %z; + this.set_param_popup_title = "Set discrete SISO transfer parameters"; var options = { num:["Numerator (z)",this.num], den:["Denominator (z)",this.den], @@ -85,7 +91,6 @@ function DLR() { return new BasicBlock(this.x); } DLR.prototype.get_popup_title = function DLR() { - var set_param_popup_title = "Set discrete SISO transfer parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Linear/DLR_f.js b/js/Linear/DLR_f.js index 85c3d176..cc0b8b26 100644 --- a/js/Linear/DLR_f.js +++ b/js/Linear/DLR_f.js @@ -24,6 +24,12 @@ function DLR_f() { return this.x; } DLR_f.prototype.get = function DLR_f() { + var exprs = this.graphics.exprs; + var x0 = this.model.dstate; + var ns = prod(size(x0)); + var PREVAR_scicos_context = PREVAR_scicos_context; + PREVAR_scicos_context.z = %z; + this.set_param_popup_title = "Set discrete SISO transfer parameters"; var options = { num:["Numerator (z)",this.num], den:["Denominator (z)",this.den], @@ -85,7 +91,6 @@ function DLR_f() { return new BasicBlock(this.x); } DLR_f.prototype.get_popup_title = function DLR_f() { - var set_param_popup_title = "Set discrete SISO transfer parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Linear/DLSS.js b/js/Linear/DLSS.js index 6348c0e3..e3b84916 100644 --- a/js/Linear/DLSS.js +++ b/js/Linear/DLSS.js @@ -24,6 +24,11 @@ function DLSS() { return this.x; } DLSS.prototype.get = function DLSS() { + var exprs = this.graphics.exprs; + if (size(exprs,"*")==7) { + var exprs = exprs[[1:4,7]-1]; + } + this.set_param_popup_title = "Set discrete linear system parameters"; var options = { A:["A matrix",this.A], B:["B matrix",this.B], @@ -104,7 +109,6 @@ function DLSS() { return new BasicBlock(this.x); } DLSS.prototype.get_popup_title = function DLSS() { - var set_param_popup_title = "Set discrete linear system parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Linear/DLSS_f.js b/js/Linear/DLSS_f.js index b5fc3ebd..e85a06ef 100644 --- a/js/Linear/DLSS_f.js +++ b/js/Linear/DLSS_f.js @@ -24,6 +24,11 @@ function DLSS_f() { return this.x; } DLSS_f.prototype.get = function DLSS_f() { + var exprs = this.graphics.exprs; + if (size(exprs,"*")==7) { + var exprs = exprs[[1:4,7]-1]; + } + this.set_param_popup_title = "Set discrete linear system parameters"; var options = { A:["A matrix",this.A], B:["B matrix",this.B], @@ -94,7 +99,6 @@ function DLSS_f() { return new BasicBlock(this.x); } DLSS_f.prototype.get_popup_title = function DLSS_f() { - var set_param_popup_title = "Set discrete linear system parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Linear/DOLLAR.js b/js/Linear/DOLLAR.js index 28705a98..af263c92 100644 --- a/js/Linear/DOLLAR.js +++ b/js/Linear/DOLLAR.js @@ -21,6 +21,11 @@ function DOLLAR() { return this.x; } DOLLAR.prototype.get = function DOLLAR() { + var exprs = this.graphics.exprs; + if (size(exprs,"*")<2) { + exprs[2-1] = "0"; + } + this.set_param_popup_title = "Set 1/z block parameters"; var options = { a:["initial condition",this.a], inh:["Inherit (no:0, yes:1)",this.inh], @@ -48,7 +53,7 @@ function DOLLAR() { this.model.sim = list(new ScilabString(["dollar4_m"]), new ScilabDouble([4])); this.model.odstate = list(new ScilabDouble([this.a])); this.model.dstate = new ScilabDouble([]); - if (this.type[(this.a)==1-1]) { + if (type((this.a)==1)) { if (isreal(this.a)) { var it = 1; var ot = 1; @@ -100,7 +105,6 @@ function DOLLAR() { return new BasicBlock(this.x); } DOLLAR.prototype.get_popup_title = function DOLLAR() { - var set_param_popup_title = "Set 1/z block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Linear/DOLLAR.pickle b/js/Linear/DOLLAR.pickle index f41de5a7..f6e20a69 100644 --- a/js/Linear/DOLLAR.pickle +++ b/js/Linear/DOLLAR.pickle @@ -4,18 +4,16 @@ p0 ((lp1 S'a' p2 -aS'inh' +aS'x' p3 -aS'graphics' +aS'model' p4 -aS'x' +aS'inh' p5 -aS'model' +aS'graphics' p6 -aS'type' -p7 -atp8 -Rp9 +atp7 +Rp8 .(dp0 S'model.odstate' p1 diff --git a/js/Linear/DOLLAR_f.js b/js/Linear/DOLLAR_f.js index 069b7a75..04d5cf15 100644 --- a/js/Linear/DOLLAR_f.js +++ b/js/Linear/DOLLAR_f.js @@ -21,6 +21,11 @@ function DOLLAR_f() { return this.x; } DOLLAR_f.prototype.get = function DOLLAR_f() { + var exprs = this.graphics.exprs; + if (size(exprs,"*")<2) { + exprs[2-1] = "0"; + } + this.set_param_popup_title = "Set 1/z block parameters"; var options = { a:["initial condition",this.a], inh:["Inherit (no:0, yes:1)",this.inh], @@ -64,7 +69,6 @@ function DOLLAR_f() { return new BasicBlock(this.x); } DOLLAR_f.prototype.get_popup_title = function DOLLAR_f() { - var set_param_popup_title = "Set 1/z block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Linear/DOLLAR_m.js b/js/Linear/DOLLAR_m.js index 43baf0c2..8108e69a 100644 --- a/js/Linear/DOLLAR_m.js +++ b/js/Linear/DOLLAR_m.js @@ -21,6 +21,11 @@ function DOLLAR_m() { return this.x; } DOLLAR_m.prototype.get = function DOLLAR_m() { + var exprs = this.graphics.exprs; + if (size(exprs,"*")<2) { + exprs[2-1] = "0"; + } + this.set_param_popup_title = "Set 1/z block parameters"; var options = { a:["initial condition",this.a], inh:["Inherit (no:0, yes:1)",this.inh], @@ -48,7 +53,7 @@ function DOLLAR_m() { this.model.sim = list(new ScilabString(["dollar4_m"]), new ScilabDouble([4])); this.model.odstate = list(new ScilabDouble([this.a])); this.model.dstate = new ScilabDouble([]); - if ((this.type[this.a-1]==1)) { + if ((type(this.a)==1)) { if (isreal(this.a)) { var it = 1; var ot = 1; @@ -100,7 +105,6 @@ function DOLLAR_m() { return new BasicBlock(this.x); } DOLLAR_m.prototype.get_popup_title = function DOLLAR_m() { - var set_param_popup_title = "Set 1/z block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Linear/DOLLAR_m.pickle b/js/Linear/DOLLAR_m.pickle index f41de5a7..f6e20a69 100644 --- a/js/Linear/DOLLAR_m.pickle +++ b/js/Linear/DOLLAR_m.pickle @@ -4,18 +4,16 @@ p0 ((lp1 S'a' p2 -aS'inh' +aS'x' p3 -aS'graphics' +aS'model' p4 -aS'x' +aS'inh' p5 -aS'model' +aS'graphics' p6 -aS'type' -p7 -atp8 -Rp9 +atp7 +Rp8 .(dp0 S'model.odstate' p1 diff --git a/js/Linear/GAINBLK.js b/js/Linear/GAINBLK.js index 89c30062..0c75a5a7 100644 --- a/js/Linear/GAINBLK.js +++ b/js/Linear/GAINBLK.js @@ -24,6 +24,11 @@ function GAINBLK() { return this.x; } GAINBLK.prototype.get = function GAINBLK() { + var exprs = this.graphics.exprs; + if (size(exprs,"*")==1) { + var exprs = [[exprs],[sci2exp(0)]]; + } + this.set_param_popup_title = "Set gain block parameters"; var options = { gain:["Gain",this.gain], over:["Do On Overflow(0=Nothing 1=Saturate 2=Error)",this.over], @@ -167,7 +172,6 @@ function GAINBLK() { return new BasicBlock(this.x); } GAINBLK.prototype.get_popup_title = function GAINBLK() { - var set_param_popup_title = "Set gain block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Linear/GAINBLK_f.js b/js/Linear/GAINBLK_f.js index eddc903e..b3b22d63 100644 --- a/js/Linear/GAINBLK_f.js +++ b/js/Linear/GAINBLK_f.js @@ -20,6 +20,8 @@ function GAINBLK_f() { return this.x; } GAINBLK_f.prototype.get = function GAINBLK_f() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set gain block parameters"; var options = { gain:["Gain",this.gain], } @@ -57,7 +59,6 @@ function GAINBLK_f() { return new BasicBlock(this.x); } GAINBLK_f.prototype.get_popup_title = function GAINBLK_f() { - var set_param_popup_title = "Set gain block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Linear/GAIN_f.js b/js/Linear/GAIN_f.js index 9098ce8c..a141ab47 100644 --- a/js/Linear/GAIN_f.js +++ b/js/Linear/GAIN_f.js @@ -20,6 +20,8 @@ function GAIN_f() { return this.x; } GAIN_f.prototype.get = function GAIN_f() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set gain block parameters"; var options = { gain:["Gain",this.gain], } @@ -57,7 +59,6 @@ function GAIN_f() { return new BasicBlock(this.x); } GAIN_f.prototype.get_popup_title = function GAIN_f() { - var set_param_popup_title = "Set gain block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Linear/INTEGRAL.js b/js/Linear/INTEGRAL.js index 7ffd63a9..372bee07 100644 --- a/js/Linear/INTEGRAL.js +++ b/js/Linear/INTEGRAL.js @@ -22,6 +22,8 @@ function INTEGRAL() { return this.x; } INTEGRAL.prototype.get = function INTEGRAL() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set Integral block parameters"; var options = { x0:["Initial Condition",this.x0], reinit:["With re-intialization (1:yes, 0:no)",this.reinit], @@ -98,7 +100,6 @@ function INTEGRAL() { return new BasicBlock(this.x); } INTEGRAL.prototype.get_popup_title = function INTEGRAL() { - var set_param_popup_title = "Set Integral block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Linear/INTEGRAL_f.js b/js/Linear/INTEGRAL_f.js index d1ee8a31..c7e7854b 100644 --- a/js/Linear/INTEGRAL_f.js +++ b/js/Linear/INTEGRAL_f.js @@ -18,6 +18,8 @@ function INTEGRAL_f() { return this.x; } INTEGRAL_f.prototype.get = function INTEGRAL_f() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set continuous linear system parameters"; var options = { x0:["Initial state",this.x0], } @@ -42,7 +44,6 @@ function INTEGRAL_f() { return new BasicBlock(this.x); } INTEGRAL_f.prototype.get_popup_title = function INTEGRAL_f() { - var set_param_popup_title = "Set continuous linear system parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Linear/INTEGRAL_m.js b/js/Linear/INTEGRAL_m.js index c53e466f..b0efc448 100644 --- a/js/Linear/INTEGRAL_m.js +++ b/js/Linear/INTEGRAL_m.js @@ -23,6 +23,8 @@ function INTEGRAL_m() { return this.x; } INTEGRAL_m.prototype.get = function INTEGRAL_m() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set Integral block parameters"; var options = { x0:["Initial Condition",this.x0], reinit:["With re-intialization (1:yes, 0:no)",this.reinit], @@ -145,7 +147,6 @@ function INTEGRAL_m() { return new BasicBlock(this.x); } INTEGRAL_m.prototype.get_popup_title = function INTEGRAL_m() { - var set_param_popup_title = "Set Integral block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Linear/PID.js b/js/Linear/PID.js index 8c346451..3eccc084 100644 --- a/js/Linear/PID.js +++ b/js/Linear/PID.js @@ -43,6 +43,41 @@ function PID() { return this.x; } PID.prototype.get = function PID() { + var ppath = list(0,0,0); + if (typeof(o)=="Link") { + if (from.gui=="GAINBLK") { + switch (to.gui) { + case "SUMMATION": + ppath[1-1] = o.from[1-1]; + case "INTEGRAL_m": + ppath[2-1] = o.from[1-1]; + case "DERIV": + ppath[3-1] = o.from[1-1]; + } + } else if (to.gui=="GAINBLK") { + switch (from.gui) { + case "SUMMATION": + ppath[1-1] = o.to[1-1]; + case "INTEGRAL_m": + ppath[2-1] = o.to[1-1]; + case "DERIV": + ppath[3-1] = o.to[1-1]; + } + } + if (and(ppath!=list(0,0,0))) { + break; + } + } + } + var newpar = list(); + exprs[1-1] = xx1.graphics.exprs[1-1]; + var p_old = xx1.model.rpar; + exprs[2-1] = xx2.graphics.exprs[1-1]; + var i_old = xx2.model.rpar; + exprs[3-1] = xx3.graphics.exprs[1-1]; + var d_old = xx3.model.rpar; + var y = 0; + this.set_param_popup_title = "Set PID parameters"; var options = { p:["Proportional",this.p], i:["Integral",this.i], @@ -116,7 +151,6 @@ function PID() { return new BasicBlock(this.x); } PID.prototype.get_popup_title = function PID() { - var set_param_popup_title = "Set PID parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Linear/REGISTER.js b/js/Linear/REGISTER.js index c99b2f8b..86c391b7 100644 --- a/js/Linear/REGISTER.js +++ b/js/Linear/REGISTER.js @@ -19,6 +19,11 @@ function REGISTER() { return this.x; } REGISTER.prototype.get = function REGISTER() { + var exprs = this.graphics.exprs; + if (size(exprs,1)==1) { + var exprs = [[exprs],[sci2exp(1)]]; + } + this.set_param_popup_title = "Set delay parameters"; var options = { z0:["Register initial condition",this.z0], it:["Datatype (1=double 3=int32 ...)",this.it], @@ -92,7 +97,6 @@ function REGISTER() { return new BasicBlock(this.x); } REGISTER.prototype.get_popup_title = function REGISTER() { - var set_param_popup_title = "Set delay parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Linear/REGISTER_f.js b/js/Linear/REGISTER_f.js index 786806ab..3e660cc3 100644 --- a/js/Linear/REGISTER_f.js +++ b/js/Linear/REGISTER_f.js @@ -19,6 +19,8 @@ function REGISTER_f() { return this.x; } REGISTER_f.prototype.get = function REGISTER_f() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set delay parameters"; var options = { z0:["Register initial condition",this.z0], } @@ -49,7 +51,6 @@ function REGISTER_f() { return new BasicBlock(this.x); } REGISTER_f.prototype.get_popup_title = function REGISTER_f() { - var set_param_popup_title = "Set delay parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Linear/SAMPHOLD.js b/js/Linear/SAMPHOLD.js index 8e0477b8..76c5b115 100644 --- a/js/Linear/SAMPHOLD.js +++ b/js/Linear/SAMPHOLD.js @@ -24,7 +24,6 @@ function SAMPHOLD() { return new BasicBlock(this.x); } SAMPHOLD.prototype.get_popup_title = function SAMPHOLD() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Linear/SAMPHOLD_m.js b/js/Linear/SAMPHOLD_m.js index f9ed7a43..5626fe8c 100644 --- a/js/Linear/SAMPHOLD_m.js +++ b/js/Linear/SAMPHOLD_m.js @@ -21,6 +21,9 @@ function SAMPHOLD_m() { return this.x; } SAMPHOLD_m.prototype.get = function SAMPHOLD_m() { + this.x.model.firing = []; + var label = this.graphics.exprs; + this.set_param_popup_title = "Set parameters Block"; var options = { it:["Datatype(1=real double 2=Complex 3=int32 ...)",this.it], } @@ -56,7 +59,6 @@ function SAMPHOLD_m() { return new BasicBlock(this.x); } SAMPHOLD_m.prototype.get_popup_title = function SAMPHOLD_m() { - var set_param_popup_title = "Set parameters Block"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Linear/SAMPLEHOLD_f.js b/js/Linear/SAMPLEHOLD_f.js index 9df1c5c1..aa828d29 100644 --- a/js/Linear/SAMPLEHOLD_f.js +++ b/js/Linear/SAMPLEHOLD_f.js @@ -24,7 +24,6 @@ function SAMPLEHOLD_f() { return new BasicBlock(this.x); } SAMPLEHOLD_f.prototype.get_popup_title = function SAMPLEHOLD_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Linear/SOM_f.js b/js/Linear/SOM_f.js index 4fd3c9b5..f2f1902f 100644 --- a/js/Linear/SOM_f.js +++ b/js/Linear/SOM_f.js @@ -40,7 +40,6 @@ function SOM_f() { return new BasicBlock(this.x); } SOM_f.prototype.get_popup_title = function SOM_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Linear/SUMMATION.js b/js/Linear/SUMMATION.js index 37d5b7eb..665519fc 100644 --- a/js/Linear/SUMMATION.js +++ b/js/Linear/SUMMATION.js @@ -20,6 +20,13 @@ function SUMMATION() { return this.x; } SUMMATION.prototype.get = function SUMMATION() { + var exprs = this.graphics.exprs; + if (size(exprs,1)==1) { + var exprs = [[sci2exp(1)],[exprs],[sci2exp(0)]]; + } else if (size(exprs,1)==2) { + var exprs = [[exprs],[sci2exp(0)]]; + } + this.set_param_popup_title = "Set sum block parameters"; var options = { Datatype:["Datatype (1=real double 2=complex 3=int32 ...)",this.Datatype], sgn:["Number of inputs or sign vector (of +1, -1)",this.sgn.toString().replace(/,/g," ")], @@ -152,7 +159,6 @@ function SUMMATION() { return new Summation(this.x); } SUMMATION.prototype.get_popup_title = function SUMMATION() { - var set_param_popup_title = "Set sum block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Linear/SUM_f.js b/js/Linear/SUM_f.js index 96d28c42..679e71cc 100644 --- a/js/Linear/SUM_f.js +++ b/js/Linear/SUM_f.js @@ -22,7 +22,6 @@ function SUM_f() { return new RoundBlock(this.x); } SUM_f.prototype.get_popup_title = function SUM_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Linear/TCLSS.js b/js/Linear/TCLSS.js index c73804d1..63c2ab86 100644 --- a/js/Linear/TCLSS.js +++ b/js/Linear/TCLSS.js @@ -27,6 +27,11 @@ function TCLSS() { return this.x; } TCLSS.prototype.get = function TCLSS() { + var exprs = this.graphics.exprs; + if (size(exprs,"*")==7) { + var exprs = exprs[[1:4,7]-1]; + } + this.set_param_popup_title = "Set continuous linear system parameters"; var options = { A:["A matrix",this.A], B:["B matrix",this.B], @@ -102,7 +107,6 @@ function TCLSS() { return new BasicBlock(this.x); } TCLSS.prototype.get_popup_title = function TCLSS() { - var set_param_popup_title = "Set continuous linear system parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Linear/TCLSS_f.js b/js/Linear/TCLSS_f.js index 34171ae1..35a50172 100644 --- a/js/Linear/TCLSS_f.js +++ b/js/Linear/TCLSS_f.js @@ -27,6 +27,11 @@ function TCLSS_f() { return this.x; } TCLSS_f.prototype.get = function TCLSS_f() { + var exprs = this.graphics.exprs; + if (size(exprs,"*")==7) { + var exprs = exprs[[1:4,7]-1]; + } + this.set_param_popup_title = "Set continuous linear system parameters"; var options = { A:["A matrix",this.A], B:["B matrix",this.B], @@ -102,7 +107,6 @@ function TCLSS_f() { return new BasicBlock(this.x); } TCLSS_f.prototype.get_popup_title = function TCLSS_f() { - var set_param_popup_title = "Set continuous linear system parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Linear/TIME_DELAY.js b/js/Linear/TIME_DELAY.js index 42396604..8a9510ac 100644 --- a/js/Linear/TIME_DELAY.js +++ b/js/Linear/TIME_DELAY.js @@ -22,6 +22,9 @@ function TIME_DELAY() { return this.x; } TIME_DELAY.prototype.get = function TIME_DELAY() { + var exprs = this.graphics.exprs; + var nin = this.model.in[1-1]; + this.set_param_popup_title = "Set delay parameters"; var options = { T:["Delay",this.T], init:["initial input",this.init], @@ -70,7 +73,6 @@ function TIME_DELAY() { return new BasicBlock(this.x); } TIME_DELAY.prototype.get_popup_title = function TIME_DELAY() { - var set_param_popup_title = "Set delay parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Linear/VARIABLE_DELAY.js b/js/Linear/VARIABLE_DELAY.js index c76c8a29..f5af9a08 100644 --- a/js/Linear/VARIABLE_DELAY.js +++ b/js/Linear/VARIABLE_DELAY.js @@ -22,6 +22,9 @@ function VARIABLE_DELAY() { return this.x; } VARIABLE_DELAY.prototype.get = function VARIABLE_DELAY() { + var exprs = this.graphics.exprs; + var nin = this.model.in[1-1]; + this.set_param_popup_title = "Set delay parameters"; var options = { T:["Max delay",this.T], init:["initial input",this.init], @@ -69,7 +72,6 @@ function VARIABLE_DELAY() { return new BasicBlock(this.x); } VARIABLE_DELAY.prototype.get_popup_title = function VARIABLE_DELAY() { - var set_param_popup_title = "Set delay parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/MatrixOp/CUMSUM.js b/js/MatrixOp/CUMSUM.js index d0cc813c..e4c3f6ea 100644 --- a/js/MatrixOp/CUMSUM.js +++ b/js/MatrixOp/CUMSUM.js @@ -29,6 +29,11 @@ function CUMSUM() { return this.x; } CUMSUM.prototype.get = function CUMSUM() { + var label = this.graphics.exprs; + if (size(label,"*")==14) { + label[9-1] = []; + } + this.set_param_popup_title = "Set CUMSUM block parameters"; var options = { typ:["Datatype(1=real double 2=Complex)",this.typ], decomptyp:["Sum along (0=the first non singleton dimension 1=Rows 2=Columns)",this.decomptyp], @@ -103,7 +108,6 @@ function CUMSUM() { return new BasicBlock(this.x); } CUMSUM.prototype.get_popup_title = function CUMSUM() { - var set_param_popup_title = "Set CUMSUM block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/MatrixOp/EXTRACT.js b/js/MatrixOp/EXTRACT.js index ee7f77bb..9af77da4 100644 --- a/js/MatrixOp/EXTRACT.js +++ b/js/MatrixOp/EXTRACT.js @@ -29,6 +29,11 @@ function EXTRACT() { return this.x; } EXTRACT.prototype.get = function EXTRACT() { + var label = this.graphics.exprs; + if (size(label,"*")==14) { + label[9-1] = []; + } + this.set_param_popup_title = "Set EXTRACT Block"; var options = { typ:["Datatype (1=real double 2=Complex)",this.typ], a:["Lines to extract",this.a], @@ -104,7 +109,6 @@ function EXTRACT() { return new BasicBlock(this.x); } EXTRACT.prototype.get_popup_title = function EXTRACT() { - var set_param_popup_title = "Set EXTRACT Block"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/MatrixOp/EXTTRI.js b/js/MatrixOp/EXTTRI.js index d874fbff..726daa2c 100644 --- a/js/MatrixOp/EXTTRI.js +++ b/js/MatrixOp/EXTTRI.js @@ -29,6 +29,11 @@ function EXTTRI() { return this.x; } EXTTRI.prototype.get = function EXTTRI() { + var label = this.graphics.exprs; + if (size(label,"*")==14) { + label[9-1] = []; + } + this.set_param_popup_title = "Set EXTTRI block parameters"; var options = { typ:["Datatype(1=real double 2=Complex)",this.typ], decomptyp:["extraction type (1=lower 2=upper 3=diagonal)",this.decomptyp], @@ -100,7 +105,6 @@ function EXTTRI() { return new BasicBlock(this.x); } EXTTRI.prototype.get_popup_title = function EXTTRI() { - var set_param_popup_title = "Set EXTTRI block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/MatrixOp/MATBKSL.js b/js/MatrixOp/MATBKSL.js index f0a16862..3f8e402b 100644 --- a/js/MatrixOp/MATBKSL.js +++ b/js/MatrixOp/MATBKSL.js @@ -29,6 +29,11 @@ function MATBKSL() { return this.x; } MATBKSL.prototype.get = function MATBKSL() { + var label = this.graphics.exprs; + if (size(label,"*")==14) { + label[9-1] = []; + } + this.set_param_popup_title = "Set MATBKSL Block"; var options = { typ:["Datatype (1=real double 2=Complex)",this.typ], } @@ -76,7 +81,6 @@ function MATBKSL() { return new BasicBlock(this.x); } MATBKSL.prototype.get_popup_title = function MATBKSL() { - var set_param_popup_title = "Set MATBKSL Block"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/MatrixOp/MATCATH.js b/js/MatrixOp/MATCATH.js index 4c21162d..b176cd8c 100644 --- a/js/MatrixOp/MATCATH.js +++ b/js/MatrixOp/MATCATH.js @@ -29,6 +29,11 @@ function MATCATH() { return this.x; } MATCATH.prototype.get = function MATCATH() { + var label = this.graphics.exprs; + if (size(label,"*")>1) { + var label = "size(evstr("+label[2-1]+"),\'*\')"; + } + this.set_param_popup_title = "Set MATCATH block parameters"; var options = { nin:["Number of input",this.nin], } @@ -65,7 +70,6 @@ function MATCATH() { return new BasicBlock(this.x); } MATCATH.prototype.get_popup_title = function MATCATH() { - var set_param_popup_title = "Set MATCATH block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/MatrixOp/MATCATV.js b/js/MatrixOp/MATCATV.js index b8241695..80a2fee4 100644 --- a/js/MatrixOp/MATCATV.js +++ b/js/MatrixOp/MATCATV.js @@ -30,6 +30,11 @@ function MATCATV() { return this.x; } MATCATV.prototype.get = function MATCATV() { + var label = this.graphics.exprs; + if (size(label,"*")>1) { + var label = "size(evstr("+label[2-1]+"),\'*\')"; + } + this.set_param_popup_title = "Set MATCATV block parameters"; var options = { nin:["Number od inputs",this.nin], } @@ -66,7 +71,6 @@ function MATCATV() { return new BasicBlock(this.x); } MATCATV.prototype.get_popup_title = function MATCATV() { - var set_param_popup_title = "Set MATCATV block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/MatrixOp/MATDET.js b/js/MatrixOp/MATDET.js index c2e37940..b03953df 100644 --- a/js/MatrixOp/MATDET.js +++ b/js/MatrixOp/MATDET.js @@ -29,6 +29,11 @@ function MATDET() { return this.x; } MATDET.prototype.get = function MATDET() { + var label = this.graphics.exprs; + if (size(label,"*")==14) { + label[9-1] = []; + } + this.set_param_popup_title = "Set MATDET Block"; var options = { typ:["Datatype(1=real double 2=Complex)",this.typ], } @@ -76,7 +81,6 @@ function MATDET() { return new BasicBlock(this.x); } MATDET.prototype.get_popup_title = function MATDET() { - var set_param_popup_title = "Set MATDET Block"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/MatrixOp/MATDIAG.js b/js/MatrixOp/MATDIAG.js index b95d12c0..80baf684 100644 --- a/js/MatrixOp/MATDIAG.js +++ b/js/MatrixOp/MATDIAG.js @@ -29,6 +29,11 @@ function MATDIAG() { return this.x; } MATDIAG.prototype.get = function MATDIAG() { + var label = this.graphics.exprs; + if (size(label,"*")==14) { + label[9-1] = []; + } + this.set_param_popup_title = "Set MATDIAG Block"; var options = { typ:["Datatype (1=real double 2=Complex)",this.typ], } @@ -76,7 +81,6 @@ function MATDIAG() { return new BasicBlock(this.x); } MATDIAG.prototype.get_popup_title = function MATDIAG() { - var set_param_popup_title = "Set MATDIAG Block"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/MatrixOp/MATDIV.js b/js/MatrixOp/MATDIV.js index e9441c86..b2fd6830 100644 --- a/js/MatrixOp/MATDIV.js +++ b/js/MatrixOp/MATDIV.js @@ -29,6 +29,11 @@ function MATDIV() { return this.x; } MATDIV.prototype.get = function MATDIV() { + var label = this.graphics.exprs; + if (size(label,"*")==14) { + label[9-1] = []; + } + this.set_param_popup_title = "Set MATDIV Block"; var options = { typ:["Datatype(1=real double 2=Complex)",this.typ], } @@ -76,7 +81,6 @@ function MATDIV() { return new BasicBlock(this.x); } MATDIV.prototype.get_popup_title = function MATDIV() { - var set_param_popup_title = "Set MATDIV Block"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/MatrixOp/MATEIG.js b/js/MatrixOp/MATEIG.js index 26b334eb..f7f7e4f5 100644 --- a/js/MatrixOp/MATEIG.js +++ b/js/MatrixOp/MATEIG.js @@ -29,6 +29,11 @@ function MATEIG() { return this.x; } MATEIG.prototype.get = function MATEIG() { + var label = this.graphics.exprs; + if (size(label,"*")==14) { + label[9-1] = []; + } + this.set_param_popup_title = "Set MATEIG block parameters"; var options = { typ:["Datatype(1=real double 2=Complex)",this.typ], decomptyp:["decomposition type (1=eig values 2=eig values+eig vectors",this.decomptyp], @@ -101,7 +106,6 @@ function MATEIG() { return new BasicBlock(this.x); } MATEIG.prototype.get_popup_title = function MATEIG() { - var set_param_popup_title = "Set MATEIG block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/MatrixOp/MATEXPM.js b/js/MatrixOp/MATEXPM.js index 110f237d..f004fbfb 100644 --- a/js/MatrixOp/MATEXPM.js +++ b/js/MatrixOp/MATEXPM.js @@ -29,6 +29,11 @@ function MATEXPM() { return this.x; } MATEXPM.prototype.get = function MATEXPM() { + var label = this.graphics.exprs; + if (size(label,"*")==14) { + label[9-1] = []; + } + this.set_param_popup_title = "Set EXPM Block"; var options = { typ:["Datatype(1=real double 2=Complex)",this.typ], } @@ -76,7 +81,6 @@ function MATEXPM() { return new BasicBlock(this.x); } MATEXPM.prototype.get_popup_title = function MATEXPM() { - var set_param_popup_title = "Set EXPM Block"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/MatrixOp/MATINV.js b/js/MatrixOp/MATINV.js index 7e906db7..48abfa74 100644 --- a/js/MatrixOp/MATINV.js +++ b/js/MatrixOp/MATINV.js @@ -29,6 +29,11 @@ function MATINV() { return this.x; } MATINV.prototype.get = function MATINV() { + var label = this.graphics.exprs; + if (size(label,"*")==14) { + label[9-1] = []; + } + this.set_param_popup_title = "Set MATINV Block"; var options = { typ:["Datatype(1=real double 2=Complex)",this.typ], } @@ -76,7 +81,6 @@ function MATINV() { return new BasicBlock(this.x); } MATINV.prototype.get_popup_title = function MATINV() { - var set_param_popup_title = "Set MATINV Block"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/MatrixOp/MATLU.js b/js/MatrixOp/MATLU.js index 051276da..620509fb 100644 --- a/js/MatrixOp/MATLU.js +++ b/js/MatrixOp/MATLU.js @@ -29,6 +29,11 @@ function MATLU() { return this.x; } MATLU.prototype.get = function MATLU() { + var label = this.graphics.exprs; + if (size(label,"*")==14) { + label[9-1] = []; + } + this.set_param_popup_title = "Set MATLU block parameters"; var options = { typ:["Datatype(1=real double 2=Complex)",this.typ], } @@ -77,7 +82,6 @@ function MATLU() { return new BasicBlock(this.x); } MATLU.prototype.get_popup_title = function MATLU() { - var set_param_popup_title = "Set MATLU block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/MatrixOp/MATMAGPHI.js b/js/MatrixOp/MATMAGPHI.js index 6b4ef2f1..e79cec73 100644 --- a/js/MatrixOp/MATMAGPHI.js +++ b/js/MatrixOp/MATMAGPHI.js @@ -29,6 +29,11 @@ function MATMAGPHI() { return this.x; } MATMAGPHI.prototype.get = function MATMAGPHI() { + var label = this.graphics.exprs; + if (size(label,"*")==14) { + label[9-1] = []; + } + this.set_param_popup_title = "Set MATMAGPHI block parameters"; var options = { decomptyp:["decomposition type (1=Complex2MAG&PHI 2=MAG&PHI2Complex)",this.decomptyp], } @@ -80,7 +85,6 @@ function MATMAGPHI() { return new BasicBlock(this.x); } MATMAGPHI.prototype.get_popup_title = function MATMAGPHI() { - var set_param_popup_title = "Set MATMAGPHI block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/MatrixOp/MATMUL.js b/js/MatrixOp/MATMUL.js index 8f433c57..93bfe650 100644 --- a/js/MatrixOp/MATMUL.js +++ b/js/MatrixOp/MATMUL.js @@ -18,6 +18,19 @@ function MATMUL() { return this.x; } MATMUL.prototype.get = function MATMUL() { + this.graphics = this.x.graphics; + var label = this.graphics.exprs; + this.model = this.x.model; + if (this.model.ipar.length==0) { + this.model.ipar = new ScilabDouble([1]); + } + if (size(label,"*")==1) { + label[2-1] = sci2exp(1); + } + if (size(label,"*")==2) { + label[3-1] = sci2exp(1); + } + this.set_param_popup_title = "Set MATMUL parameter"; var options = { dtype:["Datatype(1=real double 2=Complex 3=int32 ...)",this.dtype], rule:["Multiplication rule",this.rule], @@ -165,7 +178,6 @@ function MATMUL() { return new BasicBlock(this.x); } MATMUL.prototype.get_popup_title = function MATMUL() { - var set_param_popup_title = "Set MATMUL parameter"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/MatrixOp/MATPINV.js b/js/MatrixOp/MATPINV.js index b95fca94..2107fcba 100644 --- a/js/MatrixOp/MATPINV.js +++ b/js/MatrixOp/MATPINV.js @@ -29,6 +29,11 @@ function MATPINV() { return this.x; } MATPINV.prototype.get = function MATPINV() { + var label = this.graphics.exprs; + if (size(label,"*")==14) { + label[9-1] = []; + } + this.set_param_popup_title = "Set MATPINV Block"; var options = { typ:["Datatype(1=real double 2=Complex)",this.typ], } @@ -76,7 +81,6 @@ function MATPINV() { return new BasicBlock(this.x); } MATPINV.prototype.get_popup_title = function MATPINV() { - var set_param_popup_title = "Set MATPINV Block"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/MatrixOp/MATRESH.js b/js/MatrixOp/MATRESH.js index a1ebed1c..d4ccd783 100644 --- a/js/MatrixOp/MATRESH.js +++ b/js/MatrixOp/MATRESH.js @@ -29,6 +29,11 @@ function MATRESH() { return this.x; } MATRESH.prototype.get = function MATRESH() { + var label = this.graphics.exprs; + if (size(label,"*")==14) { + label[9-1] = []; + } + this.set_param_popup_title = "Set MATRESH block parameters"; var options = { typ:["Datatype(1=real double 2=Complex)",this.typ], l1:["input size",this.l1], @@ -110,7 +115,6 @@ function MATRESH() { return new BasicBlock(this.x); } MATRESH.prototype.get_popup_title = function MATRESH() { - var set_param_popup_title = "Set MATRESH block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/MatrixOp/MATSING.js b/js/MatrixOp/MATSING.js index e66d59af..393c6714 100644 --- a/js/MatrixOp/MATSING.js +++ b/js/MatrixOp/MATSING.js @@ -29,6 +29,11 @@ function MATSING() { return this.x; } MATSING.prototype.get = function MATSING() { + var label = this.graphics.exprs; + if (size(label,"*")==14) { + label[9-1] = []; + } + this.set_param_popup_title = "Set MATSVD block parameters"; var options = { typ:["Datatype(1=real double 2=Complex)",this.typ], decomptyp:["decomposition type (1=singular values 2=sing values+matrix U & V)",this.decomptyp], @@ -104,7 +109,6 @@ function MATSING() { return new BasicBlock(this.x); } MATSING.prototype.get_popup_title = function MATSING() { - var set_param_popup_title = "Set MATSVD block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/MatrixOp/MATSUM.js b/js/MatrixOp/MATSUM.js index 389d93c7..0a86ae96 100644 --- a/js/MatrixOp/MATSUM.js +++ b/js/MatrixOp/MATSUM.js @@ -29,6 +29,11 @@ function MATSUM() { return this.x; } MATSUM.prototype.get = function MATSUM() { + var label = this.graphics.exprs; + if (size(label,"*")==14) { + label[9-1] = []; + } + this.set_param_popup_title = "Set MATSUM block parameters"; var options = { typ:["Datatype(1=real double 2=Complex)",this.typ], decomptyp:["Sum along (0=all 1=lines 2=Columns)",this.decomptyp], @@ -105,7 +110,6 @@ function MATSUM() { return new BasicBlock(this.x); } MATSUM.prototype.get_popup_title = function MATSUM() { - var set_param_popup_title = "Set MATSUM block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/MatrixOp/MATTRAN.js b/js/MatrixOp/MATTRAN.js index b6cff444..c8e18256 100644 --- a/js/MatrixOp/MATTRAN.js +++ b/js/MatrixOp/MATTRAN.js @@ -17,6 +17,11 @@ function MATTRAN() { return this.x; } MATTRAN.prototype.get = function MATTRAN() { + var label = this.graphics.exprs; + if (size(label,"*")==1) { + label[2-1] = sci2exp(1); + } + this.set_param_popup_title = "Set MATTRAN Block"; var options = { typ:["Datatype(1=real double 2=Complex)",this.typ], rule:["rule (1=.\' 2=\')",this.rule], @@ -70,7 +75,6 @@ function MATTRAN() { return new BasicBlock(this.x); } MATTRAN.prototype.get_popup_title = function MATTRAN() { - var set_param_popup_title = "Set MATTRAN Block"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/MatrixOp/MATZCONJ.js b/js/MatrixOp/MATZCONJ.js index 66124e3e..a1f59161 100644 --- a/js/MatrixOp/MATZCONJ.js +++ b/js/MatrixOp/MATZCONJ.js @@ -35,7 +35,6 @@ function MATZCONJ() { return new BasicBlock(this.x); } MATZCONJ.prototype.get_popup_title = function MATZCONJ() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/MatrixOp/MATZREIM.js b/js/MatrixOp/MATZREIM.js index 0ce616b7..68b66103 100644 --- a/js/MatrixOp/MATZREIM.js +++ b/js/MatrixOp/MATZREIM.js @@ -29,6 +29,11 @@ function MATZREIM() { return this.x; } MATZREIM.prototype.get = function MATZREIM() { + var label = this.graphics.exprs; + if (size(label,"*")==14) { + label[9-1] = []; + } + this.set_param_popup_title = "Set MATZREIM block parameters"; var options = { decomptyp:["decomposition type (1=Complex2Real&Imag 2=Real&Imag2Complex)",this.decomptyp], } @@ -80,7 +85,6 @@ function MATZREIM() { return new BasicBlock(this.x); } MATZREIM.prototype.get_popup_title = function MATZREIM() { - var set_param_popup_title = "Set MATZREIM block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/MatrixOp/RICC.js b/js/MatrixOp/RICC.js index a57f1a41..9684b4a5 100644 --- a/js/MatrixOp/RICC.js +++ b/js/MatrixOp/RICC.js @@ -29,6 +29,11 @@ function RICC() { return this.x; } RICC.prototype.get = function RICC() { + var label = this.graphics.exprs; + if (size(label,"*")==14) { + label[9-1] = []; + } + this.set_param_popup_title = "Set RICC Block"; var options = { tpe:["Type (1=Cont 2=Disc)",this.tpe], mod:["Model(1=Schr 2=sign(cont) inv(disc))",this.mod], @@ -66,7 +71,6 @@ function RICC() { return new BasicBlock(this.x); } RICC.prototype.get_popup_title = function RICC() { - var set_param_popup_title = "Set RICC Block"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/MatrixOp/ROOTCOEF.js b/js/MatrixOp/ROOTCOEF.js index 1368ccfc..f72a5260 100644 --- a/js/MatrixOp/ROOTCOEF.js +++ b/js/MatrixOp/ROOTCOEF.js @@ -29,6 +29,11 @@ function ROOTCOEF() { return this.x; } ROOTCOEF.prototype.get = function ROOTCOEF() { + var label = this.graphics.exprs; + if (size(label,"*")==14) { + label[9-1] = []; + } + this.set_param_popup_title = "Set ROOTCOEF Block"; var options = { typ:["Datatype(1=real double 2=Complex)",this.typ], inp:["input row size",this.inp], @@ -78,7 +83,6 @@ function ROOTCOEF() { return new BasicBlock(this.x); } ROOTCOEF.prototype.get_popup_title = function ROOTCOEF() { - var set_param_popup_title = "Set ROOTCOEF Block"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/MatrixOp/SQRT.js b/js/MatrixOp/SQRT.js index 59eed36f..da74dd84 100644 --- a/js/MatrixOp/SQRT.js +++ b/js/MatrixOp/SQRT.js @@ -19,6 +19,8 @@ function SQRT() { return this.x; } SQRT.prototype.get = function SQRT() { + var label = this.graphics.exprs; + this.set_param_popup_title = "Set SQRT Block"; var options = { typ:["Datatype(1=real double 2=Complex)",this.typ], } @@ -61,7 +63,6 @@ function SQRT() { return new BasicBlock(this.x); } SQRT.prototype.get_popup_title = function SQRT() { - var set_param_popup_title = "Set SQRT Block"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/MatrixOp/SUBMAT.js b/js/MatrixOp/SUBMAT.js index 0dada6f4..d3ca5591 100644 --- a/js/MatrixOp/SUBMAT.js +++ b/js/MatrixOp/SUBMAT.js @@ -29,6 +29,11 @@ function SUBMAT() { return this.x; } SUBMAT.prototype.get = function SUBMAT() { + var label = this.graphics.exprs; + if (size(label,"*")==5) { + label[6-1] = sci2exp([1,1]); + } + this.set_param_popup_title = "Set SUBMAT Block"; var options = { typ:["Datatype (1=real double 2=Complex)",this.typ], a:["Starting Row Index",this.a], @@ -112,7 +117,6 @@ function SUBMAT() { return new BasicBlock(this.x); } SUBMAT.prototype.get_popup_title = function SUBMAT() { - var set_param_popup_title = "Set SUBMAT Block"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Misc/AUTOMAT.js b/js/Misc/AUTOMAT.js index 2603b806..77e8c8ef 100644 --- a/js/Misc/AUTOMAT.js +++ b/js/Misc/AUTOMAT.js @@ -138,7 +138,6 @@ function AUTOMAT() { return new BasicBlock(this.x); } AUTOMAT.prototype.get_popup_title = function AUTOMAT() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Misc/BACKLASH.js b/js/Misc/BACKLASH.js index e641e87b..9dfbb549 100644 --- a/js/Misc/BACKLASH.js +++ b/js/Misc/BACKLASH.js @@ -18,6 +18,9 @@ function BACKLASH() { return this.x; } BACKLASH.prototype.get = function BACKLASH() { + var exprs = this.graphics.exprs; + var rpar = this.model.rpar; + this.set_param_popup_title = "Set backlash parameters"; var options = { ini:["initial output",this.ini], gap:["gap",this.gap], @@ -55,7 +58,6 @@ function BACKLASH() { return new BasicBlock(this.x); } BACKLASH.prototype.get_popup_title = function BACKLASH() { - var set_param_popup_title = "Set backlash parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Misc/BOUNCE.js b/js/Misc/BOUNCE.js index f9680e27..b9ff94bb 100644 --- a/js/Misc/BOUNCE.js +++ b/js/Misc/BOUNCE.js @@ -42,6 +42,12 @@ function BOUNCE() { return this.x; } BOUNCE.prototype.get = function BOUNCE() { + var exprs = this.graphics.exprs; + if (size(exprs,"*")<9) { + exprs[8-1] = "9.81"; + exprs[9-1] = "0"; + } + this.set_param_popup_title = "Set Bounce Block"; var options = { rpar1:["Mass",this.rpar1], rpar2:["Radius",this.rpar2], @@ -132,7 +138,6 @@ function BOUNCE() { return new BasicBlock(this.x); } BOUNCE.prototype.get_popup_title = function BOUNCE() { - var set_param_popup_title = "Set Bounce Block"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Misc/BOUNCEXY.js b/js/Misc/BOUNCEXY.js index e20fc199..1c2436a5 100644 --- a/js/Misc/BOUNCEXY.js +++ b/js/Misc/BOUNCEXY.js @@ -39,6 +39,9 @@ function BOUNCEXY() { return this.x; } BOUNCEXY.prototype.get = function BOUNCEXY() { + var exprs = this.graphics.exprs; + var dstate = this.model.dstate; + this.set_param_popup_title = "Set Scope parameters"; var options = { clrs:["colors",this.clrs.toString().replace(/,/g," ")], siz:["radii",this.siz.toString().replace(/,/g," ")], @@ -112,7 +115,6 @@ function BOUNCEXY() { return new BasicBlock(this.x); } BOUNCEXY.prototype.get_popup_title = function BOUNCEXY() { - var set_param_popup_title = "Set Scope parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Misc/BPLATFORM.js b/js/Misc/BPLATFORM.js index 5bbde5da..ce5defd9 100644 --- a/js/Misc/BPLATFORM.js +++ b/js/Misc/BPLATFORM.js @@ -25,6 +25,9 @@ function BPLATFORM() { return this.x; } BPLATFORM.prototype.get = function BPLATFORM() { + var exprs = this.graphics.exprs; + var dstate = this.model.dstate; + this.set_param_popup_title = "Set Scope parameters"; var options = { plen:["pendulum length",this.plen], csiz:["cart size (square side)",this.csiz], @@ -80,7 +83,6 @@ function BPLATFORM() { return new BasicBlock(this.x); } BPLATFORM.prototype.get_popup_title = function BPLATFORM() { - var set_param_popup_title = "Set Scope parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Misc/CBLOCK.js b/js/Misc/CBLOCK.js index c2a1781c..b5c5e41a 100644 --- a/js/Misc/CBLOCK.js +++ b/js/Misc/CBLOCK.js @@ -36,6 +36,8 @@ function CBLOCK() { return this.x; } CBLOCK.prototype.get = function CBLOCK() { + var label = this.graphics.exprs; + this.set_param_popup_title = "Set C-Block2 block parameters"; var options = { function_name:["simulation function",this.function_name], impli:["is block implicit? (y,n)",this.impli], @@ -165,7 +167,6 @@ function CBLOCK() { return new BasicBlock(this.x); } CBLOCK.prototype.get_popup_title = function CBLOCK() { - var set_param_popup_title = "Set C-Block2 block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Misc/CBLOCK4.js b/js/Misc/CBLOCK4.js index 0bb6a6ea..89762f05 100644 --- a/js/Misc/CBLOCK4.js +++ b/js/Misc/CBLOCK4.js @@ -20,6 +20,8 @@ function CBLOCK4() { return this.x; } CBLOCK4.prototype.get = function CBLOCK4() { + var label = this.graphics.exprs; + this.set_param_popup_title = "Set C-Block4 block parameters"; var options = { function_name:["Simulation function",this.function_name], impli:["Is block implicit? (y,n)",this.impli], @@ -157,7 +159,6 @@ function CBLOCK4() { return new BasicBlock(this.x); } CBLOCK4.prototype.get_popup_title = function CBLOCK4() { - var set_param_popup_title = "Set C-Block4 block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Misc/CONSTRAINT2_c.js b/js/Misc/CONSTRAINT2_c.js index fadef54f..07f81384 100644 --- a/js/Misc/CONSTRAINT2_c.js +++ b/js/Misc/CONSTRAINT2_c.js @@ -21,6 +21,8 @@ function CONSTRAINT2_c() { return this.x; } CONSTRAINT2_c.prototype.get = function CONSTRAINT2_c() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set Constraint block parameters"; var options = { x0:["Initial guess values of states x",this.x0], xd0:["Initial guess values of derivative x\'",this.xd0], @@ -81,7 +83,6 @@ function CONSTRAINT2_c() { return new BasicBlock(this.x); } CONSTRAINT2_c.prototype.get_popup_title = function CONSTRAINT2_c() { - var set_param_popup_title = "Set Constraint block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Misc/CONSTRAINT_c.js b/js/Misc/CONSTRAINT_c.js index c7f9f041..cb70864b 100644 --- a/js/Misc/CONSTRAINT_c.js +++ b/js/Misc/CONSTRAINT_c.js @@ -19,6 +19,8 @@ function CONSTRAINT_c() { return this.x; } CONSTRAINT_c.prototype.get = function CONSTRAINT_c() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set solver block parameters"; var options = { x0:["Initial guess values",this.x0.toString().replace(/,/g," ")], } @@ -58,7 +60,6 @@ function CONSTRAINT_c() { return new BasicBlock(this.x); } CONSTRAINT_c.prototype.get_popup_title = function CONSTRAINT_c() { - var set_param_popup_title = "Set solver block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Misc/DEADBAND.js b/js/Misc/DEADBAND.js index f5e17f05..581e8621 100644 --- a/js/Misc/DEADBAND.js +++ b/js/Misc/DEADBAND.js @@ -22,6 +22,8 @@ function DEADBAND() { return this.x; } DEADBAND.prototype.get = function DEADBAND() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set Deadband parameters"; var options = { maxp:["End of dead band",this.maxp], minp:["Start of dead band",this.minp], @@ -62,7 +64,6 @@ function DEADBAND() { return new BasicBlock(this.x); } DEADBAND.prototype.get_popup_title = function DEADBAND() { - var set_param_popup_title = "Set Deadband parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Misc/DEBUG.js b/js/Misc/DEBUG.js index c9816c9b..353cb3cf 100644 --- a/js/Misc/DEBUG.js +++ b/js/Misc/DEBUG.js @@ -50,7 +50,6 @@ function DEBUG() { return new BasicBlock(this.x); } DEBUG.prototype.get_popup_title = function DEBUG() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Misc/DEBUG_SCICOS.js b/js/Misc/DEBUG_SCICOS.js index 384a6ac7..4f647f25 100644 --- a/js/Misc/DEBUG_SCICOS.js +++ b/js/Misc/DEBUG_SCICOS.js @@ -17,7 +17,6 @@ function DEBUG_SCICOS() { return new BasicBlock(this.x); } DEBUG_SCICOS.prototype.get_popup_title = function DEBUG_SCICOS() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Misc/DIFF_f.js b/js/Misc/DIFF_f.js index 8e33144a..be998d72 100644 --- a/js/Misc/DIFF_f.js +++ b/js/Misc/DIFF_f.js @@ -18,6 +18,8 @@ function DIFF_f() { return this.x; } DIFF_f.prototype.get = function DIFF_f() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set continuous linear system parameters"; var options = { x0:["Initial state",this.x0.toString().replace(/,/g," ")], xd0:["Initial Derivative",this.xd0], @@ -44,7 +46,6 @@ function DIFF_f() { return new BasicBlock(this.x); } DIFF_f.prototype.get_popup_title = function DIFF_f() { - var set_param_popup_title = "Set continuous linear system parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Misc/DSUPER.js b/js/Misc/DSUPER.js index 3e740768..5314d979 100644 --- a/js/Misc/DSUPER.js +++ b/js/Misc/DSUPER.js @@ -51,7 +51,6 @@ function DSUPER() { return new BasicBlock(this.x); } DSUPER.prototype.get_popup_title = function DSUPER() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Misc/EDGETRIGGER.js b/js/Misc/EDGETRIGGER.js index 58123010..52cb2fe1 100644 --- a/js/Misc/EDGETRIGGER.js +++ b/js/Misc/EDGETRIGGER.js @@ -20,6 +20,8 @@ function EDGETRIGGER() { return this.x; } EDGETRIGGER.prototype.get = function EDGETRIGGER() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set edge trigger block parameters"; var options = { edge:["rising (1), falling (-1), both (0)",this.edge], } @@ -43,7 +45,6 @@ function EDGETRIGGER() { return new BasicBlock(this.x); } EDGETRIGGER.prototype.get_popup_title = function EDGETRIGGER() { - var set_param_popup_title = "Set edge trigger block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Misc/EDGE_TRIGGER.js b/js/Misc/EDGE_TRIGGER.js index 5f7b9040..8bc4c23d 100644 --- a/js/Misc/EDGE_TRIGGER.js +++ b/js/Misc/EDGE_TRIGGER.js @@ -153,7 +153,6 @@ function EDGE_TRIGGER() { return new BasicBlock(this.x); } EDGE_TRIGGER.prototype.get_popup_title = function EDGE_TRIGGER() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Misc/ENDBLK.js b/js/Misc/ENDBLK.js index d28f61a1..25bae3f2 100644 --- a/js/Misc/ENDBLK.js +++ b/js/Misc/ENDBLK.js @@ -81,7 +81,6 @@ function ENDBLK() { return new BasicBlock(this.x); } ENDBLK.prototype.get_popup_title = function ENDBLK() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Misc/Extract_Activation.js b/js/Misc/Extract_Activation.js index 5a5d062e..aadd3cf8 100644 --- a/js/Misc/Extract_Activation.js +++ b/js/Misc/Extract_Activation.js @@ -96,7 +96,6 @@ function Extract_Activation() { return new BasicBlock(this.x); } Extract_Activation.prototype.get_popup_title = function Extract_Activation() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Misc/HYSTHERESIS.js b/js/Misc/HYSTHERESIS.js index a1654a92..0d077460 100644 --- a/js/Misc/HYSTHERESIS.js +++ b/js/Misc/HYSTHERESIS.js @@ -23,6 +23,8 @@ function HYSTHERESIS() { return this.x; } HYSTHERESIS.prototype.get = function HYSTHERESIS() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set parameters"; var options = { high_lim:["switch on at",this.high_lim], low_lim:["switch off at",this.low_lim], @@ -63,7 +65,6 @@ function HYSTHERESIS() { return new BasicBlock(this.x); } HYSTHERESIS.prototype.get_popup_title = function HYSTHERESIS() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Misc/IMPSPLIT_f.js b/js/Misc/IMPSPLIT_f.js index 119f14d6..de6c6964 100644 --- a/js/Misc/IMPSPLIT_f.js +++ b/js/Misc/IMPSPLIT_f.js @@ -25,7 +25,6 @@ function IMPSPLIT_f() { return new BasicBlock(this.x); } IMPSPLIT_f.prototype.get_popup_title = function IMPSPLIT_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Misc/LOGICAL_OP.js b/js/Misc/LOGICAL_OP.js index 6abdac9d..8937a967 100644 --- a/js/Misc/LOGICAL_OP.js +++ b/js/Misc/LOGICAL_OP.js @@ -20,6 +20,11 @@ function LOGICAL_OP() { return this.x; } LOGICAL_OP.prototype.get = function LOGICAL_OP() { + var exprs = this.graphics.exprs; + if (size(exprs,1)==2) { + var exprs = [[exprs],[sci2exp(1)],[sci2exp(0)]]; + } + this.set_param_popup_title = "Set parameters"; var options = { nin:["number of inputs",this.nin], rule:["Operator: AND (0), OR (1), NAND (2), NOR (3), XOR (4), NOT (5)",this.rule], @@ -133,7 +138,6 @@ function LOGICAL_OP() { return new BasicBlock(this.x); } LOGICAL_OP.prototype.get_popup_title = function LOGICAL_OP() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Misc/MBLOCK.js b/js/Misc/MBLOCK.js index 590d570e..8794da27 100644 --- a/js/Misc/MBLOCK.js +++ b/js/Misc/MBLOCK.js @@ -36,6 +36,19 @@ function MBLOCK() { return this.x; } MBLOCK.prototype.get = function MBLOCK() { + var exprs = this.graphics.exprs; + if (type(exprs)==15) { + var paramv = list(); + this.pprop = []; + for (i=1;i<=size(this.model.rpar,"*");i+=1) { + paramv[$+1-1] = string(this.model.rpar[i-1]); + this.pprop[$+1-1] = 0; + } + var exprs = tlist(["MBLOCK","in","intype","out","outtype","param","paramv","pprop","nameF","funtxt"],exprs[1-1][1-1],exprs[1-1][2-1],exprs[1-1][3-1],exprs[1-1][4-1],exprs[1-1][5-1],paramv,sci2exp(this.pprop.slice()),exprs[1-1][7-1],exprs[2-1]); + } + var lab_1 = list(exprs.in,exprs.intype,exprs.out,exprs.outtype,exprs.param,exprs.pprop,exprs.nameF); + var lab_2 = exprs.paramv; + this.set_param_popup_title = "Set Modelica generic block parameters"; var options = { Tin:["Input variables: ",this.Tin], Tintype:["Input variables types: ",this.Tintype], @@ -49,7 +62,7 @@ function MBLOCK() { } MBLOCK.prototype.set = function MBLOCK() { var exprs = this.graphics.exprs; - if (this.type[exprs-1]==15) { + if (type(exprs)==15) { var paramv = list(); this.pprop = []; for (i=1;i<=size(this.model.rpar,"*");i+=1) { @@ -272,7 +285,7 @@ function MBLOCK() { exprs.param = lab_1[5-1]; exprs.paramv = list(); if (Tparam_sz!=0) { - if (this.type[lab_2-1]==15) { + if (type(lab_2)==15) { for (i=1;i<=lstsize(lab_2);i+=1) { exprs.paramv[i-1] = lab_2[i-1]; } @@ -297,7 +310,6 @@ function MBLOCK() { return new BasicBlock(this.x); } MBLOCK.prototype.get_popup_title = function MBLOCK() { - var set_param_popup_title = "Set Modelica generic block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Misc/MBLOCK.pickle b/js/Misc/MBLOCK.pickle index 6f7bc938..67edbc3c 100644 --- a/js/Misc/MBLOCK.pickle +++ b/js/Misc/MBLOCK.pickle @@ -28,14 +28,12 @@ aS'model' p13 aS'out' p14 -aS'type' -p15 aS'Tintype' -p16 +p15 aS'Tfunam' -p17 -atp18 -Rp19 +p16 +atp17 +Rp18 .(dp0 S'rhs_txt' p1 diff --git a/js/Misc/MEMORY_f.js b/js/Misc/MEMORY_f.js index 6b0e385a..d4b2d559 100644 --- a/js/Misc/MEMORY_f.js +++ b/js/Misc/MEMORY_f.js @@ -21,6 +21,8 @@ function MEMORY_f() { return this.x; } MEMORY_f.prototype.get = function MEMORY_f() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set memory block parameters"; var options = { a:["initial condition",this.a], inh:["Inherit (1: no, 0: yes)",this.inh], @@ -65,7 +67,6 @@ function MEMORY_f() { return new BasicBlock(this.x); } MEMORY_f.prototype.get_popup_title = function MEMORY_f() { - var set_param_popup_title = "Set memory block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Misc/MPBLOCK.js b/js/Misc/MPBLOCK.js index 7afd3924..fc44e9c0 100644 --- a/js/Misc/MPBLOCK.js +++ b/js/Misc/MPBLOCK.js @@ -40,7 +40,7 @@ function MPBLOCK() { } MPBLOCK.prototype.set = function MPBLOCK() { var exprs = this.graphics.exprs; - if (this.type[exprs-1]==15) { + if (type(exprs)==15) { var paramv = list(); var pprop = []; for (i=1;i<=size(this.model.rpar,"*");i+=1) { @@ -254,7 +254,7 @@ function MPBLOCK() { exprs.param = lab_1[5-1]; exprs.paramv = list(); if (Tparam_sz!=0) { - if (this.type[lab_2-1]==15) { + if (type(lab_2)==15) { for (i=1;i<=lstsize(lab_2);i+=1) { exprs.paramv[i-1] = lab_2[i-1]; } @@ -279,7 +279,6 @@ function MPBLOCK() { return new BasicBlock(this.x); } MPBLOCK.prototype.get_popup_title = function MPBLOCK() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Misc/MPBLOCK.pickle b/js/Misc/MPBLOCK.pickle index 7e28fde3..e422d105 100644 --- a/js/Misc/MPBLOCK.pickle +++ b/js/Misc/MPBLOCK.pickle @@ -16,12 +16,10 @@ aS'x' p7 aS'model' p8 -aS'type' -p9 aS'out' -p10 -atp11 -Rp12 +p9 +atp10 +Rp11 .(dp0 S'rhs_txt' p1 diff --git a/js/Misc/PAL_f.js b/js/Misc/PAL_f.js index 768538a7..b9677ebb 100644 --- a/js/Misc/PAL_f.js +++ b/js/Misc/PAL_f.js @@ -32,7 +32,6 @@ function PAL_f() { return new BasicBlock(this.x); } PAL_f.prototype.get_popup_title = function PAL_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Misc/PENDULUM_ANIM.js b/js/Misc/PENDULUM_ANIM.js index ca950fd6..69b40f0c 100644 --- a/js/Misc/PENDULUM_ANIM.js +++ b/js/Misc/PENDULUM_ANIM.js @@ -25,6 +25,9 @@ function PENDULUM_ANIM() { return this.x; } PENDULUM_ANIM.prototype.get = function PENDULUM_ANIM() { + var exprs = this.graphics.exprs; + var dstate = this.model.dstate; + this.set_param_popup_title = "Set Scope parameters"; var options = { plen:["pendulum length",this.plen], csiz:["cart size (square side)",this.csiz], @@ -80,7 +83,6 @@ function PENDULUM_ANIM() { return new BasicBlock(this.x); } PENDULUM_ANIM.prototype.get_popup_title = function PENDULUM_ANIM() { - var set_param_popup_title = "Set Scope parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Misc/RATELIMITER.js b/js/Misc/RATELIMITER.js index 3bf627b2..6a5674df 100644 --- a/js/Misc/RATELIMITER.js +++ b/js/Misc/RATELIMITER.js @@ -20,6 +20,8 @@ function RATELIMITER() { return this.x; } RATELIMITER.prototype.get = function RATELIMITER() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set rate limiter parameters"; var options = { maxp:["max slope",this.maxp], minp:["min slope",this.minp], @@ -51,7 +53,6 @@ function RATELIMITER() { return new BasicBlock(this.x); } RATELIMITER.prototype.get_popup_title = function RATELIMITER() { - var set_param_popup_title = "Set rate limiter parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Misc/RELATIONALOP.js b/js/Misc/RELATIONALOP.js index ee0d868c..5809668a 100644 --- a/js/Misc/RELATIONALOP.js +++ b/js/Misc/RELATIONALOP.js @@ -20,6 +20,11 @@ function RELATIONALOP() { return this.x; } RELATIONALOP.prototype.get = function RELATIONALOP() { + var exprs = this.graphics.exprs; + if (size(exprs,1)==2) { + var exprs = [[exprs],[sci2exp(1)]]; + } + this.set_param_popup_title = "Set parameters"; var options = { rule:["Operator: == (0), ~= (1), < (2), <= (3), > (4), >= (5)",this.rule], zcr:["Use zero crossing (no: 0), (yes: 1)",this.zcr], @@ -106,7 +111,6 @@ function RELATIONALOP() { return new BasicBlock(this.x); } RELATIONALOP.prototype.get_popup_title = function RELATIONALOP() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Misc/SPLIT_f.js b/js/Misc/SPLIT_f.js index 4bd6cd0f..0877647e 100644 --- a/js/Misc/SPLIT_f.js +++ b/js/Misc/SPLIT_f.js @@ -20,7 +20,6 @@ function SPLIT_f() { return new BasicBlock(this.x); } SPLIT_f.prototype.get_popup_title = function SPLIT_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Misc/SUPER_f.js b/js/Misc/SUPER_f.js index 6e590b1b..22a1b30a 100644 --- a/js/Misc/SUPER_f.js +++ b/js/Misc/SUPER_f.js @@ -32,7 +32,6 @@ function SUPER_f() { return new SuperBlock(this.x); } SUPER_f.prototype.get_popup_title = function SUPER_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Misc/TEXT_f.js b/js/Misc/TEXT_f.js index 79ebade1..a190b625 100644 --- a/js/Misc/TEXT_f.js +++ b/js/Misc/TEXT_f.js @@ -19,6 +19,12 @@ function TEXT_f() { return this.x; } TEXT_f.prototype.get = function TEXT_f() { + var orig = this.graphics.orig; + var exprs = this.graphics.exprs; + if (size(exprs,"*")==1) { + var exprs = [[exprs],["3"],["1"]]; + } + this.set_param_popup_title = "Set Text block parameters"; var options = { txt:["Text",this.txt], font:["Font number",this.font], @@ -76,7 +82,6 @@ function TEXT_f() { return new TextBlock(this.x); } TEXT_f.prototype.get_popup_title = function TEXT_f() { - var set_param_popup_title = "Set Text block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Misc/c_block.js b/js/Misc/c_block.js index ed485eb8..a5d4aaff 100644 --- a/js/Misc/c_block.js +++ b/js/Misc/c_block.js @@ -33,6 +33,8 @@ function c_block() { return this.x; } c_block.prototype.get = function c_block() { + var label = this.graphics.exprs; + this.set_param_popup_title = "Set C_block parameters"; var options = { i:["input ports sizes",this.i], o:["output port sizes",this.o], @@ -89,7 +91,6 @@ function c_block() { return new BasicBlock(this.x); } c_block.prototype.get_popup_title = function c_block() { - var set_param_popup_title = "Set C_block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Misc/fortran_block.js b/js/Misc/fortran_block.js index 450fa119..ab10b0fc 100644 --- a/js/Misc/fortran_block.js +++ b/js/Misc/fortran_block.js @@ -24,6 +24,8 @@ function fortran_block() { return this.x; } fortran_block.prototype.get = function fortran_block() { + var label = this.graphics.exprs; + this.set_param_popup_title = "Set fortran_block parameters"; var options = { i:["input ports sizes",this.i], o:["output port sizes",this.o], @@ -80,7 +82,6 @@ function fortran_block() { return new BasicBlock(this.x); } fortran_block.prototype.get_popup_title = function fortran_block() { - var set_param_popup_title = "Set fortran_block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Misc/func_block.js b/js/Misc/func_block.js index a8e7a333..29394b60 100644 --- a/js/Misc/func_block.js +++ b/js/Misc/func_block.js @@ -34,7 +34,6 @@ function func_block() { return new BasicBlock(this.x); } func_block.prototype.get_popup_title = function func_block() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Misc/generic_block.js b/js/Misc/generic_block.js index 64844ad9..c154ad17 100644 --- a/js/Misc/generic_block.js +++ b/js/Misc/generic_block.js @@ -25,6 +25,11 @@ function generic_block() { return this.x; } generic_block.prototype.get = function generic_block() { + var label = this.graphics.exprs; + if (size(label,"*")==14) { + label[9-1] = []; + } + this.set_param_popup_title = "Set GENERIC block parameters"; var options = { function_name:["simulation function",this.function_name], funtyp:["function type (0,1,2,..)",this.funtyp], @@ -127,7 +132,6 @@ function generic_block() { return new BasicBlock(this.x); } generic_block.prototype.get_popup_title = function generic_block() { - var set_param_popup_title = "Set GENERIC block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Misc/generic_block2.js b/js/Misc/generic_block2.js index 1980938a..73fc7e31 100644 --- a/js/Misc/generic_block2.js +++ b/js/Misc/generic_block2.js @@ -25,6 +25,11 @@ function generic_block2() { return this.x; } generic_block2.prototype.get = function generic_block2() { + var label = this.graphics.exprs; + if (size(label,"*")==14) { + label[9-1] = []; + } + this.set_param_popup_title = "Set GENERIC block parameters"; var options = { function_name:["simulation function",this.function_name], funtyp:["function type (0,1,2,..)",this.funtyp], @@ -133,7 +138,6 @@ function generic_block2() { return new BasicBlock(this.x); } generic_block2.prototype.get_popup_title = function generic_block2() { - var set_param_popup_title = "Set GENERIC block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Misc/generic_block3.js b/js/Misc/generic_block3.js index eb6b4f25..f4a397c5 100644 --- a/js/Misc/generic_block3.js +++ b/js/Misc/generic_block3.js @@ -21,6 +21,11 @@ function generic_block3() { return this.x; } generic_block3.prototype.get = function generic_block3() { + var label = this.graphics.exprs; + if (size(label,"*")==14) { + label[9-1] = []; + } + this.set_param_popup_title = "Set GENERIC block parameters"; var options = { function_name:["Simulation function",this.function_name], funtyp:["Function type (0,1,2,..)",this.funtyp], @@ -95,12 +100,12 @@ function generic_block3() { var ok = false; } } - if (this.type[this.opar-1]!=15) { + if (type(this.opar)!=15) { message("object parameter must be a list"); throw "user error"; var ok = false; } - if (this.type[this.oz-1]!=15) { + if (type(this.oz)!=15) { message("discrete object state must be a list"); throw "user error"; var ok = false; @@ -147,7 +152,6 @@ function generic_block3() { return new BasicBlock(this.x); } generic_block3.prototype.get_popup_title = function generic_block3() { - var set_param_popup_title = "Set GENERIC block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Misc/generic_block3.pickle b/js/Misc/generic_block3.pickle index 994993fa..a0d8591e 100644 --- a/js/Misc/generic_block3.pickle +++ b/js/Misc/generic_block3.pickle @@ -16,40 +16,38 @@ aS'funtyp' p7 aS'out' p8 -aS'type' -p9 aS'function_name' -p10 +p9 aS'in1' -p11 +p10 aS'graphics' -p12 +p11 aS'nmode' -p13 +p12 aS'z' -p14 +p13 aS'xx' -p15 +p14 aS'nzcr' -p16 +p15 aS'depu' -p17 +p16 aS'dept' -p18 +p17 aS'opar' -p19 +p18 aS'oz' -p20 +p19 aS'ipar' -p21 +p20 aS'x' -p22 +p21 aS'model' -p23 +p22 aS'ot' -p24 -atp25 -Rp26 +p23 +atp24 +Rp25 .(dp0 S'model.odstate' p1 diff --git a/js/Misc/scifunc_block.js b/js/Misc/scifunc_block.js index ea851ed6..eda2f6f8 100644 --- a/js/Misc/scifunc_block.js +++ b/js/Misc/scifunc_block.js @@ -33,6 +33,12 @@ function scifunc_block() { return this.x; } scifunc_block.prototype.get = function scifunc_block() { + var needcompile = 0; + var exprs = this.graphics.exprs; + if (size(exprs[1-1],"*")==8) { + exprs[1-1][9-1] = "0"; + } + this.set_param_popup_title = "Set scifunc_block parameters"; var options = { i:["input ports sizes",this.i], o:["output port sizes",this.o], @@ -118,7 +124,6 @@ function scifunc_block() { return new BasicBlock(this.x); } scifunc_block.prototype.get_popup_title = function scifunc_block() { - var set_param_popup_title = "Set scifunc_block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Misc/scifunc_block_m.js b/js/Misc/scifunc_block_m.js index 97b050f3..e2027a0f 100644 --- a/js/Misc/scifunc_block_m.js +++ b/js/Misc/scifunc_block_m.js @@ -38,6 +38,9 @@ function scifunc_block_m() { return this.x; } scifunc_block_m.prototype.get = function scifunc_block_m() { + var needcompile = 0; + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set scifunc_block parameters"; var options = { i:["input ports sizes",this.i], o:["output port sizes",this.o], @@ -120,7 +123,6 @@ function scifunc_block_m() { return new BasicBlock(this.x); } scifunc_block_m.prototype.get_popup_title = function scifunc_block_m() { - var set_param_popup_title = "Set scifunc_block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/NonLinear/ABSBLK_f.js b/js/NonLinear/ABSBLK_f.js index 81b273ab..d4826a04 100644 --- a/js/NonLinear/ABSBLK_f.js +++ b/js/NonLinear/ABSBLK_f.js @@ -21,7 +21,6 @@ function ABSBLK_f() { return new BasicBlock(this.x); } ABSBLK_f.prototype.get_popup_title = function ABSBLK_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/NonLinear/ABS_VALUE.js b/js/NonLinear/ABS_VALUE.js index 3100113e..239b2bb7 100644 --- a/js/NonLinear/ABS_VALUE.js +++ b/js/NonLinear/ABS_VALUE.js @@ -19,6 +19,8 @@ function ABS_VALUE() { return this.x; } ABS_VALUE.prototype.get = function ABS_VALUE() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set block parameters"; var options = { zcr:["use zero_crossing (1: yes) (0:no)",this.zcr], } @@ -50,7 +52,6 @@ function ABS_VALUE() { return new BasicBlock(this.x); } ABS_VALUE.prototype.get_popup_title = function ABS_VALUE() { - var set_param_popup_title = "Set block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/NonLinear/COSBLK_f.js b/js/NonLinear/COSBLK_f.js index 4b0fecf4..eb561be7 100644 --- a/js/NonLinear/COSBLK_f.js +++ b/js/NonLinear/COSBLK_f.js @@ -22,7 +22,6 @@ function COSBLK_f() { return new BasicBlock(this.x); } COSBLK_f.prototype.get_popup_title = function COSBLK_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/NonLinear/DLRADAPT_f.js b/js/NonLinear/DLRADAPT_f.js index 832961c6..86ae1ef9 100644 --- a/js/NonLinear/DLRADAPT_f.js +++ b/js/NonLinear/DLRADAPT_f.js @@ -27,6 +27,8 @@ function DLRADAPT_f() { return this.x; } DLRADAPT_f.prototype.get = function DLRADAPT_f() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set block parameters"; var options = { p:["Vector of p mesh points",this.p.toString().replace(/,/g," ")], rn:["Numerator roots (one line for each mesh)",this.rn], @@ -76,7 +78,6 @@ function DLRADAPT_f() { return new BasicBlock(this.x); } DLRADAPT_f.prototype.get_popup_title = function DLRADAPT_f() { - var set_param_popup_title = "Set block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/NonLinear/EXPBLK_f.js b/js/NonLinear/EXPBLK_f.js index 6634b9ad..cd43305a 100644 --- a/js/NonLinear/EXPBLK_f.js +++ b/js/NonLinear/EXPBLK_f.js @@ -19,6 +19,11 @@ function EXPBLK_f() { return this.x; } EXPBLK_f.prototype.get = function EXPBLK_f() { + var exprs = this.graphics.exprs; + if (size(exprs,"*")==2) { + var exprs = exprs[2-1]; + } + this.set_param_popup_title = "Set a^u block parameters"; var options = { a:["a (>0)",this.a], } @@ -50,7 +55,6 @@ function EXPBLK_f() { return new BasicBlock(this.x); } EXPBLK_f.prototype.get_popup_title = function EXPBLK_f() { - var set_param_popup_title = "Set a^u block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/NonLinear/EXPBLK_m.js b/js/NonLinear/EXPBLK_m.js index 782af381..94eda0e2 100644 --- a/js/NonLinear/EXPBLK_m.js +++ b/js/NonLinear/EXPBLK_m.js @@ -23,6 +23,11 @@ function EXPBLK_m() { return this.x; } EXPBLK_m.prototype.get = function EXPBLK_m() { + var exprs = this.graphics.exprs; + if (size(exprs,"*")==2) { + var exprs = exprs[2-1]; + } + this.set_param_popup_title = "Set a^u block parameters"; var options = { a:["a (>0)",this.a], } @@ -54,7 +59,6 @@ function EXPBLK_m() { return new BasicBlock(this.x); } EXPBLK_m.prototype.get_popup_title = function EXPBLK_m() { - var set_param_popup_title = "Set a^u block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/NonLinear/FSV_f.js b/js/NonLinear/FSV_f.js index 0dd11c6b..9bdec4f5 100644 --- a/js/NonLinear/FSV_f.js +++ b/js/NonLinear/FSV_f.js @@ -23,7 +23,6 @@ function FSV_f() { return new BasicBlock(this.x); } FSV_f.prototype.get_popup_title = function FSV_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/NonLinear/INTRP2BLK_f.js b/js/NonLinear/INTRP2BLK_f.js index c80a161d..d461f63f 100644 --- a/js/NonLinear/INTRP2BLK_f.js +++ b/js/NonLinear/INTRP2BLK_f.js @@ -21,6 +21,8 @@ function INTRP2BLK_f() { return this.x; } INTRP2BLK_f.prototype.get = function INTRP2BLK_f() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set Interpolation block parameters"; var options = { a:["X coord.",this.a.toString().replace(/,/g," ")], b:["Y coord.",this.b.toString().replace(/,/g," ")], @@ -59,7 +61,6 @@ function INTRP2BLK_f() { return new BasicBlock(this.x); } INTRP2BLK_f.prototype.get_popup_title = function INTRP2BLK_f() { - var set_param_popup_title = "Set Interpolation block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/NonLinear/INTRPLBLK_f.js b/js/NonLinear/INTRPLBLK_f.js index 84a48380..77157855 100644 --- a/js/NonLinear/INTRPLBLK_f.js +++ b/js/NonLinear/INTRPLBLK_f.js @@ -19,6 +19,8 @@ function INTRPLBLK_f() { return this.x; } INTRPLBLK_f.prototype.get = function INTRPLBLK_f() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set Interpolation block parameters"; var options = { a:["X coord.",this.a.toString().replace(/,/g," ")], b:["Y coord.",this.b.toString().replace(/,/g," ")], @@ -54,7 +56,6 @@ function INTRPLBLK_f() { return new BasicBlock(this.x); } INTRPLBLK_f.prototype.get_popup_title = function INTRPLBLK_f() { - var set_param_popup_title = "Set Interpolation block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/NonLinear/INVBLK.js b/js/NonLinear/INVBLK.js index 36da040f..109812cf 100644 --- a/js/NonLinear/INVBLK.js +++ b/js/NonLinear/INVBLK.js @@ -23,7 +23,6 @@ function INVBLK() { return new BasicBlock(this.x); } INVBLK.prototype.get_popup_title = function INVBLK() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/NonLinear/INVBLK_f.js b/js/NonLinear/INVBLK_f.js index 35831b78..fbf512df 100644 --- a/js/NonLinear/INVBLK_f.js +++ b/js/NonLinear/INVBLK_f.js @@ -23,7 +23,6 @@ function INVBLK_f() { return new BasicBlock(this.x); } INVBLK_f.prototype.get_popup_title = function INVBLK_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/NonLinear/LOGBLK_f.js b/js/NonLinear/LOGBLK_f.js index 0e4e26c1..7b608c1f 100644 --- a/js/NonLinear/LOGBLK_f.js +++ b/js/NonLinear/LOGBLK_f.js @@ -19,6 +19,11 @@ function LOGBLK_f() { return this.x; } LOGBLK_f.prototype.get = function LOGBLK_f() { + var exprs = this.graphics.exprs; + if (size(exprs,"*")==2) { + var exprs = exprs[2-1]; + } + this.set_param_popup_title = "Set log block parameters"; var options = { a:["Basis (>1)",this.a], } @@ -52,7 +57,6 @@ function LOGBLK_f() { return new BasicBlock(this.x); } LOGBLK_f.prototype.get_popup_title = function LOGBLK_f() { - var set_param_popup_title = "Set log block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/NonLinear/LOOKUP2D.js b/js/NonLinear/LOOKUP2D.js index 0eaed864..6202c0f7 100644 --- a/js/NonLinear/LOOKUP2D.js +++ b/js/NonLinear/LOOKUP2D.js @@ -25,6 +25,10 @@ function LOOKUP2D() { return this.x; } LOOKUP2D.prototype.get = function LOOKUP2D() { + var exprs = this.graphics.exprs; + var ok = false; + var SaveExit = false; + this.set_param_popup_title = "2D Lookup table parameters"; var options = { xx:["Row index input values",this.xx], yy:["Column index input values",this.yy], @@ -118,7 +122,6 @@ function LOOKUP2D() { return new BasicBlock(this.x); } LOOKUP2D.prototype.get_popup_title = function LOOKUP2D() { - var set_param_popup_title = "2D Lookup table parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/NonLinear/LOOKUP_c.js b/js/NonLinear/LOOKUP_c.js index d0160008..180c8d1d 100644 --- a/js/NonLinear/LOOKUP_c.js +++ b/js/NonLinear/LOOKUP_c.js @@ -30,6 +30,10 @@ function LOOKUP_c() { return this.x; } LOOKUP_c.prototype.get = function LOOKUP_c() { + var exprs = this.graphics.exprs; + var ok = false; + var SaveExit = false; + this.set_param_popup_title = "Lookup table parameters"; var options = { Method:["Spline Interpolation method (0..9)",this.Method], xx:["x",this.xx.toString().replace(/,/g," ")], @@ -177,7 +181,6 @@ function LOOKUP_c() { return new BasicBlock(this.x); } LOOKUP_c.prototype.get_popup_title = function LOOKUP_c() { - var set_param_popup_title = "Lookup table parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/NonLinear/LOOKUP_f.js b/js/NonLinear/LOOKUP_f.js index 68b67302..25b5a44a 100644 --- a/js/NonLinear/LOOKUP_f.js +++ b/js/NonLinear/LOOKUP_f.js @@ -54,7 +54,6 @@ function LOOKUP_f() { return new BasicBlock(this.x); } LOOKUP_f.prototype.get_popup_title = function LOOKUP_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/NonLinear/MAXMIN.js b/js/NonLinear/MAXMIN.js index 02288102..357236d7 100644 --- a/js/NonLinear/MAXMIN.js +++ b/js/NonLinear/MAXMIN.js @@ -18,6 +18,8 @@ function MAXMIN() { return this.x; } MAXMIN.prototype.get = function MAXMIN() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set Max/Min block parameters"; var options = { mm:["Min (1) or Max (2) ",this.mm], nin:["Number of input vectors (1 or 2)",this.nin], @@ -83,7 +85,6 @@ function MAXMIN() { return new BasicBlock(this.x); } MAXMIN.prototype.get_popup_title = function MAXMIN() { - var set_param_popup_title = "Set Max/Min block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/NonLinear/MAX_f.js b/js/NonLinear/MAX_f.js index e6a91569..df7b6eaf 100644 --- a/js/NonLinear/MAX_f.js +++ b/js/NonLinear/MAX_f.js @@ -24,7 +24,6 @@ function MAX_f() { return new BasicBlock(this.x); } MAX_f.prototype.get_popup_title = function MAX_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/NonLinear/MIN_f.js b/js/NonLinear/MIN_f.js index 38a61db7..67662233 100644 --- a/js/NonLinear/MIN_f.js +++ b/js/NonLinear/MIN_f.js @@ -24,7 +24,6 @@ function MIN_f() { return new BasicBlock(this.x); } MIN_f.prototype.get_popup_title = function MIN_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/NonLinear/POWBLK_f.js b/js/NonLinear/POWBLK_f.js index 54898c15..ce80dac3 100644 --- a/js/NonLinear/POWBLK_f.js +++ b/js/NonLinear/POWBLK_f.js @@ -19,6 +19,11 @@ function POWBLK_f() { return this.x; } POWBLK_f.prototype.get = function POWBLK_f() { + var exprs = this.graphics.exprs; + if (size(exprs,"*")==2) { + var exprs = exprs[2-1]; + } + this.set_param_popup_title = "Set u^a block parameters"; var options = { a:["to the power of",this.a], } @@ -52,7 +57,6 @@ function POWBLK_f() { return new BasicBlock(this.x); } POWBLK_f.prototype.get_popup_title = function POWBLK_f() { - var set_param_popup_title = "Set u^a block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/NonLinear/PRODUCT.js b/js/NonLinear/PRODUCT.js index 420491b0..98260819 100644 --- a/js/NonLinear/PRODUCT.js +++ b/js/NonLinear/PRODUCT.js @@ -18,6 +18,8 @@ function PRODUCT() { return this.x; } PRODUCT.prototype.get = function PRODUCT() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = " Set multiplication block parameters"; var options = { sgn:["Number of inputs or sign vector",this.sgn.toString().replace(/,/g," ")], } @@ -74,7 +76,6 @@ function PRODUCT() { return new Product(this.x); } PRODUCT.prototype.get_popup_title = function PRODUCT() { - var set_param_popup_title = " Set multiplication block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/NonLinear/PROD_f.js b/js/NonLinear/PROD_f.js index 3f92ab62..a5f007d0 100644 --- a/js/NonLinear/PROD_f.js +++ b/js/NonLinear/PROD_f.js @@ -20,7 +20,6 @@ function PROD_f() { return new RoundBlock(this.x); } PROD_f.prototype.get_popup_title = function PROD_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/NonLinear/QUANT_f.js b/js/NonLinear/QUANT_f.js index 7a452913..91536ad0 100644 --- a/js/NonLinear/QUANT_f.js +++ b/js/NonLinear/QUANT_f.js @@ -20,6 +20,8 @@ function QUANT_f() { return this.x; } QUANT_f.prototype.get = function QUANT_f() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set parameters"; var options = { pas:["Step",this.pas], meth:["Quantization Type (1-4)",this.meth], @@ -62,7 +64,6 @@ function QUANT_f() { return new BasicBlock(this.x); } QUANT_f.prototype.get_popup_title = function QUANT_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/NonLinear/SATURATION.js b/js/NonLinear/SATURATION.js index 8c9745f5..ae0bd428 100644 --- a/js/NonLinear/SATURATION.js +++ b/js/NonLinear/SATURATION.js @@ -22,6 +22,8 @@ function SATURATION() { return this.x; } SATURATION.prototype.get = function SATURATION() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set Saturation parameters"; var options = { maxp:["Upper limit",this.maxp], minp:["Lower limit",this.minp], @@ -62,7 +64,6 @@ function SATURATION() { return new BasicBlock(this.x); } SATURATION.prototype.get_popup_title = function SATURATION() { - var set_param_popup_title = "Set Saturation parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/NonLinear/SAT_f.js b/js/NonLinear/SAT_f.js index 8644917c..7fb2fc57 100644 --- a/js/NonLinear/SAT_f.js +++ b/js/NonLinear/SAT_f.js @@ -22,6 +22,8 @@ function SAT_f() { return this.x; } SAT_f.prototype.get = function SAT_f() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set Saturation parameters"; var options = { minp:["Min",this.minp], maxp:["Max",this.maxp], @@ -59,7 +61,6 @@ function SAT_f() { return new BasicBlock(this.x); } SAT_f.prototype.get_popup_title = function SAT_f() { - var set_param_popup_title = "Set Saturation parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/NonLinear/SIGNUM.js b/js/NonLinear/SIGNUM.js index c882e024..d76a318f 100644 --- a/js/NonLinear/SIGNUM.js +++ b/js/NonLinear/SIGNUM.js @@ -19,6 +19,8 @@ function SIGNUM() { return this.x; } SIGNUM.prototype.get = function SIGNUM() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set block parameters"; var options = { zcr:["use zero_crossing (1: yes) (0:no)",this.zcr], } @@ -50,7 +52,6 @@ function SIGNUM() { return new BasicBlock(this.x); } SIGNUM.prototype.get_popup_title = function SIGNUM() { - var set_param_popup_title = "Set block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/NonLinear/SINBLK_f.js b/js/NonLinear/SINBLK_f.js index da966e22..554e4938 100644 --- a/js/NonLinear/SINBLK_f.js +++ b/js/NonLinear/SINBLK_f.js @@ -22,7 +22,6 @@ function SINBLK_f() { return new BasicBlock(this.x); } SINBLK_f.prototype.get_popup_title = function SINBLK_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/NonLinear/TANBLK_f.js b/js/NonLinear/TANBLK_f.js index 94214b30..6a997f03 100644 --- a/js/NonLinear/TANBLK_f.js +++ b/js/NonLinear/TANBLK_f.js @@ -24,7 +24,6 @@ function TANBLK_f() { return new BasicBlock(this.x); } TANBLK_f.prototype.get_popup_title = function TANBLK_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/NonLinear/TrigFun.js b/js/NonLinear/TrigFun.js index c85ddf34..57ef3821 100644 --- a/js/NonLinear/TrigFun.js +++ b/js/NonLinear/TrigFun.js @@ -16,6 +16,10 @@ function TrigFun() { return this.x; } TrigFun.prototype.get = function TrigFun() { + var exprs = this.graphics.exprs; + var PREVAR_FF = [["sin"],["cos"],["tan"],["asin"],["acos"],["atan"],["sinh"],["cosh"],["tanh"],["asinh"],["acosh"],["atanh"]]; + this.PREVAR_GG = [["Choose among "+strcat(PREVAR_FF.slice(1-1,4),", ")],[strcat(PREVAR_FF.slice(5-1,$),", ")]]; + this.set_param_popup_title = this.PREVAR_GG; var options = { fun:["Function",this.fun], } @@ -46,7 +50,6 @@ function TrigFun() { return new BasicBlock(this.x); } TrigFun.prototype.get_popup_title = function TrigFun() { - var set_param_popup_title = "Choose among "+strcat(PREVAR_FF.slice(1-1,4),", "); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/PDE/PDE.js b/js/PDE/PDE.js index a2011daa..08cb1956 100644 --- a/js/PDE/PDE.js +++ b/js/PDE/PDE.js @@ -18,6 +18,9 @@ function PDE() { return this.x; } PDE.prototype.get = function PDE() { + var label = this.graphics.exprs; + var params_pde = label[1-1]; + this.set_param_popup_title = "PLEASE, GIVE US THE BLOCK\'s NAME. "; var options = { rdnom:["New block\'s name :",this.rdnom], } @@ -210,7 +213,6 @@ function PDE() { return new BasicBlock(this.x); } PDE.prototype.get_popup_title = function PDE() { - var set_param_popup_title = "PLEASE, GIVE US THE BLOCK\'s NAME. "; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sinks/AFFICH_m.js b/js/Sinks/AFFICH_m.js index 78f6388e..68c00ab2 100644 --- a/js/Sinks/AFFICH_m.js +++ b/js/Sinks/AFFICH_m.js @@ -27,6 +27,8 @@ function AFFICH_m() { return this.x; } AFFICH_m.prototype.get = function AFFICH_m() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set parameters"; var options = { in1:["Input Size",this.in1], font:["Font number",this.font], @@ -101,7 +103,6 @@ function AFFICH_m() { return new AfficheBlock(this.x); } AFFICH_m.prototype.get_popup_title = function AFFICH_m() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sinks/BARXY.js b/js/Sinks/BARXY.js index cb26cb00..e9c5f922 100644 --- a/js/Sinks/BARXY.js +++ b/js/Sinks/BARXY.js @@ -25,6 +25,8 @@ function BARXY() { return this.x; } BARXY.prototype.get = function BARXY() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set Scope parameters"; var options = { xmin:["Xmin",this.xmin], xmax:["Xmax",this.xmax], @@ -75,7 +77,6 @@ function BARXY() { return new BasicBlock(this.x); } BARXY.prototype.get_popup_title = function BARXY() { - var set_param_popup_title = "Set Scope parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sinks/CANIMXY.js b/js/Sinks/CANIMXY.js index e0d118cb..2625d745 100644 --- a/js/Sinks/CANIMXY.js +++ b/js/Sinks/CANIMXY.js @@ -32,6 +32,8 @@ function CANIMXY() { return this.x; } CANIMXY.prototype.get = function CANIMXY() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set Scope parameters"; var options = { nbr_curves:["Number of Curves",this.nbr_curves], clrs:["color (>0) or mark (<0)",this.clrs], @@ -128,7 +130,6 @@ function CANIMXY() { return new BasicBlock(this.x); } CANIMXY.prototype.get_popup_title = function CANIMXY() { - var set_param_popup_title = "Set Scope parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sinks/CANIMXY3D.js b/js/Sinks/CANIMXY3D.js index c05bb823..cc98d47f 100644 --- a/js/Sinks/CANIMXY3D.js +++ b/js/Sinks/CANIMXY3D.js @@ -32,6 +32,8 @@ function CANIMXY3D() { return this.x; } CANIMXY3D.prototype.get = function CANIMXY3D() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set Scope parameters"; var options = { nbr_curves:["Number of curves",this.nbr_curves], clrs:["color (>0) or mark (<0)",this.clrs.toString().replace(/,/g," ")], @@ -145,7 +147,6 @@ function CANIMXY3D() { return new BasicBlock(this.x); } CANIMXY3D.prototype.get_popup_title = function CANIMXY3D() { - var set_param_popup_title = "Set Scope parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sinks/CEVENTSCOPE.js b/js/Sinks/CEVENTSCOPE.js index 7f968835..1ac1b62d 100644 --- a/js/Sinks/CEVENTSCOPE.js +++ b/js/Sinks/CEVENTSCOPE.js @@ -23,6 +23,8 @@ function CEVENTSCOPE() { return this.x; } CEVENTSCOPE.prototype.get = function CEVENTSCOPE() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set Scope parameters"; var options = { nclock:["Number of event inputs",this.nclock], clrs:["colors c (>0) or mark (<0)",this.clrs.toString().replace(/,/g," ")], @@ -104,7 +106,6 @@ function CEVENTSCOPE() { return new BasicBlock(this.x); } CEVENTSCOPE.prototype.get_popup_title = function CEVENTSCOPE() { - var set_param_popup_title = "Set Scope parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sinks/CFSCOPE.js b/js/Sinks/CFSCOPE.js index 3ba96718..cf0effef 100644 --- a/js/Sinks/CFSCOPE.js +++ b/js/Sinks/CFSCOPE.js @@ -25,6 +25,8 @@ function CFSCOPE() { return this.x; } CFSCOPE.prototype.get = function CFSCOPE() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set Scope parameters"; var options = { clrs:["Color (>0) or mark (<0) vector (8 entries)",this.clrs.toString().replace(/,/g," ")], win:["Output window number (-1 for automatic)",this.win], @@ -116,7 +118,6 @@ function CFSCOPE() { return new BasicBlock(this.x); } CFSCOPE.prototype.get_popup_title = function CFSCOPE() { - var set_param_popup_title = "Set Scope parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sinks/CLKOUTV_f.js b/js/Sinks/CLKOUTV_f.js index 6d77516f..7df2affe 100644 --- a/js/Sinks/CLKOUTV_f.js +++ b/js/Sinks/CLKOUTV_f.js @@ -17,6 +17,8 @@ function CLKOUTV_f() { return this.x; } CLKOUTV_f.prototype.get = function CLKOUTV_f() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = msprintf("Set %s block parameters","CLKOUTV_f"); var options = { prt:["Port number",this.prt], } @@ -46,8 +48,7 @@ function CLKOUTV_f() { return new EventOutBlock(this.x); } CLKOUTV_f.prototype.get_popup_title = function CLKOUTV_f() { - var set_param_popup_title = msprintf("Set %s block parameters","CLKOUTV_f"); - return set_param_popup_title; + return this.set_param_popup_title; } CLKOUTV_f.prototype.getinputs = function CLKOUTV_f() { this.x = orig[1-1]+sz[1-1]/2; @@ -74,7 +75,7 @@ function CLKOUTV_f() { var y = orig[2-1]+sz[2-1]*[[0],[1/3],[1],[1],[1/3]]; var xo = orig[1-1]; var yo = orig[2-1]+sz[2-1]/3; - if (this.type[gr_i-1]==15) { + if (type(gr_i)==15) { var coli = gr_i[2-1]; var pcoli = xget("pattern"); xfpolys(this.x,y,coli); diff --git a/js/Sinks/CLKOUTV_f.pickle b/js/Sinks/CLKOUTV_f.pickle index 1461c53d..e2035b43 100644 --- a/js/Sinks/CLKOUTV_f.pickle +++ b/js/Sinks/CLKOUTV_f.pickle @@ -14,12 +14,10 @@ aS'x' p6 aS'model' p7 -aS'type' -p8 aS'options' -p9 -atp10 -Rp11 +p8 +atp9 +Rp10 .(dp0 S'xo' p1 diff --git a/js/Sinks/CLKOUT_f.js b/js/Sinks/CLKOUT_f.js index 795acc5f..eaa7c660 100644 --- a/js/Sinks/CLKOUT_f.js +++ b/js/Sinks/CLKOUT_f.js @@ -17,6 +17,9 @@ function CLKOUT_f() { return this.x; } CLKOUT_f.prototype.get = function CLKOUT_f() { + var exprs = this.graphics.exprs; + var exprs = exprs[1-1]; + this.set_param_popup_title = "Set Event Output block parameters"; var options = { prt:["Port number",this.prt], } @@ -49,7 +52,6 @@ function CLKOUT_f() { return new BasicBlock(this.x); } CLKOUT_f.prototype.get_popup_title = function CLKOUT_f() { - var set_param_popup_title = "Set Event Output block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sinks/CMAT3D.js b/js/Sinks/CMAT3D.js index 3d54ee5e..4afe2f60 100644 --- a/js/Sinks/CMAT3D.js +++ b/js/Sinks/CMAT3D.js @@ -28,6 +28,8 @@ function CMAT3D() { return this.x; } CMAT3D.prototype.get = function CMAT3D() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set Scope parameters"; var options = { vec_x:["Bounds Vector X (-1 for standard)",this.vec_x], vec_y:["Bounds Vector Y (-1 for standard)",this.vec_y], @@ -79,7 +81,6 @@ function CMAT3D() { return new BasicBlock(this.x); } CMAT3D.prototype.get_popup_title = function CMAT3D() { - var set_param_popup_title = "Set Scope parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sinks/CMATVIEW.js b/js/Sinks/CMATVIEW.js index ea5cab06..c6933392 100644 --- a/js/Sinks/CMATVIEW.js +++ b/js/Sinks/CMATVIEW.js @@ -26,6 +26,8 @@ function CMATVIEW() { return this.x; } CMATVIEW.prototype.get = function CMATVIEW() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set Scope parameters"; var options = { colormap:["ColorMap",this.colormap], cmin:["Minimum level range",this.cmin], @@ -71,7 +73,6 @@ function CMATVIEW() { return new BasicBlock(this.x); } CMATVIEW.prototype.get_popup_title = function CMATVIEW() { - var set_param_popup_title = "Set Scope parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sinks/CMSCOPE.js b/js/Sinks/CMSCOPE.js index 87c3e893..2e4bebd8 100644 --- a/js/Sinks/CMSCOPE.js +++ b/js/Sinks/CMSCOPE.js @@ -31,6 +31,8 @@ function CMSCOPE() { return this.x; } CMSCOPE.prototype.get = function CMSCOPE() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set Scope parameters"; var options = { in1:["Input ports sizes",this.in1.toString().replace(/,/g," ")], clrs:["Drawing colors (>0) or mark (<0)",this.clrs.toString().replace(/,/g," ")], @@ -154,7 +156,6 @@ function CMSCOPE() { return new BasicBlock(this.x); } CMSCOPE.prototype.get_popup_title = function CMSCOPE() { - var set_param_popup_title = "Set Scope parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sinks/CSCOPE.js b/js/Sinks/CSCOPE.js index 0d08e60c..6a97815d 100644 --- a/js/Sinks/CSCOPE.js +++ b/js/Sinks/CSCOPE.js @@ -27,6 +27,8 @@ function CSCOPE() { return this.x; } CSCOPE.prototype.get = function CSCOPE() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set Scope parameters"; var options = { clrs:["Color (>0) or mark (<0) vector (8 entries)",this.clrs.toString().replace(/,/g," ")], win:["Output window number (-1 for automatic)",this.win], @@ -121,7 +123,6 @@ function CSCOPE() { return new BasicBlock(this.x); } CSCOPE.prototype.get_popup_title = function CSCOPE() { - var set_param_popup_title = "Set Scope parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sinks/CSCOPXY.js b/js/Sinks/CSCOPXY.js index 232d9d2c..43bffdb0 100644 --- a/js/Sinks/CSCOPXY.js +++ b/js/Sinks/CSCOPXY.js @@ -31,6 +31,8 @@ function CSCOPXY() { return this.x; } CSCOPXY.prototype.get = function CSCOPXY() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set Scope parameters"; var options = { nbr_curves:["Number of Curves",this.nbr_curves], clrs:["color (>0) or mark (<0)",this.clrs], @@ -127,7 +129,6 @@ function CSCOPXY() { return new BasicBlock(this.x); } CSCOPXY.prototype.get_popup_title = function CSCOPXY() { - var set_param_popup_title = "Set Scope parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sinks/CSCOPXY3D.js b/js/Sinks/CSCOPXY3D.js index 8598dd61..93e834cf 100644 --- a/js/Sinks/CSCOPXY3D.js +++ b/js/Sinks/CSCOPXY3D.js @@ -31,6 +31,8 @@ function CSCOPXY3D() { return this.x; } CSCOPXY3D.prototype.get = function CSCOPXY3D() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set Scope parameters"; var options = { nbr_curves:["Number of curves",this.nbr_curves], clrs:["color (>0) or mark (<0)",this.clrs.toString().replace(/,/g," ")], @@ -140,7 +142,6 @@ function CSCOPXY3D() { return new BasicBlock(this.x); } CSCOPXY3D.prototype.get_popup_title = function CSCOPXY3D() { - var set_param_popup_title = "Set Scope parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sinks/OUTIMPL_f.js b/js/Sinks/OUTIMPL_f.js index de2eb7b2..cd9a653a 100644 --- a/js/Sinks/OUTIMPL_f.js +++ b/js/Sinks/OUTIMPL_f.js @@ -23,6 +23,11 @@ function OUTIMPL_f() { return this.x; } OUTIMPL_f.prototype.get = function OUTIMPL_f() { + var exprs = this.graphics.exprs; + if (size(exprs,"*")==2) { + var exprs = exprs[1-1]; + } + this.set_param_popup_title = msprintf("Set %s block parameters","OUTIMPL_f"); var options = { prt:["Port number",this.prt], } @@ -58,7 +63,6 @@ function OUTIMPL_f() { return new ImplicitOutBlock(this.x); } OUTIMPL_f.prototype.get_popup_title = function OUTIMPL_f() { - var set_param_popup_title = msprintf("Set %s block parameters","OUTIMPL_f"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sinks/OUT_f.js b/js/Sinks/OUT_f.js index 0702cbb0..fb0a0e92 100644 --- a/js/Sinks/OUT_f.js +++ b/js/Sinks/OUT_f.js @@ -20,6 +20,11 @@ function OUT_f() { return this.x; } OUT_f.prototype.get = function OUT_f() { + var exprs = this.graphics.exprs; + if (size(exprs,"*")==2) { + var exprs = exprs[1-1]; + } + this.set_param_popup_title = msprintf("Set %s block parameters","OUT_f"); var options = { prt:["Port number",this.prt], } @@ -51,7 +56,6 @@ function OUT_f() { return new ExplicitOutBlock(this.x); } OUT_f.prototype.get_popup_title = function OUT_f() { - var set_param_popup_title = msprintf("Set %s block parameters","OUT_f"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sinks/TOWS_c.js b/js/Sinks/TOWS_c.js index a7826ed9..e3fa3f0f 100644 --- a/js/Sinks/TOWS_c.js +++ b/js/Sinks/TOWS_c.js @@ -27,6 +27,8 @@ function TOWS_c() { return this.x; } TOWS_c.prototype.get = function TOWS_c() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set Xcos buffer block"; var options = { nz:["Size of buffer",this.nz], varnam:["Scilab variable name",this.varnam], @@ -78,7 +80,6 @@ function TOWS_c() { return new BasicBlock(this.x); } TOWS_c.prototype.get_popup_title = function TOWS_c() { - var set_param_popup_title = "Set Xcos buffer block"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sinks/TRASH_f.js b/js/Sinks/TRASH_f.js index 0d53e5ed..9f748531 100644 --- a/js/Sinks/TRASH_f.js +++ b/js/Sinks/TRASH_f.js @@ -23,7 +23,6 @@ function TRASH_f() { return new BasicBlock(this.x); } TRASH_f.prototype.get_popup_title = function TRASH_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Sinks/WFILE_f.js b/js/Sinks/WFILE_f.js index f8b560d1..029d61ce 100644 --- a/js/Sinks/WFILE_f.js +++ b/js/Sinks/WFILE_f.js @@ -24,6 +24,15 @@ function WFILE_f() { return this.x; } WFILE_f.prototype.get = function WFILE_f() { + var warnMessage = msprintf("Feature %s is obsolete.","WFILE_f"); + var warnAdvise = msprintf("Please use %s instead.","WRITEC_f"); + var warnXcosMessage = msprintf("%s %s",warnMessage,warnAdvise); + var exprs = this.graphics.exprs; + var dstate = this.model.dstate; + var lunit = dstate[2-1]; + var fname = exprs[2-1]; + var frmt = exprs[3-1]; + this.set_param_popup_title = msprintf("Set %s block parameters","WFILE_f"); var options = { in1:["Input Size",this.in1], fname1:["Output File Name",this.fname1], @@ -102,7 +111,6 @@ function WFILE_f() { return new BasicBlock(this.x); } WFILE_f.prototype.get_popup_title = function WFILE_f() { - var set_param_popup_title = msprintf("Set %s block parameters","WFILE_f"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sinks/WRITEAU_f.js b/js/Sinks/WRITEAU_f.js index 2fb1d1d3..9fd91deb 100644 --- a/js/Sinks/WRITEAU_f.js +++ b/js/Sinks/WRITEAU_f.js @@ -25,6 +25,11 @@ function WRITEAU_f() { return this.x; } WRITEAU_f.prototype.get = function WRITEAU_f() { + var exprs = this.graphics.exprs; + var ipar = this.model.ipar; + var dstate = this.model.dstate; + var lunit = dstate[2-1]; + this.set_param_popup_title = msprintf("Set %s block parameters","WRITEAU_f"); var options = { N:["Buffer Size",this.N], swap:["Swap Mode (0:No, 1:Yes)",this.swap], @@ -75,7 +80,6 @@ function WRITEAU_f() { return new BasicBlock(this.x); } WRITEAU_f.prototype.get_popup_title = function WRITEAU_f() { - var set_param_popup_title = msprintf("Set %s block parameters","WRITEAU_f"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sinks/WRITEC_f.js b/js/Sinks/WRITEC_f.js index 69c470e1..08b0d6c9 100644 --- a/js/Sinks/WRITEC_f.js +++ b/js/Sinks/WRITEC_f.js @@ -25,6 +25,13 @@ function WRITEC_f() { return this.x; } WRITEC_f.prototype.get = function WRITEC_f() { + var exprs = this.graphics.exprs; + var ipar = this.model.ipar; + var dstate = this.model.dstate; + var lunit = dstate[2-1]; + var fname = exprs[2-1]; + var frmt = exprs[3-1]; + this.set_param_popup_title = msprintf("Set %s block parameters","WRITEC_f"); var options = { in1:["Input Size",this.in1], fname1:["Output File Name",this.fname1], @@ -105,7 +112,6 @@ function WRITEC_f() { return new BasicBlock(this.x); } WRITEC_f.prototype.get_popup_title = function WRITEC_f() { - var set_param_popup_title = msprintf("Set %s block parameters","WRITEC_f"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/CLKINV_f.js b/js/Sources/CLKINV_f.js index 8f878294..f949749e 100644 --- a/js/Sources/CLKINV_f.js +++ b/js/Sources/CLKINV_f.js @@ -18,6 +18,9 @@ function CLKINV_f() { return this.x; } CLKINV_f.prototype.get = function CLKINV_f() { + var exprs = this.graphics.exprs; + var exprs = exprs[1-1]; + this.set_param_popup_title = msprintf("Set %s block parameters","CLKINV_f"); var options = { prt:["Port Number",this.prt], } @@ -49,7 +52,6 @@ function CLKINV_f() { return new EventInBlock(this.x); } CLKINV_f.prototype.get_popup_title = function CLKINV_f() { - var set_param_popup_title = msprintf("Set %s block parameters","CLKINV_f"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/CLKIN_f.js b/js/Sources/CLKIN_f.js index f3f27a7a..4c7e52aa 100644 --- a/js/Sources/CLKIN_f.js +++ b/js/Sources/CLKIN_f.js @@ -17,6 +17,9 @@ function CLKIN_f() { return this.x; } CLKIN_f.prototype.get = function CLKIN_f() { + var exprs = this.graphics.exprs; + var exprs = exprs[1-1]; + this.set_param_popup_title = "Set Event Input block parameters"; var options = { prt:["Port number",this.prt], } @@ -49,7 +52,6 @@ function CLKIN_f() { return new BasicBlock(this.x); } CLKIN_f.prototype.get_popup_title = function CLKIN_f() { - var set_param_popup_title = "Set Event Input block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/CLOCK_c.js b/js/Sources/CLOCK_c.js index 3d26fb6f..c33cab71 100644 --- a/js/Sources/CLOCK_c.js +++ b/js/Sources/CLOCK_c.js @@ -46,6 +46,18 @@ function CLOCK_c() { return this.x; } CLOCK_c.prototype.get = function CLOCK_c() { + if (typeof(o)=="Block"&&o.gui=="EVTDLY_c") { + var path = i; + break; + } + } + var newpar = list(); + var exprs = xx.graphics.exprs; + this.model = xx.model; + var t0_old = this.model.firing; + var dt_old = this.model.rpar[1-1]; + var model_n = this.model; + this.set_param_popup_title = msprintf("Set %s block parameters","CLOCK_c"); var options = { dt:["Period",this.dt], t0:["Initialisation Time",this.t0], @@ -97,7 +109,6 @@ function CLOCK_c() { return new BasicBlock(this.x); } CLOCK_c.prototype.get_popup_title = function CLOCK_c() { - var set_param_popup_title = msprintf("Set %s block parameters","CLOCK_c"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/CLOCK_f.js b/js/Sources/CLOCK_f.js index bfb4e031..291cf09d 100644 --- a/js/Sources/CLOCK_f.js +++ b/js/Sources/CLOCK_f.js @@ -46,6 +46,18 @@ function CLOCK_f() { return this.x; } CLOCK_f.prototype.get = function CLOCK_f() { + if (typeof(o)=="Block"&&o.gui=="EVTDLY_f") { + var path = i; + break; + } + } + var newpar = list(); + var exprs = xx.graphics.exprs; + this.model = xx.model; + var t0_old = this.model.firing; + var dt_old = this.model.rpar; + var model_n = this.model; + this.set_param_popup_title = "Set Clock block parameters"; var options = { dt:["Period",this.dt], t0:["Init time",this.t0], @@ -98,7 +110,6 @@ function CLOCK_f() { return new BasicBlock(this.x); } CLOCK_f.prototype.get_popup_title = function CLOCK_f() { - var set_param_popup_title = "Set Clock block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/CONST.js b/js/Sources/CONST.js index 7bd1fcef..2aec9d20 100644 --- a/js/Sources/CONST.js +++ b/js/Sources/CONST.js @@ -18,6 +18,8 @@ function CONST() { return this.x; } CONST.prototype.get = function CONST() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set Contant Block"; var options = { C:["Constant",this.C], } @@ -52,7 +54,6 @@ function CONST() { return new BasicBlock(this.x); } CONST.prototype.get_popup_title = function CONST() { - var set_param_popup_title = "Set Contant Block"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/CONST_f.js b/js/Sources/CONST_f.js index 2b7d8d00..844e9309 100644 --- a/js/Sources/CONST_f.js +++ b/js/Sources/CONST_f.js @@ -18,6 +18,8 @@ function CONST_f() { return this.x; } CONST_f.prototype.get = function CONST_f() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set Contant Block"; var options = { C:["Constant",this.C], } @@ -48,7 +50,6 @@ function CONST_f() { return new BasicBlock(this.x); } CONST_f.prototype.get_popup_title = function CONST_f() { - var set_param_popup_title = "Set Contant Block"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/CONST_m.js b/js/Sources/CONST_m.js index 3260b4b9..9236c840 100644 --- a/js/Sources/CONST_m.js +++ b/js/Sources/CONST_m.js @@ -21,6 +21,8 @@ function CONST_m() { return this.x; } CONST_m.prototype.get = function CONST_m() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = msprintf("Set %s block parameters","CONST_m"); var options = { C:["Constant Value",this.C], } @@ -41,7 +43,7 @@ function CONST_m() { } else { this.model.sim = list(new ScilabString(["cstblk4_m"]), new ScilabDouble([4])); this.model.opar = list(this.C); - if ((this.type[this.C-1]==1)) { + if ((type(this.C)==1)) { if (isreal(this.C)) { var ot = 1; } else { @@ -79,7 +81,6 @@ function CONST_m() { return new BasicBlock(this.x); } CONST_m.prototype.get_popup_title = function CONST_m() { - var set_param_popup_title = msprintf("Set %s block parameters","CONST_m"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/CONST_m.pickle b/js/Sources/CONST_m.pickle index 0ac43ba7..0552c2a7 100644 --- a/js/Sources/CONST_m.pickle +++ b/js/Sources/CONST_m.pickle @@ -6,14 +6,12 @@ S'x' p2 aS'model' p3 -aS'type' -p4 aS'C' -p5 +p4 aS'graphics' -p6 -atp7 -Rp8 +p5 +atp6 +Rp7 .(dp0 S'arg1' p1 diff --git a/js/Sources/CURVE_c.js b/js/Sources/CURVE_c.js index 66164884..5c62f653 100644 --- a/js/Sources/CURVE_c.js +++ b/js/Sources/CURVE_c.js @@ -27,6 +27,10 @@ function CURVE_c() { return this.x; } CURVE_c.prototype.get = function CURVE_c() { + var exprs = this.graphics.exprs; + var ok = false; + var SaveExit = false; + this.set_param_popup_title = "Spline data"; var options = { Method:["Spline Method (0..7)",this.Method], xx:["x",this.xx], @@ -165,7 +169,6 @@ function CURVE_c() { return new BasicBlock(this.x); } CURVE_c.prototype.get_popup_title = function CURVE_c() { - var set_param_popup_title = "Spline data"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/CURV_f.js b/js/Sources/CURV_f.js index 1f0e2acc..26e020c7 100644 --- a/js/Sources/CURV_f.js +++ b/js/Sources/CURV_f.js @@ -67,7 +67,6 @@ function CURV_f() { return new BasicBlock(this.x); } CURV_f.prototype.get_popup_title = function CURV_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Sources/Counter.js b/js/Sources/Counter.js index 5cd512f5..998036ca 100644 --- a/js/Sources/Counter.js +++ b/js/Sources/Counter.js @@ -22,6 +22,8 @@ function Counter() { return this.x; } Counter.prototype.get = function Counter() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = msprintf("Set %s block parameters","Counter"); var options = { minim:["Minimum",this.minim], maxim:["Maximum",this.maxim], @@ -58,7 +60,6 @@ function Counter() { return new BasicBlock(this.x); } Counter.prototype.get_popup_title = function Counter() { - var set_param_popup_title = msprintf("Set %s block parameters","Counter"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/FROMWSB.js b/js/Sources/FROMWSB.js index 010774a2..a3ffd864 100644 --- a/js/Sources/FROMWSB.js +++ b/js/Sources/FROMWSB.js @@ -83,7 +83,6 @@ function FROMWSB() { return new BasicBlock(this.x); } FROMWSB.prototype.get_popup_title = function FROMWSB() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Sources/FROMWS_c.js b/js/Sources/FROMWS_c.js index 15c15f32..66dceb1c 100644 --- a/js/Sources/FROMWS_c.js +++ b/js/Sources/FROMWS_c.js @@ -25,6 +25,8 @@ function FROMWS_c() { return this.x; } FROMWS_c.prototype.get = function FROMWS_c() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set From_Workspace block parameters"; var options = { varnam:["Variable name",this.varnam], Method:["Interpolation Method",this.Method], @@ -84,7 +86,6 @@ function FROMWS_c() { return new BasicBlock(this.x); } FROMWS_c.prototype.get_popup_title = function FROMWS_c() { - var set_param_popup_title = "Set From_Workspace block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/GENSIN_f.js b/js/Sources/GENSIN_f.js index 621851cb..8f66cf51 100644 --- a/js/Sources/GENSIN_f.js +++ b/js/Sources/GENSIN_f.js @@ -20,6 +20,8 @@ function GENSIN_f() { return this.x; } GENSIN_f.prototype.get = function GENSIN_f() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = msprintf("Set %s block parameters","GENSIN_f"); var options = { M:["Magnitude",this.M], F:["Frequency (rad/s)",this.F], @@ -59,7 +61,6 @@ function GENSIN_f() { return new BasicBlock(this.x); } GENSIN_f.prototype.get_popup_title = function GENSIN_f() { - var set_param_popup_title = msprintf("Set %s block parameters","GENSIN_f"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/GENSQR_f.js b/js/Sources/GENSQR_f.js index c4061ffa..a72bbfd2 100644 --- a/js/Sources/GENSQR_f.js +++ b/js/Sources/GENSQR_f.js @@ -20,6 +20,11 @@ function GENSQR_f() { return this.x; } GENSQR_f.prototype.get = function GENSQR_f() { + var exprs = this.graphics.exprs; + if (size(exprs,"*")==2) { + var exprs = exprs[2-1]; + } + this.set_param_popup_title = "Set Square generator block parameters"; var options = { Amplitude:["Amplitude",this.Amplitude], } @@ -48,7 +53,6 @@ function GENSQR_f() { return new BasicBlock(this.x); } GENSQR_f.prototype.get_popup_title = function GENSQR_f() { - var set_param_popup_title = "Set Square generator block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/GEN_SQR.js b/js/Sources/GEN_SQR.js index 59afac78..7e21ad95 100644 --- a/js/Sources/GEN_SQR.js +++ b/js/Sources/GEN_SQR.js @@ -54,6 +54,16 @@ function GEN_SQR() { return this.x; } GEN_SQR.prototype.get = function GEN_SQR() { + var y = this.needcompile; + var typ = list(); + var exprs = this.graphics.exprs; + this.Btitre = "Set GEN_SQR parameters"; + var Exprs0 = [["Amin"],["Amax"],["rule"],["F"]]; + this.Bitems = [["Minimum Value"],["Maximum Value"],["Initial Value( 1= Minimum Value 2= Maximum Value)"],["Period (sec)"]]; + var Ss = list("mat",[-1,-1],"mat",[-1,-1],"pol",-1,"pol",-1); + this.scicos_context = struct(); + var ok = false; + this.set_param_popup_title = this.Btitre; var options = { scicos_context.Amin:["Minimum Value",this.scicos_context.Amin], scicos_context.Amax:["Maximum Value",this.scicos_context.Amax], @@ -108,7 +118,6 @@ function GEN_SQR() { return new BasicBlock(this.x); } GEN_SQR.prototype.get_popup_title = function GEN_SQR() { - var set_param_popup_title = "Set GEN_SQR parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/Ground_g.js b/js/Sources/Ground_g.js index ed2dcfee..e8417fa9 100644 --- a/js/Sources/Ground_g.js +++ b/js/Sources/Ground_g.js @@ -28,7 +28,6 @@ function Ground_g() { return new BasicBlock(this.x); } Ground_g.prototype.get_popup_title = function Ground_g() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Sources/INIMPL_f.js b/js/Sources/INIMPL_f.js index 757a3ae6..5949a756 100644 --- a/js/Sources/INIMPL_f.js +++ b/js/Sources/INIMPL_f.js @@ -23,6 +23,11 @@ function INIMPL_f() { return this.x; } INIMPL_f.prototype.get = function INIMPL_f() { + var exprs = this.graphics.exprs; + if (size(exprs,"*")==2) { + var exprs = exprs[1-1]; + } + this.set_param_popup_title = msprintf("Set %s block parameters","INIMPL_f"); var options = { prt:["Port Number",this.prt], } @@ -58,7 +63,6 @@ function INIMPL_f() { return new ImplicitInBlock(this.x); } INIMPL_f.prototype.get_popup_title = function INIMPL_f() { - var set_param_popup_title = msprintf("Set %s block parameters","INIMPL_f"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/IN_f.js b/js/Sources/IN_f.js index 4961bb74..8d44dd82 100644 --- a/js/Sources/IN_f.js +++ b/js/Sources/IN_f.js @@ -68,7 +68,6 @@ function IN_f() { return new ExplicitInBlock(this.x); } IN_f.prototype.get_popup_title = function IN_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Sources/Modulo_Count.js b/js/Sources/Modulo_Count.js index d6c37e8e..ae60e13d 100644 --- a/js/Sources/Modulo_Count.js +++ b/js/Sources/Modulo_Count.js @@ -20,6 +20,8 @@ function Modulo_Count() { return this.x; } Modulo_Count.prototype.get = function Modulo_Count() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = msprintf("Set %s block parameters","Modulo_Count"); var options = { ini_c:["Initial State (zero or positive number)",this.ini_c], base:["Upper Limit (positive number)",this.base], @@ -54,7 +56,6 @@ function Modulo_Count() { return new BasicBlock(this.x); } Modulo_Count.prototype.get_popup_title = function Modulo_Count() { - var set_param_popup_title = msprintf("Set %s block parameters","Modulo_Count"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/PULSE_SC.js b/js/Sources/PULSE_SC.js index c1bd8dc8..7daafb63 100644 --- a/js/Sources/PULSE_SC.js +++ b/js/Sources/PULSE_SC.js @@ -49,6 +49,16 @@ function PULSE_SC() { return this.x; } PULSE_SC.prototype.get = function PULSE_SC() { + var y = this.needcompile; + var typ = list(); + var exprs = this.graphics.exprs; + this.Btitre = "Set Pulse Generator parameters"; + var Exprs0 = [["E"],["W"],["F"],["A"]]; + this.Bitems = [["Phase delay (secs):"],["Pulse Width (% of period):"],["Period (secs):"],["Amplitude:"]]; + var Ss = list("pol",-1,"pol",-1,"pol",-1,"mat",[-1,-1]); + this.scicos_context = struct(); + var ok = false; + this.set_param_popup_title = this.Btitre; var options = { scicos_context.E:["Phase delay (secs):",this.scicos_context.E], scicos_context.W:["Pulse Width (% of period):",this.scicos_context.W], @@ -104,7 +114,6 @@ function PULSE_SC() { return new BasicBlock(this.x); } PULSE_SC.prototype.get_popup_title = function PULSE_SC() { - var set_param_popup_title = "Set Pulse Generator parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/RAMP.js b/js/Sources/RAMP.js index f49c9ca1..2e68244b 100644 --- a/js/Sources/RAMP.js +++ b/js/Sources/RAMP.js @@ -23,6 +23,8 @@ function RAMP() { return this.x; } RAMP.prototype.get = function RAMP() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = msprintf("Set %s block parameters","RAMP"); var options = { slope:["Slope",this.slope], stt:["Start Time",this.stt], @@ -54,7 +56,6 @@ function RAMP() { return new BasicBlock(this.x); } RAMP.prototype.get_popup_title = function RAMP() { - var set_param_popup_title = msprintf("Set %s block parameters","RAMP"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/RAND_f.js b/js/Sources/RAND_f.js index 95b91026..65c53b2e 100644 --- a/js/Sources/RAND_f.js +++ b/js/Sources/RAND_f.js @@ -24,6 +24,14 @@ function RAND_f() { return this.x; } RAND_f.prototype.get = function RAND_f() { + var exprs = this.graphics.exprs; + if (size(exprs,"*")==5) { + var exprs = exprs.slice(1-1,3); + } + if (size(exprs,"*")==3) { + var exprs = [[exprs],[string(this.model.dstate[1-1])]]; + } + this.set_param_popup_title = "Set Random generator block parameters"; var options = { flag:["flag",this.flag], a:["A",this.a], @@ -68,7 +76,6 @@ function RAND_f() { return new BasicBlock(this.x); } RAND_f.prototype.get_popup_title = function RAND_f() { - var set_param_popup_title = "Set Random generator block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/RAND_m.js b/js/Sources/RAND_m.js index d4f2ae03..a6d6e050 100644 --- a/js/Sources/RAND_m.js +++ b/js/Sources/RAND_m.js @@ -33,6 +33,11 @@ function RAND_m() { return this.x; } RAND_m.prototype.get = function RAND_m() { + var exprs = this.graphics.exprs; + if (size(exprs,"*")==14) { + exprs[9-1] = []; + } + this.set_param_popup_title = "Set Random generator block parameters"; var options = { typ:["Datatype(1=real double 2=complex)",this.typ], flag:["flag",this.flag], @@ -97,7 +102,6 @@ function RAND_m() { return new BasicBlock(this.x); } RAND_m.prototype.get_popup_title = function RAND_m() { - var set_param_popup_title = "Set Random generator block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/READAU_f.js b/js/Sources/READAU_f.js index a6a73f59..1706e13a 100644 --- a/js/Sources/READAU_f.js +++ b/js/Sources/READAU_f.js @@ -29,6 +29,15 @@ function READAU_f() { return this.x; } READAU_f.prototype.get = function READAU_f() { + var exprs = this.graphics.exprs; + var out = this.model.out; + var dstate = this.model.dstate; + var ipar = this.model.ipar; + var imask = 9+ipar[1-1]; + var tmask = ipar[imask-1]; + var lunit = dstate[3-1]; + var fname = exprs[1-1]; + this.set_param_popup_title = msprintf("Set %s block parameters","READAU_f"); var options = { fname1:["Input File Name",this.fname1], N:["Buffer size",this.N], @@ -94,7 +103,6 @@ function READAU_f() { return new BasicBlock(this.x); } READAU_f.prototype.get_popup_title = function READAU_f() { - var set_param_popup_title = msprintf("Set %s block parameters","READAU_f"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/READC_f.js b/js/Sources/READC_f.js index c50c8718..1506c210 100644 --- a/js/Sources/READC_f.js +++ b/js/Sources/READC_f.js @@ -33,6 +33,17 @@ function READC_f() { return this.x; } READC_f.prototype.get = function READC_f() { + this.model = this.x.model; + var exprs = this.graphics.exprs; + var out = this.model.out; + var dstate = this.model.dstate; + var ipar = this.model.ipar; + var imask = 9+ipar[1-1]; + var tmask = ipar[imask-1]; + var lunit = dstate[3-1]; + var fname = exprs[3-1]; + var frmt = exprs[4-1]; + this.set_param_popup_title = msprintf("Set %s block parameters","READC_f"); var options = { tmask1:["Time Record Selection",this.tmask1], outmask:["Outputs Record Selection",this.outmask], @@ -139,7 +150,6 @@ function READC_f() { return new BasicBlock(this.x); } READC_f.prototype.get_popup_title = function READC_f() { - var set_param_popup_title = msprintf("Set %s block parameters","READC_f"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/RFILE_f.js b/js/Sources/RFILE_f.js index bd682931..dd34174b 100644 --- a/js/Sources/RFILE_f.js +++ b/js/Sources/RFILE_f.js @@ -29,6 +29,20 @@ function RFILE_f() { return this.x; } RFILE_f.prototype.get = function RFILE_f() { + var exprs = this.graphics.exprs; + var dstate = this.model.dstate; + var ipar = this.model.ipar; + var ievt = ipar[3-1]; + this.N = ipar[4-1]; + var imask = 5+ipar[1-1]+ipar[2-1]; + var tmask = ipar[imask-1]; + var lunit = dstate[3-1]; + var fname = exprs[3-1]; + var frmt = exprs[4-1]; + if (size(exprs,"*")>5) { + exprs[6-1] = []; + } + this.set_param_popup_title = msprintf("Set %s block parameters","RFILE_f"); var options = { tmask1:["Time Record Selection",this.tmask1], outmask:["Outputs Record Selection",this.outmask], @@ -121,7 +135,6 @@ function RFILE_f() { return new BasicBlock(this.x); } RFILE_f.prototype.get_popup_title = function RFILE_f() { - var set_param_popup_title = msprintf("Set %s block parameters","RFILE_f"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/SAWTOOTH_f.js b/js/Sources/SAWTOOTH_f.js index e15946ec..a952d277 100644 --- a/js/Sources/SAWTOOTH_f.js +++ b/js/Sources/SAWTOOTH_f.js @@ -23,7 +23,6 @@ function SAWTOOTH_f() { return new BasicBlock(this.x); } SAWTOOTH_f.prototype.get_popup_title = function SAWTOOTH_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Sources/STEP.js b/js/Sources/STEP.js index 4c6c6f7a..65706b32 100644 --- a/js/Sources/STEP.js +++ b/js/Sources/STEP.js @@ -22,6 +22,8 @@ function STEP() { return this.x; } STEP.prototype.get = function STEP() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = msprintf("Set %s block parameters","STEP_FUNCTION"); var options = { temps:["Step Time",this.temps], in1:["Initial Value",this.in1], @@ -77,7 +79,6 @@ function STEP() { return new BasicBlock(this.x); } STEP.prototype.get_popup_title = function STEP() { - var set_param_popup_title = msprintf("Set %s block parameters","STEP_FUNCTION"); - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/STEP_FUNCTION.js b/js/Sources/STEP_FUNCTION.js index 5caf7500..fa182cb0 100644 --- a/js/Sources/STEP_FUNCTION.js +++ b/js/Sources/STEP_FUNCTION.js @@ -119,7 +119,6 @@ function STEP_FUNCTION() { return new BasicBlock(this.x); } STEP_FUNCTION.prototype.get_popup_title = function STEP_FUNCTION() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Sources/SampleCLK.js b/js/Sources/SampleCLK.js index c563276a..acee4c3c 100644 --- a/js/Sources/SampleCLK.js +++ b/js/Sources/SampleCLK.js @@ -16,6 +16,8 @@ function SampleCLK() { return this.x; } SampleCLK.prototype.get = function SampleCLK() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set block parameters"; var options = { frequ:["Sample time",this.frequ], offset:["Offset",this.offset], @@ -60,7 +62,6 @@ function SampleCLK() { return new BasicBlock(this.x); } SampleCLK.prototype.get_popup_title = function SampleCLK() { - var set_param_popup_title = "Set block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Sources/Sigbuilder.js b/js/Sources/Sigbuilder.js index 775c775f..9383cc34 100644 --- a/js/Sources/Sigbuilder.js +++ b/js/Sources/Sigbuilder.js @@ -88,7 +88,6 @@ function Sigbuilder() { return new BasicBlock(this.x); } Sigbuilder.prototype.get_popup_title = function Sigbuilder() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Sources/TIME_f.js b/js/Sources/TIME_f.js index ad06fe4c..f51d4ba6 100644 --- a/js/Sources/TIME_f.js +++ b/js/Sources/TIME_f.js @@ -20,7 +20,6 @@ function TIME_f() { return new BasicBlock(this.x); } TIME_f.prototype.get_popup_title = function TIME_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Sources/TKSCALE.js b/js/Sources/TKSCALE.js index b4529690..70fcf9f8 100644 --- a/js/Sources/TKSCALE.js +++ b/js/Sources/TKSCALE.js @@ -20,6 +20,8 @@ function TKSCALE() { return this.x; } TKSCALE.prototype.get = function TKSCALE() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set scale block parameters"; var options = { a:["Min value",this.a], b:["Max value",this.b], @@ -43,7 +45,6 @@ function TKSCALE() { return new BasicBlock(this.x); } TKSCALE.prototype.get_popup_title = function TKSCALE() { - var set_param_popup_title = "Set scale block parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Threshold/GENERAL_f.js b/js/Threshold/GENERAL_f.js index 5e04e0c3..af7e11dd 100644 --- a/js/Threshold/GENERAL_f.js +++ b/js/Threshold/GENERAL_f.js @@ -22,6 +22,13 @@ function GENERAL_f() { return this.x; } GENERAL_f.prototype.get = function GENERAL_f() { + var exprs = this.graphics.exprs; + var rpar = this.model.rpar; + this.in1 = this.model.in; + this.out = this.model.evtout; + var nin = sum(this.in1); + var nout = sum(this.out); + this.set_param_popup_title = "Set General Zero-Crossing parameters"; var options = { in1:["Input size",this.in1], out:["Number of event output",this.out], @@ -68,7 +75,6 @@ function GENERAL_f() { return new BasicBlock(this.x); } GENERAL_f.prototype.get_popup_title = function GENERAL_f() { - var set_param_popup_title = "Set General Zero-Crossing parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } diff --git a/js/Threshold/NEGTOPOS_f.js b/js/Threshold/NEGTOPOS_f.js index d11b69df..797c7acb 100644 --- a/js/Threshold/NEGTOPOS_f.js +++ b/js/Threshold/NEGTOPOS_f.js @@ -25,7 +25,6 @@ function NEGTOPOS_f() { return new BasicBlock(this.x); } NEGTOPOS_f.prototype.get_popup_title = function NEGTOPOS_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Threshold/POSTONEG_f.js b/js/Threshold/POSTONEG_f.js index dcd8a98a..77396854 100644 --- a/js/Threshold/POSTONEG_f.js +++ b/js/Threshold/POSTONEG_f.js @@ -26,7 +26,6 @@ function POSTONEG_f() { return new BasicBlock(this.x); } POSTONEG_f.prototype.get_popup_title = function POSTONEG_f() { - var set_param_popup_title = "Set parameters"; - return set_param_popup_title; + return; } } diff --git a/js/Threshold/ZCROSS_f.js b/js/Threshold/ZCROSS_f.js index 6eb51ca6..2d1edd28 100644 --- a/js/Threshold/ZCROSS_f.js +++ b/js/Threshold/ZCROSS_f.js @@ -21,6 +21,8 @@ function ZCROSS_f() { return this.x; } ZCROSS_f.prototype.get = function ZCROSS_f() { + var exprs = this.graphics.exprs; + this.set_param_popup_title = "Set Zero-Crossing parameters"; var options = { in1:["Input size",this.in1], } @@ -57,7 +59,6 @@ function ZCROSS_f() { return new BasicBlock(this.x); } ZCROSS_f.prototype.get_popup_title = function ZCROSS_f() { - var set_param_popup_title = "Set Zero-Crossing parameters"; - return set_param_popup_title; + return this.set_param_popup_title; } } |