/* autogenerated from "macros/Events/IFTHEL_f.sci" */ function IFTHEL_f() { IFTHEL_f.prototype.define = function IFTHEL_f() { model = scicos_model(); model.sim = list("ifthel",-1); model.in1 = 1; model.in2 = 1; model.intyp = -1; model.evtin = 1; model.evtout = [[1],[1]]; model.blocktype = "l"; model.firing = [-1,-1]; model.dep_ut = [true,false]; model.nmode = 1; model.nzcross = 1; gr_i = []; exprs = [[string(model.in1)],[string(model.nmode)]]; this.x = standard_define([3,3],model,exprs,gr_i); return new BasicBlock(this.x); } IFTHEL_f.prototype.details = function IFTHEL_f() { return this.x; } IFTHEL_f.prototype.get = function IFTHEL_f() { var options = { inh:["Inherit (1: no, 0: yes)",this.inh], nmod:["zero-crossing (0: no, 1: yes)",this.nmod], } return options; } IFTHEL_f.prototype.set = function IFTHEL_f() { this.inh = parseFloat((arguments[0]["inh"])) this.nmod = parseFloat((arguments[0]["nmod"])) this.x = arg1; graphics = arg1.graphics; exprs = graphics.exprs; model = arg1.model; if (exprs==[]) { exprs = string(1); } if (size(exprs,"*")==1) { exprs[2-1] = string(1); } while (true) { [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 (this.nmod!=0) { this.nmod = 1; } if (this.inh!=1) { this.inh = []; } [model,graphics,ok] = check_io(model,graphics,1,[],this.inh,[[1],[1]]); if (ok) { graphics.exprs = exprs; model.evtin = this.inh; model.sim[2-1] = -1; model.nmode = this.nmod; model.nzcross = this.nmod; this.x.graphics = graphics; this.x.model = model; break; } } return new BasicBlock(this.x); } }