mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-25 01:07:22 +00:00
Merge pull request #234 from Telecominfraproject/octal_ds_rfcardcal_args
allow user to specify UL/DL freqs and test equipment ip addr
This commit is contained in:
@@ -13,6 +13,7 @@ pp_base = '>' # prompt base for tn_write
|
||||
class Calibration(object):
|
||||
|
||||
cfg = test_config.EnbConfig()
|
||||
cfg.set_test_equipment()
|
||||
enb = enodeb_ctrl.enodeB_Ctrl()
|
||||
|
||||
if (cfg.test_set == 'agilent'):
|
||||
|
||||
@@ -427,7 +427,7 @@ class rfCardCal():
|
||||
return self.enb.enb_eeprom_get_earfcn_dl()
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
def set_initial_frequency(self):
|
||||
|
||||
if (self.cfg.cal_freq_arr[0][0] == 0) and (self.cfg.cal_freq_arr[0][1] == 0):
|
||||
@@ -438,11 +438,29 @@ class rfCardCal():
|
||||
test_config.dl_freq = self.cfg.cal_freq_arr[0][0]
|
||||
test_config.ul_freq = self.cfg.cal_freq_arr[0][1]
|
||||
|
||||
correct_freq = 'n'
|
||||
while (correct_freq != 'y'):
|
||||
print("\nSelected DL freq = " + str(test_config.dl_freq))
|
||||
correct_freq = raw_input("Is this the correct DL freq?(y/n):")
|
||||
if (correct_freq == 'y') or (correct_freq == 'Y'):
|
||||
break
|
||||
else:
|
||||
test_config.dl_freq = float(raw_input("Please enter the correct DL freq:"))
|
||||
|
||||
correct_freq = 'n'
|
||||
while (correct_freq != 'y'):
|
||||
print("\nSelected UL freq = " + str(test_config.ul_freq))
|
||||
correct_freq = raw_input("Is this the correct UL freq?(y/n):")
|
||||
if (correct_freq == 'y') or (correct_freq == 'Y'):
|
||||
break
|
||||
else:
|
||||
test_config.ul_freq = float(raw_input("Please enter the correct UL freq:"))
|
||||
|
||||
print "\nUsing the following configuration:"
|
||||
print "Band " + str(test_config.band)
|
||||
print "DL freq. " + str(test_config.dl_freq) + " MHz"
|
||||
print "UL freq. " + str(test_config.ul_freq) + " MHz"
|
||||
print ""
|
||||
|
||||
|
||||
def is_empty_eeprom(self):
|
||||
|
||||
res = False
|
||||
@@ -551,7 +569,7 @@ class rfCardCal():
|
||||
self.enb.enb_login()
|
||||
|
||||
def run(self):
|
||||
|
||||
self.set_initial_frequency() # for non-testall items
|
||||
self.enb.start_telnet_session()
|
||||
self.enb.enb_login()
|
||||
|
||||
@@ -592,8 +610,7 @@ class rfCardCal():
|
||||
|
||||
self.open_test_report(self.dir_report)
|
||||
self.enb.end_telnet_session()
|
||||
self.set_initial_frequency() # for non-testall items
|
||||
|
||||
|
||||
# connect instruments
|
||||
ic = im_calibration.Calibration(self.report_hndl, self.curr_rec_num)
|
||||
try:
|
||||
|
||||
@@ -73,7 +73,7 @@ class EnbConfig():
|
||||
self.cr_txevm_max = 3.5 # maximum TX EVM limit
|
||||
|
||||
# system variables
|
||||
self.en_eeprom_write = True # disable when refkit1
|
||||
self.en_eeprom_write = False # disable when refkit1
|
||||
self.eeprom_record_ver = 1 # EEPROM record version
|
||||
self.test_report = True # T: enable test report; F: disable
|
||||
self.instr_disp = True # T: enable instrument screen display
|
||||
@@ -106,7 +106,26 @@ class EnbConfig():
|
||||
self.select_rf_drv_init()
|
||||
self.select_dl_etm_test_vector()
|
||||
self.select_ul_exg_waveform()
|
||||
|
||||
|
||||
def set_test_equipment(self):
|
||||
correct_ipaddr = 'n'
|
||||
while (correct_ipaddr != 'y'):
|
||||
print("\nSelected exg ipaddr = " + self.exg_ipaddr)
|
||||
correct_ipaddr = raw_input("Is this the correct exg ipaddr?(y/n):")
|
||||
if (correct_ipaddr == 'y') or (correct_ipaddr == 'Y'):
|
||||
break
|
||||
else:
|
||||
self.exg_ipaddr = raw_input("Please enter the correct exg ipaddr:")
|
||||
|
||||
correct_ipaddr = 'n'
|
||||
while (correct_ipaddr != 'y'):
|
||||
print("\nSelected mxa ipaddr = " + self.mxa_ipaddr)
|
||||
correct_ipaddr = raw_input("Is this the correct mxa ipaddr?(y/n):")
|
||||
if (correct_ipaddr == 'y') or (correct_ipaddr == 'Y'):
|
||||
break
|
||||
else:
|
||||
self.mxa_ipaddr = raw_input("Please enter the correct mxa ipaddr:")
|
||||
|
||||
def check_cfg_file(self):
|
||||
|
||||
cfgfile = open(self.cfg_file, "r")
|
||||
|
||||
@@ -38,7 +38,7 @@ manual_switch_instr=False # T: pause for manual switching; F: continuous
|
||||
test_set='agilent' # test set type [agilent, anritsu, rs]
|
||||
|
||||
# agilent test set
|
||||
exg_ipaddr='10.115.115.38' # EXG IP address
|
||||
exg_ipaddr='10.102.81.38' # EXG IP address
|
||||
exg_tcp_port=5025 # EXG TCP port
|
||||
mxa_ipaddr='10.102.81.200' # MXA IP address
|
||||
mxa_tcp_port=5025 # MXA TCP port
|
||||
@@ -63,7 +63,7 @@ cr_txpwr_max=22 # maximum TX output power limit
|
||||
cr_txevm_max=5.0 # maximum TX EVM limit
|
||||
|
||||
# system variables
|
||||
en_eeprom_write=True # T: write EEPROM
|
||||
en_eeprom_write=False # T: write EEPROM
|
||||
eeprom_record_ver=1 # EEPROM record version
|
||||
test_report=True # T: enable test report; F: disable
|
||||
instr_disp=True # T: enable instrument screen display
|
||||
|
||||
Reference in New Issue
Block a user