summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdhitya Kamakshidasan2016-07-09 12:54:22 +0530
committerGitHub2016-07-09 12:54:22 +0530
commitd0d6a3fa9a7ccd92179fbafea830b9d446e69d77 (patch)
treeaf2d6c74b76199ee843c9dbe4b5a734bcae57713
parentb82c3e21f9b8d968d8bd85b4dafa08772be159dd (diff)
parente672f6a3a12178565ec7e2df7bf72924a2863020 (diff)
downloadxcos-on-web-d0d6a3fa9a7ccd92179fbafea830b9d446e69d77.tar.gz
xcos-on-web-d0d6a3fa9a7ccd92179fbafea830b9d446e69d77.tar.bz2
xcos-on-web-d0d6a3fa9a7ccd92179fbafea830b9d446e69d77.zip
Merge pull request #153 from Pooja-Mahadev-Soundalgekar/master
ds_FROM
-rw-r--r--data_structures_correct/FROM.js29
-rw-r--r--data_structures_correct/GAINBLK_f.js26
-rw-r--r--data_structures_correct/INTRP2BLK_f.js27
-rw-r--r--data_structures_correct/SampleCLK.js22
4 files changed, 104 insertions, 0 deletions
diff --git a/data_structures_correct/FROM.js b/data_structures_correct/FROM.js
new file mode 100644
index 0000000..f6002b2
--- /dev/null
+++ b/data_structures_correct/FROM.js
@@ -0,0 +1,29 @@
+function FROM() {
+
+ FROM.prototype.define = function FROM() {
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["from"]);
+ model.in = new ScilabDouble();
+ model.in2 = new ScilabDouble();
+ model.intyp = new ScilabDouble([1]);
+ model.out = new ScilabDouble([-1]);
+ model.out2 = new ScilabDouble([-2]);
+ model.outtyp = new ScilabDouble([-1]);
+ model.ipar = new ScilabDouble();
+ model.opar = list(new ScilabString(["A"]));
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([false, false]);
+
+ var exprs = new ScilabString(["A"]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"FROM\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 1]), model, exprs, gr_i);
+ this.x.graphics.id = new ScilabString(["From"]);
+ return new BasicBlock(this.x);
+ }
+ FROM.prototype.details = function FROM() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/GAINBLK_f.js b/data_structures_correct/GAINBLK_f.js
new file mode 100644
index 0000000..1e0ae00
--- /dev/null
+++ b/data_structures_correct/GAINBLK_f.js
@@ -0,0 +1,26 @@
+function GAINBLK_f() {
+
+ GAINBLK_f.prototype.define = function GAINBLK_f() {
+ this.gain = 1;
+ this.in1 = 1;
+ this.out = 1;
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["gain"]);
+ model.in = new ScilabDouble([this.in1]);
+ model.out = new ScilabDouble([this.out]);
+ model.rpar = new ScilabDouble([this.gain]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([sci2exp(this.gain)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"GAINBLK_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ GAINBLK_f.prototype.details = function GAINBLK_f() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/INTRP2BLK_f.js b/data_structures_correct/INTRP2BLK_f.js
new file mode 100644
index 0000000..6d002ab
--- /dev/null
+++ b/data_structures_correct/INTRP2BLK_f.js
@@ -0,0 +1,27 @@
+function INTRP2BLK_f() {
+
+ INTRP2BLK_f.prototype.define = function INTRP2BLK_f() {
+ this.a = [[0],[1]];
+ this.b = [[0],[1]];
+ this.c = [[0,1],[1,2]];
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString(["intrp2"]), new ScilabDouble([1]));
+ model.in = new ScilabDouble([1], [1]);
+ model.out = new ScilabDouble([1]);
+ model.rpar = new ScilabDouble(...this.a,...this.b,...colon_operator(this.c));
+ model.ipar = new ScilabDouble([2], [2]);
+ model.blocktype = new ScilabString(["c"]);
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var exprs = new ScilabString([sci2exp(this.a)],[sci2exp(this.b)],[sci2exp(this.c)]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"INTRP2BLK_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, exprs, gr_i);
+ return new BasicBlock(this.x);
+ }
+ INTRP2BLK_f.prototype.details = function INTRP2BLK_f() {
+ return this.x;
+ }
+}
+
diff --git a/data_structures_correct/SampleCLK.js b/data_structures_correct/SampleCLK.js
new file mode 100644
index 0000000..5568e10
--- /dev/null
+++ b/data_structures_correct/SampleCLK.js
@@ -0,0 +1,22 @@
+function SampleCLK() {
+
+ SampleCLK.prototype.define = function SampleCLK() {
+
+ var model = scicos_model();
+ model.sim = new ScilabString(["sampleclk"]);
+ model.evtout = new ScilabDouble([1]);
+ model.rpar = new ScilabDouble([1, 0]);
+ model.blocktype = new ScilabString(["d"]);
+ model.firing = new ScilabDouble([-1]);
+ model.dep_ut = new ScilabBoolean([false, false]);
+
+ var exprs = new ScilabString([sci2exp(1)], [sci2exp(0)]);
+
+ this.x = new standard_define(new ScilabDouble([2, 2]), model, exprs, ["xstringb(orig(1),orig(2),\"SampleCLK\",sz(1),sz(2));"]);
+ return new BasicBlock(this.x);
+ }
+ SampleCLK.prototype.details = function SampleCLK() {
+ return this.x;
+ }
+}
+