@@ -46,7 +46,10 | |||
|
46 | 46 | |
|
47 | 47 | if cmd == "SNDF": |
|
48 | 48 | datarpta = self.__sendFile2Modules(cmd = cmd, rx_buffer = rx_buffer) |
|
49 | ||
|
49 | ||
|
50 | if cmd == "GETF": | |
|
51 | datarpta = self.__getFileFromModules(cmd = cmd, rx_buffer = rx_buffer) | |
|
52 | ||
|
50 | 53 | if cmd == "CHGB": |
|
51 | 54 | datarpta = self.__changeBeam(cmd = cmd, rx_buffer = rx_buffer) |
|
52 | 55 | |
@@ -150,7 +153,7 | |||
|
150 | 153 | F_Obj.close() |
|
151 | 154 | FileStr = "".join(FileList) |
|
152 | 155 | |
|
153 |
return FileStr |
|
|
156 | return FileStr | |
|
154 | 157 | |
|
155 | 158 | def __All2Blocks(self,input): |
|
156 | 159 | |
@@ -190,6 +193,16 | |||
|
190 | 193 | rpta = "Failure" |
|
191 | 194 | |
|
192 | 195 | return rpta |
|
196 | ||
|
197 | def __getFileFromModules(self, cmd, rx_buffer): | |
|
198 | ||
|
199 | for id in range(1,65): | |
|
200 | if id not in self.enaModules: | |
|
201 | continue | |
|
202 | ||
|
203 | file = self.__ConnectionWithControlModules(rx_buffer,cmd,id) | |
|
204 | del self.rxFile[id-1] | |
|
205 | self.rxFile.insert(id-1, file) | |
|
193 | 206 | |
|
194 | 207 | def __changeBeam(self, cmd, rx_buffer): |
|
195 | 208 | |
@@ -339,6 +352,12 | |||
|
339 | 352 | |
|
340 | 353 | def __AutomaticControlModules(self): |
|
341 | 354 | |
|
355 | cmd = "GETF" | |
|
356 | rx_buffer = "experimento1.ab1" + "\n" | |
|
357 | self.__getFileFromModules(cmd = cmd, rx_buffer = rx_buffer) | |
|
358 | ||
|
359 | print self.rxFile | |
|
360 | ||
|
342 | 361 | cmd = "ANST" |
|
343 | 362 | rx_buffer = "1" |
|
344 | 363 | self.__getControlModuleStatus(cmd = cmd, rx_buffer = rx_buffer) |
@@ -348,12 +367,13 | |||
|
348 | 367 | self.__getControlModuleLowPhase(cmd = cmd, rx_buffer = rx_buffer) |
|
349 | 368 | print "Saving file..." |
|
350 | 369 | |
|
370 | ||
|
351 | 371 | print self.bits |
|
352 | 372 | print self.phase |
|
353 | 373 | |
|
354 | 374 | self.__WritingMonitoringFile() |
|
355 | 375 | |
|
356 |
threading.Timer( |
|
|
376 | threading.Timer(60, self.__AutomaticControlModules).start() | |
|
357 | 377 | |
|
358 | 378 | def __WritingMonitoringFile(self): |
|
359 | 379 | filename = "Monitoring.txt" |
General Comments 0
You need to be logged in to leave comments.
Login now