##// END OF EJS Templates
Correciones en la función de envío de archivos hacia los módulos de control
imanay -
r42:43
parent child
Show More
@@ -77,12 +77,14
77 77 def sendFile(self, base):
78 78
79 79 #Needed for the file creation
80 file_list = self.datarx
80 # file_str = self.datarx
81 81 #Needed for the loop
82 rx_frame_list = self.datarx.split('\n')
82 rx_frame_list = self.datarx.split('\n',2)
83 83
84 84 experiment_name = rx_frame_list[0]
85 85 experiment_number = rx_frame_list[1]
86 str_control_modules = rx_frame_list[2]
87 lst_control_modules = str_control_modules.split("------\n")
86 88 #Setting variables of the loop
87 89 i =3
88 90 module = 1
@@ -95,7 +97,9
95 97 fobj = open(experiment_name,"w")
96 98 fobj.write(experiment_name + "\n")
97 99 fobj.write("------\n")
98 fobj.writelines(file_list[i:i + number_of_beams + 1])
100 # tmp_list = rx_frame_list[i:i + number_of_beams + 1]
101 fobj.write(lst_control_modules[module-1])
102 fobj.write("------\n")
99 103 fobj.close()
100 104 if module_list[module -1] == "1":
101 105 #Preparing and doing the tftp command
@@ -108,7 +112,7
108 112 #Working with the UDP socket
109 113 #self.commClientObj.sendData("CARGA:experimento1.ab1:")
110 114 self.commClientObj.sendData("CARGA:" + experiment_name + ":")
111
115 self.commClientObj.sendData("CAMBIA:0:")
112 116 #
113 117 # self.ftpCommObj.sendFile(filename)
114 118 # rpta = self.commClientObj.sendTxRxCommand(cmd='CARGA', data=filename)
@@ -128,4 +132,5
128 132
129 133 absObj = ABSServer()
130 134
131 absObj.waitRequest() No newline at end of file
135 while 1:
136 absObj.waitRequest() No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now