summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/Branching/CLKFROM.js6
-rw-r--r--js/Branching/CLKFROM.pickle6
-rw-r--r--js/Branching/CLKGOTO.js12
-rw-r--r--js/Branching/CLKGOTO.pickle8
-rw-r--r--js/Branching/CLKGotoTagVisibility.js6
-rw-r--r--js/Branching/CLKGotoTagVisibility.pickle6
-rw-r--r--js/Branching/DEMUX.js28
-rw-r--r--js/Branching/DEMUX.pickle6
-rw-r--r--js/Branching/DEMUX_f.js28
-rw-r--r--js/Branching/DEMUX_f.pickle6
-rw-r--r--js/Branching/ESELECT_f.js34
-rw-r--r--js/Branching/ESELECT_f.pickle10
-rw-r--r--js/Branching/EXTRACTOR.js16
-rw-r--r--js/Branching/EXTRACTOR.pickle8
-rw-r--r--js/Branching/FROM.js6
-rw-r--r--js/Branching/FROM.pickle6
-rw-r--r--js/Branching/FROMMO.js6
-rw-r--r--js/Branching/FROMMO.pickle6
-rw-r--r--js/Branching/GOTO.js12
-rw-r--r--js/Branching/GOTO.pickle8
-rw-r--r--js/Branching/GOTOMO.js12
-rw-r--r--js/Branching/GOTOMO.pickle8
-rw-r--r--js/Branching/GotoTagVisibility.js6
-rw-r--r--js/Branching/GotoTagVisibility.pickle6
-rw-r--r--js/Branching/GotoTagVisibilityMO.js6
-rw-r--r--js/Branching/GotoTagVisibilityMO.pickle6
-rw-r--r--js/Branching/ISELECT_f.js16
-rw-r--r--js/Branching/ISELECT_f.pickle8
-rw-r--r--js/Branching/ISELECT_m.js26
-rw-r--r--js/Branching/ISELECT_m.pickle10
-rw-r--r--js/Branching/MUX.js28
-rw-r--r--js/Branching/MUX.pickle6
-rw-r--r--js/Branching/MUX_f.js28
-rw-r--r--js/Branching/MUX_f.pickle6
-rw-r--r--js/Branching/M_SWITCH.js26
-rw-r--r--js/Branching/M_SWITCH.pickle10
-rw-r--r--js/Branching/NRMSOM_f.js8
-rw-r--r--js/Branching/NRMSOM_f.pickle6
-rw-r--r--js/Branching/RELAY_f.js12
-rw-r--r--js/Branching/RELAY_f.pickle8
-rw-r--r--js/Branching/SCALAR2VECTOR.js14
-rw-r--r--js/Branching/SCALAR2VECTOR.pickle6
-rw-r--r--js/Branching/SELECT_f.js16
-rw-r--r--js/Branching/SELECT_f.pickle8
-rw-r--r--js/Branching/SELECT_m.js26
-rw-r--r--js/Branching/SELECT_m.pickle10
-rw-r--r--js/Branching/SWITCH2.js24
-rw-r--r--js/Branching/SWITCH2.pickle10
-rw-r--r--js/Branching/SWITCH2_m.js32
-rw-r--r--js/Branching/SWITCH2_m.pickle12
-rw-r--r--js/Branching/SWITCH_f.js12
-rw-r--r--js/Branching/SWITCH_f.pickle8
-rw-r--r--js/Electrical/Capacitor.js16
-rw-r--r--js/Electrical/Capacitor.pickle8
-rw-r--r--js/Electrical/ConstantVoltage.js14
-rw-r--r--js/Electrical/ConstantVoltage.pickle6
-rw-r--r--js/Electrical/Diode.js20
-rw-r--r--js/Electrical/Diode.pickle12
-rw-r--r--js/Electrical/Ground.js4
-rw-r--r--js/Electrical/Gyrator.js4
-rw-r--r--js/Electrical/Gyrator.pickle8
-rw-r--r--js/Electrical/IdealTransformer.js4
-rw-r--r--js/Electrical/IdealTransformer.pickle6
-rw-r--r--js/Electrical/Inductor.js14
-rw-r--r--js/Electrical/Inductor.pickle6
-rw-r--r--js/Electrical/NMOS.js26
-rw-r--r--js/Electrical/NMOS.pickle24
-rw-r--r--js/Electrical/NPN.js4
-rw-r--r--js/Electrical/NPN.pickle40
-rw-r--r--js/Electrical/OpAmp.js4
-rw-r--r--js/Electrical/OpAmp.pickle12
-rw-r--r--js/Electrical/PMOS.js26
-rw-r--r--js/Electrical/PMOS.pickle24
-rw-r--r--js/Electrical/PNP.js4
-rw-r--r--js/Electrical/PNP.pickle40
-rw-r--r--js/Electrical/Resistor.js14
-rw-r--r--js/Electrical/Resistor.pickle6
-rw-r--r--js/Electrical/SineVoltage.js22
-rw-r--r--js/Electrical/SineVoltage.pickle16
-rw-r--r--js/Electrical/Switch.js8
-rw-r--r--js/Electrical/Switch.pickle8
-rw-r--r--js/Electrical/VVsourceAC.js14
-rw-r--r--js/Electrical/VVsourceAC.pickle6
-rw-r--r--js/Electrical/VoltageSensor.js4
-rw-r--r--js/Electrical/VsourceAC.js16
-rw-r--r--js/Electrical/VsourceAC.pickle8
-rw-r--r--js/Events/END_c.js10
-rw-r--r--js/Events/END_c.pickle8
-rw-r--r--js/Events/EVTDLY_c.js18
-rw-r--r--js/Events/EVTDLY_c.pickle8
-rw-r--r--js/Events/EVTDLY_f.js18
-rw-r--r--js/Events/EVTDLY_f.pickle8
-rw-r--r--js/Events/EVTGEN_f.js12
-rw-r--r--js/Events/EVTGEN_f.pickle6
-rw-r--r--js/Events/EVTVARDLY.js4
-rw-r--r--js/Events/EVTVARDLY.pickle8
-rw-r--r--js/Events/HALT_f.js8
-rw-r--r--js/Events/HALT_f.pickle6
-rw-r--r--js/Events/IFTHEL_f.js18
-rw-r--r--js/Events/IFTHEL_f.pickle8
-rw-r--r--js/Events/MFCLCK_f.js16
-rw-r--r--js/Events/MFCLCK_f.pickle8
-rw-r--r--js/Events/M_freq.js14
-rw-r--r--js/Events/M_freq.pickle10
-rw-r--r--js/Events/freq_div.pickle8
-rw-r--r--js/Hydraulics/Bache.js30
-rw-r--r--js/Hydraulics/Bache.pickle24
-rw-r--r--js/Hydraulics/Flowmeter.js4
-rw-r--r--js/Hydraulics/Flowmeter.pickle6
-rw-r--r--js/Hydraulics/PerteDP.js24
-rw-r--r--js/Hydraulics/PerteDP.pickle18
-rw-r--r--js/Hydraulics/PuitsP.js20
-rw-r--r--js/Hydraulics/PuitsP.pickle12
-rw-r--r--js/Hydraulics/SourceP.js20
-rw-r--r--js/Hydraulics/SourceP.pickle12
-rw-r--r--js/Hydraulics/VanneReglante.js16
-rw-r--r--js/Hydraulics/VanneReglante.pickle8
-rw-r--r--js/IntegerOp/BITCLEAR.js42
-rw-r--r--js/IntegerOp/BITCLEAR.pickle10
-rw-r--r--js/IntegerOp/BITSET.js42
-rw-r--r--js/IntegerOp/BITSET.pickle10
-rw-r--r--js/IntegerOp/CONVERT.js326
-rw-r--r--js/IntegerOp/CONVERT.pickle12
-rw-r--r--js/IntegerOp/EXTRACTBITS.js94
-rw-r--r--js/IntegerOp/EXTRACTBITS.pickle14
-rw-r--r--js/IntegerOp/INTMUL.js48
-rw-r--r--js/IntegerOp/INTMUL.pickle10
-rw-r--r--js/IntegerOp/JKFLIPFLOP.js16
-rw-r--r--js/IntegerOp/JKFLIPFLOP.pickle8
-rw-r--r--js/IntegerOp/LOGIC.js26
-rw-r--r--js/IntegerOp/LOGIC.pickle8
-rw-r--r--js/IntegerOp/SHIFT.js50
-rw-r--r--js/IntegerOp/SHIFT.pickle12
-rw-r--r--js/IntegerOp/SRFLIPFLOP.js16
-rw-r--r--js/IntegerOp/SRFLIPFLOP.pickle8
-rw-r--r--js/Linear/BIGSOM_f.js16
-rw-r--r--js/Linear/BIGSOM_f.pickle6
-rw-r--r--js/Linear/CLR.js6
-rw-r--r--js/Linear/CLR.pickle8
-rw-r--r--js/Linear/CLR_f.js6
-rw-r--r--js/Linear/CLR_f.pickle8
-rw-r--r--js/Linear/CLSS.js42
-rw-r--r--js/Linear/CLSS.pickle16
-rw-r--r--js/Linear/CLSS_f.js32
-rw-r--r--js/Linear/CLSS_f.pickle16
-rw-r--r--js/Linear/DELAYV_f.js30
-rw-r--r--js/Linear/DELAYV_f.pickle10
-rw-r--r--js/Linear/DELAY_f.js14
-rw-r--r--js/Linear/DELAY_f.pickle8
-rw-r--r--js/Linear/DIFF_c.js18
-rw-r--r--js/Linear/DIFF_c.pickle8
-rw-r--r--js/Linear/DLR.js6
-rw-r--r--js/Linear/DLR.pickle8
-rw-r--r--js/Linear/DLR_f.js6
-rw-r--r--js/Linear/DLR_f.pickle8
-rw-r--r--js/Linear/DLSS.js42
-rw-r--r--js/Linear/DLSS.pickle16
-rw-r--r--js/Linear/DLSS_f.js32
-rw-r--r--js/Linear/DLSS_f.pickle16
-rw-r--r--js/Linear/DOLLAR.js34
-rw-r--r--js/Linear/DOLLAR.pickle12
-rw-r--r--js/Linear/DOLLAR_f.js14
-rw-r--r--js/Linear/DOLLAR_f.pickle10
-rw-r--r--js/Linear/DOLLAR_m.js34
-rw-r--r--js/Linear/DOLLAR_m.pickle12
-rw-r--r--js/Linear/GAINBLK.js62
-rw-r--r--js/Linear/GAINBLK.pickle8
-rw-r--r--js/Linear/GAINBLK_f.js14
-rw-r--r--js/Linear/GAINBLK_f.pickle6
-rw-r--r--js/Linear/GAIN_f.js14
-rw-r--r--js/Linear/GAIN_f.pickle6
-rw-r--r--js/Linear/INTEGRAL.js44
-rw-r--r--js/Linear/INTEGRAL.pickle16
-rw-r--r--js/Linear/INTEGRAL_f.js10
-rw-r--r--js/Linear/INTEGRAL_f.pickle6
-rw-r--r--js/Linear/INTEGRAL_m.js70
-rw-r--r--js/Linear/INTEGRAL_m.pickle16
-rw-r--r--js/Linear/PID.js18
-rw-r--r--js/Linear/PID.pickle14
-rw-r--r--js/Linear/REGISTER.js44
-rw-r--r--js/Linear/REGISTER.pickle8
-rw-r--r--js/Linear/REGISTER_f.js12
-rw-r--r--js/Linear/REGISTER_f.pickle6
-rw-r--r--js/Linear/SAMPHOLD_m.js6
-rw-r--r--js/Linear/SAMPHOLD_m.pickle6
-rw-r--r--js/Linear/SUMMATION.js88
-rw-r--r--js/Linear/SUMMATION.pickle12
-rw-r--r--js/Linear/TCLSS.js36
-rw-r--r--js/Linear/TCLSS.pickle16
-rw-r--r--js/Linear/TCLSS_f.js36
-rw-r--r--js/Linear/TCLSS_f.pickle16
-rw-r--r--js/Linear/TIME_DELAY.js22
-rw-r--r--js/Linear/TIME_DELAY.pickle10
-rw-r--r--js/Linear/VARIABLE_DELAY.js22
-rw-r--r--js/Linear/VARIABLE_DELAY.pickle10
-rw-r--r--js/MatrixOp/CUMSUM.js20
-rw-r--r--js/MatrixOp/CUMSUM.pickle10
-rw-r--r--js/MatrixOp/EXTRACT.js20
-rw-r--r--js/MatrixOp/EXTRACT.pickle12
-rw-r--r--js/MatrixOp/EXTTRI.js20
-rw-r--r--js/MatrixOp/EXTTRI.pickle10
-rw-r--r--js/MatrixOp/MATBKSL.js6
-rw-r--r--js/MatrixOp/MATBKSL.pickle6
-rw-r--r--js/MatrixOp/MATCATH.js8
-rw-r--r--js/MatrixOp/MATCATH.pickle8
-rw-r--r--js/MatrixOp/MATCATV.js8
-rw-r--r--js/MatrixOp/MATCATV.pickle8
-rw-r--r--js/MatrixOp/MATDET.js6
-rw-r--r--js/MatrixOp/MATDET.pickle6
-rw-r--r--js/MatrixOp/MATDIAG.js6
-rw-r--r--js/MatrixOp/MATDIAG.pickle6
-rw-r--r--js/MatrixOp/MATDIV.js6
-rw-r--r--js/MatrixOp/MATDIV.pickle6
-rw-r--r--js/MatrixOp/MATEIG.js16
-rw-r--r--js/MatrixOp/MATEIG.pickle10
-rw-r--r--js/MatrixOp/MATEXPM.js6
-rw-r--r--js/MatrixOp/MATEXPM.pickle6
-rw-r--r--js/MatrixOp/MATINV.js6
-rw-r--r--js/MatrixOp/MATINV.pickle6
-rw-r--r--js/MatrixOp/MATLU.js8
-rw-r--r--js/MatrixOp/MATLU.pickle8
-rw-r--r--js/MatrixOp/MATMAGPHI.js8
-rw-r--r--js/MatrixOp/MATMAGPHI.pickle8
-rw-r--r--js/MatrixOp/MATMUL.js78
-rw-r--r--js/MatrixOp/MATMUL.pickle12
-rw-r--r--js/MatrixOp/MATPINV.js6
-rw-r--r--js/MatrixOp/MATPINV.pickle6
-rw-r--r--js/MatrixOp/MATRESH.js20
-rw-r--r--js/MatrixOp/MATRESH.pickle12
-rw-r--r--js/MatrixOp/MATSING.js16
-rw-r--r--js/MatrixOp/MATSING.pickle10
-rw-r--r--js/MatrixOp/MATSUM.js20
-rw-r--r--js/MatrixOp/MATSUM.pickle10
-rw-r--r--js/MatrixOp/MATTRAN.js8
-rw-r--r--js/MatrixOp/MATTRAN.pickle8
-rw-r--r--js/MatrixOp/MATZREIM.js8
-rw-r--r--js/MatrixOp/MATZREIM.pickle8
-rw-r--r--js/MatrixOp/RICC.js4
-rw-r--r--js/MatrixOp/RICC.pickle8
-rw-r--r--js/MatrixOp/ROOTCOEF.js10
-rw-r--r--js/MatrixOp/ROOTCOEF.pickle8
-rw-r--r--js/MatrixOp/SQRT.js10
-rw-r--r--js/MatrixOp/SQRT.pickle6
-rw-r--r--js/MatrixOp/SUBMAT.js22
-rw-r--r--js/MatrixOp/SUBMAT.pickle18
-rw-r--r--js/Misc/BACKLASH.js8
-rw-r--r--js/Misc/BACKLASH.pickle10
-rw-r--r--js/Misc/BOUNCE.js56
-rw-r--r--js/Misc/BOUNCE.pickle24
-rw-r--r--js/Misc/BOUNCEXY.js48
-rw-r--r--js/Misc/BOUNCEXY.pickle22
-rw-r--r--js/Misc/BPLATFORM.js26
-rw-r--r--js/Misc/BPLATFORM.pickle20
-rw-r--r--js/Misc/CBLOCK.js94
-rw-r--r--js/Misc/CBLOCK.pickle36
-rw-r--r--js/Misc/CBLOCK4.js72
-rw-r--r--js/Misc/CBLOCK4.pickle48
-rw-r--r--js/Misc/CONSTRAINT2_c.js36
-rw-r--r--js/Misc/CONSTRAINT2_c.pickle10
-rw-r--r--js/Misc/CONSTRAINT_c.js12
-rw-r--r--js/Misc/CONSTRAINT_c.pickle6
-rw-r--r--js/Misc/DEADBAND.js16
-rw-r--r--js/Misc/DEADBAND.pickle12
-rw-r--r--js/Misc/DIFF_f.js10
-rw-r--r--js/Misc/DIFF_f.pickle8
-rw-r--r--js/Misc/EDGETRIGGER.js10
-rw-r--r--js/Misc/EDGETRIGGER.pickle6
-rw-r--r--js/Misc/EXPRESSION.pickle16
-rw-r--r--js/Misc/HYSTHERESIS.js18
-rw-r--r--js/Misc/HYSTHERESIS.pickle16
-rw-r--r--js/Misc/LOGICAL_OP.js66
-rw-r--r--js/Misc/LOGICAL_OP.pickle14
-rw-r--r--js/Misc/MBLOCK.js48
-rw-r--r--js/Misc/MBLOCK.pickle34
-rw-r--r--js/Misc/MEMORY_f.js14
-rw-r--r--js/Misc/MEMORY_f.pickle10
-rw-r--r--js/Misc/PENDULUM_ANIM.js26
-rw-r--r--js/Misc/PENDULUM_ANIM.pickle20
-rw-r--r--js/Misc/RATELIMITER.js14
-rw-r--r--js/Misc/RATELIMITER.pickle10
-rw-r--r--js/Misc/RELATIONALOP.js48
-rw-r--r--js/Misc/RELATIONALOP.pickle12
-rw-r--r--js/Misc/SUPER_f.js4
-rw-r--r--js/Misc/TEXT_f.js26
-rw-r--r--js/Misc/TEXT_f.pickle12
-rw-r--r--js/Misc/c_block.js34
-rw-r--r--js/Misc/c_block.pickle16
-rw-r--r--js/Misc/fortran_block.js30
-rw-r--r--js/Misc/fortran_block.pickle16
-rw-r--r--js/Misc/generic_block.js72
-rw-r--r--js/Misc/generic_block.pickle34
-rw-r--r--js/Misc/generic_block2.js76
-rw-r--r--js/Misc/generic_block2.pickle38
-rw-r--r--js/Misc/generic_block3.js80
-rw-r--r--js/Misc/generic_block3.pickle48
-rw-r--r--js/Misc/scifunc_block.js48
-rw-r--r--js/Misc/scifunc_block.pickle26
-rw-r--r--js/Misc/scifunc_block_m.js48
-rw-r--r--js/Misc/scifunc_block_m.pickle26
-rw-r--r--js/NonLinear/ABS_VALUE.js4
-rw-r--r--js/NonLinear/ABS_VALUE.pickle6
-rw-r--r--js/NonLinear/DLRADAPT_f.js30
-rw-r--r--js/NonLinear/DLRADAPT_f.pickle18
-rw-r--r--js/NonLinear/EXPBLK_f.js10
-rw-r--r--js/NonLinear/EXPBLK_f.pickle8
-rw-r--r--js/NonLinear/EXPBLK_m.js10
-rw-r--r--js/NonLinear/EXPBLK_m.pickle8
-rw-r--r--js/NonLinear/INTRP2BLK_f.js20
-rw-r--r--js/NonLinear/INTRP2BLK_f.pickle12
-rw-r--r--js/NonLinear/INTRPLBLK_f.js16
-rw-r--r--js/NonLinear/INTRPLBLK_f.pickle10
-rw-r--r--js/NonLinear/LOGBLK_f.js10
-rw-r--r--js/NonLinear/LOGBLK_f.pickle8
-rw-r--r--js/NonLinear/LOOKUP2D.js46
-rw-r--r--js/NonLinear/LOOKUP2D.pickle18
-rw-r--r--js/NonLinear/LOOKUP_c.pickle26
-rw-r--r--js/NonLinear/MAXMIN.js26
-rw-r--r--js/NonLinear/MAXMIN.pickle12
-rw-r--r--js/NonLinear/POWBLK_f.js14
-rw-r--r--js/NonLinear/POWBLK_f.pickle8
-rw-r--r--js/NonLinear/PRODUCT.js32
-rw-r--r--js/NonLinear/PRODUCT.pickle6
-rw-r--r--js/NonLinear/QUANT_f.js20
-rw-r--r--js/NonLinear/QUANT_f.pickle8
-rw-r--r--js/NonLinear/SATURATION.js16
-rw-r--r--js/NonLinear/SATURATION.pickle12
-rw-r--r--js/NonLinear/SAT_f.js18
-rw-r--r--js/NonLinear/SAT_f.pickle12
-rw-r--r--js/NonLinear/SIGNUM.js4
-rw-r--r--js/NonLinear/SIGNUM.pickle6
-rw-r--r--js/NonLinear/TrigFun.js8
-rw-r--r--js/NonLinear/TrigFun.pickle8
-rw-r--r--js/PDE/PDE.js22
-rw-r--r--js/PDE/PDE.pickle12
-rw-r--r--js/Sinks/AFFICH_m.js46
-rw-r--r--js/Sinks/AFFICH_m.pickle20
-rw-r--r--js/Sinks/BARXY.js22
-rw-r--r--js/Sinks/BARXY.pickle16
-rw-r--r--js/Sinks/CANIMXY.js60
-rw-r--r--js/Sinks/CANIMXY.pickle28
-rw-r--r--js/Sinks/CANIMXY3D.js72
-rw-r--r--js/Sinks/CANIMXY3D.pickle28
-rw-r--r--js/Sinks/CEVENTSCOPE.js52
-rw-r--r--js/Sinks/CEVENTSCOPE.pickle18
-rw-r--r--js/Sinks/CFSCOPE.js58
-rw-r--r--js/Sinks/CFSCOPE.pickle24
-rw-r--r--js/Sinks/CLKOUTV_f.js20
-rw-r--r--js/Sinks/CLKOUTV_f.pickle12
-rw-r--r--js/Sinks/CLKOUT_f.js14
-rw-r--r--js/Sinks/CLKOUT_f.pickle6
-rw-r--r--js/Sinks/CMAT3D.js26
-rw-r--r--js/Sinks/CMAT3D.pickle18
-rw-r--r--js/Sinks/CMATVIEW.js24
-rw-r--r--js/Sinks/CMATVIEW.pickle12
-rw-r--r--js/Sinks/CMSCOPE.js84
-rw-r--r--js/Sinks/CMSCOPE.pickle28
-rw-r--r--js/Sinks/CSCOPE.js58
-rw-r--r--js/Sinks/CSCOPE.pickle26
-rw-r--r--js/Sinks/CSCOPXY.js60
-rw-r--r--js/Sinks/CSCOPXY.pickle28
-rw-r--r--js/Sinks/CSCOPXY3D.js70
-rw-r--r--js/Sinks/CSCOPXY3D.pickle28
-rw-r--r--js/Sinks/OUTIMPL_f.js18
-rw-r--r--js/Sinks/OUTIMPL_f.pickle6
-rw-r--r--js/Sinks/OUT_f.js20
-rw-r--r--js/Sinks/OUT_f.pickle6
-rw-r--r--js/Sinks/TOWS_c.js24
-rw-r--r--js/Sinks/TOWS_c.pickle12
-rw-r--r--js/Sinks/WFILE_f.js52
-rw-r--r--js/Sinks/WFILE_f.pickle16
-rw-r--r--js/Sinks/WRITEAU_f.js28
-rw-r--r--js/Sinks/WRITEAU_f.pickle8
-rw-r--r--js/Sinks/WRITEC_f.js60
-rw-r--r--js/Sinks/WRITEC_f.pickle20
-rw-r--r--js/Sources/CLKINV_f.js20
-rw-r--r--js/Sources/CLKINV_f.pickle6
-rw-r--r--js/Sources/CLKIN_f.js14
-rw-r--r--js/Sources/CLKIN_f.pickle6
-rw-r--r--js/Sources/CLOCK_c.js16
-rw-r--r--js/Sources/CLOCK_c.pickle12
-rw-r--r--js/Sources/CLOCK_f.js14
-rw-r--r--js/Sources/CLOCK_f.pickle10
-rw-r--r--js/Sources/CONST.js14
-rw-r--r--js/Sources/CONST.pickle6
-rw-r--r--js/Sources/CONST_f.js12
-rw-r--r--js/Sources/CONST_f.pickle6
-rw-r--r--js/Sources/CONST_m.js32
-rw-r--r--js/Sources/CONST_m.pickle8
-rw-r--r--js/Sources/CURVE_c.pickle26
-rw-r--r--js/Sources/Counter.js26
-rw-r--r--js/Sources/Counter.pickle10
-rw-r--r--js/Sources/FROMWS_c.js22
-rw-r--r--js/Sources/FROMWS_c.pickle14
-rw-r--r--js/Sources/GENSIN_f.js8
-rw-r--r--js/Sources/GENSIN_f.pickle10
-rw-r--r--js/Sources/GENSQR_f.js10
-rw-r--r--js/Sources/GENSQR_f.pickle6
-rw-r--r--js/Sources/GEN_SQR.pickle14
-rw-r--r--js/Sources/INIMPL_f.js18
-rw-r--r--js/Sources/INIMPL_f.pickle6
-rw-r--r--js/Sources/IN_f.js4
-rw-r--r--js/Sources/Modulo_Count.js28
-rw-r--r--js/Sources/Modulo_Count.pickle8
-rw-r--r--js/Sources/PULSE_SC.pickle14
-rw-r--r--js/Sources/RAMP.js16
-rw-r--r--js/Sources/RAMP.pickle12
-rw-r--r--js/Sources/RAND_f.js26
-rw-r--r--js/Sources/RAND_f.pickle14
-rw-r--r--js/Sources/RAND_m.js34
-rw-r--r--js/Sources/RAND_m.pickle16
-rw-r--r--js/Sources/READAU_f.js34
-rw-r--r--js/Sources/READAU_f.pickle14
-rw-r--r--js/Sources/READC_f.js84
-rw-r--r--js/Sources/READC_f.pickle24
-rw-r--r--js/Sources/RFILE_f.js62
-rw-r--r--js/Sources/RFILE_f.pickle16
-rw-r--r--js/Sources/STEP.js28
-rw-r--r--js/Sources/STEP.pickle12
-rw-r--r--js/Sources/SampleCLK.js10
-rw-r--r--js/Sources/SampleCLK.pickle8
-rw-r--r--js/Sources/TKSCALE.js14
-rw-r--r--js/Sources/TKSCALE.pickle12
-rw-r--r--js/Threshold/GENERAL_f.js34
-rw-r--r--js/Threshold/GENERAL_f.pickle8
-rw-r--r--js/Threshold/ZCROSS_f.js24
-rw-r--r--js/Threshold/ZCROSS_f.pickle6
426 files changed, 4840 insertions, 3334 deletions
diff --git a/js/Branching/CLKFROM.js b/js/Branching/CLKFROM.js
index ec4053c5..b49997ff 100644
--- a/js/Branching/CLKFROM.js
+++ b/js/Branching/CLKFROM.js
@@ -24,15 +24,15 @@ function CLKFROM() {
model = arg1.model;
exprs = graphics.exprs;
while (true) {
- [ok,tag,exprs] = scicos_getvalue("Set block parameters","Tag",list("str",-1),exprs);
+ [ok,this.tag,exprs] = scicos_getvalue("Set block parameters","Tag",list("str",-1),exprs);
if (!ok) {
break;
}
- if (model.opar!=list(tag)) {
+ if (model.opar!=list(this.tag)) {
needcompile = 4;
y = needcompile;
}
- model.opar = list(tag);
+ model.opar = list(this.tag);
model.evtout = 1;
model.firing = -1;
graphics.exprs = exprs;
diff --git a/js/Branching/CLKFROM.pickle b/js/Branching/CLKFROM.pickle
index 0d1dde24..ef920dcc 100644
--- a/js/Branching/CLKFROM.pickle
+++ b/js/Branching/CLKFROM.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'tag'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Branching/CLKGOTO.js b/js/Branching/CLKGOTO.js
index 6a058dff..d01fd341 100644
--- a/js/Branching/CLKGOTO.js
+++ b/js/Branching/CLKGOTO.js
@@ -25,22 +25,22 @@ function CLKGOTO() {
model = arg1.model;
exprs = graphics.exprs;
while (true) {
- [ok,tag,tagvis,exprs] = scicos_getvalue("Set block parameters",[["Tag"],["Tag Visibility (1=Local 2=Scoped 3=Global)"]],list("str",-1,"vec",1),exprs);
+ [ok,this.tag,this.tagvis,exprs] = scicos_getvalue("Set block parameters",[["Tag"],["Tag Visibility (1=Local 2=Scoped 3=Global)"]],list("str",-1,"vec",1),exprs);
if (!ok) {
break;
}
- if (((tagvis<1)||(tagvis>3))) {
+ if (((this.tagvis<1)||(this.tagvis>3))) {
message("Tag Visibility must be between 1 and 3");
ok = false;
}
- tagvis = int(tagvis);
+ this.tagvis = int(this.tagvis);
if (ok) {
- if (((model.opar!=list(tag))||(model.ipar!=tagvis))) {
+ if (((model.opar!=list(this.tag))||(model.ipar!=this.tagvis))) {
needcompile = 4;
y = needcompile;
}
- model.opar = list(tag);
- model.ipar = tagvis;
+ model.opar = list(this.tag);
+ model.ipar = this.tagvis;
model.evtin = 1;
model.firing = -1;
graphics.exprs = exprs;
diff --git a/js/Branching/CLKGOTO.pickle b/js/Branching/CLKGOTO.pickle
index 0d1dde24..84d200d9 100644
--- a/js/Branching/CLKGOTO.pickle
+++ b/js/Branching/CLKGOTO.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'tag'
+p3
+aS'tagvis'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Branching/CLKGotoTagVisibility.js b/js/Branching/CLKGotoTagVisibility.js
index dbcb0514..5c73f47a 100644
--- a/js/Branching/CLKGotoTagVisibility.js
+++ b/js/Branching/CLKGotoTagVisibility.js
@@ -30,17 +30,17 @@ function CLKGotoTagVisibility() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,tag,exprs] = scicos_getvalue("Set parameters",["GotoTag"],list("str",-1),exprs);
+ [ok,this.tag,exprs] = scicos_getvalue("Set parameters",["GotoTag"],list("str",-1),exprs);
if (!ok) {
break;
}
if (ok) {
- if (model.opar!=list(tag)) {
+ if (model.opar!=list(this.tag)) {
needcompile = 4;
y = needcompile;
}
graphics.exprs = exprs;
- model.opar = list(tag);
+ model.opar = list(this.tag);
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Branching/CLKGotoTagVisibility.pickle b/js/Branching/CLKGotoTagVisibility.pickle
index 0d1dde24..ef920dcc 100644
--- a/js/Branching/CLKGotoTagVisibility.pickle
+++ b/js/Branching/CLKGotoTagVisibility.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'tag'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Branching/DEMUX.js b/js/Branching/DEMUX.js
index 6f9fc546..84c105d6 100644
--- a/js/Branching/DEMUX.js
+++ b/js/Branching/DEMUX.js
@@ -1,16 +1,16 @@
/* autogenerated from "macros/Branching/DEMUX.sci" */
function DEMUX() {
DEMUX.prototype.define = function DEMUX() {
- out = 2;
+ this.out = 2;
model = scicos_model();
model.sim = list("multiplex",4);
model.in1 = 0;
- model.out = -transpose([1:out]);
- model.ipar = out;
+ model.out = -transpose([1:this.out]);
+ model.ipar = this.out;
model.blocktype = "c";
model.firing = [];
model.dep_ut = [true,false];
- exprs = string(out);
+ exprs = string(this.out);
gr_i = [];
this.x = standard_define([.5,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -26,36 +26,36 @@ function DEMUX() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,out,exprs] = scicos_getvalue("Set DEMUX block parameters",["number of output ports or vector of sizes"],list("intvec",-1),exprs);
+ [ok,this.out,exprs] = scicos_getvalue("Set DEMUX block parameters",["number of output ports or vector of sizes"],list("intvec",-1),exprs);
if (!ok) {
break;
}
- if (size(out,"*")==1) {
- if (out<2||out>31) {
+ if (size(this.out,"*")==1) {
+ if (this.out<2||this.out>31) {
message("Block must have at least 2 and at most 31 output ports");
ok = false;
} else {
- [model,graphics,ok] = check_io(model,graphics,0,-transpose([1:out]),[],[]);
+ [model,graphics,ok] = check_io(model,graphics,0,-transpose([1:this.out]),[],[]);
}
} else {
- if (size(out,"*")<2||or(out==0)||size(out,"*")>31) {
+ if (size(this.out,"*")<2||or(this.out==0)||size(this.out,"*")>31) {
message([["Block must have at least 2 and at most 31 output ports"],["size 0 is not allowed"]]);
ok = false;
} else {
- if (min(out)<0) {
+ if (min(this.out)<0) {
nin = 0;
} else {
- nin = sum(out);
+ nin = sum(this.out);
}
- [model,graphics,ok] = check_io(model,graphics,nin,out.slice(),[],[]);
+ [model,graphics,ok] = check_io(model,graphics,nin,this.out.slice(),[],[]);
if (ok) {
- out = size(out,"*");
+ this.out = size(this.out,"*");
}
}
}
if (ok) {
graphics.exprs = exprs;
- model.ipar = out;
+ model.ipar = this.out;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Branching/DEMUX.pickle b/js/Branching/DEMUX.pickle
index 0d1dde24..42592b12 100644
--- a/js/Branching/DEMUX.pickle
+++ b/js/Branching/DEMUX.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'out'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Branching/DEMUX_f.js b/js/Branching/DEMUX_f.js
index 3092c9ae..3a67be31 100644
--- a/js/Branching/DEMUX_f.js
+++ b/js/Branching/DEMUX_f.js
@@ -1,16 +1,16 @@
/* autogenerated from "macros/Branching/DEMUX_f.sci" */
function DEMUX_f() {
DEMUX_f.prototype.define = function DEMUX_f() {
- out = 2;
+ this.out = 2;
model = scicos_model();
model.sim = list("demux",1);
model.in1 = 0;
- model.out = -transpose([1:out]);
- model.ipar = out;
+ model.out = -transpose([1:this.out]);
+ model.ipar = this.out;
model.blocktype = "c";
model.firing = [];
model.dep_ut = [true,false];
- exprs = string(out);
+ exprs = string(this.out);
gr_i = [];
this.x = standard_define([.5,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -26,36 +26,36 @@ function DEMUX_f() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,out,exprs] = scicos_getvalue("Set DEMUX block parameters",["number of output ports or vector of sizes"],list("vec",-1),exprs);
+ [ok,this.out,exprs] = scicos_getvalue("Set DEMUX block parameters",["number of output ports or vector of sizes"],list("vec",-1),exprs);
if (!ok) {
break;
}
- if (size(out,"*")==1) {
- if (out<2||out>8) {
+ if (size(this.out,"*")==1) {
+ if (this.out<2||this.out>8) {
message("Block must have at least 2 and at most 8 output ports");
ok = false;
} else {
- [model,graphics,ok] = check_io(model,graphics,0,-transpose([1:out]),[],[]);
+ [model,graphics,ok] = check_io(model,graphics,0,-transpose([1:this.out]),[],[]);
}
} else {
- if (size(out,"*")<2||size(out,"*")>8||or(out==0)) {
+ if (size(this.out,"*")<2||size(this.out,"*")>8||or(this.out==0)) {
message([["Block must have at least 2 and at most 8 output ports"],["and size 0 is not allowed"]]);
ok = false;
} else {
- if (min(out)<0) {
+ if (min(this.out)<0) {
nin = 0;
} else {
- nin = sum(out);
+ nin = sum(this.out);
}
- [model,graphics,ok] = check_io(model,graphics,nin,out.slice(),[],[]);
+ [model,graphics,ok] = check_io(model,graphics,nin,this.out.slice(),[],[]);
if (ok) {
- out = size(out,"*");
+ this.out = size(this.out,"*");
}
}
}
if (ok) {
graphics.exprs = exprs;
- model.ipar = out;
+ model.ipar = this.out;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Branching/DEMUX_f.pickle b/js/Branching/DEMUX_f.pickle
index 0d1dde24..42592b12 100644
--- a/js/Branching/DEMUX_f.pickle
+++ b/js/Branching/DEMUX_f.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'out'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Branching/ESELECT_f.js b/js/Branching/ESELECT_f.js
index 09fc13c5..31a020ab 100644
--- a/js/Branching/ESELECT_f.js
+++ b/js/Branching/ESELECT_f.js
@@ -1,21 +1,21 @@
/* autogenerated from "macros/Branching/ESELECT_f.sci" */
function ESELECT_f() {
ESELECT_f.prototype.define = function ESELECT_f() {
- out = 2;
+ this.out = 2;
model = scicos_model();
model.sim = list("eselect",-2);
model.in1 = 1;
model.in2 = 1;
model.intyp = -1;
model.evtin = 1;
- model.evtout = ones(out,1);
+ model.evtout = ones(this.out,1);
model.blocktype = "l";
- model.firing = -ones(out,1);
+ model.firing = -ones(this.out,1);
model.dep_ut = [true,false];
model.nmode = 0;
model.nzcross = 0;
gr_i = [];
- exprs = [[string(out)],[string(1)],[string(model.nmode)]];
+ exprs = [[string(this.out)],[string(1)],[string(model.nmode)]];
this.x = standard_define([4,2],model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -36,30 +36,30 @@ function ESELECT_f() {
}
model = arg1.model;
while (true) {
- [ok,out,inh,nmod,exprs] = scicos_getvalue("Set ESELECT block parameters",[["number of output event ports"],["Inherit (1: no, 0: yes)"],["zero-crossing (0: no, 1: yes)"]],list("vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.out,this.inh,this.nmod,exprs] = scicos_getvalue("Set ESELECT block parameters",[["number of output event ports"],["Inherit (1: no, 0: yes)"],["zero-crossing (0: no, 1: yes)"]],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- if (nmod!=0) {
- nmod = 1;
+ if (this.nmod!=0) {
+ this.nmod = 1;
}
- if (inh==0) {
- inh = [];
+ if (this.inh==0) {
+ this.inh = [];
} else {
- inh = 1;
+ this.inh = 1;
}
- out = int(out);
- if (out<2) {
+ this.out = int(this.out);
+ if (this.out<2) {
message("Block must have at least two output ports");
} else {
- [model,graphics,ok] = check_io(model,graphics,1,[],inh,[ones(out,1)]);
+ [model,graphics,ok] = check_io(model,graphics,1,[],this.inh,[ones(this.out,1)]);
if (ok) {
graphics.exprs = exprs;
- model.evtout = ones(out,1);
- model.firing = -ones(out,1);
+ model.evtout = ones(this.out,1);
+ model.firing = -ones(this.out,1);
this.x.graphics = graphics;
- model.nmode = nmod;
- model.nzcross = nmod;
+ model.nmode = this.nmod;
+ model.nzcross = this.nmod;
this.x.model = model;
break;
}
diff --git a/js/Branching/ESELECT_f.pickle b/js/Branching/ESELECT_f.pickle
index 0d1dde24..43774097 100644
--- a/js/Branching/ESELECT_f.pickle
+++ b/js/Branching/ESELECT_f.pickle
@@ -4,6 +4,12 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'inh'
+p3
+aS'nmod'
+p4
+aS'out'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/Branching/EXTRACTOR.js b/js/Branching/EXTRACTOR.js
index 7df96459..b34bd597 100644
--- a/js/Branching/EXTRACTOR.js
+++ b/js/Branching/EXTRACTOR.js
@@ -1,15 +1,15 @@
/* autogenerated from "macros/Branching/EXTRACTOR.sci" */
function EXTRACTOR() {
EXTRACTOR.prototype.define = function EXTRACTOR() {
- ind = 1;
+ this.ind = 1;
model = scicos_model();
model.sim = list("extractor",4);
model.in1 = -1;
model.out = 1;
model.blocktype = "c";
model.dep_ut = [true,false];
- model.ipar = ind;
- exprs = [sci2exp(ind)];
+ model.ipar = this.ind;
+ exprs = [sci2exp(this.ind)];
gr_i = [];
this.x = standard_define([3,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -25,15 +25,15 @@ function EXTRACTOR() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,ind,exprs] = scicos_getvalue("Set block parameters",["indices to extract"],list("vec",-1),exprs);
+ [ok,this.ind,exprs] = scicos_getvalue("Set block parameters",["indices to extract"],list("vec",-1),exprs);
if (!ok) {
break;
}
- ind = int(ind);
- ind = ind.slice();
- [model,graphics,ok] = check_io(model,graphics,[-1],size(ind,1),[],[]);
+ this.ind = int(this.ind);
+ this.ind = this.ind.slice();
+ [model,graphics,ok] = check_io(model,graphics,[-1],size(this.ind,1),[],[]);
if (ok) {
- model.ipar = ind;
+ model.ipar = this.ind;
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Branching/EXTRACTOR.pickle b/js/Branching/EXTRACTOR.pickle
index 0d1dde24..9485edee 100644
--- a/js/Branching/EXTRACTOR.pickle
+++ b/js/Branching/EXTRACTOR.pickle
@@ -2,8 +2,10 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'ind'
p2
-atp3
-Rp4
+aS'x'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Branching/FROM.js b/js/Branching/FROM.js
index 716fc793..2fd6c169 100644
--- a/js/Branching/FROM.js
+++ b/js/Branching/FROM.js
@@ -30,17 +30,17 @@ function FROM() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,tag,exprs] = scicos_getvalue("Set parameters",["Tag"],list("str",-1),exprs);
+ [ok,this.tag,exprs] = scicos_getvalue("Set parameters",["Tag"],list("str",-1),exprs);
if (!ok) {
break;
}
if (ok) {
- if (model.opar!=list(tag)) {
+ if (model.opar!=list(this.tag)) {
needcompile = 4;
y = needcompile;
}
graphics.exprs = exprs;
- model.opar = list(tag);
+ model.opar = list(this.tag);
this.x.model = model;
this.x.graphics = graphics;
break;
diff --git a/js/Branching/FROM.pickle b/js/Branching/FROM.pickle
index 0d1dde24..ef920dcc 100644
--- a/js/Branching/FROM.pickle
+++ b/js/Branching/FROM.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'tag'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Branching/FROMMO.js b/js/Branching/FROMMO.js
index bbf770a3..0848ff5b 100644
--- a/js/Branching/FROMMO.js
+++ b/js/Branching/FROMMO.js
@@ -33,17 +33,17 @@ function FROMMO() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,tag,exprs] = scicos_getvalue("Set parameters",["Tag"],list("str",-1),exprs);
+ [ok,this.tag,exprs] = scicos_getvalue("Set parameters",["Tag"],list("str",-1),exprs);
if (!ok) {
break;
}
if (ok) {
- if (model.opar!=list(tag)) {
+ if (model.opar!=list(this.tag)) {
needcompile = 4;
y = needcompile;
}
graphics.exprs = exprs;
- model.opar = list(tag);
+ model.opar = list(this.tag);
this.x.model = model;
this.x.graphics = graphics;
break;
diff --git a/js/Branching/FROMMO.pickle b/js/Branching/FROMMO.pickle
index 0d1dde24..ef920dcc 100644
--- a/js/Branching/FROMMO.pickle
+++ b/js/Branching/FROMMO.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'tag'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Branching/GOTO.js b/js/Branching/GOTO.js
index 7c2de99e..52abc035 100644
--- a/js/Branching/GOTO.js
+++ b/js/Branching/GOTO.js
@@ -30,23 +30,23 @@ function GOTO() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,tag,tagvis,exprs] = scicos_getvalue("Set parameters",[["Tag"],["Tag Visibility(1=Local 2=scoped 3= global)"]],list("str",-1,"vec",1),exprs);
+ [ok,this.tag,this.tagvis,exprs] = scicos_getvalue("Set parameters",[["Tag"],["Tag Visibility(1=Local 2=scoped 3= global)"]],list("str",-1,"vec",1),exprs);
if (!ok) {
break;
}
- tagvis = int(tagvis);
- if (((tagvis<1)||(tagvis>3))) {
+ this.tagvis = int(this.tagvis);
+ if (((this.tagvis<1)||(this.tagvis>3))) {
message("Tag Visibility must be between 1 and 3");
ok = false;
}
if (ok) {
- if (((model.ipar!=tagvis)||(model.opar!=list(tag)))) {
+ if (((model.ipar!=this.tagvis)||(model.opar!=list(this.tag)))) {
needcompile = 4;
y = needcompile;
}
graphics.exprs = exprs;
- model.opar = list(tag);
- model.ipar = tagvis;
+ model.opar = list(this.tag);
+ model.ipar = this.tagvis;
this.x.model = model;
this.x.graphics = graphics;
arg1 = this.x;
diff --git a/js/Branching/GOTO.pickle b/js/Branching/GOTO.pickle
index 0d1dde24..84d200d9 100644
--- a/js/Branching/GOTO.pickle
+++ b/js/Branching/GOTO.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'tag'
+p3
+aS'tagvis'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Branching/GOTOMO.js b/js/Branching/GOTOMO.js
index 76e1d633..b4d615bf 100644
--- a/js/Branching/GOTOMO.js
+++ b/js/Branching/GOTOMO.js
@@ -33,23 +33,23 @@ function GOTOMO() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,tag,tagvis,exprs] = scicos_getvalue("Set parameters",[["Tag"],["Tag Visibility(1=Local 2=scoped 3= global)"]],list("str",-1,"vec",1),exprs);
+ [ok,this.tag,this.tagvis,exprs] = scicos_getvalue("Set parameters",[["Tag"],["Tag Visibility(1=Local 2=scoped 3= global)"]],list("str",-1,"vec",1),exprs);
if (!ok) {
break;
}
- tagvis = int(tagvis);
- if (((tagvis<1)||(tagvis>3))) {
+ this.tagvis = int(this.tagvis);
+ if (((this.tagvis<1)||(this.tagvis>3))) {
message("Tag Visibility must be between 1 and 3");
ok = false;
}
if (ok) {
- if (((model.ipar!=tagvis)||(model.opar!=list(tag)))) {
+ if (((model.ipar!=this.tagvis)||(model.opar!=list(this.tag)))) {
needcompile = 4;
y = needcompile;
}
graphics.exprs = exprs;
- model.opar = list(tag);
- model.ipar = tagvis;
+ model.opar = list(this.tag);
+ model.ipar = this.tagvis;
this.x.model = model;
this.x.graphics = graphics;
arg1 = this.x;
diff --git a/js/Branching/GOTOMO.pickle b/js/Branching/GOTOMO.pickle
index 0d1dde24..84d200d9 100644
--- a/js/Branching/GOTOMO.pickle
+++ b/js/Branching/GOTOMO.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'tag'
+p3
+aS'tagvis'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Branching/GotoTagVisibility.js b/js/Branching/GotoTagVisibility.js
index 44a3386a..d0713180 100644
--- a/js/Branching/GotoTagVisibility.js
+++ b/js/Branching/GotoTagVisibility.js
@@ -30,17 +30,17 @@ function GotoTagVisibility() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,tag,exprs] = scicos_getvalue("Set parameters",["GotoTag"],list("str",-1),exprs);
+ [ok,this.tag,exprs] = scicos_getvalue("Set parameters",["GotoTag"],list("str",-1),exprs);
if (!ok) {
break;
}
if (ok) {
- if (model.opar!=list(tag)) {
+ if (model.opar!=list(this.tag)) {
needcompile = 4;
y = needcompile;
}
graphics.exprs = exprs;
- model.opar = list(tag);
+ model.opar = list(this.tag);
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Branching/GotoTagVisibility.pickle b/js/Branching/GotoTagVisibility.pickle
index 0d1dde24..ef920dcc 100644
--- a/js/Branching/GotoTagVisibility.pickle
+++ b/js/Branching/GotoTagVisibility.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'tag'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Branching/GotoTagVisibilityMO.js b/js/Branching/GotoTagVisibilityMO.js
index 51cacc0c..5e5c3555 100644
--- a/js/Branching/GotoTagVisibilityMO.js
+++ b/js/Branching/GotoTagVisibilityMO.js
@@ -30,17 +30,17 @@ function GotoTagVisibilityMO() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,tag,exprs] = scicos_getvalue("Set parameters",["GotoTag"],list("str",-1),exprs);
+ [ok,this.tag,exprs] = scicos_getvalue("Set parameters",["GotoTag"],list("str",-1),exprs);
if (!ok) {
break;
}
if (ok) {
- if (model.opar!=list(tag)) {
+ if (model.opar!=list(this.tag)) {
needcompile = 4;
y = needcompile;
}
graphics.exprs = exprs;
- model.opar = list(tag);
+ model.opar = list(this.tag);
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Branching/GotoTagVisibilityMO.pickle b/js/Branching/GotoTagVisibilityMO.pickle
index 0d1dde24..ef920dcc 100644
--- a/js/Branching/GotoTagVisibilityMO.pickle
+++ b/js/Branching/GotoTagVisibilityMO.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'tag'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Branching/ISELECT_f.js b/js/Branching/ISELECT_f.js
index 3352c1d5..c61fb391 100644
--- a/js/Branching/ISELECT_f.js
+++ b/js/Branching/ISELECT_f.js
@@ -1,18 +1,18 @@
/* autogenerated from "macros/Branching/ISELECT_f.sci" */
function ISELECT_f() {
ISELECT_f.prototype.define = function ISELECT_f() {
- z0 = 0;
+ this.z0 = 0;
out = [[-1],[-1]];
- nout = 2;
+ this.nout = 2;
model = scicos_model();
model.sim = list("selector",2);
model.in1 = -1;
model.out = out;
model.evtin = ones(out);
- model.dstate = z0;
+ model.dstate = this.z0;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [[string(nout)],[string(z0+1)]];
+ exprs = [[string(this.nout)],[string(this.z0+1)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -28,17 +28,17 @@ function ISELECT_f() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,nout,z0,exprs] = scicos_getvalue("Set parameters",[["number of outputs"],["initial connected output"]],list("vec",1,"vec",1),exprs);
+ [ok,this.nout,this.z0,exprs] = scicos_getvalue("Set parameters",[["number of outputs"],["initial connected output"]],list("vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- if (z0>nout||z0<=0) {
+ if (this.z0>this.nout||this.z0<=0) {
message("initial connected input is not a valid input port number");
} else {
- [model,graphics,ok] = check_io(model,graphics,-1,-ones(nout,1),ones(nout,1),[]);
+ [model,graphics,ok] = check_io(model,graphics,-1,-ones(this.nout,1),ones(this.nout,1),[]);
if (ok) {
graphics.exprs = exprs;
- model.dstate = z0-1;
+ model.dstate = this.z0-1;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Branching/ISELECT_f.pickle b/js/Branching/ISELECT_f.pickle
index 0d1dde24..0c984dbf 100644
--- a/js/Branching/ISELECT_f.pickle
+++ b/js/Branching/ISELECT_f.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'z0'
+p3
+aS'nout'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Branching/ISELECT_m.js b/js/Branching/ISELECT_m.js
index 2d9555f0..e9ed58ef 100644
--- a/js/Branching/ISELECT_m.js
+++ b/js/Branching/ISELECT_m.js
@@ -1,8 +1,8 @@
/* autogenerated from "macros/Branching/ISELECT_m.sci" */
function ISELECT_m() {
ISELECT_m.prototype.define = function ISELECT_m() {
- z0 = 1;
- nout = 2;
+ this.z0 = 1;
+ this.nout = 2;
model = scicos_model();
model.sim = list("selector_m",4);
model.out = [[-1],[-1]];
@@ -16,11 +16,11 @@ function ISELECT_m() {
model.rpar = [];
model.ipar = [];
model.firing = [];
- model.evtin = ones(nout,1);
- model.dstate = z0;
+ model.evtin = ones(this.nout,1);
+ model.dstate = this.z0;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [[sci2exp(1)],[sci2exp(nout)],[sci2exp(z0)]];
+ exprs = [[sci2exp(1)],[sci2exp(this.nout)],[sci2exp(this.z0)]];
gr_i = [];
this.x = standard_define([3,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -36,25 +36,25 @@ function ISELECT_m() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,typ,nout,z0,exprs] = scicos_getvalue("Set parameters",[["Datatype(1= real double 2=Complex 3=int32 ...)"],["number of outputs"],["initial connected output"]],list("vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.typ,this.nout,this.z0,exprs] = scicos_getvalue("Set parameters",[["Datatype(1= real double 2=Complex 3=int32 ...)"],["number of outputs"],["initial connected output"]],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- if (z0>nout||z0<=0) {
+ if (this.z0>this.nout||this.z0<=0) {
message("initial connected input is not a valid input port number");
- } else if (((typ<1)||(typ>8))) {
+ } else if (((this.typ<1)||(this.typ>8))) {
message("Datatype is not supported");
ok = false;
} else {
- it = typ;
- ot = typ*ones(1,nout);
+ it = this.typ;
+ ot = this.typ*ones(1,this.nout);
if (ok) {
- out = [-ones(nout,1),-2*ones(nout,1)];
+ out = [-ones(this.nout,1),-2*ones(this.nout,1)];
in1 = [-1,-2];
- [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),ones(nout,1),[]);
+ [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),ones(this.nout,1),[]);
if (ok) {
graphics.exprs = exprs;
- model.dstate = z0;
+ model.dstate = this.z0;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Branching/ISELECT_m.pickle b/js/Branching/ISELECT_m.pickle
index 0d1dde24..2404a121 100644
--- a/js/Branching/ISELECT_m.pickle
+++ b/js/Branching/ISELECT_m.pickle
@@ -4,6 +4,12 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'z0'
+p3
+aS'typ'
+p4
+aS'nout'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/Branching/MUX.js b/js/Branching/MUX.js
index c0cdd611..cd23e5d7 100644
--- a/js/Branching/MUX.js
+++ b/js/Branching/MUX.js
@@ -1,15 +1,15 @@
/* autogenerated from "macros/Branching/MUX.sci" */
function MUX() {
MUX.prototype.define = function MUX() {
- in1 = 2;
+ this.in1 = 2;
model = scicos_model();
model.sim = list("multiplex",4);
- model.in1 = -transpose([1:in1]);
+ model.in1 = -transpose([1:this.in1]);
model.out = 0;
- model.ipar = in1;
+ model.ipar = this.in1;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = string(in1);
+ exprs = string(this.in1);
gr_i = [];
this.x = standard_define([.5,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -25,36 +25,36 @@ function MUX() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,in1,exprs] = scicos_getvalue("Set MUX block parameters","number of input ports or vector of sizes",list("intvec",-1),exprs);
+ [ok,this.in1,exprs] = scicos_getvalue("Set MUX block parameters","number of input ports or vector of sizes",list("intvec",-1),exprs);
if (!ok) {
break;
}
- if (size(in1,"*")==1) {
- if (in1<2||in1>31) {
+ if (size(this.in1,"*")==1) {
+ if (this.in1<2||this.in1>31) {
message("Block must have at least two input ports and at most 31");
ok = false;
} else {
- [model,graphics,ok] = check_io(model,graphics,-transpose([1:in1]),0,[],[]);
+ [model,graphics,ok] = check_io(model,graphics,-transpose([1:this.in1]),0,[],[]);
}
} else {
- if (size(in1,"*")<2||or(in1==0)||size(in1,"*")>31) {
+ if (size(this.in1,"*")<2||or(this.in1==0)||size(this.in1,"*")>31) {
message([["Block must have at least two input ports"],["and at most 31. Size 0 is not allowed. "]]);
ok = false;
} else {
- if (min(in1)<0) {
+ if (min(this.in1)<0) {
nout = 0;
} else {
- nout = sum(in1);
+ nout = sum(this.in1);
}
- [model,graphics,ok] = check_io(model,graphics,in1.slice(),nout,[],[]);
+ [model,graphics,ok] = check_io(model,graphics,this.in1.slice(),nout,[],[]);
if (ok) {
- in1 = size(in1,"*");
+ this.in1 = size(this.in1,"*");
}
}
}
if (ok) {
graphics.exprs = exprs;
- model.ipar = in1;
+ model.ipar = this.in1;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Branching/MUX.pickle b/js/Branching/MUX.pickle
index 0d1dde24..2935e0d2 100644
--- a/js/Branching/MUX.pickle
+++ b/js/Branching/MUX.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'in1'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Branching/MUX_f.js b/js/Branching/MUX_f.js
index 66384c50..a501fc28 100644
--- a/js/Branching/MUX_f.js
+++ b/js/Branching/MUX_f.js
@@ -1,15 +1,15 @@
/* autogenerated from "macros/Branching/MUX_f.sci" */
function MUX_f() {
MUX_f.prototype.define = function MUX_f() {
- in1 = 2;
+ this.in1 = 2;
model = scicos_model();
model.sim = list("mux",1);
- model.in1 = -transpose([1:in1]);
+ model.in1 = -transpose([1:this.in1]);
model.out = 0;
- model.ipar = in1;
+ model.ipar = this.in1;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = string(in1);
+ exprs = string(this.in1);
gr_i = [];
this.x = standard_define([0.5,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -25,36 +25,36 @@ function MUX_f() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,in1,exprs] = scicos_getvalue("Set MUX block parameters","number of input ports or vector of sizes",list("vec",-1),exprs);
+ [ok,this.in1,exprs] = scicos_getvalue("Set MUX block parameters","number of input ports or vector of sizes",list("vec",-1),exprs);
if (!ok) {
break;
}
- if (size(in1,"*")==1) {
- if (in1<2||in1>8) {
+ if (size(this.in1,"*")==1) {
+ if (this.in1<2||this.in1>8) {
message("Block must have at least two input ports and at most eight");
ok = false;
} else {
- [model,graphics,ok] = check_io(model,graphics,-transpose([1:in1]),0,[],[]);
+ [model,graphics,ok] = check_io(model,graphics,-transpose([1:this.in1]),0,[],[]);
}
} else {
- if (size(in1,"*")<2||size(in1,"*")>8||or(in1==0)) {
+ if (size(this.in1,"*")<2||size(this.in1,"*")>8||or(this.in1==0)) {
message([["Block must have at least two input ports"],["and at most eight, and size 0 is not allowed. "]]);
ok = false;
} else {
- if (min(in1)<0) {
+ if (min(this.in1)<0) {
nout = 0;
} else {
- nout = sum(in1);
+ nout = sum(this.in1);
}
- [model,graphics,ok] = check_io(model,graphics,in1.slice(),nout,[],[]);
+ [model,graphics,ok] = check_io(model,graphics,this.in1.slice(),nout,[],[]);
if (ok) {
- in1 = size(in1,"*");
+ this.in1 = size(this.in1,"*");
}
}
}
if (ok) {
graphics.exprs = exprs;
- model.ipar = in1;
+ model.ipar = this.in1;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Branching/MUX_f.pickle b/js/Branching/MUX_f.pickle
index 0d1dde24..2935e0d2 100644
--- a/js/Branching/MUX_f.pickle
+++ b/js/Branching/MUX_f.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'in1'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Branching/M_SWITCH.js b/js/Branching/M_SWITCH.js
index 827d71cc..ce6429b2 100644
--- a/js/Branching/M_SWITCH.js
+++ b/js/Branching/M_SWITCH.js
@@ -3,7 +3,7 @@ function M_SWITCH() {
M_SWITCH.prototype.define = function M_SWITCH() {
in1 = [[1],[-1],[-1]];
ipar = [[1],[3]];
- nin = 2;
+ this.nin = 2;
model = scicos_model();
model.sim = list("mswitch",4);
model.in1 = in1;
@@ -11,7 +11,7 @@ function M_SWITCH() {
model.ipar = ipar;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [[string(nin)],[string(ipar)]];
+ exprs = [[string(this.nin)],[string(ipar)]];
gr_i = [];
this.x = standard_define([2.5,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -27,34 +27,34 @@ function M_SWITCH() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,nin,base,rule,exprs] = scicos_getvalue("Set parameters",[["number of inputs"],["zero base indexing (0), otherwise 1"],["rounding rule: int (0), round (1), ceil (2), floor (3)"]],list("vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.nin,this.base,this.rule,exprs] = scicos_getvalue("Set parameters",[["number of inputs"],["zero base indexing (0), otherwise 1"],["rounding rule: int (0), round (1), ceil (2), floor (3)"]],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- nin = int(nin);
- base = int(base);
- if (nin<1) {
+ this.nin = int(this.nin);
+ this.base = int(this.base);
+ if (this.nin<1) {
message("Number of inputs must be >=1 ");
- } else if (!((base==1)||(base==0))) {
+ } else if (!((this.base==1)||(this.base==0))) {
message("base indexing must be 1 or 0");
- } else if (!((rule==1)||(rule==0)||(rule==2)||(rule==3))) {
+ } else if (!((this.rule==1)||(this.rule==0)||(this.rule==2)||(this.rule==3))) {
message("incorrect rounding rule");
} else {
- if (nin==1) {
+ if (this.nin==1) {
in1 = [[1,1],[-1,1]];
out = [1,1];
} else {
- in1 = [[1],[-ones(nin,1)]];
- in2 = [[1],[-2*ones(nin,1)]];
+ in1 = [[1],[-ones(this.nin,1)]];
+ in2 = [[1],[-2*ones(this.nin,1)]];
in1 = [in1,in2];
out = [-1,-2];
}
- it = [[-1],[-2*ones(nin,1)]];
+ it = [[-1],[-2*ones(this.nin,1)]];
ot = -2;
[model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),[],[]);
if (ok) {
graphics.exprs = exprs;
- model.ipar = [[base],[rule]];
+ model.ipar = [[this.base],[this.rule]];
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Branching/M_SWITCH.pickle b/js/Branching/M_SWITCH.pickle
index 0d1dde24..7eff286e 100644
--- a/js/Branching/M_SWITCH.pickle
+++ b/js/Branching/M_SWITCH.pickle
@@ -4,6 +4,12 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'base'
+p3
+aS'nin'
+p4
+aS'rule'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/Branching/NRMSOM_f.js b/js/Branching/NRMSOM_f.js
index a00aab56..5b76e535 100644
--- a/js/Branching/NRMSOM_f.js
+++ b/js/Branching/NRMSOM_f.js
@@ -2,14 +2,14 @@
function NRMSOM_f() {
NRMSOM_f.prototype.define = function NRMSOM_f() {
in1 = [[-1],[-1]];
- nin = 2;
+ this.nin = 2;
model = scicos_model();
model.sim = "junk";
model.in1 = in1;
model.out = -1;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [string(nin)];
+ exprs = [string(this.nin)];
gr_i = [];
this.x = standard_define([.2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -25,11 +25,11 @@ function NRMSOM_f() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,nin,exprs] = scicos_getvalue("Set parameters",["number of inputs"],list("vec",1),exprs);
+ [ok,this.nin,exprs] = scicos_getvalue("Set parameters",["number of inputs"],list("vec",1),exprs);
if (!ok) {
break;
}
- [model,graphics,ok] = check_io(model,graphics,-ones(nin,1),-1,[],[]);
+ [model,graphics,ok] = check_io(model,graphics,-ones(this.nin,1),-1,[],[]);
if (ok) {
graphics.exprs = exprs;
this.x.graphics = graphics;
diff --git a/js/Branching/NRMSOM_f.pickle b/js/Branching/NRMSOM_f.pickle
index 0d1dde24..5a153cc3 100644
--- a/js/Branching/NRMSOM_f.pickle
+++ b/js/Branching/NRMSOM_f.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'nin'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Branching/RELAY_f.js b/js/Branching/RELAY_f.js
index 91977b51..1fc495dd 100644
--- a/js/Branching/RELAY_f.js
+++ b/js/Branching/RELAY_f.js
@@ -3,7 +3,7 @@ function RELAY_f() {
RELAY_f.prototype.define = function RELAY_f() {
i0 = 0;
in1 = [[-1],[-1]];
- nin = 2;
+ this.nin = 2;
model = scicos_model();
model.sim = list("relay",2);
model.in1 = in1;
@@ -13,7 +13,7 @@ function RELAY_f() {
model.blocktype = "c";
model.firing = [];
model.dep_ut = [true,true];
- exprs = [[string(nin)],[string(i0+1)]];
+ exprs = [[string(this.nin)],[string(i0+1)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -30,17 +30,17 @@ function RELAY_f() {
model = arg1.model;
ipar = model.ipar;
while (true) {
- [ok,nin,z0,exprs] = scicos_getvalue("Set parameters",[["number of inputs"],["initial connected input"]],list("vec",1,"vec",1),exprs);
+ [ok,this.nin,this.z0,exprs] = scicos_getvalue("Set parameters",[["number of inputs"],["initial connected input"]],list("vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- if (z0>nin||z0<=0) {
+ if (this.z0>this.nin||this.z0<=0) {
message("initial connected input is not a valid input port number");
} else {
- [model,graphics,ok] = check_io(model,graphics,-ones(nin,1),-1,ones(nin,1),[]);
+ [model,graphics,ok] = check_io(model,graphics,-ones(this.nin,1),-1,ones(this.nin,1),[]);
if (ok) {
graphics.exprs = exprs;
- model.dstate = z0-1;
+ model.dstate = this.z0-1;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Branching/RELAY_f.pickle b/js/Branching/RELAY_f.pickle
index 0d1dde24..bbbb798b 100644
--- a/js/Branching/RELAY_f.pickle
+++ b/js/Branching/RELAY_f.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'z0'
+p3
+aS'nin'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Branching/SCALAR2VECTOR.js b/js/Branching/SCALAR2VECTOR.js
index e849edef..2ca90c29 100644
--- a/js/Branching/SCALAR2VECTOR.js
+++ b/js/Branching/SCALAR2VECTOR.js
@@ -1,14 +1,14 @@
/* autogenerated from "macros/Branching/SCALAR2VECTOR.sci" */
function SCALAR2VECTOR() {
SCALAR2VECTOR.prototype.define = function SCALAR2VECTOR() {
- nout = -1;
+ this.nout = -1;
model = scicos_model();
model.sim = list("scalar2vector",4);
- model.out = nout;
+ model.out = this.nout;
model.in1 = 1;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [string([nout])];
+ exprs = [string([this.nout])];
gr_i = [];
this.x = standard_define([3,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -24,17 +24,17 @@ function SCALAR2VECTOR() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,nout,exprs] = scicos_getvalue("Set block parameters",["size of output (-1: if don\'t know)"],list("vec",1),exprs);
+ [ok,this.nout,exprs] = scicos_getvalue("Set block parameters",["size of output (-1: if don\'t know)"],list("vec",1),exprs);
if (!ok) {
break;
}
- nout = int(nout);
- if ((nout!=-1&&(nout<=0))) {
+ this.nout = int(this.nout);
+ if ((this.nout!=-1&&(this.nout<=0))) {
message("size of output must be -1 or >0");
ok = false;
}
if (ok) {
- [model,graphics,ok] = check_io(model,graphics,[1],nout,[],[]);
+ [model,graphics,ok] = check_io(model,graphics,[1],this.nout,[],[]);
}
if (ok) {
graphics.exprs = exprs;
diff --git a/js/Branching/SCALAR2VECTOR.pickle b/js/Branching/SCALAR2VECTOR.pickle
index 0d1dde24..18e545bb 100644
--- a/js/Branching/SCALAR2VECTOR.pickle
+++ b/js/Branching/SCALAR2VECTOR.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'nout'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Branching/SELECT_f.js b/js/Branching/SELECT_f.js
index b949158c..028c2dac 100644
--- a/js/Branching/SELECT_f.js
+++ b/js/Branching/SELECT_f.js
@@ -1,18 +1,18 @@
/* autogenerated from "macros/Branching/SELECT_f.sci" */
function SELECT_f() {
SELECT_f.prototype.define = function SELECT_f() {
- z0 = 0;
+ this.z0 = 0;
in1 = [[-1],[-1]];
- nin = 2;
+ this.nin = 2;
model = scicos_model();
model.sim = list("selector",2);
model.in1 = in1;
model.out = -1;
model.evtin = ones(in1);
- model.dstate = z0;
+ model.dstate = this.z0;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [[string(nin)],[string(z0+1)]];
+ exprs = [[string(this.nin)],[string(this.z0+1)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -28,17 +28,17 @@ function SELECT_f() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,nin,z0,exprs] = scicos_getvalue("Set parameters",[["number of inputs"],["initial connected input"]],list("vec",1,"vec",1),exprs);
+ [ok,this.nin,this.z0,exprs] = scicos_getvalue("Set parameters",[["number of inputs"],["initial connected input"]],list("vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- if (z0>nin||z0<=0) {
+ if (this.z0>this.nin||this.z0<=0) {
message("initial connected input is not a valid input port number");
} else {
- [model,graphics,ok] = check_io(model,graphics,-ones(nin,1),-1,ones(nin,1),[]);
+ [model,graphics,ok] = check_io(model,graphics,-ones(this.nin,1),-1,ones(this.nin,1),[]);
if (ok) {
graphics.exprs = exprs;
- model.dstate = z0-1;
+ model.dstate = this.z0-1;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Branching/SELECT_f.pickle b/js/Branching/SELECT_f.pickle
index 0d1dde24..bbbb798b 100644
--- a/js/Branching/SELECT_f.pickle
+++ b/js/Branching/SELECT_f.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'z0'
+p3
+aS'nin'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Branching/SELECT_m.js b/js/Branching/SELECT_m.js
index c91c2eeb..73d5eff0 100644
--- a/js/Branching/SELECT_m.js
+++ b/js/Branching/SELECT_m.js
@@ -1,8 +1,8 @@
/* autogenerated from "macros/Branching/SELECT_m.sci" */
function SELECT_m() {
SELECT_m.prototype.define = function SELECT_m() {
- z0 = 1;
- nin = 2;
+ this.z0 = 1;
+ this.nin = 2;
model = scicos_model();
model.sim = list("selector_m",4);
model.in1 = [[-1],[-1]];
@@ -16,11 +16,11 @@ function SELECT_m() {
model.rpar = [];
model.ipar = [];
model.firing = [];
- model.evtin = ones(nin,1);
- model.dstate = z0;
+ model.evtin = ones(this.nin,1);
+ model.dstate = this.z0;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [[sci2exp(1)],[sci2exp(nin)],[sci2exp(z0)]];
+ exprs = [[sci2exp(1)],[sci2exp(this.nin)],[sci2exp(this.z0)]];
gr_i = [];
this.x = standard_define([3,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -36,25 +36,25 @@ function SELECT_m() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,typ,nin,z0,exprs] = scicos_getvalue("Set parameters",[["Datatype(1= real double 2=Complex 3=int32 ..)"],["number of inputs"],["initial connected input"]],list("vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.typ,this.nin,this.z0,exprs] = scicos_getvalue("Set parameters",[["Datatype(1= real double 2=Complex 3=int32 ..)"],["number of inputs"],["initial connected input"]],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- if (z0>nin||z0<=0) {
+ if (this.z0>this.nin||this.z0<=0) {
message("initial connected input is not a valid input port number");
- } else if (((typ<1)||(typ>8))&&(typ!=-1)) {
+ } else if (((this.typ<1)||(this.typ>8))&&(this.typ!=-1)) {
message("Datatype is not supported");
ok = false;
} else {
- it = typ*ones(1,nin);
- ot = typ;
+ it = this.typ*ones(1,this.nin);
+ ot = this.typ;
if (ok) {
- in1 = [-ones(nin,1),-2*ones(nin,1)];
+ in1 = [-ones(this.nin,1),-2*ones(this.nin,1)];
out = [-1,-2];
- [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),ones(nin,1),[]);
+ [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),ones(this.nin,1),[]);
if (ok) {
graphics.exprs = exprs;
- model.dstate = z0;
+ model.dstate = this.z0;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Branching/SELECT_m.pickle b/js/Branching/SELECT_m.pickle
index 0d1dde24..4b9fbdd0 100644
--- a/js/Branching/SELECT_m.pickle
+++ b/js/Branching/SELECT_m.pickle
@@ -4,6 +4,12 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'z0'
+p3
+aS'typ'
+p4
+aS'nin'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/Branching/SWITCH2.js b/js/Branching/SWITCH2.js
index 1c8a4fb8..f3b2b4c7 100644
--- a/js/Branching/SWITCH2.js
+++ b/js/Branching/SWITCH2.js
@@ -3,7 +3,7 @@ function SWITCH2() {
SWITCH2.prototype.define = function SWITCH2() {
in1 = [[-1],[1],[-1]];
ipar = [0];
- nzz = 1;
+ this.nzz = 1;
rpar = 0;
model = scicos_model();
model.sim = list("switch2",4);
@@ -11,11 +11,11 @@ function SWITCH2() {
model.out = -1;
model.ipar = ipar;
model.rpar = rpar;
- model.nzcross = nzz;
+ model.nzcross = this.nzz;
model.nmode = 1;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [[string(ipar)],[string(rpar)],[string(nzz)]];
+ exprs = [[string(ipar)],[string(rpar)],[string(this.nzz)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -31,21 +31,21 @@ function SWITCH2() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,rule,thra,nzz,exprs] = scicos_getvalue("Set parameters",[["pass first input if: u2>=a (0), u2>a (1), u2~=a (2)"],["threshold a"],["use zero crossing: yes (1), no (0)"]],list("vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.rule,this.thra,this.nzz,exprs] = scicos_getvalue("Set parameters",[["pass first input if: u2>=a (0), u2>a (1), u2~=a (2)"],["threshold a"],["use zero crossing: yes (1), no (0)"]],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- rule = int(rule);
- if ((rule<0)) {
- rule = 0;
+ this.rule = int(this.rule);
+ if ((this.rule<0)) {
+ this.rule = 0;
}
- if ((rule>2)) {
- rule = 2;
+ if ((this.rule>2)) {
+ this.rule = 2;
}
graphics.exprs = exprs;
- model.ipar = rule;
- model.rpar = thra;
- if (nzz!=0) {
+ model.ipar = this.rule;
+ model.rpar = this.thra;
+ if (this.nzz!=0) {
model.nmode = 1;
model.nzcross = 1;
} else {
diff --git a/js/Branching/SWITCH2.pickle b/js/Branching/SWITCH2.pickle
index 0d1dde24..baba8ef7 100644
--- a/js/Branching/SWITCH2.pickle
+++ b/js/Branching/SWITCH2.pickle
@@ -4,6 +4,12 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'nzz'
+p3
+aS'rule'
+p4
+aS'thra'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/Branching/SWITCH2_m.js b/js/Branching/SWITCH2_m.js
index 04dfaa1c..3031d8f5 100644
--- a/js/Branching/SWITCH2_m.js
+++ b/js/Branching/SWITCH2_m.js
@@ -2,7 +2,7 @@
function SWITCH2_m() {
SWITCH2_m.prototype.define = function SWITCH2_m() {
ipar = [0];
- nzz = 1;
+ this.nzz = 1;
rpar = 0;
model = scicos_model();
model.sim = list("switch2_m",4);
@@ -14,11 +14,11 @@ function SWITCH2_m() {
model.outtyp = 1;
model.ipar = ipar;
model.rpar = rpar;
- model.nzcross = nzz;
+ model.nzcross = this.nzz;
model.nmode = 1;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [[sci2exp(1)],[string(ipar)],[string(rpar)],[string(nzz)]];
+ exprs = [[sci2exp(1)],[string(ipar)],[string(rpar)],[string(this.nzz)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -34,38 +34,38 @@ function SWITCH2_m() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,ot,rule,thra,nzz,exprs] = scicos_getvalue("Set parameters",[["Datatype (1=real double 2=complex 3=int32 ...)"],["pass first input if: u2>=a (0), u2>a (1), u2~=a (2)"],["threshold a"],["use zero crossing: yes (1), no (0)"]],list("vec",1,"vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.ot,this.rule,this.thra,this.nzz,exprs] = scicos_getvalue("Set parameters",[["Datatype (1=real double 2=complex 3=int32 ...)"],["pass first input if: u2>=a (0), u2>a (1), u2~=a (2)"],["threshold a"],["use zero crossing: yes (1), no (0)"]],list("vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- rule = int(rule);
- if ((rule<0)) {
- rule = 0;
+ this.rule = int(this.rule);
+ if ((this.rule<0)) {
+ this.rule = 0;
}
- if ((rule>2)) {
- rule = 2;
+ if ((this.rule>2)) {
+ this.rule = 2;
}
graphics.exprs = exprs;
- model.ipar = rule;
- model.rpar = thra;
- if (nzz!=0) {
+ model.ipar = this.rule;
+ model.rpar = this.thra;
+ if (this.nzz!=0) {
model.nmode = 1;
model.nzcross = 1;
} else {
model.nmode = 0;
model.nzcross = 0;
}
- if (((ot<1)||(ot>8))&&(ot!=-1)) {
+ if (((this.ot<1)||(this.ot>8))&&(this.ot!=-1)) {
message("Datatype is not supported");
ok = false;
}
if (ok) {
- it[1-1] = ot;
+ it[1-1] = this.ot;
it[2-1] = 1;
- it[3-1] = ot;
+ it[3-1] = this.ot;
in1 = [model.in1,model.in2];
out = [model.out,model.out2];
- [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),[],[]);
+ [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,this.ot),[],[]);
}
if (ok) {
this.x.graphics = graphics;
diff --git a/js/Branching/SWITCH2_m.pickle b/js/Branching/SWITCH2_m.pickle
index 0d1dde24..43d95ccf 100644
--- a/js/Branching/SWITCH2_m.pickle
+++ b/js/Branching/SWITCH2_m.pickle
@@ -4,6 +4,14 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'ot'
+p3
+aS'nzz'
+p4
+aS'rule'
+p5
+aS'thra'
+p6
+atp7
+Rp8
. \ No newline at end of file
diff --git a/js/Branching/SWITCH_f.js b/js/Branching/SWITCH_f.js
index 4d1d8ff8..ffc73ce1 100644
--- a/js/Branching/SWITCH_f.js
+++ b/js/Branching/SWITCH_f.js
@@ -3,7 +3,7 @@ function SWITCH_f() {
SWITCH_f.prototype.define = function SWITCH_f() {
i0 = 0;
in1 = [[-1],[-1]];
- nin = 2;
+ this.nin = 2;
model = scicos_model();
model.sim = list("switchn",2);
model.in1 = in1;
@@ -12,7 +12,7 @@ function SWITCH_f() {
model.blocktype = "c";
model.firing = [];
model.dep_ut = [true,true];
- exprs = [[string(nin)],[string(i0+1)]];
+ exprs = [[string(this.nin)],[string(i0+1)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -29,17 +29,17 @@ function SWITCH_f() {
model = arg1.model;
ipar = model.ipar;
while (true) {
- [ok,nin,z0,exprs] = scicos_getvalue("Set switch parameters",[["number of inputs"],["connected input"]],list("vec",1,"vec",1),exprs);
+ [ok,this.nin,this.z0,exprs] = scicos_getvalue("Set switch parameters",[["number of inputs"],["connected input"]],list("vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- if (z0>nin||z0<=0) {
+ if (this.z0>this.nin||this.z0<=0) {
message("initial connected input is not a valid input port number");
} else {
- [model,graphics,ok] = check_io(model,graphics,-ones(nin,1),-1,[],[]);
+ [model,graphics,ok] = check_io(model,graphics,-ones(this.nin,1),-1,[],[]);
if (ok) {
graphics.exprs = exprs;
- model.ipar = z0-1;
+ model.ipar = this.z0-1;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Branching/SWITCH_f.pickle b/js/Branching/SWITCH_f.pickle
index 0d1dde24..bbbb798b 100644
--- a/js/Branching/SWITCH_f.pickle
+++ b/js/Branching/SWITCH_f.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'z0'
+p3
+aS'nin'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Electrical/Capacitor.js b/js/Electrical/Capacitor.js
index 6d2dd4ab..2ebf136a 100644
--- a/js/Electrical/Capacitor.js
+++ b/js/Electrical/Capacitor.js
@@ -2,9 +2,9 @@
function Capacitor() {
Capacitor.prototype.define = function Capacitor() {
model = scicos_model();
- C = 0.01;
- v = 0;
- model.rpar = [[C],[v]];
+ this.C = 0.01;
+ this.v = 0;
+ model.rpar = [[this.C],[this.v]];
model.sim = "Capacitor";
model.blocktype = "c";
model.dep_ut = [true,false];
@@ -12,11 +12,11 @@ function Capacitor() {
mo.model = "Capacitor";
mo.inputs = "p";
mo.outputs = "n";
- mo.parameters = list(["C","v"],list(C,v),[0,1]);
+ mo.parameters = list(["C","v"],list(this.C,this.v),[0,1]);
model.equations = mo;
model.in1 = ones(size(mo.inputs,"*"),1);
model.out = ones(size(mo.outputs,"*"),1);
- exprs = string([[C],[v]]);
+ exprs = string([[this.C],[this.v]]);
gr_i = [];
this.x = standard_define([2,1.1],model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
@@ -34,12 +34,12 @@ function Capacitor() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,C,v,exprs] = scicos_getvalue("Set Capacitor block parameter",[["C (F)"],["Initial Voltage"]],list("vec",1,"vec",1),exprs);
+ [ok,this.C,this.v,exprs] = scicos_getvalue("Set Capacitor block parameter",[["C (F)"],["Initial Voltage"]],list("vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- model.rpar = C;
- model.equations.parameters[2-1] = list(C,v);
+ model.rpar = this.C;
+ model.equations.parameters[2-1] = list(this.C,this.v);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Electrical/Capacitor.pickle b/js/Electrical/Capacitor.pickle
index 0d1dde24..389dfb7d 100644
--- a/js/Electrical/Capacitor.pickle
+++ b/js/Electrical/Capacitor.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'C'
+p3
+aS'v'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Electrical/ConstantVoltage.js b/js/Electrical/ConstantVoltage.js
index 43a2c0b6..c0e752f1 100644
--- a/js/Electrical/ConstantVoltage.js
+++ b/js/Electrical/ConstantVoltage.js
@@ -1,9 +1,9 @@
/* autogenerated from "macros/Electrical/ConstantVoltage.sci" */
function ConstantVoltage() {
ConstantVoltage.prototype.define = function ConstantVoltage() {
- V = 0.01;
+ this.V = 0.01;
model = scicos_model();
- model.rpar = V;
+ model.rpar = this.V;
model.in1 = 1;
model.out = 1;
model.sim = "ConstantVoltage";
@@ -13,9 +13,9 @@ function ConstantVoltage() {
mo.model = "ConstantVoltage";
mo.inputs = "p";
mo.outputs = "n";
- mo.parameters = list("V",list(V));
+ mo.parameters = list("V",list(this.V));
model.equations = mo;
- exprs = string(V);
+ exprs = string(this.V);
gr_i = [];
this.x = standard_define([1.5,1.1],model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
@@ -33,12 +33,12 @@ function ConstantVoltage() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,V,exprs] = scicos_getvalue("Set ConstantVoltage block parameter","V (volt)",list("vec",1),exprs);
+ [ok,this.V,exprs] = scicos_getvalue("Set ConstantVoltage block parameter","V (volt)",list("vec",1),exprs);
if (!ok) {
break;
}
- model.rpar = V;
- model.equations.parameters[2-1] = list(V);
+ model.rpar = this.V;
+ model.equations.parameters[2-1] = list(this.V);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Electrical/ConstantVoltage.pickle b/js/Electrical/ConstantVoltage.pickle
index 0d1dde24..4cc46e41 100644
--- a/js/Electrical/ConstantVoltage.pickle
+++ b/js/Electrical/ConstantVoltage.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'V'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Electrical/Diode.js b/js/Electrical/Diode.js
index 6e0c8417..4a92c751 100644
--- a/js/Electrical/Diode.js
+++ b/js/Electrical/Diode.js
@@ -1,12 +1,12 @@
/* autogenerated from "macros/Electrical/Diode.sci" */
function Diode() {
Diode.prototype.define = function Diode() {
- Ids = 1.e-6;
- Vt = 0.04;
- Maxexp = 15;
- R = 1.e8;
+ this.Ids = 1.e-6;
+ this.Vt = 0.04;
+ this.Maxexp = 15;
+ this.R = 1.e8;
model = scicos_model();
- model.rpar = [[Ids],[Vt],[Maxexp],[R]];
+ model.rpar = [[this.Ids],[this.Vt],[this.Maxexp],[this.R]];
model.in1 = 1;
model.out = 1;
model.sim = "Diode";
@@ -16,9 +16,9 @@ function Diode() {
mo.model = "Diode";
mo.inputs = "p";
mo.outputs = "n";
- mo.parameters = list(["Ids","Vt","Maxexp","R"],list(Ids,Vt,Maxexp,R));
+ mo.parameters = list(["Ids","Vt","Maxexp","R"],list(this.Ids,this.Vt,this.Maxexp,this.R));
model.equations = mo;
- exprs = string([[Ids],[Vt],[Maxexp],[R]]);
+ exprs = string([[this.Ids],[this.Vt],[this.Maxexp],[this.R]]);
gr_i = [];
this.x = standard_define([2,1],model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
@@ -36,12 +36,12 @@ function Diode() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,Ids,Vt,Maxexp,R,exprs] = scicos_getvalue("Set Diode block parameter",[["Saturation cuurent (A)"],["Voltage equivalent to temperature (Volt)"],["Max exponent for linear continuation"],["R (ohm)"]],list("vec",1,"vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.Ids,this.Vt,this.Maxexp,this.R,exprs] = scicos_getvalue("Set Diode block parameter",[["Saturation cuurent (A)"],["Voltage equivalent to temperature (Volt)"],["Max exponent for linear continuation"],["R (ohm)"]],list("vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- model.rpar = [[Ids],[Vt],[Maxexp],[R]];
- model.equations.parameters = list(["Ids","Vt","Maxexp","R"],list(Ids,Vt,Maxexp,R));
+ model.rpar = [[this.Ids],[this.Vt],[this.Maxexp],[this.R]];
+ model.equations.parameters = list(["Ids","Vt","Maxexp","R"],list(this.Ids,this.Vt,this.Maxexp,this.R));
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Electrical/Diode.pickle b/js/Electrical/Diode.pickle
index 0d1dde24..4afadfea 100644
--- a/js/Electrical/Diode.pickle
+++ b/js/Electrical/Diode.pickle
@@ -4,6 +4,14 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'R'
+p3
+aS'Vt'
+p4
+aS'Ids'
+p5
+aS'Maxexp'
+p6
+atp7
+Rp8
. \ No newline at end of file
diff --git a/js/Electrical/Ground.js b/js/Electrical/Ground.js
index 69ab7bc0..eb0de336 100644
--- a/js/Electrical/Ground.js
+++ b/js/Electrical/Ground.js
@@ -16,7 +16,7 @@ function Ground() {
this.x = standard_define([1,1],model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
this.x.graphics.out_implicit = ["I"];
- return new BasicBlock(this.x);
+ return new GroundBlock(this.x);
}
Ground.prototype.details = function Ground() {
return this.x;
@@ -25,6 +25,6 @@ function Ground() {
}
Ground.prototype.set = function Ground() {
this.x = arg1;
- return new BasicBlock(this.x);
+ return new GroundBlock(this.x);
}
}
diff --git a/js/Electrical/Gyrator.js b/js/Electrical/Gyrator.js
index c1da0455..3398aa39 100644
--- a/js/Electrical/Gyrator.js
+++ b/js/Electrical/Gyrator.js
@@ -62,11 +62,11 @@ function Gyrator() {
this.x = arg1;
exprs = this.x.graphics.exprs;
while (true) {
- [ok,G1,G2,exprs] = scicos_getvalue([["Set Gyrator block parameters:"],[""],["G1: Gyration conductance"],["G2: Gyration conductance"]],[["G1"],["G2"]],list("vec",1,"vec",1),exprs);
+ [ok,this.G1,this.G2,exprs] = scicos_getvalue([["Set Gyrator block parameters:"],[""],["G1: Gyration conductance"],["G2: Gyration conductance"]],[["G1"],["G2"]],list("vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- this.x.model.equations.parameters[2-1] = list(G1,G2);
+ this.x.model.equations.parameters[2-1] = list(this.G1,this.G2);
this.x.graphics.exprs = exprs;
break;
}
diff --git a/js/Electrical/Gyrator.pickle b/js/Electrical/Gyrator.pickle
index 0d1dde24..0eb0c70b 100644
--- a/js/Electrical/Gyrator.pickle
+++ b/js/Electrical/Gyrator.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'G2'
+p3
+aS'G1'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Electrical/IdealTransformer.js b/js/Electrical/IdealTransformer.js
index 35559b0a..4470efff 100644
--- a/js/Electrical/IdealTransformer.js
+++ b/js/Electrical/IdealTransformer.js
@@ -62,11 +62,11 @@ function IdealTransformer() {
this.x = arg1;
exprs = this.x.graphics.exprs;
while (true) {
- [ok,N,exprs] = scicos_getvalue([["Set Transformer block parameters:"],[""],["N:"+" Turn ratio (N1/N2)"]],["N"],list("vec",1),exprs);
+ [ok,this.N,exprs] = scicos_getvalue([["Set Transformer block parameters:"],[""],["N:"+" Turn ratio (N1/N2)"]],["N"],list("vec",1),exprs);
if (!ok) {
break;
}
- this.x.model.equations.parameters[2-1] = list(N);
+ this.x.model.equations.parameters[2-1] = list(this.N);
this.x.graphics.exprs = exprs;
break;
}
diff --git a/js/Electrical/IdealTransformer.pickle b/js/Electrical/IdealTransformer.pickle
index 0d1dde24..af602144 100644
--- a/js/Electrical/IdealTransformer.pickle
+++ b/js/Electrical/IdealTransformer.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'N'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Electrical/Inductor.js b/js/Electrical/Inductor.js
index 24523d52..e9f81d71 100644
--- a/js/Electrical/Inductor.js
+++ b/js/Electrical/Inductor.js
@@ -4,8 +4,8 @@ function Inductor() {
model = scicos_model();
model.in1 = [1];
model.out = [1];
- L = 1.e-5;
- model.rpar = L;
+ this.L = 1.e-5;
+ model.rpar = this.L;
model.sim = "Inductor";
model.blocktype = "c";
model.dep_ut = [true,false];
@@ -13,9 +13,9 @@ function Inductor() {
mo.model = "Inductor";
mo.inputs = "p";
mo.outputs = "n";
- mo.parameters = list("L",list(L));
+ mo.parameters = list("L",list(this.L));
model.equations = mo;
- exprs = string(L);
+ exprs = string(this.L);
gr_i = [];
this.x = standard_define([2,0.9],model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
@@ -33,12 +33,12 @@ function Inductor() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,L,exprs] = scicos_getvalue("Set Inductor block parameter","L (H)",list("vec",1),exprs);
+ [ok,this.L,exprs] = scicos_getvalue("Set Inductor block parameter","L (H)",list("vec",1),exprs);
if (!ok) {
break;
}
- model.rpar = L;
- model.equations.parameters[2-1] = list(L);
+ model.rpar = this.L;
+ model.equations.parameters[2-1] = list(this.L);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Electrical/Inductor.pickle b/js/Electrical/Inductor.pickle
index 0d1dde24..9c416581 100644
--- a/js/Electrical/Inductor.pickle
+++ b/js/Electrical/Inductor.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'L'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Electrical/NMOS.js b/js/Electrical/NMOS.js
index 0a8d1738..c9ec814a 100644
--- a/js/Electrical/NMOS.js
+++ b/js/Electrical/NMOS.js
@@ -2,15 +2,15 @@
function NMOS() {
NMOS.prototype.define = function NMOS() {
model = scicos_model();
- W = 20.e-6;
- L = 6.e-6;
- Beta = 0.041e-3;
- Vt = 0.8;
- K2 = 1.144;
- K5 = 0.7311;
- dW = -2.5e-6;
- dL = -1.5e-6;
- RDS = 1.e+7;
+ this.W = 20.e-6;
+ this.L = 6.e-6;
+ this.Beta = 0.041e-3;
+ this.Vt = 0.8;
+ this.K2 = 1.144;
+ this.K5 = 0.7311;
+ this.dW = -2.5e-6;
+ this.dL = -1.5e-6;
+ this.RDS = 1.e+7;
model.sim = "NMOS";
model.blocktype = "c";
model.dep_ut = [true,false];
@@ -18,11 +18,11 @@ function NMOS() {
mo.model = "NMOS";
mo.outputs = [["D"],["B"],["S"]];
mo.inputs = "G";
- mo.parameters = list([["W"],["L"],["Beta"],["Vt"],["K2"],["K5"],["dW"],["dL"],["RDS"]],[[W],[L],[Beta],[Vt],[K2],[K5],[dW],[dL],[RDS]]);
+ mo.parameters = list([["W"],["L"],["Beta"],["Vt"],["K2"],["K5"],["dW"],["dL"],["RDS"]],[[this.W],[this.L],[this.Beta],[this.Vt],[this.K2],[this.K5],[this.dW],[this.dL],[this.RDS]]);
model.equations = mo;
model.in1 = ones(size(mo.inputs,"*"),1);
model.out = ones(size(mo.outputs,"*"),1);
- exprs = [[string(W)],[string(L)],[string(Beta)],[string(Vt)],[string(K2)],[string(K5)],[string(dW)],[string(dL)],[string(RDS)]];
+ exprs = [[string(this.W)],[string(this.L)],[string(this.Beta)],[string(this.Vt)],[string(this.K2)],[string(this.K5)],[string(this.dW)],[string(this.dL)],[string(this.RDS)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
this.x.graphics.in_implicit = ["I"];
@@ -40,11 +40,11 @@ function NMOS() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,W,L,Beta,Vt,K2,K5,dW,dL,RDS,exprs] = scicos_getvalue("Set NMOS Transistor block parameters",[["Width [m]"],["Length [m]"],["Transconductance parameter [A/(V*V)]"],["Zero bias threshold voltage [V]"],["Bulk threshold parameter"],["Reduction of pinch-off region"],["Narrowing of channel [m]"],["Shortening of channel [m]"],["Drain-Source-Resistance [Ohm]"]],list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1),exprs);
+ [ok,this.W,this.L,this.Beta,this.Vt,this.K2,this.K5,this.dW,this.dL,this.RDS,exprs] = scicos_getvalue("Set NMOS Transistor block parameters",[["Width [m]"],["Length [m]"],["Transconductance parameter [A/(V*V)]"],["Zero bias threshold voltage [V]"],["Bulk threshold parameter"],["Reduction of pinch-off region"],["Narrowing of channel [m]"],["Shortening of channel [m]"],["Drain-Source-Resistance [Ohm]"]],list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1),exprs);
if (!ok) {
break;
}
- model.equations.parameters[2-1] = list(W,L,Beta,Vt,K2,K5,dW,dL,RDS);
+ model.equations.parameters[2-1] = list(this.W,this.L,this.Beta,this.Vt,this.K2,this.K5,this.dW,this.dL,this.RDS);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Electrical/NMOS.pickle b/js/Electrical/NMOS.pickle
index 0d1dde24..0f015c0a 100644
--- a/js/Electrical/NMOS.pickle
+++ b/js/Electrical/NMOS.pickle
@@ -2,8 +2,26 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'dL'
p2
-atp3
-Rp4
+aS'K5'
+p3
+aS'RDS'
+p4
+aS'L'
+p5
+aS'K2'
+p6
+aS'Beta'
+p7
+aS'Vt'
+p8
+aS'W'
+p9
+aS'dW'
+p10
+aS'x'
+p11
+atp12
+Rp13
. \ No newline at end of file
diff --git a/js/Electrical/NPN.js b/js/Electrical/NPN.js
index c82ac606..582c794b 100644
--- a/js/Electrical/NPN.js
+++ b/js/Electrical/NPN.js
@@ -62,11 +62,11 @@ function NPN() {
this.x = arg1;
exprs = this.x.graphics.exprs;
while (true) {
- [ok,Bf,Br,Is,Vak,Tauf,Taur,Ccs,Cje,Cjc,Phie,Me,Phic,Mc,Gbc,Gbe,Vt,EMinMax,exprs] = scicos_getvalue([["Set NPN block parameters:"],[""]],[["Bf : Forward beta"],["Br : Reverse beta"],["Is : Transport saturation current"],["Vak : Early voltage (inverse), 1/Volt"],["Tauf: Ideal forward transit time"],["Taur: Ideal reverse transit time"],["Ccs : Collector-substrat(ground) cap."],["Cje : Base-emitter zero bias depletion cap."],["Cjc : Base-coll. zero bias depletion cap."],["Phie: Base-emitter diffusion voltage"],["Me : Base-emitter gradation exponent"],["Phic: Base-collector diffusion voltage"],["Mc : Base-collector gradation exponent"],["Gbc : Base-collector conductance"],["Gbe : Base-emitter conductance"],["Vt : Voltage equivalent of temperature"],["EMinmax: if x > EMinMax, the exp(x) is linearized"]],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.Bf,this.Br,this.Is,this.Vak,this.Tauf,this.Taur,this.Ccs,this.Cje,this.Cjc,this.Phie,this.Me,this.Phic,this.Mc,this.Gbc,this.Gbe,this.Vt,this.EMinMax,exprs] = scicos_getvalue([["Set NPN block parameters:"],[""]],[["Bf : Forward beta"],["Br : Reverse beta"],["Is : Transport saturation current"],["Vak : Early voltage (inverse), 1/Volt"],["Tauf: Ideal forward transit time"],["Taur: Ideal reverse transit time"],["Ccs : Collector-substrat(ground) cap."],["Cje : Base-emitter zero bias depletion cap."],["Cjc : Base-coll. zero bias depletion cap."],["Phie: Base-emitter diffusion voltage"],["Me : Base-emitter gradation exponent"],["Phic: Base-collector diffusion voltage"],["Mc : Base-collector gradation exponent"],["Gbc : Base-collector conductance"],["Gbe : Base-emitter conductance"],["Vt : Voltage equivalent of temperature"],["EMinmax: if x > EMinMax, the exp(x) is linearized"]],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- this.x.model.equations.parameters[2-1] = list(Bf,Br,Is,Vak,Tauf,Taur,Ccs,Cje,Cjc,Phie,Me,Phic,Mc,Gbc,Gbe,Vt,EMinMax);
+ this.x.model.equations.parameters[2-1] = list(this.Bf,this.Br,this.Is,this.Vak,this.Tauf,this.Taur,this.Ccs,this.Cje,this.Cjc,this.Phie,this.Me,this.Phic,this.Mc,this.Gbc,this.Gbe,this.Vt,this.EMinMax);
this.x.graphics.exprs = exprs;
break;
}
diff --git a/js/Electrical/NPN.pickle b/js/Electrical/NPN.pickle
index 0d1dde24..ffc05c1b 100644
--- a/js/Electrical/NPN.pickle
+++ b/js/Electrical/NPN.pickle
@@ -2,8 +2,42 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'Me'
p2
-atp3
-Rp4
+aS'Vak'
+p3
+aS'Bf'
+p4
+aS'Gbe'
+p5
+aS'Tauf'
+p6
+aS'Gbc'
+p7
+aS'Mc'
+p8
+aS'Phic'
+p9
+aS'Cjc'
+p10
+aS'Is'
+p11
+aS'Phie'
+p12
+aS'Ccs'
+p13
+aS'Cje'
+p14
+aS'Taur'
+p15
+aS'Vt'
+p16
+aS'Br'
+p17
+aS'EMinMax'
+p18
+aS'x'
+p19
+atp20
+Rp21
. \ No newline at end of file
diff --git a/js/Electrical/OpAmp.js b/js/Electrical/OpAmp.js
index 4123f4f8..44526b9a 100644
--- a/js/Electrical/OpAmp.js
+++ b/js/Electrical/OpAmp.js
@@ -34,11 +34,11 @@ function OpAmp() {
exprs = graphics.exprs;
model = arg1.model;
while (false) {
- [ok,OLGain,SatH,SatL,exprs] = scicos_getvalue("Set the Operational Amplifier parameters",[["Open Loop Gain"],["Positive saturation voltage"],["Negative saturation voltage"]],list("vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.OLGain,this.SatH,this.SatL,exprs] = scicos_getvalue("Set the Operational Amplifier parameters",[["Open Loop Gain"],["Positive saturation voltage"],["Negative saturation voltage"]],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- model.equations.parameters[2-1] = list(OLGain,SatH,SatL);
+ model.equations.parameters[2-1] = list(this.OLGain,this.SatH,this.SatL);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Electrical/OpAmp.pickle b/js/Electrical/OpAmp.pickle
index 0d1dde24..aba723ba 100644
--- a/js/Electrical/OpAmp.pickle
+++ b/js/Electrical/OpAmp.pickle
@@ -2,8 +2,14 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'SatH'
p2
-atp3
-Rp4
+aS'x'
+p3
+aS'OLGain'
+p4
+aS'SatL'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/Electrical/PMOS.js b/js/Electrical/PMOS.js
index cd2ba37e..fa73cb42 100644
--- a/js/Electrical/PMOS.js
+++ b/js/Electrical/PMOS.js
@@ -2,15 +2,15 @@
function PMOS() {
PMOS.prototype.define = function PMOS() {
model = scicos_model();
- W = 50.0e-6;
- L = 6.0e-6;
- Beta = 0.0105e-3;
- Vt = -1;
- K2 = 0.41;
- K5 = 0.839;
- dW = -2.5e-6;
- dL = -2.1e-6;
- RDS = 1.e+7;
+ this.W = 50.0e-6;
+ this.L = 6.0e-6;
+ this.Beta = 0.0105e-3;
+ this.Vt = -1;
+ this.K2 = 0.41;
+ this.K5 = 0.839;
+ this.dW = -2.5e-6;
+ this.dL = -2.1e-6;
+ this.RDS = 1.e+7;
model.sim = "PMOS";
model.blocktype = "c";
model.dep_ut = [true,false];
@@ -18,11 +18,11 @@ function PMOS() {
mo.model = "PMOS";
mo.outputs = [["D"],["B"],["S"]];
mo.inputs = "G";
- mo.parameters = list([["W"],["L"],["Beta"],["Vt"],["K2"],["K5"],["dW"],["dL"],["RDS"]],[[W],[L],[Beta],[Vt],[K2],[K5],[dW],[dL],[RDS]]);
+ mo.parameters = list([["W"],["L"],["Beta"],["Vt"],["K2"],["K5"],["dW"],["dL"],["RDS"]],[[this.W],[this.L],[this.Beta],[this.Vt],[this.K2],[this.K5],[this.dW],[this.dL],[this.RDS]]);
model.equations = mo;
model.in1 = ones(size(mo.inputs,"*"),1);
model.out = ones(size(mo.outputs,"*"),1);
- exprs = [[string(W)],[string(L)],[string(Beta)],[string(Vt)],[string(K2)],[string(K5)],[string(dW)],[string(dL)],[string(RDS)]];
+ exprs = [[string(this.W)],[string(this.L)],[string(this.Beta)],[string(this.Vt)],[string(this.K2)],[string(this.K5)],[string(this.dW)],[string(this.dL)],[string(this.RDS)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
this.x.graphics.in_implicit = ["I"];
@@ -40,11 +40,11 @@ function PMOS() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,W,L,Beta,Vt,K2,K5,dW,dL,RDS,exprs] = scicos_getvalue("Set PMOS Transistor parameters",[["Width [m]"],["Length [m]"],["Transconductance parameter [A/(V*V)]"],["Zero bias threshold voltage [V]"],["Bulk threshold parameter"],["Reduction of pinch-off region"],["Narrowing of channel [m]"],["Shortening of channel [m]"],["Drain-Source-Resistance [Ohm]"]],list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1),exprs);
+ [ok,this.W,this.L,this.Beta,this.Vt,this.K2,this.K5,this.dW,this.dL,this.RDS,exprs] = scicos_getvalue("Set PMOS Transistor parameters",[["Width [m]"],["Length [m]"],["Transconductance parameter [A/(V*V)]"],["Zero bias threshold voltage [V]"],["Bulk threshold parameter"],["Reduction of pinch-off region"],["Narrowing of channel [m]"],["Shortening of channel [m]"],["Drain-Source-Resistance [Ohm]"]],list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1),exprs);
if (!ok) {
break;
}
- model.equations.parameters[2-1] = list(W,L,Beta,Vt,K2,K5,dW,dL,RDS);
+ model.equations.parameters[2-1] = list(this.W,this.L,this.Beta,this.Vt,this.K2,this.K5,this.dW,this.dL,this.RDS);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Electrical/PMOS.pickle b/js/Electrical/PMOS.pickle
index 0d1dde24..0f015c0a 100644
--- a/js/Electrical/PMOS.pickle
+++ b/js/Electrical/PMOS.pickle
@@ -2,8 +2,26 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'dL'
p2
-atp3
-Rp4
+aS'K5'
+p3
+aS'RDS'
+p4
+aS'L'
+p5
+aS'K2'
+p6
+aS'Beta'
+p7
+aS'Vt'
+p8
+aS'W'
+p9
+aS'dW'
+p10
+aS'x'
+p11
+atp12
+Rp13
. \ No newline at end of file
diff --git a/js/Electrical/PNP.js b/js/Electrical/PNP.js
index 418bbf9c..f823a8ef 100644
--- a/js/Electrical/PNP.js
+++ b/js/Electrical/PNP.js
@@ -62,11 +62,11 @@ function PNP() {
this.x = arg1;
exprs = this.x.graphics.exprs;
while (true) {
- [ok,Bf,Br,Is,Vak,Tauf,Taur,Ccs,Cje,Cjc,Phie,Me,Phic,Mc,Gbc,Gbe,Vt,EMinMax,exprs] = scicos_getvalue([["Set PNP block parameters:"],[""]],[["Bf : Forward beta"],["Br : Reverse beta"],["Is : Transport saturation current"],["Vak : Early voltage (inverse), 1/Volt"],["Tauf: Ideal forward transit time"],["Taur: Ideal reverse transit time"],["Ccs : Collector-substrat(ground) cap."],["Cje : Base-emitter zero bias depletion cap."],["Cjc : Base-coll. zero bias depletion cap."],["Phie: Base-emitter diffusion voltage"],["Me : Base-emitter gradation exponent"],["Phic: Base-collector diffusion voltage"],["Mc : Base-collector gradation exponent"],["Gbc : Base-collector conductance"],["Gbe : Base-emitter conductance"],["Vt : Voltage equivalent of temperature"],["EMinMax: if x > EMinMax, the exp(x) function is linearized"]],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.Bf,this.Br,this.Is,this.Vak,this.Tauf,this.Taur,this.Ccs,this.Cje,this.Cjc,this.Phie,this.Me,this.Phic,this.Mc,this.Gbc,this.Gbe,this.Vt,this.EMinMax,exprs] = scicos_getvalue([["Set PNP block parameters:"],[""]],[["Bf : Forward beta"],["Br : Reverse beta"],["Is : Transport saturation current"],["Vak : Early voltage (inverse), 1/Volt"],["Tauf: Ideal forward transit time"],["Taur: Ideal reverse transit time"],["Ccs : Collector-substrat(ground) cap."],["Cje : Base-emitter zero bias depletion cap."],["Cjc : Base-coll. zero bias depletion cap."],["Phie: Base-emitter diffusion voltage"],["Me : Base-emitter gradation exponent"],["Phic: Base-collector diffusion voltage"],["Mc : Base-collector gradation exponent"],["Gbc : Base-collector conductance"],["Gbe : Base-emitter conductance"],["Vt : Voltage equivalent of temperature"],["EMinMax: if x > EMinMax, the exp(x) function is linearized"]],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- this.x.model.equations.parameters[2-1] = list(Bf,Br,Is,Vak,Tauf,Taur,Ccs,Cje,Cjc,Phie,Me,Phic,Mc,Gbc,Gbe,Vt,EMinMax);
+ this.x.model.equations.parameters[2-1] = list(this.Bf,this.Br,this.Is,this.Vak,this.Tauf,this.Taur,this.Ccs,this.Cje,this.Cjc,this.Phie,this.Me,this.Phic,this.Mc,this.Gbc,this.Gbe,this.Vt,this.EMinMax);
this.x.graphics.exprs = exprs;
break;
}
diff --git a/js/Electrical/PNP.pickle b/js/Electrical/PNP.pickle
index 0d1dde24..ffc05c1b 100644
--- a/js/Electrical/PNP.pickle
+++ b/js/Electrical/PNP.pickle
@@ -2,8 +2,42 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'Me'
p2
-atp3
-Rp4
+aS'Vak'
+p3
+aS'Bf'
+p4
+aS'Gbe'
+p5
+aS'Tauf'
+p6
+aS'Gbc'
+p7
+aS'Mc'
+p8
+aS'Phic'
+p9
+aS'Cjc'
+p10
+aS'Is'
+p11
+aS'Phie'
+p12
+aS'Ccs'
+p13
+aS'Cje'
+p14
+aS'Taur'
+p15
+aS'Vt'
+p16
+aS'Br'
+p17
+aS'EMinMax'
+p18
+aS'x'
+p19
+atp20
+Rp21
. \ No newline at end of file
diff --git a/js/Electrical/Resistor.js b/js/Electrical/Resistor.js
index fdc0f662..4341ccb6 100644
--- a/js/Electrical/Resistor.js
+++ b/js/Electrical/Resistor.js
@@ -2,8 +2,8 @@
function Resistor() {
Resistor.prototype.define = function Resistor() {
model = scicos_model();
- R = 0.01;
- model.rpar = R;
+ this.R = 0.01;
+ model.rpar = this.R;
model.sim = "resistor";
model.blocktype = "c";
model.dep_ut = [true,false];
@@ -11,11 +11,11 @@ function Resistor() {
mo.model = "Resistor";
mo.inputs = "p";
mo.outputs = "n";
- mo.parameters = list("R",list(R));
+ mo.parameters = list("R",list(this.R));
model.equations = mo;
model.in1 = ones(size(mo.inputs,"*"),1);
model.out = ones(size(mo.outputs,"*"),1);
- exprs = string(R);
+ exprs = string(this.R);
gr_i = [];
this.x = standard_define([2,1],model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
@@ -33,12 +33,12 @@ function Resistor() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,R,exprs] = scicos_getvalue("Set Resistor block parameter","R (ohm)",list("vec",1),exprs);
+ [ok,this.R,exprs] = scicos_getvalue("Set Resistor block parameter","R (ohm)",list("vec",1),exprs);
if (!ok) {
break;
}
- model.rpar = R;
- model.equations.parameters[2-1] = list(R);
+ model.rpar = this.R;
+ model.equations.parameters[2-1] = list(this.R);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Electrical/Resistor.pickle b/js/Electrical/Resistor.pickle
index 0d1dde24..1fa90b15 100644
--- a/js/Electrical/Resistor.pickle
+++ b/js/Electrical/Resistor.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'R'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Electrical/SineVoltage.js b/js/Electrical/SineVoltage.js
index 0d7a554a..43cc8701 100644
--- a/js/Electrical/SineVoltage.js
+++ b/js/Electrical/SineVoltage.js
@@ -4,12 +4,12 @@ function SineVoltage() {
model = scicos_model();
model.in1 = [1];
model.out = [1];
- V = 1;
- ph = 0;
- frq = 1;
- offset = 0;
- start = 0;
- model.rpar = [[V],[ph],[frq],[offset],[start]];
+ this.V = 1;
+ this.ph = 0;
+ this.frq = 1;
+ this.offset = 0;
+ this.start = 0;
+ model.rpar = [[this.V],[this.ph],[this.frq],[this.offset],[this.start]];
model.sim = "SineVoltage";
model.blocktype = "c";
model.dep_ut = [true,false];
@@ -17,9 +17,9 @@ function SineVoltage() {
mo.model = "SineVoltage";
mo.inputs = "p";
mo.outputs = "n";
- mo.parameters = list([["V"],["phase"],["freqHz"],["offset"],["startTime"]],list(V,ph,frq,offset,start));
+ mo.parameters = list([["V"],["phase"],["freqHz"],["offset"],["startTime"]],list(this.V,this.ph,this.frq,this.offset,this.start));
model.equations = mo;
- exprs = [[string(V)],[string(ph)],[string(frq)],[string(offset)],[string(start)]];
+ exprs = [[string(this.V)],[string(this.ph)],[string(this.frq)],[string(this.offset)],[string(this.start)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
this.x.graphics.in_implicit = ["I"];
@@ -37,12 +37,12 @@ function SineVoltage() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,V,ph,frq,offset,start,exprs] = scicos_getvalue("Set voltage source parameter",[["Amplitude (Volt)"],["phase (rad)"],["Frequency (Hz)"],["Voltageoffset (V)"],["Timeoffset (s)"]],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.V,this.ph,this.frq,this.offset,this.start,exprs] = scicos_getvalue("Set voltage source parameter",[["Amplitude (Volt)"],["phase (rad)"],["Frequency (Hz)"],["Voltageoffset (V)"],["Timeoffset (s)"]],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- model.rpar = [[V],[ph],[frq],[offset],[start]];
- model.equations.parameters[2-1] = list(V,ph,frq,offset,start);
+ model.rpar = [[this.V],[this.ph],[this.frq],[this.offset],[this.start]];
+ model.equations.parameters[2-1] = list(this.V,this.ph,this.frq,this.offset,this.start);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Electrical/SineVoltage.pickle b/js/Electrical/SineVoltage.pickle
index 0d1dde24..e7abe6f3 100644
--- a/js/Electrical/SineVoltage.pickle
+++ b/js/Electrical/SineVoltage.pickle
@@ -2,8 +2,18 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'V'
p2
-atp3
-Rp4
+aS'start'
+p3
+aS'frq'
+p4
+aS'offset'
+p5
+aS'x'
+p6
+aS'ph'
+p7
+atp8
+Rp9
. \ No newline at end of file
diff --git a/js/Electrical/Switch.js b/js/Electrical/Switch.js
index d3c8d95b..e45d1b5c 100644
--- a/js/Electrical/Switch.js
+++ b/js/Electrical/Switch.js
@@ -2,8 +2,8 @@
function Switch() {
Switch.prototype.define = function Switch() {
model = scicos_model();
- Ron = 0.01;
- Roff = 1e5;
+ this.Ron = 0.01;
+ this.Roff = 1e5;
S = [["Ron"],["Roff"]];
Z = eval(S);
model.sim = "Switch";
@@ -36,11 +36,11 @@ function Switch() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,Ron,Roff,exprs] = scicos_getvalue("Set non-ideal electrical switch parameters",[["Resistance in On state (Ohm)"],["Resistance in Off state (Ohm)"]],list("vec",1,"vec",1),exprs);
+ [ok,this.Ron,this.Roff,exprs] = scicos_getvalue("Set non-ideal electrical switch parameters",[["Resistance in On state (Ohm)"],["Resistance in Off state (Ohm)"]],list("vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- model.equations.parameters[2-1] = list(Ron,Roff);
+ model.equations.parameters[2-1] = list(this.Ron,this.Roff);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Electrical/Switch.pickle b/js/Electrical/Switch.pickle
index 0d1dde24..5a7e7ba4 100644
--- a/js/Electrical/Switch.pickle
+++ b/js/Electrical/Switch.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'Roff'
+p3
+aS'Ron'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Electrical/VVsourceAC.js b/js/Electrical/VVsourceAC.js
index e87ac43d..779cdd91 100644
--- a/js/Electrical/VVsourceAC.js
+++ b/js/Electrical/VVsourceAC.js
@@ -5,8 +5,8 @@ function VVsourceAC() {
model.in1 = [[1],[1]];
model.out = [1];
VA = 220;
- FR = 50;
- model.rpar = [FR];
+ this.FR = 50;
+ model.rpar = [this.FR];
model.sim = "VVsourceAC";
model.blocktype = "c";
model.dep_ut = [true,false];
@@ -14,9 +14,9 @@ function VVsourceAC() {
mo.model = "VVsourceAC";
mo.inputs = ["p","VA"];
mo.outputs = "n";
- mo.parameters = list(["f"],list(FR));
+ mo.parameters = list(["f"],list(this.FR));
model.equations = mo;
- exprs = [string(FR)];
+ exprs = [string(this.FR)];
gr_i = [];
this.x = standard_define([2,2],model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I","E"];
@@ -34,12 +34,12 @@ function VVsourceAC() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,FR,exprs] = scicos_getvalue("Set voltage source parameter",["Frequency (Hz)"],list("vec",-1),exprs);
+ [ok,this.FR,exprs] = scicos_getvalue("Set voltage source parameter",["Frequency (Hz)"],list("vec",-1),exprs);
if (!ok) {
break;
}
- model.rpar = [FR];
- model.equations.parameters[2-1] = list(FR);
+ model.rpar = [this.FR];
+ model.equations.parameters[2-1] = list(this.FR);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Electrical/VVsourceAC.pickle b/js/Electrical/VVsourceAC.pickle
index 0d1dde24..95e8974e 100644
--- a/js/Electrical/VVsourceAC.pickle
+++ b/js/Electrical/VVsourceAC.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'FR'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Electrical/VoltageSensor.js b/js/Electrical/VoltageSensor.js
index e3369b94..1d463e44 100644
--- a/js/Electrical/VoltageSensor.js
+++ b/js/Electrical/VoltageSensor.js
@@ -17,7 +17,7 @@ function VoltageSensor() {
this.x = standard_define([2,2],model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
this.x.graphics.out_implicit = [["I"],["E"]];
- return new BasicBlock(this.x);
+ return new VoltageSensorBlock(this.x);
}
VoltageSensor.prototype.details = function VoltageSensor() {
return this.x;
@@ -26,6 +26,6 @@ function VoltageSensor() {
}
VoltageSensor.prototype.set = function VoltageSensor() {
this.x = arg1;
- return new BasicBlock(this.x);
+ return new VoltageSensorBlock(this.x);
}
}
diff --git a/js/Electrical/VsourceAC.js b/js/Electrical/VsourceAC.js
index 8a2464c5..6cf00234 100644
--- a/js/Electrical/VsourceAC.js
+++ b/js/Electrical/VsourceAC.js
@@ -4,9 +4,9 @@ function VsourceAC() {
model = scicos_model();
model.in1 = [1];
model.out = [1];
- VA = 220;
- FR = 50;
- model.rpar = [[VA],[FR]];
+ this.VA = 220;
+ this.FR = 50;
+ model.rpar = [[this.VA],[this.FR]];
model.sim = "VsourceAC";
model.blocktype = "c";
model.dep_ut = [true,false];
@@ -14,9 +14,9 @@ function VsourceAC() {
mo.model = "VsourceAC";
mo.inputs = "p";
mo.outputs = "n";
- mo.parameters = list([["VA"],["f"]],list(VA,FR));
+ mo.parameters = list([["VA"],["f"]],list(this.VA,this.FR));
model.equations = mo;
- exprs = [[string(VA)],[string(FR)]];
+ exprs = [[string(this.VA)],[string(this.FR)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
@@ -34,12 +34,12 @@ function VsourceAC() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,VA,FR,exprs] = scicos_getvalue("Set voltage source parameter",[["Amplitude (Volt)"],["Frequency (Hz)"]],list("vec",-1,"vec",-1),exprs);
+ [ok,this.VA,this.FR,exprs] = scicos_getvalue("Set voltage source parameter",[["Amplitude (Volt)"],["Frequency (Hz)"]],list("vec",-1,"vec",-1),exprs);
if (!ok) {
break;
}
- model.rpar = [[VA],[FR]];
- model.equations.parameters[2-1] = list(VA,FR);
+ model.rpar = [[this.VA],[this.FR]];
+ model.equations.parameters[2-1] = list(this.VA,this.FR);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Electrical/VsourceAC.pickle b/js/Electrical/VsourceAC.pickle
index 0d1dde24..7dc76fc6 100644
--- a/js/Electrical/VsourceAC.pickle
+++ b/js/Electrical/VsourceAC.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'FR'
+p3
+aS'VA'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Events/END_c.js b/js/Events/END_c.js
index 26041f2a..d0ff0d9b 100644
--- a/js/Events/END_c.js
+++ b/js/Events/END_c.js
@@ -1,15 +1,15 @@
/* autogenerated from "macros/Events/END_c.sci" */
function END_c() {
END_c.prototype.define = function END_c() {
- tf = 100000000;
+ this.tf = 100000000;
model = scicos_model();
model.sim = list("scicosexit",4);
model.evtin = 1;
model.evtout = 1;
- model.firing = tf;
+ model.firing = this.tf;
model.blocktype = "d";
model.dep_ut = [false,false];
- exprs = string(tf);
+ exprs = string(this.tf);
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -25,13 +25,13 @@ function END_c() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,tf,exprs] = scicos_getvalue("Set final simulation time",["Final simulation time"],list("vec",1),exprs);
+ [ok,this.tf,exprs] = scicos_getvalue("Set final simulation time",["Final simulation time"],list("vec",1),exprs);
if (!ok) {
break;
}
if (ok) {
graphics.exprs = exprs;
- model.firing = tf;
+ model.firing = this.tf;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Events/END_c.pickle b/js/Events/END_c.pickle
index 0d1dde24..b83057e2 100644
--- a/js/Events/END_c.pickle
+++ b/js/Events/END_c.pickle
@@ -2,8 +2,10 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'tf'
p2
-atp3
-Rp4
+aS'x'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Events/EVTDLY_c.js b/js/Events/EVTDLY_c.js
index 1fae97ea..2579a9e7 100644
--- a/js/Events/EVTDLY_c.js
+++ b/js/Events/EVTDLY_c.js
@@ -1,17 +1,17 @@
/* autogenerated from "macros/Events/EVTDLY_c.sci" */
function EVTDLY_c() {
EVTDLY_c.prototype.define = function EVTDLY_c() {
- dt = 0.1;
- ff = 0.0;
+ this.dt = 0.1;
+ this.ff = 0.0;
model = scicos_model();
model.sim = list("evtdly4",4);
model.evtin = 1;
model.evtout = 1;
- model.rpar = [[dt],[ff]];
+ model.rpar = [[this.dt],[this.ff]];
model.blocktype = "d";
- model.firing = ff;
+ model.firing = this.ff;
model.dep_ut = [false,false];
- exprs = [[string(dt)],[sci2exp(ff)]];
+ exprs = [[string(this.dt)],[sci2exp(this.ff)]];
gr_i = [];
this.x = standard_define([3,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -27,18 +27,18 @@ function EVTDLY_c() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,dt,ff,exprs] = scicos_getvalue([["Set Event Delay block parameters"],["Delay is the delay between an input event "],[" and the generated output event"],["Block may initially generate an output event before "],[" any input event. \"Date of initial output event\""],[" gives the date of this event. Set a negative value"],[" to disable any output event."]],[["Delay"],["Date of initial output event"]],list("vec",1,"vec",1),exprs);
+ [ok,this.dt,this.ff,exprs] = scicos_getvalue([["Set Event Delay block parameters"],["Delay is the delay between an input event "],[" and the generated output event"],["Block may initially generate an output event before "],[" any input event. \"Date of initial output event\""],[" gives the date of this event. Set a negative value"],[" to disable any output event."]],[["Delay"],["Date of initial output event"]],list("vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- if (dt<=0) {
+ if (this.dt<=0) {
message("Delay must be positive");
ok = false;
}
if (ok) {
graphics.exprs = exprs;
- model.rpar = [[dt],[ff]];
- model.firing = ff;
+ model.rpar = [[this.dt],[this.ff]];
+ model.firing = this.ff;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Events/EVTDLY_c.pickle b/js/Events/EVTDLY_c.pickle
index 0d1dde24..c7aedd0b 100644
--- a/js/Events/EVTDLY_c.pickle
+++ b/js/Events/EVTDLY_c.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'dt'
+p3
+aS'ff'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Events/EVTDLY_f.js b/js/Events/EVTDLY_f.js
index 010d429b..d0a9cf99 100644
--- a/js/Events/EVTDLY_f.js
+++ b/js/Events/EVTDLY_f.js
@@ -1,17 +1,17 @@
/* autogenerated from "macros/Events/EVTDLY_f.sci" */
function EVTDLY_f() {
EVTDLY_f.prototype.define = function EVTDLY_f() {
- dt = 0.1;
- ff = dt;
+ this.dt = 0.1;
+ this.ff = this.dt;
model = scicos_model();
model.sim = "evtdly";
model.evtin = 1;
model.evtout = 1;
- model.rpar = dt;
+ model.rpar = this.dt;
model.blocktype = "d";
- model.firing = ff;
+ model.firing = this.ff;
model.dep_ut = [false,false];
- exprs = [[string(dt)],[sci2exp(ff)]];
+ exprs = [[string(this.dt)],[sci2exp(this.ff)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -27,18 +27,18 @@ function EVTDLY_f() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,dt,ff,exprs] = scicos_getvalue([["Set Event Delay block parameters"],["Delay is the delay between an input event "],[" and the generated output event"],["Block may initially generate an output event before "],[" any input event. \"Date of initial output event\""],[" gives the date of this event. Set a negative value"],[" if no initial event required"]],[["Delay"],["Date of initial output event"]],list("vec",1,"vec",1),exprs);
+ [ok,this.dt,this.ff,exprs] = scicos_getvalue([["Set Event Delay block parameters"],["Delay is the delay between an input event "],[" and the generated output event"],["Block may initially generate an output event before "],[" any input event. \"Date of initial output event\""],[" gives the date of this event. Set a negative value"],[" if no initial event required"]],[["Delay"],["Date of initial output event"]],list("vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- if (dt<=0) {
+ if (this.dt<=0) {
message("Delay must be positive");
ok = false;
}
if (ok) {
graphics.exprs = exprs;
- model.rpar = dt;
- model.firing = ff;
+ model.rpar = this.dt;
+ model.firing = this.ff;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Events/EVTDLY_f.pickle b/js/Events/EVTDLY_f.pickle
index 0d1dde24..c7aedd0b 100644
--- a/js/Events/EVTDLY_f.pickle
+++ b/js/Events/EVTDLY_f.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'dt'
+p3
+aS'ff'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Events/EVTGEN_f.js b/js/Events/EVTGEN_f.js
index 804c5a0c..361a1529 100644
--- a/js/Events/EVTGEN_f.js
+++ b/js/Events/EVTGEN_f.js
@@ -1,14 +1,14 @@
/* autogenerated from "macros/Events/EVTGEN_f.sci" */
function EVTGEN_f() {
EVTGEN_f.prototype.define = function EVTGEN_f() {
- tt = 0;
+ this.tt = 0;
model = scicos_model();
model.sim = "trash";
model.evtout = 1;
model.blocktype = "d";
- model.firing = tt;
+ model.firing = this.tt;
model.dep_ut = [false,false];
- exprs = string(tt);
+ exprs = string(this.tt);
gr_i = [];
this.x = standard_define([3,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -24,13 +24,13 @@ function EVTGEN_f() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,tt,exprs] = scicos_getvalue("Set Event time",["Event Time"],list("vec",1),exprs);
+ [ok,this.tt,exprs] = scicos_getvalue("Set Event time",["Event Time"],list("vec",1),exprs);
if (!ok) {
break;
}
graphics.exprs = exprs;
- if (model.firing!=tt) {
- model.firing = tt;
+ if (model.firing!=this.tt) {
+ model.firing = this.tt;
}
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Events/EVTGEN_f.pickle b/js/Events/EVTGEN_f.pickle
index 0d1dde24..4b394121 100644
--- a/js/Events/EVTGEN_f.pickle
+++ b/js/Events/EVTGEN_f.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'tt'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Events/EVTVARDLY.js b/js/Events/EVTVARDLY.js
index 57e9cc92..a86b6ab2 100644
--- a/js/Events/EVTVARDLY.js
+++ b/js/Events/EVTVARDLY.js
@@ -26,12 +26,12 @@ function EVTVARDLY() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,fir,exprs] = scicos_getvalue("Set parameter of variable event delay","Initial event firing time (<0 if absent)",list("vec",1),exprs);
+ [ok,this.fir,exprs] = scicos_getvalue("Set parameter of variable event delay","Initial event firing time (<0 if absent)",list("vec",1),exprs);
if (!ok) {
break;
}
graphics.exprs = exprs;
- model.firing = fir;
+ model.firing = this.fir;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Events/EVTVARDLY.pickle b/js/Events/EVTVARDLY.pickle
index 0d1dde24..33f74726 100644
--- a/js/Events/EVTVARDLY.pickle
+++ b/js/Events/EVTVARDLY.pickle
@@ -2,8 +2,10 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'fir'
p2
-atp3
-Rp4
+aS'x'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Events/HALT_f.js b/js/Events/HALT_f.js
index 408678a0..d9e2d28d 100644
--- a/js/Events/HALT_f.js
+++ b/js/Events/HALT_f.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Events/HALT_f.sci" */
function HALT_f() {
HALT_f.prototype.define = function HALT_f() {
- n = 0;
+ this.n = 0;
model = scicos_model();
model.sim = "hltblk";
model.evtin = 1;
@@ -9,7 +9,7 @@ function HALT_f() {
model.ipar = 0;
model.blocktype = "d";
model.dep_ut = [false,false];
- exprs = string(n);
+ exprs = string(this.n);
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -25,13 +25,13 @@ function HALT_f() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,n,exprs] = scicos_getvalue("Set Halt block parameters",["State on halt"],list("vec",1),exprs);
+ [ok,this.n,exprs] = scicos_getvalue("Set Halt block parameters",["State on halt"],list("vec",1),exprs);
if (!ok) {
break;
}
if (ok) {
graphics.exprs = exprs;
- model.ipar = n;
+ model.ipar = this.n;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Events/HALT_f.pickle b/js/Events/HALT_f.pickle
index 0d1dde24..464ee4ce 100644
--- a/js/Events/HALT_f.pickle
+++ b/js/Events/HALT_f.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'n'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Events/IFTHEL_f.js b/js/Events/IFTHEL_f.js
index 5dd2d712..b99577ec 100644
--- a/js/Events/IFTHEL_f.js
+++ b/js/Events/IFTHEL_f.js
@@ -35,24 +35,24 @@ function IFTHEL_f() {
exprs[2-1] = string(1);
}
while (true) {
- [ok,inh,nmod,exprs] = scicos_getvalue("Set parameters",[["Inherit (1: no, 0: yes)"],["zero-crossing (0: no, 1: yes)"]],list("vec",1,"vec",1),exprs);
+ [ok,this.inh,this.nmod,exprs] = scicos_getvalue("Set parameters",[["Inherit (1: no, 0: yes)"],["zero-crossing (0: no, 1: yes)"]],list("vec",1,"vec",1),exprs);
if (!ok) {
break;
}
model.dep_ut = [true,false];
- if (nmod!=0) {
- nmod = 1;
+ if (this.nmod!=0) {
+ this.nmod = 1;
}
- if (inh!=1) {
- inh = [];
+ if (this.inh!=1) {
+ this.inh = [];
}
- [model,graphics,ok] = check_io(model,graphics,1,[],inh,[[1],[1]]);
+ [model,graphics,ok] = check_io(model,graphics,1,[],this.inh,[[1],[1]]);
if (ok) {
graphics.exprs = exprs;
- model.evtin = inh;
+ model.evtin = this.inh;
model.sim[2-1] = -1;
- model.nmode = nmod;
- model.nzcross = nmod;
+ model.nmode = this.nmod;
+ model.nzcross = this.nmod;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Events/IFTHEL_f.pickle b/js/Events/IFTHEL_f.pickle
index 0d1dde24..8dc8965a 100644
--- a/js/Events/IFTHEL_f.pickle
+++ b/js/Events/IFTHEL_f.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'inh'
+p3
+aS'nmod'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Events/MFCLCK_f.js b/js/Events/MFCLCK_f.js
index 517bf43c..4330cafe 100644
--- a/js/Events/MFCLCK_f.js
+++ b/js/Events/MFCLCK_f.js
@@ -1,19 +1,19 @@
/* autogenerated from "macros/Events/MFCLCK_f.sci" */
function MFCLCK_f() {
MFCLCK_f.prototype.define = function MFCLCK_f() {
- nn = 2;
- dt = 0.1;
+ this.nn = 2;
+ this.dt = 0.1;
model = scicos_model();
model.sim = "mfclck";
model.evtin = 1;
model.evtout = [[1],[1]];
model.dstate = 0;
- model.rpar = dt;
- model.ipar = nn;
+ model.rpar = this.dt;
+ model.ipar = this.nn;
model.blocktype = "d";
model.firing = [-1,0];
model.dep_ut = [false,false];
- exprs = [[string(dt)],[string(nn)]];
+ exprs = [[string(this.dt)],[string(this.nn)]];
gr_i = [];
this.x = standard_define([3,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -28,10 +28,10 @@ function MFCLCK_f() {
graphics = arg1.graphics;
exprs = graphics.exprs;
model = arg1.model;
- [ok,dt,nn,exprs] = scicos_getvalue("Set Multifrequency clock parameters",[["basic period (1/f)"],["multiply by (n)"]],list("vec",1,"vec",1),exprs);
+ [ok,this.dt,this.nn,exprs] = scicos_getvalue("Set Multifrequency clock parameters",[["basic period (1/f)"],["multiply by (n)"]],list("vec",1,"vec",1),exprs);
if (ok) {
- model.ipar = nn;
- model.rpar = dt;
+ model.ipar = this.nn;
+ model.rpar = this.dt;
hh = model.firing;
hh[2-1] = 0;
model.firing = hh;
diff --git a/js/Events/MFCLCK_f.pickle b/js/Events/MFCLCK_f.pickle
index 0d1dde24..2d9860f5 100644
--- a/js/Events/MFCLCK_f.pickle
+++ b/js/Events/MFCLCK_f.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'dt'
+p3
+aS'nn'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Events/M_freq.js b/js/Events/M_freq.js
index 9b42b389..b5990283 100644
--- a/js/Events/M_freq.js
+++ b/js/Events/M_freq.js
@@ -26,24 +26,24 @@ function M_freq() {
model = arg1.model;
exprs = graphics.exprs;
while (true) {
- [ok,frequ,offset,exprs] = scicos_getvalue("Set block parameters",[["Sample time"],["Offset"]],list("vec",-1,"vec",-1),exprs);
+ [ok,this.frequ,this.offset,exprs] = scicos_getvalue("Set block parameters",[["Sample time"],["Offset"]],list("vec",-1,"vec",-1),exprs);
if (!ok) {
break;
}
- offset = offset.slice();
- frequ = frequ.slice();
- if ((size(frequ,"*"))!=(size(offset,"*"))) {
+ this.offset = this.offset.slice();
+ this.frequ = this.frequ.slice();
+ if ((size(this.frequ,"*"))!=(size(this.offset,"*"))) {
message("offset and frequency must have the same size");
ok = false;
- } else if (or(frequ<0)) {
+ } else if (or(this.frequ<0)) {
message("Frequency must be a positif number");
ok = false;
- } else if (or(abs(offset)>frequ)) {
+ } else if (or(abs(this.offset)>this.frequ)) {
message("The |Offset| must be less than the Frequency");
ok = false;
}
if (ok) {
- [m,den,off,count,m1,fir,frequ,offset,ok] = mfrequ_clk(frequ,offset);
+ [m,den,off,count,m1,fir,this.frequ,this.offset,ok] = mfrequ_clk(this.frequ,this.offset);
}
if (ok) {
model.opar = list(m,double(den),off,count);
diff --git a/js/Events/M_freq.pickle b/js/Events/M_freq.pickle
index 0bdf24af..7b8e31da 100644
--- a/js/Events/M_freq.pickle
+++ b/js/Events/M_freq.pickle
@@ -4,10 +4,14 @@ p0
((lp1
S'x'
p2
-aS'fr'
+aS'frequ'
p3
aS'of'
p4
-atp5
-Rp6
+aS'fr'
+p5
+aS'offset'
+p6
+atp7
+Rp8
. \ No newline at end of file
diff --git a/js/Events/freq_div.pickle b/js/Events/freq_div.pickle
index 0d1dde24..af4590e3 100644
--- a/js/Events/freq_div.pickle
+++ b/js/Events/freq_div.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'%df'
+p3
+aS'%ph'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Hydraulics/Bache.js b/js/Hydraulics/Bache.js
index 08fa3a32..8f7e596a 100644
--- a/js/Hydraulics/Bache.js
+++ b/js/Hydraulics/Bache.js
@@ -6,16 +6,16 @@ function Bache() {
model = scicos_model();
model.in1 = [-transpose([1:in1])];
model.out = [-transpose([1:out])];
- Patm = 1.013e5;
- A = 1;
- ze1 = 40;
- ze2 = 0;
- zs1 = 40;
- zs2 = 0;
- z0 = 30;
- T0 = 290;
- p_rho = 0;
- model.rpar = [[Patm],[A],[ze1],[ze2],[zs1],[zs2],[z0],[T0],[p_rho]];
+ this.Patm = 1.013e5;
+ this.A = 1;
+ this.ze1 = 40;
+ this.ze2 = 0;
+ this.zs1 = 40;
+ this.zs2 = 0;
+ this.z0 = 30;
+ this.T0 = 290;
+ this.p_rho = 0;
+ model.rpar = [[this.Patm],[this.A],[this.ze1],[this.ze2],[this.zs1],[this.zs2],[this.z0],[this.T0],[this.p_rho]];
model.sim = "Bache";
model.blocktype = "c";
model.dep_ut = [true,false];
@@ -23,11 +23,11 @@ function Bache() {
mo.model = "Bache";
mo.inputs = ["Ce1","Ce2"];
mo.outputs = ["Cs1","Cs2","yNiveau"];
- mo.parameters = list([["Patm"],["A"],["ze1"],["ze2"],["zs1"],["zs2"],["z0"],["T0"],["p_rho"]],[[Patm],[A],[ze1],[ze2],[zs1],[zs2],[z0],[T0],[p_rho]]);
+ mo.parameters = list([["Patm"],["A"],["ze1"],["ze2"],["zs1"],["zs2"],["z0"],["T0"],["p_rho"]],[[this.Patm],[this.A],[this.ze1],[this.ze2],[this.zs1],[this.zs2],[this.z0],[this.T0],[this.p_rho]]);
model.equations = mo;
model.in1 = ones(size(mo.inputs,"*"),1);
model.out = ones(size(mo.outputs,"*"),1);
- exprs = [[string(Patm)],[string(A)],[string(ze1)],[string(ze2)],[string(zs1)],[string(zs2)],[string(z0)],[string(T0)],[string(p_rho)]];
+ exprs = [[string(this.Patm)],[string(this.A)],[string(this.ze1)],[string(this.ze2)],[string(this.zs1)],[string(this.zs2)],[string(this.z0)],[string(this.T0)],[string(this.p_rho)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = [["I"],["I"]];
@@ -45,12 +45,12 @@ function Bache() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,Patm,A,ze1,ze2,zs1,zs2,z0,T0,p_rho,exprs] = scicos_getvalue("Parametres de la bache",[["Pression dans le ciel de la bache : Patm (Pa)"],["Section de la bache : A (m2)"],["Altitude du piquage d entrée 1: ze1 (m)"],["Altitude du piquage d entrée 2: ze2 (m)"],["Altitude du piquage de sortie 1: zs1 (m)"],["Altitude du piquage de sortie 2: zs2 (m)"],["Altitude initiale du fluide : z0 (m)"],["Température initiale du fluide : T0 (K)"],["Si >0, masse volumique imposée du fluide : p_rho (kg/m3)"]],list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1),exprs);
+ [ok,this.Patm,this.A,this.ze1,this.ze2,this.zs1,this.zs2,this.z0,this.T0,this.p_rho,exprs] = scicos_getvalue("Parametres de la bache",[["Pression dans le ciel de la bache : Patm (Pa)"],["Section de la bache : A (m2)"],["Altitude du piquage d entrée 1: ze1 (m)"],["Altitude du piquage d entrée 2: ze2 (m)"],["Altitude du piquage de sortie 1: zs1 (m)"],["Altitude du piquage de sortie 2: zs2 (m)"],["Altitude initiale du fluide : z0 (m)"],["Température initiale du fluide : T0 (K)"],["Si >0, masse volumique imposée du fluide : p_rho (kg/m3)"]],list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1),exprs);
if (!ok) {
break;
}
- model.rpar = [[Patm],[A],[ze1],[ze2],[zs1],[zs2],[z0],[T0],[p_rho]];
- model.equations.parameters[2-1] = list(Patm,A,ze1,ze2,zs1,zs2,z0,T0,p_rho);
+ model.rpar = [[this.Patm],[this.A],[this.ze1],[this.ze2],[this.zs1],[this.zs2],[this.z0],[this.T0],[this.p_rho]];
+ model.equations.parameters[2-1] = list(this.Patm,this.A,this.ze1,this.ze2,this.zs1,this.zs2,this.z0,this.T0,this.p_rho);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Hydraulics/Bache.pickle b/js/Hydraulics/Bache.pickle
index 0d1dde24..b16a6531 100644
--- a/js/Hydraulics/Bache.pickle
+++ b/js/Hydraulics/Bache.pickle
@@ -2,8 +2,26 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'A'
p2
-atp3
-Rp4
+aS'zs1'
+p3
+aS'zs2'
+p4
+aS'z0'
+p5
+aS'T0'
+p6
+aS'ze2'
+p7
+aS'ze1'
+p8
+aS'p_rho'
+p9
+aS'x'
+p10
+aS'Patm'
+p11
+atp12
+Rp13
. \ No newline at end of file
diff --git a/js/Hydraulics/Flowmeter.js b/js/Hydraulics/Flowmeter.js
index dbe576ae..ec1f7bd2 100644
--- a/js/Hydraulics/Flowmeter.js
+++ b/js/Hydraulics/Flowmeter.js
@@ -62,11 +62,11 @@ function Flowmeter() {
this.x = arg1;
exprs = this.x.graphics.exprs;
while (false) {
- [ok,Qini,exprs] = scicos_getvalue([["Set Flowmeter block parameters:"],[""],["Qini: "]],"Qini",list("vec",1),exprs);
+ [ok,this.Qini,exprs] = scicos_getvalue([["Set Flowmeter block parameters:"],[""],["Qini: "]],"Qini",list("vec",1),exprs);
if (!ok) {
break;
}
- this.x.model.equations.parameters[2-1] = list(Qini);
+ this.x.model.equations.parameters[2-1] = list(this.Qini);
this.x.graphics.exprs = exprs;
break;
}
diff --git a/js/Hydraulics/Flowmeter.pickle b/js/Hydraulics/Flowmeter.pickle
index 0d1dde24..cecb7abc 100644
--- a/js/Hydraulics/Flowmeter.pickle
+++ b/js/Hydraulics/Flowmeter.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'Qini'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Hydraulics/PerteDP.js b/js/Hydraulics/PerteDP.js
index 63244eac..c7238aaf 100644
--- a/js/Hydraulics/PerteDP.js
+++ b/js/Hydraulics/PerteDP.js
@@ -4,13 +4,13 @@ function PerteDP() {
model = scicos_model();
model.in1 = [1];
model.out = [1];
- L = 10;
- D = 0.2;
- lambda = 0.03;
- z1 = 0;
- z2 = 0;
- p_rho = 0;
- model.rpar = [[L],[D],[lambda],[z1],[z2],[p_rho]];
+ this.L = 10;
+ this.D = 0.2;
+ this.lambda = 0.03;
+ this.z1 = 0;
+ this.z2 = 0;
+ this.p_rho = 0;
+ model.rpar = [[this.L],[this.D],[this.lambda],[this.z1],[this.z2],[this.p_rho]];
model.sim = "PerteDP";
model.blocktype = "c";
model.dep_ut = [true,false];
@@ -18,11 +18,11 @@ function PerteDP() {
mo.model = "PerteDP";
mo.inputs = "C1";
mo.outputs = "C2";
- mo.parameters = list([["L"],["D"],["lambda"],["z1"],["z2"],["p_rho"]],[[L],[D],[lambda],[z1],[z2],[p_rho]]);
+ mo.parameters = list([["L"],["D"],["lambda"],["z1"],["z2"],["p_rho"]],[[this.L],[this.D],[this.lambda],[this.z1],[this.z2],[this.p_rho]]);
model.equations = mo;
model.in1 = ones(size(mo.inputs,"*"),1);
model.out = ones(size(mo.outputs,"*"),1);
- exprs = [[string(L)],[string(D)],[string(lambda)],[string(z1)],[string(z2)],[string(p_rho)]];
+ exprs = [[string(this.L)],[string(this.D)],[string(this.lambda)],[string(this.z1)],[string(this.z2)],[string(this.p_rho)]];
gr_i = [];
this.x = standard_define([2,1],model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
@@ -40,12 +40,12 @@ function PerteDP() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,L,D,lambda,z1,z2,p_rho,exprs] = scicos_getvalue("Parametres du tuyau",[["Longueur du tube : L (m)"],["Diamètre interne du tube : D (m)"],["Coefficient de perte de charge-frottement(S.U) : lambda"],["Altitude entrée tuyauterie : z1 (m)"],["Altitude sortie tuyauterie : z2 (m)"],["Si >0, masse volumique imposée fu fluide : p_rho (kg/m3)"]],list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1),exprs);
+ [ok,this.L,this.D,this.lambda,this.z1,this.z2,this.p_rho,exprs] = scicos_getvalue("Parametres du tuyau",[["Longueur du tube : L (m)"],["Diamètre interne du tube : D (m)"],["Coefficient de perte de charge-frottement(S.U) : lambda"],["Altitude entrée tuyauterie : z1 (m)"],["Altitude sortie tuyauterie : z2 (m)"],["Si >0, masse volumique imposée fu fluide : p_rho (kg/m3)"]],list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1),exprs);
if (!ok) {
break;
}
- model.rpar = [[L],[D],[lambda],[z1],[z2],[p_rho]];
- model.equations.parameters[2-1] = list(L,D,lambda,z1,z2,p_rho);
+ model.rpar = [[this.L],[this.D],[this.lambda],[this.z1],[this.z2],[this.p_rho]];
+ model.equations.parameters[2-1] = list(this.L,this.D,this.lambda,this.z1,this.z2,this.p_rho);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Hydraulics/PerteDP.pickle b/js/Hydraulics/PerteDP.pickle
index 0d1dde24..ed68bd4b 100644
--- a/js/Hydraulics/PerteDP.pickle
+++ b/js/Hydraulics/PerteDP.pickle
@@ -2,8 +2,20 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'D'
p2
-atp3
-Rp4
+aS'L'
+p3
+aS'p_rho'
+p4
+aS'x'
+p5
+aS'z1'
+p6
+aS'z2'
+p7
+aS'lambda'
+p8
+atp9
+Rp10
. \ No newline at end of file
diff --git a/js/Hydraulics/PuitsP.js b/js/Hydraulics/PuitsP.js
index 5d71f566..ef66a542 100644
--- a/js/Hydraulics/PuitsP.js
+++ b/js/Hydraulics/PuitsP.js
@@ -2,21 +2,21 @@
function PuitsP() {
PuitsP.prototype.define = function PuitsP() {
model = scicos_model();
- P0 = 100000;
- T0 = 290;
- H0 = 100000;
- option_temperature = 1;
- model.rpar = [[P0],[T0],[H0],[option_temperature]];
+ this.P0 = 100000;
+ this.T0 = 290;
+ this.H0 = 100000;
+ this.option_temperature = 1;
+ model.rpar = [[this.P0],[this.T0],[this.H0],[this.option_temperature]];
model.sim = "Puits";
model.blocktype = "c";
model.dep_ut = [true,false];
mo = modelica();
mo.model = "Puits";
mo.inputs = ["C"];
- mo.parameters = list([["P0"],["T0"],["H0"],["option_temperature"]],[[P0],[T0],[H0],[option_temperature]]);
+ mo.parameters = list([["P0"],["T0"],["H0"],["option_temperature"]],[[this.P0],[this.T0],[this.H0],[this.option_temperature]]);
model.equations = mo;
model.in1 = ones(size(mo.inputs,"*"),1);
- exprs = [[string(P0)],[string(T0)],[string(H0)],[string(option_temperature)]];
+ exprs = [[string(this.P0)],[string(this.T0)],[string(this.H0)],[string(this.option_temperature)]];
gr_i = [];
this.x = standard_define([2.5,2],model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
@@ -33,12 +33,12 @@ function PuitsP() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,P0,T0,H0,option_temperature,exprs] = scicos_getvalue("Paramètres du puits",[["Pression de la source : P0 (Pa)"],["Temperature de la source : T0 (K)"],["Enthalpie spécifique de la source : H0 (J/kg)"],["1:température fixée - 2:enthalpie fixée : option_temperature"]],list("vec",-1,"vec",-1,"vec",-1,"vec",-1),exprs);
+ [ok,this.P0,this.T0,this.H0,this.option_temperature,exprs] = scicos_getvalue("Paramètres du puits",[["Pression de la source : P0 (Pa)"],["Temperature de la source : T0 (K)"],["Enthalpie spécifique de la source : H0 (J/kg)"],["1:température fixée - 2:enthalpie fixée : option_temperature"]],list("vec",-1,"vec",-1,"vec",-1,"vec",-1),exprs);
if (!ok) {
break;
}
- model.rpar = [[P0],[T0],[H0],[option_temperature]];
- model.equations.parameters[2-1] = list(P0,T0,H0,option_temperature);
+ model.rpar = [[this.P0],[this.T0],[this.H0],[this.option_temperature]];
+ model.equations.parameters[2-1] = list(this.P0,this.T0,this.H0,this.option_temperature);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Hydraulics/PuitsP.pickle b/js/Hydraulics/PuitsP.pickle
index 0d1dde24..89f3ca0c 100644
--- a/js/Hydraulics/PuitsP.pickle
+++ b/js/Hydraulics/PuitsP.pickle
@@ -4,6 +4,14 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'P0'
+p3
+aS'option_temperature'
+p4
+aS'H0'
+p5
+aS'T0'
+p6
+atp7
+Rp8
. \ No newline at end of file
diff --git a/js/Hydraulics/SourceP.js b/js/Hydraulics/SourceP.js
index 29e06507..31c0e886 100644
--- a/js/Hydraulics/SourceP.js
+++ b/js/Hydraulics/SourceP.js
@@ -2,11 +2,11 @@
function SourceP() {
SourceP.prototype.define = function SourceP() {
model = scicos_model();
- P0 = 300000;
- T0 = 290;
- H0 = 100000;
- option_temperature = 1;
- model.rpar = [[P0],[T0],[H0],[option_temperature]];
+ this.P0 = 300000;
+ this.T0 = 290;
+ this.H0 = 100000;
+ this.option_temperature = 1;
+ model.rpar = [[this.P0],[this.T0],[this.H0],[this.option_temperature]];
model.sim = "Source";
model.blocktype = "c";
model.dep_ut = [true,false];
@@ -14,11 +14,11 @@ function SourceP() {
mo.model = "Source";
mo.inputs = [];
mo.outputs = ["C"];
- mo.parameters = list([["P0"],["T0"],["H0"],["option_temperature"]],[[P0],[T0],[H0],[option_temperature]]);
+ mo.parameters = list([["P0"],["T0"],["H0"],["option_temperature"]],[[this.P0],[this.T0],[this.H0],[this.option_temperature]]);
model.equations = mo;
model.in1 = ones(size(mo.inputs,"*"),1);
model.out = ones(size(mo.outputs,"*"),1);
- exprs = [[string(P0)],[string(T0)],[string(H0)],[string(option_temperature)]];
+ exprs = [[string(this.P0)],[string(this.T0)],[string(this.H0)],[string(this.option_temperature)]];
gr_i = [];
this.x = standard_define([2.5,2],model,exprs,list(gr_i,0));
this.x.graphics.out_implicit = ["I"];
@@ -35,12 +35,12 @@ function SourceP() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,P0,T0,H0,option_temperature,exprs] = scicos_getvalue("Paramètres du puits",[["Pression de la source : P0 (Pa)"],["Temperature de la source : T0 (K)"],["Enthalpie spécifique de la source : H0 (J/kg)"],["1:température fixée - 2:enthalpie fixée : option_temperature"]],list("vec",-1,"vec",-1,"vec",-1,"vec",-1),exprs);
+ [ok,this.P0,this.T0,this.H0,this.option_temperature,exprs] = scicos_getvalue("Paramètres du puits",[["Pression de la source : P0 (Pa)"],["Temperature de la source : T0 (K)"],["Enthalpie spécifique de la source : H0 (J/kg)"],["1:température fixée - 2:enthalpie fixée : option_temperature"]],list("vec",-1,"vec",-1,"vec",-1,"vec",-1),exprs);
if (!ok) {
break;
}
- model.rpar = [[P0],[T0],[H0],[option_temperature]];
- model.equations.parameters[2-1] = list(P0,T0,H0,option_temperature);
+ model.rpar = [[this.P0],[this.T0],[this.H0],[this.option_temperature]];
+ model.equations.parameters[2-1] = list(this.P0,this.T0,this.H0,this.option_temperature);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Hydraulics/SourceP.pickle b/js/Hydraulics/SourceP.pickle
index 0d1dde24..89f3ca0c 100644
--- a/js/Hydraulics/SourceP.pickle
+++ b/js/Hydraulics/SourceP.pickle
@@ -4,6 +4,14 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'P0'
+p3
+aS'option_temperature'
+p4
+aS'H0'
+p5
+aS'T0'
+p6
+atp7
+Rp8
. \ No newline at end of file
diff --git a/js/Hydraulics/VanneReglante.js b/js/Hydraulics/VanneReglante.js
index 6a2b11d3..cef2b23d 100644
--- a/js/Hydraulics/VanneReglante.js
+++ b/js/Hydraulics/VanneReglante.js
@@ -4,9 +4,9 @@ function VanneReglante() {
model = scicos_model();
model.in1 = [[1],[1]];
model.out = [1];
- Cvmax = 8005.42;
- p_rho = 0;
- model.rpar = [[Cvmax],[p_rho]];
+ this.Cvmax = 8005.42;
+ this.p_rho = 0;
+ model.rpar = [[this.Cvmax],[this.p_rho]];
model.sim = "VanneReglante";
model.blocktype = "c";
model.dep_ut = [true,false];
@@ -14,11 +14,11 @@ function VanneReglante() {
mo.model = "VanneReglante";
mo.inputs = ["C1","Ouv"];
mo.outputs = "C2";
- mo.parameters = list([["Cvmax"],["p_rho"]],[[Cvmax],[p_rho]]);
+ mo.parameters = list([["Cvmax"],["p_rho"]],[[this.Cvmax],[this.p_rho]]);
model.equations = mo;
model.in1 = ones(size(mo.inputs,"*"),1);
model.out = ones(size(mo.outputs,"*"),1);
- exprs = [[string(Cvmax)],[string(p_rho)]];
+ exprs = [[string(this.Cvmax)],[string(this.p_rho)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = [["I"],["E"]];
@@ -36,12 +36,12 @@ function VanneReglante() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,Cvmax,p_rho,exprs] = scicos_getvalue("Paramètres de la vanne reglante",[["Cvmax"],["p_rho"]],list("vec",-1,"vec",-1),exprs);
+ [ok,this.Cvmax,this.p_rho,exprs] = scicos_getvalue("Paramètres de la vanne reglante",[["Cvmax"],["p_rho"]],list("vec",-1,"vec",-1),exprs);
if (!ok) {
break;
}
- model.rpar = [[Cvmax],[p_rho]];
- model.equations.parameters[2-1] = list(Cvmax,p_rho);
+ model.rpar = [[this.Cvmax],[this.p_rho]];
+ model.equations.parameters[2-1] = list(this.Cvmax,this.p_rho);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Hydraulics/VanneReglante.pickle b/js/Hydraulics/VanneReglante.pickle
index 0d1dde24..945c34b4 100644
--- a/js/Hydraulics/VanneReglante.pickle
+++ b/js/Hydraulics/VanneReglante.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'p_rho'
+p3
+aS'Cvmax'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/IntegerOp/BITCLEAR.js b/js/IntegerOp/BITCLEAR.js
index 4cb78029..df27bd42 100644
--- a/js/IntegerOp/BITCLEAR.js
+++ b/js/IntegerOp/BITCLEAR.js
@@ -28,51 +28,51 @@ function BITCLEAR() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,Datatype,bit,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"BITCLEAR")],[" "],[gettext("Clear a bit")],[" "]],[[msprintf(gettext("Data Type %s"),"(3:int32, 4:int16, 5:int8, ...)")],[gettext("Index of Bit (0 is least significant)")]],list("vec",1,"vec",1),exprs);
+ [ok,this.Datatype,this.bit,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"BITCLEAR")],[" "],[gettext("Clear a bit")],[" "]],[[msprintf(gettext("Data Type %s"),"(3:int32, 4:int16, 5:int8, ...)")],[gettext("Index of Bit (0 is least significant)")]],list("vec",1,"vec",1),exprs);
if (!ok) {
break;
}
in1 = [model.in1,model.in2];
- if (floor(bit)!=bit) {
- block_parameter_error(msprintf(gettext("Wrong type for \'%s\' parameter: %5.1f."),gettext("Index of Bit"),bit),gettext("Must be integer."));
+ if (floor(this.bit)!=this.bit) {
+ block_parameter_error(msprintf(gettext("Wrong type for \'%s\' parameter: %5.1f."),gettext("Index of Bit"),this.bit),gettext("Must be integer."));
ok = false;
- } else if ((Datatype==3)||(Datatype==6)) {
- if (bit>31||bit<0) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Index of Bit"),bit),msprintf(gettext("Must be in the interval %s."),"[0, 31]"));
+ } else if ((this.Datatype==3)||(this.Datatype==6)) {
+ if (this.bit>31||this.bit<0) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Index of Bit"),this.bit),msprintf(gettext("Must be in the interval %s."),"[0, 31]"));
ok = false;
} else {
- bit = uint32(bit);
- n = (2^32-1)-2^bit;
+ this.bit = uint32(this.bit);
+ n = (2^32-1)-2^this.bit;
n = uint32(n);
model.sim = list("bit_clear_32",4);
}
- } else if ((Datatype==4)||(Datatype==7)) {
- if (bit>15||bit<0) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Index of Bit"),bit),msprintf(gettext("Must be in the interval %s."),"[0, 15]"));
+ } else if ((this.Datatype==4)||(this.Datatype==7)) {
+ if (this.bit>15||this.bit<0) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Index of Bit"),this.bit),msprintf(gettext("Must be in the interval %s."),"[0, 15]"));
ok = false;
} else {
- bit = uint16(bit);
- n = (2^16-1)-2^bit;
+ this.bit = uint16(this.bit);
+ n = (2^16-1)-2^this.bit;
n = uint16(n);
model.sim = list("bit_clear_16",4);
}
- } else if ((Datatype==5)||(Datatype==8)) {
- if (bit>7||bit<0) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Index of Bit"),bit),msprintf(gettext("Must be in the interval %s."),"[0, 7]"));
+ } else if ((this.Datatype==5)||(this.Datatype==8)) {
+ if (this.bit>7||this.bit<0) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Index of Bit"),this.bit),msprintf(gettext("Must be in the interval %s."),"[0, 7]"));
ok = false;
} else {
- bit = uint8(bit);
- n = (2^8-1)-2^bit;
+ this.bit = uint8(this.bit);
+ n = (2^8-1)-2^this.bit;
n = uint8(n);
model.sim = list("bit_clear_8",4);
}
} else {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Data Type"),Datatype),msprintf(gettext("Must be in the interval %s."),"[3, 8]"));
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Data Type"),this.Datatype),msprintf(gettext("Must be in the interval %s."),"[3, 8]"));
ok = false;
}
if (ok) {
- it = Datatype;
- ot = Datatype;
+ it = this.Datatype;
+ ot = this.Datatype;
out = [1,1];
[model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),[],[]);
}
diff --git a/js/IntegerOp/BITCLEAR.pickle b/js/IntegerOp/BITCLEAR.pickle
index 0d1dde24..37de0b23 100644
--- a/js/IntegerOp/BITCLEAR.pickle
+++ b/js/IntegerOp/BITCLEAR.pickle
@@ -2,8 +2,12 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'Datatype'
p2
-atp3
-Rp4
+aS'x'
+p3
+aS'bit'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/IntegerOp/BITSET.js b/js/IntegerOp/BITSET.js
index 21e6d076..51786a6b 100644
--- a/js/IntegerOp/BITSET.js
+++ b/js/IntegerOp/BITSET.js
@@ -28,49 +28,49 @@ function BITSET() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,Datatype,bit,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"BITSET")],[" "],[gettext("Set a bit")],[" "]],[[msprintf(gettext("Data Type %s"),"(3:int32, 4:int16, 5:int8, ...)")],[gettext("Index of Bit (0 is least significant)")]],list("vec",1,"vec",1),exprs);
+ [ok,this.Datatype,this.bit,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"BITSET")],[" "],[gettext("Set a bit")],[" "]],[[msprintf(gettext("Data Type %s"),"(3:int32, 4:int16, 5:int8, ...)")],[gettext("Index of Bit (0 is least significant)")]],list("vec",1,"vec",1),exprs);
if (!ok) {
break;
}
in1 = [model.in1,model.in2];
- if (floor(bit)!=bit) {
- block_parameter_error(msprintf(gettext("Wrong type for \'%s\' parameter: %5.1f."),gettext("Index of Bit"),bit),gettext("Must be integer."));
+ if (floor(this.bit)!=this.bit) {
+ block_parameter_error(msprintf(gettext("Wrong type for \'%s\' parameter: %5.1f."),gettext("Index of Bit"),this.bit),gettext("Must be integer."));
ok = false;
}
- if ((Datatype==3)||(Datatype==6)) {
- if (bit>31||bit<0) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Index of Bit"),bit),msprintf(gettext("Must be in the interval %s."),"[0, 31]"));
+ if ((this.Datatype==3)||(this.Datatype==6)) {
+ if (this.bit>31||this.bit<0) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Index of Bit"),this.bit),msprintf(gettext("Must be in the interval %s."),"[0, 31]"));
ok = false;
}
- bit = uint32(bit);
- n = 2^bit;
+ this.bit = uint32(this.bit);
+ n = 2^this.bit;
n = uint32(n);
model.sim = list("bit_set_32",4);
- } else if ((Datatype==4)||(Datatype==7)) {
- if (bit>15||bit<0) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Index of Bit"),bit),msprintf(gettext("Must be in the interval %s."),"[0, 15]"));
+ } else if ((this.Datatype==4)||(this.Datatype==7)) {
+ if (this.bit>15||this.bit<0) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Index of Bit"),this.bit),msprintf(gettext("Must be in the interval %s."),"[0, 15]"));
ok = false;
}
- bit = uint16(bit);
- n = 2^bit;
+ this.bit = uint16(this.bit);
+ n = 2^this.bit;
n = uint16(n);
model.sim = list("bit_set_16",4);
- } else if ((Datatype==5)||(Datatype==8)) {
- if (bit>7||bit<0) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Index of Bit"),bit),msprintf(gettext("Must be in the interval %s."),"[0, 7]"));
+ } else if ((this.Datatype==5)||(this.Datatype==8)) {
+ if (this.bit>7||this.bit<0) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Index of Bit"),this.bit),msprintf(gettext("Must be in the interval %s."),"[0, 7]"));
ok = false;
}
- bit = uint8(bit);
- n = 2^bit;
+ this.bit = uint8(this.bit);
+ n = 2^this.bit;
n = uint8(n);
model.sim = list("bit_set_8",4);
} else {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Data Type"),Datatype),msprintf(gettext("Must be in the interval %s."),"[3, 8]"));
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Data Type"),this.Datatype),msprintf(gettext("Must be in the interval %s."),"[3, 8]"));
ok = false;
}
if (ok) {
- it = Datatype;
- ot = Datatype;
+ it = this.Datatype;
+ ot = this.Datatype;
out = [1,1];
[model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),[],[]);
}
diff --git a/js/IntegerOp/BITSET.pickle b/js/IntegerOp/BITSET.pickle
index 0d1dde24..37de0b23 100644
--- a/js/IntegerOp/BITSET.pickle
+++ b/js/IntegerOp/BITSET.pickle
@@ -2,8 +2,12 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'Datatype'
p2
-atp3
-Rp4
+aS'x'
+p3
+aS'bit'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/IntegerOp/CONVERT.js b/js/IntegerOp/CONVERT.js
index cf2d120b..721337bb 100644
--- a/js/IntegerOp/CONVERT.js
+++ b/js/IntegerOp/CONVERT.js
@@ -30,327 +30,327 @@ function CONVERT() {
model = arg1.model;
exprs = graphics.exprs;
while (true) {
- [ok,it,ot,np,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"CONVERT")],[" "],[gettext("Type conversion")],[" "]],[[gettext("Input Type (1:double, 3:int32, 4:int16, 5:int8, ...)")],[gettext("Output Type (1:double, 3:int32, 4:int16, 5:int8, ...)")],[gettext("Do on Overflow (0:Nothing, 1:Saturate, 2:Error)")]],list("vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.it,this.ot,this.np,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"CONVERT")],[" "],[gettext("Type conversion")],[" "]],[[gettext("Input Type (1:double, 3:int32, 4:int16, 5:int8, ...)")],[gettext("Output Type (1:double, 3:int32, 4:int16, 5:int8, ...)")],[gettext("Do on Overflow (0:Nothing, 1:Saturate, 2:Error)")]],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- if (it==2) {
- it = 1;
+ if (this.it==2) {
+ this.it = 1;
}
- if (ot==2) {
- ot = 1;
+ if (this.ot==2) {
+ this.ot = 1;
}
- if ((np!=0&&np!=1&&np!=2)) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Do on Overflow"),np),msprintf(gettext("Must be in the interval %s."),"[0, 2]"));
+ if ((this.np!=0&&this.np!=1&&this.np!=2)) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Do on Overflow"),this.np),msprintf(gettext("Must be in the interval %s."),"[0, 2]"));
ok = false;
- } else if ((it>8||it<1)) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Input Type"),it),msprintf(gettext("Must be in the interval %s."),"[1, 8]"));
+ } else if ((this.it>8||this.it<1)) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Input Type"),this.it),msprintf(gettext("Must be in the interval %s."),"[1, 8]"));
ok = false;
- } else if ((ot>8||ot<1)) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Output Type"),ot),msprintf(gettext("Must be in the interval %s."),"[1, 8]"));
+ } else if ((this.ot>8||this.ot<1)) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Output Type"),this.ot),msprintf(gettext("Must be in the interval %s."),"[1, 8]"));
ok = false;
}
model.sim = list("convert",4);
- if ((it==ot)) {
+ if ((this.it==this.ot)) {
model.ipar = 1;
} else {
- if ((np==0)) {
- if ((it==1)) {
- if ((ot==3)) {
+ if ((this.np==0)) {
+ if ((this.it==1)) {
+ if ((this.ot==3)) {
model.ipar = 2;
- } else if ((ot==4)) {
+ } else if ((this.ot==4)) {
model.ipar = 3;
- } else if ((ot==5)) {
+ } else if ((this.ot==5)) {
model.ipar = 4;
- } else if ((ot==6)) {
+ } else if ((this.ot==6)) {
model.ipar = 5;
- } else if ((ot==7)) {
+ } else if ((this.ot==7)) {
model.ipar = 6;
- } else if ((ot==8)) {
+ } else if ((this.ot==8)) {
model.ipar = 7;
}
- } else if ((it==3)) {
- if ((ot==1)) {
+ } else if ((this.it==3)) {
+ if ((this.ot==1)) {
model.ipar = 8;
- } else if ((ot==4)) {
+ } else if ((this.ot==4)) {
model.ipar = 9;
- } else if ((ot==5)) {
+ } else if ((this.ot==5)) {
model.ipar = 10;
- } else if ((ot==6)) {
+ } else if ((this.ot==6)) {
model.ipar = 1;
- } else if ((ot==7)) {
+ } else if ((this.ot==7)) {
model.ipar = 11;
- } else if ((ot==8)) {
+ } else if ((this.ot==8)) {
model.ipar = 12;
}
- } else if ((it==4)) {
- if ((ot==1)) {
+ } else if ((this.it==4)) {
+ if ((this.ot==1)) {
model.ipar = 13;
- } else if ((ot==3)) {
+ } else if ((this.ot==3)) {
model.ipar = 14;
- } else if ((ot==5)) {
+ } else if ((this.ot==5)) {
model.ipar = 15;
- } else if ((ot==6)) {
+ } else if ((this.ot==6)) {
model.ipar = 16;
- } else if ((ot==7)) {
+ } else if ((this.ot==7)) {
model.ipar = 1;
- } else if ((ot==8)) {
+ } else if ((this.ot==8)) {
model.ipar = 17;
}
- } else if ((it==5)) {
- if ((ot==1)) {
+ } else if ((this.it==5)) {
+ if ((this.ot==1)) {
model.ipar = 18;
- } else if ((ot==3)) {
+ } else if ((this.ot==3)) {
model.ipar = 19;
- } else if ((ot==4)) {
+ } else if ((this.ot==4)) {
model.ipar = 20;
- } else if ((ot==6)) {
+ } else if ((this.ot==6)) {
model.ipar = 21;
- } else if ((ot==7)) {
+ } else if ((this.ot==7)) {
model.ipar = 22;
- } else if ((ot==8)) {
+ } else if ((this.ot==8)) {
model.ipar = 1;
}
- } else if ((it==6)) {
- if ((ot==1)) {
+ } else if ((this.it==6)) {
+ if ((this.ot==1)) {
model.ipar = 23;
- } else if ((ot==3)) {
+ } else if ((this.ot==3)) {
model.ipar = 1;
- } else if ((ot==4)) {
+ } else if ((this.ot==4)) {
model.ipar = 24;
- } else if ((ot==5)) {
+ } else if ((this.ot==5)) {
model.ipar = 25;
- } else if ((ot==7)) {
+ } else if ((this.ot==7)) {
model.ipar = 26;
- } else if ((ot==8)) {
+ } else if ((this.ot==8)) {
model.ipar = 27;
}
- } else if ((it==7)) {
- if ((ot==1)) {
+ } else if ((this.it==7)) {
+ if ((this.ot==1)) {
model.ipar = 28;
- } else if ((ot==3)) {
+ } else if ((this.ot==3)) {
model.ipar = 29;
- } else if ((ot==4)) {
+ } else if ((this.ot==4)) {
model.ipar = 1;
- } else if ((ot==5)) {
+ } else if ((this.ot==5)) {
model.ipar = 30;
- } else if ((ot==6)) {
+ } else if ((this.ot==6)) {
model.ipar = 31;
- } else if ((ot==8)) {
+ } else if ((this.ot==8)) {
model.ipar = 32;
}
- } else if ((it==8)) {
- if ((ot==1)) {
+ } else if ((this.it==8)) {
+ if ((this.ot==1)) {
model.ipar = 33;
- } else if ((ot==3)) {
+ } else if ((this.ot==3)) {
model.ipar = 34;
- } else if ((ot==4)) {
+ } else if ((this.ot==4)) {
model.ipar = 35;
- } else if ((ot==5)) {
+ } else if ((this.ot==5)) {
model.ipar = 1;
- } else if ((ot==6)) {
+ } else if ((this.ot==6)) {
model.ipar = 36;
- } else if ((ot==7)) {
+ } else if ((this.ot==7)) {
model.ipar = 37;
}
}
- } else if ((np==1)) {
- if ((it==1)) {
- if ((ot==3)) {
+ } else if ((this.np==1)) {
+ if ((this.it==1)) {
+ if ((this.ot==3)) {
model.ipar = 38;
- } else if ((ot==4)) {
+ } else if ((this.ot==4)) {
model.ipar = 39;
- } else if ((ot==5)) {
+ } else if ((this.ot==5)) {
model.ipar = 40;
- } else if ((ot==6)) {
+ } else if ((this.ot==6)) {
model.ipar = 41;
- } else if ((ot==7)) {
+ } else if ((this.ot==7)) {
model.ipar = 42;
- } else if ((ot==8)) {
+ } else if ((this.ot==8)) {
model.ipar = 43;
}
- } else if ((it==3)) {
- if ((ot==1)) {
+ } else if ((this.it==3)) {
+ if ((this.ot==1)) {
model.ipar = 8;
- } else if ((ot==4)) {
+ } else if ((this.ot==4)) {
model.ipar = 44;
- } else if ((ot==5)) {
+ } else if ((this.ot==5)) {
model.ipar = 45;
- } else if ((ot==6)) {
+ } else if ((this.ot==6)) {
model.ipar = 46;
- } else if ((ot==7)) {
+ } else if ((this.ot==7)) {
model.ipar = 47;
- } else if ((ot==8)) {
+ } else if ((this.ot==8)) {
model.ipar = 48;
}
- } else if ((it==4)) {
- if ((ot==1)) {
+ } else if ((this.it==4)) {
+ if ((this.ot==1)) {
model.ipar = 13;
- } else if ((ot==3)) {
+ } else if ((this.ot==3)) {
model.ipar = 14;
- } else if ((ot==5)) {
+ } else if ((this.ot==5)) {
model.ipar = 49;
- } else if ((ot==6)) {
+ } else if ((this.ot==6)) {
model.ipar = 50;
- } else if ((ot==7)) {
+ } else if ((this.ot==7)) {
model.ipar = 51;
- } else if ((ot==8)) {
+ } else if ((this.ot==8)) {
model.ipar = 52;
}
- } else if ((it==5)) {
- if ((ot==1)) {
+ } else if ((this.it==5)) {
+ if ((this.ot==1)) {
model.ipar = 18;
- } else if ((ot==3)) {
+ } else if ((this.ot==3)) {
model.ipar = 19;
- } else if ((ot==4)) {
+ } else if ((this.ot==4)) {
model.ipar = 20;
- } else if ((ot==6)) {
+ } else if ((this.ot==6)) {
model.ipar = 53;
- } else if ((ot==7)) {
+ } else if ((this.ot==7)) {
model.ipar = 54;
- } else if ((ot==8)) {
+ } else if ((this.ot==8)) {
model.ipar = 55;
}
- } else if ((it==6)) {
- if ((ot==1)) {
+ } else if ((this.it==6)) {
+ if ((this.ot==1)) {
model.ipar = 23;
- } else if ((ot==3)) {
+ } else if ((this.ot==3)) {
model.ipar = 56;
- } else if ((ot==4)) {
+ } else if ((this.ot==4)) {
model.ipar = 57;
- } else if ((ot==5)) {
+ } else if ((this.ot==5)) {
model.ipar = 58;
- } else if ((ot==7)) {
+ } else if ((this.ot==7)) {
model.ipar = 59;
- } else if ((ot==8)) {
+ } else if ((this.ot==8)) {
model.ipar = 60;
}
- } else if ((it==7)) {
- if ((ot==1)) {
+ } else if ((this.it==7)) {
+ if ((this.ot==1)) {
model.ipar = 28;
- } else if ((ot==3)) {
+ } else if ((this.ot==3)) {
model.ipar = 29;
- } else if ((ot==4)) {
+ } else if ((this.ot==4)) {
model.ipar = 61;
- } else if ((ot==5)) {
+ } else if ((this.ot==5)) {
model.ipar = 62;
- } else if ((ot==6)) {
+ } else if ((this.ot==6)) {
model.ipar = 31;
- } else if ((ot==8)) {
+ } else if ((this.ot==8)) {
model.ipar = 63;
}
- } else if ((it==8)) {
- if ((ot==1)) {
+ } else if ((this.it==8)) {
+ if ((this.ot==1)) {
model.ipar = 33;
- } else if ((ot==3)) {
+ } else if ((this.ot==3)) {
model.ipar = 34;
- } else if ((ot==4)) {
+ } else if ((this.ot==4)) {
model.ipar = 35;
- } else if ((ot==5)) {
+ } else if ((this.ot==5)) {
model.ipar = 64;
- } else if ((ot==6)) {
+ } else if ((this.ot==6)) {
model.ipar = 36;
- } else if ((ot==7)) {
+ } else if ((this.ot==7)) {
model.ipar = 37;
}
}
- } else if ((np==2)) {
- if ((it==1)) {
- if ((ot==3)) {
+ } else if ((this.np==2)) {
+ if ((this.it==1)) {
+ if ((this.ot==3)) {
model.ipar = 65;
- } else if ((ot==4)) {
+ } else if ((this.ot==4)) {
model.ipar = 66;
- } else if ((ot==5)) {
+ } else if ((this.ot==5)) {
model.ipar = 67;
- } else if ((ot==6)) {
+ } else if ((this.ot==6)) {
model.ipar = 68;
- } else if ((ot==7)) {
+ } else if ((this.ot==7)) {
model.ipar = 69;
- } else if ((ot==8)) {
+ } else if ((this.ot==8)) {
model.ipar = 70;
}
- } else if ((it==3)) {
- if ((ot==1)) {
+ } else if ((this.it==3)) {
+ if ((this.ot==1)) {
model.ipar = 8;
- } else if ((ot==4)) {
+ } else if ((this.ot==4)) {
model.ipar = 71;
- } else if ((ot==5)) {
+ } else if ((this.ot==5)) {
model.ipar = 72;
- } else if ((ot==6)) {
+ } else if ((this.ot==6)) {
model.ipar = 73;
- } else if ((ot==7)) {
+ } else if ((this.ot==7)) {
model.ipar = 74;
- } else if ((ot==8)) {
+ } else if ((this.ot==8)) {
model.ipar = 75;
}
- } else if ((it==4)) {
- if ((ot==1)) {
+ } else if ((this.it==4)) {
+ if ((this.ot==1)) {
model.ipar = 13;
- } else if ((ot==3)) {
+ } else if ((this.ot==3)) {
model.ipar = 14;
- } else if ((ot==5)) {
+ } else if ((this.ot==5)) {
model.ipar = 76;
- } else if ((ot==6)) {
+ } else if ((this.ot==6)) {
model.ipar = 77;
- } else if ((ot==7)) {
+ } else if ((this.ot==7)) {
model.ipar = 78;
- } else if ((ot==8)) {
+ } else if ((this.ot==8)) {
model.ipar = 79;
}
- } else if ((it==5)) {
- if ((ot==1)) {
+ } else if ((this.it==5)) {
+ if ((this.ot==1)) {
model.ipar = 18;
- } else if ((ot==3)) {
+ } else if ((this.ot==3)) {
model.ipar = 19;
- } else if ((ot==4)) {
+ } else if ((this.ot==4)) {
model.ipar = 20;
- } else if ((ot==6)) {
+ } else if ((this.ot==6)) {
model.ipar = 80;
- } else if ((ot==7)) {
+ } else if ((this.ot==7)) {
model.ipar = 81;
- } else if ((ot==8)) {
+ } else if ((this.ot==8)) {
model.ipar = 82;
}
- } else if ((it==6)) {
- if ((ot==1)) {
+ } else if ((this.it==6)) {
+ if ((this.ot==1)) {
model.ipar = 23;
- } else if ((ot==3)) {
+ } else if ((this.ot==3)) {
model.ipar = 83;
- } else if ((ot==4)) {
+ } else if ((this.ot==4)) {
model.ipar = 84;
- } else if ((ot==5)) {
+ } else if ((this.ot==5)) {
model.ipar = 85;
- } else if ((ot==7)) {
+ } else if ((this.ot==7)) {
model.ipar = 86;
- } else if ((ot==8)) {
+ } else if ((this.ot==8)) {
model.ipar = 87;
}
- } else if ((it==7)) {
- if ((ot==1)) {
+ } else if ((this.it==7)) {
+ if ((this.ot==1)) {
model.ipar = 28;
- } else if ((ot==3)) {
+ } else if ((this.ot==3)) {
model.ipar = 29;
- } else if ((ot==4)) {
+ } else if ((this.ot==4)) {
model.ipar = 88;
- } else if ((ot==5)) {
+ } else if ((this.ot==5)) {
model.ipar = 89;
- } else if ((ot==6)) {
+ } else if ((this.ot==6)) {
model.ipar = 31;
- } else if ((ot==8)) {
+ } else if ((this.ot==8)) {
model.ipar = 90;
}
- } else if ((it==8)) {
- if ((ot==1)) {
+ } else if ((this.it==8)) {
+ if ((this.ot==1)) {
model.ipar = 33;
- } else if ((ot==3)) {
+ } else if ((this.ot==3)) {
model.ipar = 34;
- } else if ((ot==4)) {
+ } else if ((this.ot==4)) {
model.ipar = 35;
- } else if ((ot==5)) {
+ } else if ((this.ot==5)) {
model.ipar = 91;
- } else if ((ot==6)) {
+ } else if ((this.ot==6)) {
model.ipar = 36;
- } else if ((ot==7)) {
+ } else if ((this.ot==7)) {
model.ipar = 37;
}
}
@@ -359,7 +359,7 @@ function CONVERT() {
in1 = [model.in1,model.in2];
out = [model.out,model.out2];
if (ok) {
- [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),[],[]);
+ [model,graphics,ok] = set_io(model,graphics,list(in1,this.it),list(out,this.ot),[],[]);
}
if (ok) {
graphics.exprs = exprs;
diff --git a/js/IntegerOp/CONVERT.pickle b/js/IntegerOp/CONVERT.pickle
index 0d1dde24..3b00c670 100644
--- a/js/IntegerOp/CONVERT.pickle
+++ b/js/IntegerOp/CONVERT.pickle
@@ -2,8 +2,14 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'np'
p2
-atp3
-Rp4
+aS'x'
+p3
+aS'ot'
+p4
+aS'it'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/IntegerOp/EXTRACTBITS.js b/js/IntegerOp/EXTRACTBITS.js
index 8f376b2d..25db739c 100644
--- a/js/IntegerOp/EXTRACTBITS.js
+++ b/js/IntegerOp/EXTRACTBITS.js
@@ -29,56 +29,56 @@ function EXTRACTBITS() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,Datatype,rule,bit,scal,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"EXTRACTBITS")],[" "],[gettext("Bits Extraction")],[" "],[gettext("&nbsp;- Bits to Extract:")],[gettext("&nbsp;&nbsp;&nbsp;&nbsp;1 Upper Half")],[gettext("&nbsp;&nbsp;&nbsp;&nbsp;2 Lower Half")],[gettext("&nbsp;&nbsp;&nbsp;&nbsp;3 Range from MSB")],[gettext("&nbsp;&nbsp;&nbsp;&nbsp;4 Range to LSB")],[gettext("&nbsp;&nbsp;&nbsp;&nbsp;5 Range of Bits")],[gettext("&nbsp;- Number of Bits or Index of bit : Index 0 is LSB")],[gettext("&nbsp;&nbsp;&nbsp;&nbsp;If \'Bits to Extract\' is set to \'Range of bits\': [Start, End]")],[" "]],[[msprintf(gettext("Data Type %s"),"(3:int32, 4:int16, 5:int8, ...)")],[gettext("Bits to extract")],[gettext("Number of Bits or Index of Bit")],[gettext("Treat Bit Field as an Integer (0:No, 1:Yes)")]],list("vec",1,"vec",1,"vec",-1,"vec",1),exprs);
+ [ok,this.Datatype,this.rule,this.bit,this.scal,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"EXTRACTBITS")],[" "],[gettext("Bits Extraction")],[" "],[gettext("&nbsp;- Bits to Extract:")],[gettext("&nbsp;&nbsp;&nbsp;&nbsp;1 Upper Half")],[gettext("&nbsp;&nbsp;&nbsp;&nbsp;2 Lower Half")],[gettext("&nbsp;&nbsp;&nbsp;&nbsp;3 Range from MSB")],[gettext("&nbsp;&nbsp;&nbsp;&nbsp;4 Range to LSB")],[gettext("&nbsp;&nbsp;&nbsp;&nbsp;5 Range of Bits")],[gettext("&nbsp;- Number of Bits or Index of bit : Index 0 is LSB")],[gettext("&nbsp;&nbsp;&nbsp;&nbsp;If \'Bits to Extract\' is set to \'Range of bits\': [Start, End]")],[" "]],[[msprintf(gettext("Data Type %s"),"(3:int32, 4:int16, 5:int8, ...)")],[gettext("Bits to extract")],[gettext("Number of Bits or Index of Bit")],[gettext("Treat Bit Field as an Integer (0:No, 1:Yes)")]],list("vec",1,"vec",1,"vec",-1,"vec",1),exprs);
if (!ok) {
break;
}
- bitstr = strcat(string(bit.slice())," ");
- if ((rule<1)||(rule>5)) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Bits to Extract"),rule),msprintf(gettext("Must be in the interval %s."),"[1, 5]"));
+ bitstr = strcat(string(this.bit.slice())," ");
+ if ((this.rule<1)||(this.rule>5)) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Bits to Extract"),this.rule),msprintf(gettext("Must be in the interval %s."),"[1, 5]"));
ok = false;
- } else if (scal<0||scal>1) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Treat Bit Field as an Integer"),scal),msprintf(gettext("Must be in the interval %s."),"[0, 1]"));
+ } else if (this.scal<0||this.scal>1) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Treat Bit Field as an Integer"),this.scal),msprintf(gettext("Must be in the interval %s."),"[0, 1]"));
ok = false;
} else {
in1 = [model.in1,model.in2];
- bit = int(bit);
- rule = int(rule);
- if ((rule==3)||(rule==4)) {
- if ((size(bit,"*")!=1)) {
+ this.bit = int(this.bit);
+ this.rule = int(this.rule);
+ if ((this.rule==3)||(this.rule==4)) {
+ if ((size(this.bit,"*")!=1)) {
block_parameter_error(msprintf(gettext("Wrong size for \'%s\' parameter: %s."),gettext("Number of Bits or Index of Bit"),bitstr),gettext("Must be a single value."));
ok = false;
} else {
- numb = bit;
+ numb = this.bit;
}
- } else if ((rule==5)) {
- if ((size(bit,"*")!=2)) {
+ } else if ((this.rule==5)) {
+ if ((size(this.bit,"*")!=2)) {
block_parameter_error(msprintf(gettext("Wrong size for \'%s\' parameter: %s."),gettext("Number of Bits or Index of Bit"),bitstr),gettext("Must have this form: [Start, End]."));
ok = false;
- } else if (bit[1-1]>bit[2-1]) {
+ } else if (this.bit[1-1]>this.bit[2-1]) {
block_parameter_error(msprintf(gettext("Wrong values for \'%s\' parameter: %s."),gettext("Number of Bits or Index of Bit"),bitstr),msprintf(gettext("\'Start\' must be less than \'End\'.")));
ok = false;
} else {
- numb = bit[2-1]-bit[1-1];
+ numb = this.bit[2-1]-this.bit[1-1];
}
} else {
- bit = 0;
+ this.bit = 0;
numb = [];
}
}
if (ok) {
- if ((Datatype==3||Datatype==6)) {
- if (or(bit.slice()>31)||or(bit.slice()<0)) {
+ if ((this.Datatype==3||this.Datatype==6)) {
+ if (or(this.bit.slice()>31)||or(this.bit.slice()<0)) {
block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %s."),gettext("Number of Bits or Index of Bit"),bitstr),msprintf(gettext("Indexes must be in the interval %s."),"[0, 31]"));
ok = false;
}
- switch (rule) {
+ switch (this.rule) {
case 1:
- switch (scal) {
+ switch (this.scal) {
case 0:
model.sim = list("extract_bit_32_UH0",4);
case 1:
- switch (Datatype) {
+ switch (this.Datatype) {
case 3:
model.sim = list("extract_bit_32_UH1",4);
case 6:
@@ -88,11 +88,11 @@ function EXTRACTBITS() {
case 2:
model.sim = list("extract_bit_32_LH",4);
case 3:
- switch (scal) {
+ switch (this.scal) {
case 0:
model.sim = list("extract_bit_32_MSB0",4);
case 1:
- switch (Datatype) {
+ switch (this.Datatype) {
case 3:
model.sim = list("extract_bit_32_MSB1",4);
case 6:
@@ -102,11 +102,11 @@ function EXTRACTBITS() {
case 4:
model.sim = list("extract_bit_32_LSB",4);
case 5:
- switch (scal) {
+ switch (this.scal) {
case 0:
model.sim = list("extract_bit_32_RB0",4);
case 1:
- switch (Datatype) {
+ switch (this.Datatype) {
case 3:
model.sim = list("extract_bit_32_RB1",4);
case 6:
@@ -114,18 +114,18 @@ function EXTRACTBITS() {
}
}
}
- } else if ((Datatype==4||Datatype==7)) {
- if (or(bit.slice()>15)||or(bit.slice()<0)) {
+ } else if ((this.Datatype==4||this.Datatype==7)) {
+ if (or(this.bit.slice()>15)||or(this.bit.slice()<0)) {
block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %s."),gettext("Number of Bits or Index of Bit"),bitstr),msprintf(gettext("Indexes must be in the interval %s."),"[0, 15]"));
ok = false;
}
- switch (rule) {
+ switch (this.rule) {
case 1:
- switch (scal) {
+ switch (this.scal) {
case 0:
model.sim = list("extract_bit_16_UH0",4);
case 1:
- switch (Datatype) {
+ switch (this.Datatype) {
case 4:
model.sim = list("extract_bit_16_UH1",4);
case 7:
@@ -135,11 +135,11 @@ function EXTRACTBITS() {
case 2:
model.sim = list("extract_bit_16_LH",4);
case 3:
- switch (scal) {
+ switch (this.scal) {
case 0:
model.sim = list("extract_bit_16_MSB0",4);
case 1:
- switch (Datatype) {
+ switch (this.Datatype) {
case 4:
model.sim = list("extract_bit_16_MSB1",4);
case 7:
@@ -149,11 +149,11 @@ function EXTRACTBITS() {
case 4:
model.sim = list("extract_bit_16_LSB",4);
case 5:
- switch (scal) {
+ switch (this.scal) {
case 0:
model.sim = list("extract_bit_16_RB0",4);
case 1:
- switch (Datatype) {
+ switch (this.Datatype) {
case 4:
model.sim = list("extract_bit_16_RB1",4);
case 7:
@@ -161,18 +161,18 @@ function EXTRACTBITS() {
}
}
}
- } else if ((Datatype==5||Datatype==8)) {
- if (or(bit.slice()>7)||or(bit.slice()<0)) {
+ } else if ((this.Datatype==5||this.Datatype==8)) {
+ if (or(this.bit.slice()>7)||or(this.bit.slice()<0)) {
block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %s."),gettext("Number of Bits or Index of Bit"),bitstr),msprintf(gettext("Indexes must be in the interval %s."),"[0, 7]"));
ok = false;
}
- switch (rule) {
+ switch (this.rule) {
case 1:
- switch (scal) {
+ switch (this.scal) {
case 0:
model.sim = list("extract_bit_8_UH0",4);
case 1:
- switch (Datatype) {
+ switch (this.Datatype) {
case 5:
model.sim = list("extract_bit_8_UH1",4);
case 8:
@@ -182,11 +182,11 @@ function EXTRACTBITS() {
case 2:
model.sim = list("extract_bit_8_LH",4);
case 3:
- switch (scal) {
+ switch (this.scal) {
case 0:
model.sim = list("extract_bit_8_MSB0",4);
case 1:
- switch (Datatype) {
+ switch (this.Datatype) {
case 5:
model.sim = list("extract_bit_8_MSB1",4);
case 8:
@@ -196,11 +196,11 @@ function EXTRACTBITS() {
case 4:
model.sim = list("extract_bit_8_LSB",4);
case 5:
- switch (scal) {
+ switch (this.scal) {
case 0:
model.sim = list("extract_bit_8_RB0",4);
case 1:
- switch (Datatype) {
+ switch (this.Datatype) {
case 5:
model.sim = list("extract_bit_8_RB1",4);
case 8:
@@ -209,19 +209,19 @@ function EXTRACTBITS() {
}
}
} else {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Data Type"),Datatype),msprintf(gettext("Must be in the interval %s."),"[3, 8]"));
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Data Type"),this.Datatype),msprintf(gettext("Must be in the interval %s."),"[3, 8]"));
ok = false;
}
}
if (ok) {
- it = Datatype;
- ot = Datatype;
+ it = this.Datatype;
+ ot = this.Datatype;
out = [1,1];
[model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),[],[]);
}
if (ok) {
graphics.exprs = exprs;
- model.ipar = [[int(bit.slice())],[int(numb.slice())]];
+ model.ipar = [[int(this.bit.slice())],[int(numb.slice())]];
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/IntegerOp/EXTRACTBITS.pickle b/js/IntegerOp/EXTRACTBITS.pickle
index 0d1dde24..38656d03 100644
--- a/js/IntegerOp/EXTRACTBITS.pickle
+++ b/js/IntegerOp/EXTRACTBITS.pickle
@@ -2,8 +2,16 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'Datatype'
p2
-atp3
-Rp4
+aS'x'
+p3
+aS'bit'
+p4
+aS'scal'
+p5
+aS'rule'
+p6
+atp7
+Rp8
. \ No newline at end of file
diff --git a/js/IntegerOp/INTMUL.js b/js/IntegerOp/INTMUL.js
index c67e5c5e..9ce9fb1b 100644
--- a/js/IntegerOp/INTMUL.js
+++ b/js/IntegerOp/INTMUL.js
@@ -30,59 +30,59 @@ function INTMUL() {
model = arg1.model;
exprs = graphics.exprs;
while (true) {
- [ok,Datatype,np,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"INTMUL")],[" "],[gettext("Integer matrix multiplication")],[" "]],[[msprintf(gettext("Data Type %s"),"(3:int32, 4:int16, 5:int8, ...)")],[gettext("Do on Overflow (0:Nothing, 1:Saturate, 2:Error)")]],list("vec",1,"vec",1),exprs);
+ [ok,this.Datatype,this.np,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"INTMUL")],[" "],[gettext("Integer matrix multiplication")],[" "]],[[msprintf(gettext("Data Type %s"),"(3:int32, 4:int16, 5:int8, ...)")],[gettext("Do on Overflow (0:Nothing, 1:Saturate, 2:Error)")]],list("vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- it = Datatype*ones(1,2);
- ot = Datatype;
- if ((np!=0&&np!=1&&np!=2)) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Do on Overflow"),np),msprintf(gettext("Must be in the interval %s."),"[0, 2]"));
+ it = this.Datatype*ones(1,2);
+ ot = this.Datatype;
+ if ((this.np!=0&&this.np!=1&&this.np!=2)) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Do on Overflow"),this.np),msprintf(gettext("Must be in the interval %s."),"[0, 2]"));
ok = false;
- } else if (Datatype==3) {
- if (np==0) {
+ } else if (this.Datatype==3) {
+ if (this.np==0) {
model.sim = list("matmul_i32n",4);
- } else if (np==1) {
+ } else if (this.np==1) {
model.sim = list("matmul_i32s",4);
} else {
model.sim = list("matmul_i32e",4);
}
- } else if (Datatype==4) {
- if (np==0) {
+ } else if (this.Datatype==4) {
+ if (this.np==0) {
model.sim = list("matmul_i16n",4);
- } else if (np==1) {
+ } else if (this.np==1) {
model.sim = list("matmul_i16s",4);
} else {
model.sim = list("matmul_i16e",4);
}
- } else if (Datatype==5) {
- if (np==0) {
+ } else if (this.Datatype==5) {
+ if (this.np==0) {
model.sim = list("matmul_i8n",4);
- } else if (np==1) {
+ } else if (this.np==1) {
model.sim = list("matmul_i8s",4);
} else {
model.sim = list("matmul_i8e",4);
}
- } else if (Datatype==6) {
- if (np==0) {
+ } else if (this.Datatype==6) {
+ if (this.np==0) {
model.sim = list("matmul_ui32n",4);
- } else if (np==1) {
+ } else if (this.np==1) {
model.sim = list("matmul_ui32s",4);
} else {
model.sim = list("matmul_ui32e",4);
}
- } else if (Datatype==7) {
- if (np==0) {
+ } else if (this.Datatype==7) {
+ if (this.np==0) {
model.sim = list("matmul_ui16n",4);
- } else if (np==1) {
+ } else if (this.np==1) {
model.sim = list("matmul_ui16s",4);
} else {
model.sim = list("matmul_ui16e",4);
}
- } else if (Datatype==8) {
- if (np==0) {
+ } else if (this.Datatype==8) {
+ if (this.np==0) {
model.sim = list("matmul_ui8n",4);
- } else if (np==1) {
+ } else if (this.np==1) {
model.sim = list("matmul_ui8s",4);
} else {
model.sim = list("matmul_ui8e",4);
@@ -97,7 +97,7 @@ function INTMUL() {
[model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),[],[]);
}
if (ok) {
- model.ipar = np;
+ model.ipar = this.np;
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/IntegerOp/INTMUL.pickle b/js/IntegerOp/INTMUL.pickle
index 0d1dde24..a107a003 100644
--- a/js/IntegerOp/INTMUL.pickle
+++ b/js/IntegerOp/INTMUL.pickle
@@ -2,8 +2,12 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'Datatype'
p2
-atp3
-Rp4
+aS'x'
+p3
+aS'np'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/IntegerOp/JKFLIPFLOP.js b/js/IntegerOp/JKFLIPFLOP.js
index 17aa3c0d..fcada59b 100644
--- a/js/IntegerOp/JKFLIPFLOP.js
+++ b/js/IntegerOp/JKFLIPFLOP.js
@@ -67,25 +67,25 @@ function JKFLIPFLOP() {
model = xx.model;
init_old = model.odstate[1-1];
while (true) {
- [ok,init,exprs0] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"JKFLIPFLOP")],[" "],[gettext("JK flip-flop")],[" "],[gettext("The \'Initial Value\' must be 0 or 1 of type int8")],[gettext("&nbsp;- Negative values are considered as int8(0)")],[gettext("&nbsp;- Positive values are considered as int8(1)")],[" "]],gettext("Initial Value"),list("vec",1),exprs);
+ [ok,this.init,this.exprs0] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"JKFLIPFLOP")],[" "],[gettext("JK flip-flop")],[" "],[gettext("The \'Initial Value\' must be 0 or 1 of type int8")],[gettext("&nbsp;- Negative values are considered as int8(0)")],[gettext("&nbsp;- Positive values are considered as int8(1)")],[" "]],gettext("Initial Value"),list("vec",1),exprs);
if (!ok) {
break;
}
- if (init<=0) {
- init = int8(0);
- } else if (init>0) {
- init = int8(1);
+ if (this.init<=0) {
+ this.init = int8(0);
+ } else if (this.init>0) {
+ this.init = int8(1);
}
if (ok) {
- xx.graphics.exprs[1-1] = exprs0;
- model.odstate[1-1] = init;
+ xx.graphics.exprs[1-1] = this.exprs0;
+ model.odstate[1-1] = this.init;
xx.model = model;
arg1.model.rpar.objs[path-1] = xx;
break;
}
}
needcompile = 0;
- if (init_old!=init) {
+ if (init_old!=this.init) {
newpar[size(newpar)+1-1] = 1;
needcompile = 2;
}
diff --git a/js/IntegerOp/JKFLIPFLOP.pickle b/js/IntegerOp/JKFLIPFLOP.pickle
index 0d1dde24..61b3190c 100644
--- a/js/IntegerOp/JKFLIPFLOP.pickle
+++ b/js/IntegerOp/JKFLIPFLOP.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'init'
+p3
+aS'exprs0'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/IntegerOp/LOGIC.js b/js/IntegerOp/LOGIC.js
index 3a4dceef..dc3d15e3 100644
--- a/js/IntegerOp/LOGIC.js
+++ b/js/IntegerOp/LOGIC.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/IntegerOp/LOGIC.sci" */
function LOGIC() {
LOGIC.prototype.define = function LOGIC() {
- mat = [[0],[0],[0],[1]];
+ this.mat = [[0],[0],[0],[1]];
model = scicos_model();
model.sim = list("logic",4);
model.in1 = [[1],[1]];
@@ -11,11 +11,11 @@ function LOGIC() {
model.evtin = 1;
model.intyp = [5,5];
model.outtyp = 5;
- model.opar = list(int8(mat));
+ model.opar = list(int8(this.mat));
model.blocktype = "c";
model.firing = false;
model.dep_ut = [true,false];
- exprs = [[sci2exp(mat)],[sci2exp(0)]];
+ exprs = [[sci2exp(this.mat)],[sci2exp(0)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -31,21 +31,21 @@ function LOGIC() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,mat,herit,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"LOGIC")],[" "],[gettext("Combinatorial logic")],[" "],[gettext("&nbsp; Rows of the matrix are the output values")],[gettext("&nbsp; Number of rows must be a power of two.")],[gettext("&nbsp; Number of columns gives the number of outputs.")],[" "]],[[gettext("Truth Table (matrix of outputs)")],[gettext("Accepts Inherited Events (0:No, 1:Yes)")]],list("mat",[-1,-2],"vec",1),exprs);
+ [ok,this.mat,this.herit,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"LOGIC")],[" "],[gettext("Combinatorial logic")],[" "],[gettext("&nbsp; Rows of the matrix are the output values")],[gettext("&nbsp; Number of rows must be a power of two.")],[gettext("&nbsp; Number of columns gives the number of outputs.")],[" "]],[[gettext("Truth Table (matrix of outputs)")],[gettext("Accepts Inherited Events (0:No, 1:Yes)")]],list("mat",[-1,-2],"vec",1),exprs);
if (!ok) {
break;
}
- nout = size(mat,2);
- nin = (log(size(mat,1))/log(2));
+ nout = size(this.mat,2);
+ nin = (log(size(this.mat,1))/log(2));
u1 = floor(nin);
if ((u1!=nin)) {
- block_parameter_error(msprintf(gettext("Wrong size for \'%s\' parameter: %d."),gettext("Truth Table"),size(mat,1)),gettext("Number of rows must be a power of two."));
+ block_parameter_error(msprintf(gettext("Wrong size for \'%s\' parameter: %d."),gettext("Truth Table"),size(this.mat,1)),gettext("Number of rows must be a power of two."));
ok = false;
- } else if ((find(mat.slice()!=0&&mat.slice()!=1)!=[])) {
+ } else if ((find(this.mat.slice()!=0&&this.mat.slice()!=1)!=[])) {
block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter."),gettext("Truth Table")),msprintf(gettext("Elements must be in the interval %s."),"[0, 1]"));
ok = false;
- } else if (herit<0||herit>1) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Accepts Inherited Events"),herit),msprintf(gettext("Must be in the interval %s."),"[0, 1]"));
+ } else if (this.herit<0||this.herit>1) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Accepts Inherited Events"),this.herit),msprintf(gettext("Must be in the interval %s."),"[0, 1]"));
ok = false;
}
if (ok) {
@@ -53,12 +53,12 @@ function LOGIC() {
out = [ones(nout,1),ones(nout,1)];
it = 5*ones(1,nin);
ot = 5*ones(1,nout);
- [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),ones(1-herit,1),[]);
+ [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),ones(1-this.herit,1),[]);
}
if (ok) {
graphics.exprs = exprs;
- mat = int8(mat);
- model.opar = list(mat);
+ this.mat = int8(this.mat);
+ model.opar = list(this.mat);
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/IntegerOp/LOGIC.pickle b/js/IntegerOp/LOGIC.pickle
index 0d1dde24..f96c5749 100644
--- a/js/IntegerOp/LOGIC.pickle
+++ b/js/IntegerOp/LOGIC.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'herit'
+p3
+aS'mat'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/IntegerOp/SHIFT.js b/js/IntegerOp/SHIFT.js
index d1360f21..21e5e04e 100644
--- a/js/IntegerOp/SHIFT.js
+++ b/js/IntegerOp/SHIFT.js
@@ -31,28 +31,28 @@ function SHIFT() {
model = arg1.model;
exprs = graphics.exprs;
while (true) {
- [ok,Datatype,nb,np,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"SHIFT")],[" "],[gettext("Shift/Rotates bits")]],[[msprintf(gettext("Data Type %s"),"(3:int32, 4:int16, 5:int8, ...)")],[gettext("Number of Bits to Shift Left (Negative number to shift right)")],[gettext("Shift Type (0:Arithmetic, 1:Circular)")]],list("vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.Datatype,this.nb,this.np,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"SHIFT")],[" "],[gettext("Shift/Rotates bits")]],[[msprintf(gettext("Data Type %s"),"(3:int32, 4:int16, 5:int8, ...)")],[gettext("Number of Bits to Shift Left (Negative number to shift right)")],[gettext("Shift Type (0:Arithmetic, 1:Circular)")]],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- if ((np!=0&&np!=1)) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Shift Type"),np),msprintf(gettext("Must be in the interval %s."),"[0, 1]"));
+ if ((this.np!=0&&this.np!=1)) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Shift Type"),this.np),msprintf(gettext("Must be in the interval %s."),"[0, 1]"));
ok = false;
}
- it = Datatype;
- ot = Datatype;
- if ((Datatype==3||Datatype==6)) {
- if (nb>0) {
- switch (np) {
+ it = this.Datatype;
+ ot = this.Datatype;
+ if ((this.Datatype==3||this.Datatype==6)) {
+ if (this.nb>0) {
+ switch (this.np) {
case 0:
model.sim = list("shift_32_LA",4);
case 1:
model.sim = list("shift_32_LC",4);
}
- } else if (nb<0) {
- switch (np) {
+ } else if (this.nb<0) {
+ switch (this.np) {
case 0:
- switch (Datatype) {
+ switch (this.Datatype) {
case 3:
model.sim = list("shift_32_RA",4);
case 6:
@@ -62,18 +62,18 @@ function SHIFT() {
model.sim = list("shift_32_RC",4);
}
}
- } else if ((Datatype==4||Datatype==7)) {
- if (nb>0) {
- switch (np) {
+ } else if ((this.Datatype==4||this.Datatype==7)) {
+ if (this.nb>0) {
+ switch (this.np) {
case 0:
model.sim = list("shift_16_LA",4);
case 1:
model.sim = list("shift_16_LC",4);
}
- } else if (nb<0) {
- switch (np) {
+ } else if (this.nb<0) {
+ switch (this.np) {
case 0:
- switch (Datatype) {
+ switch (this.Datatype) {
case 4:
model.sim = list("shift_16_RA",4);
case 7:
@@ -83,18 +83,18 @@ function SHIFT() {
model.sim = list("shift_16_RC",4);
}
}
- } else if ((Datatype==5||Datatype==8)) {
- if (nb>0) {
- switch (np) {
+ } else if ((this.Datatype==5||this.Datatype==8)) {
+ if (this.nb>0) {
+ switch (this.np) {
case 0:
model.sim = list("shift_8_LA",4);
case 1:
model.sim = list("shift_8_LC",4);
}
- } else if (nb<0) {
- switch (np) {
+ } else if (this.nb<0) {
+ switch (this.np) {
case 0:
- switch (Datatype) {
+ switch (this.Datatype) {
case 5:
model.sim = list("shift_8_RA",4);
case 8:
@@ -105,14 +105,14 @@ function SHIFT() {
}
}
} else {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Data Type"),Datatype),msprintf(gettext("Must be in the interval %s."),"[3, 8]"));
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Data Type"),this.Datatype),msprintf(gettext("Must be in the interval %s."),"[3, 8]"));
ok = false;
}
if (ok) {
[model,graphics,ok] = set_io(model,graphics,list([-1,-2],it),list([-1,-2],ot),[],[]);
}
if (ok) {
- model.ipar = nb;
+ model.ipar = this.nb;
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/IntegerOp/SHIFT.pickle b/js/IntegerOp/SHIFT.pickle
index 0d1dde24..9529207d 100644
--- a/js/IntegerOp/SHIFT.pickle
+++ b/js/IntegerOp/SHIFT.pickle
@@ -2,8 +2,14 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'Datatype'
p2
-atp3
-Rp4
+aS'x'
+p3
+aS'nb'
+p4
+aS'np'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/IntegerOp/SRFLIPFLOP.js b/js/IntegerOp/SRFLIPFLOP.js
index eb57ffe8..3ae36928 100644
--- a/js/IntegerOp/SRFLIPFLOP.js
+++ b/js/IntegerOp/SRFLIPFLOP.js
@@ -51,25 +51,25 @@ function SRFLIPFLOP() {
model = xx.model;
init_old = model.odstate[1-1];
while (true) {
- [ok,init,exprs0] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"SRFLIPFLOP")],[" "],[gettext("SR flip-flop")],[" "],[gettext("The \'Initial Value\' must be 0 or 1 of type int8")],[gettext("&nbsp;- Negative values are considered as int8(0)")],[gettext("&nbsp;- Positive values are considered as int8(1)")],[" "]],gettext("Initial Value"),list("vec",1),exprs);
+ [ok,this.init,this.exprs0] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"SRFLIPFLOP")],[" "],[gettext("SR flip-flop")],[" "],[gettext("The \'Initial Value\' must be 0 or 1 of type int8")],[gettext("&nbsp;- Negative values are considered as int8(0)")],[gettext("&nbsp;- Positive values are considered as int8(1)")],[" "]],gettext("Initial Value"),list("vec",1),exprs);
if (!ok) {
break;
}
- if (init<=0) {
- init = int8(0);
- } else if (init>0) {
- init = int8(1);
+ if (this.init<=0) {
+ this.init = int8(0);
+ } else if (this.init>0) {
+ this.init = int8(1);
}
if (ok) {
- xx.graphics.exprs[1-1] = exprs0;
- model.odstate[1-1] = init;
+ xx.graphics.exprs[1-1] = this.exprs0;
+ model.odstate[1-1] = this.init;
xx.model = model;
arg1.model.rpar.objs[path-1] = xx;
break;
}
}
needcompile = 0;
- if (init_old!=init) {
+ if (init_old!=this.init) {
newpar[size(newpar)+1-1] = path;
needcompile = 2;
}
diff --git a/js/IntegerOp/SRFLIPFLOP.pickle b/js/IntegerOp/SRFLIPFLOP.pickle
index 0d1dde24..61b3190c 100644
--- a/js/IntegerOp/SRFLIPFLOP.pickle
+++ b/js/IntegerOp/SRFLIPFLOP.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'init'
+p3
+aS'exprs0'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Linear/BIGSOM_f.js b/js/Linear/BIGSOM_f.js
index 096e388b..f6ca95aa 100644
--- a/js/Linear/BIGSOM_f.js
+++ b/js/Linear/BIGSOM_f.js
@@ -1,18 +1,18 @@
/* autogenerated from "macros/Linear/BIGSOM_f.sci" */
function BIGSOM_f() {
BIGSOM_f.prototype.define = function BIGSOM_f() {
- sgn = [[1],[1]];
+ this.sgn = [[1],[1]];
model = scicos_model();
model.sim = list("sum",2);
model.in1 = [[-1],[-1]];
model.out = -1;
- model.rpar = sgn;
+ model.rpar = this.sgn;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = sci2exp(sgn);
+ exprs = sci2exp(this.sgn);
gr_i = [];
this.x = standard_define([2,3],model,exprs,gr_i);
- return new BasicBlock(this.x);
+ return new BigSom(this.x);
}
BIGSOM_f.prototype.details = function BIGSOM_f() {
return this.x;
@@ -25,20 +25,20 @@ function BIGSOM_f() {
model = arg1.model;
exprs = graphics.exprs;
while (true) {
- [ok,sgn,exprs] = scicos_getvalue("Set sum block parameters","Inputs ports signs/gain",list("vec",-1),exprs);
+ [ok,this.sgn,exprs] = scicos_getvalue("Set sum block parameters","Inputs ports signs/gain",list("vec",-1),exprs);
if (!ok) {
break;
}
- in1 = -ones(size(sgn,"*"),1);
+ in1 = -ones(size(this.sgn,"*"),1);
[model,graphics,ok] = check_io(model,graphics,in1,-1,[],[]);
if (ok) {
- model.rpar = sgn.slice();
+ model.rpar = this.sgn.slice();
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
break;
}
}
- return new BasicBlock(this.x);
+ return new BigSom(this.x);
}
}
diff --git a/js/Linear/BIGSOM_f.pickle b/js/Linear/BIGSOM_f.pickle
index 0d1dde24..1f88411a 100644
--- a/js/Linear/BIGSOM_f.pickle
+++ b/js/Linear/BIGSOM_f.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'sgn'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Linear/CLR.js b/js/Linear/CLR.js
index 3d97e275..a985ba29 100644
--- a/js/Linear/CLR.js
+++ b/js/Linear/CLR.js
@@ -37,16 +37,16 @@ function CLR() {
PREVAR_scicos_context = PREVAR_scicos_context;
PREVAR_scicos_context.s = %s;
while (true) {
- [ok,num,den,exprs] = scicos_getvalue("Set continuous SISO transfer parameters",[["Numerator (s)"],["Denominator (s)"]],list("pol",1,"pol",1),exprs);
+ [ok,this.num,this.den,exprs] = scicos_getvalue("Set continuous SISO transfer parameters",[["Numerator (s)"],["Denominator (s)"]],list("pol",1,"pol",1),exprs);
if (!ok) {
break;
}
- if (degree(num)>degree(den)) {
+ if (degree(this.num)>degree(this.den)) {
message("Transfer function must be proper or strictly proper.");
ok = false;
}
if (ok) {
- H = cont_frm(num,den);
+ H = cont_frm(this.num,this.den);
[A,B,C,D] = H.slice(2-1,5);
graphics.exprs = exprs;
[ns1,ns1] = size(A);
diff --git a/js/Linear/CLR.pickle b/js/Linear/CLR.pickle
index 0d1dde24..d96b225c 100644
--- a/js/Linear/CLR.pickle
+++ b/js/Linear/CLR.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'num'
+p3
+aS'den'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Linear/CLR_f.js b/js/Linear/CLR_f.js
index d9b963d0..3f029025 100644
--- a/js/Linear/CLR_f.js
+++ b/js/Linear/CLR_f.js
@@ -37,16 +37,16 @@ function CLR_f() {
PREVAR_scicos_context = PREVAR_scicos_context;
PREVAR_scicos_context.s = %s;
while (true) {
- [ok,num,den,exprs] = scicos_getvalue("Set continuous SISO transfer parameters",[["Numerator (s)"],["Denominator (s)"]],list("pol",1,"pol",1),exprs);
+ [ok,this.num,this.den,exprs] = scicos_getvalue("Set continuous SISO transfer parameters",[["Numerator (s)"],["Denominator (s)"]],list("pol",1,"pol",1),exprs);
if (!ok) {
break;
}
- if (degree(num)>degree(den)) {
+ if (degree(this.num)>degree(this.den)) {
message("Transfer must be proper or strictly proper");
ok = false;
}
if (ok) {
- H = cont_frm(num,den);
+ H = cont_frm(this.num,this.den);
[A,B,C,D] = H.slice(2-1,5);
graphics.exprs = exprs;
[ns1,ns1] = size(A);
diff --git a/js/Linear/CLR_f.pickle b/js/Linear/CLR_f.pickle
index 0d1dde24..d96b225c 100644
--- a/js/Linear/CLR_f.pickle
+++ b/js/Linear/CLR_f.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'num'
+p3
+aS'den'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Linear/CLSS.js b/js/Linear/CLSS.js
index 86279506..7b142963 100644
--- a/js/Linear/CLSS.js
+++ b/js/Linear/CLSS.js
@@ -1,22 +1,22 @@
/* autogenerated from "macros/Linear/CLSS.sci" */
function CLSS() {
CLSS.prototype.define = function CLSS() {
- x0 = 0;
- A = -1;
- B = 1;
- C = 1;
- D = 0;
+ this.x0 = 0;
+ this.A = -1;
+ this.B = 1;
+ this.C = 1;
+ this.D = 0;
in1 = 1;
out = 1;
model = scicos_model();
model.sim = list("csslti4",4);
model.in1 = in1;
model.out = out;
- model.state = x0;
- model.rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
+ model.state = this.x0;
+ model.rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
model.blocktype = "c";
model.dep_ut = [false,true];
- exprs = [[strcat(sci2exp(A))],[strcat(sci2exp(B))],[strcat(sci2exp(C))],[strcat(sci2exp(D))],[strcat(sci2exp(x0))]];
+ exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
gr_i = [];
this.x = standard_define([4,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -35,25 +35,25 @@ function CLSS() {
}
model = arg1.model;
while (true) {
- [ok,A,B,C,D,x0,exprs] = scicos_getvalue("Set continuous linear system parameters",[["A matrix"],["B matrix"],["C matrix"],["D matrix"],["Initial state"]],list("mat",[-1,-1],"mat",["size(%1,2)","-1"],"mat",["-1","size(%1,2)"],"mat",[-1,-1],"vec","size(%1,2)"),exprs);
+ [ok,this.A,this.B,this.C,this.D,this.x0,exprs] = scicos_getvalue("Set continuous linear system parameters",[["A matrix"],["B matrix"],["C matrix"],["D matrix"],["Initial state"]],list("mat",[-1,-1],"mat",["size(%1,2)","-1"],"mat",["-1","size(%1,2)"],"mat",[-1,-1],"vec","size(%1,2)"),exprs);
if (!ok) {
break;
}
- out = size(C,1);
+ out = size(this.C,1);
if (out==0) {
out = [];
}
- in1 = size(B,2);
+ in1 = size(this.B,2);
if (in1==0) {
in1 = [];
}
- [ms,ns] = size(A);
+ [ms,ns] = size(this.A);
okD = true;
- if (size(D,"*")!=size(C,1)*size(B,2)) {
- if (size(D,"*")==1) {
- D = D*ones(C*B);
- } else if (size(D,"*")==0) {
- D = zeros(C*B);
+ if (size(this.D,"*")!=size(this.C,1)*size(this.B,2)) {
+ if (size(this.D,"*")==1) {
+ this.D = this.D*ones(this.C*this.B);
+ } else if (size(this.D,"*")==0) {
+ this.D = zeros(this.C*this.B);
} else {
okD = false;
}
@@ -64,9 +64,9 @@ function CLSS() {
[model,graphics,ok] = check_io(model,graphics,in1,out,[],[]);
if (ok) {
graphics.exprs = exprs;
- rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
- if (D!=[]) {
- if (norm(D,1)!=0) {
+ rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
+ if (this.D!=[]) {
+ if (norm(this.D,1)!=0) {
mmm = [true,true];
} else {
mmm = [false,true];
@@ -77,7 +77,7 @@ function CLSS() {
} else {
model.dep_ut = [false,true];
}
- model.state = x0.slice();
+ model.state = this.x0.slice();
model.rpar = rpar;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Linear/CLSS.pickle b/js/Linear/CLSS.pickle
index 0d1dde24..a63da39b 100644
--- a/js/Linear/CLSS.pickle
+++ b/js/Linear/CLSS.pickle
@@ -2,8 +2,18 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'A'
p2
-atp3
-Rp4
+aS'C'
+p3
+aS'B'
+p4
+aS'D'
+p5
+aS'x'
+p6
+aS'x0'
+p7
+atp8
+Rp9
. \ No newline at end of file
diff --git a/js/Linear/CLSS_f.js b/js/Linear/CLSS_f.js
index e30c06fa..d1efb421 100644
--- a/js/Linear/CLSS_f.js
+++ b/js/Linear/CLSS_f.js
@@ -1,22 +1,22 @@
/* autogenerated from "macros/Linear/CLSS_f.sci" */
function CLSS_f() {
CLSS_f.prototype.define = function CLSS_f() {
- x0 = 0;
- A = -1;
- B = 1;
- C = 1;
- D = 0;
+ this.x0 = 0;
+ this.A = -1;
+ this.B = 1;
+ this.C = 1;
+ this.D = 0;
in1 = 1;
out = 1;
model = scicos_model();
model.sim = list("csslti",1);
model.in1 = in1;
model.out = out;
- model.state = x0;
- model.rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
+ model.state = this.x0;
+ model.rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
model.blocktype = "c";
model.dep_ut = [false,true];
- exprs = [[strcat(sci2exp(A))],[strcat(sci2exp(B))],[strcat(sci2exp(C))],[strcat(sci2exp(D))],[strcat(sci2exp(x0))]];
+ exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
gr_i = [];
this.x = standard_define([4,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -35,28 +35,28 @@ function CLSS_f() {
}
model = arg1.model;
while (true) {
- [ok,A,B,C,D,x0,exprs] = scicos_getvalue("Set continuous linear system parameters",[["A matrix"],["B matrix"],["C matrix"],["D matrix"],["Initial state"]],list("mat",[-1,-1],"mat",["size(%1,2)","-1"],"mat",["-1","size(%1,2)"],"mat",[-1,-1],"vec","size(%1,2)"),exprs);
+ [ok,this.A,this.B,this.C,this.D,this.x0,exprs] = scicos_getvalue("Set continuous linear system parameters",[["A matrix"],["B matrix"],["C matrix"],["D matrix"],["Initial state"]],list("mat",[-1,-1],"mat",["size(%1,2)","-1"],"mat",["-1","size(%1,2)"],"mat",[-1,-1],"vec","size(%1,2)"),exprs);
if (!ok) {
break;
}
- out = size(C,1);
+ out = size(this.C,1);
if (out==0) {
out = [];
}
- in1 = size(B,2);
+ in1 = size(this.B,2);
if (in1==0) {
in1 = [];
}
- [ms,ns] = size(A);
+ [ms,ns] = size(this.A);
if (ms!=ns) {
message("A matrix must be square");
} else {
[model,graphics,ok] = check_io(model,graphics,in1,out,[],[]);
if (ok) {
graphics.exprs = exprs;
- rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
- if (D!=[]) {
- if (norm(D,1)!=0) {
+ rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
+ if (this.D!=[]) {
+ if (norm(this.D,1)!=0) {
mmm = [true,true];
} else {
mmm = [false,true];
@@ -67,7 +67,7 @@ function CLSS_f() {
} else {
model.dep_ut = [false,true];
}
- model.state = x0.slice();
+ model.state = this.x0.slice();
model.rpar = rpar;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Linear/CLSS_f.pickle b/js/Linear/CLSS_f.pickle
index 0d1dde24..a63da39b 100644
--- a/js/Linear/CLSS_f.pickle
+++ b/js/Linear/CLSS_f.pickle
@@ -2,8 +2,18 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'A'
p2
-atp3
-Rp4
+aS'C'
+p3
+aS'B'
+p4
+aS'D'
+p5
+aS'x'
+p6
+aS'x0'
+p7
+atp8
+Rp9
. \ No newline at end of file
diff --git a/js/Linear/DELAYV_f.js b/js/Linear/DELAYV_f.js
index 622d60b2..4f04acee 100644
--- a/js/Linear/DELAYV_f.js
+++ b/js/Linear/DELAYV_f.js
@@ -1,22 +1,22 @@
/* autogenerated from "macros/Linear/DELAYV_f.sci" */
function DELAYV_f() {
DELAYV_f.prototype.define = function DELAYV_f() {
- nin = 1;
+ this.nin = 1;
z0 = zeros(11,1);
- zz0 = z0.slice(1-1,$-1);
- T = 1;
+ this.zz0 = z0.slice(1-1,$-1);
+ this.T = 1;
model = scicos_model();
model.sim = list("delayv",1);
- model.in1 = [[nin],[1]];
- model.out = nin;
+ model.in1 = [[this.nin],[1]];
+ model.out = this.nin;
model.evtin = 1;
model.evtout = [[1],[1]];
model.dstate = z0;
- model.rpar = T/(size(zz0,"*"));
+ model.rpar = this.T/(size(this.zz0,"*"));
model.blocktype = "d";
model.firing = [0,-1];
model.dep_ut = [true,false];
- exprs = [[string(nin)],[strcat(string(z0.slice(1-1,$-1)),";")],[string(T)]];
+ exprs = [[string(this.nin)],[strcat(string(z0.slice(1-1,$-1)),";")],[string(this.T)]];
gr_i = [];
this.x = standard_define([3,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -31,30 +31,30 @@ function DELAYV_f() {
graphics = arg1.graphics;
exprs = graphics.exprs;
model = arg1.model;
- nin = model.in1[1-1];
+ this.nin = model.in1[1-1];
z0 = model.dstate;
- zz0 = z0.slice(1-1,$-1);
+ this.zz0 = z0.slice(1-1,$-1);
told = z0[$-1];
while (true) {
- [ok,nin,zz0,T,exprs] = scicos_getvalue("Set delay parameters",[["Number of inputs"],["Register initial condition"],["Max delay"]],list("vec",1,"vec",-1,"vec",1),exprs);
+ [ok,this.nin,this.zz0,this.T,exprs] = scicos_getvalue("Set delay parameters",[["Number of inputs"],["Register initial condition"],["Max delay"]],list("vec",1,"vec",-1,"vec",1),exprs);
if (!ok) {
break;
}
- if (size(zz0,"*")<2) {
+ if (size(this.zz0,"*")<2) {
message("Register length must be at least 2");
ok = false;
}
- if (T<=0) {
+ if (this.T<=0) {
message("Delay must be positive");
ok = false;
}
if (ok) {
- [model,graphics,ok] = check_io(model,graphics,[[nin],[1]],nin,1,[[1],[1]]);
+ [model,graphics,ok] = check_io(model,graphics,[[this.nin],[1]],this.nin,1,[[1],[1]]);
}
if (ok) {
graphics.exprs = exprs;
- model.dstate = [[zz0.slice()],[told]];
- model.rpar = T/(size(zz0,"*"));
+ model.dstate = [[this.zz0.slice()],[told]];
+ model.rpar = this.T/(size(this.zz0,"*"));
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Linear/DELAYV_f.pickle b/js/Linear/DELAYV_f.pickle
index 0d1dde24..561006af 100644
--- a/js/Linear/DELAYV_f.pickle
+++ b/js/Linear/DELAYV_f.pickle
@@ -4,6 +4,12 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'nin'
+p3
+aS'T'
+p4
+aS'zz0'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/Linear/DELAY_f.js b/js/Linear/DELAY_f.js
index fb07b5bf..62b730f2 100644
--- a/js/Linear/DELAY_f.js
+++ b/js/Linear/DELAY_f.js
@@ -92,16 +92,16 @@ function DELAY_f() {
evtdly_exprs = evtdly.graphics.exprs;
exprs = [[evtdly_exprs[1-1]],[register_exprs]];
while (true) {
- [ok,dt,z0,exprs] = scicos_getvalue([["This block implements as a discretized delay"],["it is consist of a shift register and a clock"],["value of the delay is given by;","the discretization time step multiplied by the"],["number-1 of state of the register"]],[["Discretization time step"],["Register initial state"]],list("vec",1,"vec",-1),exprs);
+ [ok,this.dt,this.z0,exprs] = scicos_getvalue([["This block implements as a discretized delay"],["it is consist of a shift register and a clock"],["value of the delay is given by;","the discretization time step multiplied by the"],["number-1 of state of the register"]],[["Discretization time step"],["Register initial state"]],list("vec",1,"vec",-1),exprs);
if (!ok) {
break;
}
mess = [];
- if (prod(size(z0))<1) {
+ if (prod(size(this.z0))<1) {
mess = [[mess],["Register length must be at least 1"],[" "]];
ok = false;
}
- if (dt<=0) {
+ if (this.dt<=0) {
mess = [[mess],["Discretization time step must be positive"],[" "]];
ok = false;
}
@@ -109,14 +109,14 @@ function DELAY_f() {
message(mess);
} else {
evtdly.graphics.exprs[1-1] = exprs[1-1];
- if (evtdly.model.rpar!=dt) {
- evtdly.model.rpar = dt;
+ if (evtdly.model.rpar!=this.dt) {
+ evtdly.model.rpar = this.dt;
newpar[$+1-1] = ppath[2-1];
}
this.x.model.rpar.objs[ppath[2-1]-1] = evtdly;
register.graphics.exprs = exprs[2-1];
- if (or(register.model.dstate!=z0.slice())) {
- register.model.dstate = z0.slice();
+ if (or(register.model.dstate!=this.z0.slice())) {
+ register.model.dstate = this.z0.slice();
newpar[$+1-1] = ppath[1-1];
}
this.x.model.rpar.objs[ppath[1-1]-1] = register;
diff --git a/js/Linear/DELAY_f.pickle b/js/Linear/DELAY_f.pickle
index 0d1dde24..0c851782 100644
--- a/js/Linear/DELAY_f.pickle
+++ b/js/Linear/DELAY_f.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'dt'
+p3
+aS'z0'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Linear/DIFF_c.js b/js/Linear/DIFF_c.js
index 42abb23c..c8cd5202 100644
--- a/js/Linear/DIFF_c.js
+++ b/js/Linear/DIFF_c.js
@@ -1,15 +1,15 @@
/* autogenerated from "macros/Linear/DIFF_c.sci" */
function DIFF_c() {
DIFF_c.prototype.define = function DIFF_c() {
- x0 = [[0],[0]];
+ this.x0 = [[0],[0]];
model = scicos_model();
model.sim = list("diffblk_c",10004);
model.in1 = 1;
model.out = 1;
- model.state = x0;
+ model.state = this.x0;
model.blocktype = "c";
model.dep_ut = [false,true];
- exprs = [[strcat(sci2exp(x0[1-1]))],[strcat(sci2exp(x0[2-1]))]];
+ exprs = [[strcat(sci2exp(this.x0[1-1]))],[strcat(sci2exp(this.x0[2-1]))]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -26,14 +26,14 @@ function DIFF_c() {
model = arg1.model;
while (true) {
ask_again = false;
- [ok,x0,xd0,exprs] = scicos_getvalue("Set continuous linear system parameters",[["Initial state"],["Initial Derivative"]],list("vec",-1,"vec",-1),exprs);
+ [ok,this.x0,this.xd0,exprs] = scicos_getvalue("Set continuous linear system parameters",[["Initial state"],["Initial Derivative"]],list("vec",-1,"vec",-1),exprs);
if (!ok) {
break;
}
- x0 = x0.slice();
- N = size(x0,"*");
- xd0 = xd0.slice();
- Nxd = size(xd0,"*");
+ this.x0 = this.x0.slice();
+ N = size(this.x0,"*");
+ this.xd0 = this.xd0.slice();
+ Nxd = size(this.xd0,"*");
if ((N!=Nxd)) {
message("Incompatible sizes: states and their derivatives should have the same size ");
ask_again = true;
@@ -44,7 +44,7 @@ function DIFF_c() {
}
if (!ask_again) {
graphics.exprs = exprs;
- model.state = [[x0],[xd0]];
+ model.state = [[this.x0],[this.xd0]];
model.out = [N];
model.in1 = N;
this.x.graphics = graphics;
diff --git a/js/Linear/DIFF_c.pickle b/js/Linear/DIFF_c.pickle
index 0d1dde24..59a4988d 100644
--- a/js/Linear/DIFF_c.pickle
+++ b/js/Linear/DIFF_c.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'x0'
+p3
+aS'xd0'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Linear/DLR.js b/js/Linear/DLR.js
index 2b06bb91..2cb1afd8 100644
--- a/js/Linear/DLR.js
+++ b/js/Linear/DLR.js
@@ -35,16 +35,16 @@ function DLR() {
PREVAR_scicos_context = PREVAR_scicos_context;
PREVAR_scicos_context.z = %z;
while (true) {
- [ok,num,den,exprs] = scicos_getvalue("Set discrete SISO transfer parameters",[["Numerator (z)"],["Denominator (z)"]],list("pol",1,"pol",1),exprs);
+ [ok,this.num,this.den,exprs] = scicos_getvalue("Set discrete SISO transfer parameters",[["Numerator (z)"],["Denominator (z)"]],list("pol",1,"pol",1),exprs);
if (!ok) {
break;
}
- if (degree(num)>degree(den)) {
+ if (degree(this.num)>degree(this.den)) {
message("Transfer function must be proper");
ok = false;
}
if (ok) {
- H = cont_frm(num,den);
+ H = cont_frm(this.num,this.den);
[A,B,C,D] = H.slice(2-1,5);
graphics.exprs = exprs;
[ns1,ns1] = size(A);
diff --git a/js/Linear/DLR.pickle b/js/Linear/DLR.pickle
index 0d1dde24..d96b225c 100644
--- a/js/Linear/DLR.pickle
+++ b/js/Linear/DLR.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'num'
+p3
+aS'den'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Linear/DLR_f.js b/js/Linear/DLR_f.js
index 93e2925a..9b06c9e1 100644
--- a/js/Linear/DLR_f.js
+++ b/js/Linear/DLR_f.js
@@ -35,16 +35,16 @@ function DLR_f() {
PREVAR_scicos_context = PREVAR_scicos_context;
PREVAR_scicos_context.z = %z;
while (true) {
- [ok,num,den,exprs] = scicos_getvalue("Set discrete SISO transfer parameters",[["Numerator (z)"],["Denominator (z)"]],list("pol",1,"pol",1),exprs);
+ [ok,this.num,this.den,exprs] = scicos_getvalue("Set discrete SISO transfer parameters",[["Numerator (z)"],["Denominator (z)"]],list("pol",1,"pol",1),exprs);
if (!ok) {
break;
}
- if (degree(num)>degree(den)) {
+ if (degree(this.num)>degree(this.den)) {
message("Transfer must be proper");
ok = false;
}
if (ok) {
- H = cont_frm(num,den);
+ H = cont_frm(this.num,this.den);
[A,B,C,D] = H.slice(2-1,5);
graphics.exprs = exprs;
[ns1,ns1] = size(A);
diff --git a/js/Linear/DLR_f.pickle b/js/Linear/DLR_f.pickle
index 0d1dde24..d96b225c 100644
--- a/js/Linear/DLR_f.pickle
+++ b/js/Linear/DLR_f.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'num'
+p3
+aS'den'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Linear/DLSS.js b/js/Linear/DLSS.js
index a8d79e8e..43fddcd5 100644
--- a/js/Linear/DLSS.js
+++ b/js/Linear/DLSS.js
@@ -1,21 +1,21 @@
/* autogenerated from "macros/Linear/DLSS.sci" */
function DLSS() {
DLSS.prototype.define = function DLSS() {
- x0 = 0;
- A = -1;
- B = 1;
- C = 1;
- D = 0;
+ this.x0 = 0;
+ this.A = -1;
+ this.B = 1;
+ this.C = 1;
+ this.D = 0;
model = scicos_model();
model.sim = list("dsslti4",4);
model.in1 = 1;
model.out = 1;
model.evtin = 1;
- model.dstate = x0.slice();
- model.rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
+ model.dstate = this.x0.slice();
+ model.rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
model.blocktype = "d";
model.dep_ut = [false,false];
- exprs = [[strcat(sci2exp(A))],[strcat(sci2exp(B))],[strcat(sci2exp(C))],[strcat(sci2exp(D))],[strcat(sci2exp(x0))]];
+ exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
gr_i = [];
this.x = standard_define([4,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -34,25 +34,25 @@ function DLSS() {
}
model = arg1.model;
while (true) {
- [ok,A,B,C,D,x0,exprs] = scicos_getvalue("Set discrete linear system parameters",[["A matrix"],["B matrix"],["C matrix"],["D matrix"],["Initial state"]],list("mat",[-1,-1],"mat",["size(%1,2)","-1"],"mat",["-1","size(%1,2)"],"mat",[-1,-1],"vec","size(%1,2)"),exprs);
+ [ok,this.A,this.B,this.C,this.D,this.x0,exprs] = scicos_getvalue("Set discrete linear system parameters",[["A matrix"],["B matrix"],["C matrix"],["D matrix"],["Initial state"]],list("mat",[-1,-1],"mat",["size(%1,2)","-1"],"mat",["-1","size(%1,2)"],"mat",[-1,-1],"vec","size(%1,2)"),exprs);
if (!ok) {
break;
}
- out = size(C,1);
+ out = size(this.C,1);
if (out==0) {
out = [];
}
- in1 = size(B,2);
+ in1 = size(this.B,2);
if (in1==0) {
in1 = [];
}
- [ms,ns] = size(A);
+ [ms,ns] = size(this.A);
okD = true;
- if (size(D,"*")!=size(C,1)*size(B,2)) {
- if (size(D,"*")==1) {
- D = D*ones(C*B);
- } else if (size(D,"*")==0) {
- D = zeros(C*B);
+ if (size(this.D,"*")!=size(this.C,1)*size(this.B,2)) {
+ if (size(this.D,"*")==1) {
+ this.D = this.D*ones(this.C*this.B);
+ } else if (size(this.D,"*")==0) {
+ this.D = zeros(this.C*this.B);
} else {
okD = false;
}
@@ -63,9 +63,9 @@ function DLSS() {
[model,graphics,ok] = check_io(model,graphics,in1,out,1,[]);
if (ok) {
graphics.exprs = exprs;
- rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
- if (D!=[]) {
- if (norm(D,1)!=0) {
+ rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
+ if (this.D!=[]) {
+ if (norm(this.D,1)!=0) {
mmm = [true,false];
} else {
mmm = [false,false];
@@ -76,7 +76,7 @@ function DLSS() {
} else {
model.dep_ut = [false,false];
}
- model.dstate = x0.slice();
+ model.dstate = this.x0.slice();
model.rpar = rpar;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Linear/DLSS.pickle b/js/Linear/DLSS.pickle
index 0d1dde24..a63da39b 100644
--- a/js/Linear/DLSS.pickle
+++ b/js/Linear/DLSS.pickle
@@ -2,8 +2,18 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'A'
p2
-atp3
-Rp4
+aS'C'
+p3
+aS'B'
+p4
+aS'D'
+p5
+aS'x'
+p6
+aS'x0'
+p7
+atp8
+Rp9
. \ No newline at end of file
diff --git a/js/Linear/DLSS_f.js b/js/Linear/DLSS_f.js
index 5f138020..f90a3df0 100644
--- a/js/Linear/DLSS_f.js
+++ b/js/Linear/DLSS_f.js
@@ -1,21 +1,21 @@
/* autogenerated from "macros/Linear/DLSS_f.sci" */
function DLSS_f() {
DLSS_f.prototype.define = function DLSS_f() {
- x0 = 0;
- A = -1;
- B = 1;
- C = 1;
- D = 0;
+ this.x0 = 0;
+ this.A = -1;
+ this.B = 1;
+ this.C = 1;
+ this.D = 0;
model = scicos_model();
model.sim = list("dsslti",1);
model.in1 = 1;
model.out = 1;
model.evtin = 1;
- model.dstate = x0.slice();
- model.rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
+ model.dstate = this.x0.slice();
+ model.rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
model.blocktype = "d";
model.dep_ut = [false,false];
- exprs = [[strcat(sci2exp(A))],[strcat(sci2exp(B))],[strcat(sci2exp(C))],[strcat(sci2exp(D))],[strcat(sci2exp(x0))]];
+ exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
gr_i = [];
this.x = standard_define([4,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -34,28 +34,28 @@ function DLSS_f() {
}
model = arg1.model;
while (true) {
- [ok,A,B,C,D,x0,exprs] = scicos_getvalue("Set discrete linear system parameters",[["A matrix"],["B matrix"],["C matrix"],["D matrix"],["Initial state"]],list("mat",[-1,-1],"mat",["size(%1,2)","-1"],"mat",["-1","size(%1,2)"],"mat",[-1,-1],"vec","size(%1,2)"),exprs);
+ [ok,this.A,this.B,this.C,this.D,this.x0,exprs] = scicos_getvalue("Set discrete linear system parameters",[["A matrix"],["B matrix"],["C matrix"],["D matrix"],["Initial state"]],list("mat",[-1,-1],"mat",["size(%1,2)","-1"],"mat",["-1","size(%1,2)"],"mat",[-1,-1],"vec","size(%1,2)"),exprs);
if (!ok) {
break;
}
- out = size(C,1);
+ out = size(this.C,1);
if (out==0) {
out = [];
}
- in1 = size(B,2);
+ in1 = size(this.B,2);
if (in1==0) {
in1 = [];
}
- [ms,ns] = size(A);
+ [ms,ns] = size(this.A);
if (ms!=ns) {
message("A matrix must be square");
} else {
[model,graphics,ok] = check_io(model,graphics,in1,out,1,[]);
if (ok) {
graphics.exprs = exprs;
- rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
- if (D!=[]) {
- if (norm(D,1)!=0) {
+ rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
+ if (this.D!=[]) {
+ if (norm(this.D,1)!=0) {
mmm = [true,false];
} else {
mmm = [false,false];
@@ -66,7 +66,7 @@ function DLSS_f() {
} else {
model.dep_ut = [false,false];
}
- model.dstate = x0.slice();
+ model.dstate = this.x0.slice();
model.rpar = rpar;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Linear/DLSS_f.pickle b/js/Linear/DLSS_f.pickle
index 0d1dde24..a63da39b 100644
--- a/js/Linear/DLSS_f.pickle
+++ b/js/Linear/DLSS_f.pickle
@@ -2,8 +2,18 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'A'
p2
-atp3
-Rp4
+aS'C'
+p3
+aS'B'
+p4
+aS'D'
+p5
+aS'x'
+p6
+aS'x0'
+p7
+atp8
+Rp9
. \ No newline at end of file
diff --git a/js/Linear/DOLLAR.js b/js/Linear/DOLLAR.js
index f5b2186c..950b9b02 100644
--- a/js/Linear/DOLLAR.js
+++ b/js/Linear/DOLLAR.js
@@ -2,14 +2,14 @@
function DOLLAR() {
DOLLAR.prototype.define = function DOLLAR() {
z = 0;
- inh = 0;
+ this.inh = 0;
in1 = 1;
- exprs = string([[z],[inh]]);
+ exprs = string([[z],[this.inh]]);
model = scicos_model();
model.sim = list("dollar4",4);
model.in1 = in1;
model.out = in1;
- model.evtin = 1-inh;
+ model.evtin = 1-this.inh;
model.dstate = z;
model.blocktype = "d";
model.dep_ut = [false,false];
@@ -31,47 +31,47 @@ function DOLLAR() {
exprs[2-1] = "0";
}
while (true) {
- [ok,a,inh,exprs] = scicos_getvalue("Set 1/z block parameters",[["initial condition"],["Inherit (no:0, yes:1)"]],list("mat",[-1,-2],"vec",-1),exprs);
+ [ok,this.a,this.inh,exprs] = scicos_getvalue("Set 1/z block parameters",[["initial condition"],["Inherit (no:0, yes:1)"]],list("mat",[-1,-2],"vec",-1),exprs);
if (!ok) {
break;
}
- out = [size(a,1),size(a,2)];
+ out = [size(this.a,1),size(this.a,2)];
if (out==0) {
out = [];
}
in1 = out;
model.sim = list("dollar4_m",4);
- model.odstate = list(a);
+ model.odstate = list(this.a);
model.dstate = [];
- if (this.type[(a)==1-1]) {
- if (isreal(a)) {
+ if (this.type[(this.a)==1-1]) {
+ if (isreal(this.a)) {
it = 1;
ot = 1;
- if ((size(a,1)==1||size(a,2)==1)) {
+ if ((size(this.a,1)==1||size(this.a,2)==1)) {
model.sim = list("dollar4",4);
- model.dstate = a.slice();
+ model.dstate = this.a.slice();
model.odstate = list();
}
} else {
it = 2;
ot = 2;
}
- } else if ((typeof(a)=="int32")) {
+ } else if ((typeof(this.a)=="int32")) {
it = 3;
ot = 3;
- } else if ((typeof(a)=="int16")) {
+ } else if ((typeof(this.a)=="int16")) {
it = 4;
ot = 4;
- } else if ((typeof(a)=="int8")) {
+ } else if ((typeof(this.a)=="int8")) {
it = 5;
ot = 5;
- } else if ((typeof(a)=="uint32")) {
+ } else if ((typeof(this.a)=="uint32")) {
it = 6;
ot = 6;
- } else if ((typeof(a)=="uint16")) {
+ } else if ((typeof(this.a)=="uint16")) {
it = 7;
ot = 7;
- } else if ((typeof(a)=="uint8")) {
+ } else if ((typeof(this.a)=="uint8")) {
it = 8;
ot = 8;
} else {
@@ -79,7 +79,7 @@ function DOLLAR() {
ok = false;
}
if (ok) {
- [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),ones(1-inh,1),[]);
+ [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),ones(1-this.inh,1),[]);
}
if (ok) {
graphics.exprs = exprs;
diff --git a/js/Linear/DOLLAR.pickle b/js/Linear/DOLLAR.pickle
index 54a16ece..bf5abc50 100644
--- a/js/Linear/DOLLAR.pickle
+++ b/js/Linear/DOLLAR.pickle
@@ -2,10 +2,14 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'a'
p2
-aS'type'
+aS'x'
p3
-atp4
-Rp5
+aS'inh'
+p4
+aS'type'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/Linear/DOLLAR_f.js b/js/Linear/DOLLAR_f.js
index bdb02f50..a892a191 100644
--- a/js/Linear/DOLLAR_f.js
+++ b/js/Linear/DOLLAR_f.js
@@ -2,14 +2,14 @@
function DOLLAR_f() {
DOLLAR_f.prototype.define = function DOLLAR_f() {
z = 0;
- inh = 0;
+ this.inh = 0;
in1 = 1;
- exprs = string([[z],[inh]]);
+ exprs = string([[z],[this.inh]]);
model = scicos_model();
model.sim = "dollar";
model.in1 = in1;
model.out = in1;
- model.evtin = 1-inh;
+ model.evtin = 1-this.inh;
model.dstate = z;
model.blocktype = "d";
model.dep_ut = [false,false];
@@ -31,21 +31,21 @@ function DOLLAR_f() {
exprs[2-1] = "0";
}
while (true) {
- [ok,a,inh,exprs] = scicos_getvalue("Set 1/z block parameters",[["initial condition"],["Inherit (no:0, yes:1)"]],list("vec",-1,"vec",-1),exprs);
+ [ok,this.a,this.inh,exprs] = scicos_getvalue("Set 1/z block parameters",[["initial condition"],["Inherit (no:0, yes:1)"]],list("vec",-1,"vec",-1),exprs);
if (!ok) {
break;
}
- out = size(a,"*");
+ out = size(this.a,"*");
if (out==0) {
out = [];
}
in1 = out;
if (ok) {
- [model,graphics,ok] = check_io(model,graphics,-1,-1,ones(1-inh,1),[]);
+ [model,graphics,ok] = check_io(model,graphics,-1,-1,ones(1-this.inh,1),[]);
}
if (ok) {
graphics.exprs = exprs;
- model.dstate = a;
+ model.dstate = this.a;
model.in1 = in1;
model.out = out;
this.x.graphics = graphics;
diff --git a/js/Linear/DOLLAR_f.pickle b/js/Linear/DOLLAR_f.pickle
index 0d1dde24..c11db162 100644
--- a/js/Linear/DOLLAR_f.pickle
+++ b/js/Linear/DOLLAR_f.pickle
@@ -2,8 +2,12 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'a'
p2
-atp3
-Rp4
+aS'x'
+p3
+aS'inh'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Linear/DOLLAR_m.js b/js/Linear/DOLLAR_m.js
index 4593731b..a4c52390 100644
--- a/js/Linear/DOLLAR_m.js
+++ b/js/Linear/DOLLAR_m.js
@@ -2,14 +2,14 @@
function DOLLAR_m() {
DOLLAR_m.prototype.define = function DOLLAR_m() {
z = 0;
- inh = 0;
+ this.inh = 0;
in1 = 1;
- exprs = string([[z],[inh]]);
+ exprs = string([[z],[this.inh]]);
model = scicos_model();
model.sim = list("dollar4",4);
model.in1 = in1;
model.out = in1;
- model.evtin = 1-inh;
+ model.evtin = 1-this.inh;
model.dstate = z;
model.blocktype = "d";
model.dep_ut = [false,false];
@@ -31,47 +31,47 @@ function DOLLAR_m() {
exprs[2-1] = "0";
}
while (true) {
- [ok,a,inh,exprs] = scicos_getvalue("Set 1/z block parameters",[["initial condition"],["Inherit (no:0, yes:1)"]],list("mat",[-1,-2],"vec",-1),exprs);
+ [ok,this.a,this.inh,exprs] = scicos_getvalue("Set 1/z block parameters",[["initial condition"],["Inherit (no:0, yes:1)"]],list("mat",[-1,-2],"vec",-1),exprs);
if (!ok) {
break;
}
- out = [size(a,1),size(a,2)];
+ out = [size(this.a,1),size(this.a,2)];
if (out==0) {
out = [];
}
in1 = out;
model.sim = list("dollar4_m",4);
- model.odstate = list(a);
+ model.odstate = list(this.a);
model.dstate = [];
- if ((this.type[a-1]==1)) {
- if (isreal(a)) {
+ if ((this.type[this.a-1]==1)) {
+ if (isreal(this.a)) {
it = 1;
ot = 1;
- if ((size(a,1)==1||size(a,2)==1)) {
+ if ((size(this.a,1)==1||size(this.a,2)==1)) {
model.sim = list("dollar4",4);
- model.dstate = a.slice();
+ model.dstate = this.a.slice();
model.odstate = list();
}
} else {
it = 2;
ot = 2;
}
- } else if ((typeof(a)=="int32")) {
+ } else if ((typeof(this.a)=="int32")) {
it = 3;
ot = 3;
- } else if ((typeof(a)=="int16")) {
+ } else if ((typeof(this.a)=="int16")) {
it = 4;
ot = 4;
- } else if ((typeof(a)=="int8")) {
+ } else if ((typeof(this.a)=="int8")) {
it = 5;
ot = 5;
- } else if ((typeof(a)=="uint32")) {
+ } else if ((typeof(this.a)=="uint32")) {
it = 6;
ot = 6;
- } else if ((typeof(a)=="uint16")) {
+ } else if ((typeof(this.a)=="uint16")) {
it = 7;
ot = 7;
- } else if ((typeof(a)=="uint8")) {
+ } else if ((typeof(this.a)=="uint8")) {
it = 8;
ot = 8;
} else {
@@ -79,7 +79,7 @@ function DOLLAR_m() {
ok = false;
}
if (ok) {
- [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),ones(1-inh,1),[]);
+ [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),ones(1-this.inh,1),[]);
}
if (ok) {
graphics.exprs = exprs;
diff --git a/js/Linear/DOLLAR_m.pickle b/js/Linear/DOLLAR_m.pickle
index 54a16ece..bf5abc50 100644
--- a/js/Linear/DOLLAR_m.pickle
+++ b/js/Linear/DOLLAR_m.pickle
@@ -2,10 +2,14 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'a'
p2
-aS'type'
+aS'x'
p3
-atp4
-Rp5
+aS'inh'
+p4
+aS'type'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/Linear/GAINBLK.js b/js/Linear/GAINBLK.js
index 54f2883e..f3dc5f21 100644
--- a/js/Linear/GAINBLK.js
+++ b/js/Linear/GAINBLK.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Linear/GAINBLK.sci" */
function GAINBLK() {
GAINBLK.prototype.define = function GAINBLK() {
- gain = 1;
+ this.gain = 1;
in1 = -1;
out = -1;
in2 = -2;
@@ -12,10 +12,10 @@ function GAINBLK() {
model.out = out;
model.in2 = in2;
model.out2 = out2;
- model.rpar = gain;
+ model.rpar = this.gain;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [strcat(sci2exp(gain))];
+ exprs = [strcat(sci2exp(this.gain))];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -34,88 +34,88 @@ function GAINBLK() {
exprs = [[exprs],[sci2exp(0)]];
}
while (true) {
- [ok,gain,over,exprs] = scicos_getvalue("Set gain block parameters",[["Gain"],["Do On Overflow(0=Nothing 1=Saturate 2=Error)"]],list("mat",[-1,-1],"vec",1),exprs);
+ [ok,this.gain,this.over,exprs] = scicos_getvalue("Set gain block parameters",[["Gain"],["Do On Overflow(0=Nothing 1=Saturate 2=Error)"]],list("mat",[-1,-1],"vec",1),exprs);
if (!ok) {
break;
}
- if (gain==[]) {
+ if (this.gain==[]) {
message("Gain must have at least one element");
} else {
- if (typeof(gain)=="constant") {
- if (isreal(gain)) {
+ if (typeof(this.gain)=="constant") {
+ if (isreal(this.gain)) {
it = 1;
ot = 1;
model.sim = list("gainblk",4);
- model.rpar = gain.slice();
+ model.rpar = this.gain.slice();
model.opar = list();
} else {
message("type is not supported");
ok = false;
}
} else {
- if ((over==0)) {
- if ((typeof(gain)=="int32")) {
+ if ((this.over==0)) {
+ if ((typeof(this.gain)=="int32")) {
ot = 3;
model.sim = list("gainblk_i32n",4);
- } else if ((typeof(gain)=="int16")) {
+ } else if ((typeof(this.gain)=="int16")) {
ot = 4;
model.sim = list("gainblk_i16n",4);
- } else if ((typeof(gain)=="int8")) {
+ } else if ((typeof(this.gain)=="int8")) {
ot = 5;
model.sim = list("gainblk_i8n",4);
- } else if ((typeof(gain)=="uint32")) {
+ } else if ((typeof(this.gain)=="uint32")) {
ot = 6;
model.sim = list("gainblk_ui32n",4);
- } else if ((typeof(gain)=="uint16")) {
+ } else if ((typeof(this.gain)=="uint16")) {
ot = 7;
model.sim = list("gainblk_ui16n",4);
- } else if ((typeof(gain)=="uint8")) {
+ } else if ((typeof(this.gain)=="uint8")) {
ot = 8;
model.sim = list("gainblk_ui8n",4);
} else {
message("type is not supported.");
ok = false;
}
- } else if ((over==1)) {
- if ((typeof(gain)=="int32")) {
+ } else if ((this.over==1)) {
+ if ((typeof(this.gain)=="int32")) {
ot = 3;
model.sim = list("gainblk_i32s",4);
- } else if ((typeof(gain)=="int16")) {
+ } else if ((typeof(this.gain)=="int16")) {
ot = 4;
model.sim = list("gainblk_i16s",4);
- } else if ((typeof(gain)=="int8")) {
+ } else if ((typeof(this.gain)=="int8")) {
ot = 5;
model.sim = list("gainblk_i8s",4);
- } else if ((typeof(gain)=="uint32")) {
+ } else if ((typeof(this.gain)=="uint32")) {
ot = 6;
model.sim = list("gainblk_ui32s",4);
- } else if ((typeof(gain)=="uint16")) {
+ } else if ((typeof(this.gain)=="uint16")) {
ot = 7;
model.sim = list("gainblk_ui16s",4);
- } else if ((typeof(gain)=="uint8")) {
+ } else if ((typeof(this.gain)=="uint8")) {
ot = 8;
model.sim = list("gainblk_ui8s",4);
} else {
message("type is not supported.");
ok = false;
}
- } else if ((over==2)) {
- if ((typeof(gain)=="int32")) {
+ } else if ((this.over==2)) {
+ if ((typeof(this.gain)=="int32")) {
ot = 3;
model.sim = list("gainblk_i32e",4);
- } else if ((typeof(gain)=="int16")) {
+ } else if ((typeof(this.gain)=="int16")) {
ot = 4;
model.sim = list("gainblk_i16e",4);
- } else if ((typeof(gain)=="int8")) {
+ } else if ((typeof(this.gain)=="int8")) {
ot = 5;
model.sim = list("gainblk_i8e",4);
- } else if ((typeof(gain)=="uint32")) {
+ } else if ((typeof(this.gain)=="uint32")) {
ot = 6;
model.sim = list("gainblk_ui32e",4);
- } else if ((typeof(gain)=="uint16")) {
+ } else if ((typeof(this.gain)=="uint16")) {
ot = 7;
model.sim = list("gainblk_ui16e",4);
- } else if ((typeof(gain)=="uint8")) {
+ } else if ((typeof(this.gain)=="uint8")) {
ot = 8;
model.sim = list("gainblk_ui8e",4);
} else {
@@ -127,10 +127,10 @@ function GAINBLK() {
ok = false;
}
model.rpar = [];
- model.opar = list(gain.slice());
+ model.opar = list(this.gain.slice());
}
if (ok) {
- [out,in1] = size(gain);
+ [out,in1] = size(this.gain);
if (out*in1!=1) {
[model,graphics,ok] = set_io(model,graphics,list([in1,-1],ot),list([out,-1],ot),[],[]);
} else {
diff --git a/js/Linear/GAINBLK.pickle b/js/Linear/GAINBLK.pickle
index 0d1dde24..d56a68c8 100644
--- a/js/Linear/GAINBLK.pickle
+++ b/js/Linear/GAINBLK.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'over'
+p3
+aS'gain'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Linear/GAINBLK_f.js b/js/Linear/GAINBLK_f.js
index cad23a75..55f816d0 100644
--- a/js/Linear/GAINBLK_f.js
+++ b/js/Linear/GAINBLK_f.js
@@ -1,17 +1,17 @@
/* autogenerated from "macros/Linear/GAINBLK_f.sci" */
function GAINBLK_f() {
GAINBLK_f.prototype.define = function GAINBLK_f() {
- gain = 1;
+ this.gain = 1;
in1 = 1;
out = 1;
model = scicos_model();
model.sim = "gain";
model.in1 = in1;
model.out = out;
- model.rpar = gain;
+ model.rpar = this.gain;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [strcat(sci2exp(gain))];
+ exprs = [strcat(sci2exp(this.gain))];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -27,18 +27,18 @@ function GAINBLK_f() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,gain,exprs] = scicos_getvalue("Set gain block parameters",["Gain"],list("mat",[-1,-1]),exprs[1-1]);
+ [ok,this.gain,exprs] = scicos_getvalue("Set gain block parameters",["Gain"],list("mat",[-1,-1]),exprs[1-1]);
if (!ok) {
break;
}
- if (gain==[]) {
+ if (this.gain==[]) {
message("Gain must have at least one element");
} else {
- [out,in1] = size(gain);
+ [out,in1] = size(this.gain);
[model,graphics,ok] = check_io(model,graphics,in1,out,[],[]);
if (ok) {
graphics.exprs = exprs;
- model.rpar = gain.slice();
+ model.rpar = this.gain.slice();
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Linear/GAINBLK_f.pickle b/js/Linear/GAINBLK_f.pickle
index 0d1dde24..ccf9a9b1 100644
--- a/js/Linear/GAINBLK_f.pickle
+++ b/js/Linear/GAINBLK_f.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'gain'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Linear/GAIN_f.js b/js/Linear/GAIN_f.js
index 5188382b..3a722b6f 100644
--- a/js/Linear/GAIN_f.js
+++ b/js/Linear/GAIN_f.js
@@ -1,17 +1,17 @@
/* autogenerated from "macros/Linear/GAIN_f.sci" */
function GAIN_f() {
GAIN_f.prototype.define = function GAIN_f() {
- gain = 1;
+ this.gain = 1;
in1 = 1;
out = 1;
model = scicos_model();
model.sim = "gain";
model.in1 = 1;
model.out = 1;
- model.rpar = gain;
+ model.rpar = this.gain;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [[strcat(sci2exp(gain))],[strcat(sci2exp(in1))],[strcat(sci2exp(out))]];
+ exprs = [[strcat(sci2exp(this.gain))],[strcat(sci2exp(in1))],[strcat(sci2exp(out))]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -27,18 +27,18 @@ function GAIN_f() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,gain,exprs] = scicos_getvalue("Set gain block parameters",["Gain"],list("mat",[-1,-1]),exprs[1-1]);
+ [ok,this.gain,exprs] = scicos_getvalue("Set gain block parameters",["Gain"],list("mat",[-1,-1]),exprs[1-1]);
if (!ok) {
break;
}
- if (gain==[]) {
+ if (this.gain==[]) {
message("Gain must have at least one element");
} else {
- [out,in1] = size(gain);
+ [out,in1] = size(this.gain);
[model,graphics,ok] = check_io(model,graphics,in1,out,[],[]);
if (ok) {
graphics.exprs = exprs;
- model.rpar = gain.slice();
+ model.rpar = this.gain.slice();
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Linear/GAIN_f.pickle b/js/Linear/GAIN_f.pickle
index 0d1dde24..ccf9a9b1 100644
--- a/js/Linear/GAIN_f.pickle
+++ b/js/Linear/GAIN_f.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'gain'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Linear/INTEGRAL.js b/js/Linear/INTEGRAL.js
index 12b96030..281555c3 100644
--- a/js/Linear/INTEGRAL.js
+++ b/js/Linear/INTEGRAL.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Linear/INTEGRAL.sci" */
function INTEGRAL() {
INTEGRAL.prototype.define = function INTEGRAL() {
- maxp = 1;
+ this.maxp = 1;
minp = -1;
rpar = [];
model = scicos_model();
@@ -12,7 +12,7 @@ function INTEGRAL() {
model.rpar = rpar;
model.blocktype = "c";
model.dep_ut = [false,true];
- exprs = string([[0],[0],[0],[maxp],[minp]]);
+ exprs = string([[0],[0],[0],[this.maxp],[minp]]);
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
this.x.graphics.id = "1/s";
@@ -29,37 +29,37 @@ function INTEGRAL() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,x0,reinit,satur,maxp,lowp,exprs] = scicos_getvalue("Set Integral block parameters",[["Initial Condition"],["With re-intialization (1:yes, 0:no)"],["With saturation (1:yes, 0:no)"],["Upper limit"],["Lower limit"]],list("vec",-1,"vec",1,"vec",1,"vec",-1,"vec",-1),exprs);
+ [ok,this.x0,this.reinit,this.satur,this.maxp,this.lowp,exprs] = scicos_getvalue("Set Integral block parameters",[["Initial Condition"],["With re-intialization (1:yes, 0:no)"],["With saturation (1:yes, 0:no)"],["Upper limit"],["Lower limit"]],list("vec",-1,"vec",1,"vec",1,"vec",-1,"vec",-1),exprs);
if (!ok) {
break;
}
- x0 = x0.slice();
- maxp = maxp.slice();
- lowp = lowp.slice();
- if (reinit!=0) {
- reinit = 1;
+ this.x0 = this.x0.slice();
+ this.maxp = this.maxp.slice();
+ this.lowp = this.lowp.slice();
+ if (this.reinit!=0) {
+ this.reinit = 1;
}
- if (satur!=0) {
- satur = 1;
- if (size(maxp,"*")==1) {
- maxp = maxp*ones(x0);
+ if (this.satur!=0) {
+ this.satur = 1;
+ if (size(this.maxp,"*")==1) {
+ this.maxp = this.maxp*ones(this.x0);
}
- if (size(lowp,"*")==1) {
- lowp = lowp*ones(x0);
+ if (size(this.lowp,"*")==1) {
+ this.lowp = this.lowp*ones(this.x0);
}
- if ((size(x0,1)!=size(maxp,1)||size(x0,1)!=size(lowp,1))) {
+ if ((size(this.x0,1)!=size(this.maxp,1)||size(this.x0,1)!=size(this.lowp,1))) {
message("x0 and Upper limit and Lower limit must have same size");
ok = false;
- } else if (or(maxp<=lowp)) {
+ } else if (or(this.maxp<=this.lowp)) {
message("Upper limits must be > Lower limits");
ok = false;
- } else if (or(x0>maxp)||or(x0<lowp)) {
+ } else if (or(this.x0>this.maxp)||or(this.x0<this.lowp)) {
message("Initial condition x0 should be inside the limits");
ok = false;
} else {
- rpar = [[maxp],[lowp]];
- model.nzcross = size(x0,1);
- model.nmode = size(x0,1);
+ rpar = [[this.maxp],[this.lowp]];
+ model.nzcross = size(this.x0,1);
+ model.nmode = size(this.x0,1);
}
} else {
rpar = [];
@@ -68,8 +68,8 @@ function INTEGRAL() {
}
if (ok) {
model.rpar = rpar;
- model.state = x0;
- [model,graphics,ok] = check_io(model,graphics,size(x0,1)*[[1],[ones(reinit,1)]],size(x0,1),ones(reinit,1),[]);
+ model.state = this.x0;
+ [model,graphics,ok] = check_io(model,graphics,size(this.x0,1)*[[1],[ones(this.reinit,1)]],size(this.x0,1),ones(this.reinit,1),[]);
}
if (ok) {
graphics.exprs = exprs;
diff --git a/js/Linear/INTEGRAL.pickle b/js/Linear/INTEGRAL.pickle
index 0d1dde24..32ad86b3 100644
--- a/js/Linear/INTEGRAL.pickle
+++ b/js/Linear/INTEGRAL.pickle
@@ -2,8 +2,18 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'maxp'
p2
-atp3
-Rp4
+aS'reinit'
+p3
+aS'satur'
+p4
+aS'lowp'
+p5
+aS'x'
+p6
+aS'x0'
+p7
+atp8
+Rp9
. \ No newline at end of file
diff --git a/js/Linear/INTEGRAL_f.js b/js/Linear/INTEGRAL_f.js
index 4f62850c..155617c8 100644
--- a/js/Linear/INTEGRAL_f.js
+++ b/js/Linear/INTEGRAL_f.js
@@ -1,15 +1,15 @@
/* autogenerated from "macros/Linear/INTEGRAL_f.sci" */
function INTEGRAL_f() {
INTEGRAL_f.prototype.define = function INTEGRAL_f() {
- x0 = 0;
+ this.x0 = 0;
model = scicos_model();
model.sim = "integr";
model.in1 = 1;
model.out = 1;
- model.state = x0;
+ model.state = this.x0;
model.blocktype = "c";
model.dep_ut = [false,true];
- exprs = strcat(sci2exp(x0));
+ exprs = strcat(sci2exp(this.x0));
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -25,12 +25,12 @@ function INTEGRAL_f() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,x0,exprs] = scicos_getvalue("Set continuous linear system parameters","Initial state",list("vec",1),exprs);
+ [ok,this.x0,exprs] = scicos_getvalue("Set continuous linear system parameters","Initial state",list("vec",1),exprs);
if (!ok) {
break;
}
graphics.exprs = exprs;
- model.state = x0;
+ model.state = this.x0;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Linear/INTEGRAL_f.pickle b/js/Linear/INTEGRAL_f.pickle
index 0d1dde24..f41d682d 100644
--- a/js/Linear/INTEGRAL_f.pickle
+++ b/js/Linear/INTEGRAL_f.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'x0'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Linear/INTEGRAL_m.js b/js/Linear/INTEGRAL_m.js
index a065917a..ba1620bc 100644
--- a/js/Linear/INTEGRAL_m.js
+++ b/js/Linear/INTEGRAL_m.js
@@ -1,7 +1,7 @@
/* autogenerated from "macros/Linear/INTEGRAL_m.sci" */
function INTEGRAL_m() {
INTEGRAL_m.prototype.define = function INTEGRAL_m() {
- maxp = 1;
+ this.maxp = 1;
minp = -1;
rpar = [];
model = scicos_model();
@@ -14,7 +14,7 @@ function INTEGRAL_m() {
model.rpar = rpar;
model.blocktype = "c";
model.dep_ut = [false,true];
- exprs = string([[0],[0],[0],[maxp],[minp]]);
+ exprs = string([[0],[0],[0],[this.maxp],[minp]]);
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -30,61 +30,61 @@ function INTEGRAL_m() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,x0,reinit,satur,maxp,lowp,exprs] = scicos_getvalue("Set Integral block parameters",[["Initial Condition"],["With re-intialization (1:yes, 0:no)"],["With saturation (1:yes, 0:no)"],["Upper limit"],["Lower limit"]],list("mat",[-1,-1],"vec",1,"vec",1,"mat",[-1,-1],"mat",[-1,-1]),exprs);
+ [ok,this.x0,this.reinit,this.satur,this.maxp,this.lowp,exprs] = scicos_getvalue("Set Integral block parameters",[["Initial Condition"],["With re-intialization (1:yes, 0:no)"],["With saturation (1:yes, 0:no)"],["Upper limit"],["Lower limit"]],list("mat",[-1,-1],"vec",1,"vec",1,"mat",[-1,-1],"mat",[-1,-1]),exprs);
if (!ok) {
break;
}
- if (isreal(x0)) {
+ if (isreal(this.x0)) {
Datatype = 1;
} else {
Datatype = 2;
}
- if (reinit!=0) {
- reinit = 1;
+ if (this.reinit!=0) {
+ this.reinit = 1;
}
- if (satur!=0) {
- satur = 1;
+ if (this.satur!=0) {
+ this.satur = 1;
if (Datatype==1) {
- if (size(maxp,"*")==1) {
- maxp = maxp*ones(x0);
+ if (size(this.maxp,"*")==1) {
+ this.maxp = this.maxp*ones(this.x0);
}
- if (size(lowp,"*")==1) {
- lowp = lowp*ones(x0);
+ if (size(this.lowp,"*")==1) {
+ this.lowp = this.lowp*ones(this.x0);
}
- if ((size(x0)!=size(maxp)||size(x0)!=size(lowp))) {
+ if ((size(this.x0)!=size(this.maxp)||size(this.x0)!=size(this.lowp))) {
message("x0 and Upper limit and Lower limit must have same size");
ok = false;
- } else if (or(maxp<=lowp)) {
+ } else if (or(this.maxp<=this.lowp)) {
message("Upper limits must be > Lower limits");
ok = false;
- } else if (or(x0>maxp)||or(x0<lowp)) {
+ } else if (or(this.x0>this.maxp)||or(this.x0<this.lowp)) {
message("Initial condition x0 should be inside the limits");
ok = false;
} else {
- rpar = [[real(maxp.slice())],[real(lowp.slice())]];
- model.nzcross = size(x0,"*");
- model.nmode = size(x0,"*");
+ rpar = [[real(this.maxp.slice())],[real(this.lowp.slice())]];
+ model.nzcross = size(this.x0,"*");
+ model.nmode = size(this.x0,"*");
}
} else if ((Datatype==2)) {
- if (size(maxp,"*")==1) {
- maxp = math.complex(maxp*ones(x0),(maxp*ones(x0)));
+ if (size(this.maxp,"*")==1) {
+ this.maxp = math.complex(this.maxp*ones(this.x0),(this.maxp*ones(this.x0)));
}
- if (size(lowp,"*")==1) {
- lowp = math.complex(lowp*ones(x0),(lowp*ones(x0)));
+ if (size(this.lowp,"*")==1) {
+ this.lowp = math.complex(this.lowp*ones(this.x0),(this.lowp*ones(this.x0)));
}
- if ((size(x0)!=size(maxp)||size(x0)!=size(lowp))) {
+ if ((size(this.x0)!=size(this.maxp)||size(this.x0)!=size(this.lowp))) {
message("x0 and Upper limit and Lower limit must have same size");
ok = false;
- } else if (or(real(maxp)<=real(lowp))||or(imag(maxp)<=imag(lowp))) {
+ } else if (or(real(this.maxp)<=real(this.lowp))||or(imag(this.maxp)<=imag(this.lowp))) {
message("Upper limits must be > Lower limits");
ok = false;
- } else if (or(real(x0)>real(maxp))||or(real(x0)<real(lowp))||or(imag(x0)>imag(maxp))||or(imag(x0)<imag(lowp))) {
+ } else if (or(real(this.x0)>real(this.maxp))||or(real(this.x0)<real(this.lowp))||or(imag(this.x0)>imag(this.maxp))||or(imag(this.x0)<imag(this.lowp))) {
message("Initial condition x0 should be inside the limits");
ok = false;
} else {
- rpar = [[real(maxp.slice())],[real(lowp.slice())],[imag(maxp.slice())],[imag(lowp.slice())]];
- model.nzcross = 2*size(x0,"*");
- model.nmode = 2*size(x0,"*");
+ rpar = [[real(this.maxp.slice())],[real(this.lowp.slice())],[imag(this.maxp.slice())],[imag(this.lowp.slice())]];
+ model.nzcross = 2*size(this.x0,"*");
+ model.nmode = 2*size(this.x0,"*");
}
}
} else {
@@ -95,23 +95,23 @@ function INTEGRAL_m() {
if (ok) {
model.rpar = rpar;
if ((Datatype==1)) {
- model.state = real(x0.slice());
+ model.state = real(this.x0.slice());
model.sim = list("integral_func",4);
- it = [[1],[ones(reinit,1)]];
+ it = [[1],[ones(this.reinit,1)]];
ot = 1;
} else if ((Datatype==2)) {
- model.state = [[real(x0.slice())],[imag(x0.slice())]];
+ model.state = [[real(this.x0.slice())],[imag(this.x0.slice())]];
model.sim = list("integralz_func",4);
- it = [[2],[2*ones(reinit,1)]];
+ it = [[2],[2*ones(this.reinit,1)]];
ot = 2;
} else {
message("Datatype is not supported");
ok = false;
}
if (ok) {
- in1 = [size(x0,1)*[[1],[ones(reinit,1)]],size(x0,2)*[[1],[ones(reinit,1)]]];
- out = size(x0);
- [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),ones(reinit,1),[]);
+ in1 = [size(this.x0,1)*[[1],[ones(this.reinit,1)]],size(this.x0,2)*[[1],[ones(this.reinit,1)]]];
+ out = size(this.x0);
+ [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),ones(this.reinit,1),[]);
}
}
if (ok) {
diff --git a/js/Linear/INTEGRAL_m.pickle b/js/Linear/INTEGRAL_m.pickle
index 0d1dde24..32ad86b3 100644
--- a/js/Linear/INTEGRAL_m.pickle
+++ b/js/Linear/INTEGRAL_m.pickle
@@ -2,8 +2,18 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'maxp'
p2
-atp3
-Rp4
+aS'reinit'
+p3
+aS'satur'
+p4
+aS'lowp'
+p5
+aS'x'
+p6
+aS'x0'
+p7
+atp8
+Rp9
. \ No newline at end of file
diff --git a/js/Linear/PID.js b/js/Linear/PID.js
index d4590682..af3d8d97 100644
--- a/js/Linear/PID.js
+++ b/js/Linear/PID.js
@@ -47,7 +47,7 @@ function PID() {
PID.prototype.set = function PID() {
ppath = list(0,0,0);
for (i=1;i<=length(arg1.model.rpar.objs);i+=1) {
- o = arg1.model.rpar.objs[i-1];
+ o = arg1.model.rpar.objs[this.i-1];
if (typeof(o)=="Link") {
from = arg1.model.rpar.objs[o.from[1-1]-1];
to = arg1.model.rpar.objs[o.to[1-1]-1];
@@ -87,17 +87,17 @@ function PID() {
d_old = xx3.model.rpar;
y = 0;
while (true) {
- [ok,p,i,d,exprs0] = scicos_getvalue("Set PID parameters",[["Proportional"],["Integral"],["Derivation"]],list("vec",-1,"vec",-1,"vec",-1),exprs);
+ [ok,this.p,this.i,this.d,this.exprs0] = scicos_getvalue("Set PID parameters",[["Proportional"],["Integral"],["Derivation"]],list("vec",-1,"vec",-1,"vec",-1),exprs);
if (!ok) {
break;
}
if (ok) {
- xx1.graphics.exprs = exprs0[1-1];
- xx1.model.rpar = p;
- xx2.graphics.exprs = exprs0[2-1];
- xx2.model.rpar = i;
- xx3.graphics.exprs = exprs0[3-1];
- xx3.model.rpar = d;
+ xx1.graphics.exprs = this.exprs0[1-1];
+ xx1.model.rpar = this.p;
+ xx2.graphics.exprs = this.exprs0[2-1];
+ xx2.model.rpar = this.i;
+ xx3.graphics.exprs = this.exprs0[3-1];
+ xx3.model.rpar = this.d;
arg1.model.rpar.objs[ppath[1-1]-1] = xx1;
arg1.model.rpar.objs[ppath[2-1]-1] = xx2;
arg1.model.rpar.objs[ppath[3-1]-1] = xx3;
@@ -105,7 +105,7 @@ function PID() {
}
}
needcompile = 0;
- if (!(p_old==p&&i_old==i&&d_old==d)) {
+ if (!(p_old==this.p&&i_old==this.i&&d_old==this.d)) {
newpar[size(newpar)+1-1] = ppath[1-1];
newpar[size(newpar)+1-1] = ppath[2-1];
newpar[size(newpar)+1-1] = ppath[3-1];
diff --git a/js/Linear/PID.pickle b/js/Linear/PID.pickle
index 0d1dde24..4a58e5bc 100644
--- a/js/Linear/PID.pickle
+++ b/js/Linear/PID.pickle
@@ -2,8 +2,16 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'i'
p2
-atp3
-Rp4
+aS'x'
+p3
+aS'exprs0'
+p4
+aS'd'
+p5
+aS'p'
+p6
+atp7
+Rp8
. \ No newline at end of file
diff --git a/js/Linear/REGISTER.js b/js/Linear/REGISTER.js
index 2dac88e7..6abd8f6d 100644
--- a/js/Linear/REGISTER.js
+++ b/js/Linear/REGISTER.js
@@ -1,16 +1,16 @@
/* autogenerated from "macros/Linear/REGISTER.sci" */
function REGISTER() {
REGISTER.prototype.define = function REGISTER() {
- z0 = zeros(10,1);
+ this.z0 = zeros(10,1);
model = scicos_model();
model.sim = list("delay4",4);
model.in1 = 1;
model.out = 1;
model.evtin = 1;
- model.dstate = z0;
+ model.dstate = this.z0;
model.blocktype = "d";
model.dep_ut = [false,false];
- exprs = strcat(string(z0),";");
+ exprs = strcat(string(this.z0),";");
gr_i = [];
this.x = standard_define([3,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -29,48 +29,48 @@ function REGISTER() {
exprs = [[exprs],[sci2exp(1)]];
}
while (true) {
- [ok,z0,it,exprs] = scicos_getvalue("Set delay parameters",[["Register initial condition"],["Datatype (1=double 3=int32 ...)"]],list("vec",-1,"vec",1),exprs);
+ [ok,this.z0,this.it,exprs] = scicos_getvalue("Set delay parameters",[["Register initial condition"],["Datatype (1=double 3=int32 ...)"]],list("vec",-1,"vec",1),exprs);
if (!ok) {
break;
}
- if (prod(size(z0))<1) {
+ if (prod(size(this.z0))<1) {
message("Register length must be at least 1");
ok = false;
}
- if (it==1) {
+ if (this.it==1) {
model.sim = list("delay4",4);
- z0 = double(z0);
- model.dstate = z0;
+ this.z0 = double(this.z0);
+ model.dstate = this.z0;
model.odstate = list();
} else {
- if (it==3) {
+ if (this.it==3) {
model.sim = list("delay4_i32",4);
- z0 = int32(z0);
- } else if (it==4) {
+ this.z0 = int32(this.z0);
+ } else if (this.it==4) {
model.sim = list("delay4_i16",4);
- z0 = int16(z0);
- } else if (it==5) {
+ this.z0 = int16(this.z0);
+ } else if (this.it==5) {
model.sim = list("delay4_i8",4);
- z0 = int8(z0);
- } else if (it==6) {
+ this.z0 = int8(this.z0);
+ } else if (this.it==6) {
model.sim = list("delay4_ui32",4);
- z0 = uint32(z0);
- } else if (it==7) {
+ this.z0 = uint32(this.z0);
+ } else if (this.it==7) {
model.sim = list("delay4_ui16",4);
- z0 = uint16(z0);
- } else if (it==8) {
+ this.z0 = uint16(this.z0);
+ } else if (this.it==8) {
model.sim = list("delay4_ui8",4);
- z0 = uint8(z0);
+ this.z0 = uint8(this.z0);
} else {
message("Datatype is not supported");
ok = false;
}
- model.odstate = list(z0);
+ model.odstate = list(this.z0);
model.dstate = [];
}
if (ok) {
in1 = [1,1];
- [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(in1,it),1,[]);
+ [model,graphics,ok] = set_io(model,graphics,list(in1,this.it),list(in1,this.it),1,[]);
}
if (ok) {
graphics.exprs = exprs;
diff --git a/js/Linear/REGISTER.pickle b/js/Linear/REGISTER.pickle
index 0d1dde24..70e1e426 100644
--- a/js/Linear/REGISTER.pickle
+++ b/js/Linear/REGISTER.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'z0'
+p3
+aS'it'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Linear/REGISTER_f.js b/js/Linear/REGISTER_f.js
index 9297f41b..7b00bd94 100644
--- a/js/Linear/REGISTER_f.js
+++ b/js/Linear/REGISTER_f.js
@@ -1,16 +1,16 @@
/* autogenerated from "macros/Linear/REGISTER_f.sci" */
function REGISTER_f() {
REGISTER_f.prototype.define = function REGISTER_f() {
- z0 = zeros(10,1);
+ this.z0 = zeros(10,1);
model = scicos_model();
model.sim = "delay";
model.in1 = 1;
model.out = 1;
model.evtin = 1;
- model.dstate = z0;
+ model.dstate = this.z0;
model.blocktype = "d";
model.dep_ut = [false,false];
- exprs = strcat(string(z0),";");
+ exprs = strcat(string(this.z0),";");
gr_i = [];
this.x = standard_define([2.5,2.5],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -26,17 +26,17 @@ function REGISTER_f() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,z0,exprs] = scicos_getvalue("Set delay parameters","Register initial condition",list("vec",-1),exprs);
+ [ok,this.z0,exprs] = scicos_getvalue("Set delay parameters","Register initial condition",list("vec",-1),exprs);
if (!ok) {
break;
}
- if (prod(size(z0))<1) {
+ if (prod(size(this.z0))<1) {
message("Register length must be at least 1");
ok = false;
}
if (ok) {
graphics.exprs = exprs;
- model.dstate = z0;
+ model.dstate = this.z0;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Linear/REGISTER_f.pickle b/js/Linear/REGISTER_f.pickle
index 0d1dde24..105f5da0 100644
--- a/js/Linear/REGISTER_f.pickle
+++ b/js/Linear/REGISTER_f.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'z0'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Linear/SAMPHOLD_m.js b/js/Linear/SAMPHOLD_m.js
index 7b2c360e..11d99bd0 100644
--- a/js/Linear/SAMPHOLD_m.js
+++ b/js/Linear/SAMPHOLD_m.js
@@ -29,17 +29,17 @@ function SAMPHOLD_m() {
label = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,it,exprs] = scicos_getvalue("Set parameters Block",["Datatype(1=real double 2=Complex 3=int32 ...)"],list("vec",1),label);
+ [ok,this.it,exprs] = scicos_getvalue("Set parameters Block",["Datatype(1=real double 2=Complex 3=int32 ...)"],list("vec",1),label);
if (!ok) {
break;
}
- if (((it<1)||(it>8))) {
+ if (((this.it<1)||(this.it>8))) {
message("Datatype is not supported");
ok = false;
}
if (ok) {
in1 = [model.in1,model.in2];
- [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(in1,it),1,[]);
+ [model,graphics,ok] = set_io(model,graphics,list(in1,this.it),list(in1,this.it),1,[]);
if (ok) {
graphics.exprs = exprs;
arg1.graphics = graphics;
diff --git a/js/Linear/SAMPHOLD_m.pickle b/js/Linear/SAMPHOLD_m.pickle
index 0d1dde24..35103638 100644
--- a/js/Linear/SAMPHOLD_m.pickle
+++ b/js/Linear/SAMPHOLD_m.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'it'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Linear/SUMMATION.js b/js/Linear/SUMMATION.js
index 1b2a2efb..b6df0e3d 100644
--- a/js/Linear/SUMMATION.js
+++ b/js/Linear/SUMMATION.js
@@ -1,20 +1,20 @@
/* autogenerated from "macros/Linear/SUMMATION.sci" */
function SUMMATION() {
SUMMATION.prototype.define = function SUMMATION() {
- sgn = [[1],[-1]];
+ this.sgn = [[1],[-1]];
model = scicos_model();
model.sim = list("summation",4);
model.in1 = [[-1],[-1]];
model.out = -1;
model.in2 = [[-2],[-2]];
model.out2 = -2;
- model.ipar = sgn;
+ model.ipar = this.sgn;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = sci2exp(sgn);
+ exprs = sci2exp(this.sgn);
gr_i = [];
this.x = standard_define([2,3],model,exprs,gr_i);
- return new BasicBlock(this.x);
+ return new Summation(this.x);
}
SUMMATION.prototype.details = function SUMMATION() {
return this.x;
@@ -32,93 +32,93 @@ function SUMMATION() {
exprs = [[exprs],[sci2exp(0)]];
}
while (true) {
- [ok,Datatype,sgn,satur,exprs] = scicos_getvalue("Set sum block parameters",[["Datatype (1=real double 2=complex 3=int32 ...)"],["Number of inputs or sign vector (of +1, -1)"],["Do on Overflow(0=Nothing 1=Saturate 2=Error)"]],list("vec",1,"vec",-1,"vec",1),exprs);
+ [ok,this.Datatype,this.sgn,this.satur,exprs] = scicos_getvalue("Set sum block parameters",[["Datatype (1=real double 2=complex 3=int32 ...)"],["Number of inputs or sign vector (of +1, -1)"],["Do on Overflow(0=Nothing 1=Saturate 2=Error)"]],list("vec",1,"vec",-1,"vec",1),exprs);
if (!ok) {
break;
}
- sgn = sgn.slice();
- if ((satur!=0&&satur!=1&&satur!=2)) {
+ this.sgn = this.sgn.slice();
+ if ((this.satur!=0&&this.satur!=1&&this.satur!=2)) {
message("Do on overflow must be 0,1,2");
ok = false;
}
- if (size(sgn,1)==1) {
- if (sgn<1) {
+ if (size(this.sgn,1)==1) {
+ if (this.sgn<1) {
message("Number of inputs must be > 0");
ok = false;
- } else if (sgn==1) {
+ } else if (this.sgn==1) {
in1 = -1;
in2 = -2;
- sgn = [];
+ this.sgn = [];
nout = 1;
nout2 = 1;
} else {
- in1 = -ones(sgn,1);
+ in1 = -ones(this.sgn,1);
in2 = 2*in1;
- sgn = ones(sgn,1);
+ this.sgn = ones(this.sgn,1);
nout = -1;
nout2 = -2;
}
} else {
- if (!and(abs(sgn)==1)) {
+ if (!and(abs(this.sgn)==1)) {
message("Signs can only be +1 or -1");
ok = false;
} else {
- in1 = -ones(size(sgn,1),1);
+ in1 = -ones(size(this.sgn,1),1);
in2 = 2*in1;
nout = -1;
nout2 = -2;
}
}
- it = Datatype*ones(1,size(in1,1));
- ot = Datatype;
- if (Datatype==1) {
+ it = this.Datatype*ones(1,size(in1,1));
+ ot = this.Datatype;
+ if (this.Datatype==1) {
model.sim = list("summation",4);
- } else if (Datatype==2) {
+ } else if (this.Datatype==2) {
model.sim = list("summation_z",4);
- } else if (((Datatype<1)||(Datatype>8))) {
+ } else if (((this.Datatype<1)||(this.Datatype>8))) {
message("Datatype is not supported");
ok = false;
} else {
- if (satur==0) {
- if (Datatype==3) {
+ if (this.satur==0) {
+ if (this.Datatype==3) {
model.sim = list("summation_i32n",4);
- } else if (Datatype==4) {
+ } else if (this.Datatype==4) {
model.sim = list("summation_i16n",4);
- } else if (Datatype==5) {
+ } else if (this.Datatype==5) {
model.sim = list("summation_i8n",4);
- } else if (Datatype==6) {
+ } else if (this.Datatype==6) {
model.sim = list("summation_ui32n",4);
- } else if (Datatype==7) {
+ } else if (this.Datatype==7) {
model.sim = list("summation_ui16n",4);
- } else if (Datatype==8) {
+ } else if (this.Datatype==8) {
model.sim = list("summation_ui8n",4);
}
- } else if (satur==1) {
- if (Datatype==3) {
+ } else if (this.satur==1) {
+ if (this.Datatype==3) {
model.sim = list("summation_i32s",4);
- } else if (Datatype==4) {
+ } else if (this.Datatype==4) {
model.sim = list("summation_i16s",4);
- } else if (Datatype==5) {
+ } else if (this.Datatype==5) {
model.sim = list("summation_i8s",4);
- } else if (Datatype==6) {
+ } else if (this.Datatype==6) {
model.sim = list("summation_ui32s",4);
- } else if (Datatype==7) {
+ } else if (this.Datatype==7) {
model.sim = list("summation_ui16s",4);
- } else if (Datatype==8) {
+ } else if (this.Datatype==8) {
model.sim = list("summation_ui8s",4);
}
- } else if (satur==2) {
- if (Datatype==3) {
+ } else if (this.satur==2) {
+ if (this.Datatype==3) {
model.sim = list("summation_i32e",4);
- } else if (Datatype==4) {
+ } else if (this.Datatype==4) {
model.sim = list("summation_i16e",4);
- } else if (Datatype==5) {
+ } else if (this.Datatype==5) {
model.sim = list("summation_i8e",4);
- } else if (Datatype==6) {
+ } else if (this.Datatype==6) {
model.sim = list("summation_ui32e",4);
- } else if (Datatype==7) {
+ } else if (this.Datatype==7) {
model.sim = list("summation_ui16e",4);
- } else if (Datatype==8) {
+ } else if (this.Datatype==8) {
model.sim = list("summation_ui8e",4);
}
}
@@ -127,14 +127,14 @@ function SUMMATION() {
[model,graphics,ok] = set_io(model,graphics,list([in1,in2],it),list([nout,nout2],ot),[],[]);
}
if (ok) {
- model.rpar = satur;
- model.ipar = sgn;
+ model.rpar = this.satur;
+ model.ipar = this.sgn;
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
break;
}
}
- return new BasicBlock(this.x);
+ return new Summation(this.x);
}
}
diff --git a/js/Linear/SUMMATION.pickle b/js/Linear/SUMMATION.pickle
index 0d1dde24..34bf1982 100644
--- a/js/Linear/SUMMATION.pickle
+++ b/js/Linear/SUMMATION.pickle
@@ -2,8 +2,14 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'Datatype'
p2
-atp3
-Rp4
+aS'x'
+p3
+aS'satur'
+p4
+aS'sgn'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/Linear/TCLSS.js b/js/Linear/TCLSS.js
index 4d7dfc72..de30ee06 100644
--- a/js/Linear/TCLSS.js
+++ b/js/Linear/TCLSS.js
@@ -1,24 +1,24 @@
/* autogenerated from "macros/Linear/TCLSS.sci" */
function TCLSS() {
TCLSS.prototype.define = function TCLSS() {
- x0 = 0;
- A = 0;
- B = 1;
- C = 1;
- D = 0;
+ this.x0 = 0;
+ this.A = 0;
+ this.B = 1;
+ this.C = 1;
+ this.D = 0;
in1 = 1;
- nx = size(x0,"*");
+ nx = size(this.x0,"*");
out = 1;
model = scicos_model();
model.sim = list("tcslti4",4);
model.in1 = [[in1],[nx]];
model.out = out;
model.evtin = 1;
- model.state = x0;
- model.rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
+ model.state = this.x0;
+ model.rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
model.blocktype = "c";
model.dep_ut = [false,true];
- exprs = [[strcat(sci2exp(A))],[strcat(sci2exp(B))],[strcat(sci2exp(C))],[strcat(sci2exp(D))],[strcat(sci2exp(x0))]];
+ exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
gr_i = [];
this.x = standard_define([3,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -37,28 +37,28 @@ function TCLSS() {
exprs = exprs[[1:4,7]-1];
}
while (true) {
- [ok,A,B,C,D,x0,exprs] = scicos_getvalue("Set continuous linear system parameters",[["A matrix"],["B matrix"],["C matrix"],["D matrix"],["Initial state"]],list("mat",[-1,-1],"mat",["size(%1,2)","-1"],"mat",["-1","size(%1,2)"],"mat",[-1,-1],"vec","size(%1,2)"),exprs);
+ [ok,this.A,this.B,this.C,this.D,this.x0,exprs] = scicos_getvalue("Set continuous linear system parameters",[["A matrix"],["B matrix"],["C matrix"],["D matrix"],["Initial state"]],list("mat",[-1,-1],"mat",["size(%1,2)","-1"],"mat",["-1","size(%1,2)"],"mat",[-1,-1],"vec","size(%1,2)"),exprs);
if (!ok) {
break;
}
- out = size(C,1);
+ out = size(this.C,1);
if (out==0) {
out = [];
}
- in1 = size(B,2);
+ in1 = size(this.B,2);
if (in1==0) {
in1 = [];
}
- [ms,ns] = size(A);
+ [ms,ns] = size(this.A);
if (ms!=ns) {
message("A matrix must be square");
} else {
[model,graphics,ok] = check_io(model,graphics,[[in1],[ms]],out,1,[]);
if (ok) {
graphics.exprs = exprs;
- rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
- if (D!=[]) {
- if (norm(D,1)!=0) {
+ rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
+ if (this.D!=[]) {
+ if (norm(this.D,1)!=0) {
mmm = [true,true];
} else {
mmm = [false,true];
@@ -69,9 +69,9 @@ function TCLSS() {
} else {
model.dep_ut = [false,true];
}
- model.state = x0.slice();
+ model.state = this.x0.slice();
model.rpar = rpar;
- if (D!=[]) {
+ if (this.D!=[]) {
model.sim = list("tcslti4",4);
} else {
model.sim = list("tcsltj4",4);
diff --git a/js/Linear/TCLSS.pickle b/js/Linear/TCLSS.pickle
index 0d1dde24..a63da39b 100644
--- a/js/Linear/TCLSS.pickle
+++ b/js/Linear/TCLSS.pickle
@@ -2,8 +2,18 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'A'
p2
-atp3
-Rp4
+aS'C'
+p3
+aS'B'
+p4
+aS'D'
+p5
+aS'x'
+p6
+aS'x0'
+p7
+atp8
+Rp9
. \ No newline at end of file
diff --git a/js/Linear/TCLSS_f.js b/js/Linear/TCLSS_f.js
index 95a6d6bb..8261306c 100644
--- a/js/Linear/TCLSS_f.js
+++ b/js/Linear/TCLSS_f.js
@@ -1,24 +1,24 @@
/* autogenerated from "macros/Linear/TCLSS_f.sci" */
function TCLSS_f() {
TCLSS_f.prototype.define = function TCLSS_f() {
- x0 = 0;
- A = 0;
- B = 1;
- C = 1;
- D = 0;
+ this.x0 = 0;
+ this.A = 0;
+ this.B = 1;
+ this.C = 1;
+ this.D = 0;
in1 = 1;
- nx = size(x0,"*");
+ nx = size(this.x0,"*");
out = 1;
model = scicos_model();
model.sim = list("tcslti",1);
model.in1 = [[in1],[nx]];
model.out = out;
model.evtin = 1;
- model.state = x0;
- model.rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
+ model.state = this.x0;
+ model.rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
model.blocktype = "c";
model.dep_ut = [false,true];
- exprs = [[strcat(sci2exp(A))],[strcat(sci2exp(B))],[strcat(sci2exp(C))],[strcat(sci2exp(D))],[strcat(sci2exp(x0))]];
+ exprs = [[strcat(sci2exp(this.A))],[strcat(sci2exp(this.B))],[strcat(sci2exp(this.C))],[strcat(sci2exp(this.D))],[strcat(sci2exp(this.x0))]];
gr_i = [];
this.x = standard_define([3,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -37,28 +37,28 @@ function TCLSS_f() {
exprs = exprs[[1:4,7]-1];
}
while (true) {
- [ok,A,B,C,D,x0,exprs] = scicos_getvalue("Set continuous linear system parameters",[["A matrix"],["B matrix"],["C matrix"],["D matrix"],["Initial state"]],list("mat",[-1,-1],"mat",["size(%1,2)","-1"],"mat",["-1","size(%1,2)"],"mat",[-1,-1],"vec","size(%1,2)"),exprs);
+ [ok,this.A,this.B,this.C,this.D,this.x0,exprs] = scicos_getvalue("Set continuous linear system parameters",[["A matrix"],["B matrix"],["C matrix"],["D matrix"],["Initial state"]],list("mat",[-1,-1],"mat",["size(%1,2)","-1"],"mat",["-1","size(%1,2)"],"mat",[-1,-1],"vec","size(%1,2)"),exprs);
if (!ok) {
break;
}
- out = size(C,1);
+ out = size(this.C,1);
if (out==0) {
out = [];
}
- in1 = size(B,2);
+ in1 = size(this.B,2);
if (in1==0) {
in1 = [];
}
- [ms,ns] = size(A);
+ [ms,ns] = size(this.A);
if (ms!=ns) {
message("A matrix must be square");
} else {
[model,graphics,ok] = check_io(model,graphics,[[in1],[ms]],out,1,[]);
if (ok) {
graphics.exprs = exprs;
- rpar = [[A.slice()],[B.slice()],[C.slice()],[D.slice()]];
- if (D!=[]) {
- if (norm(D,1)!=0) {
+ rpar = [[this.A.slice()],[this.B.slice()],[this.C.slice()],[this.D.slice()]];
+ if (this.D!=[]) {
+ if (norm(this.D,1)!=0) {
mmm = [true,true];
} else {
mmm = [false,true];
@@ -69,9 +69,9 @@ function TCLSS_f() {
} else {
model.dep_ut = [false,true];
}
- model.state = x0.slice();
+ model.state = this.x0.slice();
model.rpar = rpar;
- if (D!=[]) {
+ if (this.D!=[]) {
model.sim = list("tcslti",1);
} else {
model.sim = list("tcsltj",1);
diff --git a/js/Linear/TCLSS_f.pickle b/js/Linear/TCLSS_f.pickle
index 0d1dde24..a63da39b 100644
--- a/js/Linear/TCLSS_f.pickle
+++ b/js/Linear/TCLSS_f.pickle
@@ -2,8 +2,18 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'A'
p2
-atp3
-Rp4
+aS'C'
+p3
+aS'B'
+p4
+aS'D'
+p5
+aS'x'
+p6
+aS'x0'
+p7
+atp8
+Rp9
. \ No newline at end of file
diff --git a/js/Linear/TIME_DELAY.js b/js/Linear/TIME_DELAY.js
index d90a39e1..47984ef6 100644
--- a/js/Linear/TIME_DELAY.js
+++ b/js/Linear/TIME_DELAY.js
@@ -2,18 +2,18 @@
function TIME_DELAY() {
TIME_DELAY.prototype.define = function TIME_DELAY() {
nin = 1;
- T = 1;
- init = 0;
- N = 1024;
+ this.T = 1;
+ this.init = 0;
+ this.N = 1024;
model = scicos_model();
model.sim = list("time_delay",4);
model.in1 = [nin];
model.out = nin;
- model.rpar = [T,init];
- model.ipar = N;
+ model.rpar = [this.T,this.init];
+ model.ipar = this.N;
model.blocktype = "x";
model.dep_ut = [false,true];
- exprs = [[string(T)],[string(init)],[string(N)]];
+ exprs = [[string(this.T)],[string(this.init)],[string(this.N)]];
gr_i = [];
this.x = standard_define([3.5,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -30,15 +30,15 @@ function TIME_DELAY() {
model = arg1.model;
nin = model.in1[1-1];
while (true) {
- [ok,T,init,N,exprs] = scicos_getvalue("Set delay parameters",[["Delay"],["initial input"],["Buffer size"]],list("vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.T,this.init,this.N,exprs] = scicos_getvalue("Set delay parameters",[["Delay"],["initial input"],["Buffer size"]],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- if (N<2) {
+ if (this.N<2) {
message("Buffer must be larger than 2");
ok = false;
}
- if (T<=0) {
+ if (this.T<=0) {
message("Delay must be positive");
ok = false;
}
@@ -47,8 +47,8 @@ function TIME_DELAY() {
}
if (ok) {
graphics.exprs = exprs;
- model.rpar = [[T],[init]];
- model.ipar = N;
+ model.rpar = [[this.T],[this.init]];
+ model.ipar = this.N;
model.dep_ut = [false,true];
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Linear/TIME_DELAY.pickle b/js/Linear/TIME_DELAY.pickle
index 0d1dde24..07e46564 100644
--- a/js/Linear/TIME_DELAY.pickle
+++ b/js/Linear/TIME_DELAY.pickle
@@ -4,6 +4,12 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'init'
+p3
+aS'T'
+p4
+aS'N'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/Linear/VARIABLE_DELAY.js b/js/Linear/VARIABLE_DELAY.js
index 047aa265..e90443a8 100644
--- a/js/Linear/VARIABLE_DELAY.js
+++ b/js/Linear/VARIABLE_DELAY.js
@@ -2,18 +2,18 @@
function VARIABLE_DELAY() {
VARIABLE_DELAY.prototype.define = function VARIABLE_DELAY() {
nin = 1;
- T = 1;
- init = 0;
- N = 1024;
+ this.T = 1;
+ this.init = 0;
+ this.N = 1024;
model = scicos_model();
model.sim = list("variable_delay",4);
model.in1 = [[nin],[1]];
model.out = nin;
- model.rpar = [T,init];
- model.ipar = N;
+ model.rpar = [this.T,this.init];
+ model.ipar = this.N;
model.blocktype = "d";
model.dep_ut = [false,false];
- exprs = [[string(T)],[string(init)],[string(N)]];
+ exprs = [[string(this.T)],[string(this.init)],[string(this.N)]];
gr_i = [];
this.x = standard_define([3,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -30,15 +30,15 @@ function VARIABLE_DELAY() {
model = arg1.model;
nin = model.in1[1-1];
while (true) {
- [ok,T,init,N,exprs] = scicos_getvalue("Set delay parameters",[["Max delay"],["initial input"],["Buffer size"]],list("vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.T,this.init,this.N,exprs] = scicos_getvalue("Set delay parameters",[["Max delay"],["initial input"],["Buffer size"]],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- if (N<2) {
+ if (this.N<2) {
message("Buffer must be larger than 2");
ok = false;
}
- if (T<=0) {
+ if (this.T<=0) {
message("Delay must be positive");
ok = false;
}
@@ -47,8 +47,8 @@ function VARIABLE_DELAY() {
}
if (ok) {
graphics.exprs = exprs;
- model.rpar = [[T],[init]];
- model.ipar = N;
+ model.rpar = [[this.T],[this.init]];
+ model.ipar = this.N;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Linear/VARIABLE_DELAY.pickle b/js/Linear/VARIABLE_DELAY.pickle
index 0d1dde24..07e46564 100644
--- a/js/Linear/VARIABLE_DELAY.pickle
+++ b/js/Linear/VARIABLE_DELAY.pickle
@@ -4,6 +4,12 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'init'
+p3
+aS'T'
+p4
+aS'N'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/MatrixOp/CUMSUM.js b/js/MatrixOp/CUMSUM.js
index b2bcb38e..3cc0ba37 100644
--- a/js/MatrixOp/CUMSUM.js
+++ b/js/MatrixOp/CUMSUM.js
@@ -39,19 +39,19 @@ function CUMSUM() {
label[9-1] = [];
}
while (true) {
- [ok,typ,decomptyp,lab] = scicos_getvalue("Set CUMSUM block parameters",[["Datatype(1=real double 2=Complex)"],["Sum along (0=the first non singleton dimension 1=Rows 2=Columns)"]],list("vec",1,"vec",1),label);
+ [ok,this.typ,this.decomptyp,this.lab] = scicos_getvalue("Set CUMSUM block parameters",[["Datatype(1=real double 2=Complex)"],["Sum along (0=the first non singleton dimension 1=Rows 2=Columns)"]],list("vec",1,"vec",1),label);
if (!ok) {
break;
}
- label = lab;
- if ((typ==1)) {
- if ((decomptyp==0)) {
+ label = this.lab;
+ if ((this.typ==1)) {
+ if ((this.decomptyp==0)) {
function_name = "cumsum_m";
out = [-1,-2];
- } else if ((decomptyp==1)) {
+ } else if ((this.decomptyp==1)) {
function_name = "cumsum_r";
out = [-1,1];
- } else if ((decomptyp==2)) {
+ } else if ((this.decomptyp==2)) {
function_name = "cumsum_c";
out = [1,-2];
} else {
@@ -60,12 +60,12 @@ function CUMSUM() {
}
it = 1;
ot = 1;
- } else if ((typ==2)) {
- if ((decomptyp==0)) {
+ } else if ((this.typ==2)) {
+ if ((this.decomptyp==0)) {
function_name = "cumsumz_m";
- } else if ((decomptyp==1)) {
+ } else if ((this.decomptyp==1)) {
function_name = "cumsumz_r";
- } else if ((decomptyp==2)) {
+ } else if ((this.decomptyp==2)) {
function_name = "cumsumz_c";
} else {
message("decomposition type is not supported");
diff --git a/js/MatrixOp/CUMSUM.pickle b/js/MatrixOp/CUMSUM.pickle
index 0d1dde24..a200ffa9 100644
--- a/js/MatrixOp/CUMSUM.pickle
+++ b/js/MatrixOp/CUMSUM.pickle
@@ -4,6 +4,12 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'typ'
+p3
+aS'lab'
+p4
+aS'decomptyp'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/MatrixOp/EXTRACT.js b/js/MatrixOp/EXTRACT.js
index 73b1f888..92fa33f9 100644
--- a/js/MatrixOp/EXTRACT.js
+++ b/js/MatrixOp/EXTRACT.js
@@ -39,17 +39,17 @@ function EXTRACT() {
label[9-1] = [];
}
while (true) {
- [ok,typ,a,b,exprs] = scicos_getvalue("Set EXTRACT Block",[["Datatype (1=real double 2=Complex)"],["Lines to extract"],["Columns to extract"]],list("vec",1,"mat",[1,-1],"mat",[1,-1]),label);
- a = a.slice();
- b = b.slice();
+ [ok,this.typ,this.a,this.b,exprs] = scicos_getvalue("Set EXTRACT Block",[["Datatype (1=real double 2=Complex)"],["Lines to extract"],["Columns to extract"]],list("vec",1,"mat",[1,-1],"mat",[1,-1]),label);
+ this.a = this.a.slice();
+ this.b = this.b.slice();
if (!ok) {
break;
}
- if ((typ==1)) {
+ if ((this.typ==1)) {
function_name = "extract";
ot = 1;
it = 1;
- } else if ((typ==2)) {
+ } else if ((this.typ==2)) {
function_name = "extractz";
ot = 2;
it = 2;
@@ -57,25 +57,25 @@ function EXTRACT() {
message("Datatype is not supported");
ok = false;
}
- ma = size(a,1);
- mb = size(b,1);
+ ma = size(this.a,1);
+ mb = size(this.b,1);
if ((ma==0||mb==0)) {
message("empty field");
ok = false;
}
for (i=1;i<=ma;i+=1) {
- if ((a[i-1]<=0)) {
+ if ((this.a[i-1]<=0)) {
message("invalid index");
ok = false;
}
}
for (j=1;j<=mb;j+=1) {
- if ((b[j-1]<=0)) {
+ if ((this.b[j-1]<=0)) {
message("invalid index");
ok = false;
}
}
- model.ipar = [[a],[b],[ma],[mb]];
+ model.ipar = [[this.a],[this.b],[ma],[mb]];
in1 = [model.in1,model.in2];
out = [ma,mb];
funtyp = 4;
diff --git a/js/MatrixOp/EXTRACT.pickle b/js/MatrixOp/EXTRACT.pickle
index 0d1dde24..2df3177f 100644
--- a/js/MatrixOp/EXTRACT.pickle
+++ b/js/MatrixOp/EXTRACT.pickle
@@ -2,8 +2,14 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'a'
p2
-atp3
-Rp4
+aS'x'
+p3
+aS'b'
+p4
+aS'typ'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/MatrixOp/EXTTRI.js b/js/MatrixOp/EXTTRI.js
index 00eafa27..caf3aa3a 100644
--- a/js/MatrixOp/EXTTRI.js
+++ b/js/MatrixOp/EXTTRI.js
@@ -39,17 +39,17 @@ function EXTTRI() {
label[9-1] = [];
}
while (true) {
- [ok,typ,decomptyp,lab] = scicos_getvalue("Set EXTTRI block parameters",[["Datatype(1=real double 2=Complex)"],["extraction type (1=lower 2=upper 3=diagonal)"]],list("vec",1,"vec",1),label);
+ [ok,this.typ,this.decomptyp,this.lab] = scicos_getvalue("Set EXTTRI block parameters",[["Datatype(1=real double 2=Complex)"],["extraction type (1=lower 2=upper 3=diagonal)"]],list("vec",1,"vec",1),label);
if (!ok) {
break;
}
- label = lab;
- if ((typ==1)) {
- if ((decomptyp==1)) {
+ label = this.lab;
+ if ((this.typ==1)) {
+ if ((this.decomptyp==1)) {
function_name = "exttril";
- } else if ((decomptyp==2)) {
+ } else if ((this.decomptyp==2)) {
function_name = "exttriu";
- } else if ((decomptyp==3)) {
+ } else if ((this.decomptyp==3)) {
function_name = "extdiag";
} else {
message("decomposition type is not supported");
@@ -57,12 +57,12 @@ function EXTTRI() {
}
it = 1;
ot = 1;
- } else if ((typ==2)) {
- if ((decomptyp==1)) {
+ } else if ((this.typ==2)) {
+ if ((this.decomptyp==1)) {
function_name = "exttrilz";
- } else if ((decomptyp==2)) {
+ } else if ((this.decomptyp==2)) {
function_name = "exttriuz";
- } else if ((decomptyp==3)) {
+ } else if ((this.decomptyp==3)) {
function_name = "extdiagz";
} else {
message("decomposition type is not supported");
diff --git a/js/MatrixOp/EXTTRI.pickle b/js/MatrixOp/EXTTRI.pickle
index 0d1dde24..a200ffa9 100644
--- a/js/MatrixOp/EXTTRI.pickle
+++ b/js/MatrixOp/EXTTRI.pickle
@@ -4,6 +4,12 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'typ'
+p3
+aS'lab'
+p4
+aS'decomptyp'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/MatrixOp/MATBKSL.js b/js/MatrixOp/MATBKSL.js
index f956a990..a4bea4b5 100644
--- a/js/MatrixOp/MATBKSL.js
+++ b/js/MatrixOp/MATBKSL.js
@@ -39,15 +39,15 @@ function MATBKSL() {
label[9-1] = [];
}
while (true) {
- [ok,typ,exprs] = scicos_getvalue("Set MATBKSL Block",["Datatype (1=real double 2=Complex)"],list("vec",1),label);
+ [ok,this.typ,exprs] = scicos_getvalue("Set MATBKSL Block",["Datatype (1=real double 2=Complex)"],list("vec",1),label);
if (!ok) {
break;
}
- if ((typ==1)) {
+ if ((this.typ==1)) {
function_name = "mat_bksl";
ot = 1;
it = [1,1];
- } else if ((typ==2)) {
+ } else if ((this.typ==2)) {
function_name = "matz_bksl";
ot = 2;
it = [2,2];
diff --git a/js/MatrixOp/MATBKSL.pickle b/js/MatrixOp/MATBKSL.pickle
index 0d1dde24..86921c4a 100644
--- a/js/MatrixOp/MATBKSL.pickle
+++ b/js/MatrixOp/MATBKSL.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'typ'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/MatrixOp/MATCATH.js b/js/MatrixOp/MATCATH.js
index b1d626d8..dbdbc97b 100644
--- a/js/MatrixOp/MATCATH.js
+++ b/js/MatrixOp/MATCATH.js
@@ -39,14 +39,14 @@ function MATCATH() {
label = "size(evstr("+label[2-1]+"),\'*\')";
}
while (true) {
- [ok,nin,lab] = scicos_getvalue("Set MATCATH block parameters",["Number of input"],list("vec",1),label);
+ [ok,this.nin,this.lab] = scicos_getvalue("Set MATCATH block parameters",["Number of input"],list("vec",1),label);
if (!ok) {
break;
}
- label = lab;
- in1 = [-1*(ones(nin,1)),-(transpose([2:nin+1]))];
+ label = this.lab;
+ in1 = [-1*(ones(this.nin,1)),-(transpose([2:this.nin+1]))];
out = [-1,0];
- it = -1*(ones(nin,1));
+ it = -1*(ones(this.nin,1));
ot = -1;
[model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),[],[]);
if (ok) {
diff --git a/js/MatrixOp/MATCATH.pickle b/js/MatrixOp/MATCATH.pickle
index 0d1dde24..5c203d19 100644
--- a/js/MatrixOp/MATCATH.pickle
+++ b/js/MatrixOp/MATCATH.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'nin'
+p3
+aS'lab'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/MatrixOp/MATCATV.js b/js/MatrixOp/MATCATV.js
index d635fb4f..4824e14d 100644
--- a/js/MatrixOp/MATCATV.js
+++ b/js/MatrixOp/MATCATV.js
@@ -40,13 +40,13 @@ function MATCATV() {
label = "size(evstr("+label[2-1]+"),\'*\')";
}
while (true) {
- [ok,nin,lab] = scicos_getvalue("Set MATCATV block parameters",["Number od inputs"],list("vec",1),label);
+ [ok,this.nin,this.lab] = scicos_getvalue("Set MATCATV block parameters",["Number od inputs"],list("vec",1),label);
if (!ok) {
break;
}
- label = lab;
- in1 = [-(transpose([2:nin+1])),-ones(nin,1)];
- it = -ones(nin,1);
+ label = this.lab;
+ in1 = [-(transpose([2:this.nin+1])),-ones(this.nin,1)];
+ it = -ones(this.nin,1);
ot = -1;
out = [0,-1];
[model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),[],[]);
diff --git a/js/MatrixOp/MATCATV.pickle b/js/MatrixOp/MATCATV.pickle
index 0d1dde24..5c203d19 100644
--- a/js/MatrixOp/MATCATV.pickle
+++ b/js/MatrixOp/MATCATV.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'nin'
+p3
+aS'lab'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/MatrixOp/MATDET.js b/js/MatrixOp/MATDET.js
index fc12d549..9aed36c1 100644
--- a/js/MatrixOp/MATDET.js
+++ b/js/MatrixOp/MATDET.js
@@ -39,15 +39,15 @@ function MATDET() {
label[9-1] = [];
}
while (true) {
- [ok,typ,exprs] = scicos_getvalue("Set MATDET Block",["Datatype(1=real double 2=Complex)"],list("vec",1),label);
+ [ok,this.typ,exprs] = scicos_getvalue("Set MATDET Block",["Datatype(1=real double 2=Complex)"],list("vec",1),label);
if (!ok) {
break;
}
- if ((typ==1)) {
+ if ((this.typ==1)) {
function_name = "mat_det";
ot = 1;
it = 1;
- } else if ((typ==2)) {
+ } else if ((this.typ==2)) {
function_name = "matz_det";
ot = 2;
it = 2;
diff --git a/js/MatrixOp/MATDET.pickle b/js/MatrixOp/MATDET.pickle
index 0d1dde24..86921c4a 100644
--- a/js/MatrixOp/MATDET.pickle
+++ b/js/MatrixOp/MATDET.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'typ'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/MatrixOp/MATDIAG.js b/js/MatrixOp/MATDIAG.js
index fae53116..b1ac519f 100644
--- a/js/MatrixOp/MATDIAG.js
+++ b/js/MatrixOp/MATDIAG.js
@@ -39,15 +39,15 @@ function MATDIAG() {
label[9-1] = [];
}
while (true) {
- [ok,typ,exprs] = scicos_getvalue("Set MATDIAG Block",["Datatype (1=real double 2=Complex)"],list("vec",1),label);
+ [ok,this.typ,exprs] = scicos_getvalue("Set MATDIAG Block",["Datatype (1=real double 2=Complex)"],list("vec",1),label);
if (!ok) {
break;
}
- if ((typ==1)) {
+ if ((this.typ==1)) {
function_name = "mat_diag";
ot = 1;
it = 1;
- } else if ((typ==2)) {
+ } else if ((this.typ==2)) {
function_name = "matz_diag";
ot = 2;
it = 2;
diff --git a/js/MatrixOp/MATDIAG.pickle b/js/MatrixOp/MATDIAG.pickle
index 0d1dde24..86921c4a 100644
--- a/js/MatrixOp/MATDIAG.pickle
+++ b/js/MatrixOp/MATDIAG.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'typ'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/MatrixOp/MATDIV.js b/js/MatrixOp/MATDIV.js
index 38f01397..18fdf4a9 100644
--- a/js/MatrixOp/MATDIV.js
+++ b/js/MatrixOp/MATDIV.js
@@ -39,15 +39,15 @@ function MATDIV() {
label[9-1] = [];
}
while (true) {
- [ok,typ,exprs] = scicos_getvalue("Set MATDIV Block",["Datatype(1=real double 2=Complex)"],list("vec",1),label);
+ [ok,this.typ,exprs] = scicos_getvalue("Set MATDIV Block",["Datatype(1=real double 2=Complex)"],list("vec",1),label);
if (!ok) {
break;
}
- if ((typ==1)) {
+ if ((this.typ==1)) {
function_name = "mat_div";
ot = 1;
it = [1,1];
- } else if ((typ==2)) {
+ } else if ((this.typ==2)) {
function_name = "matz_div";
ot = 2;
it = [2,2];
diff --git a/js/MatrixOp/MATDIV.pickle b/js/MatrixOp/MATDIV.pickle
index 0d1dde24..86921c4a 100644
--- a/js/MatrixOp/MATDIV.pickle
+++ b/js/MatrixOp/MATDIV.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'typ'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/MatrixOp/MATEIG.js b/js/MatrixOp/MATEIG.js
index 4fa713d0..0016fd5c 100644
--- a/js/MatrixOp/MATEIG.js
+++ b/js/MatrixOp/MATEIG.js
@@ -39,17 +39,17 @@ function MATEIG() {
label[9-1] = [];
}
while (true) {
- [ok,typ,decomptyp,lab] = scicos_getvalue("Set MATEIG block parameters",[["Datatype(1=real double 2=Complex)"],["decomposition type (1=eig values 2=eig values+eig vectors"]],list("vec",1,"vec",1),label);
+ [ok,this.typ,this.decomptyp,this.lab] = scicos_getvalue("Set MATEIG block parameters",[["Datatype(1=real double 2=Complex)"],["decomposition type (1=eig values 2=eig values+eig vectors"]],list("vec",1,"vec",1),label);
if (!ok) {
break;
}
- label = lab;
- if ((typ==1)) {
- if ((decomptyp==1)) {
+ label = this.lab;
+ if ((this.typ==1)) {
+ if ((this.decomptyp==1)) {
function_name = "mat_vps";
out = [-1,1];
ot = 2;
- } else if ((decomptyp==2)) {
+ } else if ((this.decomptyp==2)) {
function_name = "mat_vpv";
out = [[-1,-1],[-1,-1]];
ot = [2,2];
@@ -58,12 +58,12 @@ function MATEIG() {
ok = false;
}
it = 1;
- } else if ((typ==2)) {
- if ((decomptyp==1)) {
+ } else if ((this.typ==2)) {
+ if ((this.decomptyp==1)) {
function_name = "matz_vps";
out = [-1,1];
ot = 2;
- } else if ((decomptyp==2)) {
+ } else if ((this.decomptyp==2)) {
function_name = "matz_vpv";
out = [[-1,-1],[-1,-1]];
ot = [2,2];
diff --git a/js/MatrixOp/MATEIG.pickle b/js/MatrixOp/MATEIG.pickle
index 0d1dde24..a200ffa9 100644
--- a/js/MatrixOp/MATEIG.pickle
+++ b/js/MatrixOp/MATEIG.pickle
@@ -4,6 +4,12 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'typ'
+p3
+aS'lab'
+p4
+aS'decomptyp'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/MatrixOp/MATEXPM.js b/js/MatrixOp/MATEXPM.js
index 5053663d..672401ed 100644
--- a/js/MatrixOp/MATEXPM.js
+++ b/js/MatrixOp/MATEXPM.js
@@ -39,15 +39,15 @@ function MATEXPM() {
label[9-1] = [];
}
while (true) {
- [ok,typ,exprs] = scicos_getvalue("Set EXPM Block",["Datatype(1=real double 2=Complex)"],list("vec",1),label);
+ [ok,this.typ,exprs] = scicos_getvalue("Set EXPM Block",["Datatype(1=real double 2=Complex)"],list("vec",1),label);
if (!ok) {
break;
}
- if ((typ==1)) {
+ if ((this.typ==1)) {
function_name = "mat_expm";
ot = 1;
it = 1;
- } else if ((typ==2)) {
+ } else if ((this.typ==2)) {
function_name = "matz_expm";
ot = 2;
it = 2;
diff --git a/js/MatrixOp/MATEXPM.pickle b/js/MatrixOp/MATEXPM.pickle
index 0d1dde24..86921c4a 100644
--- a/js/MatrixOp/MATEXPM.pickle
+++ b/js/MatrixOp/MATEXPM.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'typ'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/MatrixOp/MATINV.js b/js/MatrixOp/MATINV.js
index b495de7d..2a7995c3 100644
--- a/js/MatrixOp/MATINV.js
+++ b/js/MatrixOp/MATINV.js
@@ -39,15 +39,15 @@ function MATINV() {
label[9-1] = [];
}
while (true) {
- [ok,typ,exprs] = scicos_getvalue("Set MATINV Block",["Datatype(1=real double 2=Complex)"],list("vec",1),label);
+ [ok,this.typ,exprs] = scicos_getvalue("Set MATINV Block",["Datatype(1=real double 2=Complex)"],list("vec",1),label);
if (!ok) {
break;
}
- if ((typ==1)) {
+ if ((this.typ==1)) {
function_name = "mat_inv";
ot = 1;
it = 1;
- } else if ((typ==2)) {
+ } else if ((this.typ==2)) {
function_name = "matz_inv";
ot = 2;
it = 2;
diff --git a/js/MatrixOp/MATINV.pickle b/js/MatrixOp/MATINV.pickle
index 0d1dde24..86921c4a 100644
--- a/js/MatrixOp/MATINV.pickle
+++ b/js/MatrixOp/MATINV.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'typ'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/MatrixOp/MATLU.js b/js/MatrixOp/MATLU.js
index 51c5af6a..10b6d6da 100644
--- a/js/MatrixOp/MATLU.js
+++ b/js/MatrixOp/MATLU.js
@@ -39,15 +39,15 @@ function MATLU() {
label[9-1] = [];
}
while (true) {
- [ok,typ,lab] = scicos_getvalue("Set MATLU block parameters",["Datatype(1=real double 2=Complex)"],list("vec",1),label);
+ [ok,this.typ,this.lab] = scicos_getvalue("Set MATLU block parameters",["Datatype(1=real double 2=Complex)"],list("vec",1),label);
if (!ok) {
break;
}
- if ((typ==1)) {
+ if ((this.typ==1)) {
function_name = "mat_lu";
ot = [1,1];
it = 1;
- } else if ((typ==2)) {
+ } else if ((this.typ==2)) {
function_name = "matz_lu";
ot = [2,2];
it = 2;
@@ -61,7 +61,7 @@ function MATLU() {
if (ok) {
funtyp = 4;
model.sim = list(function_name,funtyp);
- graphics.exprs = lab;
+ graphics.exprs = this.lab;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/MatrixOp/MATLU.pickle b/js/MatrixOp/MATLU.pickle
index 0d1dde24..c4c325d3 100644
--- a/js/MatrixOp/MATLU.pickle
+++ b/js/MatrixOp/MATLU.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'typ'
+p3
+aS'lab'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/MatrixOp/MATMAGPHI.js b/js/MatrixOp/MATMAGPHI.js
index 3047ca48..61f61bca 100644
--- a/js/MatrixOp/MATMAGPHI.js
+++ b/js/MatrixOp/MATMAGPHI.js
@@ -39,18 +39,18 @@ function MATMAGPHI() {
label[9-1] = [];
}
while (true) {
- [ok,decomptyp,lab] = scicos_getvalue("Set MATMAGPHI block parameters",["decomposition type (1=Complex2MAG&PHI 2=MAG&PHI2Complex)"],list("vec",1),label);
+ [ok,this.decomptyp,this.lab] = scicos_getvalue("Set MATMAGPHI block parameters",["decomposition type (1=Complex2MAG&PHI 2=MAG&PHI2Complex)"],list("vec",1),label);
if (!ok) {
break;
}
- label = lab;
- if ((decomptyp==1)) {
+ label = this.lab;
+ if ((this.decomptyp==1)) {
function_name = "matz_abs";
in1 = [-1,-2];
it = 2;
out = [[-1,-2],[-1,-2]];
ot = [1,1];
- } else if ((decomptyp==2)) {
+ } else if ((this.decomptyp==2)) {
function_name = "matz_absc";
in1 = [[-1,-2],[-1,-2]];
it = [1,1];
diff --git a/js/MatrixOp/MATMAGPHI.pickle b/js/MatrixOp/MATMAGPHI.pickle
index 0d1dde24..92ce3a57 100644
--- a/js/MatrixOp/MATMAGPHI.pickle
+++ b/js/MatrixOp/MATMAGPHI.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'lab'
+p3
+aS'decomptyp'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/MatrixOp/MATMUL.js b/js/MatrixOp/MATMUL.js
index e3f1dd0b..54d5d3b8 100644
--- a/js/MatrixOp/MATMUL.js
+++ b/js/MatrixOp/MATMUL.js
@@ -34,103 +34,103 @@ function MATMUL() {
label[3-1] = sci2exp(1);
}
while (true) {
- [ok,dtype,rule,np,exprs] = scicos_getvalue([["Set MATMUL parameter"],["For the Multipication rule:"],[" 1= Matrix by Matrix"],[" 2= Matrix by Matrix element wise "],[" 3= Matrix by Scalar"],["In the third case the second input will be the scalar"]],[["Datatype(1=real double 2=Complex 3=int32 ...)"],["Multiplication rule"],["Do on Overflow(0=Nothing 1=Saturate 2=Error)"]],list("vec",1,"vec",1,"vec",1),label);
+ [ok,this.dtype,this.rule,this.np,exprs] = scicos_getvalue([["Set MATMUL parameter"],["For the Multipication rule:"],[" 1= Matrix by Matrix"],[" 2= Matrix by Matrix element wise "],[" 3= Matrix by Scalar"],["In the third case the second input will be the scalar"]],[["Datatype(1=real double 2=Complex 3=int32 ...)"],["Multiplication rule"],["Do on Overflow(0=Nothing 1=Saturate 2=Error)"]],list("vec",1,"vec",1,"vec",1),label);
if (!ok) {
break;
}
- rule = int(rule);
- if ((dtype<1||dtype>8)) {
+ this.rule = int(this.rule);
+ if ((this.dtype<1||this.dtype>8)) {
message("type is not supported");
ok = false;
}
- if ((rule<1||rule>3)) {
+ if ((this.rule<1||this.rule>3)) {
message("Multiplication rule must be only 1,2 or 3");
ok = false;
}
- if ((dtype==1||dtype==2)) {
- np = 0;
+ if ((this.dtype==1||this.dtype==2)) {
+ this.np = 0;
}
TABMIN = [[0],[0],[-(2^31)],[-(2^15)],[-(2^7)],[0],[0],[0]];
TABMAX = [[0],[0],[(2^31)-1],[(2^15)-1],[(2^7)-1],[(2^32)-1],[(2^16)-1],[(2^8)-1]];
- if (rule==2) {
- if (np==0) {
+ if (this.rule==2) {
+ if (this.np==0) {
model.sim = list("matmul2_m",4);
- } else if (np==1) {
+ } else if (this.np==1) {
model.sim = list("matmul2_s",4);
} else {
model.sim = list("matmul2_e",4);
}
- } else if (rule==3) {
- if (np==0) {
+ } else if (this.rule==3) {
+ if (this.np==0) {
model.sim = list("matbyscal",4);
- } else if (np==1) {
+ } else if (this.np==1) {
model.sim = list("matbyscal_s",4);
} else {
model.sim = list("matbyscal_e",4);
}
} else {
- if ((dtype==1)) {
+ if ((this.dtype==1)) {
model.sim = list("matmul_m",4);
- } else if ((dtype==2)) {
+ } else if ((this.dtype==2)) {
model.sim = list("matzmul_m",4);
- } else if (dtype==3) {
- if (np==0) {
+ } else if (this.dtype==3) {
+ if (this.np==0) {
model.sim = list("matmul_i32n",4);
- } else if (np==1) {
+ } else if (this.np==1) {
model.sim = list("matmul_i32s",4);
} else {
model.sim = list("matmul_i32e",4);
}
- } else if (dtype==4) {
- if (np==0) {
+ } else if (this.dtype==4) {
+ if (this.np==0) {
model.sim = list("matmul_i16n",4);
- } else if (np==1) {
+ } else if (this.np==1) {
model.sim = list("matmul_i16s",4);
} else {
model.sim = list("matmul_i16e",4);
}
- } else if (dtype==5) {
- if (np==0) {
+ } else if (this.dtype==5) {
+ if (this.np==0) {
model.sim = list("matmul_i8n",4);
- } else if (np==1) {
+ } else if (this.np==1) {
model.sim = list("matmul_i8s",4);
} else {
model.sim = list("matmul_i8e",4);
}
- } else if (dtype==6) {
- if (np==0) {
+ } else if (this.dtype==6) {
+ if (this.np==0) {
model.sim = list("matmul_ui32n",4);
- } else if (np==1) {
+ } else if (this.np==1) {
model.sim = list("matmul_ui32s",4);
} else {
model.sim = list("matmul_ui32e",4);
}
- } else if (dtype==7) {
- if (np==0) {
+ } else if (this.dtype==7) {
+ if (this.np==0) {
model.sim = list("matmul_ui16n",4);
- } else if (np==1) {
+ } else if (this.np==1) {
model.sim = list("matmul_ui16s",4);
} else {
model.sim = list("matmul_ui16e",4);
}
- } else if (dtype==8) {
- if (np==0) {
+ } else if (this.dtype==8) {
+ if (this.np==0) {
model.sim = list("matmul_ui8n",4);
- } else if (np==1) {
+ } else if (this.np==1) {
model.sim = list("matmul_ui8s",4);
} else {
model.sim = list("matmul_ui8e",4);
}
}
}
- kmin = TABMIN[dtype-1];
- kmax = TABMAX[dtype-1];
- it = dtype*ones(1,2);
- ot = dtype;
- if (rule==1) {
+ kmin = TABMIN[this.dtype-1];
+ kmax = TABMAX[this.dtype-1];
+ it = this.dtype*ones(1,2);
+ ot = this.dtype;
+ if (this.rule==1) {
in1 = [[-1,-2],[-2,-3]];
out = [-1,-3];
- } else if (rule==2) {
+ } else if (this.rule==2) {
in1 = [[-1,-2],[-1,-2]];
out = [-1,-2];
} else {
@@ -140,7 +140,7 @@ function MATMUL() {
[model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),[],[]);
if (ok) {
label = exprs;
- model.ipar = rule;
+ model.ipar = this.rule;
model.rpar = [[kmin],[kmax]];
graphics.exprs = label;
this.x.graphics = graphics;
diff --git a/js/MatrixOp/MATMUL.pickle b/js/MatrixOp/MATMUL.pickle
index 0d1dde24..06e59fe1 100644
--- a/js/MatrixOp/MATMUL.pickle
+++ b/js/MatrixOp/MATMUL.pickle
@@ -2,8 +2,14 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'np'
p2
-atp3
-Rp4
+aS'x'
+p3
+aS'rule'
+p4
+aS'dtype'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/MatrixOp/MATPINV.js b/js/MatrixOp/MATPINV.js
index e21a49dc..cc82ce10 100644
--- a/js/MatrixOp/MATPINV.js
+++ b/js/MatrixOp/MATPINV.js
@@ -39,15 +39,15 @@ function MATPINV() {
label[9-1] = [];
}
while (true) {
- [ok,typ,exprs] = scicos_getvalue("Set MATPINV Block",["Datatype(1=real double 2=Complex)"],list("vec",1),label);
+ [ok,this.typ,exprs] = scicos_getvalue("Set MATPINV Block",["Datatype(1=real double 2=Complex)"],list("vec",1),label);
if (!ok) {
break;
}
- if ((typ==1)) {
+ if ((this.typ==1)) {
function_name = "mat_pinv";
ot = 1;
it = 1;
- } else if ((typ==2)) {
+ } else if ((this.typ==2)) {
function_name = "matz_pinv";
ot = 2;
it = 2;
diff --git a/js/MatrixOp/MATPINV.pickle b/js/MatrixOp/MATPINV.pickle
index 0d1dde24..86921c4a 100644
--- a/js/MatrixOp/MATPINV.pickle
+++ b/js/MatrixOp/MATPINV.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'typ'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/MatrixOp/MATRESH.js b/js/MatrixOp/MATRESH.js
index b2e357a2..ef21b5f9 100644
--- a/js/MatrixOp/MATRESH.js
+++ b/js/MatrixOp/MATRESH.js
@@ -39,12 +39,12 @@ function MATRESH() {
label[9-1] = [];
}
while (true) {
- [ok,typ,l1,out,lab] = scicos_getvalue("Set MATRESH block parameters",[["Datatype(1=real double 2=Complex)","input size"],["output size desired"]],list("vec",-1,"vec",-1,"vec",-1),label);
+ [ok,this.typ,this.l1,this.out,this.lab] = scicos_getvalue("Set MATRESH block parameters",[["Datatype(1=real double 2=Complex)","input size"],["output size desired"]],list("vec",-1,"vec",-1,"vec",-1),label);
if (!ok) {
break;
}
- nout = size(out);
- nin = size(l1);
+ nout = size(this.out);
+ nin = size(this.l1);
if (nout==0) {
message("output must have at least one element");
ok = false;
@@ -54,24 +54,24 @@ function MATRESH() {
ok = false;
}
if (ok) {
- if (((out[1-1]>(l1[1-1]*l1[2-1])))) {
+ if (((this.out[1-1]>(this.l1[1-1]*this.l1[2-1])))) {
message("the first dimension of the output is too big");
ok = false;
}
- if (((out[2-1]>(l1[1-1]*l1[2-1])))) {
+ if (((this.out[2-1]>(this.l1[1-1]*this.l1[2-1])))) {
message("the second dimension of the output is too big");
ok = false;
}
- if ((((out[2-1]*out[1-1])>(l1[1-1]*l1[2-1])))) {
+ if ((((this.out[2-1]*this.out[1-1])>(this.l1[1-1]*this.l1[2-1])))) {
message("the dimensions of the output are too big");
ok = false;
}
}
- if ((typ==1)) {
+ if ((this.typ==1)) {
function_name = "mat_reshape";
ot = 1;
it = 1;
- } else if ((typ==2)) {
+ } else if ((this.typ==2)) {
function_name = "matz_reshape";
ot = 2;
it = 2;
@@ -80,8 +80,8 @@ function MATRESH() {
ok = false;
}
if (ok) {
- label = lab;
- [model,graphics,ok] = set_io(model,graphics,list(l1,it),list(out,ot),[],[]);
+ label = this.lab;
+ [model,graphics,ok] = set_io(model,graphics,list(this.l1,it),list(this.out,ot),[],[]);
}
if (ok) {
funtyp = 4;
diff --git a/js/MatrixOp/MATRESH.pickle b/js/MatrixOp/MATRESH.pickle
index 0d1dde24..c19ab011 100644
--- a/js/MatrixOp/MATRESH.pickle
+++ b/js/MatrixOp/MATRESH.pickle
@@ -4,6 +4,14 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'out'
+p3
+aS'typ'
+p4
+aS'lab'
+p5
+aS'l1'
+p6
+atp7
+Rp8
. \ No newline at end of file
diff --git a/js/MatrixOp/MATSING.js b/js/MatrixOp/MATSING.js
index aefdb157..6c26c5b9 100644
--- a/js/MatrixOp/MATSING.js
+++ b/js/MatrixOp/MATSING.js
@@ -39,18 +39,18 @@ function MATSING() {
label[9-1] = [];
}
while (true) {
- [ok,typ,decomptyp,lab] = scicos_getvalue("Set MATSVD block parameters",[["Datatype(1=real double 2=Complex)"],["decomposition type (1=singular values 2=sing values+matrix U & V)"]],list("vec",1,"vec",1),label);
+ [ok,this.typ,this.decomptyp,this.lab] = scicos_getvalue("Set MATSVD block parameters",[["Datatype(1=real double 2=Complex)"],["decomposition type (1=singular values 2=sing values+matrix U & V)"]],list("vec",1,"vec",1),label);
if (!ok) {
break;
}
- label = lab;
- if ((typ==1)) {
- if ((decomptyp==1)) {
+ label = this.lab;
+ if ((this.typ==1)) {
+ if ((this.decomptyp==1)) {
function_name = "mat_sing";
in1 = [-1,-2];
out = [-1,1];
ot = 1;
- } else if ((decomptyp==2)) {
+ } else if ((this.decomptyp==2)) {
function_name = "mat_svd";
in1 = [-1,-2];
out = [[-1,-1],[-1,-2],[-2,-2]];
@@ -60,13 +60,13 @@ function MATSING() {
ok = false;
}
it = 1;
- } else if ((typ==2)) {
- if ((decomptyp==1)) {
+ } else if ((this.typ==2)) {
+ if ((this.decomptyp==1)) {
function_name = "matz_sing";
in1 = [-1,-2];
out = [-1,1];
ot = 1;
- } else if ((decomptyp==2)) {
+ } else if ((this.decomptyp==2)) {
function_name = "matz_svd";
in1 = [-1,-2];
out = [[-1,-1],[-1,-2],[-2,-2]];
diff --git a/js/MatrixOp/MATSING.pickle b/js/MatrixOp/MATSING.pickle
index 0d1dde24..a200ffa9 100644
--- a/js/MatrixOp/MATSING.pickle
+++ b/js/MatrixOp/MATSING.pickle
@@ -4,6 +4,12 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'typ'
+p3
+aS'lab'
+p4
+aS'decomptyp'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/MatrixOp/MATSUM.js b/js/MatrixOp/MATSUM.js
index dee13795..ad5cb933 100644
--- a/js/MatrixOp/MATSUM.js
+++ b/js/MatrixOp/MATSUM.js
@@ -39,19 +39,19 @@ function MATSUM() {
label[9-1] = [];
}
while (true) {
- [ok,typ,decomptyp,lab] = scicos_getvalue("Set MATSUM block parameters",[["Datatype(1=real double 2=Complex)"],["Sum along (0=all 1=lines 2=Columns)"]],list("vec",1,"vec",1),label);
+ [ok,this.typ,this.decomptyp,this.lab] = scicos_getvalue("Set MATSUM block parameters",[["Datatype(1=real double 2=Complex)"],["Sum along (0=all 1=lines 2=Columns)"]],list("vec",1,"vec",1),label);
if (!ok) {
break;
}
- label = lab;
- if ((typ==1)) {
- if ((decomptyp==0)) {
+ label = this.lab;
+ if ((this.typ==1)) {
+ if ((this.decomptyp==0)) {
function_name = "mat_sum";
out = [1,1];
- } else if ((decomptyp==2)) {
+ } else if ((this.decomptyp==2)) {
function_name = "mat_suml";
out = [-1,1];
- } else if ((decomptyp==1)) {
+ } else if ((this.decomptyp==1)) {
function_name = "mat_sumc";
out = [1,-2];
} else {
@@ -60,14 +60,14 @@ function MATSUM() {
}
it = 1;
ot = 1;
- } else if ((typ==2)) {
- if ((decomptyp==0)) {
+ } else if ((this.typ==2)) {
+ if ((this.decomptyp==0)) {
function_name = "matz_sum";
out = [1,1];
- } else if ((decomptyp==2)) {
+ } else if ((this.decomptyp==2)) {
function_name = "matz_suml";
out = [-1,1];
- } else if ((decomptyp==1)) {
+ } else if ((this.decomptyp==1)) {
function_name = "matz_sumc";
out = [1,-2];
} else {
diff --git a/js/MatrixOp/MATSUM.pickle b/js/MatrixOp/MATSUM.pickle
index 0d1dde24..a200ffa9 100644
--- a/js/MatrixOp/MATSUM.pickle
+++ b/js/MatrixOp/MATSUM.pickle
@@ -4,6 +4,12 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'typ'
+p3
+aS'lab'
+p4
+aS'decomptyp'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/MatrixOp/MATTRAN.js b/js/MatrixOp/MATTRAN.js
index 3baaa628..b93447cc 100644
--- a/js/MatrixOp/MATTRAN.js
+++ b/js/MatrixOp/MATTRAN.js
@@ -27,16 +27,16 @@ function MATTRAN() {
label[2-1] = sci2exp(1);
}
while (true) {
- [ok,typ,rule,exprs] = scicos_getvalue("Set MATTRAN Block",[["Datatype(1=real double 2=Complex)"],["rule (1=.\' 2=\')"]],list("vec",1,"vec",1),label);
+ [ok,this.typ,this.rule,exprs] = scicos_getvalue("Set MATTRAN Block",[["Datatype(1=real double 2=Complex)"],["rule (1=.\' 2=\')"]],list("vec",1,"vec",1),label);
if (!ok) {
break;
}
- if ((typ==1)) {
+ if ((this.typ==1)) {
function_name = "mattran_m";
ot = 1;
it = 1;
- } else if ((typ==2)) {
- if (rule==1) {
+ } else if ((this.typ==2)) {
+ if (this.rule==1) {
function_name = "matztran_m";
} else {
function_name = "mathermit_m";
diff --git a/js/MatrixOp/MATTRAN.pickle b/js/MatrixOp/MATTRAN.pickle
index 0d1dde24..9e238f36 100644
--- a/js/MatrixOp/MATTRAN.pickle
+++ b/js/MatrixOp/MATTRAN.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'typ'
+p3
+aS'rule'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/MatrixOp/MATZREIM.js b/js/MatrixOp/MATZREIM.js
index a2f7ea3b..58cb5d71 100644
--- a/js/MatrixOp/MATZREIM.js
+++ b/js/MatrixOp/MATZREIM.js
@@ -39,18 +39,18 @@ function MATZREIM() {
label[9-1] = [];
}
while (true) {
- [ok,decomptyp,lab] = scicos_getvalue("Set MATZREIM block parameters",["decomposition type (1=Complex2Real&Imag 2=Real&Imag2Complex)"],list("vec",1),label);
+ [ok,this.decomptyp,this.lab] = scicos_getvalue("Set MATZREIM block parameters",["decomposition type (1=Complex2Real&Imag 2=Real&Imag2Complex)"],list("vec",1),label);
if (!ok) {
break;
}
- label = lab;
- if ((decomptyp==1)) {
+ label = this.lab;
+ if ((this.decomptyp==1)) {
function_name = "matz_reim";
in1 = [-1,-2];
it = 2;
out = [[-1,-2],[-1,-2]];
ot = [1,1];
- } else if ((decomptyp==2)) {
+ } else if ((this.decomptyp==2)) {
function_name = "matz_reimc";
in1 = [[-1,-2],[-1,-2]];
it = [1,1];
diff --git a/js/MatrixOp/MATZREIM.pickle b/js/MatrixOp/MATZREIM.pickle
index 0d1dde24..92ce3a57 100644
--- a/js/MatrixOp/MATZREIM.pickle
+++ b/js/MatrixOp/MATZREIM.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'lab'
+p3
+aS'decomptyp'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/MatrixOp/RICC.js b/js/MatrixOp/RICC.js
index 44e698eb..f4553a71 100644
--- a/js/MatrixOp/RICC.js
+++ b/js/MatrixOp/RICC.js
@@ -39,7 +39,7 @@ function RICC() {
label[9-1] = [];
}
while (true) {
- [ok,tpe,mod,exprs] = scicos_getvalue("Set RICC Block",[["Type (1=Cont 2=Disc)"],["Model(1=Schr 2=sign(cont) inv(disc))"]],list("vec",1,"vec",1),label);
+ [ok,this.tpe,this.mod,exprs] = scicos_getvalue("Set RICC Block",[["Type (1=Cont 2=Disc)"],["Model(1=Schr 2=sign(cont) inv(disc))"]],list("vec",1,"vec",1),label);
if (!ok) {
break;
}
@@ -50,7 +50,7 @@ function RICC() {
label = exprs;
[model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),[],[]);
if (ok) {
- model.ipar = [[tpe],[mod]];
+ model.ipar = [[this.tpe],[this.mod]];
graphics.exprs = label;
arg1.graphics = graphics;
arg1.model = model;
diff --git a/js/MatrixOp/RICC.pickle b/js/MatrixOp/RICC.pickle
index 0d1dde24..d514a4ad 100644
--- a/js/MatrixOp/RICC.pickle
+++ b/js/MatrixOp/RICC.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'tpe'
+p3
+aS'mod'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/MatrixOp/ROOTCOEF.js b/js/MatrixOp/ROOTCOEF.js
index 7f17176d..44a382f0 100644
--- a/js/MatrixOp/ROOTCOEF.js
+++ b/js/MatrixOp/ROOTCOEF.js
@@ -39,15 +39,15 @@ function ROOTCOEF() {
label[9-1] = [];
}
while (true) {
- [ok,typ,inp,exprs] = scicos_getvalue("Set ROOTCOEF Block",[["Datatype(1=real double 2=Complex)"],["input row size"]],list("vec",1,"vec",1),label);
+ [ok,this.typ,this.inp,exprs] = scicos_getvalue("Set ROOTCOEF Block",[["Datatype(1=real double 2=Complex)"],["input row size"]],list("vec",1,"vec",1),label);
if (!ok) {
break;
}
- if ((typ==1)) {
+ if ((this.typ==1)) {
function_name = "root_coef";
ot = 1;
it = 1;
- } else if ((typ==2)) {
+ } else if ((this.typ==2)) {
function_name = "rootz_coef";
ot = 2;
it = 2;
@@ -55,8 +55,8 @@ function ROOTCOEF() {
message("Datatype is not supported");
ok = false;
}
- in1 = [inp,model.in2];
- out = [inp+1,model.out2];
+ in1 = [this.inp,model.in2];
+ out = [this.inp+1,model.out2];
funtyp = 4;
if (ok) {
label = exprs;
diff --git a/js/MatrixOp/ROOTCOEF.pickle b/js/MatrixOp/ROOTCOEF.pickle
index 0d1dde24..dd42296d 100644
--- a/js/MatrixOp/ROOTCOEF.pickle
+++ b/js/MatrixOp/ROOTCOEF.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'inp'
+p3
+aS'typ'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/MatrixOp/SQRT.js b/js/MatrixOp/SQRT.js
index 4dba0fcd..f3ead18e 100644
--- a/js/MatrixOp/SQRT.js
+++ b/js/MatrixOp/SQRT.js
@@ -26,20 +26,20 @@ function SQRT() {
label = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,typ,exprs] = scicos_getvalue("Set SQRT Block",["Datatype(1=real double 2=Complex)"],list("vec",1),label);
+ [ok,this.typ,exprs] = scicos_getvalue("Set SQRT Block",["Datatype(1=real double 2=Complex)"],list("vec",1),label);
if (!ok) {
break;
}
- if ((typ==1)) {
+ if ((this.typ==1)) {
function_name = "mat_sqrt";
- } else if ((typ==2)) {
+ } else if ((this.typ==2)) {
function_name = "matz_sqrt";
} else {
message("type is not supported");
ok = false;
}
- it = typ;
- ot = typ;
+ it = this.typ;
+ ot = this.typ;
in1 = [model.in1,model.in2];
out = [model.out,model.out2];
funtyp = 4;
diff --git a/js/MatrixOp/SQRT.pickle b/js/MatrixOp/SQRT.pickle
index 0d1dde24..86921c4a 100644
--- a/js/MatrixOp/SQRT.pickle
+++ b/js/MatrixOp/SQRT.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'typ'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/MatrixOp/SUBMAT.js b/js/MatrixOp/SUBMAT.js
index 9f9dcc68..fa74de90 100644
--- a/js/MatrixOp/SUBMAT.js
+++ b/js/MatrixOp/SUBMAT.js
@@ -39,15 +39,15 @@ function SUBMAT() {
label[6-1] = sci2exp([1,1]);
}
while (true) {
- [ok,typ,a,b,c,d,inp,exprs] = scicos_getvalue("Set SUBMAT Block",[["Datatype (1=real double 2=Complex)"],["Starting Row Index"],["Ending Row Index"],["Starting Column Index"],["Ending Column Index"],["Input Dimensions"]],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",2),label);
+ [ok,this.typ,this.a,this.b,this.c,this.d,this.inp,exprs] = scicos_getvalue("Set SUBMAT Block",[["Datatype (1=real double 2=Complex)"],["Starting Row Index"],["Ending Row Index"],["Starting Column Index"],["Ending Column Index"],["Input Dimensions"]],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",2),label);
if (!ok) {
break;
}
- if ((typ==1)) {
+ if ((this.typ==1)) {
function_name = "submat";
ot = 1;
it = 1;
- } else if ((typ==2)) {
+ } else if ((this.typ==2)) {
function_name = "submatz";
ot = 2;
it = 2;
@@ -55,29 +55,29 @@ function SUBMAT() {
message("Datatype is not supported");
ok = false;
}
- if ((a<=0)||(b<=0)||(c<=0)||(d<=0)) {
+ if ((this.a<=0)||(this.b<=0)||(this.c<=0)||(this.d<=0)) {
message("invalid index");
ok = false;
}
- if (b<a) {
+ if (this.b<this.a) {
message("ending row must be greater than starting row");
ok = false;
}
- if (d<c) {
+ if (this.d<this.c) {
message("ending column must be greater than starting column");
ok = false;
}
- if (b>inp[1-1]) {
+ if (this.b>this.inp[1-1]) {
message("index of ending row is out of range");
ok = false;
}
- if (d>inp[2-1]) {
+ if (this.d>this.inp[2-1]) {
message("index of ending column is out of range");
ok = false;
}
- model.ipar = [[a],[b],[c],[d]];
- in1 = [inp[1-1],inp[2-1]];
- out = [(b-a)+1,(d-c)+1];
+ model.ipar = [[this.a],[this.b],[this.c],[this.d]];
+ in1 = [this.inp[1-1],this.inp[2-1]];
+ out = [(this.b-this.a)+1,(this.d-this.c)+1];
funtyp = 4;
label = exprs;
if (ok) {
diff --git a/js/MatrixOp/SUBMAT.pickle b/js/MatrixOp/SUBMAT.pickle
index 0d1dde24..c63ca321 100644
--- a/js/MatrixOp/SUBMAT.pickle
+++ b/js/MatrixOp/SUBMAT.pickle
@@ -2,8 +2,20 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'a'
p2
-atp3
-Rp4
+aS'c'
+p3
+aS'b'
+p4
+aS'd'
+p5
+aS'inp'
+p6
+aS'x'
+p7
+aS'typ'
+p8
+atp9
+Rp10
. \ No newline at end of file
diff --git a/js/Misc/BACKLASH.js b/js/Misc/BACKLASH.js
index 3f3b3c3d..e08062fc 100644
--- a/js/Misc/BACKLASH.js
+++ b/js/Misc/BACKLASH.js
@@ -26,15 +26,15 @@ function BACKLASH() {
model = arg1.model;
rpar = model.rpar;
while (true) {
- [ok,ini,gap,zcr,exprs] = scicos_getvalue("Set backlash parameters",[["initial output"],["gap"],["use zero-crossing (0:no, 1:yes)"]],list("vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.ini,this.gap,this.zcr,exprs] = scicos_getvalue("Set backlash parameters",[["initial output"],["gap"],["use zero-crossing (0:no, 1:yes)"]],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
if (ok) {
graphics.exprs = exprs;
- rpar[1-1] = ini;
- rpar[2-1] = gap;
- if (zcr!=0) {
+ rpar[1-1] = this.ini;
+ rpar[2-1] = this.gap;
+ if (this.zcr!=0) {
model.nzcross = 2;
} else {
model.nzcross = 0;
diff --git a/js/Misc/BACKLASH.pickle b/js/Misc/BACKLASH.pickle
index 0d1dde24..27a56fa7 100644
--- a/js/Misc/BACKLASH.pickle
+++ b/js/Misc/BACKLASH.pickle
@@ -4,6 +4,12 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'ini'
+p3
+aS'zcr'
+p4
+aS'gap'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/Misc/BOUNCE.js b/js/Misc/BOUNCE.js
index a9558881..85fa5460 100644
--- a/js/Misc/BOUNCE.js
+++ b/js/Misc/BOUNCE.js
@@ -12,28 +12,28 @@ function BOUNCE() {
k = k+1;
}
}
- walls = [[0],[5],[0],[5]];
+ this.walls = [[0],[5],[0],[5]];
this.x = [[2],[2.5]];
- xd = [[0],[0]];
- y = [[3],[5]];
- yd = [[0],[0]];
- g = 9.81;
- C = 0;
- rpar1 = ones(n,1);
- rpar2 = rpar1;
- state = [this.x,xd,y,yd];
+ this.xd = [[0],[0]];
+ this.y = [[3],[5]];
+ this.yd = [[0],[0]];
+ this.g = 9.81;
+ this.C = 0;
+ this.rpar1 = ones(n,1);
+ this.rpar2 = this.rpar1;
+ state = [this.x,this.xd,this.y,this.yd];
state = transpose(state);
model = scicos_model();
model.sim = list("bounce_ball",4);
model.in1 = [];
model.out = [[n],[n]];
model.state = state.slice();
- model.rpar = [[rpar1],[rpar2],[walls],[g],[C]];
+ model.rpar = [[this.rpar1],[this.rpar2],[this.walls],[this.g],[this.C]];
model.ipar = ipar;
model.nzcross = n*(n-1)/2+4*n;
model.blocktype = "c";
model.dep_ut = [false,true];
- exprs = [[strcat(sci2exp(rpar1))],[strcat(sci2exp(rpar2))],[strcat(sci2exp(walls))],[strcat(sci2exp(this.x))],[strcat(sci2exp(xd))],[strcat(sci2exp(y))],[strcat(sci2exp(yd))]];
+ exprs = [[strcat(sci2exp(this.rpar1))],[strcat(sci2exp(this.rpar2))],[strcat(sci2exp(this.walls))],[strcat(sci2exp(this.x))],[strcat(sci2exp(this.xd))],[strcat(sci2exp(this.y))],[strcat(sci2exp(this.yd))]];
gr_i = [];
this.x = standard_define([3,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -53,28 +53,28 @@ function BOUNCE() {
exprs[9-1] = "0";
}
while (true) {
- [ok,rpar1,rpar2,walls,xt,xd,y,yd,g,C,exprs] = scicos_getvalue(["Set Bounce Block"],[["Mass"],["Radius"],["[xmin,xmax,ymin,ymax]"],["xpos"],["xdpos"],["ypos"],["ydpos"],["g (gravity)"],["C (aerodynamic coeff"]],list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",1,"vec",1),exprs);
+ [ok,this.rpar1,this.rpar2,this.walls,this.xt,this.xd,this.y,this.yd,this.g,this.C,exprs] = scicos_getvalue(["Set Bounce Block"],[["Mass"],["Radius"],["[xmin,xmax,ymin,ymax]"],["xpos"],["xdpos"],["ypos"],["ydpos"],["g (gravity)"],["C (aerodynamic coeff"]],list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- xt = xt.slice();
- y = y.slice();
- xd = xd.slice();
- yd = yd.slice();
- rpar1 = rpar1.slice();
- rpar2 = rpar2.slice();
- n = size(xt,"*");
- walls = walls.slice();
- if (walls[1-1]>walls[2-1]) {
- walls = walls[[2,1]-1];
+ this.xt = this.xt.slice();
+ this.y = this.y.slice();
+ this.xd = this.xd.slice();
+ this.yd = this.yd.slice();
+ this.rpar1 = this.rpar1.slice();
+ this.rpar2 = this.rpar2.slice();
+ n = size(this.xt,"*");
+ this.walls = this.walls.slice();
+ if (this.walls[1-1]>this.walls[2-1]) {
+ this.walls = this.walls[[2,1]-1];
}
- if (walls[3-1]>walls[3-1]) {
- walls = walls[[3,4]-1];
+ if (this.walls[3-1]>this.walls[3-1]) {
+ this.walls = this.walls[[3,4]-1];
}
- if (n!=size(y,"*")||n!=size(rpar1,"*")||n!=size(rpar2,"*")||n!=size(xd,"*")||n!=size(yd,"*")) {
+ if (n!=size(this.y,"*")||n!=size(this.rpar1,"*")||n!=size(this.rpar2,"*")||n!=size(this.xd,"*")||n!=size(this.yd,"*")) {
message("All vectors must have equal size");
ok = false;
- } else if (!(min([[rpar1],[rpar2]])>0)) {
+ } else if (!(min([[this.rpar1],[this.rpar2]])>0)) {
message("Mass and radius must be >0");
ok = false;
}
@@ -93,9 +93,9 @@ function BOUNCE() {
k = k+1;
}
}
- model.rpar = [[rpar1],[rpar2],[walls],[g],[C]];
+ model.rpar = [[this.rpar1],[this.rpar2],[this.walls],[this.g],[this.C]];
model.ipar = ipar;
- state = [xt,xd,y,yd];
+ state = [this.xt,this.xd,this.y,this.yd];
state = transpose(state);
model.state = state.slice();
model.nzcross = n*(n-1)/2+4*n;
diff --git a/js/Misc/BOUNCE.pickle b/js/Misc/BOUNCE.pickle
index 0d1dde24..d2d4ed4e 100644
--- a/js/Misc/BOUNCE.pickle
+++ b/js/Misc/BOUNCE.pickle
@@ -2,8 +2,26 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'C'
p2
-atp3
-Rp4
+aS'g'
+p3
+aS'yd'
+p4
+aS'xd'
+p5
+aS'walls'
+p6
+aS'rpar1'
+p7
+aS'rpar2'
+p8
+aS'y'
+p9
+aS'x'
+p10
+aS'xt'
+p11
+atp12
+Rp13
. \ No newline at end of file
diff --git a/js/Misc/BOUNCEXY.js b/js/Misc/BOUNCEXY.js
index 694adf68..7e67bc1f 100644
--- a/js/Misc/BOUNCEXY.js
+++ b/js/Misc/BOUNCEXY.js
@@ -1,14 +1,14 @@
/* autogenerated from "macros/Misc/BOUNCEXY.sci" */
function BOUNCEXY() {
BOUNCEXY.prototype.define = function BOUNCEXY() {
- win = -1;
- imode = 1;
- clrs = [[1],[2]];
- siz = [[1],[1]];
- xmin = -5;
- xmax = 5;
- ymin = 0;
- ymax = 15;
+ this.win = -1;
+ this.imode = 1;
+ this.clrs = [[1],[2]];
+ this.siz = [[1],[1]];
+ this.xmin = -5;
+ this.xmax = 5;
+ this.ymin = 0;
+ this.ymax = 15;
model = scicos_model();
model.sim = list("bouncexy",4);
model.in1 = [[-1],[-1]];
@@ -16,21 +16,21 @@ function BOUNCEXY() {
model.intyp = [[1],[1]];
model.evtin = 1;
z = [];
- for (i=1;i<=size(clrs,"*");i+=1) {
+ for (i=1;i<=size(this.clrs,"*");i+=1) {
z[6*(i-1)+1-1] = 0;
z[6*(i-1)+2-1] = 0;
- z[6*(i-1)+3-1] = 2*siz[i-1];
- z[6*(i-1)+4-1] = 2*siz[i-1];
+ z[6*(i-1)+3-1] = 2*this.siz[i-1];
+ z[6*(i-1)+4-1] = 2*this.siz[i-1];
z[6*(i-1)+5-1] = 0.000;
z[6*(i-1)+6-1] = 64.0*360.000;
}
model.dstate = z;
- model.rpar = [[xmin],[xmax],[ymin],[ymax]];
- model.ipar = [[win],[imode],[clrs.slice()]];
+ model.rpar = [[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
+ model.ipar = [[this.win],[this.imode],[this.clrs.slice()]];
model.blocktype = "d";
model.firing = [];
model.dep_ut = [false,false];
- exprs = [[strcat(sci2exp(clrs))],[strcat(sci2exp(siz))],[strcat(sci2exp(win))],[strcat(sci2exp(1))],[strcat(sci2exp(xmin))],[strcat(sci2exp(xmax))],[strcat(sci2exp(ymin))],[strcat(sci2exp(ymax))]];
+ exprs = [[strcat(sci2exp(this.clrs))],[strcat(sci2exp(this.siz))],[strcat(sci2exp(this.win))],[strcat(sci2exp(1))],[strcat(sci2exp(this.xmin))],[strcat(sci2exp(this.xmax))],[strcat(sci2exp(this.ymin))],[strcat(sci2exp(this.ymax))]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -47,38 +47,38 @@ function BOUNCEXY() {
model = arg1.model;
dstate = model.dstate;
while (true) {
- [ok,clrs,siz,win,imode,xmin,xmax,ymin,ymax,exprs] = scicos_getvalue("Set Scope parameters",[["colors"],["radii"],["window number (-1 for automatic)"],["animation mode (0,1)"],["Xmin"],["Xmax"],["Ymin"],["Ymax"]],list("vec",-1,"vec",-1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.clrs,this.siz,this.win,this.imode,this.xmin,this.xmax,this.ymin,this.ymax,exprs] = scicos_getvalue("Set Scope parameters",[["colors"],["radii"],["window number (-1 for automatic)"],["animation mode (0,1)"],["Xmin"],["Xmax"],["Ymin"],["Ymax"]],list("vec",-1,"vec",-1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
mess = [];
- if (size(clrs,"*")!=size(siz,"*")) {
+ if (size(this.clrs,"*")!=size(this.siz,"*")) {
mess = [[mess],["colors and radii must have equal size (number of balls)"],[" "]];
ok = false;
}
- if (win<-1) {
+ if (this.win<-1) {
mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
ok = false;
}
- if (ymin>=ymax) {
+ if (this.ymin>=this.ymax) {
mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
ok = false;
}
- if (xmin>=xmax) {
+ if (this.xmin>=this.xmax) {
mess = [[mess],["Xmax must be greater than Xmin"],[" "]];
ok = false;
}
if (!ok) {
message(mess);
} else {
- rpar = [[xmin],[xmax],[ymin],[ymax]];
- ipar = [[win],[imode],[clrs.slice()]];
+ rpar = [[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
+ ipar = [[this.win],[this.imode],[this.clrs.slice()]];
z = [];
- for (i=1;i<=size(clrs,"*");i+=1) {
+ for (i=1;i<=size(this.clrs,"*");i+=1) {
z[6*(i-1)+1-1] = 0;
z[6*(i-1)+2-1] = 0;
- z[6*(i-1)+3-1] = 2*siz[i-1];
- z[6*(i-1)+4-1] = 2*siz[i-1];
+ z[6*(i-1)+3-1] = 2*this.siz[i-1];
+ z[6*(i-1)+4-1] = 2*this.siz[i-1];
z[6*(i-1)+5-1] = 0.000;
z[6*(i-1)+6-1] = 64.0*360.000;
}
diff --git a/js/Misc/BOUNCEXY.pickle b/js/Misc/BOUNCEXY.pickle
index 0d1dde24..126d53ae 100644
--- a/js/Misc/BOUNCEXY.pickle
+++ b/js/Misc/BOUNCEXY.pickle
@@ -2,8 +2,24 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'clrs'
p2
-atp3
-Rp4
+aS'siz'
+p3
+aS'ymax'
+p4
+aS'imode'
+p5
+aS'xmax'
+p6
+aS'win'
+p7
+aS'xmin'
+p8
+aS'x'
+p9
+aS'ymin'
+p10
+atp11
+Rp12
. \ No newline at end of file
diff --git a/js/Misc/BPLATFORM.js b/js/Misc/BPLATFORM.js
index ec1ad3a7..ed9aa786 100644
--- a/js/Misc/BPLATFORM.js
+++ b/js/Misc/BPLATFORM.js
@@ -1,19 +1,19 @@
/* autogenerated from "macros/Misc/BPLATFORM.sci" */
function BPLATFORM() {
BPLATFORM.prototype.define = function BPLATFORM() {
- plen = 2;
- csiz = 2;
- phi = 0;
- xmin = -5;
- xmax = 5;
- ymin = 0;
- ymax = 15;
+ this.plen = 2;
+ this.csiz = 2;
+ this.phi = 0;
+ this.xmin = -5;
+ this.xmax = 5;
+ this.ymin = 0;
+ this.ymax = 15;
model = scicos_model();
model.sim = list("bplatform2",5);
model.in1 = [[1],[1]];
model.evtin = 1;
model.dstate = 0;
- model.rpar = [[plen],[csiz],[phi],[xmin],[xmax],[ymin],[ymax]];
+ model.rpar = [[this.plen],[this.csiz],[this.phi],[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
model.blocktype = "d";
model.dep_ut = [false,false];
exprs = string(model.rpar);
@@ -33,27 +33,27 @@ function BPLATFORM() {
model = arg1.model;
dstate = model.dstate;
while (true) {
- [ok,plen,csiz,phi,xmin,xmax,ymin,ymax,exprs] = scicos_getvalue("Set Scope parameters",[["pendulum length"],["cart size (square side)"],["slope"],["Xmin"],["Xmax"],["Ymin"],["Ymax"]],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.plen,this.csiz,this.phi,this.xmin,this.xmax,this.ymin,this.ymax,exprs] = scicos_getvalue("Set Scope parameters",[["pendulum length"],["cart size (square side)"],["slope"],["Xmin"],["Xmax"],["Ymin"],["Ymax"]],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
mess = [];
- if (plen<=0||csiz<=0) {
+ if (this.plen<=0||this.csiz<=0) {
mess = [[mess],["Pendulum length and cart size must be positive."],[" "]];
ok = false;
}
- if (ymin>=ymax) {
+ if (this.ymin>=this.ymax) {
mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
ok = false;
}
- if (xmin>=xmax) {
+ if (this.xmin>=this.xmax) {
mess = [[mess],["Xmax must be greater than Xmin"],[" "]];
ok = false;
}
if (!ok) {
message(mess);
} else {
- rpar = [[plen],[csiz],[phi],[xmin],[xmax],[ymin],[ymax]];
+ rpar = [[this.plen],[this.csiz],[this.phi],[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
model.rpar = rpar;
graphics.exprs = exprs;
this.x.graphics = graphics;
diff --git a/js/Misc/BPLATFORM.pickle b/js/Misc/BPLATFORM.pickle
index 0d1dde24..b9b40604 100644
--- a/js/Misc/BPLATFORM.pickle
+++ b/js/Misc/BPLATFORM.pickle
@@ -2,8 +2,22 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'phi'
p2
-atp3
-Rp4
+aS'ymax'
+p3
+aS'csiz'
+p4
+aS'xmax'
+p5
+aS'plen'
+p6
+aS'xmin'
+p7
+aS'x'
+p8
+aS'ymin'
+p9
+atp10
+Rp11
. \ No newline at end of file
diff --git a/js/Misc/CBLOCK.js b/js/Misc/CBLOCK.js
index 79830868..305ce9f7 100644
--- a/js/Misc/CBLOCK.js
+++ b/js/Misc/CBLOCK.js
@@ -9,10 +9,10 @@ function CBLOCK() {
z0 = [];
typ = "c";
auto = [];
- rpar = [];
- ipar = [];
+ this.rpar = [];
+ this.ipar = [];
funam = "toto";
- ng = 0;
+ this.ng = 0;
model = scicos_model();
model.sim = list(" ",2004);
model.in1 = in1;
@@ -21,13 +21,13 @@ function CBLOCK() {
model.evtout = clkout;
model.state = x0;
model.dstate = z0;
- model.rpar = rpar;
- model.ipar = ipar;
+ model.rpar = this.rpar;
+ model.ipar = this.ipar;
model.blocktype = typ;
model.firing = auto;
model.dep_ut = [true,false];
- model.nzcross = ng;
- label = list(transpose([funam,"n",sci2exp(in1),sci2exp(out),sci2exp(clkin),sci2exp(clkout),sci2exp(x0),sci2exp(0),sci2exp(z0),sci2exp(rpar),sci2exp(ipar),sci2exp(auto),"y","n"]),[]);
+ model.nzcross = this.ng;
+ label = list(transpose([funam,"n",sci2exp(in1),sci2exp(out),sci2exp(clkin),sci2exp(clkout),sci2exp(x0),sci2exp(0),sci2exp(z0),sci2exp(this.rpar),sci2exp(this.ipar),sci2exp(auto),"y","n"]),[]);
gr_i = [];
this.x = standard_define([4,2],model,label,gr_i);
return new BasicBlock(this.x);
@@ -43,53 +43,53 @@ function CBLOCK() {
graphics = arg1.graphics;
label = graphics.exprs;
while (true) {
- [ok,function_name,impli,i,o,ci,co,xx,ng,z,rpar,ipar,auto0,depu,dept,lab] = scicos_getvalue("Set C-Block2 block parameters",[["simulation function"],["is block implicit? (y,n)"],["input ports sizes"],["output ports sizes"],["input event ports sizes"],["output events ports sizes"],["initial continuous state"],["number of zero crossing surfaces"],["initial discrete state"],["Real parameters vector"],["Integer parameters vector"],["initial firing vector (<0 for no firing)"],["direct feedthrough (y or n)"],["time dependence (y or n)"]],list("str",1,"str",1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",1,"vec",-1,"vec",-1,"vec",-1,"vec","sum(%6)","str",1,"str",1),label[1-1]);
+ [ok,this.function_name,this.impli,this.i,this.o,this.ci,this.co,this.xx,this.ng,this.z,this.rpar,this.ipar,this.auto0,this.depu,this.dept,this.lab] = scicos_getvalue("Set C-Block2 block parameters",[["simulation function"],["is block implicit? (y,n)"],["input ports sizes"],["output ports sizes"],["input event ports sizes"],["output events ports sizes"],["initial continuous state"],["number of zero crossing surfaces"],["initial discrete state"],["Real parameters vector"],["Integer parameters vector"],["initial firing vector (<0 for no firing)"],["direct feedthrough (y or n)"],["time dependence (y or n)"]],list("str",1,"str",1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",1,"vec",-1,"vec",-1,"vec",-1,"vec","sum(%6)","str",1,"str",1),label[1-1]);
if (!ok) {
break;
}
- label[1-1] = lab;
- funam = stripblanks(function_name);
- xx = xx.slice();
- z = z.slice();
- rpar = rpar.slice();
- ipar = int(ipar.slice());
- nx = size(xx,1);
- nz = size(z,1);
- i = int(i.slice());
- o = int(o.slice());
- nout = size(o,1);
- ci = int(ci.slice());
- nevin = size(ci,1);
- co = int(co.slice());
- nevout = size(co,1);
- if (part(impli,1)=="y") {
+ label[1-1] = this.lab;
+ funam = stripblanks(this.function_name);
+ this.xx = this.xx.slice();
+ this.z = this.z.slice();
+ this.rpar = this.rpar.slice();
+ this.ipar = int(this.ipar.slice());
+ nx = size(this.xx,1);
+ nz = size(this.z,1);
+ this.i = int(this.i.slice());
+ this.o = int(this.o.slice());
+ nout = size(this.o,1);
+ this.ci = int(this.ci.slice());
+ nevin = size(this.ci,1);
+ this.co = int(this.co.slice());
+ nevout = size(this.co,1);
+ if (part(this.impli,1)=="y") {
funtyp = 12004;
} else {
funtyp = 2004;
}
- if ([[ci],[co]]!=[]) {
- if (max([[ci],[co]])>1) {
+ if ([[this.ci],[this.co]]!=[]) {
+ if (max([[this.ci],[this.co]])>1) {
message("vector event links not supported");
ok = false;
}
}
- depu = stripblanks(depu);
- if (part(depu,1)=="y") {
- depu = true;
+ this.depu = stripblanks(this.depu);
+ if (part(this.depu,1)=="y") {
+ this.depu = true;
} else {
- depu = false;
+ this.depu = false;
}
- dept = stripblanks(dept);
- if (part(dept,1)=="y") {
- dept = true;
+ this.dept = stripblanks(this.dept);
+ if (part(this.dept,1)=="y") {
+ this.dept = true;
} else {
- dept = false;
+ this.dept = false;
}
- dep_ut = [depu,dept];
+ dep_ut = [this.depu,this.dept];
if (funam==" ") {
break;
}
- if (model.sim[1-1]!=funam||sign(size(model.state,"*"))!=sign(nx)||sign(size(model.dstate,"*"))!=sign(nz)||model.nzcross!=ng||sign(size(model.evtout,"*"))!=sign(nevout)) {
+ if (model.sim[1-1]!=funam||sign(size(model.state,"*"))!=sign(nx)||sign(size(model.dstate,"*"))!=sign(nz)||model.nzcross!=this.ng||sign(size(model.evtout,"*"))!=sign(nevout)) {
tt = [];
}
tt = label[2-1];
@@ -100,20 +100,20 @@ function CBLOCK() {
break;
}
} else {
- [model,graphics,ok] = check_io(model,graphics,i,o,ci,co);
+ [model,graphics,ok] = check_io(model,graphics,this.i,this.o,this.ci,this.co);
if (ok) {
model.sim = list(funam,funtyp);
- model.in1 = i;
- model.out = o;
- model.evtin = ci;
- model.evtout = co;
- model.state = xx;
- model.dstate = z;
- model.rpar = rpar;
- model.ipar = ipar;
- model.firing = auto0;
+ model.in1 = this.i;
+ model.out = this.o;
+ model.evtin = this.ci;
+ model.evtout = this.co;
+ model.state = this.xx;
+ model.dstate = this.z;
+ model.rpar = this.rpar;
+ model.ipar = this.ipar;
+ model.firing = this.auto0;
model.dep_ut = dep_ut;
- model.nzcross = ng;
+ model.nzcross = this.ng;
label[2-1] = tt;
this.x.model = model;
graphics.exprs = label;
diff --git a/js/Misc/CBLOCK.pickle b/js/Misc/CBLOCK.pickle
index 0d1dde24..03de52dc 100644
--- a/js/Misc/CBLOCK.pickle
+++ b/js/Misc/CBLOCK.pickle
@@ -2,8 +2,38 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'impli'
p2
-atp3
-Rp4
+aS'co'
+p3
+aS'i'
+p4
+aS'auto0'
+p5
+aS'ci'
+p6
+aS'o'
+p7
+aS'ng'
+p8
+aS'depu'
+p9
+aS'dept'
+p10
+aS'xx'
+p11
+aS'rpar'
+p12
+aS'lab'
+p13
+aS'ipar'
+p14
+aS'x'
+p15
+aS'z'
+p16
+aS'function_name'
+p17
+atp18
+Rp19
. \ No newline at end of file
diff --git a/js/Misc/CBLOCK4.js b/js/Misc/CBLOCK4.js
index f0d39733..42697562 100644
--- a/js/Misc/CBLOCK4.js
+++ b/js/Misc/CBLOCK4.js
@@ -27,55 +27,55 @@ function CBLOCK4() {
graphics = arg1.graphics;
label = graphics.exprs;
while (true) {
- [ok,function_name,impli,in1,it,out,ot,ci,co,xx,z,oz,rpar,ipar,opar,nmode,nzcr,auto0,depu,dept,lab] = scicos_getvalue("Set C-Block4 block parameters",[["Simulation function"],["Is block implicit? (y,n)"],["Input ports sizes"],["Input ports type"],["Output port sizes"],["Output ports type"],["Input event ports sizes"],["Output events ports sizes"],["Initial continuous state"],["Initial discrete state"],["Initial object state"],["Real parameters vector"],["Integer parameters vector"],["Object parameters list"],["Number of modes"],["Number of zero crossings"],["Initial firing vector (<0 for no firing)"],["Direct feedthrough (y or n)"],["Time dependence (y or n)"]],list("str",1,"str",1,"mat",[-1,2],"vec",-1,"mat",[-1,2],"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"lis",-1,"vec",-1,"vec",-1,"lis",-1,"vec",1,"vec",1,"vec","sum(%8)","str",1,"str",1),label[1-1]);
+ [ok,this.function_name,this.impli,this.in1,this.it,this.out,this.ot,this.ci,this.co,this.xx,this.z,this.oz,this.rpar,this.ipar,this.opar,this.nmode,this.nzcr,this.auto0,this.depu,this.dept,this.lab] = scicos_getvalue("Set C-Block4 block parameters",[["Simulation function"],["Is block implicit? (y,n)"],["Input ports sizes"],["Input ports type"],["Output port sizes"],["Output ports type"],["Input event ports sizes"],["Output events ports sizes"],["Initial continuous state"],["Initial discrete state"],["Initial object state"],["Real parameters vector"],["Integer parameters vector"],["Object parameters list"],["Number of modes"],["Number of zero crossings"],["Initial firing vector (<0 for no firing)"],["Direct feedthrough (y or n)"],["Time dependence (y or n)"]],list("str",1,"str",1,"mat",[-1,2],"vec",-1,"mat",[-1,2],"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"lis",-1,"vec",-1,"vec",-1,"lis",-1,"vec",1,"vec",1,"vec","sum(%8)","str",1,"str",1),label[1-1]);
if (!ok) {
break;
}
- label[1-1] = lab;
- funam = stripblanks(function_name);
- xx = xx.slice();
- z = z.slice();
- rpar = rpar.slice();
- ipar = int(ipar.slice());
- nx = size(xx,1);
- nz = size(z,1);
- ci = int(ci.slice());
- nevin = size(ci,1);
- co = int(co.slice());
- nevout = size(co,1);
- if (part(impli,1)=="y") {
+ label[1-1] = this.lab;
+ funam = stripblanks(this.function_name);
+ this.xx = this.xx.slice();
+ this.z = this.z.slice();
+ this.rpar = this.rpar.slice();
+ this.ipar = int(this.ipar.slice());
+ nx = size(this.xx,1);
+ nz = size(this.z,1);
+ this.ci = int(this.ci.slice());
+ nevin = size(this.ci,1);
+ this.co = int(this.co.slice());
+ nevout = size(this.co,1);
+ if (part(this.impli,1)=="y") {
funtyp = 12004;
} else {
funtyp = 2004;
}
- if ([[ci],[co]]!=[]) {
- if (max([[ci],[co]])>1) {
+ if ([[this.ci],[this.co]]!=[]) {
+ if (max([[this.ci],[this.co]])>1) {
message("vector event links not supported");
ok = false;
}
}
if (ok) {
- depu = stripblanks(depu);
- if (part(depu,1)=="y") {
- depu = true;
+ this.depu = stripblanks(this.depu);
+ if (part(this.depu,1)=="y") {
+ this.depu = true;
} else {
- depu = false;
+ this.depu = false;
}
- dept = stripblanks(dept);
- if (part(dept,1)=="y") {
- dept = true;
+ this.dept = stripblanks(this.dept);
+ if (part(this.dept,1)=="y") {
+ this.dept = true;
} else {
- dept = false;
+ this.dept = false;
}
- dep_ut = [depu,dept];
+ dep_ut = [this.depu,this.dept];
if (funam==" ") {
break;
}
- if (model.sim[1-1]!=funam||sign(size(model.state,"*"))!=sign(nx)||sign(size(model.dstate,"*"))!=sign(nz)||model.nzcross!=nzcr||sign(size(model.evtout,"*"))!=sign(nevout)) {
+ if (model.sim[1-1]!=funam||sign(size(model.state,"*"))!=sign(nx)||sign(size(model.dstate,"*"))!=sign(nz)||model.nzcross!=this.nzcr||sign(size(model.evtout,"*"))!=sign(nevout)) {
tt = [];
}
tt = label[2-1];
- [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),ci,co);
+ [model,graphics,ok] = set_io(model,graphics,list(this.in1,this.it),list(this.out,this.ot),this.ci,this.co);
}
if (ok) {
while (true) {
@@ -86,15 +86,15 @@ function CBLOCK4() {
}
} else {
model.sim = list(funam,funtyp);
- model.state = xx;
- model.dstate = z;
- model.odstate = oz;
- model.rpar = rpar;
- model.ipar = ipar;
- model.opar = opar;
- model.firing = auto0;
- model.nzcross = nzcr;
- model.nmode = nmode;
+ model.state = this.xx;
+ model.dstate = this.z;
+ model.odstate = this.oz;
+ model.rpar = this.rpar;
+ model.ipar = this.ipar;
+ model.opar = this.opar;
+ model.firing = this.auto0;
+ model.nzcross = this.nzcr;
+ model.nmode = this.nmode;
model.dep_ut = dep_ut;
label[2-1] = tt;
this.x.model = model;
diff --git a/js/Misc/CBLOCK4.pickle b/js/Misc/CBLOCK4.pickle
index 97b4636e..c7fe3d2c 100644
--- a/js/Misc/CBLOCK4.pickle
+++ b/js/Misc/CBLOCK4.pickle
@@ -2,10 +2,50 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'impli'
p2
-aS'CC4'
+aS'co'
p3
-atp4
-Rp5
+aS'ci'
+p4
+aS'rpar'
+p5
+aS'xx'
+p6
+aS'out'
+p7
+aS'function_name'
+p8
+aS'in1'
+p9
+aS'lab'
+p10
+aS'it'
+p11
+aS'nmode'
+p12
+aS'z'
+p13
+aS'CC4'
+p14
+aS'auto0'
+p15
+aS'nzcr'
+p16
+aS'depu'
+p17
+aS'dept'
+p18
+aS'opar'
+p19
+aS'oz'
+p20
+aS'ipar'
+p21
+aS'x'
+p22
+aS'ot'
+p23
+atp24
+Rp25
. \ No newline at end of file
diff --git a/js/Misc/CONSTRAINT2_c.js b/js/Misc/CONSTRAINT2_c.js
index bf52312c..b1491fc7 100644
--- a/js/Misc/CONSTRAINT2_c.js
+++ b/js/Misc/CONSTRAINT2_c.js
@@ -1,18 +1,18 @@
/* autogenerated from "macros/Misc/CONSTRAINT2_c.sci" */
function CONSTRAINT2_c() {
CONSTRAINT2_c.prototype.define = function CONSTRAINT2_c() {
- x0 = [0];
- xd0 = [0];
- id = [0];
+ this.x0 = [0];
+ this.xd0 = [0];
+ this.id = [0];
model = scicos_model();
model.sim = list("constraint_c",10004);
model.in1 = 1;
model.out = [[1],[1]];
- model.state = [[x0],[xd0]];
- model.ipar = id;
+ model.state = [[this.x0],[this.xd0]];
+ model.ipar = this.id;
model.blocktype = "c";
model.dep_ut = [false,true];
- exprs = list(strcat(sci2exp(x0)),strcat(sci2exp(xd0)),strcat(sci2exp(id)));
+ exprs = list(strcat(sci2exp(this.x0)),strcat(sci2exp(this.xd0)),strcat(sci2exp(this.id)));
gr_i = [];
this.x = standard_define([3,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -29,16 +29,16 @@ function CONSTRAINT2_c() {
model = arg1.model;
while (true) {
ask_again = false;
- [ok,x0,xd0,id,exprs] = scicos_getvalue("Set Constraint block parameters",[["Initial guess values of states x"],["Initial guess values of derivative x\'"],["Id(i)=1: if x\'(i) is present in the feedback, else Id(i)=0"]],list("vec",-1,"vec",-1,"vec",-1),exprs);
+ [ok,this.x0,this.xd0,this.id,exprs] = scicos_getvalue("Set Constraint block parameters",[["Initial guess values of states x"],["Initial guess values of derivative x\'"],["Id(i)=1: if x\'(i) is present in the feedback, else Id(i)=0"]],list("vec",-1,"vec",-1,"vec",-1),exprs);
if (!ok) {
break;
}
- x0 = x0.slice();
- N = size(x0,"*");
- xd0 = xd0.slice();
- Nxd = size(xd0,"*");
- id = id.slice();
- Nid = size(id,"*");
+ this.x0 = this.x0.slice();
+ N = size(this.x0,"*");
+ this.xd0 = this.xd0.slice();
+ Nxd = size(this.xd0,"*");
+ this.id = this.id.slice();
+ Nid = size(this.id,"*");
if ((N!=Nxd)||(N!=Nid)) {
message("incompatible sizes, states, their derivatives, and ID should be the same size ");
ask_again = true;
@@ -49,22 +49,22 @@ function CONSTRAINT2_c() {
}
if ((!ask_again)) {
for (i=1;i<=N;i+=1) {
- if (!((id[i-1]==0)||(id[i-1]==1))) {
+ if (!((this.id[i-1]==0)||(this.id[i-1]==1))) {
ask_again = true;
x_message([["Id(i) must be either"],["0 when x\'(i) is not present in the feedback"],["1: when x\'(i) is present in the feedback"]]);
break;
}
- if ((id[i-1]==0)) {
- id[i-1] = -1;
+ if ((this.id[i-1]==0)) {
+ this.id[i-1] = -1;
}
}
}
if (!ask_again) {
graphics.exprs = exprs;
- model.state = [[x0],[xd0]];
+ model.state = [[this.x0],[this.xd0]];
model.out = [[N],[N]];
model.in1 = N;
- model.ipar = id;
+ model.ipar = this.id;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Misc/CONSTRAINT2_c.pickle b/js/Misc/CONSTRAINT2_c.pickle
index 0d1dde24..5bd09a0b 100644
--- a/js/Misc/CONSTRAINT2_c.pickle
+++ b/js/Misc/CONSTRAINT2_c.pickle
@@ -4,6 +4,12 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'x0'
+p3
+aS'id'
+p4
+aS'xd0'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/Misc/CONSTRAINT_c.js b/js/Misc/CONSTRAINT_c.js
index 33b9a1d5..e9bd4102 100644
--- a/js/Misc/CONSTRAINT_c.js
+++ b/js/Misc/CONSTRAINT_c.js
@@ -1,13 +1,13 @@
/* autogenerated from "macros/Misc/CONSTRAINT_c.sci" */
function CONSTRAINT_c() {
CONSTRAINT_c.prototype.define = function CONSTRAINT_c() {
- x0 = [[0],[0]];
+ this.x0 = [[0],[0]];
model = scicos_model();
model.sim = list("constraint_c",10004);
model.in1 = 1;
model.out = 1;
model.ipar = 0;
- model.state = x0;
+ model.state = this.x0;
model.blocktype = "c";
model.dep_ut = [false,true];
exprs = "0";
@@ -26,19 +26,19 @@ function CONSTRAINT_c() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,x0,exprs] = scicos_getvalue("Set solver block parameters","Initial guess values",list("vec",-1),exprs);
+ [ok,this.x0,exprs] = scicos_getvalue("Set solver block parameters","Initial guess values",list("vec",-1),exprs);
if (!ok) {
break;
}
- x0 = x0.slice();
- N = size(x0,"*");
+ this.x0 = this.x0.slice();
+ N = size(this.x0,"*");
if (N<=0) {
message("number of states (constraints) must be > 0 ");
} else {
[model,graphics,ok] = check_io(model,graphics,N,N,[],[]);
if (ok) {
graphics.exprs = exprs;
- model.state = [[x0],[zeros(N,1)]];
+ model.state = [[this.x0],[zeros(N,1)]];
model.out = N;
model.in1 = N;
model.ipar = -1*ones(N,1);
diff --git a/js/Misc/CONSTRAINT_c.pickle b/js/Misc/CONSTRAINT_c.pickle
index 0d1dde24..f41d682d 100644
--- a/js/Misc/CONSTRAINT_c.pickle
+++ b/js/Misc/CONSTRAINT_c.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'x0'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Misc/DEADBAND.js b/js/Misc/DEADBAND.js
index f1a0f417..da9809e0 100644
--- a/js/Misc/DEADBAND.js
+++ b/js/Misc/DEADBAND.js
@@ -1,9 +1,9 @@
/* autogenerated from "macros/Misc/DEADBAND.sci" */
function DEADBAND() {
DEADBAND.prototype.define = function DEADBAND() {
- minp = -.5;
- maxp = .5;
- rpar = [[maxp],[minp]];
+ this.minp = -.5;
+ this.maxp = .5;
+ rpar = [[this.maxp],[this.minp]];
model = scicos_model();
model.sim = list("deadband",4);
model.in1 = 1;
@@ -13,7 +13,7 @@ function DEADBAND() {
model.rpar = rpar;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [[string(maxp)],[string(minp)],[string(model.nmode)]];
+ exprs = [[string(this.maxp)],[string(this.minp)],[string(model.nmode)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -29,16 +29,16 @@ function DEADBAND() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,maxp,minp,zeroc,exprs] = scicos_getvalue("Set Deadband parameters",[["End of dead band"],["Start of dead band"],["zero crossing (0:no, 1:yes)"]],list("vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.maxp,this.minp,this.zeroc,exprs] = scicos_getvalue("Set Deadband parameters",[["End of dead band"],["Start of dead band"],["zero crossing (0:no, 1:yes)"]],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- if (maxp<=minp) {
+ if (this.maxp<=this.minp) {
message("Upper limit must be > Lower limit");
} else {
- rpar = [[maxp],[minp]];
+ rpar = [[this.maxp],[this.minp]];
model.rpar = rpar;
- if (zeroc!=0) {
+ if (this.zeroc!=0) {
model.nzcross = 2;
model.nmode = 1;
} else {
diff --git a/js/Misc/DEADBAND.pickle b/js/Misc/DEADBAND.pickle
index 0d1dde24..00d3a947 100644
--- a/js/Misc/DEADBAND.pickle
+++ b/js/Misc/DEADBAND.pickle
@@ -2,8 +2,14 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'minp'
p2
-atp3
-Rp4
+aS'x'
+p3
+aS'maxp'
+p4
+aS'zeroc'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/Misc/DIFF_f.js b/js/Misc/DIFF_f.js
index 9e374115..d8b26b21 100644
--- a/js/Misc/DIFF_f.js
+++ b/js/Misc/DIFF_f.js
@@ -1,15 +1,15 @@
/* autogenerated from "macros/Misc/DIFF_f.sci" */
function DIFF_f() {
DIFF_f.prototype.define = function DIFF_f() {
- x0 = [[0],[0]];
+ this.x0 = [[0],[0]];
model = scicos_model();
model.sim = list("diffblk",10001);
model.in1 = 1;
model.out = 1;
- model.state = x0;
+ model.state = this.x0;
model.blocktype = "c";
model.dep_ut = [false,true];
- exprs = [[strcat(sci2exp(x0[1-1]))],[strcat(sci2exp(x0[2-1]))]];
+ exprs = [[strcat(sci2exp(this.x0[1-1]))],[strcat(sci2exp(this.x0[2-1]))]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -25,12 +25,12 @@ function DIFF_f() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,x0,xd0,exprs] = scicos_getvalue("Set continuous linear system parameters",[["Initial state"],["Initial Derivative"]],list("vec",1,"vec",1),exprs);
+ [ok,this.x0,this.xd0,exprs] = scicos_getvalue("Set continuous linear system parameters",[["Initial state"],["Initial Derivative"]],list("vec",1,"vec",1),exprs);
if (!ok) {
break;
}
graphics.exprs = exprs;
- model.state = [[x0.slice()],[xd0.slice()]];
+ model.state = [[this.x0.slice()],[this.xd0.slice()]];
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Misc/DIFF_f.pickle b/js/Misc/DIFF_f.pickle
index 0d1dde24..59a4988d 100644
--- a/js/Misc/DIFF_f.pickle
+++ b/js/Misc/DIFF_f.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'x0'
+p3
+aS'xd0'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Misc/EDGETRIGGER.js b/js/Misc/EDGETRIGGER.js
index 5cffb67e..1f9a65a8 100644
--- a/js/Misc/EDGETRIGGER.js
+++ b/js/Misc/EDGETRIGGER.js
@@ -1,17 +1,17 @@
/* autogenerated from "macros/Misc/EDGETRIGGER.sci" */
function EDGETRIGGER() {
EDGETRIGGER.prototype.define = function EDGETRIGGER() {
- edge = 1;
+ this.edge = 1;
model = scicos_model();
model.sim = list("edgetrig",4);
model.in1 = 1;
model.out = 1;
model.dstate = 0;
model.nzcross = 1;
- model.ipar = sign(edge);
+ model.ipar = sign(this.edge);
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [string(edge)];
+ exprs = [string(this.edge)];
gr_i = [];
this.x = standard_define([3,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -27,11 +27,11 @@ function EDGETRIGGER() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,edge,exprs] = scicos_getvalue("Set edge trigger block parameters",["rising (1), falling (-1), both (0)"],list("vec",1),exprs);
+ [ok,this.edge,exprs] = scicos_getvalue("Set edge trigger block parameters",["rising (1), falling (-1), both (0)"],list("vec",1),exprs);
if (!ok) {
break;
}
- model.ipar = sign(edge);
+ model.ipar = sign(this.edge);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Misc/EDGETRIGGER.pickle b/js/Misc/EDGETRIGGER.pickle
index 0d1dde24..e8699233 100644
--- a/js/Misc/EDGETRIGGER.pickle
+++ b/js/Misc/EDGETRIGGER.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'edge'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Misc/EXPRESSION.pickle b/js/Misc/EXPRESSION.pickle
index de00e428..4ed700d3 100644
--- a/js/Misc/EXPRESSION.pickle
+++ b/js/Misc/EXPRESSION.pickle
@@ -2,14 +2,20 @@ c__builtin__
set
p0
((lp1
-S'getfield'
+S'PREVAR_foo'
p2
-aS'x'
+aS'getfield'
p3
aS'PREVAR_scicos_context'
p4
-aS'PREVAR_foo'
+aS'%exx'
p5
-atp6
-Rp7
+aS'%nin'
+p6
+aS'x'
+p7
+aS'%usenz'
+p8
+atp9
+Rp10
. \ No newline at end of file
diff --git a/js/Misc/HYSTHERESIS.js b/js/Misc/HYSTHERESIS.js
index da9e1b60..f29d10d9 100644
--- a/js/Misc/HYSTHERESIS.js
+++ b/js/Misc/HYSTHERESIS.js
@@ -3,18 +3,18 @@ function HYSTHERESIS() {
HYSTHERESIS.prototype.define = function HYSTHERESIS() {
in1 = 1;
ipar = [0];
- nzz = 2;
+ this.nzz = 2;
rpar = [[1],[0],[1],[0]];
model = scicos_model();
model.sim = list("hystheresis",4);
model.in1 = in1;
model.out = 1;
model.rpar = rpar;
- model.nzcross = nzz;
+ model.nzcross = this.nzz;
model.nmode = 1;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [[string(rpar)],[string(sign(nzz))]];
+ exprs = [[string(rpar)],[string(sign(this.nzz))]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -30,19 +30,19 @@ function HYSTHERESIS() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,high_lim,low_lim,out_high,out_low,nzz,exprs] = scicos_getvalue("Set parameters",[["switch on at"],["switch off at"],["output when on"],["output when off"],["use zero crossing: yes (1), no (0)"]],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.high_lim,this.low_lim,this.out_high,this.out_low,this.nzz,exprs] = scicos_getvalue("Set parameters",[["switch on at"],["switch off at"],["output when on"],["output when off"],["use zero crossing: yes (1), no (0)"]],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- if (low_lim>high_lim) {
+ if (this.low_lim>this.high_lim) {
message("switch on value must be larger than switch off value");
} else {
graphics.exprs = exprs;
- model.rpar = transpose([high_lim,low_lim,out_high,out_low]);
- if (nzz>0) {
- nzz = 2;
+ model.rpar = transpose([this.high_lim,this.low_lim,this.out_high,this.out_low]);
+ if (this.nzz>0) {
+ this.nzz = 2;
}
- model.nzcross = nzz;
+ model.nzcross = this.nzz;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Misc/HYSTHERESIS.pickle b/js/Misc/HYSTHERESIS.pickle
index 0d1dde24..e6d8e07f 100644
--- a/js/Misc/HYSTHERESIS.pickle
+++ b/js/Misc/HYSTHERESIS.pickle
@@ -2,8 +2,18 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'low_lim'
p2
-atp3
-Rp4
+aS'out_low'
+p3
+aS'nzz'
+p4
+aS'out_high'
+p5
+aS'high_lim'
+p6
+aS'x'
+p7
+atp8
+Rp9
. \ No newline at end of file
diff --git a/js/Misc/LOGICAL_OP.js b/js/Misc/LOGICAL_OP.js
index 6d875b4c..163f69cf 100644
--- a/js/Misc/LOGICAL_OP.js
+++ b/js/Misc/LOGICAL_OP.js
@@ -3,7 +3,7 @@ function LOGICAL_OP() {
LOGICAL_OP.prototype.define = function LOGICAL_OP() {
in1 = [[-1],[-1]];
ipar = [0];
- nin = 2;
+ this.nin = 2;
model = scicos_model();
model.sim = list("logicalop",4);
model.in1 = in1;
@@ -11,7 +11,7 @@ function LOGICAL_OP() {
model.ipar = ipar;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [[string(nin)],[string(ipar)]];
+ exprs = [[string(this.nin)],[string(ipar)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -30,57 +30,57 @@ function LOGICAL_OP() {
exprs = [[exprs],[sci2exp(1)],[sci2exp(0)]];
}
while (true) {
- [ok,nin,rule,Datatype,tp,exprs] = scicos_getvalue("Set parameters",[["number of inputs"],["Operator: AND (0), OR (1), NAND (2), NOR (3), XOR (4), NOT (5)","Datatype (1=double 3=int32 ...)"],["Bitwise Rule(0=No 1=yes)"]],list("vec",1,"vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.nin,this.rule,this.Datatype,this.tp,exprs] = scicos_getvalue("Set parameters",[["number of inputs"],["Operator: AND (0), OR (1), NAND (2), NOR (3), XOR (4), NOT (5)","Datatype (1=double 3=int32 ...)"],["Bitwise Rule(0=No 1=yes)"]],list("vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- nin = int(nin);
- rule = int(rule);
- tp = int(tp);
- if (nin<1) {
+ this.nin = int(this.nin);
+ this.rule = int(this.rule);
+ this.tp = int(this.tp);
+ if (this.nin<1) {
message("Number of inputs must be >=1 ");
ok = false;
- } else if ((rule<0)||(rule>5)) {
- message("Incorrect operator "+string(rule)+" ; must be 0 to 5.");
+ } else if ((this.rule<0)||(this.rule>5)) {
+ message("Incorrect operator "+string(this.rule)+" ; must be 0 to 5.");
ok = false;
- } else if ((rule==5)&&(nin>1)) {
+ } else if ((this.rule==5)&&(this.nin>1)) {
message("Only one input allowed for NOT operation");
- nin = 1;
- } else if (((Datatype==1)&&(tp!=0))) {
+ this.nin = 1;
+ } else if (((this.Datatype==1)&&(this.tp!=0))) {
message("Bitwise Rule is only activated when Data type is integer");
ok = false;
}
if (ok) {
- if ((tp!=0)) {
- tp = 1;
+ if ((this.tp!=0)) {
+ this.tp = 1;
}
- if (Datatype==1) {
+ if (this.Datatype==1) {
model.sim = list("logicalop",4);
- model.ipar = [rule];
+ model.ipar = [this.rule];
} else {
- if (Datatype==3) {
+ if (this.Datatype==3) {
model.sim = list("logicalop_i32",4);
- } else if (Datatype==4) {
+ } else if (this.Datatype==4) {
model.sim = list("logicalop_i16",4);
- } else if (Datatype==5) {
+ } else if (this.Datatype==5) {
model.sim = list("logicalop_i8",4);
- } else if (Datatype==6) {
+ } else if (this.Datatype==6) {
model.sim = list("logicalop_ui32",4);
- } else if (Datatype==7) {
+ } else if (this.Datatype==7) {
model.sim = list("logicalop_ui16",4);
- } else if (Datatype==8) {
+ } else if (this.Datatype==8) {
model.sim = list("logicalop_ui8",4);
} else {
message("Datatype is not supported");
ok = false;
}
- model.ipar = [[rule],[tp]];
+ model.ipar = [[this.rule],[this.tp]];
}
if (ok) {
- it = Datatype*ones(nin,1);
- ot = Datatype;
- in1 = [-ones(nin,1),-2*ones(nin,1)];
- if ((rule!=5)&&(nin==1)) {
+ it = this.Datatype*ones(this.nin,1);
+ ot = this.Datatype;
+ in1 = [-ones(this.nin,1),-2*ones(this.nin,1)];
+ if ((this.rule!=5)&&(this.nin==1)) {
out = [1,1];
[model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),[],[]);
} else {
@@ -89,17 +89,17 @@ function LOGICAL_OP() {
}
}
if (ok) {
- if (rule==0) {
+ if (this.rule==0) {
label = "AND";
- } else if (rule==1) {
+ } else if (this.rule==1) {
label = "OR";
- } else if (rule==2) {
+ } else if (this.rule==2) {
label = "NAND";
- } else if (rule==3) {
+ } else if (this.rule==3) {
label = "NOR";
- } else if (rule==4) {
+ } else if (this.rule==4) {
label = "XOR";
- } else if (rule==5) {
+ } else if (this.rule==5) {
label = "NOT";
}
graphics.exprs = exprs;
diff --git a/js/Misc/LOGICAL_OP.pickle b/js/Misc/LOGICAL_OP.pickle
index 0d1dde24..05bf68ab 100644
--- a/js/Misc/LOGICAL_OP.pickle
+++ b/js/Misc/LOGICAL_OP.pickle
@@ -2,8 +2,16 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'Datatype'
p2
-atp3
-Rp4
+aS'x'
+p3
+aS'nin'
+p4
+aS'tp'
+p5
+aS'rule'
+p6
+atp7
+Rp8
. \ No newline at end of file
diff --git a/js/Misc/MBLOCK.js b/js/Misc/MBLOCK.js
index bf6d83e4..aa51887b 100644
--- a/js/Misc/MBLOCK.js
+++ b/js/Misc/MBLOCK.js
@@ -7,9 +7,9 @@ function MBLOCK() {
this.outtype = [["I"],["E"]];
param = [["R"],["L"]];
paramv = list(0.1,.0001);
- pprop = [[0],[0]];
+ this.pprop = [[0],[0]];
nameF = "generic";
- exprs = tlist(["MBLOCK","in","intype","out","outtype","param","paramv","pprop","nameF","funtxt"],sci2exp(this.in1.slice()),sci2exp(this.intype.slice()),sci2exp(this.out.slice()),sci2exp(this.outtype.slice()),sci2exp(param.slice()),list(string(0.1),string(.0001)),sci2exp(pprop.slice()),nameF,[]);
+ exprs = tlist(["MBLOCK","in","intype","out","outtype","param","paramv","pprop","nameF","funtxt"],sci2exp(this.in1.slice()),sci2exp(this.intype.slice()),sci2exp(this.out.slice()),sci2exp(this.outtype.slice()),sci2exp(param.slice()),list(string(0.1),string(.0001)),sci2exp(this.pprop.slice()),nameF,[]);
model = scicos_model();
model.blocktype = "c";
model.dep_ut = [false,true];
@@ -44,17 +44,17 @@ function MBLOCK() {
exprs = graphics.exprs;
if (this.type[exprs-1]==15) {
paramv = list();
- pprop = [];
+ this.pprop = [];
for (i=1;i<=size(model.rpar,"*");i+=1) {
paramv[$+1-1] = string(model.rpar[i-1]);
- pprop[$+1-1] = 0;
+ this.pprop[$+1-1] = 0;
}
- 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(pprop.slice()),exprs[1-1][7-1],exprs[2-1]);
+ 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]);
}
- lab_1 = list(exprs.in1,exprs.intype,exprs.out,exprs.outtype,exprs.param,exprs.pprop,exprs.nameF);
+ this.lab_1 = list(exprs.in1,exprs.intype,exprs.out,exprs.outtype,exprs.param,exprs.pprop,exprs.nameF);
lab_2 = exprs.paramv;
while (true) {
- [ok,Tin,Tintype,Tout,Touttype,Tparam,pprop,Tfunam,lab_1] = scicos_getvalue("Set Modelica generic block parameters",[["Input variables: "],["Input variables types: "],["Output variables: "],["Output variables types:"],["Parameters in Modelica:"],["Parameters properties: "],["Function name: "]],list("str",-1,"str",-1,"str",-1,"str",-1,"str",-1,"vec",-1,"str",-1),lab_1);
+ [ok,this.Tin,this.Tintype,this.Tout,this.Touttype,this.Tparam,this.pprop,this.Tfunam,this.lab_1] = scicos_getvalue("Set Modelica generic block parameters",[["Input variables: "],["Input variables types: "],["Output variables: "],["Output variables types:"],["Parameters in Modelica:"],["Parameters properties: "],["Function name: "]],list("str",-1,"str",-1,"str",-1,"str",-1,"str",-1,"vec",-1,"str",-1),this.lab_1);
if (!ok) {
break;
}
@@ -134,14 +134,14 @@ function MBLOCK() {
}
}
if (ok) {
- pprop = pprop.slice();
- if ((size(param,"*")!=size(pprop,"*"))) {
+ this.pprop = this.pprop.slice();
+ if ((size(param,"*")!=size(this.pprop,"*"))) {
messagebox([["There is differences in"],["size of param and size "],["of param properties."]],"modal","error");
ok = false;
}
}
if (ok) {
- if (max(pprop)>2||min(pprop)<0) {
+ if (max(this.pprop)>2||min(this.pprop)<0) {
messagebox([["Parameters properties must be :"],["0 : for simple paramater,"],["1 : for initial state value,"],["2 : for a fixed initial state value."]],"modal","error");
ok = false;
}
@@ -165,7 +165,7 @@ function MBLOCK() {
[model,graphics,ok] = set_io(model,graphics,list([ones(this.in1),ones(this.in1)],ones(this.in1)),list([ones(this.out),ones(this.out)],ones(this.out)),[],[],intypex,outtypex);
}
if (ok) {
- Tparam_lab = evstr(Tparam);
+ Tparam_lab = evstr(this.Tparam);
Tparam_sz = size(Tparam_lab,"*");
if (Tparam_sz>lstsize(lab_2)) {
for (i=1;i<=(Tparam_sz-lstsize(lab_2));i+=1) {
@@ -186,11 +186,11 @@ function MBLOCK() {
rhs_txt = "";
for (i=1;i<=Tparam_sz;i+=1) {
lhs_txt = lhs_txt+"%v"+string(i)+",";
- if (pprop[i-1]==0) {
+ if (this.pprop[i-1]==0) {
lab_txt = lab_txt+"\'"+Tparam_lab[i-1]+"\';";
- } else if (pprop[i-1]==1) {
+ } else if (this.pprop[i-1]==1) {
lab_txt = lab_txt+"\'"+Tparam_lab[i-1]+" (state) \';";
- } else if (pprop[i-1]==2) {
+ } else if (this.pprop[i-1]==2) {
lab_txt = lab_txt+"\'"+Tparam_lab[i-1]+" (fixed state) \';";
}
rhs_txt = rhs_txt+"\'vec\',-1,";
@@ -221,7 +221,7 @@ function MBLOCK() {
tt = [];
}
}
- [ok,tt] = MODCOM(this.funam,tt,this.in1,this.out,param,paramv,pprop);
+ [ok,tt] = MODCOM(this.funam,tt,this.in1,this.out,param,paramv,this.pprop);
if (!ok) {
break;
}
@@ -231,8 +231,8 @@ function MBLOCK() {
mo.model = nameF;
mo.inputs = this.in1;
mo.outputs = this.out;
- if (max(pprop)>0) {
- mo.parameters = list(transpose(param),paramv,transpose(pprop));
+ if (max(this.pprop)>0) {
+ mo.parameters = list(transpose(param),paramv,transpose(this.pprop));
} else {
mo.parameters = list(transpose(param),paramv);
}
@@ -242,11 +242,11 @@ function MBLOCK() {
model.rpar = [[model.rpar],[paramv[i-1].slice()]];
}
model.sim[1-1] = this.funam;
- exprs.in1 = lab_1[1-1];
- exprs.intype = lab_1[2-1];
- exprs.out = lab_1[3-1];
- exprs.outtype = lab_1[4-1];
- exprs.param = lab_1[5-1];
+ exprs.in1 = this.lab_1[1-1];
+ exprs.intype = this.lab_1[2-1];
+ exprs.out = this.lab_1[3-1];
+ exprs.outtype = this.lab_1[4-1];
+ exprs.param = this.lab_1[5-1];
exprs.paramv = list();
if (Tparam_sz!=0) {
if (this.type[lab_2-1]==15) {
@@ -259,8 +259,8 @@ function MBLOCK() {
}
}
}
- exprs.pprop = lab_1[6-1];
- exprs.nameF = lab_1[7-1];
+ exprs.pprop = this.lab_1[6-1];
+ exprs.nameF = this.lab_1[7-1];
exprs.funtxt = tt;
this.x.model = model;
graphics.gr_i[1-1][1-1] = "txt=[\'Modelica\';\' "+nameF+" \'];";
diff --git a/js/Misc/MBLOCK.pickle b/js/Misc/MBLOCK.pickle
index ca02cacd..1213cf91 100644
--- a/js/Misc/MBLOCK.pickle
+++ b/js/Misc/MBLOCK.pickle
@@ -2,20 +2,36 @@ c__builtin__
set
p0
((lp1
-S'intype'
+S'Touttype'
p2
-aS'in1'
+aS'lab_1'
p3
-aS'outtype'
+aS'Tparam'
p4
-aS'funam'
+aS'intype'
p5
-aS'x'
+aS'in1'
p6
-aS'type'
+aS'Tin'
p7
-aS'out'
+aS'outtype'
p8
-atp9
-Rp10
+aS'Tout'
+p9
+aS'pprop'
+p10
+aS'funam'
+p11
+aS'x'
+p12
+aS'out'
+p13
+aS'type'
+p14
+aS'Tintype'
+p15
+aS'Tfunam'
+p16
+atp17
+Rp18
. \ No newline at end of file
diff --git a/js/Misc/MEMORY_f.js b/js/Misc/MEMORY_f.js
index 46528ac6..77bea301 100644
--- a/js/Misc/MEMORY_f.js
+++ b/js/Misc/MEMORY_f.js
@@ -28,17 +28,17 @@ function MEMORY_f() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,a,inh,exprs] = scicos_getvalue("Set memory block parameters",[["initial condition"],["Inherit (1: no, 0: yes)"]],list("vec",-1,"vec",1),exprs);
+ [ok,this.a,this.inh,exprs] = scicos_getvalue("Set memory block parameters",[["initial condition"],["Inherit (1: no, 0: yes)"]],list("vec",-1,"vec",1),exprs);
if (!ok) {
break;
}
- if (inh==0) {
- inh = [];
+ if (this.inh==0) {
+ this.inh = [];
} else {
- inh = 1;
+ this.inh = 1;
}
- [model,graphics,ok] = check_io(model,graphics,-1,-1,inh,[]);
- out = size(a,"*");
+ [model,graphics,ok] = check_io(model,graphics,-1,-1,this.inh,[]);
+ out = size(this.a,"*");
if (out==0) {
ok = false;
messagebox("Initial condition empty","modal","error");
@@ -46,7 +46,7 @@ function MEMORY_f() {
in1 = out;
if (ok) {
graphics.exprs = exprs;
- model.rpar = a;
+ model.rpar = this.a;
model.in1 = in1;
model.out = out;
this.x.graphics = graphics;
diff --git a/js/Misc/MEMORY_f.pickle b/js/Misc/MEMORY_f.pickle
index 0d1dde24..c11db162 100644
--- a/js/Misc/MEMORY_f.pickle
+++ b/js/Misc/MEMORY_f.pickle
@@ -2,8 +2,12 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'a'
p2
-atp3
-Rp4
+aS'x'
+p3
+aS'inh'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Misc/PENDULUM_ANIM.js b/js/Misc/PENDULUM_ANIM.js
index 5aa97023..50e33f55 100644
--- a/js/Misc/PENDULUM_ANIM.js
+++ b/js/Misc/PENDULUM_ANIM.js
@@ -1,19 +1,19 @@
/* autogenerated from "macros/Misc/PENDULUM_ANIM.sci" */
function PENDULUM_ANIM() {
PENDULUM_ANIM.prototype.define = function PENDULUM_ANIM() {
- plen = 2;
- csiz = 2;
- phi = 0;
- xmin = -5;
- xmax = 5;
- ymin = -5;
- ymax = 5;
+ this.plen = 2;
+ this.csiz = 2;
+ this.phi = 0;
+ this.xmin = -5;
+ this.xmax = 5;
+ this.ymin = -5;
+ this.ymax = 5;
model = scicos_model();
model.sim = list("anim_pen",5);
model.in1 = [[1],[1]];
model.evtin = 1;
model.dstate = 0;
- model.rpar = [[plen],[csiz],[phi],[xmin],[xmax],[ymin],[ymax]];
+ model.rpar = [[this.plen],[this.csiz],[this.phi],[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
model.blocktype = "d";
model.dep_ut = [false,false];
exprs = string(model.rpar);
@@ -33,27 +33,27 @@ function PENDULUM_ANIM() {
model = arg1.model;
dstate = model.dstate;
while (true) {
- [ok,plen,csiz,phi,xmin,xmax,ymin,ymax,exprs] = scicos_getvalue("Set Scope parameters",[["pendulum length"],["cart size (square side)"],["slope"],["Xmin"],["Xmax"],["Ymin"],["Ymax"]],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.plen,this.csiz,this.phi,this.xmin,this.xmax,this.ymin,this.ymax,exprs] = scicos_getvalue("Set Scope parameters",[["pendulum length"],["cart size (square side)"],["slope"],["Xmin"],["Xmax"],["Ymin"],["Ymax"]],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
mess = [];
- if (plen<=0||csiz<=0) {
+ if (this.plen<=0||this.csiz<=0) {
mess = [[mess],["Pendulum length and cart size must be positive."],[" "]];
ok = false;
}
- if (ymin>=ymax) {
+ if (this.ymin>=this.ymax) {
mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
ok = false;
}
- if (xmin>=xmax) {
+ if (this.xmin>=this.xmax) {
mess = [[mess],["Xmax must be greater than Xmin"],[" "]];
ok = false;
}
if (!ok) {
message(mess);
} else {
- rpar = [[plen],[csiz],[phi],[xmin],[xmax],[ymin],[ymax]];
+ rpar = [[this.plen],[this.csiz],[this.phi],[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
model.rpar = rpar;
graphics.exprs = exprs;
this.x.graphics = graphics;
diff --git a/js/Misc/PENDULUM_ANIM.pickle b/js/Misc/PENDULUM_ANIM.pickle
index 0d1dde24..b9b40604 100644
--- a/js/Misc/PENDULUM_ANIM.pickle
+++ b/js/Misc/PENDULUM_ANIM.pickle
@@ -2,8 +2,22 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'phi'
p2
-atp3
-Rp4
+aS'ymax'
+p3
+aS'csiz'
+p4
+aS'xmax'
+p5
+aS'plen'
+p6
+aS'xmin'
+p7
+aS'x'
+p8
+aS'ymin'
+p9
+atp10
+Rp11
. \ No newline at end of file
diff --git a/js/Misc/RATELIMITER.js b/js/Misc/RATELIMITER.js
index 5ec433ea..95d2397b 100644
--- a/js/Misc/RATELIMITER.js
+++ b/js/Misc/RATELIMITER.js
@@ -1,9 +1,9 @@
/* autogenerated from "macros/Misc/RATELIMITER.sci" */
function RATELIMITER() {
RATELIMITER.prototype.define = function RATELIMITER() {
- minp = -1;
- maxp = 1;
- rpar = [[maxp],[minp]];
+ this.minp = -1;
+ this.maxp = 1;
+ rpar = [[this.maxp],[this.minp]];
model = scicos_model();
model.sim = list("ratelimiter",4);
model.in1 = 1;
@@ -11,7 +11,7 @@ function RATELIMITER() {
model.rpar = rpar;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [[string(maxp)],[string(minp)]];
+ exprs = [[string(this.maxp)],[string(this.minp)]];
gr_i = [];
this.x = standard_define([3.5,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -27,14 +27,14 @@ function RATELIMITER() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,maxp,minp,exprs] = scicos_getvalue("Set rate limiter parameters",[["max slope"],["min slope"]],list("vec",1,"vec",1),exprs);
+ [ok,this.maxp,this.minp,exprs] = scicos_getvalue("Set rate limiter parameters",[["max slope"],["min slope"]],list("vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- if (maxp<=minp||maxp<=0||minp>=0) {
+ if (this.maxp<=this.minp||this.maxp<=0||this.minp>=0) {
message("We must have max_slope> 0 > min_slope.");
} else {
- rpar = [[maxp],[minp]];
+ rpar = [[this.maxp],[this.minp]];
model.rpar = rpar;
graphics.exprs = exprs;
this.x.graphics = graphics;
diff --git a/js/Misc/RATELIMITER.pickle b/js/Misc/RATELIMITER.pickle
index 0d1dde24..f1a9f181 100644
--- a/js/Misc/RATELIMITER.pickle
+++ b/js/Misc/RATELIMITER.pickle
@@ -2,8 +2,12 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'minp'
p2
-atp3
-Rp4
+aS'x'
+p3
+aS'maxp'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Misc/RELATIONALOP.js b/js/Misc/RELATIONALOP.js
index fd096070..8ed6cb4b 100644
--- a/js/Misc/RELATIONALOP.js
+++ b/js/Misc/RELATIONALOP.js
@@ -30,62 +30,62 @@ function RELATIONALOP() {
exprs = [[exprs],[sci2exp(1)]];
}
while (true) {
- [ok,rule,zcr,Datatype,exprs] = scicos_getvalue("Set parameters",[["Operator: == (0), ~= (1), < (2), <= (3), > (4), >= (5)"],["Use zero crossing (no: 0), (yes: 1)","Datatype (1=double 3=int32 ...)"]],list("vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.rule,this.zcr,this.Datatype,exprs] = scicos_getvalue("Set parameters",[["Operator: == (0), ~= (1), < (2), <= (3), > (4), >= (5)"],["Use zero crossing (no: 0), (yes: 1)","Datatype (1=double 3=int32 ...)"]],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- rule = int(rule);
- if (zcr!=0) {
- zcr = 1;
+ this.rule = int(this.rule);
+ if (this.zcr!=0) {
+ this.zcr = 1;
}
- if ((rule<0)||(rule>5)) {
- message("Incorrect operator "+string(rule)+" ; must be 0 to 5.");
+ if ((this.rule<0)||(this.rule>5)) {
+ message("Incorrect operator "+string(this.rule)+" ; must be 0 to 5.");
ok = false;
}
- if ((Datatype==1)) {
+ if ((this.Datatype==1)) {
model.sim = list("relational_op",4);
- } else if ((Datatype==3||Datatype==9)) {
+ } else if ((this.Datatype==3||this.Datatype==9)) {
model.sim = list("relational_op_i32",4);
- } else if ((Datatype==4)) {
+ } else if ((this.Datatype==4)) {
model.sim = list("relational_op_i16",4);
- } else if ((Datatype==5)) {
+ } else if ((this.Datatype==5)) {
model.sim = list("relational_op_i8",4);
- } else if ((Datatype==6)) {
+ } else if ((this.Datatype==6)) {
model.sim = list("relational_op_ui32",4);
- } else if ((Datatype==7)) {
+ } else if ((this.Datatype==7)) {
model.sim = list("relational_op_ui16",4);
- } else if ((Datatype==8)) {
+ } else if ((this.Datatype==8)) {
model.sim = list("relational_op_ui8",4);
} else {
message("Datatype is not supported");
ok = false;
}
if (ok) {
- it = Datatype*ones(1,2);
- ot = Datatype;
+ it = this.Datatype*ones(1,2);
+ ot = this.Datatype;
in1 = [[-1,-2],[-1,-2]];
out = [-1,-2];
[model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),[],[]);
}
if (ok) {
- if (rule==0) {
+ if (this.rule==0) {
label = "==";
- } else if (rule==1) {
+ } else if (this.rule==1) {
label = "~=";
- } else if (rule==2) {
+ } else if (this.rule==2) {
label = "&#60;";
- } else if (rule==3) {
+ } else if (this.rule==3) {
label = "&#8804;";
- } else if (rule==4) {
+ } else if (this.rule==4) {
label = "&#62;";
- } else if (rule==5) {
+ } else if (this.rule==5) {
label = "&#8805;";
}
graphics.exprs = exprs;
graphics.style = ["fontSize=13;fontStyle=1;displayedLabel="+label];
- model.ipar = [rule];
- model.nzcross = zcr;
- model.nmode = zcr;
+ model.ipar = [this.rule];
+ model.nzcross = this.zcr;
+ model.nmode = this.zcr;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Misc/RELATIONALOP.pickle b/js/Misc/RELATIONALOP.pickle
index 0d1dde24..08689c46 100644
--- a/js/Misc/RELATIONALOP.pickle
+++ b/js/Misc/RELATIONALOP.pickle
@@ -2,8 +2,14 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'Datatype'
p2
-atp3
-Rp4
+aS'x'
+p3
+aS'zcr'
+p4
+aS'rule'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/Misc/SUPER_f.js b/js/Misc/SUPER_f.js
index 658ee514..96598262 100644
--- a/js/Misc/SUPER_f.js
+++ b/js/Misc/SUPER_f.js
@@ -20,7 +20,7 @@ function SUPER_f() {
model.dep_ut = [false,false];
gr_i = [];
this.x = standard_define([2,2],model,[],gr_i);
- return new BasicBlock(this.x);
+ return new SuperBlock(this.x);
}
SUPER_f.prototype.details = function SUPER_f() {
return this.x;
@@ -29,6 +29,6 @@ function SUPER_f() {
}
SUPER_f.prototype.set = function SUPER_f() {
xcos(arg1.model.rpar);
- return new BasicBlock(this.x);
+ return new SuperBlock(this.x);
}
}
diff --git a/js/Misc/TEXT_f.js b/js/Misc/TEXT_f.js
index 0b8d4b9c..9e8c7cde 100644
--- a/js/Misc/TEXT_f.js
+++ b/js/Misc/TEXT_f.js
@@ -1,19 +1,19 @@
/* autogenerated from "macros/Misc/TEXT_f.sci" */
function TEXT_f() {
TEXT_f.prototype.define = function TEXT_f() {
- font = 2;
- siz = 1;
+ this.font = 2;
+ this.siz = 1;
model = scicos_model();
model.sim = "text";
model.rpar = "Text";
- model.ipar = [[font],[siz]];
- exprs = [["Text"],[string(font)],[string(siz)]];
+ model.ipar = [[this.font],[this.siz]];
+ exprs = [["Text"],[string(this.font)],[string(this.siz)]];
graphics = scicos_graphics();
graphics.orig = [0,0];
graphics.sz = [2,1];
graphics.exprs = exprs;
this.x = mlist(["Text","graphics","model","void","gui"],graphics,model," ","TEXT_f");
- return new BasicBlock(this.x);
+ return new TextBlock(this.x);
}
TEXT_f.prototype.details = function TEXT_f() {
return this.x;
@@ -30,15 +30,15 @@ function TEXT_f() {
exprs = [[exprs],["3"],["1"]];
}
while (true) {
- [ok,txt,font,siz,exprs] = scicos_getvalue("Set Text block parameters",[["Text"],["Font number"],["Font size"]],list("str",-1,"vec",1,"vec",1),exprs);
+ [ok,this.txt,this.font,this.siz,exprs] = scicos_getvalue("Set Text block parameters",[["Text"],["Font number"],["Font size"]],list("str",-1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- if (font<=0||font>6) {
+ if (this.font<=0||this.font>6) {
message("Font number must be greater than 0 and less than 7");
ok = false;
}
- if (siz<0) {
+ if (this.siz<0) {
message("Font size must be positive");
ok = false;
}
@@ -48,8 +48,8 @@ function TEXT_f() {
default_font_style = gh_winpal.font_style;
default_font_size = gh_winpal.font_size;
default_font_color = gh_winpal.font_color;
- gh_winpal.font_style = font;
- gh_winpal.font_size = siz;
+ gh_winpal.font_style = this.font;
+ gh_winpal.font_size = this.siz;
r = xstringl(0,0,exprs[1-1],evstr(exprs[2-1]),evstr(exprs[3-1]));
gh_winpal.font_style = default_font_style;
gh_winpal.font_size = default_font_size;
@@ -57,13 +57,13 @@ function TEXT_f() {
sz = r.slice(3-1,4);
graphics.sz = sz;
this.x.graphics = graphics;
- ipar = [[font],[siz]];
- model.rpar = txt;
+ ipar = [[this.font],[this.siz]];
+ model.rpar = this.txt;
model.ipar = ipar;
this.x.model = model;
break;
}
}
- return new BasicBlock(this.x);
+ return new TextBlock(this.x);
}
}
diff --git a/js/Misc/TEXT_f.pickle b/js/Misc/TEXT_f.pickle
index 0d1dde24..b5b9efc8 100644
--- a/js/Misc/TEXT_f.pickle
+++ b/js/Misc/TEXT_f.pickle
@@ -2,8 +2,14 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'font'
p2
-atp3
-Rp4
+aS'x'
+p3
+aS'txt'
+p4
+aS'siz'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/Misc/c_block.js b/js/Misc/c_block.js
index 77e2cb6d..ffd42ee6 100644
--- a/js/Misc/c_block.js
+++ b/js/Misc/c_block.js
@@ -9,8 +9,8 @@ function c_block() {
z0 = [];
typ = "c";
auto = [];
- rpar = [];
- funam = "toto";
+ this.rpar = [];
+ this.funam = "toto";
model = scicos_model();
model.sim = list(" ",2001);
model.in1 = in1;
@@ -19,12 +19,12 @@ function c_block() {
model.evtout = clkout;
model.state = x0;
model.dstate = z0;
- model.rpar = rpar;
+ model.rpar = this.rpar;
model.ipar = 0;
model.blocktype = typ;
model.firing = auto;
model.dep_ut = [true,false];
- label = list([[sci2exp(in1)],[sci2exp(out)],[strcat(sci2exp(rpar))],[funam]],list([]));
+ label = list([[sci2exp(in1)],[sci2exp(out)],[strcat(sci2exp(this.rpar))],[this.funam]],list([]));
gr_i = [];
this.x = standard_define([3,2],model,label,gr_i);
return new BasicBlock(this.x);
@@ -40,31 +40,31 @@ function c_block() {
graphics = arg1.graphics;
label = graphics.exprs;
while (true) {
- [ok,i,o,rpar,funam,lab] = scicos_getvalue("Set C_block parameters",[["input ports sizes"],["output port sizes"],["System parameters vector"],["function name"]],list("vec",-1,"vec",-1,"vec",-1,"str",-1),label[1-1]);
+ [ok,this.i,this.o,this.rpar,this.funam,this.lab] = scicos_getvalue("Set C_block parameters",[["input ports sizes"],["output port sizes"],["System parameters vector"],["function name"]],list("vec",-1,"vec",-1,"vec",-1,"str",-1),label[1-1]);
if (!ok) {
break;
}
- if (funam==" ") {
+ if (this.funam==" ") {
break;
}
- label[1-1] = lab;
- rpar = rpar.slice();
- i = int(i.slice());
- ni = size(i,1);
- o = int(o.slice());
- no = size(o,1);
+ label[1-1] = this.lab;
+ this.rpar = this.rpar.slice();
+ this.i = int(this.i.slice());
+ ni = size(this.i,1);
+ this.o = int(this.o.slice());
+ no = size(this.o,1);
tt = label[2-1];
- if (model.sim[1-1]!=funam||size(model.in1,"*")!=size(i,"*")||size(model.out,"*")!=size(o,"*")) {
+ if (model.sim[1-1]!=this.funam||size(model.in1,"*")!=size(this.i,"*")||size(model.out,"*")!=size(this.o,"*")) {
tt = [];
}
- [ok,tt] = CFORTR(funam,tt,i,o);
+ [ok,tt] = CFORTR(this.funam,tt,this.i,this.o);
if (!ok) {
break;
}
- [model,graphics,ok] = check_io(model,graphics,i,o,[],[]);
+ [model,graphics,ok] = check_io(model,graphics,this.i,this.o,[],[]);
if (ok) {
- model.sim[1-1] = funam;
- model.rpar = rpar;
+ model.sim[1-1] = this.funam;
+ model.rpar = this.rpar;
label[2-1] = tt;
this.x.model = model;
graphics.exprs = label;
diff --git a/js/Misc/c_block.pickle b/js/Misc/c_block.pickle
index 0d1dde24..72dce4d4 100644
--- a/js/Misc/c_block.pickle
+++ b/js/Misc/c_block.pickle
@@ -2,8 +2,18 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'i'
p2
-atp3
-Rp4
+aS'lab'
+p3
+aS'rpar'
+p4
+aS'o'
+p5
+aS'funam'
+p6
+aS'x'
+p7
+atp8
+Rp9
. \ No newline at end of file
diff --git a/js/Misc/fortran_block.js b/js/Misc/fortran_block.js
index 7cd0df3e..79bfa270 100644
--- a/js/Misc/fortran_block.js
+++ b/js/Misc/fortran_block.js
@@ -14,8 +14,8 @@ function fortran_block() {
model.blocktype = "c";
model.firing = [];
model.dep_ut = [true,false];
- funam = "forty";
- label = list([[sci2exp(model.in1)],[sci2exp(model.out)],[strcat(sci2exp(model.rpar))],[funam]],list([]));
+ this.funam = "forty";
+ label = list([[sci2exp(model.in1)],[sci2exp(model.out)],[strcat(sci2exp(model.rpar))],[this.funam]],list([]));
gr_i = [];
this.x = standard_define([4,2],model,label,gr_i);
return new BasicBlock(this.x);
@@ -31,31 +31,31 @@ function fortran_block() {
graphics = arg1.graphics;
label = graphics.exprs;
while (true) {
- [ok,i,o,rpar,funam,lab] = scicos_getvalue("Set fortran_block parameters",[["input ports sizes"],["output port sizes"],["System parameters vector"],["function name"]],list("vec",-1,"vec",-1,"vec",-1,"str",-1),label[1-1]);
+ [ok,this.i,this.o,this.rpar,this.funam,this.lab] = scicos_getvalue("Set fortran_block parameters",[["input ports sizes"],["output port sizes"],["System parameters vector"],["function name"]],list("vec",-1,"vec",-1,"vec",-1,"str",-1),label[1-1]);
if (!ok) {
break;
}
- if (funam==" ") {
+ if (this.funam==" ") {
break;
}
- label[1-1] = lab;
- rpar = rpar.slice();
- i = int(i.slice());
- ni = size(i,1);
- o = int(o.slice());
- no = size(o,1);
+ label[1-1] = this.lab;
+ this.rpar = this.rpar.slice();
+ this.i = int(this.i.slice());
+ ni = size(this.i,1);
+ this.o = int(this.o.slice());
+ no = size(this.o,1);
tt = label[2-1];
- if (model.sim[1-1]!=funam||size(model.in1,"*")!=size(i,"*")||size(model.out,"*")!=size(o,"*")) {
+ if (model.sim[1-1]!=this.funam||size(model.in1,"*")!=size(this.i,"*")||size(model.out,"*")!=size(this.o,"*")) {
tt = [];
}
- [ok,tt] = FORTR(funam,tt,i,o);
+ [ok,tt] = FORTR(this.funam,tt,this.i,this.o);
if (!ok) {
break;
}
- [model,graphics,ok] = check_io(model,graphics,i,o,[],[]);
+ [model,graphics,ok] = check_io(model,graphics,this.i,this.o,[],[]);
if (ok) {
- model.sim[1-1] = funam;
- model.rpar = rpar;
+ model.sim[1-1] = this.funam;
+ model.rpar = this.rpar;
label[2-1] = tt;
this.x.model = model;
graphics.exprs = label;
diff --git a/js/Misc/fortran_block.pickle b/js/Misc/fortran_block.pickle
index 0d1dde24..72dce4d4 100644
--- a/js/Misc/fortran_block.pickle
+++ b/js/Misc/fortran_block.pickle
@@ -2,8 +2,18 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'i'
p2
-atp3
-Rp4
+aS'lab'
+p3
+aS'rpar'
+p4
+aS'o'
+p5
+aS'funam'
+p6
+aS'x'
+p7
+atp8
+Rp9
. \ No newline at end of file
diff --git a/js/Misc/generic_block.js b/js/Misc/generic_block.js
index 9ec5cd22..230ee9d1 100644
--- a/js/Misc/generic_block.js
+++ b/js/Misc/generic_block.js
@@ -2,9 +2,9 @@
function generic_block() {
generic_block.prototype.define = function generic_block() {
model = scicos_model();
- function_name = "sinblk";
- funtyp = 1;
- model.sim = list(function_name,funtyp);
+ this.function_name = "sinblk";
+ this.funtyp = 1;
+ model.sim = list(this.function_name,this.funtyp);
model.in1 = 1;
model.out = 1;
model.evtin = [];
@@ -16,7 +16,7 @@ function generic_block() {
model.blocktype = "c";
model.firing = [];
model.dep_ut = [true,false];
- label = [[function_name],[sci2exp(funtyp)],[sci2exp(model.in1)],[sci2exp(model.out)],[sci2exp(model.evtin)],[sci2exp(model.evtout)],[sci2exp(model.state)],[sci2exp(model.dstate)],[sci2exp(model.rpar)],[sci2exp(model.ipar)],[sci2exp(model.firing)],["y"],["n"]];
+ label = [[this.function_name],[sci2exp(this.funtyp)],[sci2exp(model.in1)],[sci2exp(model.out)],[sci2exp(model.evtin)],[sci2exp(model.evtout)],[sci2exp(model.state)],[sci2exp(model.dstate)],[sci2exp(model.rpar)],[sci2exp(model.ipar)],[sci2exp(model.firing)],["y"],["n"]];
gr_i = [];
this.x = standard_define([2,2],model,label,gr_i);
return new BasicBlock(this.x);
@@ -35,57 +35,57 @@ function generic_block() {
label[9-1] = [];
}
while (true) {
- [ok,function_name,funtyp,i,o,ci,co,xx,z,rpar,ipar,auto0,depu,dept,lab] = scicos_getvalue("Set GENERIC block parameters",[["simulation function"],["function type (0,1,2,..)"],["input ports sizes"],["output port sizes"],["input event ports sizes"],["output events ports sizes"],["initial continuous state"],["initial discrete state"],["Real parameters vector"],["Integer parameters vector"],["initial firing vector (<0 for no firing)"],["direct feedthrough (y or n)"],["time dependence (y or n)"]],list("str",1,"vec",1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec","sum(%6)","str",1,"str",1),label);
+ [ok,this.function_name,this.funtyp,this.i,this.o,this.ci,this.co,this.xx,this.z,this.rpar,this.ipar,this.auto0,this.depu,this.dept,this.lab] = scicos_getvalue("Set GENERIC block parameters",[["simulation function"],["function type (0,1,2,..)"],["input ports sizes"],["output port sizes"],["input event ports sizes"],["output events ports sizes"],["initial continuous state"],["initial discrete state"],["Real parameters vector"],["Integer parameters vector"],["initial firing vector (<0 for no firing)"],["direct feedthrough (y or n)"],["time dependence (y or n)"]],list("str",1,"vec",1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec","sum(%6)","str",1,"str",1),label);
if (!ok) {
break;
}
- label = lab;
- function_name = stripblanks(function_name);
- xx = xx.slice();
- z = z.slice();
- rpar = rpar.slice();
- ipar = int(ipar.slice());
- i = int(i.slice());
- o = int(o.slice());
- ci = int(ci.slice());
- co = int(co.slice());
- funtyp = int(funtyp);
- if (funtyp<0) {
+ label = this.lab;
+ this.function_name = stripblanks(this.function_name);
+ this.xx = this.xx.slice();
+ this.z = this.z.slice();
+ this.rpar = this.rpar.slice();
+ this.ipar = int(this.ipar.slice());
+ this.i = int(this.i.slice());
+ this.o = int(this.o.slice());
+ this.ci = int(this.ci.slice());
+ this.co = int(this.co.slice());
+ this.funtyp = int(this.funtyp);
+ if (this.funtyp<0) {
message("function type cannot be negative");
ok = false;
}
- if ([[ci],[co]]!=[]) {
- if (max([[ci],[co]])>1) {
+ if ([[this.ci],[this.co]]!=[]) {
+ if (max([[this.ci],[this.co]])>1) {
message("vector event links not supported");
ok = false;
}
}
- depu = stripblanks(depu);
- if (part(depu,1)=="y") {
- depu = true;
+ this.depu = stripblanks(this.depu);
+ if (part(this.depu,1)=="y") {
+ this.depu = true;
} else {
- depu = false;
+ this.depu = false;
}
- dept = stripblanks(dept);
- if (part(dept,1)=="y") {
- dept = true;
+ this.dept = stripblanks(this.dept);
+ if (part(this.dept,1)=="y") {
+ this.dept = true;
} else {
- dept = false;
+ this.dept = false;
}
- dep_ut = [depu,dept];
+ dep_ut = [this.depu,this.dept];
if (ok) {
- [model,graphics,ok] = check_io(model,graphics,i,o,ci,co);
+ [model,graphics,ok] = check_io(model,graphics,this.i,this.o,this.ci,this.co);
}
if (ok) {
- if (funtyp==3) {
+ if (this.funtyp==3) {
needcompile = 4;
}
- model.sim = list(function_name,funtyp);
- model.state = xx;
- model.dstate = z;
- model.rpar = rpar;
- model.ipar = ipar;
- model.firing = auto0;
+ model.sim = list(this.function_name,this.funtyp);
+ model.state = this.xx;
+ model.dstate = this.z;
+ model.rpar = this.rpar;
+ model.ipar = this.ipar;
+ model.firing = this.auto0;
model.dep_ut = dep_ut;
arg1.model = model;
graphics.exprs = label;
diff --git a/js/Misc/generic_block.pickle b/js/Misc/generic_block.pickle
index 0d1dde24..e4602e80 100644
--- a/js/Misc/generic_block.pickle
+++ b/js/Misc/generic_block.pickle
@@ -2,8 +2,36 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'ci'
p2
-atp3
-Rp4
+aS'co'
+p3
+aS'i'
+p4
+aS'auto0'
+p5
+aS'o'
+p6
+aS'rpar'
+p7
+aS'depu'
+p8
+aS'dept'
+p9
+aS'xx'
+p10
+aS'funtyp'
+p11
+aS'lab'
+p12
+aS'ipar'
+p13
+aS'x'
+p14
+aS'z'
+p15
+aS'function_name'
+p16
+atp17
+Rp18
. \ No newline at end of file
diff --git a/js/Misc/generic_block2.js b/js/Misc/generic_block2.js
index 7eb9f7f5..e6372a3b 100644
--- a/js/Misc/generic_block2.js
+++ b/js/Misc/generic_block2.js
@@ -2,9 +2,9 @@
function generic_block2() {
generic_block2.prototype.define = function generic_block2() {
model = scicos_model();
- function_name = "sinblk";
- funtyp = 1;
- model.sim = list(function_name,funtyp);
+ this.function_name = "sinblk";
+ this.funtyp = 1;
+ model.sim = list(this.function_name,this.funtyp);
model.in1 = 1;
model.out = 1;
model.evtin = [];
@@ -16,7 +16,7 @@ function generic_block2() {
model.blocktype = "c";
model.firing = [];
model.dep_ut = [true,false];
- label = [[function_name],[sci2exp(funtyp)],[sci2exp(model.in1)],[sci2exp(model.out)],[sci2exp(model.evtin)],[sci2exp(model.evtout)],[sci2exp(model.state)],[sci2exp(model.dstate)],[sci2exp(model.rpar)],[sci2exp(model.ipar)],[sci2exp(model.nmode)],[sci2exp(model.nzcross)],[sci2exp(model.firing)],["y"],["n"]];
+ label = [[this.function_name],[sci2exp(this.funtyp)],[sci2exp(model.in1)],[sci2exp(model.out)],[sci2exp(model.evtin)],[sci2exp(model.evtout)],[sci2exp(model.state)],[sci2exp(model.dstate)],[sci2exp(model.rpar)],[sci2exp(model.ipar)],[sci2exp(model.nmode)],[sci2exp(model.nzcross)],[sci2exp(model.firing)],["y"],["n"]];
gr_i = [];
this.x = standard_define([2,2],model,label,gr_i);
return new BasicBlock(this.x);
@@ -35,59 +35,59 @@ function generic_block2() {
label[9-1] = [];
}
while (true) {
- [ok,function_name,funtyp,i,o,ci,co,xx,z,rpar,ipar,nmode,nzcr,auto0,depu,dept,lab] = scicos_getvalue("Set GENERIC block parameters",[["simulation function"],["function type (0,1,2,..)"],["input ports sizes"],["output port sizes"],["input event ports sizes"],["output events ports sizes"],["initial continuous state"],["initial discrete state"],["Real parameters vector"],["Integer parameters vector"],["number of modes"],["number of zero_crossings"],["initial firing vector (<0 for no firing)"],["direct feedthrough (y or n)"],["time dependence (y or n)"]],list("str",1,"vec",1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",1,"vec",1,"vec","sum(%6)","str",1,"str",1),label);
+ [ok,this.function_name,this.funtyp,this.i,this.o,this.ci,this.co,this.xx,this.z,this.rpar,this.ipar,this.nmode,this.nzcr,this.auto0,this.depu,this.dept,this.lab] = scicos_getvalue("Set GENERIC block parameters",[["simulation function"],["function type (0,1,2,..)"],["input ports sizes"],["output port sizes"],["input event ports sizes"],["output events ports sizes"],["initial continuous state"],["initial discrete state"],["Real parameters vector"],["Integer parameters vector"],["number of modes"],["number of zero_crossings"],["initial firing vector (<0 for no firing)"],["direct feedthrough (y or n)"],["time dependence (y or n)"]],list("str",1,"vec",1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",1,"vec",1,"vec","sum(%6)","str",1,"str",1),label);
if (!ok) {
break;
}
- label = lab;
- function_name = stripblanks(function_name);
- xx = xx.slice();
- z = z.slice();
- rpar = rpar.slice();
- ipar = int(ipar.slice());
- i = int(i.slice());
- o = int(o.slice());
- ci = int(ci.slice());
- co = int(co.slice());
- funtyp = int(funtyp);
- if (funtyp<0) {
+ label = this.lab;
+ this.function_name = stripblanks(this.function_name);
+ this.xx = this.xx.slice();
+ this.z = this.z.slice();
+ this.rpar = this.rpar.slice();
+ this.ipar = int(this.ipar.slice());
+ this.i = int(this.i.slice());
+ this.o = int(this.o.slice());
+ this.ci = int(this.ci.slice());
+ this.co = int(this.co.slice());
+ this.funtyp = int(this.funtyp);
+ if (this.funtyp<0) {
message("function type cannot be negative");
ok = false;
}
- if ([[ci],[co]]!=[]) {
- if (max([[ci],[co]])>1) {
+ if ([[this.ci],[this.co]]!=[]) {
+ if (max([[this.ci],[this.co]])>1) {
message("vector event links not supported");
ok = false;
}
}
- depu = stripblanks(depu);
- if (part(depu,1)=="y") {
- depu = true;
+ this.depu = stripblanks(this.depu);
+ if (part(this.depu,1)=="y") {
+ this.depu = true;
} else {
- depu = false;
+ this.depu = false;
}
- dept = stripblanks(dept);
- if (part(dept,1)=="y") {
- dept = true;
+ this.dept = stripblanks(this.dept);
+ if (part(this.dept,1)=="y") {
+ this.dept = true;
} else {
- dept = false;
+ this.dept = false;
}
- dep_ut = [depu,dept];
+ dep_ut = [this.depu,this.dept];
if (ok) {
- [model,graphics,ok] = check_io(model,graphics,i,o,ci,co);
+ [model,graphics,ok] = check_io(model,graphics,this.i,this.o,this.ci,this.co);
}
if (ok) {
- if (funtyp==3) {
+ if (this.funtyp==3) {
needcompile = 4;
}
- model.sim = list(function_name,funtyp);
- model.state = xx;
- model.dstate = z;
- model.rpar = rpar;
- model.ipar = ipar;
- model.firing = auto0;
- model.nzcross = nzcr;
- model.nmode = nmode;
+ model.sim = list(this.function_name,this.funtyp);
+ model.state = this.xx;
+ model.dstate = this.z;
+ model.rpar = this.rpar;
+ model.ipar = this.ipar;
+ model.firing = this.auto0;
+ model.nzcross = this.nzcr;
+ model.nmode = this.nmode;
model.dep_ut = dep_ut;
arg1.model = model;
graphics.exprs = label;
diff --git a/js/Misc/generic_block2.pickle b/js/Misc/generic_block2.pickle
index 0d1dde24..9c0af7dc 100644
--- a/js/Misc/generic_block2.pickle
+++ b/js/Misc/generic_block2.pickle
@@ -2,8 +2,40 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'ci'
p2
-atp3
-Rp4
+aS'co'
+p3
+aS'i'
+p4
+aS'auto0'
+p5
+aS'o'
+p6
+aS'rpar'
+p7
+aS'depu'
+p8
+aS'dept'
+p9
+aS'xx'
+p10
+aS'nzcr'
+p11
+aS'funtyp'
+p12
+aS'lab'
+p13
+aS'ipar'
+p14
+aS'x'
+p15
+aS'z'
+p16
+aS'nmode'
+p17
+aS'function_name'
+p18
+atp19
+Rp20
. \ No newline at end of file
diff --git a/js/Misc/generic_block3.js b/js/Misc/generic_block3.js
index 2b94d741..899e8c49 100644
--- a/js/Misc/generic_block3.js
+++ b/js/Misc/generic_block3.js
@@ -2,9 +2,9 @@
function generic_block3() {
generic_block3.prototype.define = function generic_block3() {
model = scicos_model();
- function_name = "sinblk";
- funtyp = 4;
- model.sim = list(function_name,funtyp);
+ this.function_name = "sinblk";
+ this.funtyp = 4;
+ model.sim = list(this.function_name,this.funtyp);
model.in1 = 1;
model.in2 = 1;
model.intyp = 1;
@@ -12,7 +12,7 @@ function generic_block3() {
model.out2 = 1;
model.outtyp = 1;
model.dep_ut = [true,false];
- label = [[function_name],[sci2exp(funtyp)],[sci2exp([model.in1,model.in2])],[sci2exp(model.intyp)],[sci2exp([model.out,model.out2]),sci2exp(model.outtyp)],[sci2exp(model.evtin)],[sci2exp(model.evtout)],[sci2exp(model.state)],[sci2exp(model.dstate)],[sci2exp(model.odstate)],[sci2exp(model.rpar)],[sci2exp(model.ipar)],[sci2exp(model.opar)],[sci2exp(model.nmode)],[sci2exp(model.nzcross)],[sci2exp(model.firing)],["y"],["n"]];
+ label = [[this.function_name],[sci2exp(this.funtyp)],[sci2exp([model.in1,model.in2])],[sci2exp(model.intyp)],[sci2exp([model.out,model.out2]),sci2exp(model.outtyp)],[sci2exp(model.evtin)],[sci2exp(model.evtout)],[sci2exp(model.state)],[sci2exp(model.dstate)],[sci2exp(model.odstate)],[sci2exp(model.rpar)],[sci2exp(model.ipar)],[sci2exp(model.opar)],[sci2exp(model.nmode)],[sci2exp(model.nzcross)],[sci2exp(model.firing)],["y"],["n"]];
gr_i = [];
this.x = standard_define([4,2],model,label,gr_i);
return new BasicBlock(this.x);
@@ -31,67 +31,67 @@ function generic_block3() {
label[9-1] = [];
}
while (true) {
- [ok,function_name,funtyp,in1,it,out,ot,ci,co,xx,z,oz,rpar,ipar,opar,nmode,nzcr,auto0,depu,dept,lab] = scicos_getvalue("Set GENERIC block parameters",[["Simulation function"],["Function type (0,1,2,..)"],["Input ports sizes"],["Input ports type"],["Output port sizes"],["Output ports type"],["Input event ports sizes"],["Output events ports sizes"],["Initial continuous state"],["Initial discrete state"],["Initial object state"],["Real parameters vector"],["Integer parameters vector"],["Object parameters list"],["Number of modes"],["Number of zero crossings"],["Initial firing vector (<0 for no firing)"],["Direct feedthrough (y or n)"],["Time dependence (y or n)"]],list("str",1,"vec",1,"mat",[-1,2],"vec",-1,"mat",[-1,2],"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"lis",-1,"vec",-1,"vec",-1,"lis",-1,"vec",1,"vec",1,"vec","sum(%8)","str",1,"str",1),label);
+ [ok,this.function_name,this.funtyp,this.in1,this.it,this.out,this.ot,this.ci,this.co,this.xx,this.z,this.oz,this.rpar,this.ipar,this.opar,this.nmode,this.nzcr,this.auto0,this.depu,this.dept,this.lab] = scicos_getvalue("Set GENERIC block parameters",[["Simulation function"],["Function type (0,1,2,..)"],["Input ports sizes"],["Input ports type"],["Output port sizes"],["Output ports type"],["Input event ports sizes"],["Output events ports sizes"],["Initial continuous state"],["Initial discrete state"],["Initial object state"],["Real parameters vector"],["Integer parameters vector"],["Object parameters list"],["Number of modes"],["Number of zero crossings"],["Initial firing vector (<0 for no firing)"],["Direct feedthrough (y or n)"],["Time dependence (y or n)"]],list("str",1,"vec",1,"mat",[-1,2],"vec",-1,"mat",[-1,2],"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"lis",-1,"vec",-1,"vec",-1,"lis",-1,"vec",1,"vec",1,"vec","sum(%8)","str",1,"str",1),label);
if (!ok) {
break;
}
- label = lab;
- function_name = stripblanks(function_name);
- xx = xx.slice();
- z = z.slice();
- rpar = rpar.slice();
- ipar = int(ipar.slice());
- ci = int(ci.slice());
- co = int(co.slice());
- funtyp = funtyp;
- if (funtyp<0) {
+ label = this.lab;
+ this.function_name = stripblanks(this.function_name);
+ this.xx = this.xx.slice();
+ this.z = this.z.slice();
+ this.rpar = this.rpar.slice();
+ this.ipar = int(this.ipar.slice());
+ this.ci = int(this.ci.slice());
+ this.co = int(this.co.slice());
+ this.funtyp = this.funtyp;
+ if (this.funtyp<0) {
message("function type cannot be negative");
ok = false;
}
- if ([[ci],[co]]!=[]) {
- if (max([[ci],[co]])>1) {
+ if ([[this.ci],[this.co]]!=[]) {
+ if (max([[this.ci],[this.co]])>1) {
message("vector event links not supported");
ok = false;
}
}
- if (this.type[opar-1]!=15) {
+ if (this.type[this.opar-1]!=15) {
message("object parameter must be a list");
ok = false;
}
- if (this.type[oz-1]!=15) {
+ if (this.type[this.oz-1]!=15) {
message("discrete object state must be a list");
ok = false;
}
- depu = stripblanks(depu);
- if (part(depu,1)=="y") {
- depu = true;
+ this.depu = stripblanks(this.depu);
+ if (part(this.depu,1)=="y") {
+ this.depu = true;
} else {
- depu = false;
+ this.depu = false;
}
- dept = stripblanks(dept);
- if (part(dept,1)=="y") {
- dept = true;
+ this.dept = stripblanks(this.dept);
+ if (part(this.dept,1)=="y") {
+ this.dept = true;
} else {
- dept = false;
+ this.dept = false;
}
- dep_ut = [depu,dept];
+ dep_ut = [this.depu,this.dept];
if (ok) {
- [model,graphics,ok] = set_io(model,graphics,list(in1,it),list(out,ot),ci,co);
+ [model,graphics,ok] = set_io(model,graphics,list(this.in1,this.it),list(this.out,this.ot),this.ci,this.co);
}
if (ok) {
- if (funtyp==3) {
+ if (this.funtyp==3) {
needcompile = 4;
}
- model.sim = list(function_name,funtyp);
- model.state = xx;
- model.dstate = z;
- model.odstate = oz;
- model.rpar = rpar;
- model.ipar = ipar;
- model.opar = opar;
- model.firing = auto0;
- model.nzcross = nzcr;
- model.nmode = nmode;
+ model.sim = list(this.function_name,this.funtyp);
+ model.state = this.xx;
+ model.dstate = this.z;
+ model.odstate = this.oz;
+ model.rpar = this.rpar;
+ model.ipar = this.ipar;
+ model.opar = this.opar;
+ model.firing = this.auto0;
+ model.nzcross = this.nzcr;
+ model.nmode = this.nmode;
model.dep_ut = dep_ut;
arg1.model = model;
graphics.exprs = label;
diff --git a/js/Misc/generic_block3.pickle b/js/Misc/generic_block3.pickle
index 54a16ece..3e4746c4 100644
--- a/js/Misc/generic_block3.pickle
+++ b/js/Misc/generic_block3.pickle
@@ -2,10 +2,50 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'ci'
p2
-aS'type'
+aS'co'
p3
-atp4
-Rp5
+aS'it'
+p4
+aS'rpar'
+p5
+aS'auto0'
+p6
+aS'funtyp'
+p7
+aS'out'
+p8
+aS'type'
+p9
+aS'function_name'
+p10
+aS'in1'
+p11
+aS'lab'
+p12
+aS'nmode'
+p13
+aS'z'
+p14
+aS'xx'
+p15
+aS'nzcr'
+p16
+aS'depu'
+p17
+aS'dept'
+p18
+aS'opar'
+p19
+aS'oz'
+p20
+aS'ipar'
+p21
+aS'x'
+p22
+aS'ot'
+p23
+atp24
+Rp25
. \ No newline at end of file
diff --git a/js/Misc/scifunc_block.js b/js/Misc/scifunc_block.js
index 50a5eb63..ff014084 100644
--- a/js/Misc/scifunc_block.js
+++ b/js/Misc/scifunc_block.js
@@ -9,7 +9,7 @@ function scifunc_block() {
z0 = [];
typ = "c";
auto = [];
- rpar = [];
+ this.rpar = [];
model = scicos_model();
model.sim = list("scifunc",3);
model.in1 = in1;
@@ -18,13 +18,13 @@ function scifunc_block() {
model.evtout = clkout;
model.state = x0;
model.dstate = z0;
- model.rpar = rpar;
+ model.rpar = this.rpar;
model.ipar = 0;
model.opar = list();
model.blocktype = typ;
model.firing = auto;
model.dep_ut = [true,false];
- exprs = list([[sci2exp(in1)],[sci2exp(out)],[sci2exp(clkin)],[sci2exp(clkout)],[strcat(sci2exp(x0))],[strcat(sci2exp(z0))],[strcat(sci2exp(rpar))],[sci2exp(auto)]],list("y1=sin(u1)"," "," ","y1=sin(u1)"," "," "," "));
+ exprs = list([[sci2exp(in1)],[sci2exp(out)],[sci2exp(clkin)],[sci2exp(clkout)],[strcat(sci2exp(x0))],[strcat(sci2exp(z0))],[strcat(sci2exp(this.rpar))],[sci2exp(auto)]],list("y1=sin(u1)"," "," ","y1=sin(u1)"," "," "," "));
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -44,34 +44,34 @@ function scifunc_block() {
exprs[1-1][9-1] = "0";
}
while (true) {
- [ok,i,o,ci,co,xx,z,rpar,auto0,deptime,lab] = scicos_getvalue([["Set scifunc_block parameters"],["only regular blocks supported"]],[["input ports sizes"],["output port sizes"],["input event ports sizes"],["output events ports sizes"],["initial continuous state"],["initial discrete state"],["System parameters vector"],["initial firing vector (<0 for no firing)"],["is block always active (0:no, 1:yes)"]],list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec","sum(%4)","vec",1),exprs[1-1]);
+ [ok,this.i,this.o,this.ci,this.co,this.xx,this.z,this.rpar,this.auto0,this.deptime,this.lab] = scicos_getvalue([["Set scifunc_block parameters"],["only regular blocks supported"]],[["input ports sizes"],["output port sizes"],["input event ports sizes"],["output events ports sizes"],["initial continuous state"],["initial discrete state"],["System parameters vector"],["initial firing vector (<0 for no firing)"],["is block always active (0:no, 1:yes)"]],list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec","sum(%4)","vec",1),exprs[1-1]);
if (!ok) {
break;
}
- exprs[1-1] = lab;
- xx = xx.slice();
- z = z.slice();
- rpar = rpar.slice();
- nrp = prod(size(rpar));
- i = int(i.slice());
- ni = size(i,1);
- o = int(o.slice());
- no = size(o,1);
- ci = int(ci.slice());
- nci = size(ci,1);
- co = int(co.slice());
- nco = size(co,1);
- [ok,tt,dep_ut] = genfunc1(exprs[2-1],i,o,nci,nco,size(xx,1),size(z,1),nrp,"c");
- dep_ut[2-1] = (1==deptime);
+ exprs[1-1] = this.lab;
+ this.xx = this.xx.slice();
+ this.z = this.z.slice();
+ this.rpar = this.rpar.slice();
+ nrp = prod(size(this.rpar));
+ this.i = int(this.i.slice());
+ ni = size(this.i,1);
+ this.o = int(this.o.slice());
+ no = size(this.o,1);
+ this.ci = int(this.ci.slice());
+ nci = size(this.ci,1);
+ this.co = int(this.co.slice());
+ nco = size(this.co,1);
+ [ok,tt,dep_ut] = genfunc1(exprs[2-1],this.i,this.o,nci,nco,size(this.xx,1),size(this.z,1),nrp,"c");
+ dep_ut[2-1] = (1==this.deptime);
if (!ok) {
break;
}
- [model,graphics,ok] = check_io(model,graphics,i,o,ci,co);
+ [model,graphics,ok] = check_io(model,graphics,this.i,this.o,this.ci,this.co);
if (ok) {
- auto = auto0;
- model.state = xx;
- model.dstate = z;
- model.rpar = rpar;
+ auto = this.auto0;
+ model.state = this.xx;
+ model.dstate = this.z;
+ model.rpar = this.rpar;
if (model.ipar!=0) {
model.opar = model.ipar;
model.ipar = 0;
diff --git a/js/Misc/scifunc_block.pickle b/js/Misc/scifunc_block.pickle
index 0d1dde24..4ae6bee1 100644
--- a/js/Misc/scifunc_block.pickle
+++ b/js/Misc/scifunc_block.pickle
@@ -2,8 +2,28 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'ci'
p2
-atp3
-Rp4
+aS'co'
+p3
+aS'i'
+p4
+aS'deptime'
+p5
+aS'auto0'
+p6
+aS'o'
+p7
+aS'rpar'
+p8
+aS'xx'
+p9
+aS'lab'
+p10
+aS'x'
+p11
+aS'z'
+p12
+atp13
+Rp14
. \ No newline at end of file
diff --git a/js/Misc/scifunc_block_m.js b/js/Misc/scifunc_block_m.js
index 8e338ba6..8268975d 100644
--- a/js/Misc/scifunc_block_m.js
+++ b/js/Misc/scifunc_block_m.js
@@ -9,7 +9,7 @@ function scifunc_block_m() {
z0 = [];
typ = "c";
auto = [];
- rpar = [];
+ this.rpar = [];
it = 1;
model = scicos_model();
model.sim = list("scifunc",3);
@@ -23,13 +23,13 @@ function scifunc_block_m() {
model.evtout = clkout;
model.state = x0;
model.dstate = z0;
- model.rpar = rpar;
+ model.rpar = this.rpar;
model.ipar = 0;
model.opar = list();
model.blocktype = typ;
model.firing = auto;
model.dep_ut = [true,false];
- exprs = list([[sci2exp([in1,in1])],[sci2exp([out,out])],[sci2exp(clkin)],[sci2exp(clkout)],[strcat(sci2exp(x0))],[strcat(sci2exp(z0))],[strcat(sci2exp(rpar))],[sci2exp(auto)],[sci2exp(0)]],list("y1=sin(u1)"," "," ","y1=sin(u1)"," "," "," "));
+ exprs = list([[sci2exp([in1,in1])],[sci2exp([out,out])],[sci2exp(clkin)],[sci2exp(clkout)],[strcat(sci2exp(x0))],[strcat(sci2exp(z0))],[strcat(sci2exp(this.rpar))],[sci2exp(auto)],[sci2exp(0)]],list("y1=sin(u1)"," "," ","y1=sin(u1)"," "," "," "));
gr_i = [];
this.x = standard_define([4,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -46,34 +46,34 @@ function scifunc_block_m() {
graphics = arg1.graphics;
exprs = graphics.exprs;
while (true) {
- [ok,i,o,ci,co,xx,z,rpar,auto0,deptime,lab] = scicos_getvalue([["Set scifunc_block parameters"],["only regular blocks supported"]],[["input ports sizes"],["output port sizes"],["input event ports sizes"],["output events ports sizes"],["initial continuous state"],["initial discrete state"],["System parameters vector"],["initial firing vector (<0 for no firing)"],["is block always active (0:no, 1:yes)"]],list("mat",[-1,2],"mat",[-2,2],"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",1),exprs[1-1]);
+ [ok,this.i,this.o,this.ci,this.co,this.xx,this.z,this.rpar,this.auto0,this.deptime,this.lab] = scicos_getvalue([["Set scifunc_block parameters"],["only regular blocks supported"]],[["input ports sizes"],["output port sizes"],["input event ports sizes"],["output events ports sizes"],["initial continuous state"],["initial discrete state"],["System parameters vector"],["initial firing vector (<0 for no firing)"],["is block always active (0:no, 1:yes)"]],list("mat",[-1,2],"mat",[-2,2],"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",1),exprs[1-1]);
if (!ok) {
break;
}
- exprs[1-1] = lab;
- xx = xx.slice();
- z = z.slice();
- rpar = rpar.slice();
- it = ones(1,size(i,1));
- ot = ones(1,size(o,1));
- nrp = prod(size(rpar));
- ni = size(i,1);
- no = size(o,1);
- ci = int(ci.slice());
- nci = size(ci,1);
- co = int(co.slice());
- nco = size(co,1);
- [ok,tt,dep_ut] = genfunc2(exprs[2-1],i,o,nci,nco,size(xx,1),size(z,1),nrp,"c");
- dep_ut[2-1] = (1==deptime);
+ exprs[1-1] = this.lab;
+ this.xx = this.xx.slice();
+ this.z = this.z.slice();
+ this.rpar = this.rpar.slice();
+ it = ones(1,size(this.i,1));
+ ot = ones(1,size(this.o,1));
+ nrp = prod(size(this.rpar));
+ ni = size(this.i,1);
+ no = size(this.o,1);
+ this.ci = int(this.ci.slice());
+ nci = size(this.ci,1);
+ this.co = int(this.co.slice());
+ nco = size(this.co,1);
+ [ok,tt,dep_ut] = genfunc2(exprs[2-1],this.i,this.o,nci,nco,size(this.xx,1),size(this.z,1),nrp,"c");
+ dep_ut[2-1] = (1==this.deptime);
if (!ok) {
break;
}
- [model,graphics,ok] = set_io(model,graphics,list(i,it),list(o,ot),ci,co);
+ [model,graphics,ok] = set_io(model,graphics,list(this.i,it),list(this.o,ot),this.ci,this.co);
if (ok) {
- auto = auto0;
- model.state = xx;
- model.dstate = z;
- model.rpar = rpar;
+ auto = this.auto0;
+ model.state = this.xx;
+ model.dstate = this.z;
+ model.rpar = this.rpar;
if (model.ipar!=0) {
model.opar = model.ipar;
model.ipar = 0;
diff --git a/js/Misc/scifunc_block_m.pickle b/js/Misc/scifunc_block_m.pickle
index 0d1dde24..4ae6bee1 100644
--- a/js/Misc/scifunc_block_m.pickle
+++ b/js/Misc/scifunc_block_m.pickle
@@ -2,8 +2,28 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'ci'
p2
-atp3
-Rp4
+aS'co'
+p3
+aS'i'
+p4
+aS'deptime'
+p5
+aS'auto0'
+p6
+aS'o'
+p7
+aS'rpar'
+p8
+aS'xx'
+p9
+aS'lab'
+p10
+aS'x'
+p11
+aS'z'
+p12
+atp13
+Rp14
. \ No newline at end of file
diff --git a/js/NonLinear/ABS_VALUE.js b/js/NonLinear/ABS_VALUE.js
index 06525a67..cb2a098b 100644
--- a/js/NonLinear/ABS_VALUE.js
+++ b/js/NonLinear/ABS_VALUE.js
@@ -26,13 +26,13 @@ function ABS_VALUE() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,zcr,exprs] = scicos_getvalue("Set block parameters",["use zero_crossing (1: yes) (0:no)"],list("vec",1),exprs);
+ [ok,this.zcr,exprs] = scicos_getvalue("Set block parameters",["use zero_crossing (1: yes) (0:no)"],list("vec",1),exprs);
if (!ok) {
break;
}
graphics.exprs = exprs;
if (ok) {
- if (zcr!=0) {
+ if (this.zcr!=0) {
model.nmode = -1;
model.nzcross = -1;
} else {
diff --git a/js/NonLinear/ABS_VALUE.pickle b/js/NonLinear/ABS_VALUE.pickle
index 0d1dde24..4709e48c 100644
--- a/js/NonLinear/ABS_VALUE.pickle
+++ b/js/NonLinear/ABS_VALUE.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'zcr'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/NonLinear/DLRADAPT_f.js b/js/NonLinear/DLRADAPT_f.js
index a93eee91..ef454e12 100644
--- a/js/NonLinear/DLRADAPT_f.js
+++ b/js/NonLinear/DLRADAPT_f.js
@@ -1,24 +1,24 @@
/* autogenerated from "macros/NonLinear/DLRADAPT_f.sci" */
function DLRADAPT_f() {
DLRADAPT_f.prototype.define = function DLRADAPT_f() {
- p = [[0],[1]];
- rn = [];
- rd = [[math.complex(0.2,0.8),math.complex(0.2,-0.8)],[math.complex(0.3,0.7),math.complex(0.3,-0.7)]];
- g = [[1],[1]];
- last_u = [];
- last_y = [[0],[0]];
+ this.p = [[0],[1]];
+ this.rn = [];
+ this.rd = [[math.complex(0.2,0.8),math.complex(0.2,-0.8)],[math.complex(0.3,0.7),math.complex(0.3,-0.7)]];
+ this.g = [[1],[1]];
+ this.last_u = [];
+ this.last_y = [[0],[0]];
model = scicos_model();
model.sim = "dlradp";
model.in1 = [[1],[1]];
model.out = 1;
model.evtin = 1;
- model.dstate = [[last_u],[last_y]];
- model.rpar = [[p.slice()],[real(rn.slice())],[imag(rn.slice())],[real(rd.slice())],[imag(rd.slice())],[g.slice()]];
+ model.dstate = [[this.last_u],[this.last_y]];
+ model.rpar = [[this.p.slice()],[real(this.rn.slice())],[imag(this.rn.slice())],[real(this.rd.slice())],[imag(this.rd.slice())],[this.g.slice()]];
model.ipar = [[0],[2],[2]];
model.blocktype = "d";
model.firing = [];
model.dep_ut = [true,false];
- exprs = [[sci2exp(p)],[sci2exp(rn)],[sci2exp(rd,0)],[sci2exp(g)],[sci2exp(last_u)],[sci2exp(last_y)]];
+ exprs = [[sci2exp(this.p)],[sci2exp(this.rn)],[sci2exp(this.rd,0)],[sci2exp(this.g)],[sci2exp(this.last_u)],[sci2exp(this.last_y)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -34,20 +34,20 @@ function DLRADAPT_f() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,p,rn,rd,g,last_u,last_y,exprs] = scicos_getvalue("Set block parameters",[["Vector of p mesh points"],["Numerator roots (one line for each mesh)"],["Denominator roots (one line for each mesh)"],["Vector of gain at mesh points"],["past inputs (Num degree values)"],["past outputs (Den degree values)"]],list("vec",-1,"mat",[-1,-1],"mat",["size(%1,\'*\')","-1"],"vec","size(%1,\'*\')","vec","size(%2,2)","vec","size(%3,2)"),exprs);
+ [ok,this.p,this.rn,this.rd,this.g,this.last_u,this.last_y,exprs] = scicos_getvalue("Set block parameters",[["Vector of p mesh points"],["Numerator roots (one line for each mesh)"],["Denominator roots (one line for each mesh)"],["Vector of gain at mesh points"],["past inputs (Num degree values)"],["past outputs (Den degree values)"]],list("vec",-1,"mat",[-1,-1],"mat",["size(%1,\'*\')","-1"],"vec","size(%1,\'*\')","vec","size(%2,2)","vec","size(%3,2)"),exprs);
if (!ok) {
break;
}
- m = size(rn,2);
- [npt,n] = size(rd);
+ m = size(this.rn,2);
+ [npt,n] = size(this.rd);
if (m>=n) {
message("Transfer must be strictly proper");
- } else if (size(rn,1)!=0&&size(rn,1)!=size(p,"*")) {
+ } else if (size(this.rn,1)!=0&&size(this.rn,1)!=size(this.p,"*")) {
message("Numerator roots matrix row size\'s is incorrect");
} else {
- rpar = [[p.slice()],[real(rn.slice())],[imag(rn.slice())],[real(rd.slice())],[imag(rd.slice())],[g.slice()]];
+ rpar = [[this.p.slice()],[real(this.rn.slice())],[imag(this.rn.slice())],[real(this.rd.slice())],[imag(this.rd.slice())],[this.g.slice()]];
ipar = [[m],[n],[npt]];
- model.dstate = [[last_u.slice()],[last_y.slice()]];
+ model.dstate = [[this.last_u.slice()],[this.last_y.slice()]];
model.rpar = rpar;
model.ipar = ipar;
graphics.exprs = exprs;
diff --git a/js/NonLinear/DLRADAPT_f.pickle b/js/NonLinear/DLRADAPT_f.pickle
index 0d1dde24..971b5bc0 100644
--- a/js/NonLinear/DLRADAPT_f.pickle
+++ b/js/NonLinear/DLRADAPT_f.pickle
@@ -2,8 +2,20 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'last_y'
p2
-atp3
-Rp4
+aS'g'
+p3
+aS'last_u'
+p4
+aS'rd'
+p5
+aS'p'
+p6
+aS'x'
+p7
+aS'rn'
+p8
+atp9
+Rp10
. \ No newline at end of file
diff --git a/js/NonLinear/EXPBLK_f.js b/js/NonLinear/EXPBLK_f.js
index 8dbfaf1f..ec4262b2 100644
--- a/js/NonLinear/EXPBLK_f.js
+++ b/js/NonLinear/EXPBLK_f.js
@@ -2,12 +2,12 @@
function EXPBLK_f() {
EXPBLK_f.prototype.define = function EXPBLK_f() {
in1 = 1;
- a = math.E;
+ this.a = math.E;
model = scicos_model();
model.sim = "expblk";
model.in1 = -1;
model.out = -1;
- model.rpar = a;
+ model.rpar = this.a;
model.blocktype = "c";
model.dep_ut = [true,false];
exprs = ["%e"];
@@ -29,15 +29,15 @@ function EXPBLK_f() {
exprs = exprs[2-1];
}
while (true) {
- [ok,a,exprs] = scicos_getvalue("Set a^u block parameters","a (>0)",list("vec",1),exprs);
+ [ok,this.a,exprs] = scicos_getvalue("Set a^u block parameters","a (>0)",list("vec",1),exprs);
if (!ok) {
break;
}
- if (or(a<=0)) {
+ if (or(this.a<=0)) {
message("a^u : a must be positive");
} else {
graphics.exprs = exprs;
- model.rpar = a;
+ model.rpar = this.a;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/NonLinear/EXPBLK_f.pickle b/js/NonLinear/EXPBLK_f.pickle
index 0d1dde24..792ba43a 100644
--- a/js/NonLinear/EXPBLK_f.pickle
+++ b/js/NonLinear/EXPBLK_f.pickle
@@ -2,8 +2,10 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'a'
p2
-atp3
-Rp4
+aS'x'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/NonLinear/EXPBLK_m.js b/js/NonLinear/EXPBLK_m.js
index 275d3563..177a00ef 100644
--- a/js/NonLinear/EXPBLK_m.js
+++ b/js/NonLinear/EXPBLK_m.js
@@ -2,7 +2,7 @@
function EXPBLK_m() {
EXPBLK_m.prototype.define = function EXPBLK_m() {
in1 = 1;
- a = math.E;
+ this.a = math.E;
model = scicos_model();
model.sim = list("expblk_m",4);
model.in1 = -1;
@@ -11,7 +11,7 @@ function EXPBLK_m() {
model.out2 = -2;
model.intyp = 1;
model.outtyp = 1;
- model.rpar = a;
+ model.rpar = this.a;
model.blocktype = "c";
model.dep_ut = [true,false];
exprs = ["%e"];
@@ -33,15 +33,15 @@ function EXPBLK_m() {
exprs = exprs[2-1];
}
while (true) {
- [ok,a,exprs] = scicos_getvalue("Set a^u block parameters","a (>0)",list("vec",1),exprs);
+ [ok,this.a,exprs] = scicos_getvalue("Set a^u block parameters","a (>0)",list("vec",1),exprs);
if (!ok) {
break;
}
- if (or(a<=0)) {
+ if (or(this.a<=0)) {
message("a^u : a must be positive");
} else {
graphics.exprs = exprs;
- model.rpar = a;
+ model.rpar = this.a;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/NonLinear/EXPBLK_m.pickle b/js/NonLinear/EXPBLK_m.pickle
index 0d1dde24..792ba43a 100644
--- a/js/NonLinear/EXPBLK_m.pickle
+++ b/js/NonLinear/EXPBLK_m.pickle
@@ -2,8 +2,10 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'a'
p2
-atp3
-Rp4
+aS'x'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/NonLinear/INTRP2BLK_f.js b/js/NonLinear/INTRP2BLK_f.js
index 6d1b5bf2..fb245e44 100644
--- a/js/NonLinear/INTRP2BLK_f.js
+++ b/js/NonLinear/INTRP2BLK_f.js
@@ -1,18 +1,18 @@
/* autogenerated from "macros/NonLinear/INTRP2BLK_f.sci" */
function INTRP2BLK_f() {
INTRP2BLK_f.prototype.define = function INTRP2BLK_f() {
- a = [[0],[1]];
- b = [[0],[1]];
- c = [[0,1],[1,2]];
+ this.a = [[0],[1]];
+ this.b = [[0],[1]];
+ this.c = [[0,1],[1,2]];
model = scicos_model();
model.sim = list("intrp2",1);
model.in1 = [[1],[1]];
model.out = 1;
- model.rpar = [[a],[b],[c.slice()]];
+ model.rpar = [[this.a],[this.b],[this.c.slice()]];
model.ipar = [[2],[2]];
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [[strcat(sci2exp(a))],[strcat(sci2exp(b))],[strcat(sci2exp(c,0))]];
+ exprs = [[strcat(sci2exp(this.a))],[strcat(sci2exp(this.b))],[strcat(sci2exp(this.c,0))]];
gr_i = [];
this.x = standard_define([3,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -28,19 +28,19 @@ function INTRP2BLK_f() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,a,b,c,exprs] = scicos_getvalue("Set Interpolation block parameters",[["X coord."],["Y coord."],["Z values"]],list("vec",-1,"vec",-1,"mat",[-1,-1]),exprs);
+ [ok,this.a,this.b,this.c,exprs] = scicos_getvalue("Set Interpolation block parameters",[["X coord."],["Y coord."],["Z values"]],list("vec",-1,"vec",-1,"mat",[-1,-1]),exprs);
if (!ok) {
break;
}
- if (size(a,"*")!=size(c,"c")||size(b,"*")!=size(c,"r")) {
+ if (size(this.a,"*")!=size(this.c,"c")||size(this.b,"*")!=size(this.c,"r")) {
message("incompatible dimension");
- } else if (min(a.slice(2-1,$)-a.slice(1-1,$-1))<=0||min(b.slice(2-1,$)-b.slice(1-1,$-1))<=0) {
+ } else if (min(this.a.slice(2-1,$)-this.a.slice(1-1,$-1))<=0||min(this.b.slice(2-1,$)-this.b.slice(1-1,$-1))<=0) {
message("X and Y must be strictly increasing");
} else {
if (ok) {
graphics.exprs = exprs;
- model.rpar = [[a.slice()],[b.slice()],[c.slice()]];
- model.ipar = [[size(a,"*")],[size(b,"*")]];
+ model.rpar = [[this.a.slice()],[this.b.slice()],[this.c.slice()]];
+ model.ipar = [[size(this.a,"*")],[size(this.b,"*")]];
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/NonLinear/INTRP2BLK_f.pickle b/js/NonLinear/INTRP2BLK_f.pickle
index 0d1dde24..3ee9dce1 100644
--- a/js/NonLinear/INTRP2BLK_f.pickle
+++ b/js/NonLinear/INTRP2BLK_f.pickle
@@ -2,8 +2,14 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'a'
p2
-atp3
-Rp4
+aS'x'
+p3
+aS'c'
+p4
+aS'b'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/NonLinear/INTRPLBLK_f.js b/js/NonLinear/INTRPLBLK_f.js
index 28ce39b3..978d3aa1 100644
--- a/js/NonLinear/INTRPLBLK_f.js
+++ b/js/NonLinear/INTRPLBLK_f.js
@@ -1,16 +1,16 @@
/* autogenerated from "macros/NonLinear/INTRPLBLK_f.sci" */
function INTRPLBLK_f() {
INTRPLBLK_f.prototype.define = function INTRPLBLK_f() {
- a = [[0],[1]];
- b = [[0],[1]];
+ this.a = [[0],[1]];
+ this.b = [[0],[1]];
model = scicos_model();
model.sim = "intrpl";
model.in1 = 1;
model.out = 1;
- model.rpar = [[a],[b]];
+ model.rpar = [[this.a],[this.b]];
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [[strcat(sci2exp(a))],[strcat(sci2exp(b))]];
+ exprs = [[strcat(sci2exp(this.a))],[strcat(sci2exp(this.b))]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -26,18 +26,18 @@ function INTRPLBLK_f() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,a,b,exprs] = scicos_getvalue("Set Interpolation block parameters",[["X coord."],["Y coord."]],list("vec",-1,"vec",-1),exprs);
+ [ok,this.a,this.b,exprs] = scicos_getvalue("Set Interpolation block parameters",[["X coord."],["Y coord."]],list("vec",-1,"vec",-1),exprs);
if (!ok) {
break;
}
- if (size(a,"*")!=size(b,"*")) {
+ if (size(this.a,"*")!=size(this.b,"*")) {
message("X and Y must have the same size");
- } else if (min(a.slice(2-1,$)-a.slice(1-1,$-1))<=0) {
+ } else if (min(this.a.slice(2-1,$)-this.a.slice(1-1,$-1))<=0) {
message("X must be strictly increasing");
} else {
if (ok) {
graphics.exprs = exprs;
- model.rpar = [[a.slice()],[b.slice()]];
+ model.rpar = [[this.a.slice()],[this.b.slice()]];
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/NonLinear/INTRPLBLK_f.pickle b/js/NonLinear/INTRPLBLK_f.pickle
index 0d1dde24..8f2166a5 100644
--- a/js/NonLinear/INTRPLBLK_f.pickle
+++ b/js/NonLinear/INTRPLBLK_f.pickle
@@ -2,8 +2,12 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'a'
p2
-atp3
-Rp4
+aS'x'
+p3
+aS'b'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/NonLinear/LOGBLK_f.js b/js/NonLinear/LOGBLK_f.js
index 3cd0de2f..359068b9 100644
--- a/js/NonLinear/LOGBLK_f.js
+++ b/js/NonLinear/LOGBLK_f.js
@@ -2,12 +2,12 @@
function LOGBLK_f() {
LOGBLK_f.prototype.define = function LOGBLK_f() {
in1 = 1;
- a = math.E;
+ this.a = math.E;
model = scicos_model();
model.sim = "logblk";
model.in1 = -1;
model.out = -1;
- model.rpar = a;
+ model.rpar = this.a;
model.blocktype = "c";
model.dep_ut = [true,false];
exprs = "%e";
@@ -29,16 +29,16 @@ function LOGBLK_f() {
exprs = exprs[2-1];
}
while (true) {
- [ok,a,exprs] = scicos_getvalue("Set log block parameters","Basis (>1)",list("vec",1),exprs);
+ [ok,this.a,exprs] = scicos_getvalue("Set log block parameters","Basis (>1)",list("vec",1),exprs);
if (!ok) {
break;
}
- if (a<=1) {
+ if (this.a<=1) {
message("Basis must be larger than 1");
} else {
if (ok) {
graphics.exprs = exprs;
- model.rpar = a;
+ model.rpar = this.a;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/NonLinear/LOGBLK_f.pickle b/js/NonLinear/LOGBLK_f.pickle
index 0d1dde24..792ba43a 100644
--- a/js/NonLinear/LOGBLK_f.pickle
+++ b/js/NonLinear/LOGBLK_f.pickle
@@ -2,8 +2,10 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'a'
p2
-atp3
-Rp4
+aS'x'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/NonLinear/LOOKUP2D.js b/js/NonLinear/LOOKUP2D.js
index 9a741929..ba2f77ca 100644
--- a/js/NonLinear/LOOKUP2D.js
+++ b/js/NonLinear/LOOKUP2D.js
@@ -2,21 +2,21 @@
function LOOKUP2D() {
LOOKUP2D.prototype.define = function LOOKUP2D() {
model = scicos_model();
- xx = [1:4];
- yy = [1:3];
- zz = [[4,5,6],[16,19,20],[10,18,23],[6,3,-1]];
- Method = 1;
+ this.xx = [1:4];
+ this.yy = [1:3];
+ this.zz = [[4,5,6],[16,19,20],[10,18,23],[6,3,-1]];
+ this.Method = 1;
Graf = "n";
- Nx = length(xx);
- Ny = length(yy);
+ Nx = length(this.xx);
+ Ny = length(this.yy);
model.sim = list("lookup2d",4);
model.in1 = [[1],[1]];
model.out = 1;
- model.rpar = [[xx.slice()],[yy.slice()],[zz.slice()]];
- model.ipar = [[Nx],[Ny],[Method]];
+ model.rpar = [[this.xx.slice()],[this.yy.slice()],[this.zz.slice()]];
+ model.ipar = [[Nx],[Ny],[this.Method]];
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = list(strcat(sci2exp(xx)),strcat(sci2exp(yy)),strcat(sci2exp(zz)),sci2exp(Method),Graf);
+ exprs = list(strcat(sci2exp(this.xx)),strcat(sci2exp(this.yy)),strcat(sci2exp(this.zz)),sci2exp(this.Method),Graf);
gr_i = [];
this.x = standard_define([2.5,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -35,29 +35,29 @@ function LOOKUP2D() {
SaveExit = false;
while (true) {
Ask_again = false;
- [ok,xx,yy,zz,Method,graf,exprs] = scicos_getvalue("2D Lookup table parameters",[["Row index input values"],["Column index input values"],["Table data"],["Lookup method(1..5)"],["Launch graphic window(y/n)?"]],list("vec",-1,"vec",-1,"mat",[-1,-1],"vec",1,"str",1),exprs);
+ [ok,this.xx,this.yy,this.zz,this.Method,this.graf,exprs] = scicos_getvalue("2D Lookup table parameters",[["Row index input values"],["Column index input values"],["Table data"],["Lookup method(1..5)"],["Launch graphic window(y/n)?"]],list("vec",-1,"vec",-1,"mat",[-1,-1],"vec",1,"str",1),exprs);
if (!ok) {
break;
}
- mtd = int(Method);
+ mtd = int(this.Method);
if (mtd<1) {
mtd = 1;
}
if (mtd>6) {
mtd = 6;
}
- if (graf!="y"&&graf!="Y") {
- graf = "n";
+ if (this.graf!="y"&&this.graf!="Y") {
+ this.graf = "n";
}
exprs[5-1] = "n";
exprs[4-1] = sci2exp(mtd);
METHOD = getmethod(mtd);
if (!Ask_again) {
- xx = xx.slice();
- yy = yy.slice();
- [nx,mx] = size(xx);
- [ny,my] = size(yy);
- [nz,mz] = size(zz);
+ this.xx = this.xx.slice();
+ this.yy = this.yy.slice();
+ [nx,mx] = size(this.xx);
+ [ny,my] = size(this.yy);
+ [nz,mz] = size(this.zz);
if (((nx<=1)||(ny<=1))) {
x_message("input row/column data size should be greater than one");
Ask_again = true;
@@ -66,29 +66,29 @@ function LOOKUP2D() {
x_message("incompatible size of x and y");
Ask_again = true;
}
- [ok] = test_increasing(xx);
+ [ok] = test_increasing(this.xx);
if ((!ok)) {
x_message("Row input values must be monotonically increasing");
Ask_again = true;
}
- [ok] = test_increasing(yy);
+ [ok] = test_increasing(this.yy);
if ((!ok)) {
x_message("Column input values must be monotonically increasing");
Ask_again = true;
}
}
if (!Ask_again) {
- if ((graf=="Y"||graf=="y")) {
+ if ((this.graf=="Y"||this.graf=="y")) {
gh = gcf();
curwin = gh.figure_id;
save_curwin = curwin;
gh2 = scf();
curwin = max(winsid())+1;
- plot3d(xx,yy,zz,35,45,"X@Y@Z",[5,2,4]);
+ plot3d(this.xx,this.yy,this.zz,35,45,"X@Y@Z",[5,2,4]);
curwin = save_curwin;
gh.figure_id = curwin;
}
- model.rpar = [[xx.slice()],[yy.slice()],[zz.slice()]];
+ model.rpar = [[this.xx.slice()],[this.yy.slice()],[this.zz.slice()]];
model.ipar = [[nx],[ny],[mtd]];
graphics.exprs = exprs;
this.x.model = model;
diff --git a/js/NonLinear/LOOKUP2D.pickle b/js/NonLinear/LOOKUP2D.pickle
index a808c055..8518b72f 100644
--- a/js/NonLinear/LOOKUP2D.pickle
+++ b/js/NonLinear/LOOKUP2D.pickle
@@ -2,10 +2,20 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'order'
p2
-aS'order'
+aS'yy'
p3
-atp4
-Rp5
+aS'xx'
+p4
+aS'zz'
+p5
+aS'x'
+p6
+aS'Method'
+p7
+aS'graf'
+p8
+atp9
+Rp10
. \ No newline at end of file
diff --git a/js/NonLinear/LOOKUP_c.pickle b/js/NonLinear/LOOKUP_c.pickle
index b1c7cff9..a645b625 100644
--- a/js/NonLinear/LOOKUP_c.pickle
+++ b/js/NonLinear/LOOKUP_c.pickle
@@ -4,18 +4,28 @@ p0
((lp1
S'rparin'
p2
-aS'ixy'
+aS'extrapo'
p3
-aS'iparin'
+aS'yy'
p4
-aS'argn'
+aS'xx'
p5
-aS'xy'
+aS'ixy'
p6
-aS'x'
+aS'iparin'
p7
-aS'curwin'
+aS'argn'
p8
-atp9
-Rp10
+aS'xy'
+p9
+aS'x'
+p10
+aS'curwin'
+p11
+aS'Method'
+p12
+aS'graf'
+p13
+atp14
+Rp15
. \ No newline at end of file
diff --git a/js/NonLinear/MAXMIN.js b/js/NonLinear/MAXMIN.js
index b2121ccd..91bda897 100644
--- a/js/NonLinear/MAXMIN.js
+++ b/js/NonLinear/MAXMIN.js
@@ -25,36 +25,36 @@ function MAXMIN() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,mm,nin,zcr,exprs] = scicos_getvalue("Set Max/Min block parameters",[["Min (1) or Max (2) "],["Number of input vectors (1 or 2)"],["zero-crossing (1: yes, 0;no)"]],list("vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.mm,this.nin,this.zcr,exprs] = scicos_getvalue("Set Max/Min block parameters",[["Min (1) or Max (2) "],["Number of input vectors (1 or 2)"],["zero-crossing (1: yes, 0;no)"]],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- if (zcr!=0) {
- zcr = -1;
+ if (this.zcr!=0) {
+ this.zcr = -1;
}
- if (mm!=1) {
- mm = 2;
+ if (this.mm!=1) {
+ this.mm = 2;
}
- if (nin!=1&&nin!=2) {
+ if (this.nin!=1&&this.nin!=2) {
message("Wrong number of inputs, only 1 and 2 allowed");
ok = false;
}
if (ok) {
- if (nin==1) {
+ if (this.nin==1) {
[model,graphics,ok] = check_io(model,graphics,-1,1,[],[]);
} else {
[model,graphics,ok] = check_io(model,graphics,[-1,-1],-1,[],[]);
}
}
if (ok) {
- model.nzcross = zcr;
- if (nin==1) {
- model.nmode = abs(zcr);
+ model.nzcross = this.zcr;
+ if (this.nin==1) {
+ model.nmode = abs(this.zcr);
} else {
- model.nmode = zcr;
+ model.nmode = this.zcr;
}
- model.ipar = mm;
- if (mm==1) {
+ model.ipar = this.mm;
+ if (this.mm==1) {
label = "MIN";
} else {
label = "MAX";
diff --git a/js/NonLinear/MAXMIN.pickle b/js/NonLinear/MAXMIN.pickle
index 0d1dde24..f031a479 100644
--- a/js/NonLinear/MAXMIN.pickle
+++ b/js/NonLinear/MAXMIN.pickle
@@ -2,8 +2,14 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'mm'
p2
-atp3
-Rp4
+aS'x'
+p3
+aS'nin'
+p4
+aS'zcr'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/NonLinear/POWBLK_f.js b/js/NonLinear/POWBLK_f.js
index 3b06a6e8..302238de 100644
--- a/js/NonLinear/POWBLK_f.js
+++ b/js/NonLinear/POWBLK_f.js
@@ -2,15 +2,15 @@
function POWBLK_f() {
POWBLK_f.prototype.define = function POWBLK_f() {
in1 = 1;
- a = 1.5;
+ this.a = 1.5;
model = scicos_model();
model.sim = "powblk";
model.in1 = -1;
model.out = -1;
- model.rpar = a;
+ model.rpar = this.a;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = string(a);
+ exprs = string(this.a);
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -29,16 +29,16 @@ function POWBLK_f() {
exprs = exprs[2-1];
}
while (true) {
- [ok,a,exprs] = scicos_getvalue("Set u^a block parameters","to the power of",list("vec",1),exprs);
+ [ok,this.a,exprs] = scicos_getvalue("Set u^a block parameters","to the power of",list("vec",1),exprs);
if (!ok) {
break;
}
graphics.exprs = exprs;
- if (a==int(a)) {
- model.ipar = a;
+ if (this.a==int(this.a)) {
+ model.ipar = this.a;
model.rpar = [];
} else {
- model.rpar = a;
+ model.rpar = this.a;
model.ipar = [];
}
model.firing = [];
diff --git a/js/NonLinear/POWBLK_f.pickle b/js/NonLinear/POWBLK_f.pickle
index 0d1dde24..792ba43a 100644
--- a/js/NonLinear/POWBLK_f.pickle
+++ b/js/NonLinear/POWBLK_f.pickle
@@ -2,8 +2,10 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'a'
p2
-atp3
-Rp4
+aS'x'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/NonLinear/PRODUCT.js b/js/NonLinear/PRODUCT.js
index 6236adad..a16b0380 100644
--- a/js/NonLinear/PRODUCT.js
+++ b/js/NonLinear/PRODUCT.js
@@ -1,18 +1,18 @@
/* autogenerated from "macros/NonLinear/PRODUCT.sci" */
function PRODUCT() {
PRODUCT.prototype.define = function PRODUCT() {
- sgn = [[1],[-1]];
+ this.sgn = [[1],[-1]];
model = scicos_model();
model.sim = list("product",4);
model.in1 = [[-1],[-1]];
model.out = -1;
- model.ipar = sgn;
+ model.ipar = this.sgn;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = sci2exp(sgn);
+ exprs = sci2exp(this.sgn);
gr_i = [];
this.x = standard_define([2,3],model,exprs,gr_i);
- return new BasicBlock(this.x);
+ return new Product(this.x);
}
PRODUCT.prototype.details = function PRODUCT() {
return this.x;
@@ -25,30 +25,30 @@ function PRODUCT() {
model = arg1.model;
exprs = graphics.exprs;
while (true) {
- [ok,sgn,exprs] = scicos_getvalue([[" Set multiplication block parameters"],["(multiplication is set with + 1, division with -1)"],[""]],"Number of inputs or sign vector",list("vec",-1),exprs);
+ [ok,this.sgn,exprs] = scicos_getvalue([[" Set multiplication block parameters"],["(multiplication is set with + 1, division with -1)"],[""]],"Number of inputs or sign vector",list("vec",-1),exprs);
if (!ok) {
break;
}
- sgn = sgn.slice();
- if (size(sgn,1)==1) {
- if (sgn<1) {
+ this.sgn = this.sgn.slice();
+ if (size(this.sgn,1)==1) {
+ if (this.sgn<1) {
message("Number of inputs must be > 0");
ok = false;
- } else if (sgn==1) {
+ } else if (this.sgn==1) {
in1 = -1;
- sgn = [];
+ this.sgn = [];
nout = 1;
} else {
- in1 = -ones(sgn,1);
- sgn = ones(sgn,1);
+ in1 = -ones(this.sgn,1);
+ this.sgn = ones(this.sgn,1);
nout = -1;
}
} else {
- if (!and(abs(sgn)==1)) {
+ if (!and(abs(this.sgn)==1)) {
message("Signs can only be +1 or -1");
ok = false;
} else {
- in1 = -ones(size(sgn,1),1);
+ in1 = -ones(size(this.sgn,1),1);
nout = -1;
}
}
@@ -56,13 +56,13 @@ function PRODUCT() {
[model,graphics,ok] = check_io(model,graphics,in1,nout,[],[]);
}
if (ok) {
- model.ipar = sgn;
+ model.ipar = this.sgn;
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
break;
}
}
- return new BasicBlock(this.x);
+ return new Product(this.x);
}
}
diff --git a/js/NonLinear/PRODUCT.pickle b/js/NonLinear/PRODUCT.pickle
index 0d1dde24..1f88411a 100644
--- a/js/NonLinear/PRODUCT.pickle
+++ b/js/NonLinear/PRODUCT.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'sgn'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/NonLinear/QUANT_f.js b/js/NonLinear/QUANT_f.js
index b22f4cc2..d236e32a 100644
--- a/js/NonLinear/QUANT_f.js
+++ b/js/NonLinear/QUANT_f.js
@@ -1,17 +1,17 @@
/* autogenerated from "macros/NonLinear/QUANT_f.sci" */
function QUANT_f() {
QUANT_f.prototype.define = function QUANT_f() {
- pas = 0.1;
- meth = 1;
+ this.pas = 0.1;
+ this.meth = 1;
model = scicos_model();
model.sim = "qzrnd";
model.in1 = -1;
model.out = -1;
- model.rpar = pas;
- model.ipar = meth;
+ model.rpar = this.pas;
+ model.ipar = this.meth;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [[string(pas)],[string(meth)]];
+ exprs = [[string(this.pas)],[string(this.meth)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -27,17 +27,17 @@ function QUANT_f() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,pas,meth,exprs] = scicos_getvalue("Set parameters",[["Step"],["Quantization Type (1-4)"]],list("vec",1,"vec",1),exprs);
+ [ok,this.pas,this.meth,exprs] = scicos_getvalue("Set parameters",[["Step"],["Quantization Type (1-4)"]],list("vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- if (meth<1||meth>4) {
+ if (this.meth<1||this.meth>4) {
message("Quantization Type must be from 1 to 4");
} else {
- rpar = pas;
+ rpar = this.pas;
model.rpar = rpar;
- model.ipar = meth;
- switch (meth) {
+ model.ipar = this.meth;
+ switch (this.meth) {
case 1:
model.sim = "qzrnd";
case 2:
diff --git a/js/NonLinear/QUANT_f.pickle b/js/NonLinear/QUANT_f.pickle
index 0d1dde24..23575aa8 100644
--- a/js/NonLinear/QUANT_f.pickle
+++ b/js/NonLinear/QUANT_f.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'meth'
+p3
+aS'pas'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/NonLinear/SATURATION.js b/js/NonLinear/SATURATION.js
index e760e47d..108584e1 100644
--- a/js/NonLinear/SATURATION.js
+++ b/js/NonLinear/SATURATION.js
@@ -1,9 +1,9 @@
/* autogenerated from "macros/NonLinear/SATURATION.sci" */
function SATURATION() {
SATURATION.prototype.define = function SATURATION() {
- minp = -1;
- maxp = 1;
- rpar = [[maxp],[minp]];
+ this.minp = -1;
+ this.maxp = 1;
+ rpar = [[this.maxp],[this.minp]];
model = scicos_model();
model.sim = list("satur",4);
model.in1 = 1;
@@ -13,7 +13,7 @@ function SATURATION() {
model.rpar = rpar;
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [[string(maxp)],[string(minp)],[string(model.nmode)]];
+ exprs = [[string(this.maxp)],[string(this.minp)],[string(model.nmode)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -29,16 +29,16 @@ function SATURATION() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,maxp,minp,zeroc,exprs] = scicos_getvalue("Set Saturation parameters",[["Upper limit"],["Lower limit"],["zero crossing (0:no, 1:yes)"]],list("vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.maxp,this.minp,this.zeroc,exprs] = scicos_getvalue("Set Saturation parameters",[["Upper limit"],["Lower limit"],["zero crossing (0:no, 1:yes)"]],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- if (maxp<=minp) {
+ if (this.maxp<=this.minp) {
message("Upper limit must be > Lower limit");
} else {
- rpar = [[maxp],[minp]];
+ rpar = [[this.maxp],[this.minp]];
model.rpar = rpar;
- if (zeroc!=0) {
+ if (this.zeroc!=0) {
model.nzcross = 2;
model.nmode = 1;
} else {
diff --git a/js/NonLinear/SATURATION.pickle b/js/NonLinear/SATURATION.pickle
index 0d1dde24..00d3a947 100644
--- a/js/NonLinear/SATURATION.pickle
+++ b/js/NonLinear/SATURATION.pickle
@@ -2,8 +2,14 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'minp'
p2
-atp3
-Rp4
+aS'x'
+p3
+aS'maxp'
+p4
+aS'zeroc'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/NonLinear/SAT_f.js b/js/NonLinear/SAT_f.js
index 8b87bf2b..f422fef7 100644
--- a/js/NonLinear/SAT_f.js
+++ b/js/NonLinear/SAT_f.js
@@ -1,19 +1,19 @@
/* autogenerated from "macros/NonLinear/SAT_f.sci" */
function SAT_f() {
SAT_f.prototype.define = function SAT_f() {
- minp = -1;
- maxp = 1;
+ this.minp = -1;
+ this.maxp = 1;
slope = 1;
- rpar = [[minp],[maxp],[slope]];
+ rpar = [[this.minp],[this.maxp],[slope]];
model = scicos_model();
model.sim = list("lusat",1);
model.in1 = 1;
model.nzcross = 2;
model.out = 1;
- model.rpar = [[minp],[maxp],[slope]];
+ model.rpar = [[this.minp],[this.maxp],[slope]];
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [[string(minp)],[string(maxp)],[string(slope)]];
+ exprs = [[string(this.minp)],[string(this.maxp)],[string(slope)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -29,16 +29,16 @@ function SAT_f() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,minp,maxp,pente,exprs] = scicos_getvalue("Set Saturation parameters",[["Min"],["Max"],["Slope"]],list("vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.minp,this.maxp,this.pente,exprs] = scicos_getvalue("Set Saturation parameters",[["Min"],["Max"],["Slope"]],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- if (maxp<=0) {
+ if (this.maxp<=0) {
message("Max must be strictly positive");
- } else if (pente<=0) {
+ } else if (this.pente<=0) {
message("Slope must be strictly positive");
} else {
- rpar = [[minp/pente],[maxp/pente],[pente]];
+ rpar = [[this.minp/this.pente],[this.maxp/this.pente],[this.pente]];
model.rpar = rpar;
model.firing = [];
graphics.exprs = exprs;
diff --git a/js/NonLinear/SAT_f.pickle b/js/NonLinear/SAT_f.pickle
index 0d1dde24..64c36d44 100644
--- a/js/NonLinear/SAT_f.pickle
+++ b/js/NonLinear/SAT_f.pickle
@@ -2,8 +2,14 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'minp'
p2
-atp3
-Rp4
+aS'x'
+p3
+aS'maxp'
+p4
+aS'pente'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/NonLinear/SIGNUM.js b/js/NonLinear/SIGNUM.js
index cf4dbfa7..2f5e5033 100644
--- a/js/NonLinear/SIGNUM.js
+++ b/js/NonLinear/SIGNUM.js
@@ -26,13 +26,13 @@ function SIGNUM() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,zcr,exprs] = scicos_getvalue("Set block parameters",["use zero_crossing (1: yes) (0:no)"],list("vec",1),exprs);
+ [ok,this.zcr,exprs] = scicos_getvalue("Set block parameters",["use zero_crossing (1: yes) (0:no)"],list("vec",1),exprs);
if (!ok) {
break;
}
graphics.exprs = exprs;
if (ok) {
- if (zcr!=0) {
+ if (this.zcr!=0) {
model.nmode = -1;
model.nzcross = -1;
} else {
diff --git a/js/NonLinear/SIGNUM.pickle b/js/NonLinear/SIGNUM.pickle
index 0d1dde24..4709e48c 100644
--- a/js/NonLinear/SIGNUM.pickle
+++ b/js/NonLinear/SIGNUM.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'zcr'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/NonLinear/TrigFun.js b/js/NonLinear/TrigFun.js
index e7a622a0..fbc3d85f 100644
--- a/js/NonLinear/TrigFun.js
+++ b/js/NonLinear/TrigFun.js
@@ -25,15 +25,15 @@ function TrigFun() {
PREVAR_FF = [["sin"],["cos"],["tan"],["asin"],["acos"],["atan"],["sinh"],["cosh"],["tanh"],["asinh"],["acosh"],["atanh"]];
PREVAR_GG = [["Choose among "+strcat(PREVAR_FF.slice(1-1,4),", ")],[strcat(PREVAR_FF.slice(5-1,$),", ")]];
while (true) {
- [ok,fun,exprs] = scicos_getvalue(PREVAR_GG,"Function",list("str",1),exprs);
+ [ok,this.fun,exprs] = scicos_getvalue(PREVAR_GG,"Function",list("str",1),exprs);
if (!ok) {
break;
}
- if (find(PREVAR_FF==fun)==[]) {
- message("Sorry but "+fun+" is not in the list!");
+ if (find(PREVAR_FF==this.fun)==[]) {
+ message("Sorry but "+this.fun+" is not in the list!");
} else {
graphics.exprs = exprs;
- execstr("model.sim=list(\'"+fun+"_blk\',4)");
+ execstr("model.sim=list(\'"+this.fun+"_blk\',4)");
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/NonLinear/TrigFun.pickle b/js/NonLinear/TrigFun.pickle
index 0d1dde24..b2a190a2 100644
--- a/js/NonLinear/TrigFun.pickle
+++ b/js/NonLinear/TrigFun.pickle
@@ -2,8 +2,10 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'fun'
p2
-atp3
-Rp4
+aS'x'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/PDE/PDE.js b/js/PDE/PDE.js
index dfba5807..4ddc1bc2 100644
--- a/js/PDE/PDE.js
+++ b/js/PDE/PDE.js
@@ -37,18 +37,18 @@ function PDE() {
[ok,a_domaine,b_domaine,discr,signe,choix,type_meth,degre,Nbr_maillage,CI,CI1,CLa_type,CLa_exp,CLb_type,CLb_exp,oper,a1,b1,a2,b2,a3,b3,a4,b4,a5,b5,a6,b6,a7,b7,k,mesures,params_pde] = setvalue_IHM_EDP(params_pde);
}
}
- okk = false;
- rdnom = "PDE";
+ this.okk = false;
+ this.rdnom = "PDE";
ok1 = true;
while (true) {
- [okk,rdnom,lab] = scicos_getvalue("PLEASE, GIVE US THE BLOCK\'s NAME. ","New block\'s name :",list("str",1),label[3-1]);
- if (okk==false) {
+ [this.okk,this.rdnom,this.lab] = scicos_getvalue("PLEASE, GIVE US THE BLOCK\'s NAME. ","New block\'s name :",list("str",1),label[3-1]);
+ if (this.okk==false) {
ok1 = false;
return;
}
- label[3-1] = lab;
- rdnom = stripblanks(rdnom);
- if (rdnom==emptystr()) {
+ label[3-1] = this.lab;
+ this.rdnom = stripblanks(this.rdnom);
+ if (this.rdnom==emptystr()) {
ok1 = false;
x_message("sorry C file name not defined");
}
@@ -79,7 +79,7 @@ function PDE() {
}
type_meth = this.arbre_decision[delta-1];
}
- [flag_type,rdnom,DF_type,tt] = translate(CI,CI1,CLa_type,CLa_exp,CLb_type,CLb_exp,oper,type_meth,degre,a_domaine,b_domaine,Nbr_maillage,a1,b1,a2,b2,a3,b3,a4,b4,a5,b5,a6,b6,a7,b7,rdnom,mesures);
+ [flag_type,this.rdnom,DF_type,tt] = translate(CI,CI1,CLa_type,CLa_exp,CLb_type,CLb_exp,oper,type_meth,degre,a_domaine,b_domaine,Nbr_maillage,a1,b1,a2,b2,a3,b3,a4,b4,a5,b5,a6,b6,a7,b7,this.rdnom,mesures);
Nbr = Nbr_maillage;
if (((CLa_type==1)&&(DF_type==0||DF_type==1))||((CLb_type==1)&&(DF_type==0||DF_type==2))) {
Nbr = Nbr+1;
@@ -90,14 +90,14 @@ function PDE() {
out = [[Nbr_maillage],[size(mesures,"*")]];
}
if ((flag_type==1)) {
- model.sim = list(rdnom,2004);
+ model.sim = list(this.rdnom,2004);
if ((find(oper==1)!=[])) {
model.state = zeros(2*Nbr_maillage,1);
} else {
model.state = zeros(Nbr_maillage,1);
}
} else if ((flag_type==2)) {
- model.sim = list(rdnom,12004);
+ model.sim = list(this.rdnom,12004);
if ((find(oper==1)!=[])) {
if ((type_meth==3&&(find(oper==2)!=[]||find(oper==4)!=[]))) {
model.state = zeros(6*Nbr_maillage,1);
@@ -116,7 +116,7 @@ function PDE() {
}
}
}
- [ok1] = CFORTREDP(rdnom,tt);
+ [ok1] = CFORTREDP(this.rdnom,tt);
if (!ok1) {
break;
}
diff --git a/js/PDE/PDE.pickle b/js/PDE/PDE.pickle
index 4ca94fdd..da7cb64f 100644
--- a/js/PDE/PDE.pickle
+++ b/js/PDE/PDE.pickle
@@ -4,8 +4,14 @@ p0
((lp1
S'x'
p2
-aS'arbre_decision'
+aS'okk'
p3
-atp4
-Rp5
+aS'rdnom'
+p4
+aS'lab'
+p5
+aS'arbre_decision'
+p6
+atp7
+Rp8
. \ No newline at end of file
diff --git a/js/Sinks/AFFICH_m.js b/js/Sinks/AFFICH_m.js
index 509db8be..094da4c1 100644
--- a/js/Sinks/AFFICH_m.js
+++ b/js/Sinks/AFFICH_m.js
@@ -1,27 +1,27 @@
/* autogenerated from "macros/Sinks/AFFICH_m.sci" */
function AFFICH_m() {
AFFICH_m.prototype.define = function AFFICH_m() {
- font = 1;
- fontsize = 1;
- colr = 1;
- nt = 5;
- nd = 1;
- in1 = [1,1];
+ this.font = 1;
+ this.fontsize = 1;
+ this.colr = 1;
+ this.nt = 5;
+ this.nd = 1;
+ this.in1 = [1,1];
model = scicos_model();
model.sim = list("affich2",4);
- model.in1 = in1[1-1][1-1];
- model.in2 = in1[1-1][2-1];
+ model.in1 = this.in1[1-1][1-1];
+ model.in2 = this.in1[1-1][2-1];
model.evtin = 1;
- model.dstate = [[-1],[0],[0],[1],[1],[0],[zeros(in1[1-1][1-1]*in1[1-1][2-1],1)]];
- model.ipar = [[font],[fontsize],[colr],[1000],[nt],[nd],[in1[1-1][1-1]]];
+ model.dstate = [[-1],[0],[0],[1],[1],[0],[zeros(this.in1[1-1][1-1]*this.in1[1-1][2-1],1)]];
+ model.ipar = [[this.font],[this.fontsize],[this.colr],[1000],[this.nt],[this.nd],[this.in1[1-1][1-1]]];
model.blocktype = "c";
model.firing = [];
model.dep_ut = [true,false];
model.label = "";
- exprs = [[sci2exp([model.in1,model.in2])],[string(font)],[string(fontsize)],[string(colr)],[string(nt)],[string(nd)],[string(0)]];
+ exprs = [[sci2exp([model.in1,model.in2])],[string(this.font)],[string(this.fontsize)],[string(this.colr)],[string(this.nt)],[string(this.nd)],[string(0)]];
gr_i = [];
this.x = standard_define([3,2],model,exprs,gr_i);
- return new BasicBlock(this.x);
+ return new AfficheBlock(this.x);
}
AFFICH_m.prototype.details = function AFFICH_m() {
return this.x;
@@ -34,31 +34,31 @@ function AFFICH_m() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,in1,font,fontsize,colr,nt,nd,herit,exprs] = scicos_getvalue("Set parameters",[["Input Size","Font number"],["Font size"],["Color"],["Total number of digits"],["Number of rational part digits"],["Block inherits (1) or not (0)"]],list("mat",[1,2],"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.in1,this.font,this.fontsize,this.colr,this.nt,this.nd,this.herit,exprs] = scicos_getvalue("Set parameters",[["Input Size","Font number"],["Font size"],["Color"],["Total number of digits"],["Number of rational part digits"],["Block inherits (1) or not (0)"]],list("mat",[1,2],"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
mess = [];
- if (font<=0) {
+ if (this.font<=0) {
mess = [[mess],["Font number must be positive"],[" "]];
ok = false;
}
- if (fontsize<=0) {
+ if (this.fontsize<=0) {
mess = [[mess],["Font size must be positive"],[" "]];
ok = false;
}
- if (nt<=3) {
+ if (this.nt<=3) {
mess = [[mess],["Total number of digits must be greater than 3"],[" "]];
ok = false;
}
- if (nd<0) {
+ if (this.nd<0) {
mess = [[mess],["Number of rational part digits must be ","greater or equal 0"],[" "]];
ok = false;
}
if (!ok) {
message([["Some specified values are inconsistent:"],[" "],[mess]]);
}
- if (!or(herit==[0,1])) {
+ if (!or(this.herit==[0,1])) {
mess = [[mess],["Accept inherited values are 0 and 1"],[" "]];
ok = false;
}
@@ -66,18 +66,18 @@ function AFFICH_m() {
message([["Some specified values are inconsistent:"],[" "],[mess]]);
}
if (ok) {
- [model,graphics,ok] = set_io(model,graphics,list(in1,1),list(),ones(1-herit,1),[]);
+ [model,graphics,ok] = set_io(model,graphics,list(this.in1,1),list(),ones(1-this.herit,1),[]);
}
if (ok) {
- model.ipar = [[font],[fontsize],[colr],[nt],[nd],[in1[1-1][1-1]]];
- model.dstate = [[-1],[0],[0],[1],[1],[0],[zeros(in1[1-1][1-1]*in1[1-1][2-1],1)]];
- model.evtin = ones(1-herit,1);
+ model.ipar = [[this.font],[this.fontsize],[this.colr],[this.nt],[this.nd],[this.in1[1-1][1-1]]];
+ model.dstate = [[-1],[0],[0],[1],[1],[0],[zeros(this.in1[1-1][1-1]*this.in1[1-1][2-1],1)]];
+ model.evtin = ones(1-this.herit,1);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
break;
}
}
- return new BasicBlock(this.x);
+ return new AfficheBlock(this.x);
}
}
diff --git a/js/Sinks/AFFICH_m.pickle b/js/Sinks/AFFICH_m.pickle
index 0d1dde24..7e2f574c 100644
--- a/js/Sinks/AFFICH_m.pickle
+++ b/js/Sinks/AFFICH_m.pickle
@@ -2,8 +2,22 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'herit'
p2
-atp3
-Rp4
+aS'nd'
+p3
+aS'colr'
+p4
+aS'in1'
+p5
+aS'fontsize'
+p6
+aS'x'
+p7
+aS'font'
+p8
+aS'nt'
+p9
+atp10
+Rp11
. \ No newline at end of file
diff --git a/js/Sinks/BARXY.js b/js/Sinks/BARXY.js
index 4ef60a20..e932c6a1 100644
--- a/js/Sinks/BARXY.js
+++ b/js/Sinks/BARXY.js
@@ -2,10 +2,10 @@
function BARXY() {
BARXY.prototype.define = function BARXY() {
model = scicos_model();
- xmin = -15;
- xmax = 15;
- ymin = -15;
- ymax = 15;
+ this.xmin = -15;
+ this.xmax = 15;
+ this.ymin = -15;
+ this.ymax = 15;
model.sim = list("BARXY_sim",5);
model.blocktype = "d";
model.dep_ut = [true,false];
@@ -13,7 +13,7 @@ function BARXY() {
model.intyp = [1];
model.out = [];
model.evtin = [1];
- model.rpar = [[xmin],[xmax],[ymin],[ymax]];
+ model.rpar = [[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
model.ipar = 1;
this.x = standard_define([2,2],model,[],[]);
this.x.graphics.in_implicit = ["E","E"];
@@ -32,28 +32,28 @@ function BARXY() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,xmin,xmax,ymin,ymax,thickness,exprs] = scicos_getvalue("Set Scope parameters",[["Xmin"],["Xmax"],["Ymin"],["Ymax"],["Segs Thickness"]],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.xmin,this.xmax,this.ymin,this.ymax,this.thickness,exprs] = scicos_getvalue("Set Scope parameters",[["Xmin"],["Xmax"],["Ymin"],["Ymax"],["Segs Thickness"]],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
mess = [];
- if (ymin>=ymax) {
+ if (this.ymin>=this.ymax) {
mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
ok = false;
}
- if (xmin>=xmax) {
+ if (this.xmin>=this.xmax) {
mess = [[mess],["Xmax must be greater than Xmin"],[" "]];
ok = false;
}
- if (thickness<=0) {
+ if (this.thickness<=0) {
mess = [[mess],["Thickness must be strictly positive."]];
ok = false;
}
if (!ok) {
message(mess);
} else {
- model.rpar = [[xmin],[xmax],[ymin],[ymax]];
- model.ipar = thickness;
+ model.rpar = [[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
+ model.ipar = this.thickness;
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Sinks/BARXY.pickle b/js/Sinks/BARXY.pickle
index 0d1dde24..a233ad1e 100644
--- a/js/Sinks/BARXY.pickle
+++ b/js/Sinks/BARXY.pickle
@@ -2,8 +2,18 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'ymax'
p2
-atp3
-Rp4
+aS'thickness'
+p3
+aS'xmax'
+p4
+aS'xmin'
+p5
+aS'x'
+p6
+aS'ymin'
+p7
+atp8
+Rp9
. \ No newline at end of file
diff --git a/js/Sinks/CANIMXY.js b/js/Sinks/CANIMXY.js
index 9313c826..cd972516 100644
--- a/js/Sinks/CANIMXY.js
+++ b/js/Sinks/CANIMXY.js
@@ -1,29 +1,29 @@
/* autogenerated from "macros/Sinks/CANIMXY.sci" */
function CANIMXY() {
CANIMXY.prototype.define = function CANIMXY() {
- win = -1;
- clrs = -4;
- N = 2;
- siz = 1;
- wpos = [[-1],[-1]];
- wdim = [[-1],[-1]];
- xmin = -15;
- xmax = 15;
- ymin = -15;
- ymax = +15;
- nbr_curves = 1;
+ this.win = -1;
+ this.clrs = -4;
+ this.N = 2;
+ this.siz = 1;
+ this.wpos = [[-1],[-1]];
+ this.wdim = [[-1],[-1]];
+ this.xmin = -15;
+ this.xmax = 15;
+ this.ymin = -15;
+ this.ymax = +15;
+ this.nbr_curves = 1;
model = scicos_model();
model.sim = list("canimxy",4);
model.in1 = [[1],[1]];
model.in2 = [[1],[1]];
model.intyp = [[1],[1]];
model.evtin = 1;
- model.rpar = [[xmin],[xmax],[ymin],[ymax]];
- model.ipar = [[win],[1],[N],[clrs],[siz],[0],[wpos.slice()],[wdim.slice()],[nbr_curves]];
+ model.rpar = [[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
+ model.ipar = [[this.win],[1],[this.N],[this.clrs],[this.siz],[0],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]];
model.blocktype = "d";
model.firing = [];
model.dep_ut = [false,false];
- exprs = [[string(nbr_curves)],[string(clrs)],[string(siz)],[string(win)],["[]"],["[]"],[string(xmin)],[string(xmax)],[string(ymin)],[string(ymax)],[string(N)]];
+ exprs = [[string(this.nbr_curves)],[string(this.clrs)],[string(this.siz)],[string(this.win)],["[]"],["[]"],[string(this.xmin)],[string(this.xmax)],[string(this.ymin)],[string(this.ymax)],[string(this.N)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -39,57 +39,57 @@ function CANIMXY() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,nbr_curves,clrs,siz,win,wpos,wdim,xmin,xmax,ymin,ymax,N,exprs] = scicos_getvalue("Set Scope parameters",[["Number of Curves"],["color (>0) or mark (<0)"],["line or mark size"],["Output window number (-1 for automatic)"],["Output window position"],["Output window sizes"],["Xmin"],["Xmax"],["Ymin"],["Ymax"],["Buffer size"]],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",-1,"vec",-1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.nbr_curves,this.clrs,this.siz,this.win,this.wpos,this.wdim,this.xmin,this.xmax,this.ymin,this.ymax,this.N,exprs] = scicos_getvalue("Set Scope parameters",[["Number of Curves"],["color (>0) or mark (<0)"],["line or mark size"],["Output window number (-1 for automatic)"],["Output window position"],["Output window sizes"],["Xmin"],["Xmax"],["Ymin"],["Ymax"],["Buffer size"]],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",-1,"vec",-1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
mess = [];
- if (size(wpos,"*")!=0&&size(wpos,"*")!=2) {
+ if (size(this.wpos,"*")!=0&&size(this.wpos,"*")!=2) {
mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
ok = false;
}
- if (size(wdim,"*")!=0&&size(wdim,"*")!=2) {
+ if (size(this.wdim,"*")!=0&&size(this.wdim,"*")!=2) {
mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
ok = false;
}
- if (win<-1) {
+ if (this.win<-1) {
mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
ok = false;
}
- if (nbr_curves<=0) {
+ if (this.nbr_curves<=0) {
mess = [[mess],["Number of curves cannot be negative or null"],[" "]];
ok = false;
}
- if (N<1) {
+ if (this.N<1) {
mess = [[mess],["Buffer size must be at least 1"],[" "]];
ok = false;
}
- if (N==1&&clrs>0) {
+ if (this.N==1&&this.clrs>0) {
mess = [[mess],["Buffer size must be at least 2"],[" "]];
ok = false;
}
- if (ymin>=ymax) {
+ if (this.ymin>=this.ymax) {
mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
ok = false;
}
- if (xmin>=xmax) {
+ if (this.xmin>=this.xmax) {
mess = [[mess],["Xmax must be greater than Xmin"],[" "]];
ok = false;
}
if (!ok) {
message(mess);
} else {
- in1 = nbr_curves*ones(2,1);
+ in1 = this.nbr_curves*ones(2,1);
in2 = ones(2,1);
[model,graphics,ok] = set_io(model,graphics,list([in1,in2],ones(2,1)),list(),ones(1,1),[]);
- if (wpos==[]) {
- wpos = [[-1],[-1]];
+ if (this.wpos==[]) {
+ this.wpos = [[-1],[-1]];
}
- if (wdim==[]) {
- wdim = [[-1],[-1]];
+ if (this.wdim==[]) {
+ this.wdim = [[-1],[-1]];
}
- rpar = [[xmin],[xmax],[ymin],[ymax]];
- ipar = [[win],[1],[N],[clrs],[siz],[0],[wpos.slice()],[wdim.slice()],[nbr_curves]];
+ rpar = [[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
+ ipar = [[this.win],[1],[this.N],[this.clrs],[this.siz],[0],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]];
model.rpar = rpar;
model.ipar = ipar;
graphics.exprs = exprs;
diff --git a/js/Sinks/CANIMXY.pickle b/js/Sinks/CANIMXY.pickle
index 0d1dde24..a365a644 100644
--- a/js/Sinks/CANIMXY.pickle
+++ b/js/Sinks/CANIMXY.pickle
@@ -2,8 +2,30 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'clrs'
p2
-atp3
-Rp4
+aS'ymin'
+p3
+aS'ymax'
+p4
+aS'wpos'
+p5
+aS'win'
+p6
+aS'wdim'
+p7
+aS'N'
+p8
+aS'xmax'
+p9
+aS'siz'
+p10
+aS'xmin'
+p11
+aS'x'
+p12
+aS'nbr_curves'
+p13
+atp14
+Rp15
. \ No newline at end of file
diff --git a/js/Sinks/CANIMXY3D.js b/js/Sinks/CANIMXY3D.js
index d382af70..86dba457 100644
--- a/js/Sinks/CANIMXY3D.js
+++ b/js/Sinks/CANIMXY3D.js
@@ -1,29 +1,29 @@
/* autogenerated from "macros/Sinks/CANIMXY3D.sci" */
function CANIMXY3D() {
CANIMXY3D.prototype.define = function CANIMXY3D() {
- win = -1;
- N = 2;
- clrs = [[1],[2],[3],[4],[5],[6],[7],[13]];
- siz = [[1],[1],[1],[1],[1],[1],[1],[1]];
- wpos = [[-1],[-1]];
- wdim = [[-1],[-1]];
- param3ds = [[50],[280]];
- vec_x = [[-15],[15]];
- vec_y = [[-15],[15]];
- vec_z = [[-15],[15]];
- nbr_curves = 1;
+ this.win = -1;
+ this.N = 2;
+ this.clrs = [[1],[2],[3],[4],[5],[6],[7],[13]];
+ this.siz = [[1],[1],[1],[1],[1],[1],[1],[1]];
+ this.wpos = [[-1],[-1]];
+ this.wdim = [[-1],[-1]];
+ this.param3ds = [[50],[280]];
+ this.vec_x = [[-15],[15]];
+ this.vec_y = [[-15],[15]];
+ this.vec_z = [[-15],[15]];
+ this.nbr_curves = 1;
model = scicos_model();
model.sim = list("canimxy3d",4);
model.in1 = [[1],[1],[1]];
model.evtin = 1;
model.in2 = [[1],[1],[1]];
model.intyp = [[1],[1],[1]];
- model.rpar = [[vec_x.slice()],[vec_y.slice()],[vec_z.slice()],[param3ds.slice()]];
- model.ipar = [[win],[8],[N],[clrs.slice()],[siz.slice()],[8],[wpos.slice()],[wdim.slice()],[nbr_curves]];
+ model.rpar = [[this.vec_x.slice()],[this.vec_y.slice()],[this.vec_z.slice()],[this.param3ds.slice()]];
+ model.ipar = [[this.win],[8],[this.N],[this.clrs.slice()],[this.siz.slice()],[8],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]];
model.blocktype = "d";
model.firing = [];
model.dep_ut = [false,false];
- exprs = [[string(nbr_curves)],[strcat(string(clrs)," ")],[strcat(string(siz)," ")],[string(win)],["[]"],["[]"],[strcat(string(vec_x)," ")],[strcat(string(vec_y)," ")],[strcat(string(vec_z)," ")],[strcat(string(param3ds)," ")],[string(N)]];
+ exprs = [[string(this.nbr_curves)],[strcat(string(this.clrs)," ")],[strcat(string(this.siz)," ")],[string(this.win)],["[]"],["[]"],[strcat(string(this.vec_x)," ")],[strcat(string(this.vec_y)," ")],[strcat(string(this.vec_z)," ")],[strcat(string(this.param3ds)," ")],[string(this.N)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -39,74 +39,74 @@ function CANIMXY3D() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,nbr_curves,clrs,siz,win,wpos,wdim,vec_x,vec_y,vec_z,param3ds,N,exprs] = scicos_getvalue("Set Scope parameters",[["Number of curves"],["color (>0) or mark (<0)"],["line or mark size"],["Output window number (-1 for automatic)"],["Output window position"],["Output window sizes"],["Xmin and Xmax"],["Ymin and Ymax"],["Zmin and Zmax"],["Alpha and Theta"],["Buffer size"]],list("vec",1,"vec",-1,"vec",-1,"vec",1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",1),exprs);
+ [ok,this.nbr_curves,this.clrs,this.siz,this.win,this.wpos,this.wdim,this.vec_x,this.vec_y,this.vec_z,this.param3ds,this.N,exprs] = scicos_getvalue("Set Scope parameters",[["Number of curves"],["color (>0) or mark (<0)"],["line or mark size"],["Output window number (-1 for automatic)"],["Output window position"],["Output window sizes"],["Xmin and Xmax"],["Ymin and Ymax"],["Zmin and Zmax"],["Alpha and Theta"],["Buffer size"]],list("vec",1,"vec",-1,"vec",-1,"vec",1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",1),exprs);
if (!ok) {
break;
}
mess = [];
- if (size(wpos,"*")!=0&&size(wpos,"*")!=2) {
+ if (size(this.wpos,"*")!=0&&size(this.wpos,"*")!=2) {
mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
ok = false;
}
- if (size(wdim,"*")!=0&&size(wdim,"*")!=2) {
+ if (size(this.wdim,"*")!=0&&size(this.wdim,"*")!=2) {
mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
ok = false;
}
- if (win<-1) {
+ if (this.win<-1) {
mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
ok = false;
}
- if (size(clrs,"*")!=size(siz,"*")) {
+ if (size(this.clrs,"*")!=size(this.siz,"*")) {
mess = [[mess],["Colors and Size must have same size"],[" "]];
ok = false;
}
- if (nbr_curves<=0) {
+ if (this.nbr_curves<=0) {
mess = [[mess],["Number of curves cannot be negative or null"],[" "]];
ok = false;
}
- if (size(clrs,"*")<nbr_curves) {
+ if (size(this.clrs,"*")<this.nbr_curves) {
mess = [[mess],["You must have at least same size for clrs and the number of curves"],[" "]];
ok = false;
}
- if (N<1) {
+ if (this.N<1) {
mess = [[mess],["Buffer size must be at least 1"],[" "]];
ok = false;
}
- if (N<2) {
- for (i=1;i<=nbr_curves;i+=1) {
- if (clrs[i-1]>0) {
+ if (this.N<2) {
+ for (i=1;i<=this.nbr_curves;i+=1) {
+ if (this.clrs[i-1]>0) {
mess = [[mess],["Buffer size must be at least 2 or Change a color (must be <0)"],[" "]];
ok = false;
}
}
}
- if (vec_y[1-1]>=vec_y[2-1]) {
+ if (this.vec_y[1-1]>=this.vec_y[2-1]) {
mess = [[mess],["Ymax must be higher than Ymin"],[" "]];
ok = false;
}
- if (vec_x[1-1]>=vec_x[2-1]) {
+ if (this.vec_x[1-1]>=this.vec_x[2-1]) {
mess = [[mess],["Xmax must be higher than Xmin"],[" "]];
ok = false;
}
- if (vec_z[1-1]>=vec_z[2-1]) {
+ if (this.vec_z[1-1]>=this.vec_z[2-1]) {
mess = [[mess],["Zmax must be higher than Zmin"],[" "]];
ok = false;
}
if (!ok) {
message(mess);
} else {
- in1 = nbr_curves*ones(3,1);
+ in1 = this.nbr_curves*ones(3,1);
in2 = ones(3,1);
[model,graphics,ok] = set_io(model,graphics,list([in1,in2],ones(3,1)),list(),ones(1,1),[]);
- if (wpos==[]) {
- wpos = [[-1],[-1]];
+ if (this.wpos==[]) {
+ this.wpos = [[-1],[-1]];
}
- if (wdim==[]) {
- wdim = [[-1],[-1]];
+ if (this.wdim==[]) {
+ this.wdim = [[-1],[-1]];
}
- rpar = [[vec_x.slice()],[vec_y.slice()],[vec_z.slice()],[param3ds.slice()]];
- size_siz = size(siz,"*");
- ipar = [[win],[size_siz],[N],[clrs.slice()],[siz.slice()],[1],[wpos.slice()],[wdim.slice()],[nbr_curves]];
+ rpar = [[this.vec_x.slice()],[this.vec_y.slice()],[this.vec_z.slice()],[this.param3ds.slice()]];
+ size_siz = size(this.siz,"*");
+ ipar = [[this.win],[size_siz],[this.N],[this.clrs.slice()],[this.siz.slice()],[1],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]];
model.rpar = rpar;
model.ipar = ipar;
graphics.exprs = exprs;
diff --git a/js/Sinks/CANIMXY3D.pickle b/js/Sinks/CANIMXY3D.pickle
index 0d1dde24..410ab478 100644
--- a/js/Sinks/CANIMXY3D.pickle
+++ b/js/Sinks/CANIMXY3D.pickle
@@ -2,8 +2,30 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'clrs'
p2
-atp3
-Rp4
+aS'vec_y'
+p3
+aS'wpos'
+p4
+aS'vec_z'
+p5
+aS'win'
+p6
+aS'vec_x'
+p7
+aS'wdim'
+p8
+aS'param3ds'
+p9
+aS'N'
+p10
+aS'siz'
+p11
+aS'x'
+p12
+aS'nbr_curves'
+p13
+atp14
+Rp15
. \ No newline at end of file
diff --git a/js/Sinks/CEVENTSCOPE.js b/js/Sinks/CEVENTSCOPE.js
index 91f4758d..9adb4f6f 100644
--- a/js/Sinks/CEVENTSCOPE.js
+++ b/js/Sinks/CEVENTSCOPE.js
@@ -1,20 +1,20 @@
/* autogenerated from "macros/Sinks/CEVENTSCOPE.sci" */
function CEVENTSCOPE() {
CEVENTSCOPE.prototype.define = function CEVENTSCOPE() {
- nclock = 1;
- win = -1;
- clrs = [[1],[3],[5],[7],[9],[11],[13],[15]];
- wdim = [[600],[400]];
- wpos = [[-1],[-1]];
- per = 30;
+ this.nclock = 1;
+ this.win = -1;
+ this.clrs = [[1],[3],[5],[7],[9],[11],[13],[15]];
+ this.wdim = [[600],[400]];
+ this.wpos = [[-1],[-1]];
+ this.per = 30;
model = scicos_model();
model.sim = list("cevscpe",4);
model.evtin = 1;
- model.rpar = per;
- model.ipar = [[win],[1],[clrs[nclock-1]],[wpos.slice()],[wdim.slice()]];
+ model.rpar = this.per;
+ model.ipar = [[this.win],[1],[this.clrs[this.nclock-1]],[this.wpos.slice()],[this.wdim.slice()]];
model.blocktype = "d";
model.dep_ut = [false,false];
- exprs = [[sci2exp(nclock)],[strcat(sci2exp(clrs[nclock-1])," ")],[string(win)],[sci2exp([])],[sci2exp(wdim)],[string(per)]];
+ exprs = [[sci2exp(this.nclock)],[strcat(sci2exp(this.clrs[this.nclock-1])," ")],[string(this.win)],[sci2exp([])],[sci2exp(this.wdim)],[string(this.per)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -30,52 +30,52 @@ function CEVENTSCOPE() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,nclock,clrs,win,wpos,wdim,per,exprs] = scicos_getvalue("Set Scope parameters",[["Number of event inputs"],["colors c (>0) or mark (<0)"],["Output window number (-1 for automatic)"],["Output window position"],["Output window sizes"],["Refresh period"]],list("vec",1,"vec",-1,"vec",1,"vec",-1,"vec",-1,"vec",1),exprs);
- nclock = int(nclock);
- clrs = int(clrs);
- win = int(win);
+ [ok,this.nclock,this.clrs,this.win,this.wpos,this.wdim,this.per,exprs] = scicos_getvalue("Set Scope parameters",[["Number of event inputs"],["colors c (>0) or mark (<0)"],["Output window number (-1 for automatic)"],["Output window position"],["Output window sizes"],["Refresh period"]],list("vec",1,"vec",-1,"vec",1,"vec",-1,"vec",-1,"vec",1),exprs);
+ this.nclock = int(this.nclock);
+ this.clrs = int(this.clrs);
+ this.win = int(this.win);
if (!ok) {
break;
}
mess = [];
- if (size(wpos,"*")!=0&&size(wpos,"*")!=2) {
+ if (size(this.wpos,"*")!=0&&size(this.wpos,"*")!=2) {
mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
ok = false;
}
- if (size(wdim,"*")!=0&&size(wdim,"*")!=2) {
+ if (size(this.wdim,"*")!=0&&size(this.wdim,"*")!=2) {
mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
ok = false;
}
- if (nclock<=0) {
+ if (this.nclock<=0) {
mess = [[mess],["Block must have at least one input event"],[" "]];
ok = false;
}
- if (size(clrs,"*")!=nclock) {
+ if (size(this.clrs,"*")!=this.nclock) {
mess = [[mess],["Inputs color c size must be equal to Number of inputs"],[" "]];
ok = false;
}
- if (win<-1) {
+ if (this.win<-1) {
mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
ok = false;
}
- if (per<=0) {
+ if (this.per<=0) {
mess = [[mess],["Refresh period must be positive"],[" "]];
ok = false;
}
if (ok) {
- [model,graphics,ok] = set_io(model,graphics,list(),list(),ones(nclock,1),[]);
+ [model,graphics,ok] = set_io(model,graphics,list(),list(),ones(this.nclock,1),[]);
} else {
message([["Some specified values are inconsistent:"],[" "],[mess]]);
}
if (ok) {
- if (wpos==[]) {
- wpos = [[-1],[-1]];
+ if (this.wpos==[]) {
+ this.wpos = [[-1],[-1]];
}
- if (wdim==[]) {
- wdim = [[-1],[-1]];
+ if (this.wdim==[]) {
+ this.wdim = [[-1],[-1]];
}
- rpar = per;
- ipar = [[win],[1],[clrs.slice()],[wpos.slice()],[wdim.slice()]];
+ rpar = this.per;
+ ipar = [[this.win],[1],[this.clrs.slice()],[this.wpos.slice()],[this.wdim.slice()]];
model.rpar = rpar;
model.ipar = ipar;
graphics.exprs = exprs;
diff --git a/js/Sinks/CEVENTSCOPE.pickle b/js/Sinks/CEVENTSCOPE.pickle
index 0d1dde24..18ac5c07 100644
--- a/js/Sinks/CEVENTSCOPE.pickle
+++ b/js/Sinks/CEVENTSCOPE.pickle
@@ -2,8 +2,20 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'clrs'
p2
-atp3
-Rp4
+aS'wpos'
+p3
+aS'win'
+p4
+aS'per'
+p5
+aS'wdim'
+p6
+aS'x'
+p7
+aS'nclock'
+p8
+atp9
+Rp10
. \ No newline at end of file
diff --git a/js/Sinks/CFSCOPE.js b/js/Sinks/CFSCOPE.js
index 9a11f6eb..bc828b73 100644
--- a/js/Sinks/CFSCOPE.js
+++ b/js/Sinks/CFSCOPE.js
@@ -1,22 +1,22 @@
/* autogenerated from "macros/Sinks/CFSCOPE.sci" */
function CFSCOPE() {
CFSCOPE.prototype.define = function CFSCOPE() {
- win = -1;
- wdim = [[600],[400]];
- wpos = [[-1],[-1]];
- clrs = [[1],[3],[5],[7],[9],[11],[13],[15]];
- N = 2;
- ymin = -15;
- ymax = +15;
- per = 30;
+ this.win = -1;
+ this.wdim = [[600],[400]];
+ this.wpos = [[-1],[-1]];
+ this.clrs = [[1],[3],[5],[7],[9],[11],[13],[15]];
+ this.N = 2;
+ this.ymin = -15;
+ this.ymax = +15;
+ this.per = 30;
model = scicos_model();
model.sim = list("cfscope",4);
model.evtin = 1;
- model.rpar = [[0],[ymin],[ymax],[per]];
- model.ipar = [[win],[1],[N],[clrs],[wpos],[wdim],[1],[1]];
+ model.rpar = [[0],[this.ymin],[this.ymax],[this.per]];
+ model.ipar = [[this.win],[1],[this.N],[this.clrs],[this.wpos],[this.wdim],[1],[1]];
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [[strcat(string(clrs)," ")],[string(win)],[sci2exp([])],[sci2exp(wdim)],[string(ymin)],[string(ymax)],[string(per)],[string(N)],[string([1])]];
+ exprs = [[strcat(string(this.clrs)," ")],[string(this.win)],[sci2exp([])],[sci2exp(this.wdim)],[string(this.ymin)],[string(this.ymax)],[string(this.per)],[string(this.N)],[string([1])]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -32,36 +32,36 @@ function CFSCOPE() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,clrs,win,wpos,wdim,ymin,ymax,per,N,wu,exprs] = scicos_getvalue("Set Scope parameters",[["Color (>0) or mark (<0) vector (8 entries)"],["Output window number (-1 for automatic)"],["Output window position"],["Output window sizes"],["Ymin"],["Ymax"],["Refresh period"],["Buffer size","Links to view"]],list("vec",8,"vec",1,"vec",-1,"vec",-1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",-1),exprs);
+ [ok,this.clrs,this.win,this.wpos,this.wdim,this.ymin,this.ymax,this.per,this.N,this.wu,exprs] = scicos_getvalue("Set Scope parameters",[["Color (>0) or mark (<0) vector (8 entries)"],["Output window number (-1 for automatic)"],["Output window position"],["Output window sizes"],["Ymin"],["Ymax"],["Refresh period"],["Buffer size","Links to view"]],list("vec",8,"vec",1,"vec",-1,"vec",-1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",-1),exprs);
if (!ok) {
break;
}
mess = [];
- if (size(wpos,"*")!=0&&size(wpos,"*")!=2) {
+ if (size(this.wpos,"*")!=0&&size(this.wpos,"*")!=2) {
mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
ok = false;
}
- if (size(wdim,"*")!=0&&size(wdim,"*")!=2) {
+ if (size(this.wdim,"*")!=0&&size(this.wdim,"*")!=2) {
mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
ok = false;
}
- if (win<-1) {
+ if (this.win<-1) {
mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
ok = false;
}
- if (per<=0) {
+ if (this.per<=0) {
mess = [[mess],["Refresh period must be positive"],[" "]];
ok = false;
}
- if (N<2) {
+ if (this.N<2) {
mess = [[mess],["Buffer size must be at least 2"],[" "]];
ok = false;
}
- if (ymin>=ymax) {
+ if (this.ymin>=this.ymax) {
mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
ok = false;
}
- if (wu<0) {
+ if (this.wu<0) {
mess = [[mess],["Link to view must be positive"],[" "]];
ok = false;
}
@@ -69,20 +69,20 @@ function CFSCOPE() {
message([["Some specified values are inconsistent:"],[" "],[mess]]);
}
if (ok) {
- if (wpos==[]) {
- wpos = [[-1],[-1]];
+ if (this.wpos==[]) {
+ this.wpos = [[-1],[-1]];
}
- if (wdim==[]) {
- wdim = [[-1],[-1]];
+ if (this.wdim==[]) {
+ this.wdim = [[-1],[-1]];
}
- rpar = [[0],[ymin],[ymax],[per]];
- if (size(clrs,"*")>8) {
- clrs = clrs.slice(1-1,8);
+ rpar = [[0],[this.ymin],[this.ymax],[this.per]];
+ if (size(this.clrs,"*")>8) {
+ this.clrs = this.clrs.slice(1-1,8);
}
- if (size(clrs,"*")<8) {
- clrs[8-1] = 0;
+ if (size(this.clrs,"*")<8) {
+ this.clrs[8-1] = 0;
}
- ipar = [[win],[1],[N],[clrs.slice()],[wpos.slice()],[wdim.slice()],[size(wu,"*")],[wu.slice()]];
+ ipar = [[this.win],[1],[this.N],[this.clrs.slice()],[this.wpos.slice()],[this.wdim.slice()],[size(this.wu,"*")],[this.wu.slice()]];
model.rpar = rpar;
model.ipar = ipar;
model.firing = [];
diff --git a/js/Sinks/CFSCOPE.pickle b/js/Sinks/CFSCOPE.pickle
index 0d1dde24..f87307b1 100644
--- a/js/Sinks/CFSCOPE.pickle
+++ b/js/Sinks/CFSCOPE.pickle
@@ -2,8 +2,26 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'clrs'
p2
-atp3
-Rp4
+aS'ymax'
+p3
+aS'wpos'
+p4
+aS'win'
+p5
+aS'per'
+p6
+aS'N'
+p7
+aS'wu'
+p8
+aS'wdim'
+p9
+aS'x'
+p10
+aS'ymin'
+p11
+atp12
+Rp13
. \ No newline at end of file
diff --git a/js/Sinks/CLKOUTV_f.js b/js/Sinks/CLKOUTV_f.js
index 1f703fd2..84fe7ade 100644
--- a/js/Sinks/CLKOUTV_f.js
+++ b/js/Sinks/CLKOUTV_f.js
@@ -1,17 +1,17 @@
/* autogenerated from "macros/Sinks/CLKOUTV_f.sci" */
function CLKOUTV_f() {
CLKOUTV_f.prototype.define = function CLKOUTV_f() {
- prt = 1;
+ this.prt = 1;
model = scicos_model();
model.sim = "output";
model.evtin = 1;
- model.ipar = prt;
+ model.ipar = this.prt;
model.blocktype = "d";
model.firing = [];
model.dep_ut = [false,false];
- exprs = string(prt);
+ exprs = string(this.prt);
this.x = standard_define([1,1],model,exprs," ");
- return new BasicBlock(this.x);
+ return new EventOutBlock(this.x);
}
CLKOUTV_f.prototype.details = function CLKOUTV_f() {
return this.x;
@@ -24,15 +24,15 @@ function CLKOUTV_f() {
model = arg1.model;
exprs = graphics.exprs;
while (true) {
- [ok,prt,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"CLKOUTV_f")],[" "],[gettext("Event output port")]],gettext("Port number"),list("vec",1),exprs);
+ [ok,this.prt,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"CLKOUTV_f")],[" "],[gettext("Event output port")]],gettext("Port number"),list("vec",1),exprs);
if (!ok) {
break;
}
- prt = int(prt);
- if (prt<=0) {
- block_parameter_error(msprintf(gettext("Wrong value for \'Port Number\' parameter: %d."),prt),gettext("Strictly positive integer expected."));
+ this.prt = int(this.prt);
+ if (this.prt<=0) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'Port Number\' parameter: %d."),this.prt),gettext("Strictly positive integer expected."));
} else {
- model.ipar = prt;
+ model.ipar = this.prt;
model.evtin = 1;
graphics.exprs = exprs;
this.x.graphics = graphics;
@@ -40,6 +40,6 @@ function CLKOUTV_f() {
break;
}
}
- return new BasicBlock(this.x);
+ return new EventOutBlock(this.x);
}
}
diff --git a/js/Sinks/CLKOUTV_f.pickle b/js/Sinks/CLKOUTV_f.pickle
index 658c6188..dc34bcd7 100644
--- a/js/Sinks/CLKOUTV_f.pickle
+++ b/js/Sinks/CLKOUTV_f.pickle
@@ -8,12 +8,14 @@ aS'diag'
p3
aS'default_color'
p4
-aS'x'
+aS'prt'
p5
-aS'type'
+aS'x'
p6
-aS'options'
+aS'type'
p7
-atp8
-Rp9
+aS'options'
+p8
+atp9
+Rp10
. \ No newline at end of file
diff --git a/js/Sinks/CLKOUT_f.js b/js/Sinks/CLKOUT_f.js
index a26f8d6b..f8dfa5b7 100644
--- a/js/Sinks/CLKOUT_f.js
+++ b/js/Sinks/CLKOUT_f.js
@@ -1,15 +1,15 @@
/* autogenerated from "macros/Sinks/CLKOUT_f.sci" */
function CLKOUT_f() {
CLKOUT_f.prototype.define = function CLKOUT_f() {
- prt = 1;
+ this.prt = 1;
model = scicos_model();
model.sim = "output";
model.evtin = 1;
- model.ipar = prt;
+ model.ipar = this.prt;
model.blocktype = "d";
model.firing = [];
model.dep_ut = [false,false];
- exprs = string(prt);
+ exprs = string(this.prt);
this.x = standard_define([1,1],model,exprs," ");
return new BasicBlock(this.x);
}
@@ -25,15 +25,15 @@ function CLKOUT_f() {
exprs = graphics.exprs;
exprs = exprs[1-1];
while (true) {
- [ok,prt,exprs] = scicos_getvalue("Set Event Output block parameters","Port number",list("vec",1),exprs);
+ [ok,this.prt,exprs] = scicos_getvalue("Set Event Output block parameters","Port number",list("vec",1),exprs);
if (!ok) {
break;
}
- prt = int(prt);
- if (prt<=0) {
+ this.prt = int(this.prt);
+ if (this.prt<=0) {
message("Port number must be a positive integer");
} else {
- model.ipar = prt;
+ model.ipar = this.prt;
model.evtin = 1;
model.firing = [];
graphics.exprs = exprs;
diff --git a/js/Sinks/CLKOUT_f.pickle b/js/Sinks/CLKOUT_f.pickle
index 0d1dde24..48ee82e7 100644
--- a/js/Sinks/CLKOUT_f.pickle
+++ b/js/Sinks/CLKOUT_f.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'prt'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Sinks/CMAT3D.js b/js/Sinks/CMAT3D.js
index 6c89a28f..602b50f1 100644
--- a/js/Sinks/CMAT3D.js
+++ b/js/Sinks/CMAT3D.js
@@ -1,9 +1,9 @@
/* autogenerated from "macros/Sinks/CMAT3D.sci" */
function CMAT3D() {
CMAT3D.prototype.define = function CMAT3D() {
- cmin = 0;
- cmax = 100;
- colormap = this.jetcolormap[25-1];
+ this.cmin = 0;
+ this.cmax = 100;
+ this.colormap = this.jetcolormap[25-1];
size_c = 25;
this.x = -1;
y = -1;
@@ -15,11 +15,11 @@ function CMAT3D() {
model.in2 = -2;
model.intyp = 1;
model.evtin = 1;
- model.ipar = [[cmin],[cmax],[size_c],[size_x],[size_y]];
- model.rpar = [[colormap.slice()],[this.x],[y]];
+ model.ipar = [[this.cmin],[this.cmax],[size_c],[size_x],[size_y]];
+ model.rpar = [[this.colormap.slice()],[this.x],[y]];
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [[strcat(string(this.x)," ")],[strcat(string(y)," ")],[string("jetcolormap(25)")],[string(cmin)],[string(cmax)]];
+ exprs = [[strcat(string(this.x)," ")],[strcat(string(y)," ")],[string("jetcolormap(25)")],[string(this.cmin)],[string(this.cmax)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -35,16 +35,16 @@ function CMAT3D() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,vec_x,vec_y,colormap,cmin,cmax,exprs] = scicos_getvalue("Set Scope parameters",[["Bounds Vector X (-1 for standard)"],["Bounds Vector Y (-1 for standard)"],["ColorMap"],["Zmin"],["Zmax"]],list("vec",-1,"vec",-1,"vec",-1,"vec",1,"vec",1),exprs);
+ [ok,this.vec_x,this.vec_y,this.colormap,this.cmin,this.cmax,exprs] = scicos_getvalue("Set Scope parameters",[["Bounds Vector X (-1 for standard)"],["Bounds Vector Y (-1 for standard)"],["ColorMap"],["Zmin"],["Zmax"]],list("vec",-1,"vec",-1,"vec",-1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
mess = [];
- if (size(vec_x,"*")!=size(vec_y,"*")) {
+ if (size(this.vec_x,"*")!=size(this.vec_y,"*")) {
mess = [[mess],["Vector X and Vector Y must have the same size"],[" "]];
ok = false;
}
- if (cmax<=cmin) {
+ if (this.cmax<=this.cmin) {
mess = [[mess],["Error with minimum and maximum value"],[" "]];
ok = false;
}
@@ -52,10 +52,10 @@ function CMAT3D() {
message([["Some specified values are inconsistent:"],[" "],[mess]]);
}
if (ok) {
- size_x = size(vec_x,"*");
- size_c = size(colormap.slice(),1);
- ipar = [[cmin],[cmax],[size_c],[size_x]];
- rpar = [[colormap.slice()],[vec_x.slice()],[vec_y.slice()]];
+ size_x = size(this.vec_x,"*");
+ size_c = size(this.colormap.slice(),1);
+ ipar = [[this.cmin],[this.cmax],[size_c],[size_x]];
+ rpar = [[this.colormap.slice()],[this.vec_x.slice()],[this.vec_y.slice()]];
model.ipar = ipar;
model.rpar = rpar;
graphics.exprs = exprs;
diff --git a/js/Sinks/CMAT3D.pickle b/js/Sinks/CMAT3D.pickle
index 3467fd44..8ae2ae8c 100644
--- a/js/Sinks/CMAT3D.pickle
+++ b/js/Sinks/CMAT3D.pickle
@@ -2,10 +2,20 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'colormap'
p2
-aS'jetcolormap'
+aS'vec_x'
p3
-atp4
-Rp5
+aS'vec_y'
+p4
+aS'jetcolormap'
+p5
+aS'x'
+p6
+aS'cmax'
+p7
+aS'cmin'
+p8
+atp9
+Rp10
. \ No newline at end of file
diff --git a/js/Sinks/CMATVIEW.js b/js/Sinks/CMATVIEW.js
index 338b249b..12e1cb51 100644
--- a/js/Sinks/CMATVIEW.js
+++ b/js/Sinks/CMATVIEW.js
@@ -1,10 +1,10 @@
/* autogenerated from "macros/Sinks/CMATVIEW.sci" */
function CMATVIEW() {
CMATVIEW.prototype.define = function CMATVIEW() {
- cmin = 0;
- cmax = 100;
+ this.cmin = 0;
+ this.cmax = 100;
size_c = 25;
- colormap = this.jetcolormap[size_c-1];
+ this.colormap = this.jetcolormap[size_c-1];
alpha_c = 0.24;
beta_c = 1;
model = scicos_model();
@@ -13,11 +13,11 @@ function CMATVIEW() {
model.in2 = -2;
model.intyp = 1;
model.evtin = 1;
- model.ipar = [[cmin],[cmax],[size_c]];
- model.rpar = [[alpha_c],[beta_c],[colormap.slice()]];
+ model.ipar = [[this.cmin],[this.cmax],[size_c]];
+ model.rpar = [[alpha_c],[beta_c],[this.colormap.slice()]];
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [[string("jetcolormap(25)")],[string(cmin)],[string(cmax)]];
+ exprs = [[string("jetcolormap(25)")],[string(this.cmin)],[string(this.cmax)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -33,12 +33,12 @@ function CMATVIEW() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,colormap,cmin,cmax,exprs] = scicos_getvalue("Set Scope parameters",[["ColorMap"],["Minimum level range"],["Maximum level range"]],list("vec",-1,"vec",1,"vec",1),exprs);
+ [ok,this.colormap,this.cmin,this.cmax,exprs] = scicos_getvalue("Set Scope parameters",[["ColorMap"],["Minimum level range"],["Maximum level range"]],list("vec",-1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
mess = [];
- if (cmax<=cmin) {
+ if (this.cmax<=this.cmin) {
mess = [[mess],["Error with minimum and maximum value"],[" "]];
ok = false;
}
@@ -46,12 +46,12 @@ function CMATVIEW() {
message([["Some specified values are inconsistent:"],[" "],[mess]]);
}
if (ok) {
- size_c = size(colormap.slice(),1);
- sol = inv([[cmin,1],[cmax,1]])*[[1],[size_c/3]];
+ size_c = size(this.colormap.slice(),1);
+ sol = inv([[this.cmin,1],[this.cmax,1]])*[[1],[size_c/3]];
alpha_c = sol[1-1];
beta_c = sol[2-1];
- ipar = [[cmin],[cmax],[size_c]];
- rpar = [[alpha_c],[beta_c],[colormap.slice()]];
+ ipar = [[this.cmin],[this.cmax],[size_c]];
+ rpar = [[alpha_c],[beta_c],[this.colormap.slice()]];
model.ipar = ipar;
model.rpar = rpar;
graphics.exprs = exprs;
diff --git a/js/Sinks/CMATVIEW.pickle b/js/Sinks/CMATVIEW.pickle
index 3467fd44..86b5cbfe 100644
--- a/js/Sinks/CMATVIEW.pickle
+++ b/js/Sinks/CMATVIEW.pickle
@@ -4,8 +4,14 @@ p0
((lp1
S'x'
p2
-aS'jetcolormap'
+aS'cmax'
p3
-atp4
-Rp5
+aS'jetcolormap'
+p4
+aS'colormap'
+p5
+aS'cmin'
+p6
+atp7
+Rp8
. \ No newline at end of file
diff --git a/js/Sinks/CMSCOPE.js b/js/Sinks/CMSCOPE.js
index 2b210dcf..f437da92 100644
--- a/js/Sinks/CMSCOPE.js
+++ b/js/Sinks/CMSCOPE.js
@@ -1,28 +1,28 @@
/* autogenerated from "macros/Sinks/CMSCOPE.sci" */
function CMSCOPE() {
CMSCOPE.prototype.define = function CMSCOPE() {
- win = -1;
- in1 = [[1],[1]];
- wdim = [[-1],[-1]];
- wpos = [[-1],[-1]];
- clrs = [[1],[3],[5],[7],[9],[11],[13],[15]];
- N = 20;
- ymin = [[-1],[-5]];
- ymax = [[1],[5]];
- per = [[30],[30]];
- yy = [[transpose(ymin.slice())],[transpose(ymax.slice())]];
- period = transpose(per.slice());
+ this.win = -1;
+ this.in1 = [[1],[1]];
+ this.wdim = [[-1],[-1]];
+ this.wpos = [[-1],[-1]];
+ this.clrs = [[1],[3],[5],[7],[9],[11],[13],[15]];
+ this.N = 20;
+ this.ymin = [[-1],[-5]];
+ this.ymax = [[1],[5]];
+ this.per = [[30],[30]];
+ yy = [[transpose(this.ymin.slice())],[transpose(this.ymax.slice())]];
+ period = transpose(this.per.slice());
model = scicos_model();
model.sim = list("cmscope",4);
- model.in1 = in1;
+ model.in1 = this.in1;
model.in2 = [[1],[1]];
model.intyp = [[1],[1]];
model.evtin = 1;
model.rpar = [[0],[period.slice()],[yy.slice()]];
- model.ipar = [[win],[size(in1,"*")],[N],[wpos.slice()],[wdim.slice()],[in1.slice()],[clrs.slice(1-1,sum(in1))]];
+ model.ipar = [[this.win],[size(this.in1,"*")],[this.N],[this.wpos.slice()],[this.wdim.slice()],[this.in1.slice()],[this.clrs.slice(1-1,sum(this.in1))]];
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [[strcat(string(in1)," ")],[strcat(string(clrs)," ")],[string(win)],[sci2exp([])],[sci2exp([])],[strcat(string(ymin)," ")],[strcat(string(ymax)," ")],[strcat(string(per)," ")],[string(N)],[string(0)],[emptystr()]];
+ exprs = [[strcat(string(this.in1)," ")],[strcat(string(this.clrs)," ")],[string(this.win)],[sci2exp([])],[sci2exp([])],[strcat(string(this.ymin)," ")],[strcat(string(this.ymax)," ")],[strcat(string(this.per)," ")],[string(this.N)],[string(0)],[emptystr()]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -38,54 +38,54 @@ function CMSCOPE() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,in1,clrs,win,wpos,wdim,ymin,ymax,per,N,heritance,nom,exprs] = scicos_getvalue("Set Scope parameters",[["Input ports sizes"],["Drawing colors (>0) or mark (<0)"],["Output window number (-1 for automatic)"],["Output window position"],["Output window sizes"],["Ymin vector"],["Ymax vector"],["Refresh period"],["Buffer size"],["Accept herited events 0/1","Name of Scope (label&Id)"]],list("vec",-1,"vec",-1,"vec",1,"vec",-1,"vec",-1,"vec","size(%1,\'*\')","vec","size(%1,\'*\')","vec","size(%1,\'*\')","vec",1,"vec",1,"str",1),exprs);
+ [ok,this.in1,this.clrs,this.win,this.wpos,this.wdim,this.ymin,this.ymax,this.per,this.N,this.heritance,this.nom,exprs] = scicos_getvalue("Set Scope parameters",[["Input ports sizes"],["Drawing colors (>0) or mark (<0)"],["Output window number (-1 for automatic)"],["Output window position"],["Output window sizes"],["Ymin vector"],["Ymax vector"],["Refresh period"],["Buffer size"],["Accept herited events 0/1","Name of Scope (label&Id)"]],list("vec",-1,"vec",-1,"vec",1,"vec",-1,"vec",-1,"vec","size(%1,\'*\')","vec","size(%1,\'*\')","vec","size(%1,\'*\')","vec",1,"vec",1,"str",1),exprs);
if (!ok) {
break;
}
mess = [];
- if (size(in1,"*")<=0) {
+ if (size(this.in1,"*")<=0) {
mess = [[mess],["Block must have at least one input port"],[" "]];
ok = false;
}
- if (min(in1)<=0) {
+ if (min(this.in1)<=0) {
mess = [[mess],["Port sizes must be positive"],[" "]];
ok = false;
}
- if (size(clrs,"*")<sum(in1)) {
- mess = [[mess],["Not enough colors defined (at least "+string(sum(in1))+")"],[" "]];
+ if (size(this.clrs,"*")<sum(this.in1)) {
+ mess = [[mess],["Not enough colors defined (at least "+string(sum(this.in1))+")"],[" "]];
ok = false;
}
- if (size(wpos,"*")!=0&&size(wpos,"*")!=2) {
+ if (size(this.wpos,"*")!=0&&size(this.wpos,"*")!=2) {
mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
ok = false;
}
- if (size(wdim,"*")!=0&&size(wdim,"*")!=2) {
+ if (size(this.wdim,"*")!=0&&size(this.wdim,"*")!=2) {
mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
ok = false;
}
- if (win<-1) {
+ if (this.win<-1) {
mess = [[mess],["Window number can\'t be < -1"],[" "]];
ok = false;
}
- if (size(per,"*")!=size(ymin,"*")) {
+ if (size(this.per,"*")!=size(this.ymin,"*")) {
mess = [[mess],["Size of Refresh Period must equal size of Ymin/Ymax vector"],[" "]];
ok = false;
}
- for (i=1;i<=size(per,"*");i+=1) {
- if ((per[i-1]<=0)) {
+ for (i=1;i<=size(this.per,"*");i+=1) {
+ if ((this.per[i-1]<=0)) {
mess = [[mess],["Refresh Period must be positive"],[" "]];
ok = false;
}
}
- if (N<2) {
+ if (this.N<2) {
mess = [[mess],["Buffer size must be at least 2"],[" "]];
ok = false;
}
- if (or(ymin>=ymax)) {
+ if (or(this.ymin>=this.ymax)) {
mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
ok = false;
}
- if (!or(heritance==[0,1])) {
+ if (!or(this.heritance==[0,1])) {
mess = [[mess],["Accept herited events must be 0 or 1"],[" "]];
ok = false;
}
@@ -93,30 +93,30 @@ function CMSCOPE() {
message([["Some specified values are inconsistent:"],[" "],[mess]]);
}
if (ok) {
- in1 = in1.slice();
- a = size(in1,1);
+ this.in1 = this.in1.slice();
+ a = size(this.in1,1);
in2 = ones(a,1);
- [model,graphics,ok] = set_io(model,graphics,list([in1,in2],ones(a,1)),list(),ones(1-heritance,1),[]);
+ [model,graphics,ok] = set_io(model,graphics,list([this.in1,in2],ones(a,1)),list(),ones(1-this.heritance,1),[]);
}
if (ok) {
- if (wpos==[]) {
- wpos = [[-1],[-1]];
+ if (this.wpos==[]) {
+ this.wpos = [[-1],[-1]];
}
- if (wdim==[]) {
- wdim = [[-1],[-1]];
+ if (this.wdim==[]) {
+ this.wdim = [[-1],[-1]];
}
if (ok) {
- period = transpose(per.slice());
- yy = [[transpose(ymin.slice())],[transpose(ymax.slice())]];
+ period = transpose(this.per.slice());
+ yy = [[transpose(this.ymin.slice())],[transpose(this.ymax.slice())]];
rpar = [[0],[period.slice()],[yy.slice()]];
- clrs = clrs.slice(1-1,sum(in1));
- ipar = [[win],[size(in1,"*")],[N],[wpos.slice()],[wdim.slice()],[in1.slice()],[clrs.slice()],[heritance]];
- model.evtin = ones(1-heritance,1);
+ this.clrs = this.clrs.slice(1-1,sum(this.in1));
+ ipar = [[this.win],[size(this.in1,"*")],[this.N],[this.wpos.slice()],[this.wdim.slice()],[this.in1.slice()],[this.clrs.slice()],[this.heritance]];
+ model.evtin = ones(1-this.heritance,1);
model.dstate = [];
model.rpar = rpar;
model.ipar = ipar;
- model.label = nom;
- graphics.id = nom;
+ model.label = this.nom;
+ graphics.id = this.nom;
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Sinks/CMSCOPE.pickle b/js/Sinks/CMSCOPE.pickle
index 0d1dde24..b479aaa0 100644
--- a/js/Sinks/CMSCOPE.pickle
+++ b/js/Sinks/CMSCOPE.pickle
@@ -2,8 +2,30 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'clrs'
p2
-atp3
-Rp4
+aS'nom'
+p3
+aS'ymax'
+p4
+aS'wpos'
+p5
+aS'win'
+p6
+aS'in1'
+p7
+aS'per'
+p8
+aS'N'
+p9
+aS'wdim'
+p10
+aS'x'
+p11
+aS'ymin'
+p12
+aS'heritance'
+p13
+atp14
+Rp15
. \ No newline at end of file
diff --git a/js/Sinks/CSCOPE.js b/js/Sinks/CSCOPE.js
index f0b1699e..788b497e 100644
--- a/js/Sinks/CSCOPE.js
+++ b/js/Sinks/CSCOPE.js
@@ -1,24 +1,24 @@
/* autogenerated from "macros/Sinks/CSCOPE.sci" */
function CSCOPE() {
CSCOPE.prototype.define = function CSCOPE() {
- win = -1;
- wdim = [[600],[400]];
- wpos = [[-1],[-1]];
- clrs = [[1],[3],[5],[7],[9],[11],[13],[15]];
- N = 20;
- ymin = -15;
- ymax = +15;
- per = 30;
+ this.win = -1;
+ this.wdim = [[600],[400]];
+ this.wpos = [[-1],[-1]];
+ this.clrs = [[1],[3],[5],[7],[9],[11],[13],[15]];
+ this.N = 20;
+ this.ymin = -15;
+ this.ymax = +15;
+ this.per = 30;
model = scicos_model();
model.sim = list("cscope",4);
model.in1 = -1;
model.in2 = 1;
model.evtin = 1;
- model.rpar = [[0],[ymin],[ymax],[per]];
- model.ipar = [[win],[1],[N],[clrs],[wpos],[wdim]];
+ model.rpar = [[0],[this.ymin],[this.ymax],[this.per]];
+ model.ipar = [[this.win],[1],[this.N],[this.clrs],[this.wpos],[this.wdim]];
model.blocktype = "c";
model.dep_ut = [true,false];
- exprs = [[strcat(string(clrs)," ")],[string(win)],[sci2exp([])],[sci2exp(wdim)],[string(ymin)],[string(ymax)],[string(per)],[string(N)],[transpose(string(0))],[emptystr()]];
+ exprs = [[strcat(string(this.clrs)," ")],[string(this.win)],[sci2exp([])],[sci2exp(this.wdim)],[string(this.ymin)],[string(this.ymax)],[string(this.per)],[string(this.N)],[transpose(string(0))],[emptystr()]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -34,36 +34,36 @@ function CSCOPE() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,clrs,win,wpos,wdim,ymin,ymax,per,N,heritance,nom,exprs] = scicos_getvalue("Set Scope parameters",[["Color (>0) or mark (<0) vector (8 entries)"],["Output window number (-1 for automatic)"],["Output window position"],["Output window sizes"],["Ymin"],["Ymax"],["Refresh period"],["Buffer size","Accept herited events 0/1","Name of Scope (label&Id)"]],list("vec",8,"vec",1,"vec",-1,"vec",-1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"str",1),exprs);
+ [ok,this.clrs,this.win,this.wpos,this.wdim,this.ymin,this.ymax,this.per,this.N,this.heritance,this.nom,exprs] = scicos_getvalue("Set Scope parameters",[["Color (>0) or mark (<0) vector (8 entries)"],["Output window number (-1 for automatic)"],["Output window position"],["Output window sizes"],["Ymin"],["Ymax"],["Refresh period"],["Buffer size","Accept herited events 0/1","Name of Scope (label&Id)"]],list("vec",8,"vec",1,"vec",-1,"vec",-1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"str",1),exprs);
if (!ok) {
break;
}
mess = [];
- if (size(wpos,"*")!=0&&size(wpos,"*")!=2) {
+ if (size(this.wpos,"*")!=0&&size(this.wpos,"*")!=2) {
mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
ok = false;
}
- if (size(wdim,"*")!=0&&size(wdim,"*")!=2) {
+ if (size(this.wdim,"*")!=0&&size(this.wdim,"*")!=2) {
mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
ok = false;
}
- if (win<-1) {
+ if (this.win<-1) {
mess = [[mess],["Window number can\'t be < -1"],[" "]];
ok = false;
}
- if (per<=0) {
+ if (this.per<=0) {
mess = [[mess],["Refresh period must be positive"],[" "]];
ok = false;
}
- if (N<2) {
+ if (this.N<2) {
mess = [[mess],["Buffer size must be at least 2"],[" "]];
ok = false;
}
- if (ymin>=ymax) {
+ if (this.ymin>=this.ymax) {
mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
ok = false;
}
- if (!or(heritance==[0,1])) {
+ if (!or(this.heritance==[0,1])) {
mess = [[mess],["Accept herited events must be 0 or 1"],[" "]];
ok = false;
}
@@ -71,22 +71,22 @@ function CSCOPE() {
message([["Some specified values are inconsistent:"],[" "],[mess]]);
}
if (ok) {
- [model,graphics,ok] = set_io(model,graphics,list([-1,1],1),list(),ones(1-heritance,1),[]);
+ [model,graphics,ok] = set_io(model,graphics,list([-1,1],1),list(),ones(1-this.heritance,1),[]);
}
if (ok) {
- if (wpos==[]) {
- wpos = [[-1],[-1]];
+ if (this.wpos==[]) {
+ this.wpos = [[-1],[-1]];
}
- if (wdim==[]) {
- wdim = [[-1],[-1]];
+ if (this.wdim==[]) {
+ this.wdim = [[-1],[-1]];
}
- rpar = [[0],[ymin],[ymax],[per]];
- ipar = [[win],[1],[N],[clrs.slice()],[wpos.slice()],[wdim.slice()]];
+ rpar = [[0],[this.ymin],[this.ymax],[this.per]];
+ ipar = [[this.win],[1],[this.N],[this.clrs.slice()],[this.wpos.slice()],[this.wdim.slice()]];
model.rpar = rpar;
model.ipar = ipar;
- model.evtin = ones(1-heritance,1);
- model.label = nom;
- graphics.id = nom;
+ model.evtin = ones(1-this.heritance,1);
+ model.label = this.nom;
+ graphics.id = this.nom;
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Sinks/CSCOPE.pickle b/js/Sinks/CSCOPE.pickle
index 0d1dde24..e1bcefc3 100644
--- a/js/Sinks/CSCOPE.pickle
+++ b/js/Sinks/CSCOPE.pickle
@@ -2,8 +2,28 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'clrs'
p2
-atp3
-Rp4
+aS'nom'
+p3
+aS'ymax'
+p4
+aS'wpos'
+p5
+aS'win'
+p6
+aS'per'
+p7
+aS'N'
+p8
+aS'wdim'
+p9
+aS'x'
+p10
+aS'ymin'
+p11
+aS'heritance'
+p12
+atp13
+Rp14
. \ No newline at end of file
diff --git a/js/Sinks/CSCOPXY.js b/js/Sinks/CSCOPXY.js
index 769fe395..0b2e9b80 100644
--- a/js/Sinks/CSCOPXY.js
+++ b/js/Sinks/CSCOPXY.js
@@ -1,28 +1,28 @@
/* autogenerated from "macros/Sinks/CSCOPXY.sci" */
function CSCOPXY() {
CSCOPXY.prototype.define = function CSCOPXY() {
- win = -1;
- clrs = 4;
- siz = 1;
- wdim = [[600],[400]];
- wpos = [[-1],[-1]];
- N = 2;
- xmin = -15;
- xmax = 15;
- ymin = -15;
- ymax = +15;
- nbr_curves = 1;
+ this.win = -1;
+ this.clrs = 4;
+ this.siz = 1;
+ this.wdim = [[600],[400]];
+ this.wpos = [[-1],[-1]];
+ this.N = 2;
+ this.xmin = -15;
+ this.xmax = 15;
+ this.ymin = -15;
+ this.ymax = +15;
+ this.nbr_curves = 1;
model = scicos_model();
model.sim = list("cscopxy",4);
model.in1 = [[1],[1]];
model.in2 = [[1],[1]];
model.intyp = [[1],[1]];
model.evtin = 1;
- model.rpar = [[xmin],[xmax],[ymin],[ymax]];
- model.ipar = [[win],[1],[N],[clrs],[siz],[1],[wpos.slice()],[wdim.slice()],[nbr_curves]];
+ model.rpar = [[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
+ model.ipar = [[this.win],[1],[this.N],[this.clrs],[this.siz],[1],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]];
model.blocktype = "d";
model.dep_ut = [false,false];
- exprs = [[string(nbr_curves)],[sci2exp(clrs)],[sci2exp(siz)],[string(win)],[sci2exp([])],[sci2exp(wdim)],[string(xmin)],[string(xmax)],[string(ymin)],[string(ymax)],[string(N)]];
+ exprs = [[string(this.nbr_curves)],[sci2exp(this.clrs)],[sci2exp(this.siz)],[string(this.win)],[sci2exp([])],[sci2exp(this.wdim)],[string(this.xmin)],[string(this.xmax)],[string(this.ymin)],[string(this.ymax)],[string(this.N)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -38,57 +38,57 @@ function CSCOPXY() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,nbr_curves,clrs,siz,win,wpos,wdim,xmin,xmax,ymin,ymax,N,exprs] = scicos_getvalue("Set Scope parameters",[["Number of Curves"],["color (>0) or mark (<0)"],["line or mark size"],["Output window number (-1 for automatic)"],["Output window position"],["Output window sizes"],["Xmin"],["Xmax"],["Ymin"],["Ymax"],["Buffer size"]],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",-1,"vec",-1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.nbr_curves,this.clrs,this.siz,this.win,this.wpos,this.wdim,this.xmin,this.xmax,this.ymin,this.ymax,this.N,exprs] = scicos_getvalue("Set Scope parameters",[["Number of Curves"],["color (>0) or mark (<0)"],["line or mark size"],["Output window number (-1 for automatic)"],["Output window position"],["Output window sizes"],["Xmin"],["Xmax"],["Ymin"],["Ymax"],["Buffer size"]],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",-1,"vec",-1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
mess = [];
- if (size(wpos,"*")!=0&&size(wpos,"*")!=2) {
+ if (size(this.wpos,"*")!=0&&size(this.wpos,"*")!=2) {
mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
ok = false;
}
- if (size(wdim,"*")!=0&&size(wdim,"*")!=2) {
+ if (size(this.wdim,"*")!=0&&size(this.wdim,"*")!=2) {
mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
ok = false;
}
- if (nbr_curves<=0) {
+ if (this.nbr_curves<=0) {
mess = [[mess],["Number of Curves cannot be negative or null"],[" "]];
ok = false;
}
- if (win<-1) {
+ if (this.win<-1) {
mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
ok = false;
}
- if (N<1) {
+ if (this.N<1) {
mess = [[mess],["Buffer size must be at least 1"],[" "]];
ok = false;
}
- if (N==1&&clrs>0) {
+ if (this.N==1&&this.clrs>0) {
mess = [[mess],["Buffer size must be at least 2"],[" "]];
ok = false;
}
- if (ymin>=ymax) {
+ if (this.ymin>=this.ymax) {
mess = [[mess],["Ymax must be greater than Ymin"],[" "]];
ok = false;
}
- if (xmin>=xmax) {
+ if (this.xmin>=this.xmax) {
mess = [[mess],["Xmax must be greater than Xmin"],[" "]];
ok = false;
}
if (!ok) {
message(mess);
} else {
- in1 = nbr_curves*ones(2,1);
+ in1 = this.nbr_curves*ones(2,1);
in2 = ones(2,1);
[model,graphics,ok] = set_io(model,graphics,list([in1,in2],ones(2,1)),list(),ones(1,1),[]);
- if (wpos==[]) {
- wpos = [[-1],[-1]];
+ if (this.wpos==[]) {
+ this.wpos = [[-1],[-1]];
}
- if (wdim==[]) {
- wdim = [[-1],[-1]];
+ if (this.wdim==[]) {
+ this.wdim = [[-1],[-1]];
}
- rpar = [[xmin],[xmax],[ymin],[ymax]];
- ipar = [[win],[1],[N],[clrs],[siz],[1],[wpos.slice()],[wdim.slice()],[nbr_curves]];
+ rpar = [[this.xmin],[this.xmax],[this.ymin],[this.ymax]];
+ ipar = [[this.win],[1],[this.N],[this.clrs],[this.siz],[1],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]];
model.rpar = rpar;
model.ipar = ipar;
graphics.exprs = exprs;
diff --git a/js/Sinks/CSCOPXY.pickle b/js/Sinks/CSCOPXY.pickle
index 0d1dde24..a365a644 100644
--- a/js/Sinks/CSCOPXY.pickle
+++ b/js/Sinks/CSCOPXY.pickle
@@ -2,8 +2,30 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'clrs'
p2
-atp3
-Rp4
+aS'ymin'
+p3
+aS'ymax'
+p4
+aS'wpos'
+p5
+aS'win'
+p6
+aS'wdim'
+p7
+aS'N'
+p8
+aS'xmax'
+p9
+aS'siz'
+p10
+aS'xmin'
+p11
+aS'x'
+p12
+aS'nbr_curves'
+p13
+atp14
+Rp15
. \ No newline at end of file
diff --git a/js/Sinks/CSCOPXY3D.js b/js/Sinks/CSCOPXY3D.js
index 6a08003e..af7af449 100644
--- a/js/Sinks/CSCOPXY3D.js
+++ b/js/Sinks/CSCOPXY3D.js
@@ -1,28 +1,28 @@
/* autogenerated from "macros/Sinks/CSCOPXY3D.sci" */
function CSCOPXY3D() {
CSCOPXY3D.prototype.define = function CSCOPXY3D() {
- win = -1;
- clrs = [[1],[2],[3],[4],[5],[6],[7],[13]];
- siz = [[1],[1],[1],[1],[1],[1],[1],[1]];
- wdim = [[600],[400]];
- wpos = [[-1],[-1]];
- N = 2;
- param3ds = [[50],[280]];
- vec_x = [[-15],[15]];
- vec_y = [[-15],[15]];
- vec_z = [[-15],[15]];
- nbr_curves = 1;
+ this.win = -1;
+ this.clrs = [[1],[2],[3],[4],[5],[6],[7],[13]];
+ this.siz = [[1],[1],[1],[1],[1],[1],[1],[1]];
+ this.wdim = [[600],[400]];
+ this.wpos = [[-1],[-1]];
+ this.N = 2;
+ this.param3ds = [[50],[280]];
+ this.vec_x = [[-15],[15]];
+ this.vec_y = [[-15],[15]];
+ this.vec_z = [[-15],[15]];
+ this.nbr_curves = 1;
model = scicos_model();
model.sim = list("cscopxy3d",4);
model.in1 = [[1],[1],[1]];
model.in2 = [[1],[1],[1]];
model.intyp = [[1],[1],[1]];
model.evtin = 1;
- model.rpar = [[vec_x.slice()],[vec_y.slice()],[vec_z.slice()],[param3ds.slice()]];
- model.ipar = [[win],[8],[N],[clrs.slice()],[siz.slice()],[8],[wpos.slice()],[wdim.slice()],[nbr_curves]];
+ model.rpar = [[this.vec_x.slice()],[this.vec_y.slice()],[this.vec_z.slice()],[this.param3ds.slice()]];
+ model.ipar = [[this.win],[8],[this.N],[this.clrs.slice()],[this.siz.slice()],[8],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]];
model.blocktype = "d";
model.dep_ut = [false,false];
- exprs = [[string(nbr_curves)],[strcat(string(clrs)," ")],[strcat(string(siz)," ")],[string(win)],[sci2exp([])],[sci2exp(wdim)],[strcat(string(vec_x)," ")],[strcat(string(vec_y)," ")],[strcat(string(vec_z)," ")],[strcat(string(param3ds)," ")],[string(N)]];
+ exprs = [[string(this.nbr_curves)],[strcat(string(this.clrs)," ")],[strcat(string(this.siz)," ")],[string(this.win)],[sci2exp([])],[sci2exp(this.wdim)],[strcat(string(this.vec_x)," ")],[strcat(string(this.vec_y)," ")],[strcat(string(this.vec_z)," ")],[strcat(string(this.param3ds)," ")],[string(this.N)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -38,68 +38,68 @@ function CSCOPXY3D() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,nbr_curves,clrs,siz,win,wpos,wdim,vec_x,vec_y,vec_z,param3ds,N,exprs] = scicos_getvalue("Set Scope parameters",[["Number of curves"],["color (>0) or mark (<0)"],["Line or Mark Size"],["Output window number (-1 for automatic)"],["Output window position"],["Output window sizes"],["Xmin and Xmax"],["Ymin and Ymax"],["Zmin and Zmax"],["Alpha and Theta"],["Buffer size"]],list("vec",1,"vec",-1,"vec",-1,"vec",1,"vec",-1,"vec",-1,"vec",2,"vec",2,"vec",2,"vec",2,"vec",1),exprs);
+ [ok,this.nbr_curves,this.clrs,this.siz,this.win,this.wpos,this.wdim,this.vec_x,this.vec_y,this.vec_z,this.param3ds,this.N,exprs] = scicos_getvalue("Set Scope parameters",[["Number of curves"],["color (>0) or mark (<0)"],["Line or Mark Size"],["Output window number (-1 for automatic)"],["Output window position"],["Output window sizes"],["Xmin and Xmax"],["Ymin and Ymax"],["Zmin and Zmax"],["Alpha and Theta"],["Buffer size"]],list("vec",1,"vec",-1,"vec",-1,"vec",1,"vec",-1,"vec",-1,"vec",2,"vec",2,"vec",2,"vec",2,"vec",1),exprs);
if (!ok) {
break;
}
mess = [];
- if (size(wpos,"*")!=0&&size(wpos,"*")!=2) {
+ if (size(this.wpos,"*")!=0&&size(this.wpos,"*")!=2) {
mess = [[mess],["Window position must be [] or a 2 vector"],[" "]];
ok = false;
}
- if (size(wdim,"*")!=0&&size(wdim,"*")!=2) {
+ if (size(this.wdim,"*")!=0&&size(this.wdim,"*")!=2) {
mess = [[mess],["Window dim must be [] or a 2 vector"],[" "]];
ok = false;
}
- if (size(clrs,"*")!=size(siz,"*")) {
+ if (size(this.clrs,"*")!=size(this.siz,"*")) {
mess = [[mess],["Colors and Size must have same size"],[" "]];
ok = false;
}
- if (nbr_curves<=0) {
+ if (this.nbr_curves<=0) {
mess = [[mess],["Number of curves cannot be negative or null"],[" "]];
ok = false;
}
- if (win<-1) {
+ if (this.win<-1) {
mess = [[mess],["Window number cannot be inferior than -1"],[" "]];
ok = false;
}
- if (N<1) {
+ if (this.N<1) {
mess = [[mess],["Buffer size must be at least 1"],[" "]];
ok = false;
}
- if (N<2) {
- for (i=1;i<=size(clrs,"*");i+=1) {
- if (clrs[i-1]>0) {
+ if (this.N<2) {
+ for (i=1;i<=size(this.clrs,"*");i+=1) {
+ if (this.clrs[i-1]>0) {
mess = [[mess],["Buffer size must be at least 2 or Change a color (must be >0)"],[" "]];
ok = false;
}
}
}
- if (vec_y[1-1]>=vec_y[2-1]) {
+ if (this.vec_y[1-1]>=this.vec_y[2-1]) {
mess = [[mess],["Ymax must be higher than Ymin"],[" "]];
ok = false;
}
- if (vec_x[1-1]>=vec_x[2-1]) {
+ if (this.vec_x[1-1]>=this.vec_x[2-1]) {
mess = [[mess],["Xmax must be higher than Xmin"],[" "]];
ok = false;
}
- if (vec_z[1-1]>=vec_z[2-1]) {
+ if (this.vec_z[1-1]>=this.vec_z[2-1]) {
mess = [[mess],["Zmax must be higher than Zmin"],[" "]];
ok = false;
}
if (ok) {
- in1 = nbr_curves*ones(3,1);
+ in1 = this.nbr_curves*ones(3,1);
in2 = ones(3,1);
[model,graphics,ok] = set_io(model,graphics,list([in1,in2],ones(3,1)),list(),ones(1,1),[]);
- if (wpos==[]) {
- wpos = [[-1],[-1]];
+ if (this.wpos==[]) {
+ this.wpos = [[-1],[-1]];
}
- if (wdim==[]) {
- wdim = [[-1],[-1]];
+ if (this.wdim==[]) {
+ this.wdim = [[-1],[-1]];
}
- rpar = [[vec_x.slice()],[vec_y.slice()],[vec_z.slice()],[param3ds.slice()]];
- size_siz = size(siz,"*");
- ipar = [[win],[size_siz],[N],[clrs.slice()],[siz.slice()],[1],[wpos.slice()],[wdim.slice()],[nbr_curves]];
+ rpar = [[this.vec_x.slice()],[this.vec_y.slice()],[this.vec_z.slice()],[this.param3ds.slice()]];
+ size_siz = size(this.siz,"*");
+ ipar = [[this.win],[size_siz],[this.N],[this.clrs.slice()],[this.siz.slice()],[1],[this.wpos.slice()],[this.wdim.slice()],[this.nbr_curves]];
model.rpar = rpar;
model.ipar = ipar;
graphics.exprs = exprs;
diff --git a/js/Sinks/CSCOPXY3D.pickle b/js/Sinks/CSCOPXY3D.pickle
index 0d1dde24..410ab478 100644
--- a/js/Sinks/CSCOPXY3D.pickle
+++ b/js/Sinks/CSCOPXY3D.pickle
@@ -2,8 +2,30 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'clrs'
p2
-atp3
-Rp4
+aS'vec_y'
+p3
+aS'wpos'
+p4
+aS'vec_z'
+p5
+aS'win'
+p6
+aS'vec_x'
+p7
+aS'wdim'
+p8
+aS'param3ds'
+p9
+aS'N'
+p10
+aS'siz'
+p11
+aS'x'
+p12
+aS'nbr_curves'
+p13
+atp14
+Rp15
. \ No newline at end of file
diff --git a/js/Sinks/OUTIMPL_f.js b/js/Sinks/OUTIMPL_f.js
index fb003f2c..10bd39f0 100644
--- a/js/Sinks/OUTIMPL_f.js
+++ b/js/Sinks/OUTIMPL_f.js
@@ -4,7 +4,7 @@ function OUTIMPL_f() {
model = scicos_model();
model.in1 = [-1];
model.in2 = [1];
- prt = 1;
+ this.prt = 1;
model.sim = "outimpl";
model.ipar = [1];
model.blocktype = "c";
@@ -17,7 +17,7 @@ function OUTIMPL_f() {
gr_i = [];
this.x = standard_define([1,1],model,exprs,gr_i);
this.x.graphics.in_implicit = ["I"];
- return new BasicBlock(this.x);
+ return new ImplicitOutBlock(this.x);
}
OUTIMPL_f.prototype.details = function OUTIMPL_f() {
return this.x;
@@ -33,25 +33,25 @@ function OUTIMPL_f() {
exprs = exprs[1-1];
}
while (true) {
- [ok,prt,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"OUTIMPL_f")],[" "],[gettext("Implicit output port")]],gettext("Port number"),list("vec",1),exprs);
+ [ok,this.prt,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"OUTIMPL_f")],[" "],[gettext("Implicit output port")]],gettext("Port number"),list("vec",1),exprs);
if (!ok) {
break;
}
- prt = int(prt);
- if (prt<=0) {
- block_parameter_error(msprintf(gettext("Wrong value for \'Port Number\' parameter: %d."),prt),gettext("Strictly positive integer expected."));
+ this.prt = int(this.prt);
+ if (this.prt<=0) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'Port Number\' parameter: %d."),this.prt),gettext("Strictly positive integer expected."));
} else {
- if (model.ipar!=prt) {
+ if (model.ipar!=this.prt) {
needcompile = 4;
y = needcompile;
}
- model.ipar = prt;
+ model.ipar = this.prt;
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
break;
}
}
- return new BasicBlock(this.x);
+ return new ImplicitOutBlock(this.x);
}
}
diff --git a/js/Sinks/OUTIMPL_f.pickle b/js/Sinks/OUTIMPL_f.pickle
index 0d1dde24..48ee82e7 100644
--- a/js/Sinks/OUTIMPL_f.pickle
+++ b/js/Sinks/OUTIMPL_f.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'prt'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Sinks/OUT_f.js b/js/Sinks/OUT_f.js
index 7a5ef710..d18c01bf 100644
--- a/js/Sinks/OUT_f.js
+++ b/js/Sinks/OUT_f.js
@@ -2,19 +2,19 @@
function OUT_f() {
OUT_f.prototype.define = function OUT_f() {
n = -1;
- prt = 1;
+ this.prt = 1;
model = scicos_model();
model.sim = "output";
model.in1 = -1;
model.in2 = -2;
model.intyp = -1;
- model.ipar = prt;
+ model.ipar = this.prt;
model.blocktype = "c";
model.dep_ut = [false,false];
- exprs = string(prt);
+ exprs = string(this.prt);
gr_i = [];
this.x = standard_define([1,1],model,exprs,gr_i);
- return new BasicBlock(this.x);
+ return new ExplicitOutBlock(this.x);
}
OUT_f.prototype.details = function OUT_f() {
return this.x;
@@ -30,21 +30,21 @@ function OUT_f() {
exprs = exprs[1-1];
}
while (true) {
- [ok,prt,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"OUT_f")],[" "],[gettext("Regular output port")]],gettext("Port number"),list("vec",1),exprs);
+ [ok,this.prt,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"OUT_f")],[" "],[gettext("Regular output port")]],gettext("Port number"),list("vec",1),exprs);
if (!ok) {
break;
}
- prt = int(prt);
- if (prt<=0) {
- block_parameter_error(msprintf(gettext("Wrong value for \'Port Number\' parameter: %d."),prt),gettext("Strictly positive integer expected."));
+ this.prt = int(this.prt);
+ if (this.prt<=0) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'Port Number\' parameter: %d."),this.prt),gettext("Strictly positive integer expected."));
} else {
- model.ipar = prt;
+ model.ipar = this.prt;
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
break;
}
}
- return new BasicBlock(this.x);
+ return new ExplicitOutBlock(this.x);
}
}
diff --git a/js/Sinks/OUT_f.pickle b/js/Sinks/OUT_f.pickle
index 0d1dde24..48ee82e7 100644
--- a/js/Sinks/OUT_f.pickle
+++ b/js/Sinks/OUT_f.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'prt'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Sinks/TOWS_c.js b/js/Sinks/TOWS_c.js
index 790c2021..4e0ad0a6 100644
--- a/js/Sinks/TOWS_c.js
+++ b/js/Sinks/TOWS_c.js
@@ -2,9 +2,9 @@
function TOWS_c() {
TOWS_c.prototype.define = function TOWS_c() {
nu = -1;
- nz = 128;
- varnam = "A";
- herit = 0;
+ this.nz = 128;
+ this.varnam = "A";
+ this.herit = 0;
model = scicos_model();
model.sim = list("tows_c",4);
model.in1 = [nu];
@@ -14,12 +14,12 @@ function TOWS_c() {
model.evtin = [1];
model.evtout = [];
model.rpar = [];
- model.ipar = [[nz],[length(varnam)],[transpose(this.ascii[varnam-1])]];
+ model.ipar = [[this.nz],[length(this.varnam)],[transpose(this.ascii[this.varnam-1])]];
model.blocktype = "d";
model.firing = [];
model.dep_ut = [false,false];
gr_i = [];
- exprs = [[string(nz)],[string(varnam)],[string(herit)]];
+ exprs = [[string(this.nz)],[string(this.varnam)],[string(this.herit)]];
this.x = standard_define([4,2],model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -34,29 +34,29 @@ function TOWS_c() {
model = arg1.model;
exprs = graphics.exprs;
while (true) {
- [ok,nz,varnam,herit,exprs] = scicos_getvalue("Set Xcos buffer block",[["Size of buffer"],["Scilab variable name"],["Inherit (no:0, yes:1)"]],list("vec",1,"str",1,"vec",1),exprs);
+ [ok,this.nz,this.varnam,this.herit,exprs] = scicos_getvalue("Set Xcos buffer block",[["Size of buffer"],["Scilab variable name"],["Inherit (no:0, yes:1)"]],list("vec",1,"str",1,"vec",1),exprs);
if (!ok) {
break;
}
- if ((nz<=0)) {
+ if ((this.nz<=0)) {
message("Size of buffer must be positive");
ok = false;
}
r = false;
ierr = execstr("r = validvar(varnam)","errcatch");
- if (!r||ierr!=0||length(varnam)>19) {
+ if (!r||ierr!=0||length(this.varnam)>19) {
message([["Invalid variable name."],["Please choose another variable name."]]);
ok = false;
}
- execstr("if type("+varnam+") <> 17 | or(fieldnames("+varnam+") <> [\"values\"; \"time\"]) then"+" message([\"Protected variable name.\"; \"Please choose another variable name.\"]);"+" ok = %f;"+" end","errcatch");
+ execstr("if type("+this.varnam+") <> 17 | or(fieldnames("+this.varnam+") <> [\"values\"; \"time\"]) then"+" message([\"Protected variable name.\"; \"Please choose another variable name.\"]);"+" ok = %f;"+" end","errcatch");
if (ok) {
- [model,graphics,ok] = set_io(model,graphics,list([-1,-2],-1),list(),ones(1-herit,1),[]);
- if (herit==1) {
+ [model,graphics,ok] = set_io(model,graphics,list([-1,-2],-1),list(),ones(1-this.herit,1),[]);
+ if (this.herit==1) {
model.blocktype = "x";
} else {
model.blocktype = "d";
}
- model.ipar = [[nz],[length(varnam)],[transpose(this.ascii[varnam-1])]];
+ model.ipar = [[this.nz],[length(this.varnam)],[transpose(this.ascii[this.varnam-1])]];
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Sinks/TOWS_c.pickle b/js/Sinks/TOWS_c.pickle
index 62d608a3..7f1fb191 100644
--- a/js/Sinks/TOWS_c.pickle
+++ b/js/Sinks/TOWS_c.pickle
@@ -4,8 +4,14 @@ p0
((lp1
S'x'
p2
-aS'ascii'
+aS'nz'
p3
-atp4
-Rp5
+aS'herit'
+p4
+aS'ascii'
+p5
+aS'varnam'
+p6
+atp7
+Rp8
. \ No newline at end of file
diff --git a/js/Sinks/WFILE_f.js b/js/Sinks/WFILE_f.js
index 05259e11..2fa50583 100644
--- a/js/Sinks/WFILE_f.js
+++ b/js/Sinks/WFILE_f.js
@@ -1,21 +1,21 @@
/* autogenerated from "macros/Sinks/WFILE_f.sci" */
function WFILE_f() {
WFILE_f.prototype.define = function WFILE_f() {
- in1 = 1;
- nin = sum(in1);
+ this.in1 = 1;
+ nin = sum(this.in1);
frmt = "(7(e10.3,1x))";
fname = "foo";
lunit = 0;
- N = 2;
+ this.N = 2;
model = scicos_model();
model.sim = "writef";
- model.in1 = in1;
+ model.in1 = this.in1;
model.evtin = 1;
- model.dstate = [[-1],[lunit],[zeros((nin+1)*N,1)]];
- model.ipar = [[length(fname)],[length(frmt)],[0],[N],[this._str2code[fname-1]],[this._str2code[frmt-1]]];
+ model.dstate = [[-1],[lunit],[zeros((nin+1)*this.N,1)]];
+ model.ipar = [[length(fname)],[length(frmt)],[0],[this.N],[this._str2code[fname-1]],[this._str2code[frmt-1]]];
model.blocktype = "d";
model.dep_ut = [true,false];
- exprs = [[sci2exp(in1)],[fname],[frmt],[string(N)]];
+ exprs = [[sci2exp(this.in1)],[fname],[frmt],[string(this.N)]];
gr_i = [];
this.x = standard_define([3,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -40,43 +40,43 @@ function WFILE_f() {
fname = exprs[2-1];
frmt = exprs[3-1];
while (true) {
- [ok,in1,fname1,frmt1,N,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"WFILE_f")],[" "],[gettext("Write to output file")],[" "],[gettext("Write is done on:")],[gettext("&nbsp; - A binary file if no format given")],[gettext("&nbsp; - A formatted text file if a format (Fortran type) is given")]],[[gettext("Input Size")],[gettext("Output File Name")],[gettext("Output Format")],[gettext("Buffer Size")]],list("vec",1,"str",1,"str",1,"vec",1),exprs);
+ [ok,this.in1,this.fname1,this.frmt1,this.N,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"WFILE_f")],[" "],[gettext("Write to output file")],[" "],[gettext("Write is done on:")],[gettext("&nbsp; - A binary file if no format given")],[gettext("&nbsp; - A formatted text file if a format (Fortran type) is given")]],[[gettext("Input Size")],[gettext("Output File Name")],[gettext("Output Format")],[gettext("Buffer Size")]],list("vec",1,"str",1,"str",1,"vec",1),exprs);
if (!ok) {
break;
}
- in1 = int(in1);
- nin = in1;
- fname1 = pathconvert(stripblanks(fname1),false,true);
- frmt1 = stripblanks(frmt1);
- if (lunit>0&&min(length(frmt),1)!=min(length(frmt1),1)) {
+ this.in1 = int(this.in1);
+ nin = this.in1;
+ this.fname1 = pathconvert(stripblanks(this.fname1),false,true);
+ this.frmt1 = stripblanks(this.frmt1);
+ if (lunit>0&&min(length(frmt),1)!=min(length(this.frmt1),1)) {
block_parameter_error(gettext("Simulation running !!! You cannot switch<br />between formatted and unformatted when running"),gettext("End current simulation first."));
ok = false;
- } else if (lunit>0&&fname1!=fname) {
+ } else if (lunit>0&&this.fname1!=fname) {
block_parameter_error(gettext("You cannot modify \'Output File Name\' when running."),gettext("End current simulation first."));
ok = false;
- } else if (fname1=="") {
+ } else if (this.fname1=="") {
block_parameter_error(gettext("Wrong value for \'Output File Name\' parameter"),gettext("You must provide a filename."));
ok = false;
- } else if (fileparts(fname1)!="") {
- [pa,fn,ex] = fileparts(fname1);
+ } else if (fileparts(this.fname1)!="") {
+ [pa,fn,ex] = fileparts(this.fname1);
if (!this.isdir[pa-1]) {
block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter."),gettext("Output File Name")),msprintf(gettext("Directory \'%s\' does not exist"),pa));
ok = false;
}
- } else if (frmt1!=""&&(part(frmt1,1)!="("||part(frmt1,length(frmt1))!=")")) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %s."),gettext("Input Format"),frmt1),gettext("You must enclose the format\'s string between parentheses."));
+ } else if (this.frmt1!=""&&(part(this.frmt1,1)!="("||part(this.frmt1,length(this.frmt1))!=")")) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %s."),gettext("Input Format"),this.frmt1),gettext("You must enclose the format\'s string between parentheses."));
ok = false;
- } else if (N<2) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Buffer Size"),N),gettext("Must be greater than 1."));
+ } else if (this.N<2) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Buffer Size"),this.N),gettext("Must be greater than 1."));
ok = false;
- } else if (in1<=0) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Input Size"),in1),gettext("Strictly positive integer expected."));
+ } else if (this.in1<=0) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Input Size"),this.in1),gettext("Strictly positive integer expected."));
ok = false;
}
if (ok) {
- ipar = [[length(fname1)],[length(frmt1)],[0],[N],[this._str2code[fname1-1]],[this._str2code[frmt1-1]]];
- if (prod(size(dstate))!=(nin+1)*N+2) {
- dstate = [[-1],[lunit],[zeros((nin+1)*N,1)]];
+ ipar = [[length(this.fname1)],[length(this.frmt1)],[0],[this.N],[this._str2code[this.fname1-1]],[this._str2code[this.frmt1-1]]];
+ if (prod(size(dstate))!=(nin+1)*this.N+2) {
+ dstate = [[-1],[lunit],[zeros((nin+1)*this.N,1)]];
}
model.in1 = nin;
model.dstate = dstate;
diff --git a/js/Sinks/WFILE_f.pickle b/js/Sinks/WFILE_f.pickle
index 0cb2ae6e..45771d89 100644
--- a/js/Sinks/WFILE_f.pickle
+++ b/js/Sinks/WFILE_f.pickle
@@ -4,10 +4,18 @@ p0
((lp1
S'isdir'
p2
-aS'x'
-p3
aS'_str2code'
+p3
+aS'in1'
p4
-atp5
-Rp6
+aS'fname1'
+p5
+aS'N'
+p6
+aS'frmt1'
+p7
+aS'x'
+p8
+atp9
+Rp10
. \ No newline at end of file
diff --git a/js/Sinks/WRITEAU_f.js b/js/Sinks/WRITEAU_f.js
index 3adafd3e..b644a076 100644
--- a/js/Sinks/WRITEAU_f.js
+++ b/js/Sinks/WRITEAU_f.js
@@ -5,18 +5,18 @@ function WRITEAU_f() {
nin = sum(in1);
frmt = "uc ";
fname = "/dev/audio";
- swap = 0;
+ this.swap = 0;
lunit = 0;
- N = 2;
+ this.N = 2;
model = scicos_model();
model.sim = list("writeau",2);
model.in1 = in1;
model.evtin = 1;
- model.dstate = [[-1],[lunit],[zeros((nin+1)*N,1)]];
- model.ipar = [[length(fname)],[this._str2code[frmt-1]],[N],[swap],[this._str2code[fname-1]]];
+ model.dstate = [[-1],[lunit],[zeros((nin+1)*this.N,1)]];
+ model.ipar = [[length(fname)],[this._str2code[frmt-1]],[this.N],[this.swap],[this._str2code[fname-1]]];
model.blocktype = "d";
model.dep_ut = [true,false];
- exprs = [string(N),string(swap)];
+ exprs = [string(this.N),string(this.swap)];
gr_i = [];
this.x = standard_define([4,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -35,28 +35,28 @@ function WRITEAU_f() {
dstate = model.dstate;
lunit = dstate[2-1];
while (true) {
- [ok,N,swap,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"WRITEAU_f")],[" "],[gettext("Write \'.au\' sound file on audio device")]],[[gettext("Buffer Size")],[gettext("Swap Mode (0:No, 1:Yes)")]],list("vec",1,"vec",1),exprs);
+ [ok,this.N,this.swap,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"WRITEAU_f")],[" "],[gettext("Write \'.au\' sound file on audio device")]],[[gettext("Buffer Size")],[gettext("Swap Mode (0:No, 1:Yes)")]],list("vec",1,"vec",1),exprs);
if (!ok) {
break;
}
nin = 1;
fname1 = "/dev/audio";
frmt1 = "uc ";
- if (this.alreadyran&&(N!=ipar[5-1])) {
+ if (this.alreadyran&&(this.N!=ipar[5-1])) {
block_parameter_error(msprintf(gettext("You cannot modify \'%s\' when running."),gettext("Buffer Size")),gettext("End current simulation first"));
ok = false;
- } else if (N<1) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Buffer Size"),N),gettext("Strictly positive integer expected."));
+ } else if (this.N<1) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Buffer Size"),this.N),gettext("Strictly positive integer expected."));
ok = false;
}
- if (swap!=0&&swap!=1) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Swap Mode"),swap),msprintf(gettext("Must be in the interval %s."),"[0, 1]"));
+ if (this.swap!=0&&this.swap!=1) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Swap Mode"),this.swap),msprintf(gettext("Must be in the interval %s."),"[0, 1]"));
ok = false;
}
if (ok) {
- ipar = [[length(fname1)],[this._str2code[frmt1-1]],[N],[swap],[this._str2code[fname1-1]]];
- if (prod(size(dstate))!=(nin+1)*N+2) {
- dstate = [[-1],[lunit],[zeros((nin+1)*N,1)]];
+ ipar = [[length(fname1)],[this._str2code[frmt1-1]],[this.N],[this.swap],[this._str2code[fname1-1]]];
+ if (prod(size(dstate))!=(nin+1)*this.N+2) {
+ dstate = [[-1],[lunit],[zeros((nin+1)*this.N,1)]];
}
model.in1 = 1;
model.dstate = dstate;
diff --git a/js/Sinks/WRITEAU_f.pickle b/js/Sinks/WRITEAU_f.pickle
index 8a32035f..b377a7a6 100644
--- a/js/Sinks/WRITEAU_f.pickle
+++ b/js/Sinks/WRITEAU_f.pickle
@@ -8,6 +8,10 @@ aS'x'
p3
aS'alreadyran'
p4
-atp5
-Rp6
+aS'swap'
+p5
+aS'N'
+p6
+atp7
+Rp8
. \ No newline at end of file
diff --git a/js/Sinks/WRITEC_f.js b/js/Sinks/WRITEC_f.js
index 0b61f273..f78b9c0d 100644
--- a/js/Sinks/WRITEC_f.js
+++ b/js/Sinks/WRITEC_f.js
@@ -1,22 +1,22 @@
/* autogenerated from "macros/Sinks/WRITEC_f.sci" */
function WRITEC_f() {
WRITEC_f.prototype.define = function WRITEC_f() {
- in1 = 1;
- nin = sum(in1);
+ this.in1 = 1;
+ nin = sum(this.in1);
frmt = "c ";
fname = "foo";
- swap = 0;
+ this.swap = 0;
lunit = 0;
- N = 2;
+ this.N = 2;
model = scicos_model();
model.sim = list("writec",2);
- model.in1 = in1;
+ model.in1 = this.in1;
model.evtin = 1;
- model.dstate = [[-1],[lunit],[zeros((nin+1)*N,1)]];
- model.ipar = [[length(fname)],[this._str2code[frmt-1]],[N],[swap],[this._str2code[fname-1]]];
+ model.dstate = [[-1],[lunit],[zeros((nin+1)*this.N,1)]];
+ model.ipar = [[length(fname)],[this._str2code[frmt-1]],[this.N],[this.swap],[this._str2code[fname-1]]];
model.blocktype = "d";
model.dep_ut = [true,false];
- exprs = [[sci2exp(in1)],[fname],[frmt],[string(N),string(swap)]];
+ exprs = [[sci2exp(this.in1)],[fname],[frmt],[string(this.N),string(this.swap)]];
gr_i = [];
this.x = standard_define([4,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -37,47 +37,47 @@ function WRITEC_f() {
fname = exprs[2-1];
frmt = exprs[3-1];
while (true) {
- [ok,in1,fname1,frmt1,N,swap,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"WRITEC_f")],[" "],[gettext("Write to C binary file")]],[[gettext("Input Size")],[gettext("Output File Name")],[gettext("Output Format")],[gettext("Buffer Size")],[gettext("Swap Mode (0:No, 1:Yes)")]],list("vec",1,"str",1,"str",1,"vec",1,"vec",1),exprs);
+ [ok,this.in1,this.fname1,this.frmt1,this.N,this.swap,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"WRITEC_f")],[" "],[gettext("Write to C binary file")]],[[gettext("Input Size")],[gettext("Output File Name")],[gettext("Output Format")],[gettext("Buffer Size")],[gettext("Swap Mode (0:No, 1:Yes)")]],list("vec",1,"str",1,"str",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- in1 = int(in1);
- nin = in1;
- fname1 = pathconvert(stripblanks(fname1),false,true);
- frmt1 = stripblanks(frmt1);
+ this.in1 = int(this.in1);
+ nin = this.in1;
+ this.fname1 = pathconvert(stripblanks(this.fname1),false,true);
+ this.frmt1 = stripblanks(this.frmt1);
fmts = ["s","l","d","f","c","us","ul","uc","ull","uls","ubl","ubs","dl","fl","ll","sl","db","fb","lb","sb"];
- if (and(frmt1!=fmts)) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %s."),gettext("Input Format"),frmt1),gettext("Valid formats are: "+strcat(fmts,", ")));
+ if (and(this.frmt1!=fmts)) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %s."),gettext("Input Format"),this.frmt1),gettext("Valid formats are: "+strcat(fmts,", ")));
ok = false;
- } else if (this.alreadyran&&fname1!=fname) {
+ } else if (this.alreadyran&&this.fname1!=fname) {
block_parameter_error(msprintf(gettext("You cannot modify \'%s\' when running"),gettext("Input Format")),gettext("End current simulation first."));
ok = false;
- } else if (this.alreadyran&&N!=ipar[5-1]) {
+ } else if (this.alreadyran&&this.N!=ipar[5-1]) {
block_parameter_error(msprintf(gettext("You cannot modify \'Buffer Size\' when running."),gettext("Buffer Size")),gettext("End current simulation first"));
ok = false;
- } else if (fname1=="") {
+ } else if (this.fname1=="") {
block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter."),gettext("Output File Name")),gettext("You must provide a filename."));
- } else if (fileparts(fname1)!="") {
- [pa,fn,ex] = fileparts(fname1);
+ } else if (fileparts(this.fname1)!="") {
+ [pa,fn,ex] = fileparts(this.fname1);
if (!this.isdir[pa-1]) {
block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter."),gettext("Output File Name")),msprintf(gettext("Directory \'%s\' does not exist"),pa));
ok = false;
}
- } else if (N<1) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Buffer Size"),N),gettext("Strictly positive integer expected."));
+ } else if (this.N<1) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Buffer Size"),this.N),gettext("Strictly positive integer expected."));
ok = false;
- } else if (in1<=0) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Input Size"),in1),gettext("Strictly positive integer expected."));
+ } else if (this.in1<=0) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Input Size"),this.in1),gettext("Strictly positive integer expected."));
ok = false;
- } else if (swap!=0&&swap!=1) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Swap Mode"),swap),msprintf(gettext("Must be in the interval %s."),"[0, 1]"));
+ } else if (this.swap!=0&&this.swap!=1) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Swap Mode"),this.swap),msprintf(gettext("Must be in the interval %s."),"[0, 1]"));
ok = false;
}
- frmt1 = part(frmt1,1,3);
+ this.frmt1 = part(this.frmt1,1,3);
if (ok) {
- ipar = [[length(fname1)],[this._str2code[frmt1-1]],[N],[swap],[this._str2code[fname1-1]]];
- if (prod(size(dstate))!=(nin+1)*N+2) {
- dstate = [[-1],[lunit],[zeros((nin+1)*N,1)]];
+ ipar = [[length(this.fname1)],[this._str2code[this.frmt1-1]],[this.N],[this.swap],[this._str2code[this.fname1-1]]];
+ if (prod(size(dstate))!=(nin+1)*this.N+2) {
+ dstate = [[-1],[lunit],[zeros((nin+1)*this.N,1)]];
}
model.in1 = nin;
model.dstate = dstate;
diff --git a/js/Sinks/WRITEC_f.pickle b/js/Sinks/WRITEC_f.pickle
index b0c10e53..1d281f84 100644
--- a/js/Sinks/WRITEC_f.pickle
+++ b/js/Sinks/WRITEC_f.pickle
@@ -4,12 +4,22 @@ p0
((lp1
S'isdir'
p2
-aS'x'
-p3
aS'_str2code'
+p3
+aS'in1'
p4
-aS'alreadyran'
+aS'fname1'
p5
-atp6
-Rp7
+aS'N'
+p6
+aS'frmt1'
+p7
+aS'swap'
+p8
+aS'x'
+p9
+aS'alreadyran'
+p10
+atp11
+Rp12
. \ No newline at end of file
diff --git a/js/Sources/CLKINV_f.js b/js/Sources/CLKINV_f.js
index 5d68df08..88b78d6e 100644
--- a/js/Sources/CLKINV_f.js
+++ b/js/Sources/CLKINV_f.js
@@ -1,18 +1,18 @@
/* autogenerated from "macros/Sources/CLKINV_f.sci" */
function CLKINV_f() {
CLKINV_f.prototype.define = function CLKINV_f() {
- prt = 1;
+ this.prt = 1;
model = scicos_model();
model.sim = "input";
model.evtout = 1;
- model.ipar = prt;
+ model.ipar = this.prt;
model.blocktype = "d";
model.firing = -1;
model.dep_ut = [false,false];
- exprs = string(prt);
+ exprs = string(this.prt);
gr_i = [];
this.x = standard_define([1,1],model,exprs,gr_i);
- return new BasicBlock(this.x);
+ return new EventInBlock(this.x);
}
CLKINV_f.prototype.details = function CLKINV_f() {
return this.x;
@@ -26,15 +26,15 @@ function CLKINV_f() {
exprs = graphics.exprs;
exprs = exprs[1-1];
while (true) {
- [ok,prt,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"CLKINV_f")],[" "],[gettext("Event input port")],[" "]],"Port Number",list("vec",1),exprs);
- prt = int(prt);
+ [ok,this.prt,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"CLKINV_f")],[" "],[gettext("Event input port")],[" "]],"Port Number",list("vec",1),exprs);
+ this.prt = int(this.prt);
if (!ok) {
break;
}
- if (prt<=0) {
- block_parameter_error(msprintf(gettext("Wrong values for \'Port Number\' parameter: %d."),prt),gettext("Strictly positive integer expected."));
+ if (this.prt<=0) {
+ block_parameter_error(msprintf(gettext("Wrong values for \'Port Number\' parameter: %d."),this.prt),gettext("Strictly positive integer expected."));
} else {
- model.ipar = prt;
+ model.ipar = this.prt;
model.evtout = 1;
model.firing = -1;
graphics.exprs = exprs;
@@ -43,6 +43,6 @@ function CLKINV_f() {
break;
}
}
- return new BasicBlock(this.x);
+ return new EventInBlock(this.x);
}
}
diff --git a/js/Sources/CLKINV_f.pickle b/js/Sources/CLKINV_f.pickle
index 0d1dde24..48ee82e7 100644
--- a/js/Sources/CLKINV_f.pickle
+++ b/js/Sources/CLKINV_f.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'prt'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Sources/CLKIN_f.js b/js/Sources/CLKIN_f.js
index 0e8f5f83..8f1f7db5 100644
--- a/js/Sources/CLKIN_f.js
+++ b/js/Sources/CLKIN_f.js
@@ -1,15 +1,15 @@
/* autogenerated from "macros/Sources/CLKIN_f.sci" */
function CLKIN_f() {
CLKIN_f.prototype.define = function CLKIN_f() {
- prt = 1;
+ this.prt = 1;
model = scicos_model();
model.sim = "input";
model.evtout = 1;
- model.ipar = prt;
+ model.ipar = this.prt;
model.blocktype = "d";
model.firing = -1;
model.dep_ut = [false,false];
- exprs = string(prt);
+ exprs = string(this.prt);
this.x = standard_define([1,1],model,exprs," ");
return new BasicBlock(this.x);
}
@@ -25,15 +25,15 @@ function CLKIN_f() {
exprs = graphics.exprs;
exprs = exprs[1-1];
while (true) {
- [ok,prt,exprs] = scicos_getvalue("Set Event Input block parameters","Port number",list("vec",1),exprs);
- prt = int(prt);
+ [ok,this.prt,exprs] = scicos_getvalue("Set Event Input block parameters","Port number",list("vec",1),exprs);
+ this.prt = int(this.prt);
if (!ok) {
break;
}
- if (prt<=0) {
+ if (this.prt<=0) {
message("Port number must be a positive integer");
} else {
- model.ipar = prt;
+ model.ipar = this.prt;
model.evtout = 1;
model.firing = -1;
graphics.exprs = exprs;
diff --git a/js/Sources/CLKIN_f.pickle b/js/Sources/CLKIN_f.pickle
index 0d1dde24..48ee82e7 100644
--- a/js/Sources/CLKIN_f.pickle
+++ b/js/Sources/CLKIN_f.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'prt'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Sources/CLOCK_c.js b/js/Sources/CLOCK_c.js
index dde29deb..5dd8d867 100644
--- a/js/Sources/CLOCK_c.js
+++ b/js/Sources/CLOCK_c.js
@@ -63,27 +63,27 @@ function CLOCK_c() {
dt_old = model.rpar[1-1];
model_n = model;
while (true) {
- [ok,dt,t0,exprs0] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"CLOCK_c")],[" "],[gettext("Event clock generator")],[" "],[gettext("&nbsp; Do not start if \'Initialisation Time\' is negative")],[" "]],[[gettext("Period")],[gettext("Initialisation Time")]],list("vec",1,"vec",1),exprs);
+ [ok,this.dt,this.t0,this.exprs0] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"CLOCK_c")],[" "],[gettext("Event clock generator")],[" "],[gettext("&nbsp; Do not start if \'Initialisation Time\' is negative")],[" "]],[[gettext("Period")],[gettext("Initialisation Time")]],list("vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- if (dt<=0) {
- block_parameter_error(msprintf(gettext("Wrong values for \'%s\' parameter: %5.1e."),gettext("Period"),dt),gettext("Strictly positive number expected."));
+ if (this.dt<=0) {
+ block_parameter_error(msprintf(gettext("Wrong values for \'%s\' parameter: %5.1e."),gettext("Period"),this.dt),gettext("Strictly positive number expected."));
ok = false;
}
if (ok) {
- xx.graphics.exprs = exprs0;
- model.rpar = [[dt],[t0]];
- model.firing = t0;
+ xx.graphics.exprs = this.exprs0;
+ model.rpar = [[this.dt],[this.t0]];
+ model.firing = this.t0;
xx.model = model;
arg1.model.rpar.objs[path-1] = xx;
break;
}
}
- if (!and([t0_old,dt_old]==[t0,dt])) {
+ if (!and([t0_old,dt_old]==[this.t0,this.dt])) {
newpar[size(newpar)+1-1] = path;
}
- if (t0_old!=t0) {
+ if (t0_old!=this.t0) {
needcompile = 2;
} else {
needcompile = 0;
diff --git a/js/Sources/CLOCK_c.pickle b/js/Sources/CLOCK_c.pickle
index 2287bb36..ecce30af 100644
--- a/js/Sources/CLOCK_c.pickle
+++ b/js/Sources/CLOCK_c.pickle
@@ -4,8 +4,14 @@ p0
((lp1
S'x'
p2
-aS'EVTDLY_c'
+aS'dt'
p3
-atp4
-Rp5
+aS'EVTDLY_c'
+p4
+aS'exprs0'
+p5
+aS't0'
+p6
+atp7
+Rp8
. \ No newline at end of file
diff --git a/js/Sources/CLOCK_f.js b/js/Sources/CLOCK_f.js
index 97b65820..ca2d5bd3 100644
--- a/js/Sources/CLOCK_f.js
+++ b/js/Sources/CLOCK_f.js
@@ -63,27 +63,27 @@ function CLOCK_f() {
dt_old = model.rpar;
model_n = model;
while (true) {
- [ok,dt,t0,exprs0] = scicos_getvalue("Set Clock block parameters",[["Period"],["Init time"]],list("vec",1,"vec",1),exprs);
+ [ok,this.dt,this.t0,this.exprs0] = scicos_getvalue("Set Clock block parameters",[["Period"],["Init time"]],list("vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- if (dt<=0) {
+ if (this.dt<=0) {
message("period must be positive");
ok = false;
}
if (ok) {
- xx.graphics.exprs = exprs0;
- model.rpar = dt;
- model.firing = t0;
+ xx.graphics.exprs = this.exprs0;
+ model.rpar = this.dt;
+ model.firing = this.t0;
xx.model = model;
arg1.model.rpar.objs[path-1] = xx;
break;
}
}
- if (!and([t0_old,dt_old]==[t0,dt])||!and(exprs0==exprs)) {
+ if (!and([t0_old,dt_old]==[this.t0,this.dt])||!and(this.exprs0==exprs)) {
newpar[size(newpar)+1-1] = path;
}
- if (t0_old!=t0) {
+ if (t0_old!=this.t0) {
needcompile = 2;
} else {
needcompile = 0;
diff --git a/js/Sources/CLOCK_f.pickle b/js/Sources/CLOCK_f.pickle
index 0d1dde24..5cf559c5 100644
--- a/js/Sources/CLOCK_f.pickle
+++ b/js/Sources/CLOCK_f.pickle
@@ -4,6 +4,12 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'dt'
+p3
+aS'exprs0'
+p4
+aS't0'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/Sources/CONST.js b/js/Sources/CONST.js
index 35f02d3a..751ef000 100644
--- a/js/Sources/CONST.js
+++ b/js/Sources/CONST.js
@@ -1,15 +1,15 @@
/* autogenerated from "macros/Sources/CONST.sci" */
function CONST() {
CONST.prototype.define = function CONST() {
- C = 1;
+ this.C = 1;
model = scicos_model();
model.sim = list("cstblk4",4);
model.in1 = [];
model.out = 1;
- model.rpar = C;
+ model.rpar = this.C;
model.blocktype = "d";
model.dep_ut = [false,false];
- exprs = strcat(sci2exp(C));
+ exprs = strcat(sci2exp(this.C));
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -25,18 +25,18 @@ function CONST() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,C,exprs] = scicos_getvalue(["Set Contant Block"],"Constant",list("vec",-1),exprs);
+ [ok,this.C,exprs] = scicos_getvalue(["Set Contant Block"],"Constant",list("vec",-1),exprs);
if (!ok) {
break;
}
- sz = size(C);
- nout = size(C,"*");
+ sz = size(this.C);
+ nout = size(this.C,"*");
if (nout==0) {
message("C must have at least one element");
} else if (and(sz>1)) {
message("C matrix is not supported, use CONST_m instead");
} else {
- model.rpar = C.slice();
+ model.rpar = this.C.slice();
model.out = nout;
graphics.exprs = exprs;
this.x.graphics = graphics;
diff --git a/js/Sources/CONST.pickle b/js/Sources/CONST.pickle
index 0d1dde24..4ccc1da6 100644
--- a/js/Sources/CONST.pickle
+++ b/js/Sources/CONST.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'C'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Sources/CONST_f.js b/js/Sources/CONST_f.js
index 0030dc8f..c5ed3881 100644
--- a/js/Sources/CONST_f.js
+++ b/js/Sources/CONST_f.js
@@ -1,15 +1,15 @@
/* autogenerated from "macros/Sources/CONST_f.sci" */
function CONST_f() {
CONST_f.prototype.define = function CONST_f() {
- C = 1;
+ this.C = 1;
model = scicos_model();
model.sim = list("cstblk",1);
model.in1 = [];
model.out = 1;
- model.rpar = C;
+ model.rpar = this.C;
model.blocktype = "d";
model.dep_ut = [false,false];
- exprs = strcat(sci2exp(C));
+ exprs = strcat(sci2exp(this.C));
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -25,15 +25,15 @@ function CONST_f() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,C,exprs] = scicos_getvalue(["Set Contant Block"],"Constant",list("vec",-1),exprs);
+ [ok,this.C,exprs] = scicos_getvalue(["Set Contant Block"],"Constant",list("vec",-1),exprs);
if (!ok) {
break;
}
- nout = size(C,"*");
+ nout = size(this.C,"*");
if (nout==0) {
message("C must have at least one element");
} else {
- model.rpar = C.slice();
+ model.rpar = this.C.slice();
model.out = nout;
graphics.exprs = exprs;
this.x.graphics = graphics;
diff --git a/js/Sources/CONST_f.pickle b/js/Sources/CONST_f.pickle
index 0d1dde24..4ccc1da6 100644
--- a/js/Sources/CONST_f.pickle
+++ b/js/Sources/CONST_f.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'C'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Sources/CONST_m.js b/js/Sources/CONST_m.js
index 8a0bf6a1..37110709 100644
--- a/js/Sources/CONST_m.js
+++ b/js/Sources/CONST_m.js
@@ -1,18 +1,18 @@
/* autogenerated from "macros/Sources/CONST_m.sci" */
function CONST_m() {
CONST_m.prototype.define = function CONST_m() {
- C = [1];
+ this.C = [1];
model = scicos_model();
model.sim = list("cstblk4",4);
model.in1 = [];
- model.out = size(C,1);
+ model.out = size(this.C,1);
model.in2 = [];
- model.out2 = size(C,2);
- model.rpar = C;
+ model.out2 = size(this.C,2);
+ model.rpar = this.C;
model.opar = list();
model.blocktype = "d";
model.dep_ut = [false,false];
- exprs = sci2exp(C);
+ exprs = sci2exp(this.C);
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -28,33 +28,33 @@ function CONST_m() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,C,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"CONST_m")],[" "],[gettext("Constant value generator")],[" "]],gettext("Constant Value"),list("vec",-1),exprs);
+ [ok,this.C,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"CONST_m")],[" "],[gettext("Constant value generator")],[" "]],gettext("Constant Value"),list("vec",-1),exprs);
if (!ok) {
break;
}
- nout = size(C);
+ nout = size(this.C);
if (find(nout==0)!=[]) {
block_parameter_error(msprintf(gettext("Wrong size for \'%s\' parameter"),gettext("Constant Value")),gettext("Constant value must have at least one element."));
} else {
model.sim = list("cstblk4_m",4);
- model.opar = list(C);
- if ((this.type[C-1]==1)) {
- if (isreal(C)) {
+ model.opar = list(this.C);
+ if ((this.type[this.C-1]==1)) {
+ if (isreal(this.C)) {
ot = 1;
} else {
ot = 2;
}
- } else if ((typeof(C)=="int32")) {
+ } else if ((typeof(this.C)=="int32")) {
ot = 3;
- } else if ((typeof(C)=="int16")) {
+ } else if ((typeof(this.C)=="int16")) {
ot = 4;
- } else if ((typeof(C)=="int8")) {
+ } else if ((typeof(this.C)=="int8")) {
ot = 5;
- } else if ((typeof(C)=="uint32")) {
+ } else if ((typeof(this.C)=="uint32")) {
ot = 6;
- } else if ((typeof(C)=="uint16")) {
+ } else if ((typeof(this.C)=="uint16")) {
ot = 7;
- } else if ((typeof(C)=="uint8")) {
+ } else if ((typeof(this.C)=="uint8")) {
ot = 8;
} else {
block_parameter_error(msprintf(gettext("Wrong type for \'%s\' parameter"),gettext("Constant Value")),gettext("Value type must be a numeric type (double, complex, int, int8, ...)."));
diff --git a/js/Sources/CONST_m.pickle b/js/Sources/CONST_m.pickle
index 54a16ece..4ca64528 100644
--- a/js/Sources/CONST_m.pickle
+++ b/js/Sources/CONST_m.pickle
@@ -4,8 +4,10 @@ p0
((lp1
S'x'
p2
-aS'type'
+aS'C'
p3
-atp4
-Rp5
+aS'type'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Sources/CURVE_c.pickle b/js/Sources/CURVE_c.pickle
index b1c7cff9..83738a73 100644
--- a/js/Sources/CURVE_c.pickle
+++ b/js/Sources/CURVE_c.pickle
@@ -4,18 +4,28 @@ p0
((lp1
S'rparin'
p2
-aS'ixy'
+aS'yy'
p3
-aS'iparin'
+aS'xx'
p4
-aS'argn'
+aS'ixy'
p5
-aS'xy'
+aS'PeriodicOption'
p6
-aS'x'
+aS'argn'
p7
-aS'curwin'
+aS'xy'
p8
-atp9
-Rp10
+aS'x'
+p9
+aS'curwin'
+p10
+aS'Method'
+p11
+aS'graf'
+p12
+aS'iparin'
+p13
+atp14
+Rp15
. \ No newline at end of file
diff --git a/js/Sources/Counter.js b/js/Sources/Counter.js
index 3cd43ab3..88f6a593 100644
--- a/js/Sources/Counter.js
+++ b/js/Sources/Counter.js
@@ -1,19 +1,19 @@
/* autogenerated from "macros/Sources/Counter.sci" */
function Counter() {
Counter.prototype.define = function Counter() {
- minim = 0;
- maxim = 2;
- rule = 1;
+ this.minim = 0;
+ this.maxim = 2;
+ this.rule = 1;
model = scicos_model();
model.sim = list("counter",4);
model.evtin = 1;
model.out = 1;
model.out2 = 1;
model.dstate = 0;
- model.ipar = [[rule],[maxim],[minim]];
+ model.ipar = [[this.rule],[this.maxim],[this.minim]];
model.blocktype = "c";
model.dep_ut = [false,false];
- exprs = [[string(minim)],[string(maxim)],[string(rule)]];
+ exprs = [[string(this.minim)],[string(this.maxim)],[string(this.rule)]];
gr_i = [];
this.x = standard_define([3,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -29,20 +29,20 @@ function Counter() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,minim,maxim,rule,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"Counter")],[" "],[gettext("Integer counter generator")],[" "]],[[gettext("Minimum")],[gettext("Maximum")],[gettext("Rule (1:Increment, 2:Decrement)")]],list("vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.minim,this.maxim,this.rule,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"Counter")],[" "],[gettext("Integer counter generator")],[" "]],[[gettext("Minimum")],[gettext("Maximum")],[gettext("Rule (1:Increment, 2:Decrement)")]],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- maxim = int(maxim);
- minim = int(minim);
- if (maxim<minim) {
- block_parameter_error(msprintf(gettext("Wrong values for \'Maximum\' and \'Minimum\' parameters: %d &lt; %d"),minim,maxim),msprintf(gettext("\'Minimum\' must be less than \'Maximum\'.")));
- } else if ((rule!=1&&rule!=2)) {
- block_parameter_error(msprintf(gettext("Wrong value for \'Rule\' parameter: %d"),rule),msprintf(gettext("Must be in the interval %s."),"[1,2]"));
+ this.maxim = int(this.maxim);
+ this.minim = int(this.minim);
+ if (this.maxim<this.minim) {
+ block_parameter_error(msprintf(gettext("Wrong values for \'Maximum\' and \'Minimum\' parameters: %d &lt; %d"),this.minim,this.maxim),msprintf(gettext("\'Minimum\' must be less than \'Maximum\'.")));
+ } else if ((this.rule!=1&&this.rule!=2)) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'Rule\' parameter: %d"),this.rule),msprintf(gettext("Must be in the interval %s."),"[1,2]"));
} else {
graphics.exprs = exprs;
model.dstate = 0;
- model.ipar = [[rule],[maxim],[minim]];
+ model.ipar = [[this.rule],[this.maxim],[this.minim]];
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Sources/Counter.pickle b/js/Sources/Counter.pickle
index 0d1dde24..585bf9da 100644
--- a/js/Sources/Counter.pickle
+++ b/js/Sources/Counter.pickle
@@ -4,6 +4,12 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'maxim'
+p3
+aS'rule'
+p4
+aS'minim'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/Sources/FROMWS_c.js b/js/Sources/FROMWS_c.js
index 89e1212c..a76fc174 100644
--- a/js/Sources/FROMWS_c.js
+++ b/js/Sources/FROMWS_c.js
@@ -1,23 +1,23 @@
/* autogenerated from "macros/Sources/FROMWS_c.sci" */
function FROMWS_c() {
FROMWS_c.prototype.define = function FROMWS_c() {
- varnam = "V";
- Method = 1;
- ZC = 1;
- OutEnd = 0;
+ this.varnam = "V";
+ this.Method = 1;
+ this.ZC = 1;
+ this.OutEnd = 0;
model = scicos_model();
model.sim = list("fromws_c",4);
model.out = -1;
model.out2 = -2;
model.outtyp = -1;
- model.ipar = [[length(varnam)],[this._str2code[varnam-1]],[Method],[ZC],[OutEnd]];
+ model.ipar = [[length(this.varnam)],[this._str2code[this.varnam-1]],[this.Method],[this.ZC],[this.OutEnd]];
model.evtin = [1];
model.evtout = [1];
model.firing = [0];
model.blocktype = "d";
model.dep_ut = [false,true];
gr_i = [];
- exprs = [[string(varnam)],[string(Method)],[string(ZC)],[string(OutEnd)]];
+ exprs = [[string(this.varnam)],[string(this.Method)],[string(this.ZC)],[string(this.OutEnd)]];
this.x = standard_define([3.5,2],model,exprs,gr_i);
return new BasicBlock(this.x);
}
@@ -32,19 +32,19 @@ function FROMWS_c() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,varnam,Method,ZC,OutEnd,exprs] = scicos_getvalue("Set From_Workspace block parameters",[["Variable name"],["Interpolation Method"],["Enable zero crossing(0:No, 1:Yes)?"],["Output at end(0:Zero, 1:Hold, 2:Repeat)"]],list("str",1,"vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.varnam,this.Method,this.ZC,this.OutEnd,exprs] = scicos_getvalue("Set From_Workspace block parameters",[["Variable name"],["Interpolation Method"],["Enable zero crossing(0:No, 1:Yes)?"],["Output at end(0:Zero, 1:Hold, 2:Repeat)"]],list("str",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- if (!(Method==0||Method==1||Method==2||Method==3)) {
+ if (!(this.Method==0||this.Method==1||this.Method==2||this.Method==3)) {
message("Interpolation method should be chosen in [0,1,2,3]");
ok = false;
}
- if (!(ZC==0||ZC==1)) {
+ if (!(this.ZC==0||this.ZC==1)) {
message("Zero crossing should be either 0 or 1");
ok = false;
}
- if (!(OutEnd==0||OutEnd==1||OutEnd==2)) {
+ if (!(this.OutEnd==0||this.OutEnd==1||this.OutEnd==2)) {
message("Output at end option should be either 0 or 1");
ok = false;
}
@@ -55,7 +55,7 @@ function FROMWS_c() {
ok = false;
}
if (ok) {
- model.ipar = [[length(varnam)],[this._str2code[varnam-1]],[Method],[ZC],[OutEnd]];
+ model.ipar = [[length(this.varnam)],[this._str2code[this.varnam-1]],[this.Method],[this.ZC],[this.OutEnd]];
[model,graphics,ok] = set_io(model,graphics,list(),list([-1,-2],-1),1,1);
if (ok) {
graphics.exprs = exprs;
diff --git a/js/Sources/FROMWS_c.pickle b/js/Sources/FROMWS_c.pickle
index bcacb8ca..eeb22102 100644
--- a/js/Sources/FROMWS_c.pickle
+++ b/js/Sources/FROMWS_c.pickle
@@ -4,8 +4,16 @@ p0
((lp1
S'_str2code'
p2
-aS'x'
+aS'ZC'
p3
-atp4
-Rp5
+aS'OutEnd'
+p4
+aS'x'
+p5
+aS'Method'
+p6
+aS'varnam'
+p7
+atp8
+Rp9
. \ No newline at end of file
diff --git a/js/Sources/GENSIN_f.js b/js/Sources/GENSIN_f.js
index ff5f9ec4..c7722a4e 100644
--- a/js/Sources/GENSIN_f.js
+++ b/js/Sources/GENSIN_f.js
@@ -27,17 +27,17 @@ function GENSIN_f() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,M,F,P,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"GENSIN_f")],[" "],[gettext("Sine wave generator")],[" "]],[[gettext("Magnitude")],[gettext("Frequency (rad/s)")],[gettext("Phase (rad)")]],list("vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.M,this.F,this.P,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"GENSIN_f")],[" "],[gettext("Sine wave generator")],[" "]],[[gettext("Magnitude")],[gettext("Frequency (rad/s)")],[gettext("Phase (rad)")]],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- if (F<0) {
- block_parameter_error(msprintf(gettext("Wrong value for \'Frequency\' parameter: %e."),F),gettext("Strictly positive integer expected."));
+ if (this.F<0) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'Frequency\' parameter: %e."),this.F),gettext("Strictly positive integer expected."));
ok = false;
}
if (ok) {
[model,graphics,ok] = check_io(model,graphics,[],1,[],[]);
- model.rpar = [[M],[F],[P]];
+ model.rpar = [[this.M],[this.F],[this.P]];
model.out2 = 1;
model.outtyp = 1;
graphics.exprs = exprs;
diff --git a/js/Sources/GENSIN_f.pickle b/js/Sources/GENSIN_f.pickle
index 0d1dde24..553882df 100644
--- a/js/Sources/GENSIN_f.pickle
+++ b/js/Sources/GENSIN_f.pickle
@@ -4,6 +4,12 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'M'
+p3
+aS'P'
+p4
+aS'F'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/Sources/GENSQR_f.js b/js/Sources/GENSQR_f.js
index 5c32c444..5f3895f8 100644
--- a/js/Sources/GENSQR_f.js
+++ b/js/Sources/GENSQR_f.js
@@ -1,17 +1,17 @@
/* autogenerated from "macros/Sources/GENSQR_f.sci" */
function GENSQR_f() {
GENSQR_f.prototype.define = function GENSQR_f() {
- Amplitude = 1;
+ this.Amplitude = 1;
model = scicos_model();
model.sim = "gensqr";
model.out = 1;
model.out2 = 1;
model.outtyp = 1;
model.evtin = 1;
- model.dstate = Amplitude;
+ model.dstate = this.Amplitude;
model.blocktype = "d";
model.dep_ut = [false,false];
- exprs = string(Amplitude);
+ exprs = string(this.Amplitude);
gr_i = [];
this.x = standard_define([3,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -30,12 +30,12 @@ function GENSQR_f() {
exprs = exprs[2-1];
}
while (true) {
- [ok,Amplitude,exprs] = scicos_getvalue(["Set Square generator block parameters"],["Amplitude"],list("vec",1),exprs);
+ [ok,this.Amplitude,exprs] = scicos_getvalue(["Set Square generator block parameters"],["Amplitude"],list("vec",1),exprs);
if (!ok) {
break;
}
graphics.exprs = exprs;
- model.dstate = Amplitude;
+ model.dstate = this.Amplitude;
model.out2 = 1;
model.outtyp = 1;
this.x.graphics = graphics;
diff --git a/js/Sources/GENSQR_f.pickle b/js/Sources/GENSQR_f.pickle
index 0d1dde24..87270454 100644
--- a/js/Sources/GENSQR_f.pickle
+++ b/js/Sources/GENSQR_f.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'Amplitude'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Sources/GEN_SQR.pickle b/js/Sources/GEN_SQR.pickle
index 2a35c6de..0ff4a873 100644
--- a/js/Sources/GEN_SQR.pickle
+++ b/js/Sources/GEN_SQR.pickle
@@ -4,8 +4,16 @@ p0
((lp1
S'needcompile'
p2
-aS'x'
+aS'scicos_context.Amax'
p3
-atp4
-Rp5
+aS'scicos_context.rule'
+p4
+aS'x'
+p5
+aS'scicos_context.Amin'
+p6
+aS'scicos_context.F'
+p7
+atp8
+Rp9
. \ No newline at end of file
diff --git a/js/Sources/INIMPL_f.js b/js/Sources/INIMPL_f.js
index 3b67b166..269e1c99 100644
--- a/js/Sources/INIMPL_f.js
+++ b/js/Sources/INIMPL_f.js
@@ -12,12 +12,12 @@ function INIMPL_f() {
mo.model = "PORT";
mo.outputs = "n";
model.equations = mo;
- prt = 1;
+ this.prt = 1;
exprs = "1";
gr_i = [];
this.x = standard_define([1,1],model,exprs,gr_i);
this.x.graphics.out_implicit = ["I"];
- return new BasicBlock(this.x);
+ return new ImplicitInBlock(this.x);
}
INIMPL_f.prototype.details = function INIMPL_f() {
return this.x;
@@ -33,25 +33,25 @@ function INIMPL_f() {
exprs = exprs[1-1];
}
while (true) {
- [ok,prt,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"INIMPL_f")],[" "],[gettext("Implicit input port")],[" "]],"Port Number",list("vec",1),exprs);
+ [ok,this.prt,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"INIMPL_f")],[" "],[gettext("Implicit input port")],[" "]],"Port Number",list("vec",1),exprs);
if (!ok) {
break;
}
- prt = int(prt);
- if (prt<=0) {
- block_parameter_error(msprintf(gettext("Wrong value for \'Port Number\' parameter: %d."),prt),gettext("Strictly positive integer expected."));
+ this.prt = int(this.prt);
+ if (this.prt<=0) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'Port Number\' parameter: %d."),this.prt),gettext("Strictly positive integer expected."));
} else {
- if (model.ipar!=prt) {
+ if (model.ipar!=this.prt) {
needcompile = 4;
y = needcompile;
}
- model.ipar = prt;
+ model.ipar = this.prt;
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
break;
}
}
- return new BasicBlock(this.x);
+ return new ImplicitInBlock(this.x);
}
}
diff --git a/js/Sources/INIMPL_f.pickle b/js/Sources/INIMPL_f.pickle
index 0d1dde24..48ee82e7 100644
--- a/js/Sources/INIMPL_f.pickle
+++ b/js/Sources/INIMPL_f.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'prt'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Sources/IN_f.js b/js/Sources/IN_f.js
index d6ea593f..5c6512de 100644
--- a/js/Sources/IN_f.js
+++ b/js/Sources/IN_f.js
@@ -13,7 +13,7 @@ function IN_f() {
exprs = sci2exp(prt);
gr_i = [];
this.x = standard_define([1,1],model,exprs,gr_i);
- return new BasicBlock(this.x);
+ return new ExplicitInBlock(this.x);
}
IN_f.prototype.details = function IN_f() {
return this.x;
@@ -59,6 +59,6 @@ function IN_f() {
break;
}
}
- return new BasicBlock(this.x);
+ return new ExplicitInBlock(this.x);
}
}
diff --git a/js/Sources/Modulo_Count.js b/js/Sources/Modulo_Count.js
index 8fc07b39..7da94036 100644
--- a/js/Sources/Modulo_Count.js
+++ b/js/Sources/Modulo_Count.js
@@ -1,17 +1,17 @@
/* autogenerated from "macros/Sources/Modulo_Count.sci" */
function Modulo_Count() {
Modulo_Count.prototype.define = function Modulo_Count() {
- ini_c = 0;
- base = 3;
+ this.ini_c = 0;
+ this.base = 3;
model = scicos_model();
model.sim = list("modulo_count",4);
model.evtin = 1;
model.out = 1;
- model.dstate = ini_c;
- model.ipar = base;
+ model.dstate = this.ini_c;
+ model.ipar = this.base;
model.blocktype = "c";
model.dep_ut = [false,false];
- exprs = [[string(ini_c)],[string(base)]];
+ exprs = [[string(this.ini_c)],[string(this.base)]];
gr_i = [];
this.x = standard_define([3,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -27,20 +27,20 @@ function Modulo_Count() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,ini_c,base,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"Modulo_Count")],[" "],[gettext("Modulo counter (0 to N counter)")],[" "]],[[gettext("Initial State (zero or positive number)")],[gettext("Upper Limit (positive number)")]],list("vec",1,"vec",1),exprs);
- ini_c = int(ini_c);
- base = int(base);
+ [ok,this.ini_c,this.base,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"Modulo_Count")],[" "],[gettext("Modulo counter (0 to N counter)")],[" "]],[[gettext("Initial State (zero or positive number)")],[gettext("Upper Limit (positive number)")]],list("vec",1,"vec",1),exprs);
+ this.ini_c = int(this.ini_c);
+ this.base = int(this.base);
if (!ok) {
break;
}
- if (ini_c<0) {
- block_parameter_error(msprintf(gettext("Wrong value for \'Initial State\' parameter: %d."),ini_c),gettext("Null or positive integer expected."));
- } else if (base<=0) {
- block_parameter_error(msprintf(gettext("Wrong values for \'Upper Limit\' parameter: %d."),base),gettext("Strictly positive integer expected."));
+ if (this.ini_c<0) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'Initial State\' parameter: %d."),this.ini_c),gettext("Null or positive integer expected."));
+ } else if (this.base<=0) {
+ block_parameter_error(msprintf(gettext("Wrong values for \'Upper Limit\' parameter: %d."),this.base),gettext("Strictly positive integer expected."));
} else {
graphics.exprs = exprs;
- model.ipar = base;
- model.dstate = ini_c;
+ model.ipar = this.base;
+ model.dstate = this.ini_c;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Sources/Modulo_Count.pickle b/js/Sources/Modulo_Count.pickle
index 0d1dde24..dab0d124 100644
--- a/js/Sources/Modulo_Count.pickle
+++ b/js/Sources/Modulo_Count.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'base'
+p3
+aS'ini_c'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Sources/PULSE_SC.pickle b/js/Sources/PULSE_SC.pickle
index 2a35c6de..0fb8e63d 100644
--- a/js/Sources/PULSE_SC.pickle
+++ b/js/Sources/PULSE_SC.pickle
@@ -4,8 +4,16 @@ p0
((lp1
S'needcompile'
p2
-aS'x'
+aS'scicos_context.W'
p3
-atp4
-Rp5
+aS'x'
+p4
+aS'scicos_context.A'
+p5
+aS'scicos_context.F'
+p6
+aS'scicos_context.E'
+p7
+atp8
+Rp9
. \ No newline at end of file
diff --git a/js/Sources/RAMP.js b/js/Sources/RAMP.js
index ef936b69..41a7654c 100644
--- a/js/Sources/RAMP.js
+++ b/js/Sources/RAMP.js
@@ -1,10 +1,10 @@
/* autogenerated from "macros/Sources/RAMP.sci" */
function RAMP() {
RAMP.prototype.define = function RAMP() {
- slope = 0;
- iout = 0;
- stt = 0;
- rpar = [[slope],[stt],[iout]];
+ this.slope = 0;
+ this.iout = 0;
+ this.stt = 0;
+ rpar = [[this.slope],[this.stt],[this.iout]];
model = scicos_model();
model.sim = list("ramp",4);
model.in1 = [];
@@ -30,14 +30,14 @@ function RAMP() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,slope,stt,iout,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"RAMP")],[" "],[gettext("Ramp function")],[" "]],[[gettext("Slope")],[gettext("Start Time")],[gettext("Initial Value")]],list("vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.slope,this.stt,this.iout,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"RAMP")],[" "],[gettext("Ramp function")],[" "]],[[gettext("Slope")],[gettext("Start Time")],[gettext("Initial Value")]],list("vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- if (stt<0) {
- block_parameter_error(msprintf(gettext("Wrong value for \'Start Time\' parameter: %e."),stt),gettext("Null or positive integer expected."));
+ if (this.stt<0) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'Start Time\' parameter: %e."),this.stt),gettext("Null or positive integer expected."));
} else {
- model.rpar = [[slope],[stt],[iout]];
+ model.rpar = [[this.slope],[this.stt],[this.iout]];
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Sources/RAMP.pickle b/js/Sources/RAMP.pickle
index 0d1dde24..56252057 100644
--- a/js/Sources/RAMP.pickle
+++ b/js/Sources/RAMP.pickle
@@ -2,8 +2,14 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'slope'
p2
-atp3
-Rp4
+aS'x'
+p3
+aS'stt'
+p4
+aS'iout'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/Sources/RAND_f.js b/js/Sources/RAND_f.js
index 9af2134d..5f29e7aa 100644
--- a/js/Sources/RAND_f.js
+++ b/js/Sources/RAND_f.js
@@ -1,21 +1,21 @@
/* autogenerated from "macros/Sources/RAND_f.sci" */
function RAND_f() {
RAND_f.prototype.define = function RAND_f() {
- a = 0;
- b = 1;
+ this.a = 0;
+ this.b = 1;
dt = 0;
out = 1;
- flag = 0;
+ this.flag = 0;
model = scicos_model();
model.sim = "rndblk";
model.out = out;
model.evtin = 1;
- model.dstate = [[int(rand()*(10^7-1))],[0*a.slice()]];
- model.rpar = [[a.slice()],[b.slice()]];
- model.ipar = flag;
+ model.dstate = [[int(rand()*(10^7-1))],[0*this.a.slice()]];
+ model.rpar = [[this.a.slice()],[this.b.slice()]];
+ model.ipar = this.flag;
model.blocktype = "d";
model.dep_ut = [false,false];
- exprs = [[string(flag)],[sci2exp(a.slice())],[sci2exp(b.slice())],[string(model.dstate[1-1])]];
+ exprs = [[string(this.flag)],[sci2exp(this.a.slice())],[sci2exp(this.b.slice())],[string(model.dstate[1-1])]];
gr_i = [];
this.x = standard_define([3,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -37,19 +37,19 @@ function RAND_f() {
exprs = [[exprs],[string(model.dstate[1-1])]];
}
while (true) {
- [ok,flag,a,b,seed_c,exprs] = scicos_getvalue([["Set Random generator block parameters"],["flag = 0 : Uniform distribution A is min and A+B max"],["flag = 1 : Normal distribution A is mean and B deviation"],[" "],["A and B must be vector with equal sizes"],["seed is the seed of random number generator (integer<2**31)"]],[["flag"],["A"],["B"],["seed"]],list("vec",1,"vec",-1,"vec","size(%2,\'*\')","vec",1),exprs);
+ [ok,this.flag,this.a,this.b,this.seed_c,exprs] = scicos_getvalue([["Set Random generator block parameters"],["flag = 0 : Uniform distribution A is min and A+B max"],["flag = 1 : Normal distribution A is mean and B deviation"],[" "],["A and B must be vector with equal sizes"],["seed is the seed of random number generator (integer<2**31)"]],[["flag"],["A"],["B"],["seed"]],list("vec",1,"vec",-1,"vec","size(%2,\'*\')","vec",1),exprs);
if (!ok) {
break;
}
- if (flag!=0&&flag!=1) {
+ if (this.flag!=0&&this.flag!=1) {
message("flag must be equal to 1 or 0");
} else {
- nout = size(a,"*");
+ nout = size(this.a,"*");
graphics.exprs = exprs;
model.out = nout;
- model.ipar = flag;
- model.rpar = [[a.slice()],[b.slice()]];
- model.dstate = [[seed_c],[0*a.slice()]];
+ model.ipar = this.flag;
+ model.rpar = [[this.a.slice()],[this.b.slice()]];
+ model.dstate = [[this.seed_c],[0*this.a.slice()]];
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Sources/RAND_f.pickle b/js/Sources/RAND_f.pickle
index 0d1dde24..04c9c136 100644
--- a/js/Sources/RAND_f.pickle
+++ b/js/Sources/RAND_f.pickle
@@ -2,8 +2,16 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'a'
p2
-atp3
-Rp4
+aS'x'
+p3
+aS'flag'
+p4
+aS'b'
+p5
+aS'seed_c'
+p6
+atp7
+Rp8
. \ No newline at end of file
diff --git a/js/Sources/RAND_m.js b/js/Sources/RAND_m.js
index d3c62d7e..cf5f934b 100644
--- a/js/Sources/RAND_m.js
+++ b/js/Sources/RAND_m.js
@@ -1,10 +1,10 @@
/* autogenerated from "macros/Sources/RAND_m.sci" */
function RAND_m() {
RAND_m.prototype.define = function RAND_m() {
- a = 0;
- b = 1;
+ this.a = 0;
+ this.b = 1;
dt = 0;
- flag = 0;
+ this.flag = 0;
function_name = "rndblk_m";
funtyp = 4;
model = scicos_model();
@@ -18,13 +18,13 @@ function RAND_m() {
model.evtin = 1;
model.evtout = [];
model.state = [];
- model.dstate = [[int(rand()*(10^7-1))],[0*a.slice()]];
- model.rpar = [a.slice(),b.slice()];
- model.ipar = flag;
+ model.dstate = [[int(rand()*(10^7-1))],[0*this.a.slice()]];
+ model.rpar = [this.a.slice(),this.b.slice()];
+ model.ipar = this.flag;
model.blocktype = "d";
model.firing = [];
model.dep_ut = [false,false];
- exprs = [[sci2exp(1)],[string(flag)],[sci2exp([a])],[sci2exp([b])],[sci2exp([model.dstate[1-1],int(rand()*(10^7-1))])]];
+ exprs = [[sci2exp(1)],[string(this.flag)],[sci2exp([this.a])],[sci2exp([this.b])],[sci2exp([model.dstate[1-1],int(rand()*(10^7-1))])]];
gr_i = [];
this.x = standard_define([3,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -43,24 +43,24 @@ function RAND_m() {
exprs[9-1] = [];
}
while (true) {
- [ok,typ,flag,a,b,seed_c,exprs] = scicos_getvalue([["Set Random generator block parameters"],["flag = 0 : Uniform distribution A is min and A+B max"],["flag = 1 : Normal distribution A is mean and B deviation"],[" "],["A and B must be matrix with equal sizes"]],[["Datatype(1=real double 2=complex)"],["flag"],["A"],["B"],["SEED"]],list("vec",1,"vec",1,"mat",[-1,-2],"mat","[-1 -2]","mat",[1,2]),exprs);
+ [ok,this.typ,this.flag,this.a,this.b,this.seed_c,exprs] = scicos_getvalue([["Set Random generator block parameters"],["flag = 0 : Uniform distribution A is min and A+B max"],["flag = 1 : Normal distribution A is mean and B deviation"],[" "],["A and B must be matrix with equal sizes"]],[["Datatype(1=real double 2=complex)"],["flag"],["A"],["B"],["SEED"]],list("vec",1,"vec",1,"mat",[-1,-2],"mat","[-1 -2]","mat",[1,2]),exprs);
if (!ok) {
break;
}
- if (flag!=0&&flag!=1) {
+ if (this.flag!=0&&this.flag!=1) {
message("flag must be equal to 1 or 0");
} else {
- out = size(a);
- if (typ==1) {
+ out = size(this.a);
+ if (this.typ==1) {
function_name = "rndblk_m";
- model.rpar = [[real(a.slice())],[real(b.slice())]];
- model.dstate = [[seed_c[1-1]],[0*real(a.slice())]];
+ model.rpar = [[real(this.a.slice())],[real(this.b.slice())]];
+ model.dstate = [[this.seed_c[1-1]],[0*real(this.a.slice())]];
ot = 1;
- } else if (typ==2) {
+ } else if (this.typ==2) {
function_name = "rndblkz_m";
ot = 2;
- model.rpar = [[real(a.slice())],[imag(a.slice())],[real(b.slice())],[imag(b.slice())]];
- model.dstate = [[seed_c.slice()],[0*[[real(a.slice())],[imag(a.slice())]]]];
+ model.rpar = [[real(this.a.slice())],[imag(this.a.slice())],[real(this.b.slice())],[imag(this.b.slice())]];
+ model.dstate = [[this.seed_c.slice()],[0*[[real(this.a.slice())],[imag(this.a.slice())]]]];
} else {
message("Datatype is not supported");
ok = false;
@@ -70,7 +70,7 @@ function RAND_m() {
if (ok) {
model.sim = list(function_name,4);
graphics.exprs = exprs;
- model.ipar = flag;
+ model.ipar = this.flag;
this.x.graphics = graphics;
this.x.model = model;
break;
diff --git a/js/Sources/RAND_m.pickle b/js/Sources/RAND_m.pickle
index 0d1dde24..b75e87b8 100644
--- a/js/Sources/RAND_m.pickle
+++ b/js/Sources/RAND_m.pickle
@@ -2,8 +2,18 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'a'
p2
-atp3
-Rp4
+aS'b'
+p3
+aS'seed_c'
+p4
+aS'flag'
+p5
+aS'x'
+p6
+aS'typ'
+p7
+atp8
+Rp9
. \ No newline at end of file
diff --git a/js/Sources/READAU_f.js b/js/Sources/READAU_f.js
index e7f87a08..27f1bc2c 100644
--- a/js/Sources/READAU_f.js
+++ b/js/Sources/READAU_f.js
@@ -4,10 +4,10 @@ function READAU_f() {
frmt = "uc ";
fname = "test.au";
lunit = 0;
- N = 20;
+ this.N = 20;
M = 1;
tmask = [];
- swap = 0;
+ this.swap = 0;
offset = 1;
outmask = 1;
ievt = 0;
@@ -16,11 +16,11 @@ function READAU_f() {
model.sim = list("readau",2);
model.out = nout;
model.evtin = 1;
- model.dstate = [[1],[1],[lunit],[zeros(N*M,1)]];
- model.ipar = [[length(fname)],[this._str2code[frmt-1]],[ievt],[N],[M],[swap],[offset],[this._str2code[fname-1]],[tmask],[outmask]];
+ model.dstate = [[1],[1],[lunit],[zeros(this.N*M,1)]];
+ model.ipar = [[length(fname)],[this._str2code[frmt-1]],[ievt],[this.N],[M],[this.swap],[offset],[this._str2code[fname-1]],[tmask],[outmask]];
model.blocktype = "d";
model.dep_ut = [false,false];
- exprs = [[fname],[string(N)],[string(swap)]];
+ exprs = [[fname],[string(this.N)],[string(this.swap)]];
gr_i = [];
this.x = standard_define([5,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -43,7 +43,7 @@ function READAU_f() {
lunit = dstate[3-1];
fname = exprs[1-1];
while (true) {
- [ok,fname1,N,swap,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"READAU_f")],[" "],[gettext("(Read Audio File)")],[" "],[gettext("Read is done on a binary \'.au\' file")]],[[gettext("Input File Name")],[gettext("Buffer size")],[gettext("Swap Mode (0:No, 1:Yes)")]],list("str",1,"vec",1,"vec",1),exprs);
+ [ok,this.fname1,this.N,this.swap,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"READAU_f")],[" "],[gettext("(Read Audio File)")],[" "],[gettext("Read is done on a binary \'.au\' file")]],[[gettext("Input File Name")],[gettext("Buffer size")],[gettext("Swap Mode (0:No, 1:Yes)")]],list("str",1,"vec",1,"vec",1),exprs);
tmask1 = [];
outmask = 1;
frmt1 = "uc";
@@ -52,25 +52,25 @@ function READAU_f() {
if (!ok) {
break;
}
- fname1 = stripblanks(fname1);
+ this.fname1 = stripblanks(this.fname1);
frmt1 = stripblanks(frmt1);
- if (this.alreadyran&&fname1!=fname) {
+ if (this.alreadyran&&this.fname1!=fname) {
block_parameter_error(gettext("Simulation running !!! You cannot modify Input file name"),gettext("End current simulation first."));
- } else if (fname1=="") {
+ } else if (this.fname1=="") {
block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter."),gettext("Input File Name")),gettext("You must provide a filename."));
- } else if (N<1) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Buffer size"),N),msprintf(gettext("Must be greater than %d."),1));
- } else if (this.alreadyran&&(N!=ipar[6-1])) {
+ } else if (this.N<1) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Buffer size"),this.N),msprintf(gettext("Must be greater than %d."),1));
+ } else if (this.alreadyran&&(this.N!=ipar[6-1])) {
block_parameter_error(msprintf(gettext("You cannot modify \'%s\' when running."),gettext("Buffer Size")),gettext("End current simulation first."));
- } else if (swap!=0&&swap!=1) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Swap Mode"),swap),msprintf(gettext("Must be in the interval %s."),"[0, 1]"));
+ } else if (this.swap!=0&&this.swap!=1) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Swap Mode"),this.swap),msprintf(gettext("Must be in the interval %s."),"[0, 1]"));
} else {
[model,graphics,ok] = check_io(model,graphics,[],1,1,[]);
frmt1 = part(frmt1,1,3);
if (ok) {
- ipar = [[length(fname1)],[this._str2code[frmt1-1]],[0],[N],[M],[swap],[offset,this._str2code[fname1-1]],[tmask1,outmask.slice()]];
- if (prod(size(dstate))!=(N*M)+3) {
- dstate = [[-1],[-1],[lunit],[zeros(N*M,1)]];
+ ipar = [[length(this.fname1)],[this._str2code[frmt1-1]],[0],[this.N],[M],[this.swap],[offset,this._str2code[this.fname1-1]],[tmask1,outmask.slice()]];
+ if (prod(size(dstate))!=(this.N*M)+3) {
+ dstate = [[-1],[-1],[lunit],[zeros(this.N*M,1)]];
}
model.dstate = dstate;
model.ipar = ipar;
diff --git a/js/Sources/READAU_f.pickle b/js/Sources/READAU_f.pickle
index 8a32035f..7f5b1f0c 100644
--- a/js/Sources/READAU_f.pickle
+++ b/js/Sources/READAU_f.pickle
@@ -4,10 +4,16 @@ p0
((lp1
S'_str2code'
p2
-aS'x'
+aS'fname1'
p3
-aS'alreadyran'
+aS'N'
p4
-atp5
-Rp6
+aS'alreadyran'
+p5
+aS'x'
+p6
+aS'swap'
+p7
+atp8
+Rp9
. \ No newline at end of file
diff --git a/js/Sources/READC_f.js b/js/Sources/READC_f.js
index 74589dfa..121a999d 100644
--- a/js/Sources/READC_f.js
+++ b/js/Sources/READC_f.js
@@ -4,27 +4,27 @@ function READC_f() {
frmt = "d ";
fname = "foo";
lunit = 0;
- N = 20;
- M = 1;
+ this.N = 20;
+ this.M = 1;
rpar = [];
tmask = 0;
- swap = 0;
- offset = 1;
- outmask = 1;
+ this.swap = 0;
+ this.offset = 1;
+ this.outmask = 1;
ievt = 0;
- nout = size(outmask,"*");
- ipar = [[length(fname)],[this._str2code[frmt-1]],[ievt],[N],[M],[swap],[offset],[this._str2code[fname-1]],[tmask],[outmask]];
+ nout = size(this.outmask,"*");
+ ipar = [[length(fname)],[this._str2code[frmt-1]],[ievt],[this.N],[this.M],[this.swap],[this.offset],[this._str2code[fname-1]],[tmask],[this.outmask]];
model = scicos_model();
model.sim = list("readc",2);
model.out = nout;
model.evtin = 1;
model.evtout = [];
- model.dstate = [[1],[1],[lunit],[zeros(N*M,1)]];
- model.ipar = [[length(fname)],[this._str2code[frmt-1]],[ievt],[N],[M],[swap],[offset],[this._str2code[fname-1]],[tmask],[outmask]];
+ model.dstate = [[1],[1],[lunit],[zeros(this.N*this.M,1)]];
+ model.ipar = [[length(fname)],[this._str2code[frmt-1]],[ievt],[this.N],[this.M],[this.swap],[this.offset],[this._str2code[fname-1]],[tmask],[this.outmask]];
model.blocktype = "d";
model.firing = -1;
model.dep_ut = [false,false];
- exprs = [["[]"],[sci2exp(outmask)],[fname],[frmt],[string(M)],[string(N)],[string(offset)],[string(swap)]];
+ exprs = [["[]"],[sci2exp(this.outmask)],[fname],[frmt],[string(this.M)],[string(this.N)],[string(this.offset)],[string(this.swap)]];
gr_i = [];
this.x = standard_define([4,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -48,63 +48,63 @@ function READC_f() {
fname = exprs[3-1];
frmt = exprs[4-1];
while (true) {
- [ok,tmask1,outmask,fname1,frmt1,M,N,offset,swap,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"READC_f")],[" "],[gettext("Read from C binary file")]],[[gettext("Time Record Selection")],[gettext("Outputs Record Selection")],[gettext("Input File Name")],[gettext("Input Format")],[gettext("Record Size")],[gettext("Buffer Size")],[gettext("Initial Record Index")],[gettext("Swap Mode (0:No, 1:Yes)")]],list("vec",-1,"vec",-1,"str",1,"str",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.tmask1,this.outmask,this.fname1,this.frmt1,this.M,this.N,this.offset,this.swap,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"READC_f")],[" "],[gettext("Read from C binary file")]],[[gettext("Time Record Selection")],[gettext("Outputs Record Selection")],[gettext("Input File Name")],[gettext("Input Format")],[gettext("Record Size")],[gettext("Buffer Size")],[gettext("Initial Record Index")],[gettext("Swap Mode (0:No, 1:Yes)")]],list("vec",-1,"vec",-1,"str",1,"str",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- fname1 = pathconvert(stripblanks(fname1),false,true);
- frmt1 = stripblanks(frmt1);
+ this.fname1 = pathconvert(stripblanks(this.fname1),false,true);
+ this.frmt1 = stripblanks(this.frmt1);
fmts = ["s","l","d","f","c","us","ul","uc","ull","uls","ubl","ubs","dl","fl","ll","sl","db","fb","lb","sb"];
- nout = size(outmask,"*");
- if (prod(size(tmask1))>1) {
+ nout = size(this.outmask,"*");
+ if (prod(size(this.tmask1))>1) {
block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter."),gettext("Time Record Selection")),gettext("Must be a scalar or an empty matrix."));
- } else if (and(frmt1!=fmts)) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %s."),gettext("Input Format"),frmt1),gettext("Valid formats are: "+strcat(fmts,", ")));
- } else if (this.alreadyran&&fname1!=fname) {
+ } else if (and(this.frmt1!=fmts)) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %s."),gettext("Input Format"),this.frmt1),gettext("Valid formats are: "+strcat(fmts,", ")));
+ } else if (this.alreadyran&&this.fname1!=fname) {
block_parameter_error(msprintf(gettext("You cannot modify \'%s\' when running"),gettext("Input File Name")),gettext("End current simulation first."));
- } else if (N!=ipar[6-1]&&this.alreadyran) {
+ } else if (this.N!=ipar[6-1]&&this.alreadyran) {
block_parameter_error(msprintf(gettext("You cannot modify \'%s\' when running."),gettext("Buffer Size")),gettext("End current simulation first"));
- } else if (this.alreadyran&&size(tmask1)!=size(tmask)) {
+ } else if (this.alreadyran&&size(this.tmask1)!=size(tmask)) {
block_parameter_error(msprintf(gettext("You cannot modify \'%s\' when running."),gettext("Time Record Selection")),gettext("End current simulation first."));
- } else if (fname1=="") {
+ } else if (this.fname1=="") {
block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter."),gettext("Input File Name")),gettext("You must provide a file name."));
- } else if (M<1) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Record Size"),M),gettext("Strictly positive integer expected."));
- } else if (tmask1!=[]&&(tmask1<1||tmask1>M)) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Time Record Selection"),tmask1),msprintf(gettext("Must be in the interval %s."),gettext("[1, Record Size = ")+string(M)+"]"));
+ } else if (this.M<1) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Record Size"),this.M),gettext("Strictly positive integer expected."));
+ } else if (this.tmask1!=[]&&(this.tmask1<1||this.tmask1>this.M)) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Time Record Selection"),this.tmask1),msprintf(gettext("Must be in the interval %s."),gettext("[1, Record Size = ")+string(this.M)+"]"));
} else if (nout==0) {
block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Outputs Record Selection"),nout),gettext("Strictly positive integer expected."));
- } else if (nout>M) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Outputs Record Selection"),nout),msprintf(gettext("Must be in the interval %s."),gettext("[1, Record Size = ")+string(M)+"]"));
- } else if (max(outmask)>M||min(outmask)<1) {
- block_parameter_error(msprintf(gettext("Wrong value for indexes in \'%s\' parameter: %s."),gettext("Outputs Record Selection"),strcat(string(outmask.slice())," ")),msprintf(gettext("Must be in the interval %s."),gettext("[1, Record Size = ")+string(M)+"]"));
- } else if (N<1) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Buffer Size"),N),gettext("Strictly positive integer expected."));
- } else if (swap!=0&&swap!=1) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Swap Mode"),swap),msprintf(gettext("Must be in the interval %s."),"[0, 1]"));
- } else if (offset<1) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Initial Record Index"),offset),gettext("Strictly positive integer expected."));
+ } else if (nout>this.M) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Outputs Record Selection"),nout),msprintf(gettext("Must be in the interval %s."),gettext("[1, Record Size = ")+string(this.M)+"]"));
+ } else if (max(this.outmask)>this.M||min(this.outmask)<1) {
+ block_parameter_error(msprintf(gettext("Wrong value for indexes in \'%s\' parameter: %s."),gettext("Outputs Record Selection"),strcat(string(this.outmask.slice())," ")),msprintf(gettext("Must be in the interval %s."),gettext("[1, Record Size = ")+string(this.M)+"]"));
+ } else if (this.N<1) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Buffer Size"),this.N),gettext("Strictly positive integer expected."));
+ } else if (this.swap!=0&&this.swap!=1) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Swap Mode"),this.swap),msprintf(gettext("Must be in the interval %s."),"[0, 1]"));
+ } else if (this.offset<1) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Initial Record Index"),this.offset),gettext("Strictly positive integer expected."));
} else {
- if (tmask1==[]) {
+ if (this.tmask1==[]) {
ievt = 0;
- tmask1 = 0;
+ this.tmask1 = 0;
outpt = [];
} else {
ievt = 1;
outpt = 1;
}
- out = size(outmask,"*");
+ out = size(this.outmask,"*");
[model,graphics,ok] = check_io(model,graphics,[],out,1,outpt);
- frmt1 = part(frmt1,1,3);
+ this.frmt1 = part(this.frmt1,1,3);
if (ok) {
if (ievt==0) {
model.firing = -1;
} else {
model.firing = 0;
}
- ipar = [[length(fname1)],[this._str2code[frmt1-1]],[ievt],[N],[M],[swap],[offset],[this._str2code[fname1-1]],[tmask1],[outmask.slice()]];
- if (prod(size(dstate))!=(N*M)+3) {
- dstate = [[-1],[-1],[lunit],[zeros(N*M,1)]];
+ ipar = [[length(this.fname1)],[this._str2code[this.frmt1-1]],[ievt],[this.N],[this.M],[this.swap],[this.offset],[this._str2code[this.fname1-1]],[this.tmask1],[this.outmask.slice()]];
+ if (prod(size(dstate))!=(this.N*this.M)+3) {
+ dstate = [[-1],[-1],[lunit],[zeros(this.N*this.M,1)]];
}
model.dstate = dstate;
model.ipar = ipar;
diff --git a/js/Sources/READC_f.pickle b/js/Sources/READC_f.pickle
index 8a32035f..00927330 100644
--- a/js/Sources/READC_f.pickle
+++ b/js/Sources/READC_f.pickle
@@ -4,10 +4,26 @@ p0
((lp1
S'_str2code'
p2
-aS'x'
+aS'outmask'
p3
-aS'alreadyran'
+aS'M'
p4
-atp5
-Rp6
+aS'frmt1'
+p5
+aS'fname1'
+p6
+aS'N'
+p7
+aS'swap'
+p8
+aS'offset'
+p9
+aS'x'
+p10
+aS'tmask1'
+p11
+aS'alreadyran'
+p12
+atp13
+Rp14
. \ No newline at end of file
diff --git a/js/Sources/RFILE_f.js b/js/Sources/RFILE_f.js
index dc0b6a87..399eac41 100644
--- a/js/Sources/RFILE_f.js
+++ b/js/Sources/RFILE_f.js
@@ -6,21 +6,21 @@ function RFILE_f() {
frmt = "(7(e10.3,1x))";
fname = "foo";
lunit = 0;
- N = 2;
+ this.N = 2;
rpar = [];
tmask = 0;
- outmask = 1;
- ipar = [[length(fname)],[length(frmt)],[0],[N],[this._str2code[fname-1]],[this._str2code[frmt-1]],[tmask],[outmask]];
- dstate = [[1],[1],[lunit],[zeros((nout)*N,1)]];
+ this.outmask = 1;
+ ipar = [[length(fname)],[length(frmt)],[0],[this.N],[this._str2code[fname-1]],[this._str2code[frmt-1]],[tmask],[this.outmask]];
+ dstate = [[1],[1],[lunit],[zeros((nout)*this.N,1)]];
model = scicos_model();
model.sim = "readf";
model.out = nout;
model.evtin = 1;
model.dstate = dstate;
- model.ipar = [[length(fname)],[length(frmt)],[0],[N],[this._str2code[fname-1]],[this._str2code[frmt-1]],[tmask],[outmask]];
+ model.ipar = [[length(fname)],[length(frmt)],[0],[this.N],[this._str2code[fname-1]],[this._str2code[frmt-1]],[tmask],[this.outmask]];
model.blocktype = "d";
model.dep_ut = [false,false];
- exprs = [[sci2exp([])],[sci2exp(outmask)],[fname],[frmt],[string(N)],[sci2exp(out)]];
+ exprs = [[sci2exp([])],[sci2exp(this.outmask)],[fname],[frmt],[string(this.N)],[sci2exp(out)]];
gr_i = [];
this.x = standard_define([3,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -38,7 +38,7 @@ function RFILE_f() {
dstate = model.dstate;
ipar = model.ipar;
ievt = ipar[3-1];
- N = ipar[4-1];
+ this.N = ipar[4-1];
imask = 5+ipar[1-1]+ipar[2-1];
tmask = ipar[imask-1];
lunit = dstate[3-1];
@@ -48,38 +48,38 @@ function RFILE_f() {
exprs[6-1] = [];
}
while (true) {
- [ok,tmask1,outmask,fname1,frmt1,N,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"RFILE_f")],[" "],[gettext("Read from an input file")],[" "],[gettext("Read is done on:")],[gettext("&nbsp; - A binary file if no format given")],[gettext("&nbsp; - A formatted text file if a format (fortran type) is given")]],[[gettext("Time Record Selection")],[gettext("Outputs Record Selection")],[gettext("Input File Name")],[gettext("Input Format")],[gettext("Buffer Size")]],list("vec",-1,"vec",-1,"str",1,"str",1,"vec",1),exprs);
+ [ok,this.tmask1,this.outmask,this.fname1,this.frmt1,this.N,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"RFILE_f")],[" "],[gettext("Read from an input file")],[" "],[gettext("Read is done on:")],[gettext("&nbsp; - A binary file if no format given")],[gettext("&nbsp; - A formatted text file if a format (fortran type) is given")]],[[gettext("Time Record Selection")],[gettext("Outputs Record Selection")],[gettext("Input File Name")],[gettext("Input Format")],[gettext("Buffer Size")]],list("vec",-1,"vec",-1,"str",1,"str",1,"vec",1),exprs);
if (!ok) {
break;
}
- fname1 = pathconvert(stripblanks(fname1),false,true);
- frmt1 = stripblanks(frmt1);
- nout = size(outmask,"*");
- if (prod(size(tmask1))>1) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %s."),gettext("Time Record Selection"),strcat(string(tmask1.slice())," ")),gettext("Empty matrix or scalar expected."));
- } else if (tmask1!=[]&&tmask1<1) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d"),gettext("Time Record Selection"),tmask1),gettext("Strictly positive integer expected."));
- } else if (lunit>0&&min(length(frmt),1)!=min(length(frmt1),1)) {
+ this.fname1 = pathconvert(stripblanks(this.fname1),false,true);
+ this.frmt1 = stripblanks(this.frmt1);
+ nout = size(this.outmask,"*");
+ if (prod(size(this.tmask1))>1) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %s."),gettext("Time Record Selection"),strcat(string(this.tmask1.slice())," ")),gettext("Empty matrix or scalar expected."));
+ } else if (this.tmask1!=[]&&this.tmask1<1) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d"),gettext("Time Record Selection"),this.tmask1),gettext("Strictly positive integer expected."));
+ } else if (lunit>0&&min(length(frmt),1)!=min(length(this.frmt1),1)) {
block_parameter_error([gettext("Simulation running !!! You cannot switch <br />between formatted and unformatted")],gettext("End current simulation first."));
- } else if (lunit>0&&fname1!=fname) {
+ } else if (lunit>0&&this.fname1!=fname) {
block_parameter_error(gettext("Simulation running !!! You cannot modify \'Input File Name\'"),gettext("End current simulation first."));
- } else if (lunit>0&&size(tmask1)!=size(tmask)) {
+ } else if (lunit>0&&size(this.tmask1)!=size(tmask)) {
block_parameter_error(gettext("Simulation running !!! You cannot modify \'Time Record Selection\'"),gettext("End current simulation first."));
- } else if (fname1=="") {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %s"),gettext("Input File Name"),fname1),gettext("You must provide a filename."));
- } else if (frmt1!=""&&(part(frmt1,1)!="("||part(frmt1,length(frmt1))!=")")) {
- block_parameter_error(msprintf(gettext("Wrong format for \'%s\' parameter: %s."),gettext("Input Format"),frmt1),gettext("You must enclose the format\'s string between parentheses."));
- } else if (N<2) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Buffer Size"),N),gettext("Buffer size must be at least 2."));
+ } else if (this.fname1=="") {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %s"),gettext("Input File Name"),this.fname1),gettext("You must provide a filename."));
+ } else if (this.frmt1!=""&&(part(this.frmt1,1)!="("||part(this.frmt1,length(this.frmt1))!=")")) {
+ block_parameter_error(msprintf(gettext("Wrong format for \'%s\' parameter: %s."),gettext("Input Format"),this.frmt1),gettext("You must enclose the format\'s string between parentheses."));
+ } else if (this.N<2) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Buffer Size"),this.N),gettext("Buffer size must be at least 2."));
} else if (nout==0) {
block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Outputs Record Selection"),nout),gettext("You must read at least one field in record."));
- } else if (min(outmask)<1) {
- block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %s"),gettext("Outputs Record Selection"),strcat(string(outmask.slice())," ")),gettext("Strictly positive indexes expected."));
+ } else if (min(this.outmask)<1) {
+ block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %s"),gettext("Outputs Record Selection"),strcat(string(this.outmask.slice())," ")),gettext("Strictly positive indexes expected."));
} else {
- if (tmask1==[]) {
+ if (this.tmask1==[]) {
ievt = 0;
cout = [];
- tmask1 = 0;
+ this.tmask1 = 0;
} else {
ievt = 1;
cout = 1;
@@ -91,9 +91,9 @@ function RFILE_f() {
} else {
model.firing = 0;
}
- ipar = [[length(fname1)],[length(frmt1)],[ievt],[N],[this._str2code[fname1-1]],[this._str2code[frmt1-1]],[tmask1],[outmask.slice()]];
- if (prod(size(dstate))!=(nout+ievt)*N+3) {
- dstate = [[-1],[-1],[lunit],[zeros((nout+ievt)*N,1)]];
+ ipar = [[length(this.fname1)],[length(this.frmt1)],[ievt],[this.N],[this._str2code[this.fname1-1]],[this._str2code[this.frmt1-1]],[this.tmask1],[this.outmask.slice()]];
+ if (prod(size(dstate))!=(nout+ievt)*this.N+3) {
+ dstate = [[-1],[-1],[lunit],[zeros((nout+ievt)*this.N,1)]];
}
model.dstate = dstate;
model.ipar = ipar;
diff --git a/js/Sources/RFILE_f.pickle b/js/Sources/RFILE_f.pickle
index bcacb8ca..09ca1693 100644
--- a/js/Sources/RFILE_f.pickle
+++ b/js/Sources/RFILE_f.pickle
@@ -4,8 +4,18 @@ p0
((lp1
S'_str2code'
p2
-aS'x'
+aS'outmask'
p3
-atp4
-Rp5
+aS'frmt1'
+p4
+aS'fname1'
+p5
+aS'N'
+p6
+aS'x'
+p7
+aS'tmask1'
+p8
+atp9
+Rp10
. \ No newline at end of file
diff --git a/js/Sources/STEP.js b/js/Sources/STEP.js
index 997ee61e..cb0252ce 100644
--- a/js/Sources/STEP.js
+++ b/js/Sources/STEP.js
@@ -29,33 +29,33 @@ function STEP() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,temps,in1,fi,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"STEP_FUNCTION")],[" "],[gettext("Step Function")],[" "]],[[gettext("Step Time")],[gettext("Initial Value")],[gettext("Final Value")]],list("vec",1,"vec",-1,"vec",-1),exprs);
+ [ok,this.temps,this.in1,this.fi,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"STEP_FUNCTION")],[" "],[gettext("Step Function")],[" "]],[[gettext("Step Time")],[gettext("Initial Value")],[gettext("Final Value")]],list("vec",1,"vec",-1,"vec",-1),exprs);
if (!ok) {
break;
}
- in1 = in1.slice();
- fi = fi.slice();
- if (size(in1,"*")!=size(fi,"*")) {
- if (size(in1,"*")==1) {
- in1 = in1*ones(fi);
- } else if (size(fi,"*")==1) {
- fi = fi*ones(in1);
+ this.in1 = this.in1.slice();
+ this.fi = this.fi.slice();
+ if (size(this.in1,"*")!=size(this.fi,"*")) {
+ if (size(this.in1,"*")==1) {
+ this.in1 = this.in1*ones(this.fi);
+ } else if (size(this.fi,"*")==1) {
+ this.fi = this.fi*ones(this.in1);
} else {
- block_parameter_error(msprintf(gettext("\'Initial Value\' and \'Final Value\': incompatible sizes: %d and %d."),size(in1,"*"),size(fi,"*")),gettext("Same sizes expected."));
+ block_parameter_error(msprintf(gettext("\'Initial Value\' and \'Final Value\': incompatible sizes: %d and %d."),size(this.in1,"*"),size(this.fi,"*")),gettext("Same sizes expected."));
ok = false;
}
}
if (ok) {
model.out2 = 1;
model.outtyp = 1;
- [model,graphics,ok] = check_io(model,graphics,[],size(fi,"*"),1,1);
+ [model,graphics,ok] = check_io(model,graphics,[],size(this.fi,"*"),1,1);
}
if (ok) {
- model.firing = temps;
- if (temps==0) {
- rpar = [[fi],[fi]];
+ model.firing = this.temps;
+ if (this.temps==0) {
+ rpar = [[this.fi],[this.fi]];
} else {
- rpar = [[in1],[fi]];
+ rpar = [[this.in1],[this.fi]];
}
model.rpar = rpar;
graphics.exprs = exprs;
diff --git a/js/Sources/STEP.pickle b/js/Sources/STEP.pickle
index 0d1dde24..e7d16d1f 100644
--- a/js/Sources/STEP.pickle
+++ b/js/Sources/STEP.pickle
@@ -2,8 +2,14 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'temps'
p2
-atp3
-Rp4
+aS'x'
+p3
+aS'in1'
+p4
+aS'fi'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/Sources/SampleCLK.js b/js/Sources/SampleCLK.js
index 672acc54..741b0d59 100644
--- a/js/Sources/SampleCLK.js
+++ b/js/Sources/SampleCLK.js
@@ -23,24 +23,24 @@ function SampleCLK() {
model = arg1.model;
exprs = graphics.exprs;
while (true) {
- [ok,frequ,offset,exprs] = scicos_getvalue("Set block parameters",[["Sample time"],["Offset"]],list("vec",1,"vec",1),exprs);
+ [ok,this.frequ,this.offset,exprs] = scicos_getvalue("Set block parameters",[["Sample time"],["Offset"]],list("vec",1,"vec",1),exprs);
if (!ok) {
break;
}
- if (frequ<0) {
+ if (this.frequ<0) {
message("Frequency must be a positif number");
ok = false;
}
- if (abs(offset)>frequ) {
+ if (abs(this.offset)>this.frequ) {
message("The |Offset| must be less than the Frequency");
ok = false;
}
if (ok) {
- if (or(model.rpar.slice()!=[[frequ],[offset]])) {
+ if (or(model.rpar.slice()!=[[this.frequ],[this.offset]])) {
needcompile = 4;
y = needcompile;
}
- model.rpar = [[frequ],[offset]];
+ model.rpar = [[this.frequ],[this.offset]];
model.evtout = 1;
model.firing = -1;
graphics.exprs = exprs;
diff --git a/js/Sources/SampleCLK.pickle b/js/Sources/SampleCLK.pickle
index 0d1dde24..ab6422e9 100644
--- a/js/Sources/SampleCLK.pickle
+++ b/js/Sources/SampleCLK.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'frequ'
+p3
+aS'offset'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Sources/TKSCALE.js b/js/Sources/TKSCALE.js
index 00866c29..ff0f2918 100644
--- a/js/Sources/TKSCALE.js
+++ b/js/Sources/TKSCALE.js
@@ -1,17 +1,17 @@
/* autogenerated from "macros/Sources/TKSCALE.sci" */
function TKSCALE() {
TKSCALE.prototype.define = function TKSCALE() {
- a = -10;
- b = 10;
- f = 1;
+ this.a = -10;
+ this.b = 10;
+ this.f = 1;
model = scicos_model();
model.sim = list("tkscaleblk",5);
model.out = 1;
model.evtin = 1;
- model.rpar = [[a],[b],[f]];
+ model.rpar = [[this.a],[this.b],[this.f]];
model.blocktype = "d";
model.dep_ut = [false,false];
- exprs = [[sci2exp(a)],[sci2exp(b)],[sci2exp(f)]];
+ exprs = [[sci2exp(this.a)],[sci2exp(this.b)],[sci2exp(this.f)]];
gr_i = [];
this.x = standard_define([3,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -26,10 +26,10 @@ function TKSCALE() {
graphics = arg1.graphics;
exprs = graphics.exprs;
model = arg1.model;
- [ok,a,b,f,exprs] = scicos_getvalue("Set scale block parameters",[["Min value"],["Max value"],["Normalization"]],list("vec",1,"vec",1,"vec",1),exprs);
+ [ok,this.a,this.b,this.f,exprs] = scicos_getvalue("Set scale block parameters",[["Min value"],["Max value"],["Normalization"]],list("vec",1,"vec",1,"vec",1),exprs);
if (ok) {
graphics.exprs = exprs;
- model.rpar = [[a],[b],[f]];
+ model.rpar = [[this.a],[this.b],[this.f]];
this.x.graphics = graphics;
this.x.model = model;
}
diff --git a/js/Sources/TKSCALE.pickle b/js/Sources/TKSCALE.pickle
index 0d1dde24..0fdb828e 100644
--- a/js/Sources/TKSCALE.pickle
+++ b/js/Sources/TKSCALE.pickle
@@ -2,8 +2,14 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'a'
p2
-atp3
-Rp4
+aS'x'
+p3
+aS'b'
+p4
+aS'f'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/Threshold/GENERAL_f.js b/js/Threshold/GENERAL_f.js
index 4129d175..74772940 100644
--- a/js/Threshold/GENERAL_f.js
+++ b/js/Threshold/GENERAL_f.js
@@ -2,18 +2,18 @@
function GENERAL_f() {
GENERAL_f.prototype.define = function GENERAL_f() {
rpar = [[0],[0],[0],[0]];
- in1 = 1;
- out = 1;
+ this.in1 = 1;
+ this.out = 1;
model = scicos_model();
model.sim = list("zcross",1);
- model.nzcross = in1;
- model.in1 = in1;
- model.evtout = ones(out,1);
+ model.nzcross = this.in1;
+ model.in1 = this.in1;
+ model.evtout = ones(this.out,1);
model.rpar = [[0],[0],[0],[0]];
model.blocktype = "z";
- model.firing = -ones(out,1);
+ model.firing = -ones(this.out,1);
model.dep_ut = [true,false];
- exprs = [[strcat(sci2exp(in1))],[strcat(sci2exp(out))]];
+ exprs = [[strcat(sci2exp(this.in1))],[strcat(sci2exp(this.out))]];
gr_i = [];
this.x = standard_define([3,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -29,16 +29,16 @@ function GENERAL_f() {
exprs = graphics.exprs;
model = arg1.model;
rpar = model.rpar;
- in1 = model.in1;
- out = model.evtout;
- nin = sum(in1);
- nout = sum(out);
- [ok,in1,out,exprs] = scicos_getvalue("Set General Zero-Crossing parameters",[["Input size"],["Number of event output"]],list("vec",1,"vec",1),exprs);
+ this.in1 = model.in1;
+ this.out = model.evtout;
+ nin = sum(this.in1);
+ nout = sum(this.out);
+ [ok,this.in1,this.out,exprs] = scicos_getvalue("Set General Zero-Crossing parameters",[["Input size"],["Number of event output"]],list("vec",1,"vec",1),exprs);
if (ok) {
- [model,graphics,ok] = check_io(model,graphics,in1,[],[],ones(out,1));
+ [model,graphics,ok] = check_io(model,graphics,this.in1,[],[],ones(this.out,1));
if (ok) {
- nout1 = out;
- nin1 = in1;
+ nout1 = this.out;
+ nin1 = this.in1;
if (nout==nout1&&nin==nin1) {
rp = matrix(rpar,nout,2^(2*nin));
} else {
@@ -48,9 +48,9 @@ function GENERAL_f() {
result = x_mdialog("routing matrix",string(1,nout1),string(1,2^(2*nin1)),string(rp.slice().slice()));
if (result!=[]) {
rp.slice(1-1,nout1).slice(1-1,2*n) = evstr(result);
- model.nzcross = in1;
+ model.nzcross = this.in1;
model.rpar = rp.slice();
- model.firing = -ones(out,1);
+ model.firing = -ones(this.out,1);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Threshold/GENERAL_f.pickle b/js/Threshold/GENERAL_f.pickle
index 0d1dde24..d2db746f 100644
--- a/js/Threshold/GENERAL_f.pickle
+++ b/js/Threshold/GENERAL_f.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'in1'
+p3
+aS'out'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Threshold/ZCROSS_f.js b/js/Threshold/ZCROSS_f.js
index 7cd1ed03..cc2b6c08 100644
--- a/js/Threshold/ZCROSS_f.js
+++ b/js/Threshold/ZCROSS_f.js
@@ -2,17 +2,17 @@
function ZCROSS_f() {
ZCROSS_f.prototype.define = function ZCROSS_f() {
rpar = [[-1],[-1],[0],[0]];
- in1 = 1;
+ this.in1 = 1;
model = scicos_model();
model.sim = list("zcross",1);
- model.in1 = in1;
- model.nzcross = in1;
+ model.in1 = this.in1;
+ model.nzcross = this.in1;
model.evtout = 1;
model.rpar = [[-1],[-1],[0],[0]];
model.blocktype = "z";
model.firing = -1;
model.dep_ut = [true,false];
- exprs = strcat(sci2exp(in1));
+ exprs = strcat(sci2exp(this.in1));
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
return new BasicBlock(this.x);
@@ -28,22 +28,22 @@ function ZCROSS_f() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,in1,exprs] = scicos_getvalue([["Set Zero-Crossing parameters"],["All surfaces must cross together"]],"Input size",list("vec",1),exprs);
+ [ok,this.in1,exprs] = scicos_getvalue([["Set Zero-Crossing parameters"],["All surfaces must cross together"]],"Input size",list("vec",1),exprs);
if (!ok) {
break;
}
- in1 = int(in1);
- if (in1<=0) {
+ this.in1 = int(this.in1);
+ if (this.in1<=0) {
message("Block must have at least one input");
} else {
kk = 0;
- for (jj=1;jj<=in1;jj+=1) {
- kk = kk+2^(in1+jj-1);
+ for (jj=1;jj<=this.in1;jj+=1) {
+ kk = kk+2^(this.in1+jj-1);
}
- model.rpar = [[-ones(kk,1)],[zeros(2^(2*in1)-kk,1)]];
+ model.rpar = [[-ones(kk,1)],[zeros(2^(2*this.in1)-kk,1)]];
graphics.exprs = exprs;
- model.in1 = in1;
- model.nzcross = in1;
+ model.in1 = this.in1;
+ model.nzcross = this.in1;
model.firing = -1;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Threshold/ZCROSS_f.pickle b/js/Threshold/ZCROSS_f.pickle
index 0d1dde24..2935e0d2 100644
--- a/js/Threshold/ZCROSS_f.pickle
+++ b/js/Threshold/ZCROSS_f.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'in1'
+p3
+atp4
+Rp5
. \ No newline at end of file