summaryrefslogtreecommitdiff
path: root/js/Branching/SELF_SWITCH.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/Branching/SELF_SWITCH.js')
-rw-r--r--js/Branching/SELF_SWITCH.js48
1 files changed, 46 insertions, 2 deletions
diff --git a/js/Branching/SELF_SWITCH.js b/js/Branching/SELF_SWITCH.js
index 4133e106..93975975 100644
--- a/js/Branching/SELF_SWITCH.js
+++ b/js/Branching/SELF_SWITCH.js
@@ -1,3 +1,47 @@
-Syntax error in input LexToken(DOT,'.',1,644)
/* autogenerated from "macros/Branching/SELF_SWITCH.sci" */
-None
+function SELF_SWITCH() {
+ SELF_SWITCH.prototype.define = function SELF_SWITCH() {
+ this.stateOpen = true;
+ this.x = scicos_block();
+ this.x.gui = "SELF_SWITCH";
+ this.x.graphics.sz = [2,2];
+ this.x.graphics.gr_i = [];
+ this.x.graphics.pin = 0;
+ this.x.graphics.pout = 0;
+ this.x.model.sim = "csuper";
+ this.x.model.in1 = 1;
+ this.x.model.out = 1;
+ this.x.model.blocktype = "h";
+ this.x.model.dep_ut = [false,false];
+ this.x.model.rpar = this.genSwitchInnerDiagram[this.stateOpen-1];
+ this.x.model.opar = list(this.stateOpen);
+ this.x.graphics.in_implicit = ["E"];
+ this.x.graphics.in_style = "";
+ this.x.graphics.out_implicit = ["E"];
+ this.x.graphics.out_style = "";
+ this.x.graphics.style = "SELF_SWITCH_OFF";
+ return new BasicBlock(this.x);
+ }
+ SELF_SWITCH.prototype.details = function SELF_SWITCH() {
+ return this.x;
+ }
+ SELF_SWITCH.prototype.get = function SELF_SWITCH() {
+ var options = {
+ }
+ return options;
+ }
+ SELF_SWITCH.prototype.set = function SELF_SWITCH() {
+ this.x = arg1;
+ this.stateOpen = this.x.model.opar[1-1];
+ this.x.model.rpar = this.genSwitchInnerDiagram[!this.stateOpen-1];
+ this.x.model.opar = list(!this.stateOpen);
+ y = 0;
+ typ = list();
+ if (this.stateOpen==false) {
+ this.x.graphics.style = "SELF_SWITCH_OFF";
+ } else {
+ this.x.graphics.style = "SELF_SWITCH_ON";
+ }
+ return new BasicBlock(this.x);
+ }
+}