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.Seq2X2) tdata.Close()
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.Seq2X2) tdata.Close()
def __init__(self, cfg=None ): if cfg: 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.setoffset(0) pmIso.setoffset(0) combiner.__init__(self, pmPwrLoss=pmLoss.avgPower, pmFreqLoss=pmLoss.setfreq, pmPwrIso=pmIso.avgPower, pmFreqIso=pmIso.setfreq, sgFreq=sg.setFreq, swtOn=swt.SwitchOn, swtOff=swt.SwitchOff) else: combiner.__init__(self)
def __init__(self, cfg=None): if cfg: 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.setoffset(0) pmIso.setoffset(0) combiner.__init__(self, pmPwrLoss=pmLoss.avgPower, pmFreqLoss=pmLoss.setfreq, pmPwrIso=pmIso.avgPower, pmFreqIso=pmIso.setfreq, sgFreq=sg.setFreq, swtOn=swt.SwitchOn, swtOff=swt.SwitchOff) else: combiner.__init__(self)
def test_hw_Cal(): from testlib.equip.nrpz11 import nrpz11 from testlib.equip.hp11713A import hp11713A from sg6000l import SG6000L swt = hp11713A( host='10.8.9.22') pmLoss = nrpz11("RSNRP::0x000c::102973::INSTR", timeout=10) pmIso = nrpz11("RSNRP::0x000c::100759::INSTR", timeout=10) sg = SG6000L(port=16) pmLoss.setoffset(0) pmIso.setoffset(0) c = combiner(pmPwrLoss=pmLoss.avgPower, pmFreqLoss=pmLoss.setfreq, pmPwrIso=pmIso.avgPower, pmFreqIso=pmIso.setfreq, sgFreq=sg.setFreq, swtOn=swt.SwitchOn, swtOff=swt.SwitchOff) c.calSequence() c.printCAL()
def openZ11(self): print "open Z11" from testlib.equip.nrpz11 import nrpz11 self.z11 = nrpz11(self.cfg.get('NRPZ11', 'dev_id'), timeout=10)