From d882284f3532dc44518c2f88b447b764c7178d48 Mon Sep 17 00:00:00 2001 From: Chhavi Date: Thu, 7 Jul 2016 11:06:59 +0000 Subject: scifunc_block_m --- data_structures_correct/scifunc_block_m.js | 43 ++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 data_structures_correct/scifunc_block_m.js (limited to 'data_structures_correct/scifunc_block_m.js') diff --git a/data_structures_correct/scifunc_block_m.js b/data_structures_correct/scifunc_block_m.js new file mode 100644 index 0000000..463167d --- /dev/null +++ b/data_structures_correct/scifunc_block_m.js @@ -0,0 +1,43 @@ +function scifunc_block_m() { + + scifunc_block_m.prototype.define = function scifunc_block_m() { + this.in1 = 1; + this.out = 1; + this.clkin = []; + this.clkout = []; + this.x0 = []; + this.z0 = []; + this.typ = "c"; + this.auto = []; + this.rpar = []; + this.it = 1; + + var model = scicos_model(); + model.sim = list(new ScilabString(["scifunc"]), new ScilabDouble([3])); + model.in = new ScilabDouble([this.in1]); + model.in2 = new ScilabDouble([this.in1]); + model.intyp = new ScilabDouble([this.it]); + model.out = new ScilabDouble([this.out]); + model.out2 = new ScilabDouble([this.out]); + model.outtyp = new ScilabDouble([this.it]); + model.evtin = new ScilabDouble(); + model.evtout = new ScilabDouble(); + model.state = new ScilabDouble(); + model.dstate = new ScilabDouble(); + model.rpar = new ScilabDouble(); + model.ipar = new ScilabDouble([0]); + model.opar = list(); + model.blocktype = new ScilabString([this.typ]); + model.firing = new ScilabDouble(); + model.dep_ut = new ScilabBoolean([true, false]); + + var exprs = list(new ScilabString([sci2exp([this.in1, this.in1])], [sci2exp([this.out, this.out])], [sci2exp(this.clkin)], [sci2exp(this.clkout)], [sci2exp(this.x0)], [sci2exp(this.z0)], [sci2exp(this.rpar)], [sci2exp(this.auto)], [sci2exp(0)]), list(new ScilabString(["y1=sin(u1)"]), new ScilabString([" "]), new ScilabString([" "]), new ScilabString(["y1=sin(u1)"]), new ScilabString([" "]), new ScilabString([" "]), new ScilabString([" "]))); + + var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"scifunc_block_m\",sz(1),sz(2));"]); + this.x = new standard_define(new ScilabDouble([4, 2]), model, exprs, gr_i); + return new BasicBlock(this.x); + } + scifunc_block_m.prototype.details = function scifunc_block_m() { + return this.x; + } +} \ No newline at end of file -- cgit