summaryrefslogtreecommitdiff
path: root/js/Linear/REGISTER.js
diff options
context:
space:
mode:
authorSunil Shetye2018-06-26 14:59:47 +0530
committerSunil Shetye2018-06-26 14:59:47 +0530
commiteb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00 (patch)
tree6378935263fe5cafd389b6893ac3b37a1dd4b1a7 /js/Linear/REGISTER.js
parentafed64f1a0eab0b2d742088186d7bc340a2c895b (diff)
downloadsci2js-eb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00.tar.gz
sci2js-eb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00.tar.bz2
sci2js-eb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00.zip
add return value from scicos_getvalue to global vars
Diffstat (limited to 'js/Linear/REGISTER.js')
-rw-r--r--js/Linear/REGISTER.js44
1 files changed, 22 insertions, 22 deletions
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;