summaryrefslogtreecommitdiff
path: root/js/Electrical
diff options
context:
space:
mode:
authorSunil Shetye2018-07-02 20:21:14 +0530
committerSunil Shetye2018-07-02 21:20:51 +0530
commit5ea6bd919623bb0dd58f235329b985b2bb6cb4ba (patch)
tree15164190cae390d0a701fcd7ce99fa3addb4134c /js/Electrical
parent468de187d0ad59613aa73384976b58b78200ae43 (diff)
downloadsci2js-5ea6bd919623bb0dd58f235329b985b2bb6cb4ba.tar.gz
sci2js-5ea6bd919623bb0dd58f235329b985b2bb6cb4ba.tar.bz2
sci2js-5ea6bd919623bb0dd58f235329b985b2bb6cb4ba.zip
add set block
Diffstat (limited to 'js/Electrical')
-rw-r--r--js/Electrical/Capacitor.js2
-rw-r--r--js/Electrical/ConstantVoltage.js1
-rw-r--r--js/Electrical/Diode.js4
-rw-r--r--js/Electrical/Gyrator.js2
-rw-r--r--js/Electrical/IdealTransformer.js1
-rw-r--r--js/Electrical/Inductor.js1
-rw-r--r--js/Electrical/NMOS.js9
-rw-r--r--js/Electrical/NPN.js17
-rw-r--r--js/Electrical/OpAmp.js3
-rw-r--r--js/Electrical/PMOS.js9
-rw-r--r--js/Electrical/PNP.js17
-rw-r--r--js/Electrical/Resistor.js1
-rw-r--r--js/Electrical/SineVoltage.js5
-rw-r--r--js/Electrical/Switch.js2
-rw-r--r--js/Electrical/VVsourceAC.js1
-rw-r--r--js/Electrical/VsourceAC.js2
16 files changed, 77 insertions, 0 deletions
diff --git a/js/Electrical/Capacitor.js b/js/Electrical/Capacitor.js
index ce382b43..66bb921b 100644
--- a/js/Electrical/Capacitor.js
+++ b/js/Electrical/Capacitor.js
@@ -29,6 +29,8 @@ function Capacitor() {
Capacitor.prototype.get = function Capacitor() {
}
Capacitor.prototype.set = function Capacitor() {
+ this.C = parseFloat((arguments[0]["C"]))
+ this.v = parseFloat((arguments[0]["v"]))
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
diff --git a/js/Electrical/ConstantVoltage.js b/js/Electrical/ConstantVoltage.js
index c0e752f1..afc8b40d 100644
--- a/js/Electrical/ConstantVoltage.js
+++ b/js/Electrical/ConstantVoltage.js
@@ -28,6 +28,7 @@ function ConstantVoltage() {
ConstantVoltage.prototype.get = function ConstantVoltage() {
}
ConstantVoltage.prototype.set = function ConstantVoltage() {
+ this.V = parseFloat((arguments[0]["V"]))
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
diff --git a/js/Electrical/Diode.js b/js/Electrical/Diode.js
index a5b8706a..d8141b81 100644
--- a/js/Electrical/Diode.js
+++ b/js/Electrical/Diode.js
@@ -31,6 +31,10 @@ function Diode() {
Diode.prototype.get = function Diode() {
}
Diode.prototype.set = function Diode() {
+ this.Ids = parseFloat((arguments[0]["Ids"]))
+ this.Vt = parseFloat((arguments[0]["Vt"]))
+ this.Maxexp = parseFloat((arguments[0]["Maxexp"]))
+ this.R = parseFloat((arguments[0]["R"]))
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
diff --git a/js/Electrical/Gyrator.js b/js/Electrical/Gyrator.js
index 7731ffb4..05d27e6f 100644
--- a/js/Electrical/Gyrator.js
+++ b/js/Electrical/Gyrator.js
@@ -55,6 +55,8 @@ function Gyrator() {
Gyrator.prototype.get = function Gyrator() {
}
Gyrator.prototype.set = function Gyrator() {
+ this.G1 = parseFloat((arguments[0]["G1"]))
+ this.G2 = parseFloat((arguments[0]["G2"]))
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
diff --git a/js/Electrical/IdealTransformer.js b/js/Electrical/IdealTransformer.js
index 4470efff..4da364af 100644
--- a/js/Electrical/IdealTransformer.js
+++ b/js/Electrical/IdealTransformer.js
@@ -55,6 +55,7 @@ function IdealTransformer() {
IdealTransformer.prototype.get = function IdealTransformer() {
}
IdealTransformer.prototype.set = function IdealTransformer() {
+ this.N = parseFloat((arguments[0]["N"]))
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
diff --git a/js/Electrical/Inductor.js b/js/Electrical/Inductor.js
index e9f81d71..052b27ad 100644
--- a/js/Electrical/Inductor.js
+++ b/js/Electrical/Inductor.js
@@ -28,6 +28,7 @@ function Inductor() {
Inductor.prototype.get = function Inductor() {
}
Inductor.prototype.set = function Inductor() {
+ this.L = parseFloat((arguments[0]["L"]))
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
diff --git a/js/Electrical/NMOS.js b/js/Electrical/NMOS.js
index 0dcf0c8b..f59e41fb 100644
--- a/js/Electrical/NMOS.js
+++ b/js/Electrical/NMOS.js
@@ -35,6 +35,15 @@ function NMOS() {
NMOS.prototype.get = function NMOS() {
}
NMOS.prototype.set = function NMOS() {
+ this.W = parseFloat((arguments[0]["W"]))
+ this.L = parseFloat((arguments[0]["L"]))
+ this.Beta = parseFloat((arguments[0]["Beta"]))
+ this.Vt = parseFloat((arguments[0]["Vt"]))
+ this.K2 = parseFloat((arguments[0]["K2"]))
+ this.K5 = parseFloat((arguments[0]["K5"]))
+ this.dW = parseFloat((arguments[0]["dW"]))
+ this.dL = parseFloat((arguments[0]["dL"]))
+ this.RDS = parseFloat((arguments[0]["RDS"]))
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
diff --git a/js/Electrical/NPN.js b/js/Electrical/NPN.js
index 1117d2c7..a02e0de3 100644
--- a/js/Electrical/NPN.js
+++ b/js/Electrical/NPN.js
@@ -55,6 +55,23 @@ function NPN() {
NPN.prototype.get = function NPN() {
}
NPN.prototype.set = function NPN() {
+ this.Bf = parseFloat((arguments[0]["Bf"]))
+ this.Br = parseFloat((arguments[0]["Br"]))
+ this.Is = parseFloat((arguments[0]["Is"]))
+ this.Vak = parseFloat((arguments[0]["Vak"]))
+ this.Tauf = parseFloat((arguments[0]["Tauf"]))
+ this.Taur = parseFloat((arguments[0]["Taur"]))
+ this.Ccs = parseFloat((arguments[0]["Ccs"]))
+ this.Cje = parseFloat((arguments[0]["Cje"]))
+ this.Cjc = parseFloat((arguments[0]["Cjc"]))
+ this.Phie = parseFloat((arguments[0]["Phie"]))
+ this.Me = parseFloat((arguments[0]["Me"]))
+ this.Phic = parseFloat((arguments[0]["Phic"]))
+ this.Mc = parseFloat((arguments[0]["Mc"]))
+ this.Gbc = parseFloat((arguments[0]["Gbc"]))
+ this.Gbe = parseFloat((arguments[0]["Gbe"]))
+ this.Vt = parseFloat((arguments[0]["Vt"]))
+ this.EMinMax = parseFloat((arguments[0]["EMinMax"]))
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
diff --git a/js/Electrical/OpAmp.js b/js/Electrical/OpAmp.js
index 0c01a215..ffe642ac 100644
--- a/js/Electrical/OpAmp.js
+++ b/js/Electrical/OpAmp.js
@@ -29,6 +29,9 @@ function OpAmp() {
OpAmp.prototype.get = function OpAmp() {
}
OpAmp.prototype.set = function OpAmp() {
+ this.OLGain = parseFloat((arguments[0]["OLGain"]))
+ this.SatH = parseFloat((arguments[0]["SatH"]))
+ this.SatL = parseFloat((arguments[0]["SatL"]))
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
diff --git a/js/Electrical/PMOS.js b/js/Electrical/PMOS.js
index f53fe667..2f3579cf 100644
--- a/js/Electrical/PMOS.js
+++ b/js/Electrical/PMOS.js
@@ -35,6 +35,15 @@ function PMOS() {
PMOS.prototype.get = function PMOS() {
}
PMOS.prototype.set = function PMOS() {
+ this.W = parseFloat((arguments[0]["W"]))
+ this.L = parseFloat((arguments[0]["L"]))
+ this.Beta = parseFloat((arguments[0]["Beta"]))
+ this.Vt = parseFloat((arguments[0]["Vt"]))
+ this.K2 = parseFloat((arguments[0]["K2"]))
+ this.K5 = parseFloat((arguments[0]["K5"]))
+ this.dW = parseFloat((arguments[0]["dW"]))
+ this.dL = parseFloat((arguments[0]["dL"]))
+ this.RDS = parseFloat((arguments[0]["RDS"]))
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
diff --git a/js/Electrical/PNP.js b/js/Electrical/PNP.js
index 25d48f09..3f03ceda 100644
--- a/js/Electrical/PNP.js
+++ b/js/Electrical/PNP.js
@@ -55,6 +55,23 @@ function PNP() {
PNP.prototype.get = function PNP() {
}
PNP.prototype.set = function PNP() {
+ this.Bf = parseFloat((arguments[0]["Bf"]))
+ this.Br = parseFloat((arguments[0]["Br"]))
+ this.Is = parseFloat((arguments[0]["Is"]))
+ this.Vak = parseFloat((arguments[0]["Vak"]))
+ this.Tauf = parseFloat((arguments[0]["Tauf"]))
+ this.Taur = parseFloat((arguments[0]["Taur"]))
+ this.Ccs = parseFloat((arguments[0]["Ccs"]))
+ this.Cje = parseFloat((arguments[0]["Cje"]))
+ this.Cjc = parseFloat((arguments[0]["Cjc"]))
+ this.Phie = parseFloat((arguments[0]["Phie"]))
+ this.Me = parseFloat((arguments[0]["Me"]))
+ this.Phic = parseFloat((arguments[0]["Phic"]))
+ this.Mc = parseFloat((arguments[0]["Mc"]))
+ this.Gbc = parseFloat((arguments[0]["Gbc"]))
+ this.Gbe = parseFloat((arguments[0]["Gbe"]))
+ this.Vt = parseFloat((arguments[0]["Vt"]))
+ this.EMinMax = parseFloat((arguments[0]["EMinMax"]))
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
diff --git a/js/Electrical/Resistor.js b/js/Electrical/Resistor.js
index 4341ccb6..fb284839 100644
--- a/js/Electrical/Resistor.js
+++ b/js/Electrical/Resistor.js
@@ -28,6 +28,7 @@ function Resistor() {
Resistor.prototype.get = function Resistor() {
}
Resistor.prototype.set = function Resistor() {
+ this.R = parseFloat((arguments[0]["R"]))
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
diff --git a/js/Electrical/SineVoltage.js b/js/Electrical/SineVoltage.js
index 2ec0a70e..d3997f59 100644
--- a/js/Electrical/SineVoltage.js
+++ b/js/Electrical/SineVoltage.js
@@ -32,6 +32,11 @@ function SineVoltage() {
SineVoltage.prototype.get = function SineVoltage() {
}
SineVoltage.prototype.set = function SineVoltage() {
+ this.V = parseFloat((arguments[0]["V"]))
+ this.ph = parseFloat((arguments[0]["ph"]))
+ this.frq = parseFloat((arguments[0]["frq"]))
+ this.offset = parseFloat((arguments[0]["offset"]))
+ this.start = parseFloat((arguments[0]["start"]))
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
diff --git a/js/Electrical/Switch.js b/js/Electrical/Switch.js
index 3c2e119e..ad7ed43d 100644
--- a/js/Electrical/Switch.js
+++ b/js/Electrical/Switch.js
@@ -31,6 +31,8 @@ function Switch() {
Switch.prototype.get = function Switch() {
}
Switch.prototype.set = function Switch() {
+ this.Ron = parseFloat((arguments[0]["Ron"]))
+ this.Roff = parseFloat((arguments[0]["Roff"]))
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
diff --git a/js/Electrical/VVsourceAC.js b/js/Electrical/VVsourceAC.js
index 779cdd91..3c733b2b 100644
--- a/js/Electrical/VVsourceAC.js
+++ b/js/Electrical/VVsourceAC.js
@@ -29,6 +29,7 @@ function VVsourceAC() {
VVsourceAC.prototype.get = function VVsourceAC() {
}
VVsourceAC.prototype.set = function VVsourceAC() {
+ this.FR = parseFloat((arguments[0]["FR"]))
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;
diff --git a/js/Electrical/VsourceAC.js b/js/Electrical/VsourceAC.js
index dea601d2..333da4eb 100644
--- a/js/Electrical/VsourceAC.js
+++ b/js/Electrical/VsourceAC.js
@@ -29,6 +29,8 @@ function VsourceAC() {
VsourceAC.prototype.get = function VsourceAC() {
}
VsourceAC.prototype.set = function VsourceAC() {
+ this.VA = parseFloat((arguments[0]["VA"]))
+ this.FR = parseFloat((arguments[0]["FR"]))
this.x = arg1;
graphics = arg1.graphics;
exprs = graphics.exprs;