-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path4x4.py
43 lines (32 loc) · 1.15 KB
/
4x4.py
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
from testlib.util.db import Db
from combiner import combiner
def test_hardware():
from testlib.equip.nrpz11 import nrpz11
from testlib.equip.hp11713A import hp11713A
from testlib.equip.sg6000l import SG6000L
from config import test_config
cfg = test_config()
swt = hp11713A( host=cfg.get('SWTIP'))
pmLoss = nrpz11(cfg.get('PMLOSS'), timeout=10)
pmIso = nrpz11(cfg.get('PMISO' ), timeout=10)
sg = SG6000L(port=cfg.get('SGPORT'))
# pmLoss.calibrate()
# pmIso.calibrate()
pmLoss.setoffset(0)
pmIso.setoffset(0)
tdata = Db(cfg.get('DBFILE'), cfg.get('DBTBL'))
tdata.de_debug = 1
c = combiner(pmPwrLoss=pmLoss.avgPower,
pmFreqLoss=pmLoss.setfreq,
pmPwrIso=pmIso.avgPower,
pmFreqIso=pmIso.setfreq,
sgFreq=sg.setFreq,
swtOn=swt.SwitchOn,
swtOff=swt.SwitchOff,
dbWrite=tdata.Entry)
c.initialize()
c.printCAL()
c.testSequence( testSeq=c.Seq4X4)
tdata.Close()
if __name__ == '__main__':
test_hardware()