class TestGeneral(unittest.TestCase): def setUp(self): #run before each test self.VSE = VSE().jav_OpenTest(host) def tearDown(self): #Run after each test self.assertEqual(self.VSE.jav_Error()[0],'0') self.VSE.jav_Close() ############################################################################### ### <Test> ############################################################################### def test_VSE_Example(self): Fs = 122.88e6 IQFile = 'IQFile.iqw' OFDMCfg = "\\misc\\OFDM.xml" self.VSE.jav_Reset() self.VSE.Init_K96() #Change Channel self.VSE.Set_DisplayUpdate("ON") #Display On self.VSE.Set_SweepCont(0) #Continuous Sweep Off self.VSE.Set_IQ_SamplingRate(Fs) #Sampling Rate self.VSE.Set_File_InputIQW(Fs,IQFile) #VSE Input File self.VSE.Set_K96_File_Config(OFDMCfg) #K96 Demod File self.VSE.Set_K96_BurstSearch("OFF") #Burst Search off self.VSE.Set_K96_OFDMSymbols(14) self.VSE.K96_EVM_AutoCal() getVal = self.VSE.Get_EVM()
SMW.jav_Open(SMW_IP, f.sFName) #Connect to SMW FSW = VSA() #Create FSW Object FSW.jav_Open(FSW_IP, f.sFName) #Connect to FSW VSE = VSE() #Create VSE Object VSE.jav_Open(VSE_IP, f.sFName) #Connect to VSE if 0: SMW.jav_logSCPI() FSW.jav_logSCPI() VSE.jav_logSCPI() ########################################################## ### Setup Instruments ########################################################## VSE.jav_Reset() #time.sleep(6) VSE.Init_K96() #Change Channel VSE.Set_DisplayUpdate("ON") #Display On VSE.Set_SweepCont(0) #Continuous Sweep Off VSE.Set_IQ_SamplingRate(Fs) #Sampling Rate VSE.Set_File_InputIQW(Fs, IQFile) #VSE Input File VSE.Set_K96_File_Config(OFDMCfg) #K96 Demod File VSE.Set_K96_BurstSearch("OFF") #Burst Search off VSE.Set_K96_OFDMSymbols(14) FSW.jav_Reset() FSW.Init_IQ() #FSW IQ Channel FSW.Set_IQ_SamplingRate(Fs) FSW.Set_SweepTime(MeasTim) SMW.Set_RFState("ON")
f = rssd.FileIO.FileIO() DataFile = f.Init(OutFile) SMW = VSG().jav_Open(SMW_IP, f.sFName) #Connect to SMW FSW = VSA().jav_Open(FSW_IP, f.sFName) #Connect to FSW VSE = VSE().jav_Open(VSE_IP, f.sFName) #Connect to VSE # SMW.jav_logSCPI() # FSW.jav_logSCPI() # VSE.jav_logSCPI() ########################################################## ### Setup Instruments ########################################################## VSE.jav_Reset() time.sleep(6) VSE.Init_K96() #VSE K96 OFDMVSA CH VSE.Set_DisplayUpdate("ON") #Display On VSE.Set_SweepCont(0) #Continuous Sweep Off VSE.Set_IQ_SamplingRate(Fs) #Sampling Rate VSE.Set_File_InputIQW(Fs, IQFile) #VSE Input File,IQW VSE.Set_K96_File_Config(OFDMCfg) #K96 Demod File VSE.Set_K96_BurstSearch("OFF") #Burst Search off VSE.Set_K96_OFDMSymbols(14) FSW.jav_Reset() FSW.Init_IQ() #FSW IQ CH FSW.Set_IQ_SamplingRate(Fs) FSW.Set_SweepTime(MeasTim) SMW.Set_RFState("ON") ##########################################################