Ejemplo n.º 1
0
    if returnMark == True:
        print(strings, file=GLB_LOG_FILE)
        print(strings)
    else:
        print(strings, file=GLB_LOG_FILE)
        print(strings),


global GLB_LOG_FILE
if not os.path.exists(".\\results"):
    os.mkdir(".\\results")
GLB_LOG_FILE = open(".\\results\\tmpLog.log", 'w+')

hal = groove_Hal(host='172.29.150.195',
                 port=8022,
                 username='******',
                 password='******',
                 timeout=10)

#hal.write("hw 1 ofp2 2 c x DoColdStart")
#hal.write("hw 1 cpld x setOfp2Ctrl OFP2_2 MUTEL1 0")
hal.write("hw 1 cpld x setOfp2Ctrl OFP2_2 MUTEL2 0")
#hal.write("hw 1 cpld x setOfp2Ctrl OFP2_2 PUMPDIS1 0")
hal.write("hw 1 cpld x setOfp2Ctrl OFP2_2 PUMPDIS2 0")
#hal.write("hw 1 ofp2 2 c x SetEdfaEnable EDFA_1 1")
hal.write("hw 1 ofp2 2 c x SetEdfaEnable EDFA_2 1")
hal.write("hw 1 ofp2 2 x setPeriodActionStatus ALL_ACTION 0")
#hal.write("hw 1 ofp2 2 c x SetEdfaOperatingMode EDFA_1 AGC")
hal.write("hw 1 ofp2 2 c x SetEdfaOperatingMode EDFA_2 AGC")
#hal.write("hw 1 ofp2 2 c x SetGainSetting EDFA_1 1000")
hal.write("hw 1 ofp2 2 c x SetGainSetting EDFA_2 1000")
Ejemplo n.º 2
0
################ result path  ####################################

result_path_p1 = "C:\\Users\\lab\\Desktop\\rawdata\\WSSP1\\9H1370432\\50G\\port1\\"
result_path_p2 = "C:\\Users\\lab\\Desktop\\rawdata\\WSSP1\\9H1370432\\50G\\port2\\"
result_path_p3 = "C:\\Users\\lab\\Desktop\\rawdata\\WSSP1\\9H1370432\\50G\\port3\\"
result_path_p4 = "C:\\Users\\lab\\Desktop\\rawdata\\WSSP1\\9H1370432\\50G\\port4\\"

####################################################
luna_ip = '10.13.11.254'
luna_port = 1
groove_ip = '10.13.11.252'

hal = groove_Hal(host=groove_ip,
                 port=8022,
                 username='******',
                 password='******',
                 timeout=10,
                 halusername='******',
                 halpassword='******')

wss = O2O1x4WSS(hal, card=1, subslot=3)

#setp 1
#channel setting
channel_plan = np.loadtxt(channel_plan_path, delimiter=',', usecols=(0, 1))

chn_id = channel_plan[0:, 0]
chn_id = [int(x) for x in chn_id]
chn_freq = channel_plan[0:, 1]

###############--Set Channel ID--############################