diff options
author | Sunil Shetye | 2018-08-22 21:18:08 +0530 |
---|---|---|
committer | Sunil Shetye | 2018-08-24 10:42:26 +0530 |
commit | b560ce4b4abb5450dce9a06a7bcddde3b96c1e2c (patch) | |
tree | dafb1774870089a6754d5b1190c45c37b4a036d6 /js | |
parent | f5bdd141a4fd73a98e98523fb6531d48ed5d9904 (diff) | |
download | sci2js-b560ce4b4abb5450dce9a06a7bcddde3b96c1e2c.tar.gz sci2js-b560ce4b4abb5450dce9a06a7bcddde3b96c1e2c.tar.bz2 sci2js-b560ce4b4abb5450dce9a06a7bcddde3b96c1e2c.zip |
support single option blocks
Diffstat (limited to 'js')
34 files changed, 136 insertions, 34 deletions
diff --git a/js/Branching/CLKFROM.js b/js/Branching/CLKFROM.js index 35c72583..11e79e17 100644 --- a/js/Branching/CLKFROM.js +++ b/js/Branching/CLKFROM.js @@ -17,7 +17,10 @@ function CLKFROM() { return this.x; } CLKFROM.prototype.get = function CLKFROM() { - alert("parameters cannot be modified"); + var options = { + tag:["Tag",this.tag], + } + return options; } CLKFROM.prototype.set = function CLKFROM() { this.exprs = this.graphics.exprs; diff --git a/js/Branching/MUX.js b/js/Branching/MUX.js index 4d221b68..2aab447c 100644 --- a/js/Branching/MUX.js +++ b/js/Branching/MUX.js @@ -18,7 +18,10 @@ function MUX() { return this.x; } MUX.prototype.get = function MUX() { - alert("parameters cannot be modified"); + var options = { + in1:["number of input ports or vector of sizes",this.in1], + } + return options; } MUX.prototype.set = function MUX() { this.exprs = this.graphics.exprs; diff --git a/js/Branching/MUX_f.js b/js/Branching/MUX_f.js index 88a93747..2a474040 100644 --- a/js/Branching/MUX_f.js +++ b/js/Branching/MUX_f.js @@ -18,7 +18,10 @@ function MUX_f() { return this.x; } MUX_f.prototype.get = function MUX_f() { - alert("parameters cannot be modified"); + var options = { + in1:["number of input ports or vector of sizes",this.in1], + } + return options; } MUX_f.prototype.set = function MUX_f() { this.exprs = this.graphics.exprs; diff --git a/js/Electrical/ConstantVoltage.js b/js/Electrical/ConstantVoltage.js index 866d0c0e..a0b070cf 100644 --- a/js/Electrical/ConstantVoltage.js +++ b/js/Electrical/ConstantVoltage.js @@ -26,7 +26,10 @@ function ConstantVoltage() { return this.x; } ConstantVoltage.prototype.get = function ConstantVoltage() { - alert("parameters cannot be modified"); + var options = { + V:["V (volt)",this.V], + } + return options; } ConstantVoltage.prototype.set = function ConstantVoltage() { this.exprs = this.graphics.exprs; diff --git a/js/Electrical/Inductor.js b/js/Electrical/Inductor.js index 321f3f18..0e497d10 100644 --- a/js/Electrical/Inductor.js +++ b/js/Electrical/Inductor.js @@ -26,7 +26,10 @@ function Inductor() { return this.x; } Inductor.prototype.get = function Inductor() { - alert("parameters cannot be modified"); + var options = { + L:["L (H)",this.L], + } + return options; } Inductor.prototype.set = function Inductor() { this.exprs = this.graphics.exprs; diff --git a/js/Electrical/Resistor.js b/js/Electrical/Resistor.js index 5c2494b5..fc7188de 100644 --- a/js/Electrical/Resistor.js +++ b/js/Electrical/Resistor.js @@ -26,7 +26,10 @@ function Resistor() { return this.x; } Resistor.prototype.get = function Resistor() { - alert("parameters cannot be modified"); + var options = { + R:["R (ohm)",this.R], + } + return options; } Resistor.prototype.set = function Resistor() { this.exprs = this.graphics.exprs; diff --git a/js/Events/EVTVARDLY.js b/js/Events/EVTVARDLY.js index 09a342d7..791714d4 100644 --- a/js/Events/EVTVARDLY.js +++ b/js/Events/EVTVARDLY.js @@ -19,7 +19,10 @@ function EVTVARDLY() { return this.x; } EVTVARDLY.prototype.get = function EVTVARDLY() { - alert("parameters cannot be modified"); + var options = { + fir:["Initial event firing time (<0 if absent)",this.fir], + } + return options; } EVTVARDLY.prototype.set = function EVTVARDLY() { this.exprs = this.graphics.exprs; diff --git a/js/Hydraulics/Flowmeter.js b/js/Hydraulics/Flowmeter.js index fd007139..cb848037 100644 --- a/js/Hydraulics/Flowmeter.js +++ b/js/Hydraulics/Flowmeter.js @@ -53,7 +53,10 @@ function Flowmeter() { return this.x; } Flowmeter.prototype.get = function Flowmeter() { - alert("parameters cannot be modified"); + var options = { + Qini:["Qini",this.Qini], + } + return options; } Flowmeter.prototype.set = function Flowmeter() { this.exprs = this.graphics.exprs; diff --git a/js/IntegerOp/JKFLIPFLOP.js b/js/IntegerOp/JKFLIPFLOP.js index 493293e2..2b4aaead 100644 --- a/js/IntegerOp/JKFLIPFLOP.js +++ b/js/IntegerOp/JKFLIPFLOP.js @@ -52,7 +52,10 @@ function JKFLIPFLOP() { return this.x; } JKFLIPFLOP.prototype.get = function JKFLIPFLOP() { - alert("parameters cannot be modified"); + var options = { + init:["Initial Value",this.init], + } + return options; } JKFLIPFLOP.prototype.set = function JKFLIPFLOP() { if (typeof(o)=="Block"&&o.gui=="DOLLAR_m") { diff --git a/js/IntegerOp/SRFLIPFLOP.js b/js/IntegerOp/SRFLIPFLOP.js index 428b23f0..60c00675 100644 --- a/js/IntegerOp/SRFLIPFLOP.js +++ b/js/IntegerOp/SRFLIPFLOP.js @@ -36,7 +36,10 @@ function SRFLIPFLOP() { return this.x; } SRFLIPFLOP.prototype.get = function SRFLIPFLOP() { - alert("parameters cannot be modified"); + var options = { + init:["Initial Value",this.init], + } + return options; } SRFLIPFLOP.prototype.set = function SRFLIPFLOP() { if (typeof(o)=="Block"&&o.gui=="DOLLAR_m") { diff --git a/js/Linear/BIGSOM_f.js b/js/Linear/BIGSOM_f.js index 6d5acdd3..5020005d 100644 --- a/js/Linear/BIGSOM_f.js +++ b/js/Linear/BIGSOM_f.js @@ -18,7 +18,10 @@ function BIGSOM_f() { return this.x; } BIGSOM_f.prototype.get = function BIGSOM_f() { - alert("parameters cannot be modified"); + var options = { + sgn:["Inputs ports signs/gain",this.sgn.toString().replace(/,/g," ")], + } + return options; } BIGSOM_f.prototype.set = function BIGSOM_f() { this.exprs = this.graphics.exprs; diff --git a/js/Linear/INTEGRAL_f.js b/js/Linear/INTEGRAL_f.js index 6feef192..160d3620 100644 --- a/js/Linear/INTEGRAL_f.js +++ b/js/Linear/INTEGRAL_f.js @@ -18,7 +18,10 @@ function INTEGRAL_f() { return this.x; } INTEGRAL_f.prototype.get = function INTEGRAL_f() { - alert("parameters cannot be modified"); + var options = { + x0:["Initial state",this.x0], + } + return options; } INTEGRAL_f.prototype.set = function INTEGRAL_f() { this.exprs = this.graphics.exprs; diff --git a/js/Linear/REGISTER_f.js b/js/Linear/REGISTER_f.js index c3671a98..704b372f 100644 --- a/js/Linear/REGISTER_f.js +++ b/js/Linear/REGISTER_f.js @@ -19,7 +19,10 @@ function REGISTER_f() { return this.x; } REGISTER_f.prototype.get = function REGISTER_f() { - alert("parameters cannot be modified"); + var options = { + z0:["Register initial condition",this.z0], + } + return options; } REGISTER_f.prototype.set = function REGISTER_f() { this.exprs = this.graphics.exprs; diff --git a/js/Misc/CONSTRAINT_c.js b/js/Misc/CONSTRAINT_c.js index 616d04e7..dc17effd 100644 --- a/js/Misc/CONSTRAINT_c.js +++ b/js/Misc/CONSTRAINT_c.js @@ -19,7 +19,10 @@ function CONSTRAINT_c() { return this.x; } CONSTRAINT_c.prototype.get = function CONSTRAINT_c() { - alert("parameters cannot be modified"); + var options = { + x0:["Initial guess values",this.x0.toString().replace(/,/g," ")], + } + return options; } CONSTRAINT_c.prototype.set = function CONSTRAINT_c() { this.exprs = this.graphics.exprs; diff --git a/js/NonLinear/EXPBLK_f.js b/js/NonLinear/EXPBLK_f.js index 2b4cc440..8d08da66 100644 --- a/js/NonLinear/EXPBLK_f.js +++ b/js/NonLinear/EXPBLK_f.js @@ -19,7 +19,10 @@ function EXPBLK_f() { return this.x; } EXPBLK_f.prototype.get = function EXPBLK_f() { - alert("parameters cannot be modified"); + var options = { + a:["a (>0)",this.a], + } + return options; } EXPBLK_f.prototype.set = function EXPBLK_f() { this.exprs = this.graphics.exprs; diff --git a/js/NonLinear/EXPBLK_m.js b/js/NonLinear/EXPBLK_m.js index 3aa7f33e..df1fc9d3 100644 --- a/js/NonLinear/EXPBLK_m.js +++ b/js/NonLinear/EXPBLK_m.js @@ -23,7 +23,10 @@ function EXPBLK_m() { return this.x; } EXPBLK_m.prototype.get = function EXPBLK_m() { - alert("parameters cannot be modified"); + var options = { + a:["a (>0)",this.a], + } + return options; } EXPBLK_m.prototype.set = function EXPBLK_m() { this.exprs = this.graphics.exprs; diff --git a/js/NonLinear/LOGBLK_f.js b/js/NonLinear/LOGBLK_f.js index 59ee4067..aa223ced 100644 --- a/js/NonLinear/LOGBLK_f.js +++ b/js/NonLinear/LOGBLK_f.js @@ -19,7 +19,10 @@ function LOGBLK_f() { return this.x; } LOGBLK_f.prototype.get = function LOGBLK_f() { - alert("parameters cannot be modified"); + var options = { + a:["Basis (>1)",this.a], + } + return options; } LOGBLK_f.prototype.set = function LOGBLK_f() { this.exprs = this.graphics.exprs; diff --git a/js/NonLinear/POWBLK_f.js b/js/NonLinear/POWBLK_f.js index 9bbda8a7..3d315239 100644 --- a/js/NonLinear/POWBLK_f.js +++ b/js/NonLinear/POWBLK_f.js @@ -19,7 +19,10 @@ function POWBLK_f() { return this.x; } POWBLK_f.prototype.get = function POWBLK_f() { - alert("parameters cannot be modified"); + var options = { + a:["to the power of",this.a], + } + return options; } POWBLK_f.prototype.set = function POWBLK_f() { this.exprs = this.graphics.exprs; diff --git a/js/NonLinear/PRODUCT.js b/js/NonLinear/PRODUCT.js index a4db3880..f8d80ab4 100644 --- a/js/NonLinear/PRODUCT.js +++ b/js/NonLinear/PRODUCT.js @@ -18,7 +18,10 @@ function PRODUCT() { return this.x; } PRODUCT.prototype.get = function PRODUCT() { - alert("parameters cannot be modified"); + var options = { + sgn:["Number of inputs or sign vector",this.sgn.toString().replace(/,/g," ")], + } + return options; } PRODUCT.prototype.set = function PRODUCT() { this.exprs = this.graphics.exprs; diff --git a/js/NonLinear/TrigFun.js b/js/NonLinear/TrigFun.js index 776e2309..827ba815 100644 --- a/js/NonLinear/TrigFun.js +++ b/js/NonLinear/TrigFun.js @@ -16,7 +16,10 @@ function TrigFun() { return this.x; } TrigFun.prototype.get = function TrigFun() { - alert("parameters cannot be modified"); + var options = { + fun:["Function",this.fun], + } + return options; } TrigFun.prototype.set = function TrigFun() { this.exprs = this.graphics.exprs; diff --git a/js/PDE/PDE.js b/js/PDE/PDE.js index bda86d3a..c9339a90 100644 --- a/js/PDE/PDE.js +++ b/js/PDE/PDE.js @@ -18,7 +18,10 @@ function PDE() { return this.x; } PDE.prototype.get = function PDE() { - alert("parameters cannot be modified"); + var options = { + okk:["New block\'s name :",this.okk], + } + return options; } PDE.prototype.set = function PDE() { var label = this.graphics.exprs; diff --git a/js/Sinks/CLKOUTV_f.js b/js/Sinks/CLKOUTV_f.js index 08e77e1f..ecf86c06 100644 --- a/js/Sinks/CLKOUTV_f.js +++ b/js/Sinks/CLKOUTV_f.js @@ -17,7 +17,10 @@ function CLKOUTV_f() { return this.x; } CLKOUTV_f.prototype.get = function CLKOUTV_f() { - alert("parameters cannot be modified"); + var options = { + prt:["Port number",this.prt], + } + return options; } CLKOUTV_f.prototype.set = function CLKOUTV_f() { this.exprs = this.graphics.exprs; diff --git a/js/Sinks/CLKOUT_f.js b/js/Sinks/CLKOUT_f.js index 96212275..88ec4ea3 100644 --- a/js/Sinks/CLKOUT_f.js +++ b/js/Sinks/CLKOUT_f.js @@ -17,7 +17,10 @@ function CLKOUT_f() { return this.x; } CLKOUT_f.prototype.get = function CLKOUT_f() { - alert("parameters cannot be modified"); + var options = { + prt:["Port number",this.prt], + } + return options; } CLKOUT_f.prototype.set = function CLKOUT_f() { this.exprs = this.graphics.exprs; diff --git a/js/Sinks/OUTIMPL_f.js b/js/Sinks/OUTIMPL_f.js index 1e473d2d..3ffe67be 100644 --- a/js/Sinks/OUTIMPL_f.js +++ b/js/Sinks/OUTIMPL_f.js @@ -23,7 +23,10 @@ function OUTIMPL_f() { return this.x; } OUTIMPL_f.prototype.get = function OUTIMPL_f() { - alert("parameters cannot be modified"); + var options = { + prt:["Port number",this.prt], + } + return options; } OUTIMPL_f.prototype.set = function OUTIMPL_f() { this.exprs = this.graphics.exprs; diff --git a/js/Sinks/OUT_f.js b/js/Sinks/OUT_f.js index c4f898ff..e578c791 100644 --- a/js/Sinks/OUT_f.js +++ b/js/Sinks/OUT_f.js @@ -20,7 +20,10 @@ function OUT_f() { return this.x; } OUT_f.prototype.get = function OUT_f() { - alert("parameters cannot be modified"); + var options = { + prt:["Port number",this.prt], + } + return options; } OUT_f.prototype.set = function OUT_f() { this.exprs = this.graphics.exprs; diff --git a/js/Sources/CLKINV_f.js b/js/Sources/CLKINV_f.js index 90e61431..622fd0e7 100644 --- a/js/Sources/CLKINV_f.js +++ b/js/Sources/CLKINV_f.js @@ -18,7 +18,10 @@ function CLKINV_f() { return this.x; } CLKINV_f.prototype.get = function CLKINV_f() { - alert("parameters cannot be modified"); + var options = { + prt:["Port Number",this.prt], + } + return options; } CLKINV_f.prototype.set = function CLKINV_f() { this.exprs = this.graphics.exprs; diff --git a/js/Sources/CLKIN_f.js b/js/Sources/CLKIN_f.js index cb550389..7c23fc38 100644 --- a/js/Sources/CLKIN_f.js +++ b/js/Sources/CLKIN_f.js @@ -17,7 +17,10 @@ function CLKIN_f() { return this.x; } CLKIN_f.prototype.get = function CLKIN_f() { - alert("parameters cannot be modified"); + var options = { + prt:["Port number",this.prt], + } + return options; } CLKIN_f.prototype.set = function CLKIN_f() { this.exprs = this.graphics.exprs; diff --git a/js/Sources/CONST.js b/js/Sources/CONST.js index a3a51cb3..69c4d6e7 100644 --- a/js/Sources/CONST.js +++ b/js/Sources/CONST.js @@ -18,7 +18,10 @@ function CONST() { return this.x; } CONST.prototype.get = function CONST() { - alert("parameters cannot be modified"); + var options = { + C:["Constant",this.C], + } + return options; } CONST.prototype.set = function CONST() { this.exprs = this.graphics.exprs; diff --git a/js/Sources/CONST_f.js b/js/Sources/CONST_f.js index fcd527ac..993cb024 100644 --- a/js/Sources/CONST_f.js +++ b/js/Sources/CONST_f.js @@ -18,7 +18,10 @@ function CONST_f() { return this.x; } CONST_f.prototype.get = function CONST_f() { - alert("parameters cannot be modified"); + var options = { + C:["Constant",this.C], + } + return options; } CONST_f.prototype.set = function CONST_f() { this.exprs = this.graphics.exprs; diff --git a/js/Sources/CONST_m.js b/js/Sources/CONST_m.js index 7cc3cd7f..23772a0a 100644 --- a/js/Sources/CONST_m.js +++ b/js/Sources/CONST_m.js @@ -21,7 +21,10 @@ function CONST_m() { return this.x; } CONST_m.prototype.get = function CONST_m() { - alert("parameters cannot be modified"); + var options = { + C:["Constant Value",this.C], + } + return options; } CONST_m.prototype.set = function CONST_m() { this.exprs = this.graphics.exprs; diff --git a/js/Sources/GEN_SQR.js b/js/Sources/GEN_SQR.js index 3b9df67b..ff2f90ef 100644 --- a/js/Sources/GEN_SQR.js +++ b/js/Sources/GEN_SQR.js @@ -54,7 +54,10 @@ function GEN_SQR() { return this.x; } GEN_SQR.prototype.get = function GEN_SQR() { - alert("parameters cannot be modified"); + var options = { + scicos_context.Amin:[Bitems,scicos_context.Amin], + } + return options; } GEN_SQR.prototype.set = function GEN_SQR() { var y = this.needcompile; diff --git a/js/Sources/INIMPL_f.js b/js/Sources/INIMPL_f.js index 4fc56a38..af1d8973 100644 --- a/js/Sources/INIMPL_f.js +++ b/js/Sources/INIMPL_f.js @@ -23,7 +23,10 @@ function INIMPL_f() { return this.x; } INIMPL_f.prototype.get = function INIMPL_f() { - alert("parameters cannot be modified"); + var options = { + prt:["Port Number",this.prt], + } + return options; } INIMPL_f.prototype.set = function INIMPL_f() { this.exprs = this.graphics.exprs; diff --git a/js/Sources/PULSE_SC.js b/js/Sources/PULSE_SC.js index e6976819..2ad17f19 100644 --- a/js/Sources/PULSE_SC.js +++ b/js/Sources/PULSE_SC.js @@ -49,7 +49,10 @@ function PULSE_SC() { return this.x; } PULSE_SC.prototype.get = function PULSE_SC() { - alert("parameters cannot be modified"); + var options = { + scicos_context.E:[Bitems,scicos_context.E], + } + return options; } PULSE_SC.prototype.set = function PULSE_SC() { var y = this.needcompile; diff --git a/js/Threshold/ZCROSS_f.js b/js/Threshold/ZCROSS_f.js index f822d0c1..4e5b1346 100644 --- a/js/Threshold/ZCROSS_f.js +++ b/js/Threshold/ZCROSS_f.js @@ -21,7 +21,10 @@ function ZCROSS_f() { return this.x; } ZCROSS_f.prototype.get = function ZCROSS_f() { - alert("parameters cannot be modified"); + var options = { + in1:["Input size",this.in1], + } + return options; } ZCROSS_f.prototype.set = function ZCROSS_f() { this.exprs = this.graphics.exprs; |