blob: eff53736a64e6f047540e47a7c5c93cbb6b4f11a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
/* autogenerated from "macros/Branching/SELF_SWITCH.sci" */
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.in = 1;
this.x.model.out = 1;
this.x.model.blocktype = "h";
this.x.model.dep_ut = [false,false];
this.x.model.rpar = genSwitchInnerDiagram(this.stateOpen);
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() {
alert("parameters cannot be modified");
}
SELF_SWITCH.prototype.set = function SELF_SWITCH() {
this.stateOpen = this.x.model.opar[1-1];
this.x.model.rpar = genSwitchInnerDiagram(!this.stateOpen);
this.x.model.opar = list(!this.stateOpen);
var y = 0;
var 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);
}
SELF_SWITCH.prototype.get_popup_title = function SELF_SWITCH() {
return;
}
SELF_SWITCH.prototype.getContainer = function SELF_SWITCH() { return new BasicBlock(this.x); }
}
|